/* ==========================================================================
   Components
   ========================================================================== */

/* ---------- Wordmark ---------- */
.brand { display: inline-flex; align-items: center; gap: 9px; flex: none; }
.brand-mark { width: 28px; height: 28px; }
.brand-word {
  font-weight: 800; font-size: 19px; letter-spacing: -.03em; line-height: 1;
  display: inline-flex; align-items: baseline;
}
.brand-word b { font-weight: 800; color: var(--blue-ink); font-stretch: 85%; letter-spacing: -.01em; }
.brand-word i {
  font-style: normal; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0;
  color: var(--faint); margin-left: 3px; transform: translateY(-7px);
}
@media (max-width: 380px) { .brand-word i { display: none; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 12px; }
.hdr-nav { display: none; }
.hdr-actions { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.hdr-search {
  display: none;
  align-items: center; gap: 8px;
  height: 38px; width: 250px; padding: 0 10px 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--r-btn);
  background: var(--surface-2);
  color: var(--muted); font-size: var(--fs-sm);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.hdr-search:hover { border-color: var(--line-strong); background: var(--surface); }
.hdr-search kbd {
  margin-left: auto; font: 500 13px var(--mono); color: var(--muted);
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px; background: var(--surface);
}
.hdr-only-desktop { display: none; }
@media (min-width: 900px) {
  .hdr-nav { display: flex; align-items: stretch; height: 100%; margin-left: 20px; gap: 2px; }
  .hdr-nav a {
    position: relative; display: inline-flex; align-items: center; gap: 7px;
    padding: 0 12px; font-weight: 600; font-size: var(--fs-md); color: var(--ink-2);
    transition: color var(--t-fast);
  }
  .hdr-nav a:hover { color: var(--ink); }
  .hdr-nav a[aria-current="page"] { color: var(--ink); }
  .hdr-nav a[aria-current="page"]::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--blue);
  }
  .hdr-nav .nav-count {
    font: 500 12.5px/1 var(--mono); color: var(--green-ink);
    background: var(--green-tint); padding: 3px 5px; border-radius: var(--r-badge);
  }
  .hdr-search { display: inline-flex; }
  .hdr-search-icon { display: none !important; }
  .hdr-only-desktop { display: inline-grid; }
}
@media (min-width: 900px) and (max-width: 1100px) {
  .hdr-search { width: 170px; }
  .hdr-search kbd { display: none; }
}

/* ---------- Mobile bottom nav ---------- */
.mnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--mnav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.mnav a, .mnav button {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 13px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted);
}
.mnav a[aria-current="page"] { color: var(--ink); }
.mnav a[aria-current="page"]::before {
  content: ""; position: absolute; top: -1px; left: 30%; right: 30%; height: 2px; background: var(--blue);
}
.mnav .count-dot { top: 7px; right: calc(50% - 20px); }
.mnav svg { width: 22px; height: 22px; }
@media (min-width: 900px) { .mnav { display: none; } }

/* ---------- Badges ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 4px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 6px;
  border-radius: var(--r-badge);
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  line-height: 1; white-space: nowrap;
  background: var(--bg-2); color: var(--ink-2);
  border: 1px solid transparent;
}
.badge svg { width: 11px; height: 11px; }
.badge-shiny { background: #FFF8E6; color: var(--gold-ink); border-color: #F6DE9E; }
.badge-legendary { background: var(--gold-tint); color: var(--gold-ink); border-color: var(--gold-line); }
.badge-mythical { background: var(--violet-tint); color: var(--violet-ink); border-color: #DCD2FF; }
.badge-lv50 { background: var(--ink); color: #fff; font-family: var(--mono); letter-spacing: 0; font-weight: 600; }
.badge-hundo { background: var(--gold-tint); color: var(--gold-ink); border-color: var(--gold-line); font-family: var(--mono); letter-spacing: 0; }
.badge-lucky { background: #FFF5D6; color: #7A5A00; }
.badge-costume, .badge-legacy { background: var(--violet-tint); color: var(--violet-ink); }
.badge-background { background: var(--violet-tint); color: var(--violet-ink); }
.badge-regional { background: #E9F6F2; color: #146C57; }
.badge-shadow { background: #EFEAF7; color: #4A3470; }
.badge-purified { background: #EEF6FF; color: var(--blue-ink); }
.badge-mega { background: #FDEFF4; color: #9E2A55; }
.badge-new { background: var(--blue); color: #fff; }
.badge-tag { background: var(--surface); border-color: var(--line-2); color: var(--ink-2); }
.badge-tag.tag-gold { border-color: var(--gold-line); color: var(--gold-ink); background: var(--gold-tint); }
.badge-tag.tag-violet { border-color: #DCD2FF; color: var(--violet-ink); background: var(--violet-tint); }
.badge-tag.tag-green { border-color: #BDE7D2; color: var(--green-ink); background: var(--green-tint); }
.badge-tag.tag-blue { border-color: #BFE0FB; color: var(--blue-ink); background: var(--blue-tint); }

/* sparkle on shiny hover */
.badge-shiny svg, .slot-flag.is-shiny svg { transition: transform .5s var(--ease); }
.badge-shiny:hover svg, .slot:hover .slot-flag.is-shiny svg, .tile:hover .tile-shiny svg { transform: rotate(72deg) scale(1.25); }
.badge-shiny svg path, .slot-flag.is-shiny svg path { fill: var(--gold); }

