/* Prime XI — ambiance stade de nuit : pelouse sombre, projecteurs, lignes à la craie */
:root {
  --bg: #07110d;
  --bg-2: #0c1a14;
  --panel: #10211a;
  --panel-2: #152a21;
  --line: rgba(220, 255, 230, .09);
  --line-2: rgba(220, 255, 230, .16);
  --text: #eef6f0;
  --muted: #9bb3a6;
  --dim: #6b8579;
  --accent: #d7ff3e;          /* jaune fluo des chasubles */
  --accent-ink: #13200a;
  --danger: #ff6b6b;
  --ok: #4ade80;
  --radius: 14px;
  --font-display: 'Anton', Impact, 'Arial Narrow', sans-serif;
  --font: 'Manrope', system-ui, sans-serif;

  --r0: #8a978f;   /* Commune */
  --r1: #3fbf6a;   /* Peu commune */
  --r2: #3d8bfd;   /* Rare */
  --r3: #b061ff;   /* Épique */
  --r4: #ffbf1f;   /* Légendaire */
  --r5: #ff4d5e;   /* Historique */
  --r6: #f6e27a;   /* GOAT */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5;
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(215, 255, 62, .07), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(80, 200, 140, .08), transparent 60%),
    var(--bg);
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--accent); color: var(--accent-ink); padding: 6px 10px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- en-tête ---------- */
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px;
  padding: 10px clamp(16px, 3vw, 32px); background: rgba(7, 17, 13, .86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 2px solid var(--accent);
  font-family: var(--font-display); font-size: 18px; color: var(--accent); letter-spacing: .5px;
}
.logo-word { font-family: var(--font-display); font-size: 22px; letter-spacing: 3px; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 700; font-size: 14px; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.on { color: var(--text); background: var(--panel-2); box-shadow: inset 0 -2px 0 var(--accent); }
.top-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); text-decoration: none; font-weight: 800; font-size: 13px;
  white-space: nowrap; cursor: pointer;
}
.pill.coins { color: var(--accent); }
.pill.lang { text-transform: uppercase; }
.pill.avatar { width: 34px; padding: 0; justify-content: center; background: var(--panel-2); }
.stock-bar { width: 26px; height: 6px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.stock-bar i { display: block; height: 100%; background: var(--accent); }

.tabbar { display: none; }

main { max-width: 1240px; margin: 0 auto; padding: 24px clamp(16px, 3vw, 32px) 80px; outline: none; }

/* ---------- éléments communs ---------- */
h1, h2, h3 { margin: 0; line-height: 1.1; }
.h-display { font-family: var(--font-display); font-weight: 400; letter-spacing: .5px; text-transform: uppercase; }
h1.h-display { font-size: clamp(34px, 6vw, 60px); }
h2.h-display { font-size: clamp(24px, 3.4vw, 32px); }
.kicker { font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.section { margin-top: 44px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head { margin-bottom: 22px; }
.page-head p { margin: 8px 0 0; color: var(--muted); max-width: 640px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); font-weight: 800; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: transform .12s, background .12s;
}
.btn:hover { background: #1b3529; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { background: #e6ff7a; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn .sub { font-weight: 600; opacity: .75; font-size: 12px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab {
  text-decoration: none;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted);
  font-weight: 800; font-size: 13px; cursor: pointer;
}
.tab.on { background: var(--text); color: var(--bg); border-color: transparent; }
.chip {
  padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-weight: 700;
  font-size: 12px; cursor: pointer; color: var(--muted);
}
.chip.on { color: var(--text); border-color: currentColor; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.input, select.input {
  height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); min-width: 0;
}
.input.grow { flex: 1 1 220px; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .4px;
  background: var(--panel-2); color: var(--muted);
}
.empty { padding: 40px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.loading { display: grid; place-items: center; min-height: 50vh; }
.ball {
  width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--accent); border-top-color: transparent;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 60;
  background: var(--text); color: var(--bg); font-weight: 800; padding: 12px 18px; border-radius: 12px; transition: .25s;
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); color: #fff; }

/* ---------- carte ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }

.card {
  --rc: var(--r0);
  position: relative; display: block; aspect-ratio: 5 / 7; border-radius: 12px; text-decoration: none; overflow: hidden;
  background: linear-gradient(160deg, #1c2e26, #0d1813 70%);
  border: 2px solid var(--rc); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); container-type: inline-size;
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform .25s ease, box-shadow .25s;
}
.card.tilting { transition: transform .06s linear; }
a.card:hover { --lift: -4px; }
.card.r0 { --rc: var(--r0); }
.card.r1 { --rc: var(--r1); }
.card.r2 { --rc: var(--r2); box-shadow: 0 0 0 1px rgba(61, 139, 253, .25), 0 6px 18px rgba(0, 0, 0, .35); }
.card.r3 { --rc: var(--r3); box-shadow: 0 0 18px rgba(176, 97, 255, .3), 0 6px 18px rgba(0, 0, 0, .35); }
.card.r4 { --rc: var(--r4); box-shadow: 0 0 22px rgba(255, 191, 31, .38), 0 6px 18px rgba(0, 0, 0, .35); }
.card.r5 {
  --rc: var(--r5); background: linear-gradient(160deg, #3b2418, #1a0f0b 75%);
  box-shadow: 0 0 24px rgba(255, 77, 94, .4), 0 6px 18px rgba(0, 0, 0, .35);
}
.card.r6 {
  --rc: var(--r6); border-color: transparent; background: #050505;
  box-shadow: 0 0 30px rgba(246, 226, 122, .55), 0 6px 18px rgba(0, 0, 0, .35);
}
.card.r6::before {
  content: ''; position: absolute; inset: -2px; border-radius: 12px; padding: 2px; z-index: 3; pointer-events: none;
  background: conic-gradient(from var(--a, 0deg), #f6e27a, #fff6c9, #c99a2e, #fff, #f6e27a);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; animation: goat 4s linear infinite;
}
@property --a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes goat { to { --a: 360deg; } }
.card .photo {
  position: absolute; inset: 0 0 34% 0; background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .08), transparent 70%);
  overflow: hidden;
}
.card .photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; }
.card .photo::after {
  content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(5, 12, 9, .95));
}
.card.r5 .photo img { filter: sepia(.35) contrast(1.05); }
.card .silhouette { position: absolute; inset: 12% 22% 0; color: rgba(255, 255, 255, .1); }
.card .initials {
  position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display);
  font-size: 22cqw; color: rgba(255, 255, 255, .16); letter-spacing: 1px;
}
.card .top-row {
  position: absolute; top: 6px; left: 6px; right: 6px; display: flex; justify-content: space-between; align-items: center; z-index: 2;
}
.card .pos {
  font-family: var(--font-display); font-size: 9.5cqw; line-height: 1; padding: 3px 5px; border-radius: 6px;
  background: rgba(0, 0, 0, .55); color: var(--rc);
}
.card .flag { width: 18cqw; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4); }
.card .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 7cqw 7cqw; z-index: 2; }
.card .rar {
  font-size: 6.6cqw; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--rc);
}
.card .name {
  font-family: var(--font-display); font-size: 11.5cqw; line-height: 1.05; text-transform: uppercase; letter-spacing: .3px;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.card .meta { margin-top: 3cqw; font-size: 6.6cqw; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .num { position: absolute; right: 7cqw; bottom: 7cqw; font-size: 6cqw; color: var(--dim); z-index: 2; }
.card .qty {
  position: absolute; top: 34%; right: 6px; z-index: 2; background: var(--accent); color: var(--accent-ink); font-weight: 800;
  font-size: 11px; padding: 1px 7px; border-radius: 999px;
}
.card .new {
  position: absolute; top: -1px; left: 50%; transform: translateX(-50%); z-index: 4; background: var(--accent);
  color: var(--accent-ink); font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 0 0 8px 8px; text-transform: uppercase;
}
.card.missing { filter: grayscale(1) brightness(.45); border-color: var(--line-2); box-shadow: none; }
.card.missing .photo img { opacity: .35; }
.card.selected { outline: 3px solid var(--accent); outline-offset: 2px; }

/* dos de carte */
.card-back {
  position: relative; aspect-ratio: 5 / 7; border-radius: 12px; border: 2px solid var(--line-2); overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 18px, transparent 18px 36px),
    linear-gradient(160deg, #183d2c, #0a1a12);
}
.card-back::before { /* rond central et ligne médiane */
  content: ''; position: absolute; left: 50%; top: 50%; width: 46%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, .22); border-radius: 50%;
}
.card-back::after { content: ''; position: absolute; left: 6%; right: 6%; top: 50%; border-top: 2px solid rgba(255, 255, 255, .22); }
.card-back span {
  position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 26px;
  color: var(--accent); z-index: 1; letter-spacing: 2px;
}

