﻿:root { --tabbar: 0px; }
.row-token { grid-template-columns: 44px minmax(140px,1.3fr) 84px 84px 76px minmax(150px,1.1fr) auto; }

/* ---------- <=1100: token + launch collapse to one column ---------- */
@media (max-width: 1100px) {
  .tgrid2 { grid-template-columns: minmax(0,1fr); }
  .t-right { position: static; height: 0; padding: 0; }
  .t-right .ticket { display: none; }
  .th { flex-direction: column; align-items: flex-start; gap: 18px; }
  .th-right { flex-wrap: wrap; gap: 14px 24px; }
  .buybar {
    display: flex; position: fixed; z-index: 45; left: 0; right: 0; bottom: var(--tabbar); gap: 10px; align-items: center;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(16,18,24,.96); backdrop-filter: blur(14px); border-top: 1px solid var(--border-hi);
  }
  .buybar .bb-p { flex: 1; min-width: 0; } .buybar .bb-p .v { font: 500 16px var(--f-mono); display: block; margin-top: 4px; }
  .buybar .btn { height: 44px; padding: 0 22px; }
  .lgrid2 { grid-template-columns: minmax(0,1fr); row-gap: 20px; }
  .lprev { display: contents; }
  .lhead2 { order: 0; padding-bottom: 0; } .lp-top, .lp-mid { display: contents; } .launch-arc { order: 1; } .lp-card { order: 2; } .lform { order: 3; } .lp-bottom { order: 4; }

}

/* ---------- very narrow phones: the connected wallet and network pills must fit on one line ---------- */
@media (max-width: 359px) {
  .top-actions { gap: 6px; min-width: 0; max-width: 100%; }
  .top-actions .btn-ghost { padding-left: 12px; padding-right: 12px; }
  .net { padding: 0 9px; gap: 6px; font-size: 12px; min-width: 0; }
}

/* ---------- <=980: mobile chrome ---------- */
@media (max-width: 980px) {
  :root { --tabbar: 64px; --topbar: 0px; }
  .wrap { padding: 0 16px; }
  .topbar { position: relative; height: auto; backdrop-filter: none; }
  .topbar .wrap { flex-wrap: wrap; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
  .nav, .top-actions .btn-primary, .search kbd { display: none; }
  .hdr-x { margin-left: auto; }
  .hdr-x-end { margin-left: 0; }
  .top-actions { margin-left: auto; }
  .top-actions .btn-ghost { height: 40px; }
  .search { order: 5; flex: 1 1 100%; max-width: none; margin: 0; }
  .search .input { height: 44px; font-size: 15px; }
  .search-pop { top: 52px; }
  body { padding-bottom: calc(var(--tabbar) + 24px + env(safe-area-inset-bottom)); }
  .foot { margin-top: 40px; padding-bottom: 8px; }
  .foot nav { padding-left: 0; border-left: 0; }
  .foot .foot-r { margin-left: 0; width: 100%; }
  .foot .states { flex-wrap: wrap; }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom); background: rgba(16,18,24,.96); backdrop-filter: blur(14px); border-top: 1px solid var(--border);
  }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 48px; color: var(--text-3); font: 600 11px var(--f-ui); }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar [aria-current="page"] { color: var(--text); }
  .tabbar [aria-current="page"] svg { color: var(--text); }
  .tabbar .tb-launch svg { color: var(--ink); background: var(--signal-2); border-radius: 12px; padding: 4px; width: 34px; height: 34px; }
  .tabbar .tb-launch span { display: none; }
  .tabbar .tb-launch { gap: 0; }
  .toasts { right: 12px; left: 12px; width: auto; bottom: calc(var(--tabbar) + 64px + env(safe-area-inset-bottom)); }
}

