/* =========================================================
   HoloEx — global stylesheet: "Pearl Holo" light theme
   1. Tokens  2. Base  3. Layout  4. Components  5. Views
   6. Sheets & overlays  7. Responsive  8. Motion
   ========================================================= */

/* 1. Tokens ------------------------------------------------ */
/* Layout: sticky header, centered 1150px column; Discover = filters | card deck | live activity.
   Phones: bottom tab bar, filters in a bottom sheet, deck sized to the screen height. */
:root {
  color-scheme: light;
  --bg: #f6f8ff;            /* cool off-white ground */
  --surface: #ffffff;       /* cards, panels */
  --surface-2: #f0f3fc;     /* inputs, chips, secondary fills */
  --border: #dce2f5;
  --text: #0f1222;          /* ink */
  --muted: #5b6478;
  --accent: #2457e6;        /* EX blue: wordmark, arrows, buttons, chips */
  --accent-ink: #ffffff;
  --accent-2: #2457e6;      /* links */
  --pink: #ff6ad5;          /* hot tags, alerts, priority */
  --pink-ink: #2a0a20;
  --like: #2457e6;          /* swipe right = trade */
  --pass: #8a93a8;          /* swipe left = neutral */
  --decline: #e0409f;       /* declined status + priority text (pink, darkened for contrast) */
  --gold: #f5c542;          /* graded slabs */
  --gold-ink: #1a1400;
  --up: #12865a;            /* price rising */
  --holo: linear-gradient(110deg, #8ec9ff 0%, #ff9adb 18%, #d2beff 34%, #ffc0eb 48%, #7fdfff 62%, #ff9adb 78%, #b9a6ff 90%, #8ec9ff 100%);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 18, 34, .08);
  --shadow-lift: 0 18px 40px rgba(15, 18, 34, .16);
  --spring: cubic-bezier(.2, 1.35, .4, 1);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Archivo", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --tabbar-h: 0px;
}

/* 2. Base -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-padding-bottom: calc(var(--tabbar-h) + 16px); }
body {
  font-family: var(--font);
  background:
    radial-gradient(520px 520px at 100% -120px, rgba(58, 110, 245, .16), rgba(246, 248, 255, 0) 62%),
    radial-gradient(460px 460px at -120px 100%, rgba(255, 106, 213, .10), rgba(246, 248, 255, 0) 62%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.sheet-lock { overflow: hidden; }
a { color: var(--accent-2); text-decoration: none; }
h1 { font-size: clamp(1.7rem, 4.2vw, 2.8rem); line-height: 1.08; margin: 0 0 .5rem; letter-spacing: -.03em; }
h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 1.2rem 0 .5rem; font-weight: 700; }
h3 { margin: 0 0 .3rem; font-weight: 800; letter-spacing: -.01em; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
input, select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .6rem .75rem;
}
input:focus, select:focus { border-color: var(--accent); }
label { display: block; font-size: .9rem; color: var(--muted); margin-bottom: .75rem; }
label > input, label > select { margin-top: .3rem; color: var(--text); }
input[type="range"] { padding: 0; accent-color: var(--accent); }
kbd { font-family: var(--mono); font-size: .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; padding: 0 .3rem; color: var(--text); }

/* 3. Layout ------------------------------------------------ */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  display: flex; align-items: center; gap: 1.5rem;
  padding-block: .8rem;
  padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px));
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.logo { display: inline-flex; align-items: center; font-size: 1.5rem; line-height: 1; letter-spacing: -.04em; color: var(--text); white-space: nowrap; }
.wm-holo { font-weight: 700; }
.wm-ex { font-weight: 900; font-style: italic; color: var(--accent); }
.wm-arrows { color: var(--accent); margin-left: .3rem; transition: transform .5s var(--spring); }
.logo:hover .wm-arrows { transform: rotate(180deg); }
.nav { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
.nav a { color: var(--muted); padding: .45rem .85rem; border-radius: 999px; white-space: nowrap; font-weight: 600; font-size: .95rem; transition: background .2s, color .2s; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: #fff; background: var(--accent); }
main { flex: 1; width: 100%; max-width: 1150px; margin: 0 auto; padding-block: 2rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.footer { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.25rem calc(1.25rem + var(--tabbar-h)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
.tabbar { display: none; }
.phone-only { display: none; }

/* 4. Components -------------------------------------------- */
.btn { display: inline-block; border: 0; border-radius: 999px; padding: .7rem 1.3rem; font-weight: 700; cursor: pointer; transition: transform .25s var(--spring), filter .2s; text-align: center; }
.btn:active { transform: scale(.95); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px rgba(36, 87, 230, .22); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn-sm { padding: .4rem .85rem; font-size: .85rem; }
.btn.is-done, .btn:disabled { background: var(--surface-2); color: var(--muted); box-shadow: none; cursor: default; }
.badge { background: var(--pink); color: var(--pink-ink); border-radius: 999px; font-size: .7rem; padding: 0 .45rem; margin-left: .2rem; font-weight: 800; display: inline-block; }
.badge.bump { animation: bump .5s var(--spring); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-top: 1rem; }
.list { display: grid; gap: .9rem; margin-top: 1rem; }
.small { font-size: .85rem; }

/* Pearl-holo text: pastel foil that slowly drifts (logo + hero highlight) */
.holo-text, .wm-holo {
  background: var(--holo); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: foil 10s linear infinite;
}

/* Chips */
.chips { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip { flex: none; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: .35rem .8rem; font-size: .85rem; font-weight: 600; color: var(--muted); transition: background .2s, color .2s, border-color .2s, transform .25s var(--spring); }
.chip:hover { color: var(--text); border-color: var(--text); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip:active { transform: scale(.93); }

/* Card tile (used in grids) */
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; animation: rise .45s var(--spring) backwards; animation-delay: calc(var(--i, 0) * 40ms); }
.tile:hover { box-shadow: var(--shadow); }
.no-anim .tile { animation: none; }
.tile-body { padding: .8rem 1rem 1rem; display: grid; gap: .25rem; }
.tile-title { font-weight: 800; letter-spacing: -.01em; }
.tile-meta { color: var(--muted); font-size: .85rem; }
.tile-actions { display: flex; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; align-items: center; }
.warn { color: var(--decline); font-size: .82rem; font-weight: 600; }

/* Binder: tiles lift and shine on hover (collection + profiles) */
.binder .tile { transition: transform .35s var(--spring), box-shadow .3s; }
.binder .tile:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: var(--shadow-lift); }
.binder .tile:hover .art::after { opacity: .5; }

/* Card art placeholder (replace with real card images) */
.art {
  aspect-ratio: 5 / 7;
  display: grid; place-items: center;
  font-size: 3.5rem;
  position: relative; overflow: hidden;
  background: var(--art, linear-gradient(135deg, #3b2f7a, #1e1b3a));
}
.art::after { /* holo shimmer */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--holo); background-size: 300% 100%; opacity: .22; mix-blend-mode: screen;
  animation: foil 10s linear infinite; transition: opacity .3s;
}
.art-emoji { position: relative; z-index: 1; filter: drop-shadow(0 8px 16px rgba(0,0,0,.35)); }
.slab-tag {
  position: absolute; top: .6rem; left: .6rem; z-index: 2;
  background: var(--gold); color: var(--gold-ink); font-weight: 800; font-size: .75rem;
  padding: .15rem .5rem; border-radius: 6px;
}
.price { font-weight: 800; color: var(--accent); }
.price small { color: var(--muted); font-weight: 400; }
.up { color: var(--up); }
.down { color: var(--decline); }

/* Mini card art (lists, feed, chat) */
.mini { width: 40px; flex: none; border-radius: 7px; font-size: 1.1rem; box-shadow: 0 4px 10px rgba(15,18,34,.15); }
.mini .slab-tag { display: none; }

/* Segmented control */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: .2rem; }
.seg-btn { background: none; border: 0; padding: .45rem 1rem; border-radius: 999px; color: var(--muted); cursor: pointer; font-weight: 600; transition: background .2s, color .2s; }
.seg-btn.active { background: var(--accent); color: var(--accent-ink); }

/* Status pills */
.status { font-size: .75rem; padding: .15rem .6rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.status.viewed { background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent); }
.status.accepted { background: color-mix(in srgb, var(--like) 14%, transparent); color: var(--like); }
.status.countered { background: color-mix(in srgb, var(--gold) 30%, transparent); color: #8a6a00; }
.status.declined { background: color-mix(in srgb, var(--decline) 14%, transparent); color: var(--decline); }
.status.priority { background: color-mix(in srgb, var(--pink) 18%, transparent); color: var(--decline); }

.avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--holo); color: var(--text); flex: none; }

.toast {
  position: fixed; bottom: calc(1.5rem + var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); max-width: calc(100% - 32px); text-align: center; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; border: 1px solid var(--text);
  padding: .7rem 1.2rem; border-radius: 999px; box-shadow: var(--shadow); z-index: 80;
  animation: toastIn .4s var(--spring);
}

/* 5. Views ------------------------------------------------- */
.view { animation: viewIn .35s ease backwards; }

/* Home */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.hero { padding: 3rem 0 2rem; max-width: 720px; }
.eyebrow { display: inline-block; margin: 0 0 1rem; padding: .35rem .8rem; border-radius: 999px; background: var(--text); color: #fff; font-weight: 900; font-style: italic; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.lead { color: var(--muted); font-size: 1.1rem; }
.hero-actions { display: flex; gap: .75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.hero-fan { display: flex; justify-content: center; align-items: center; height: 260px; }
.hero-fan .art { width: 140px; border-radius: 14px; font-size: 3rem; margin: 0 -26px; box-shadow: var(--shadow-lift); transition: transform .5s var(--spring); }
.hero-fan .art:nth-child(1) { transform: rotate(-12deg) translateY(16px); }
.hero-fan .art:nth-child(2) { z-index: 1; animation: float 4s ease-in-out infinite; }
.hero-fan .art:nth-child(3) { transform: rotate(12deg) translateY(16px); }
.hero-fan:hover .art:nth-child(1) { transform: rotate(-22deg) translate(-40px, 24px); }
.hero-fan:hover .art:nth-child(3) { transform: rotate(22deg) translate(40px, 24px); }
.ticker-panel { margin-top: 1rem; }
.ticker-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.ticker-head h2 { margin-top: 0; display: flex; align-items: center; gap: .5rem; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 0 var(--pink); animation: livePulse 1.6s infinite; }
.ticker { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .6rem; }
.tick { display: flex; align-items: center; gap: .6rem; background: var(--surface-2); border-radius: 12px; padding: .55rem .7rem; min-width: 0; animation: slideIn .5s var(--spring); }
.tick .pair { display: flex; flex: none; }
.tick .pair .mini { width: 30px; }
.tick .pair .mini + .mini { margin-left: -10px; transform: rotate(6deg); }
.tick-text { flex: 1; min-width: 0; font-size: .85rem; }
.tick-text b, .tick-text small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tick-text small { color: var(--muted); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-top: 2rem; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; transition: transform .35s var(--spring), box-shadow .3s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature p { color: var(--muted); margin: 0; }

/* Discover ------------------------------------------------- */
/* Filters | card deck + card details | live activity */
.discover-top, .quick-chips { display: none; }
.discover-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr) 260px; gap: 2rem; align-items: start; }
.discover-layout > * { min-width: 0; }
.sheet-grab, .sheet-done { display: none; }

.filters { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 1.6rem 1.5rem 1.7rem; box-shadow: var(--shadow); }
.filters-title { font-size: 1.75rem; font-weight: 900; letter-spacing: -.03em; text-transform: none; color: var(--text); margin: 0 0 1.4rem; }
.filter-label { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 1.5rem 0 .75rem; }
.filters-title + .filter-label { margin-top: 0; }
.chips.big { gap: .55rem; }
.chips.big .chip { padding: .6rem 1.2rem; font-size: 1rem; color: var(--text); border-color: var(--border); }
.chips.big .chip.on { color: #fff; border-color: var(--accent); }
.chip.shake { animation: shake .4s; }
#fMax { display: block; margin: .3rem 0 .4rem; height: 22px; }
#fMax:disabled { opacity: .4; }
.range-scale { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: 1rem; margin-bottom: 1.1rem; }
.range-scale b { color: var(--text); font-size: 1.1rem; }
.check { display: flex; align-items: center; gap: .75rem; color: var(--text); font-size: 1rem; margin: 0 0 1rem; cursor: pointer; line-height: 1.3; }
.check input { width: 22px; height: 22px; margin: 0; padding: 0; flex: none; accent-color: var(--accent); cursor: pointer; }
.check:last-of-type { margin-bottom: 0; }

.swipe-area { display: flex; flex-direction: column; align-items: center; }
.deck-count { margin: 0 0 1.1rem; color: var(--muted); font-size: 1.05rem; text-align: center; }
.deck-count b { color: var(--text); }
.deck { position: relative; width: min(360px, 100%); aspect-ratio: 5 / 7; margin-bottom: 2.4rem; perspective: 1200px; }
.swipe-card { position: absolute; inset: 0; perspective: 1200px; touch-action: none; user-select: none; -webkit-user-select: none; transition: transform .45s var(--spring), opacity .3s; will-change: transform; }
.swipe-card[data-depth="0"] { cursor: grab; }
/* Cards waiting behind the top one peek out as pastel layers */
.swipe-card[data-depth="1"] { transform: translate(12px, 10px) rotate(3deg); --veil: 1; --veil-bg: linear-gradient(160deg, #e6ecff, #cddafe); }
.swipe-card[data-depth="2"] { transform: translate(22px, 20px) rotate(6deg); --veil: 1; --veil-bg: linear-gradient(160deg, #ffe6f6, #fdd2ef); }
.swipe-card.dragging { transition: none; cursor: grabbing; }
.swipe-card.nope { animation: nope .45s; }
.veil { position: absolute; inset: 0; z-index: 8; border-radius: 20px; pointer-events: none; background: var(--veil-bg, transparent); opacity: var(--veil, 0); transition: opacity .15s; }
.sc-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .6s var(--spring); transform: rotateY(calc(var(--flip, 0) * 180deg + var(--ry, 0deg))) rotateX(var(--rx, 0deg)); }
.swipe-card.tilting .sc-inner { transition: transform .12s ease-out; }
.face { position: absolute; inset: 0; border-radius: 20px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--surface); box-shadow: 0 22px 44px rgba(15, 18, 34, .18); }

/* Card face: the card itself, edge to edge. Shows the listing photo when
   there is one, otherwise a card-shaped placeholder. */
.card-face { position: absolute; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; color: #fff; background: var(--art); }
.card-face::before { content: ""; position: absolute; inset: 9px; z-index: 2; border: 1.5px solid rgba(255,255,255,.3); border-radius: 13px; pointer-events: none; }
.card-face::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: var(--holo); background-size: 300% 100%; opacity: .22; mix-blend-mode: screen; animation: foil 10s linear infinite; transition: opacity .3s; }
.cf-top, .cf-bottom { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.cf-top { padding: 1.2rem 1.3rem .3rem; }
.cf-top b { font-size: 1.45rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.1; text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.cf-top span { flex: none; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; opacity: .85; }
.cf-emoji { position: relative; z-index: 1; place-self: center; font-size: 7rem; filter: drop-shadow(0 12px 24px rgba(0,0,0,.4)); }
.cf-bottom { padding: .3rem 1.3rem 1.2rem; align-items: center; font-size: .8rem; opacity: .9; }
.cf-bottom .slab-tag { position: static; font-size: .78rem; }
.card-img { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.card-img.loaded { opacity: 1; }
.sheen { position: absolute; inset: 0; z-index: 5; pointer-events: none; background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255,255,255,.45), transparent 45%); mix-blend-mode: overlay; opacity: .5; transition: opacity .3s; }
.foil { position: absolute; inset: 0; z-index: 5; pointer-events: none; background: repeating-linear-gradient(115deg, transparent 0 18px, rgba(255,255,255,.07) 18px 20px); background-position: var(--mx, 50%) 0; mix-blend-mode: screen; }
.swipe-card.tilting .sheen { opacity: 1; }
.swipe-card.tilting .card-face::after { opacity: .45; }
.stamp { position: absolute; z-index: 6; padding: .2rem .7rem; border: 3px solid; border-radius: 10px; font-weight: 900; font-style: italic; font-size: 1.45rem; opacity: 0; letter-spacing: .03em; pointer-events: none; background: rgba(255,255,255,.9); }
.stamp.like { top: 3.6rem; left: 1.2rem; color: var(--like); transform: rotate(-14deg); }
.stamp.pass { top: 3.6rem; right: 1.2rem; color: var(--pass); transform: rotate(14deg); }
.stamp.super { top: 42%; left: 50%; transform: translateX(-50%); color: var(--decline); font-size: 1.15rem; white-space: nowrap; }
.ring { width: 20px; height: 20px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(15,18,34,.12) 0); display: grid; place-items: center; flex: none; }
.ring::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); }

.back { transform: rotateY(180deg); padding: 1.1rem; display: flex; flex-direction: column; gap: .7rem; overflow-y: auto; border: 1px solid var(--border); }
.back-head b { display: block; font-size: 1.1rem; letter-spacing: -.01em; }
.label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.spark { width: 100%; height: 64px; display: block; margin-top: .25rem; }
.spark.up { color: var(--up); }
.spark.down { color: var(--decline); }
.spark .area { fill: currentColor; fill-opacity: .12; }
.spark .line { fill: none; stroke: currentColor; stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark circle { fill: currentColor; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.kv.two { grid-template-columns: 1fr 1fr; }
.kv div { background: var(--surface-2); border-radius: 10px; padding: .45rem .55rem; font-size: .7rem; color: var(--muted); }
.kv b { display: block; font-family: var(--mono); color: var(--text); font-size: .9rem; }
.kv b.up { color: var(--up); } .kv b.down { color: var(--decline); }
.trust { display: flex; gap: .6rem; align-items: center; background: var(--surface-2); border-radius: 12px; padding: .55rem .65rem; font-size: .85rem; color: var(--text); }
.trust .avatar { width: 34px; height: 34px; font-size: .75rem; }
.trust small { display: block; color: var(--muted); }
.flip-hint { margin-top: auto; text-align: center; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.deck-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); border: 2px dashed var(--border); border-radius: 20px; padding: 2rem; background: var(--surface); }
.deck-empty b { color: var(--text); display: block; margin-bottom: .3rem; }
.deck-empty p { margin: 0 0 1rem; }

/* Details panel under the deck: who owns it, what it's worth, what you'd offer */
.card-info { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 1.25rem; margin-bottom: 1.4rem; box-shadow: var(--shadow); display: grid; gap: .9rem; }
.card-info:empty { display: none; }
.card-info.swap { animation: rise .35s var(--spring); }
.ci-owner { display: flex; align-items: center; gap: .9rem; }
.ci-avatar { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--text); color: #fff; font-weight: 800; font-size: 1.05rem; }
.ci-who { flex: 1; min-width: 0; display: grid; }
.ci-handle { color: var(--text); font-weight: 800; font-size: 1.25rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-who span { color: var(--muted); }
.cond-pill { flex: none; border-radius: 999px; padding: .35rem .85rem; font-weight: 700; font-size: .95rem; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.cond-pill.graded { background: color-mix(in srgb, var(--gold) 30%, transparent); color: #7a5c00; }
.ci-prices { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.ci-box { background: var(--surface-2); border-radius: 16px; padding: .75rem 1rem; display: grid; gap: .1rem; }
.ci-box span { color: var(--muted); font-size: .9rem; }
.ci-box b { font-family: var(--mono); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.ci-box.this b { color: var(--accent); }
.ci-offer { display: flex; align-items: center; gap: .7rem; border-top: 1px solid var(--border); padding-top: .9rem; }
.ci-offer .mini { width: 34px; font-size: .95rem; }
.ci-offer-text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.ci-offer-text small { color: var(--muted); }
.ci-offer-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-match { display: flex; align-items: center; gap: .35rem; font-family: var(--mono); font-size: .8rem; font-weight: 700; flex: none; }
.link-btn { flex: none; background: none; border: 0; padding: .25rem; color: var(--accent); font-weight: 700; }
.ci-wants { margin: 0; font-size: .88rem; color: var(--decline); font-weight: 600; }
.grade-note { margin: 0; font-size: .85rem; color: var(--decline); background: color-mix(in srgb, var(--pink) 10%, transparent); border-radius: 10px; padding: .5rem .65rem; }
.grade-note a { font-weight: 700; color: var(--decline); text-decoration: underline; }
.pick.auto { align-content: center; justify-items: center; text-align: center; min-height: 120px; }
.pick.auto .auto-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; }

.swipe-buttons { display: flex; gap: 1rem; align-items: center; }
.round-btn { position: relative; width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); transition: transform .25s var(--spring), box-shadow .2s, opacity .2s; }
.round-btn:hover { transform: translateY(-2px) scale(1.06); }
.round-btn:active { transform: scale(.88); }
.round-btn.pass { color: var(--text); }
.round-btn.like { width: 84px; height: 84px; background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(36, 87, 230, .3); }
.round-btn.undo, .round-btn.super { width: 50px; height: 50px; }
.round-btn.undo { color: var(--accent); }
.round-btn.undo.is-empty { opacity: .45; }
.round-btn.super { color: var(--decline); }
.round-btn.super.is-empty { opacity: .45; }
.round-btn.shake { animation: shake .4s; }
.super-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--pink); color: var(--pink-ink); font-family: var(--mono); font-size: .65rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.hint { color: var(--muted); font-size: .85rem; text-align: center; margin: 1rem 0 0; }

.activity { display: grid; gap: .5rem; }
.activity h2 { margin: .8rem 0 0; }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .65rem .8rem; }
.stat b { display: block; font-family: var(--mono); font-size: 1.35rem; line-height: 1.2; }
.stat span { font-size: .75rem; color: var(--muted); }
.stat b.bump { animation: bump .5s var(--spring); }
.feed { display: grid; gap: .5rem; }
.feed > *, .activity > * { min-width: 0; }
.feed-item { display: flex; gap: .6rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .5rem .6rem; color: var(--text); font-size: .85rem; transition: border-color .2s; }
.feed-item:hover { border-color: var(--accent); }
.feed-item .mini { width: 30px; font-size: .85rem; }
.feed-item.is-new { animation: slideIn .5s var(--spring); }
.feed-item.is-updated .status { animation: bump .5s var(--spring); }
.feed-text { flex: 1; min-width: 0; }
.feed-text b, .feed-text small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-text small { color: var(--muted); }
.empty-feed { margin: 0; color: var(--muted); font-size: .85rem; border: 1px dashed var(--border); border-radius: 12px; padding: .8rem; }

/* Search */
.search-bar { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.search-bar input { flex: 1; min-width: 220px; }
.user-tile { display: flex; flex-direction: row; gap: .9rem; align-items: center; padding: 1rem; color: var(--text); transition: transform .3s var(--spring), box-shadow .3s; }
.user-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* Collection */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.collection-value { display: grid; justify-items: end; text-align: right; }
.collection-value b { font-family: var(--mono); font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.collection-value small { font-family: var(--mono); font-weight: 700; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }

/* Profile */
.profile-header { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.profile-header .avatar { width: 80px; height: 80px; font-size: 1.7rem; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--border); }
.profile-header > div { flex: 1; min-width: 220px; }
.profile-header p { margin: .3rem 0 0; }
.profile-stats { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.profile-stats span { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .2rem .7rem; font-size: .82rem; }
.profile-stats b { font-family: var(--mono); }

/* Trades: delivery-style tracker */
.trade-card { display: grid; gap: 1rem; animation: rise .45s var(--spring) backwards; animation-delay: calc(var(--i, 0) * 50ms); }
.no-anim .trade-card { animation: none; }
.trade-top { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.trade-pair { display: flex; align-items: center; gap: .35rem; flex: none; }
.trade-pair .mini { width: 46px; font-size: 1.3rem; }
.swap-icon { color: var(--accent); font-weight: 900; }
.trade-info { flex: 1; min-width: 200px; }
.tracker { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.step { position: relative; display: grid; justify-items: center; align-content: start; text-align: center; gap: .35rem; font-size: .82rem; padding: 0 .25rem; }
.step::before { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--border); }
.step:first-child::before { display: none; }
.step.done::before, .step.now::before, .step.bad::before { background: var(--accent); }
.dot { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); display: grid; place-items: center; font-size: .7rem; font-weight: 800; transition: all .4s var(--spring); }
.step.done .dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.step.now .dot { border-color: var(--accent); animation: pulse 1.6s infinite; }
.step.now.warn-step .dot { border-color: var(--gold); background: var(--gold); }
.step.bad .dot { background: var(--decline); border-color: var(--decline); color: #fff; }
.step.todo { color: var(--muted); }
.step small { display: block; color: var(--muted); font-size: .75rem; }
.step .btn { margin-top: .35rem; }

/* Grading: scan, then sub-grades fill in */
.grade-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 1rem; align-items: end; margin: 1.5rem 0; }
.drop { border: 2px dashed var(--border); border-radius: var(--radius); padding: 1rem; min-height: 160px; display: grid; gap: .5rem; align-content: start; background: var(--surface); transition: border-color .2s; }
.drop:hover { border-color: var(--accent); }
.drop img { max-height: 180px; border-radius: 8px; justify-self: center; animation: rise .4s var(--spring); }
.drop img:not([src]) { display: none; }
.grade-run { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.5rem; align-items: center; }
.scan-frame { position: relative; border-radius: 12px; overflow: hidden; background: var(--surface-2); aspect-ratio: 5 / 7; }
.scan-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-line { position: absolute; left: 0; right: 0; height: 30%; background: linear-gradient(transparent, color-mix(in srgb, var(--accent) 45%, transparent), transparent); animation: scan 1.6s ease-in-out infinite; }
.scan-frame.done .scan-line { display: none; }
.grade-status { font-weight: 600; }
.grade-bars { display: grid; gap: .55rem; margin-top: .8rem; }
.gbar { display: grid; grid-template-columns: 80px minmax(0, 1fr) 36px; gap: .6rem; align-items: center; font-size: .85rem; }
.gbar i { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.gbar i b { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--holo); background-size: 300% 100%; transition: width 1s var(--spring); }
.gbar em { font-style: normal; font-family: var(--mono); font-weight: 700; text-align: right; }
.overall { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; animation: pop .6s var(--spring); }
.big-grade { font-size: 3rem; font-weight: 900; color: var(--accent); line-height: 1; }

/* Messages */
.messages-layout { display: grid; grid-template-columns: 260px 1fr; gap: 1rem; height: 70vh; min-height: 420px; }
.messages-layout > * { min-width: 0; }
.thread-list { padding: .5rem; overflow-y: auto; }
.thread { display: flex; gap: .7rem; align-items: center; padding: .6rem; border-radius: 10px; cursor: pointer; transition: background .2s; }
.thread:hover, .thread.active { background: var(--surface-2); }
.thread .avatar { width: 38px; height: 38px; }
.thread-text { min-width: 0; }
.thread-text .tile-meta { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-text .typing-text { color: var(--accent); }
.chat { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-head { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); font-weight: 700; }
.chat-body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: .5rem; }
.bubble { max-width: 75%; padding: .55rem .9rem; border-radius: 16px; background: var(--surface-2); }
.bubble.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.bubble.pop, .trade-bubble.pop { animation: pop .4s var(--spring); }
.trade-bubble { align-self: flex-start; width: min(310px, 88%); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: .7rem; display: grid; gap: .5rem; box-shadow: var(--shadow); }
.trade-bubble.me { align-self: flex-end; border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.tb-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 700; }
.tb-pair { display: flex; align-items: center; justify-content: center; gap: .6rem; }
.tb-pair .mini { width: 52px; font-size: 1.4rem; }
.tb-pair span { display: grid; justify-items: center; gap: .25rem; font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.tb-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.tb-actions .btn { padding-inline: .5rem; white-space: nowrap; }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: .7rem .9rem; background: var(--surface-2); border-radius: 16px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
.chat-form { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--border); }

/* 6. Sheets & overlays ------------------------------------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(15, 18, 34, .35); backdrop-filter: blur(2px); animation: fade .2s; }
.sheet-backdrop:not(.open) { display: none; }
.sheet { position: fixed; inset: 0; margin: auto; z-index: 60; width: min(560px, calc(100% - 32px)); height: fit-content; max-height: 85vh; overflow-y: auto; background: var(--surface); border-radius: 20px; padding: 1.25rem; box-shadow: var(--shadow-lift); animation: pop .35s var(--spring); }
.sheet:not(.open) { display: none; }
.sheet h3 { font-size: 1.1rem; margin-bottom: .9rem; }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .7rem; }
.pick { display: grid; gap: .3rem; text-align: left; border: 0; background: var(--surface-2); border-radius: 14px; padding: .5rem; font-size: .82rem; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .2s, transform .25s var(--spring); }
.pick:hover { box-shadow: inset 0 0 0 2px var(--border); }
.pick.on { box-shadow: inset 0 0 0 2px var(--accent); }
.pick:active { transform: scale(.95); }
.pick .art { border-radius: 10px; font-size: 2rem; }
.pick b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick .price { font-family: var(--mono); }
.pick .warn { font-size: .72rem; }

.match-overlay { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 1.5rem; overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(36, 87, 230, .2), transparent 55%),
    radial-gradient(circle at 25% 85%, rgba(255, 106, 213, .2), transparent 50%),
    rgba(246, 248, 255, .93);
  backdrop-filter: blur(6px); animation: fade .3s; }
.match-card { position: relative; z-index: 1; display: grid; justify-items: center; gap: 1rem; text-align: center; max-width: 360px; }
.match-pair { display: flex; justify-content: center; }
.match-pair .art { width: 120px; border-radius: 14px; font-size: 2.8rem; box-shadow: var(--shadow-lift); }
.match-pair .art:first-child { animation: inLeft .6s var(--spring) both; }
.match-pair .art:last-child { animation: inRight .6s var(--spring) both; margin-left: -12px; }
.match-card h2 { color: var(--text); font-size: clamp(2rem, 7vw, 2.8rem); font-weight: 900; font-style: italic; letter-spacing: -.03em; text-transform: none; margin: 0; animation: pop .6s .3s var(--spring) both; }
.match-card p { margin: 0; color: var(--muted); }
.match-actions { display: grid; gap: .5rem; width: 100%; max-width: 260px; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; left: 50%; top: 40%; width: 8px; height: 12px; border-radius: 2px; animation: burst 1.4s cubic-bezier(.1, .7, .3, 1) forwards; }

/* 7. Responsive -------------------------------------------- */
@media (max-width: 1099px) {
  .discover-layout { grid-template-columns: 260px minmax(0, 1fr); }
  .swipe-area { grid-row: span 2; }
  .activity { grid-column: 1; }
}

@media (max-width: 820px) {
  :root { --tabbar-h: 68px; }
  .topbar { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: .6rem; }
  .nav { display: none; }
  .tabbar {
    display: flex; justify-content: space-around; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding-top: .45rem; padding-bottom: calc(.45rem + env(safe-area-inset-bottom, 0px));
    padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px));
    background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
  }
  .tabbar a { position: relative; display: grid; justify-items: center; gap: .1rem; min-width: 56px; font-size: .68rem; font-weight: 600; color: var(--muted); transition: color .2s; }
  .tabbar a svg { transition: transform .3s var(--spring); }
  .tabbar a.active { color: var(--accent); }
  .tabbar a.active svg { transform: translateY(-2px) scale(1.08); }
  .tabbar .badge { position: absolute; top: -4px; left: calc(50% + 6px); margin: 0; }
  main { padding-block: 1rem calc(1.5rem + var(--tabbar-h)); }
  .footer { display: none; }
  .demo-bar { font-size: .75rem; padding-block: .3rem; }
  .toast { bottom: auto; top: calc(4.5rem + env(safe-area-inset-top, 0px)); }
  .phone-only { display: block; }
  .desk-only { display: none; }

  .home-hero { grid-template-columns: 1fr; gap: 0; }
  .hero { padding: 1.5rem 0 .5rem; }
  .hero-fan { height: 200px; order: -1; }
  .hero-fan .art { width: 104px; font-size: 2.4rem; margin: 0 -18px; }

  /* Discover fits one screen: top strip, deck, buttons */
  .discover-top { display: flex; gap: .5rem; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
  .discover-top .deck-count { margin: 0; font-size: .95rem; text-align: left; }
  .filter-btn { flex: none; display: flex; align-items: center; gap: .35rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .55rem .9rem; font-weight: 700; font-size: .9rem; }
  .filter-count { background: var(--accent); color: #fff; border-radius: 999px; font-size: .7rem; padding: 0 .4rem; font-family: var(--mono); }
  .quick-chips { display: flex; margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))) .9rem; padding: 0 max(16px, env(safe-area-inset-left, 0px)); }
  .discover-layout { grid-template-columns: 1fr; }
  .activity { display: none; }
  .swipe-area { grid-row: auto; }
  .deck { width: min(calc(100% - 28px), 330px, calc((100svh - 400px) / 1.4)); min-width: 210px; margin-bottom: 1.8rem; }
  .cf-emoji { font-size: 5rem; }
  .cf-top b { font-size: 1.2rem; }
  /* Buttons stay right under the card; details follow */
  .swipe-buttons { order: 1; }
  .card-info { order: 2; margin: 1.2rem 0 0; padding: 1rem; border-radius: 20px; }
  .hint { order: 3; }
  .ci-avatar { width: 44px; height: 44px; font-size: .9rem; }
  .ci-handle { font-size: 1.05rem; }
  .ci-box b { font-size: 1.05rem; }
  .hint { margin-top: .6rem; font-size: .8rem; }

  /* Filters panel and picker become bottom sheets */
  .filters { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 60; max-height: 85vh; overflow-y: auto; border-radius: 24px 24px 0 0; border: 0; padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 30px rgba(15, 18, 34, .15); animation: sheetUp .4s var(--spring); }
  .filters:not(.open) { display: none; }
  .sheet { inset: auto 0 0 0; margin: 0; width: 100%; border-radius: 22px 22px 0 0; padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); animation: sheetUp .4s var(--spring); }
  .sheet-grab { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--border); margin: -.4rem auto .9rem; }
  .sheet-done { display: block; width: 100%; margin-top: .5rem; }
  .picker { display: flex; overflow-x: auto; padding-bottom: .3rem; }
  .pick { flex: none; width: 116px; }

  .grade-form { grid-template-columns: 1fr; }
  .grade-run { grid-template-columns: 1fr; }
  .scan-frame { width: 160px; justify-self: center; }
  .messages-layout { grid-template-columns: 1fr; height: auto; }
  .thread-list { display: flex; overflow-x: auto; }
  .thread { flex: none; max-width: 240px; }
  .back { gap: .5rem; padding: .9rem; }
  .spark { height: 48px; }
  .chat { height: calc(100svh - 300px); min-height: 360px; }
  .tracker { grid-template-columns: 1fr; gap: 0; }
  .step { grid-template-columns: 24px minmax(0, 1fr); justify-items: start; align-items: start; text-align: left; gap: .7rem; padding: 0 0 .9rem; }
  .step:last-child { padding-bottom: 0; }
  /* Vertical tracker: the line runs down from each dot and fills once the next step is reached */
  .step::before, .step:first-child::before { display: block; top: 26px; bottom: 2px; left: 11px; width: 2px; height: auto; }
  .step:last-child::before { display: none; }
  .step.done::before, .step.now::before, .step.bad::before { background: var(--border); }
  .step:has(+ .done)::before, .step:has(+ .now)::before, .step:has(+ .bad)::before { background: var(--accent); }
  .collection-value { justify-items: start; text-align: left; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .grid .tile-body { padding: .65rem .75rem .8rem; }
  .grid .art { font-size: 2.6rem; }
  .grid .tile-meta { font-size: .78rem; }
  .grid .user-tile { grid-column: 1 / -1; }
}

@media (max-width: 380px) {
  .round-btn { width: 56px; height: 56px; }
  .round-btn.like { width: 72px; height: 72px; }
  .round-btn.undo, .round-btn.super { width: 44px; height: 44px; }
  .swipe-buttons { gap: .7rem; }
}

/* Demo additions */
h1, .logo, .big-grade { font-family: var(--display); text-wrap: balance; }
h1 { font-weight: 900; }
.price, .slab-tag, .big-grade, .status, .badge { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.demo-bar { background: var(--text); color: #c9cfe0; font-size: .85rem; text-align: center; padding-block: .45rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.demo-bar b { color: var(--pink); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, .thread:focus-visible, .swipe-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 8. Motion ------------------------------------------------ */
@keyframes foil { to { background-position: 300% 0; } }
@keyframes viewIn { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }
@keyframes bump { 0% { transform: scale(.5); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes nope { 20%, 60% { transform: translateX(-8px) rotate(-1deg); } 40%, 80% { transform: translateX(8px) rotate(1deg); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } }
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 16px); } }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes livePulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
@keyframes scan { 0% { top: -30%; } 100% { top: 100%; } }
@keyframes blink { 50% { opacity: .25; transform: translateY(-2px); } }
@keyframes inLeft { from { transform: translateX(-180px) rotate(-30deg); opacity: 0; } to { transform: rotate(-8deg); } }
@keyframes inRight { from { transform: translateX(180px) rotate(30deg); opacity: 0; } to { transform: rotate(8deg); } }
@keyframes burst { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