/* ---------- accueil ---------- */
.hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: center;
  padding: clamp(22px, 4vw, 44px); border-radius: 22px; border: 1px solid var(--line-2);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px) 0 0 / 56px 100%,
    linear-gradient(120deg, #133524, #0a1912 60%);
}
.hero::after { /* surface de réparation à la craie */
  content: ''; position: absolute; right: -60px; top: 50%; width: 260px; height: 300px; transform: translateY(-50%);
  border: 2px solid rgba(255, 255, 255, .07); border-right: 0; pointer-events: none;
}
.hero p { color: var(--muted); max-width: 480px; margin: 14px 0 22px; font-size: 16px; }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-cards { position: relative; height: 290px; z-index: 1; }
.hero-cards .card { position: absolute; width: 168px; top: 50%; left: 50%; }
.hero-cards .card:nth-child(1) { transform: translate(-112%, -46%) rotate(-10deg); }
.hero-cards .card:nth-child(2) { transform: translate(-50%, -54%); z-index: 2; }
.hero-cards .card:nth-child(3) { transform: translate(12%, -46%) rotate(10deg); }
.today { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.today .panel { padding: 12px 14px; display: flex; gap: 10px; align-items: center; }
.today b { font-size: 18px; }
.today small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps .num { font-family: var(--font-display); font-size: 34px; color: var(--accent); }
.steps h3 { font-size: 17px; margin: 6px 0; }
.steps p { margin: 0; color: var(--muted); font-size: 14px; }


.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.feed-item { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; }
.feed-item .card { width: 48px; flex: none; border-width: 1.5px; }
.feed-item b { display: block; }
.feed-item small { color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; }

.ranking { display: flex; flex-direction: column; gap: 6px; }
.rank-row {
  display: grid; grid-template-columns: 40px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 14px;
  border-radius: 12px; background: var(--panel); border: 1px solid var(--line);
}
.rank-row .pos-n { font-family: var(--font-display); font-size: 22px; color: var(--muted); }
.rank-row:nth-child(1) .pos-n { color: var(--r4); }
.rank-row.me { border-color: var(--accent); }
.rank-row b { font-size: 16px; }

/* ---------- ouverture ---------- */
.opener { min-height: calc(100vh - 160px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }

.reveal-stage { position: relative; width: min(280px, 72vw); aspect-ratio: 5 / 7; perspective: 1200px; cursor: pointer; }
.flip { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.flip > * { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip .slot { transform: rotateY(180deg); }
.flip .slot .card { width: 100%; height: 100%; }
.flip.flipped { transform: rotateY(180deg); }
.reveal-stage .stack { position: absolute; inset: 0; transform: translate(8px, 8px); opacity: .5; }
.reveal-name { min-height: 60px; }
.reveal-name .rar { font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; font-size: 13px; }
.reveal-name h2 { font-family: var(--font-display); font-weight: 400; font-size: 30px; text-transform: uppercase; }
.dots { display: flex; gap: 6px; }
.dots i { width: 22px; height: 30px; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--line-2); }
.dots i.done { background: var(--dc, var(--muted)); border-color: transparent; }
.flash { position: fixed; inset: 0; pointer-events: none; z-index: 50; animation: flash 1.1s ease-out forwards; }
@keyframes flash { from { opacity: .85; } to { opacity: 0; } }
.summary { width: 100%; }
.summary .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; max-width: 900px; margin: 0 auto; }
.summary .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

/* ---------- collection ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 10px; margin-bottom: 20px; align-items: stretch; }
.stat { padding: 14px 16px; }
.stat b { display: block; font-family: var(--font-display); font-size: 28px; font-weight: 400; }
.stat small { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .8px; }
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.album { display: block; text-decoration: none; padding: 14px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; text-align: left; width: 100%; }
.album:hover { border-color: var(--line-2); }
.album b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album.done { border-color: var(--accent); }
.bar { height: 6px; border-radius: 4px; background: var(--bg-2); overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; background: var(--accent); }
.more { display: flex; justify-content: center; margin-top: 18px; }

/* ---------- fiche ---------- */
.detail { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 32px; align-items: start; }
.detail .card { width: 100%; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 18px 0; }
.facts div { padding: 10px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.facts small { display: block; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; }
.facts b { font-size: 15px; }
.credit { font-size: 12px; color: var(--dim); margin-top: 10px; }
.credit a { color: var(--muted); }
.row-list { display: flex; flex-direction: column; gap: 6px; }
.row-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.row-item .grow { flex: 1; min-width: 0; }
.row-item .price { font-weight: 800; color: var(--accent); }
.sell-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sell-form .input { width: 140px; }

/* ---------- marché ---------- */
.listing { display: grid; grid-template-columns: 56px 1fr auto auto; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.listing .card { width: 56px; border-width: 1.5px; }
.listing .who { color: var(--muted); font-size: 13px; }
.listing .price { font-weight: 800; font-size: 16px; color: var(--accent); white-space: nowrap; }

/* ---------- échanges ---------- */
.trade { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.trade-sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: start; }
.trade-sides .arrow { font-size: 26px; color: var(--muted); align-self: center; }
.trade-sides h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.mini-row { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-row .card { width: 64px; border-width: 1.5px; }
.trade-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.picker { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.picker .grid { max-height: 420px; overflow: auto; padding: 4px; }
.suggest { position: relative; flex: 1 1 260px; }
.suggest ul { position: absolute; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; z-index: 5; }
.suggest li button { width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; }
.suggest li button:hover { background: var(--panel); }

/* ---------- raretés ---------- */
.rates { display: flex; flex-direction: column; gap: 8px; }
.rate { display: grid; grid-template-columns: 70px 1fr auto; gap: 16px; align-items: center; padding: 12px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--rc); }
.rate .card { width: 70px; }
.rate b { color: var(--rc); font-size: 16px; }
.rate p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.rate .val { text-align: right; font-size: 13px; color: var(--muted); white-space: nowrap; }
.rate .val strong { display: block; color: var(--text); font-size: 15px; }
.odds-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.odds-table th, .odds-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; }
.odds-table th:first-child, .odds-table td:first-child { text-align: left; }
.table-wrap { overflow-x: auto; }

.foot { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px) 100px; color: var(--dim); font-size: 13px; display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(7, 17, 13, .95); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 0; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.on { color: var(--accent); }
  .hero { grid-template-columns: 1fr; }
  .hero-cards { height: 230px; }
  .hero-cards .card { width: 132px; }
  .two-col, .detail, .picker { grid-template-columns: 1fr; }
  .detail .card { max-width: 300px; margin: 0 auto; }
  .today { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stats .btn { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body { font-size: 14px; }
  .top { gap: 8px; }
  .logo-word { display: none; }
  .pill { padding: 0 9px; }
  .steps { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
  .summary .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .listing { grid-template-columns: 48px 1fr; }
  .listing .card { width: 48px; }
  .listing .price, .listing .btn { grid-column: 2; justify-self: start; }
  .trade-sides { grid-template-columns: 1fr; }
  .trade-sides .arrow { transform: rotate(90deg); justify-self: center; }
  .rate { grid-template-columns: 52px 1fr; }
  .rate .card { width: 52px; }
  .rate .val { grid-column: 2; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