/* location marker bob for backgrounds */
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.badge-background:hover svg, .slot:hover .slot-flag.is-bg svg { animation: bob .9s var(--ease) infinite; }

/* ---------- Availability ---------- */
.avail {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--green-ink); white-space: nowrap;
}
.avail::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 3px var(--green-tint);
}
.avail.is-off { color: var(--muted); }
.avail.is-off::before { background: var(--faint); box-shadow: 0 0 0 3px var(--bg-2); }
.avail.is-pulse::before { animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22,178,106,.45); } 70% { box-shadow: 0 0 0 7px rgba(22,178,106,0); } 100% { box-shadow: 0 0 0 0 rgba(22,178,106,0); } }

/* ---------- Price ---------- */
.price { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price .amt { white-space: nowrap; }
.price .cur { font-size: .6em; font-weight: 700; margin-right: 1px; vertical-align: .42em; }
.price .cents { font-size: .6em; font-weight: 750; vertical-align: .42em; margin-left: 1px; }
.price s { font-size: .62em; font-weight: 500; color: var(--faint); letter-spacing: 0; }
.price-sale { color: var(--red-ink); }

/* ---------- Heart / save ---------- */
.save-btn {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 6px;
  color: var(--faint);
  background: rgba(255,255,255,.85);
  border: 1px solid transparent;
  transition: color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.save-btn:hover { color: var(--red); background: #fff; border-color: var(--line); }
.save-btn[aria-pressed="true"] { color: var(--red); }
.save-btn[aria-pressed="true"] svg path { fill: currentColor; }
.save-btn.pop { animation: pop .35s var(--ease); }
@keyframes pop { 40% { transform: scale(1.25); } }

/* ---------- Trade card: inventory slot ---------- */
.slot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .slot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1100px) { .slot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1500px) { .slot-grid.is-wide { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.slot {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--sh-1);
  transition: transform var(--t-med) var(--ease), border-color var(--t-med), box-shadow var(--t-med);
  contain: layout;
}
.slot:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--sh-2); }
.slot.is-legendary { border-top-color: var(--gold-line); }
.slot.is-legendary::before {
  /* small gold edge detail */
  content: ""; position: absolute; left: 12px; top: -1px; width: 38px; height: 3px;
  background: var(--gold); border-radius: 0 0 2px 2px; z-index: 2;
}
.slot.is-off { opacity: .72; }
.slot.is-off .slot-media img { filter: grayscale(.8); }

.slot-media {
  position: relative;
  aspect-ratio: 1 / 1;
  margin: 6px 6px 0;
  border-radius: 6px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 45% 10% at 50% 86%, rgba(21,32,45,.10), transparent 70%),
    linear-gradient(var(--slot), var(--slot));
}
.slot-media::before {
  /* inventory cell grid */
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(21,32,45,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(21,32,45,.045) 1px, transparent 1px);
  background-size: 20px 20px; background-position: -1px -1px;
}
.slot.is-shiny .slot-media {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 222, 140, .30), transparent 58%),
    radial-gradient(ellipse 45% 10% at 50% 86%, rgba(21,32,45,.10), transparent 70%),
    linear-gradient(var(--slot), var(--slot));
}
.slot-media img {
  position: relative;
  width: 84%; height: 84%; margin: 8% auto 0; object-fit: contain;
  transition: transform var(--t-med) var(--ease);
}
.slot:hover .slot-media img { transform: scale(1.02); }
.slot-flags { position: absolute; top: 7px; left: 7px; display: flex; gap: 4px; z-index: 1; }
.slot-flag {
  display: grid; place-items: center; width: 24px; height: 24px;
  border-radius: 5px; background: rgba(255,255,255,.92); border: 1px solid var(--line);
  color: var(--ink-2);
}
.slot-flag svg { width: 14px; height: 14px; }
.slot-flag.is-bg { color: var(--violet-ink); }
.slot-flag.is-costume { color: var(--violet-ink); }
.slot .save-btn { position: absolute; top: 5px; right: 5px; z-index: 1; }
.slot-lv {
  position: absolute; left: 7px; bottom: 7px; z-index: 1;
  font: 600 12.5px/1 var(--mono); color: var(--ink-2);
  background: rgba(255,255,255,.9); border: 1px solid var(--line); padding: 4px 5px; border-radius: 4px;
}
.slot-lv.is-50 { background: var(--ink); color: #fff; border-color: var(--ink); }
.slot-new {
  position: absolute; right: 7px; bottom: 7px; z-index: 1;
  font: 600 12px/1 var(--mono); color: var(--blue-ink);
  background: var(--blue-tint); padding: 4px 5px; border-radius: 4px;
}
.slot-qv {
  position: absolute; left: 50%; bottom: 10px; z-index: 2;
  transform: translate(-50%, 6px); opacity: 0;
  display: none; align-items: center; gap: 6px;
  height: 30px; padding: 0 11px; border-radius: 6px;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 650;
  transition: opacity var(--t-fast), transform var(--t-fast) var(--ease);
}
@media (hover: hover) and (min-width: 900px) {
  .slot-qv { display: inline-flex; }
  .slot:hover .slot-qv, .slot:focus-within .slot-qv { opacity: 1; transform: translate(-50%, 0); }
  .slot:hover .slot-new, .slot:focus-within .slot-new { opacity: 0; }
}
.slot-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 11px 11px; flex: 1; }
.slot-meta { font: 500 12.5px/1 var(--mono); color: var(--faint); letter-spacing: 0; }
.slot-name {
  font-size: 15px; font-weight: 800; letter-spacing: .01em; text-transform: uppercase; line-height: 1.1;
  font-stretch: 85%;
}
.slot-name a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.slot-name small { display: block; font-size: 13.5px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--muted); margin-top: 2px; font-stretch: 100%; }
.slot-move { font-size: var(--fs-xs); color: var(--ink-2); display: flex; align-items: center; gap: 5px; min-width: 0; }
.slot-move span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-move svg { width: 12px; height: 12px; color: var(--faint); }
.slot-foot { margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.slot-foot .price { font-size: 20px; }
.slot .badges, .slot .save-btn, .slot-qv { position: relative; z-index: 1; }
.slot .save-btn { position: absolute; }
.slot .slot-qv { position: absolute; }

@media (max-width: 639px) {
  .slot-body { padding: 9px 9px 10px; gap: 5px; }
  .slot-name { font-size: 14px; }
  .slot-foot .price { font-size: 18px; }
  .slot .badges .badge:nth-child(n+3) { display: none; }
  .slot-move { display: none; }
  .slot-foot .avail { font-size: 9.5px; letter-spacing: .04em; }
}

/* "recently caught" arrival */
.is-arriving { animation: arrive .6s var(--ease) both; }
@keyframes arrive { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.is-arriving .slot-new::before, .drop .drop-time.is-fresh::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); margin-right: 4px;
  animation: ping 1.6s ease-out 3;
}
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(30,155,255,.6); } 100% { box-shadow: 0 0 0 7px rgba(30,155,255,0); } }