/* ---------- <=767: arc layouts stack (board, token, launch) ---------- */
@media (max-width: 767px) {
  .hero { padding-top: 12px; }
  .hero-top { flex-direction: column; align-items: flex-start; gap: 18px; }
  .tagline { font-size: 19px; }
  .stats { width: 100%; } .stat { flex: 1; min-width: 0; padding: 0 14px; } .stat:first-child { padding-left: 0; } .stat .v { font-size: 17px; }
  .arc-zone { display: flex; flex-direction: column; margin: 8px -4px 0; }
  .arc-svg, .token-arc .arc-svg, .launch-arc .arc-svg { min-height: 286px; order: 1; }
  .arc-label, .launch-arc .arc-label { position: static; width: auto; order: 2; padding: 0 4px; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: end; margin-top: 4px; }
  .al-pct, .launch-arc .al-pct { font-size: 64px; } .al-pct small, .launch-arc .al-pct small { font-size: 28px; }
  .al-rem { margin: 0 0 6px; } .al-rem b, .launch-arc .al-rem b { font-size: 16px; margin-bottom: 2px; }
  .al-id { grid-column: 1 / -1; margin: 10px 0 10px; padding-top: 10px; }
  .al-pool { grid-column: 1 / -1; }
  .arc-label .btn { grid-column: 1 / -1; height: 48px; width: 100%; font-size: 14px; }
  .arc-queue, .arc-trust, .arc-note { position: static; width: auto; order: 3; margin-top: 14px; padding: 0 4px; }
  .arc-queue > .label { margin-left: 0; }
  .queue { flex-direction: row; overflow-x: auto; gap: 8px; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .queue::-webkit-scrollbar { display: none; }
  .q-item { flex: 0 0 196px; background: rgba(255,255,255,0.03); }
  .board { padding-top: 12px; }
  .tape-list .trade { height: 44px; }
  .th { padding-top: 12px; }
  .th h1 { font-size: 26px; }
  .th-right { width: 100%; }
  .mstrip { grid-template-columns: 1fr 1fr; }
  .m { padding: 16px 12px 16px 0; } .m + .m { padding-left: 16px; }
  .m:nth-child(3) { padding-left: 0; border-left: 0; } .m:nth-child(n+3) { border-top: 1px solid var(--border); }
  .m .v { font-size: 21px; }
}

/* ---------- <=720: phone details ---------- */
@media (max-width: 720px) {
  .hide-sm { display: none; }
  .panel-h, .sect-h { flex-wrap: wrap; }
  #chart-panel .sect-h > div { width: 100%; justify-content: space-between; }
  .seg button { padding: 0 11px; }
  .grid:not(.is-list) { grid-template-columns: minmax(0,1fr); }
  .toolbar { top: 0; margin-left: -16px; margin-right: -16px; padding: 10px 16px; }
  .filters button { height: 40px; }
  .viewtog button { height: 32px; width: 36px; }
  .row-token { grid-template-columns: 44px minmax(0,1fr) auto; grid-template-areas: 'a b c' 'a d d'; row-gap: 8px; }
  .row-token > :nth-child(1) { grid-area: a; align-self: start; } .row-token > :nth-child(2) { grid-area: b; }
  .row-token > :nth-child(3) { grid-area: c; } .row-token > :nth-child(4), .row-token > :nth-child(5) { display: none; }
  .row-token > :nth-child(6) { grid-area: d; } .row-token > :nth-child(7) { display: none; }
  .chart-toggle { display: inline-flex; }
  .chart-wrap svg { height: 230px; }
  .tbl .hide-xs { display: none; }
  .hbar { width: 56px; }
  .fs { padding: 18px; } .adv summary, .adv .body { padding-left: 18px; padding-right: 18px; }
  .basics { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .drop { width: 100%; height: 148px; } .three { grid-template-columns: 1fr; } .fb-row { grid-template-columns: 1fr; }
  .drop .acts { opacity: 1; }
  .btn, .input { min-height: 44px; } .tk-quick button { height: 44px; }
  .sheet .tk-quick button { height: 44px; }
}