/* ---------- Skeleton card ---------- */
.slot-skel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 6px; }
.slot-skel .skel-media { aspect-ratio: 1; border-radius: 6px; }

/* ---------- Account card: trainer file ---------- */
.file-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 720px) { .file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .file-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }

.file {
  position: relative;
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0 var(--r-card) var(--r-card) var(--r-card);
  box-shadow: var(--sh-1);
  display: flex; flex-direction: column;
  transition: transform var(--t-med) var(--ease), border-color var(--t-med), box-shadow var(--t-med);
}
.file:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--sh-2); }
.file-tab {
  /* folder tab */
  position: absolute; left: -1px; top: -15px; height: 16px; padding: 0 12px 0 10px;
  display: flex; align-items: center; gap: 6px;
  background: var(--ink); color: #fff;
  font: 600 12.5px/1 var(--mono); letter-spacing: .04em;
  border-radius: 6px 6px 0 0;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 100%, 0 100%);
  padding-right: 16px;
}
.file-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px 10px; border-bottom: 1px solid var(--line); }
.file-id { font: 700 17px/1 var(--mono); letter-spacing: -.01em; }
.file-id a::after { content: ""; position: absolute; inset: 0; }
.file-level { display: inline-flex; align-items: center; gap: 8px; margin-top: 5px; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.file-level b { color: var(--ink); font-weight: 800; }
.team-dot { display: inline-flex; align-items: center; gap: 5px; }
.team-dot::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--team, var(--faint)); transform: rotate(45deg); }
.team-mystic { --team: var(--team-mystic); }
.team-valor { --team: var(--team-valor); }
.team-instinct { --team: var(--team-instinct); }

.file-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.file-stat { padding: 11px 12px 10px; border-right: 1px solid var(--line); min-width: 0; }
.file-stat:last-child { border-right: 0; }
.file-stat b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.file-stat span { display: block; margin-top: 5px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.file-stat.is-gold b { color: var(--gold-ink); }
@media (max-width: 380px) { .file-stat { padding: 10px 8px; } .file-stat b { font-size: 19px; } .file-stat span { font-size: 9px; letter-spacing: .04em; } }

.file-tags { padding: 10px 14px 0; display: flex; flex-wrap: wrap; gap: 4px; min-height: 30px; }
.file-notable { padding: 10px 14px 12px; }
.file-notable .label { display: block; margin-bottom: 7px; }
.notable-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; scroll-snap-type: x mandatory; }
.notable-row::-webkit-scrollbar { display: none; }
.notable {
  position: relative; flex: none; width: 58px; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.notable-img { width: 58px; height: 58px; border-radius: 6px; background: var(--slot); border: 1px solid var(--line); display: grid; place-items: center; position: relative; }
.notable-img img { width: 48px; height: 48px; object-fit: contain; }
.notable-img .mini-flag { position: absolute; top: 2px; right: 2px; width: 12px; height: 12px; }
.notable-img .mini-flag path { fill: var(--gold); }
.notable-name { font-size: 12px; font-weight: 600; color: var(--ink-2); max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-card) var(--r-card); position: relative; z-index: 1; }
.file-foot .price { font-size: 22px; margin-right: auto; }
.file-foot .save-btn { background: transparent; }
.cmp-toggle {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 9px;
  border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface);
  font-size: 13px; font-weight: 650; color: var(--ink-2);
}
.cmp-toggle:hover { border-color: var(--line-strong); }
.cmp-toggle[aria-pressed="true"] { border-color: var(--blue); color: var(--blue-ink); background: var(--blue-tint); }
.cmp-toggle svg { width: 14px; height: 14px; }
.file.is-off .file-stats, .file.is-off .file-notable { opacity: .6; }
.file .save-btn, .file .cmp-toggle, .file .btn { position: relative; z-index: 1; }

/* ---------- Pokémon tile (account collection) ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 560px) { .tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 900px) { .tile-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; } }
@media (min-width: 1400px) { .tile-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.tile {
  position: relative; text-align: left;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 5px 5px 7px;
  transition: border-color var(--t-fast), transform var(--t-fast) var(--ease), box-shadow var(--t-fast);
}
.tile:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--sh-1); }
.tile[aria-expanded="true"] { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-ring); }
.tile-img { position: relative; aspect-ratio: 1; background: var(--slot); border-radius: 4px; display: grid; place-items: center; }
.tile-img img { width: 80%; height: 80%; object-fit: contain; }
.tile.is-shiny .tile-img { background: radial-gradient(circle at 50% 45%, rgba(255,222,140,.35), transparent 62%), var(--slot); }
.tile.is-legendary .tile-img { box-shadow: inset 0 2px 0 var(--gold); }
.tile-shiny { position: absolute; top: 3px; left: 3px; }
.tile-shiny svg { width: 13px; height: 13px; }
.tile-shiny path { fill: var(--gold); }
.tile-iv { position: absolute; top: 3px; right: 3px; font: 700 11px/1 var(--mono); color: var(--gold-ink); background: var(--gold-tint); border: 1px solid var(--gold-line); padding: 2px 3px; border-radius: 3px; }
.tile-flags { position: absolute; bottom: 3px; left: 3px; right: 3px; display: flex; gap: 2px; flex-wrap: wrap; }
.tile-flags .mf { font: 700 10.5px/1 var(--font); letter-spacing: .05em; padding: 2px 3px; border-radius: 2px; background: rgba(255,255,255,.92); color: var(--ink-2); border: 1px solid var(--line); text-transform: uppercase; }
.tile-flags .mf.lucky { color: #7A5A00; background: #FFF5D6; border-color: #F3DC8F; }
.tile-flags .mf.shadow { color: #4A3470; background: #EFEAF7; border-color: #D8CCEB; }
.tile-flags .mf.costume, .tile-flags .mf.bg { color: var(--violet-ink); background: var(--violet-tint); border-color: #DCD2FF; }
.tile-flags .mf.mega { color: #9E2A55; background: #FDEFF4; border-color: #F4C9D7; }
.tile-name { margin-top: 6px; font-size: 13px; font-weight: 700; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-cp { font: 500 12.5px/1.2 var(--mono); color: var(--muted); }
.tile-cp b { color: var(--ink); font-weight: 600; }

/* ---------- Recent drop ---------- */
.drops { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px var(--gutter) 10px; margin: 0 calc(var(--gutter) * -1); }
.drops::-webkit-scrollbar { display: none; }
.drop {
  position: relative; flex: none; width: 212px; scroll-snap-align: start;
  display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center;
  padding: 8px 10px 8px 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  transition: border-color var(--t-fast), transform var(--t-fast) var(--ease);
}
.drop:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.drop-img { width: 64px; height: 64px; background: var(--slot); border-radius: 6px; display: grid; place-items: center; position: relative; overflow: hidden; }
.drop-img img { width: 54px; height: 54px; object-fit: contain; }
.drop-img.is-file { background: var(--ink); color: #fff; font: 700 13px/1.1 var(--mono); text-align: center; padding: 4px; }
.drop-img.is-file small { display: block; font-size: 9px; color: #9FB2C8; font-weight: 500; margin-top: 3px; }
.drop-kind { font-size: 9.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.drop-kind.is-account { color: var(--violet-ink); }
.drop-name { font-weight: 750; font-size: 13.5px; line-height: 1.15; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-name a::after { content: ""; position: absolute; inset: 0; }
.drop-line { display: flex; align-items: center; justify-content: space-between; margin-top: 5px; gap: 6px; }
.drop-line .price { font-size: 15px; }
.drop-time { font: 500 12.5px/1 var(--mono); color: var(--blue-ink); display: inline-flex; align-items: center; }
.drop-time.is-old { color: var(--faint); }

/* ---------- Chips (quick filters) ---------- */
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 32px; padding: 0 11px;
  border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip[aria-pressed="true"], .chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip svg { width: 14px; height: 14px; }
.chip .chip-x { width: 12px; height: 12px; opacity: .7; }
.chip-sm { height: 26px; padding: 0 8px; font-size: 13px; }
.chip.is-active-filter { background: var(--blue-tint); border-color: #BFE0FB; color: var(--blue-ink); }

/* ---------- Search field ---------- */
.searchbar {
  position: relative; display: flex; align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-search);
  box-shadow: 0 3px 0 var(--ink);
  transition: box-shadow var(--t-fast), transform var(--t-fast);
}
.searchbar:focus-within { box-shadow: 0 3px 0 var(--ink), 0 0 0 4px var(--blue-ring); }
.searchbar > svg { position: absolute; left: 16px; color: var(--ink-2); width: 20px; height: 20px; pointer-events: none; }
.searchbar input {
  flex: 1; min-width: 0; height: 56px; padding: 0 12px 0 48px;
  border: 0; background: transparent; font-size: 16px; font-weight: 500;
}
.searchbar input::placeholder { color: var(--faint); }
.searchbar input:focus { outline: none; }
.searchbar .btn { margin-right: 7px; }
@media (min-width: 900px) { .searchbar input { height: 62px; font-size: 18px; } }
.search-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.search-suggest .label { margin-right: 4px; }

.search-sm {
  position: relative; display: flex; align-items: center;
}
.search-sm svg { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search-sm .input { padding-left: 34px; min-height: 38px; }

/* ---------- Dialog / drawer layer ---------- */
.layer { position: fixed; inset: 0; z-index: 100; display: flex; }
.layer-scrim { position: absolute; inset: 0; background: rgba(15, 22, 32, .42); animation: fade var(--t-med) both; }
@keyframes fade { from { opacity: 0; } }
.panel {
  position: relative; z-index: 1; background: var(--surface);
  display: flex; flex-direction: column; max-height: 100%;
  box-shadow: var(--sh-3);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex: none; }
.panel-title { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.panel-body { padding: 16px; overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.panel-foot { padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex: none; background: var(--surface); }

/* side drawer */
.layer.is-side { justify-content: flex-end; }
.layer.is-side .panel { width: min(440px, 100%); height: 100%; animation: slide-in var(--t-med) var(--ease) both; }
@keyframes slide-in { from { transform: translateX(24px); opacity: .4; } }
/* bottom sheet on phones */
@media (max-width: 719px) {
  .layer.is-side.sheet-mobile { align-items: flex-end; }
  .layer.is-side.sheet-mobile .panel { width: 100%; height: auto; max-height: 90vh; border-radius: 12px 12px 0 0; animation: sheet-up var(--t-med) var(--ease) both; }
  .layer.is-side.sheet-mobile .panel::before { content: ""; width: 36px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 8px auto 0; flex: none; }
}
.layer.is-sheet { align-items: flex-end; justify-content: center; }
.layer.is-sheet .panel { width: 100%; max-height: 88vh; border-radius: 12px 12px 0 0; animation: sheet-up var(--t-med) var(--ease) both; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .5; } }
/* centered modal */
.layer.is-center { align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; }
.layer.is-center .panel { width: min(680px, 100%); max-height: 84vh; border-radius: var(--r-card); animation: modal-in var(--t-med) var(--ease) both; }
@keyframes modal-in { from { transform: translateY(-8px) scale(.99); opacity: 0; } }
.layer.is-wide .panel { width: min(1080px, 100%); }
@media (max-width: 719px) {
  .layer.is-center { padding: 0; align-items: stretch; }
  .layer.is-center .panel { max-height: 100%; height: 100%; border-radius: 0; }
}

/* ---------- Global search overlay ---------- */
.gsearch-input { display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.gsearch-input svg { color: var(--muted); }
.gsearch-input input { flex: 1; height: 58px; border: 0; background: none; font-size: 17px; font-weight: 500; min-width: 0; }
.gsearch-input input:focus { outline: none; }
.gsearch-body { overflow-y: auto; padding: 6px 0 12px; }
.gs-group { padding: 8px 0 2px; }
.gs-group .label { padding: 4px 16px 6px; display: flex; justify-content: space-between; }
.gs-item {
  display: flex; align-items: center; gap: 12px; padding: 7px 16px; min-height: 52px;
  color: var(--ink);
}
.gs-item:hover, .gs-item[aria-selected="true"] { background: var(--blue-tint); }
.gs-thumb { width: 40px; height: 40px; flex: none; border-radius: 6px; background: var(--slot); display: grid; place-items: center; }
.gs-thumb img { width: 34px; height: 34px; object-fit: contain; }
.gs-thumb.is-file { background: var(--ink); color: #fff; font: 700 11px var(--mono); }
.gs-thumb.is-coll { background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.gs-main { flex: 1; min-width: 0; }
.gs-name { display: block; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-name mark { background: #FFF1B8; color: inherit; border-radius: 2px; padding: 0 1px; }
.gs-sub { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-side { font-weight: 800; font-variant-numeric: tabular-nums; }
.gs-empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.gs-hints { padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.gs-foot { display: none; border-top: 1px solid var(--line); padding: 8px 16px; gap: 14px; font-size: 13px; color: var(--muted); flex: none; }
.gs-foot kbd { font: 500 12.5px var(--mono); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 3px; padding: 0 4px; margin-right: 3px; background: var(--surface); }
@media (min-width: 720px) { .gs-foot { display: flex; } }

/* ---------- Quick view ---------- */
.qv-media { position: relative; aspect-ratio: 1.25; background: var(--slot); border-radius: var(--r-panel); display: grid; place-items: center; overflow: hidden; }
.qv-media img { width: 62%; height: 80%; object-fit: contain; }
.qv-media .slot-flags { top: 10px; left: 10px; }
.qv-name { font-size: 24px; font-weight: 800; letter-spacing: -.01em; text-transform: uppercase; font-stretch: 85%; line-height: 1.05; }
.qv-price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-block: 1px solid var(--line); }
.qv-price-row .price { font-size: 30px; }

/* ---------- Data list (spec sheet) ---------- */
.spec { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; background: var(--surface); }
.spec > div { padding: 10px 12px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); min-width: 0; }
.spec > div:nth-child(2n) { border-right: 0; }
.spec > div:nth-last-child(-n+2) { border-bottom: 0; }
.spec dt { font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.spec dd { margin-top: 3px; font-weight: 650; font-size: 14px; overflow-wrap: anywhere; }
.spec dd.is-yes { color: var(--gold-ink); }
.spec dd .note { display: block; font-size: 13.5px; font-weight: 500; color: var(--muted); margin-top: 2px; }
@media (min-width: 560px) { .spec.is-3 { grid-template-columns: repeat(3, 1fr); } .spec.is-3 > div:nth-child(2n) { border-right: 1px solid var(--line); } .spec.is-3 > div:nth-child(3n) { border-right: 0; } .spec.is-3 > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); } .spec.is-3 > div:nth-last-child(-n+3) { border-bottom: 0; } }

/* ---------- Cart ---------- */
.cart-line { display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line:first-child { padding-top: 0; }
.cart-thumb { width: 58px; height: 58px; border-radius: 6px; background: var(--slot); display: grid; place-items: center; }
.cart-thumb img { width: 48px; height: 48px; object-fit: contain; }
.cart-thumb.is-file { background: var(--ink); color: #fff; font: 700 12.5px/1.1 var(--mono); text-align: center; }
.kind {
  display: inline-flex; align-items: center; gap: 5px; height: 18px; padding: 0 5px;
  font: 600 9.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  border-radius: 3px; border: 1px solid;
}
.kind-trade { color: var(--blue-ink); border-color: #BFE0FB; background: var(--blue-tint); }
.kind-account { color: var(--violet-ink); border-color: #DCD2FF; background: var(--violet-tint); }
.cart-name { font-weight: 750; margin-top: 4px; line-height: 1.2; }
.cart-name a:hover { text-decoration: underline; }
.cart-sub { font-size: 13px; color: var(--muted); }
.cart-right { text-align: right; display: grid; justify-items: end; gap: 4px; }
.cart-right .price { font-size: 16px; }
.cart-remove { font-size: 13px; color: var(--muted); font-weight: 600; }
.cart-remove:hover { color: var(--red-ink); text-decoration: underline; }
.totals { display: grid; gap: 6px; font-size: var(--fs-sm); }
.totals > div { display: flex; justify-content: space-between; }
.totals .total { font-size: var(--fs-lg); font-weight: 800; padding-top: 8px; border-top: 1px solid var(--line); margin-top: 4px; }

/* ---------- Compare tray ---------- */
.cmp-tray {
  position: fixed; left: 50%; bottom: calc(var(--mnav-h) + 10px + env(safe-area-inset-bottom)); z-index: 55;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 20px));
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 12px;
  background: var(--ink); color: #fff; border-radius: var(--r-card);
  box-shadow: var(--sh-3);
  animation: tray-in var(--t-med) var(--ease) both;
}
@keyframes tray-in { from { transform: translate(-50%, 20px); opacity: 0; } }
@media (min-width: 900px) { .cmp-tray { bottom: 18px; } }
.cmp-tray .label { color: #9FB2C8; }
.cmp-slots { display: flex; gap: 6px; flex: 1; min-width: 0; }
.cmp-slot {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 6px 0 9px;
  border-radius: 6px; background: rgba(255,255,255,.1); font: 600 13px var(--mono); white-space: nowrap;
}
.cmp-slot button { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; color: #9FB2C8; }
.cmp-slot button:hover { background: rgba(255,255,255,.15); color: #fff; }
.cmp-slot.is-empty { border: 1px dashed rgba(255,255,255,.25); background: transparent; color: #7E90A6; padding: 0 10px; font-family: var(--font); font-weight: 500; }
@media (max-width: 560px) { .cmp-slot.is-empty { display: none; } .cmp-tray .label { display: none; } }

.cmp-table { width: 100%; font-size: var(--fs-sm); }
.cmp-table th, .cmp-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.cmp-table thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; vertical-align: bottom; }
.cmp-table tbody th { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); width: 120px; white-space: nowrap; }
.cmp-table td { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; }
.cmp-table td.is-best { color: var(--green-ink); }
.cmp-table td.is-best::after { content: "▲"; font-size: 8px; margin-left: 5px; vertical-align: 2px; }
.cmp-table .cmp-notables { display: flex; gap: 4px; flex-wrap: wrap; }
.cmp-table .cmp-notables span { font-size: 13.5px; font-weight: 600; background: var(--bg-2); padding: 2px 5px; border-radius: 3px; }
.cmp-scroll { overflow-x: auto; }
.cmp-scroll table { min-width: 560px; }

/* ---------- Tabs ---------- */
.tabs {
  display: flex; gap: 0; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; flex: none;
  display: inline-flex; align-items: center; gap: 7px;
  height: var(--tabs-h); padding: 0 14px;
  font-size: 13px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted);
  transition: color var(--t-fast);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; background: var(--blue); }
.tab .tab-n { font: 500 12.5px var(--mono); color: var(--muted); letter-spacing: 0; }

/* ---------- Timeline ---------- */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; }
.tl-step { position: relative; padding-top: 22px; text-align: left; }
.tl-step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0; z-index: 1;
  font: 600 12px/16px var(--mono); color: var(--muted);
  background: var(--surface); padding-right: 6px;
}
.tl-step::after { content: ""; position: absolute; top: 8px; left: 0; right: 0; height: 2px; background: var(--line); }
.tl-step .tl-dot { position: absolute; top: 3px; right: 0; width: 12px; height: 12px; border-radius: 3px; background: var(--surface); border: 2px solid var(--line-2); z-index: 1; transform: rotate(45deg); }
.tl-step.is-done::after { background: var(--green); }
.tl-step.is-done .tl-dot { background: var(--green); border-color: var(--green); }
.tl-step.is-current .tl-dot { border-color: var(--blue); background: var(--blue-tint); }
.tl-step:last-child .tl-dot { right: 0; }
.tl-name { font-size: 13px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; margin-top: 8px; padding-right: 10px; }
.tl-desc { font-size: 13px; color: var(--muted); margin-top: 2px; padding-right: 10px; }
@media (max-width: 520px) {
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .tl-step { padding: 0 0 14px 26px; }
  .tl-step::before { display: none; }
  .tl-step::after { top: 14px; bottom: 0; left: 5px; right: auto; width: 2px; height: auto; }
  .tl-step:last-child::after { display: none; }
  .tl-step .tl-dot { top: 2px; left: 0; right: auto; }
  .tl-name { margin-top: 0; }
}

/* ---------- Gallery ---------- */
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 720px) { .shots { grid-template-columns: repeat(4, 1fr); gap: 10px; } }
.shot { position: relative; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: var(--slot); aspect-ratio: 9 / 16; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-med) var(--ease); }
.shot:hover img { transform: scale(1.02); }
.shot figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 8px 7px; font-size: 13.5px; font-weight: 650; color: #fff; background: linear-gradient(transparent, rgba(15,22,32,.88)); text-align: left; }
.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(10, 14, 20, .94); display: flex; flex-direction: column; animation: fade var(--t-med) both; }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; color: #fff; flex: none; }
.lb-top .icon-btn { color: #fff; }
.lb-top .icon-btn:hover { background: rgba(255,255,255,.1); }
.lb-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; min-height: 0; padding: 0 56px 16px; touch-action: pan-y; }
.lb-stage img { max-height: 100%; max-width: 100%; object-fit: contain; border-radius: 6px; user-select: none; -webkit-user-drag: none; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #fff; }
.lb-nav:hover { background: rgba(255,255,255,.2); }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
@media (max-width: 600px) { .lb-stage { padding: 0 8px 16px; } .lb-nav { display: none; } }
.lb-caption { color: #C8D3E0; font-size: 13px; text-align: center; padding: 0 16px 16px; flex: none; }

/* ---------- Empty state ---------- */
.empty {
  display: grid; justify-items: center; text-align: center; gap: 8px;
  padding: 44px 20px; border: 1px dashed var(--line-2); border-radius: var(--r-card); background: rgba(255,255,255,.6);
}
.empty-art { width: 88px; height: 88px; margin-bottom: 6px; }
.empty h3 { font-size: var(--fs-lg); font-weight: 800; }
.empty p { color: var(--muted); max-width: 360px; font-size: var(--fs-sm); }
.empty .btn { margin-top: 8px; }

/* ---------- Breadcrumbs ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 16px; font-size: 13px; color: var(--muted); font-weight: 550; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs svg { width: 12px; height: 12px; color: var(--faint); }
.crumbs [aria-current] { color: var(--ink-2); }

/* ---------- Accordion (FAQ) ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 14px 32px 14px 0; position: relative;
  font-weight: 700; font-size: var(--fs-md);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
  transition: transform var(--t-fast);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 0 16px; color: var(--ink-2); font-size: var(--fs-sm); max-width: 70ch; }

/* ---------- Toast ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(var(--mnav-h) + 14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 130; display: grid; gap: 8px; width: min(420px, calc(100% - 24px)); pointer-events: none; }
@media (min-width: 900px) { .toasts { bottom: 24px; left: auto; right: 24px; transform: none; } }
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 14px; border-radius: var(--r-panel);
  background: var(--ink); color: #fff; box-shadow: var(--sh-3); font-size: 13.5px; font-weight: 550;
  animation: toast-in var(--t-med) var(--ease) both;
}
.toast.is-out { animation: toast-out var(--t-med) var(--ease) both; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(6px); opacity: 0; } }
.toast svg { color: var(--green); }
.toast .toast-msg { flex: 1; }
.toast a, .toast button { color: #8FD0FF; font-weight: 700; font-size: 13px; padding: 4px 6px; border-radius: 4px; }
.toast a:hover, .toast button:hover { background: rgba(255,255,255,.08); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 56px; border-top: 1px solid var(--line); background: var(--surface); padding: 32px 0 calc(var(--mnav-h) + 28px + env(safe-area-inset-bottom)); font-size: var(--fs-sm); }
@media (min-width: 900px) { .site-footer { padding-bottom: 32px; } }
.foot-grid { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 1.6fr repeat(3, 1fr); } }
.foot-brand { grid-column: 1 / -1; }
@media (min-width: 900px) { .foot-brand { grid-column: auto; } }
.foot-brand p { color: var(--muted); margin-top: 10px; max-width: 34ch; }
.foot-col h4 { font-size: 13px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.foot-col li + li { margin-top: 7px; }
.foot-col a { color: var(--ink-2); font-weight: 550; }
.foot-col a:hover { color: var(--ink); text-decoration: underline; }
.foot-legal { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: grid; gap: 8px; }
.foot-legal p { max-width: 110ch; }
.foot-coords { font-family: var(--mono); font-size: 13px; color: var(--faint); }

/* ---------- Misc ---------- */
.panel-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.panel-box-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.panel-box-head h2, .panel-box-head h3 { font-size: 13.5px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.panel-box-body { padding: 14px; }
.note-box { display: flex; gap: 10px; padding: 11px 12px; border-radius: var(--r-panel); background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.note-box svg { color: var(--muted); margin-top: 1px; }
.note-box.is-info { background: var(--blue-tint); border-color: #CFE7FB; }
.note-box.is-info svg { color: var(--blue-ink); }
.note-box.is-warn { background: var(--gold-tint); border-color: var(--gold-line); }
.note-box.is-warn svg { color: var(--gold-ink); }
.demo-flag { font: 600 12px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--gold-ink); background: var(--gold-tint); border: 1px solid var(--gold-line); padding: 2px 6px; border-radius: 3px; white-space: nowrap; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: var(--fs-sm); }
.kv:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.loadmore { display: grid; justify-items: center; gap: 8px; margin-top: 20px; }
.loadmore .muted { font-size: 13px; }
.progress { height: 6px; border-radius: 2px; background: var(--bg-2); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--gold); border-radius: 2px; }

/* header fit at mid widths */
.hdr-nav a { white-space: nowrap; }
@media (min-width: 900px) and (max-width: 1180px) {
  .hdr-nav { margin-left: 8px; }
  .hdr-nav a { padding: 0 8px; font-size: 14px; }
  .hdr-search { width: 40px; padding: 0; justify-content: center; border-color: transparent; background: transparent; }
  .hdr-search span, .hdr-search kbd { display: none; }
}
@media (min-width: 900px) and (max-width: 1000px) {
  .brand-word i { display: none; }
  .hdr-nav a[data-nav="how"] { display: none; }
}
.file-meta { align-self: center; font-size: 13.5px; color: var(--muted); }
