/* HoloEx — shared styles */
:root {
  --blue: #8B3DE8;        /* HoloEx purple (was blue #2457E6) */
  --blue-dark: #6F23D1;
  --blue-tint: #F0E6FF;
  --navy: #140C26;
  --navy-2: #22163F;
  --gray-logo: #FF6AD5;
  --pink: #FF6AD5;
  --pink-ink: #2A0A20;
  --holo-bar: linear-gradient(90deg, #8B3DE8 0%, #FF6AD5 22%, #FFD65C 40%, #2ED5AA 58%, #4FC3FF 76%, #8B3DE8 100%);
  --holo: linear-gradient(110deg, #B48CFF 0%, #FF9ADB 18%, #D2BEFF 34%, #FFC0EB 48%, #9FD6FF 62%, #FF9ADB 78%, #B9A6FF 90%, #B48CFF 100%);
  --ink: #110B20;
  --ink-2: #2C2342;
  --muted: #5F5878;
  --line: #E3DAF5;
  --line-2: #D2C4EE;
  --bg: #F8F5FF;
  --field: #F3EEFC;
  --white: #FFFFFF;
  --good-bg: #F0E6FF;
  --good: #6F23D1;
  --warn-bg: #FFE4F5;
  --warn: #B0287A;
  --pass: #E0409F;
  --display: 'Archivo', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
  --radius: 16px;
  --shadow-lg: 0 24px 50px rgba(20, 12, 38, 0.18);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(640px 520px at 92% 6%,  rgba(58, 110, 245, 0.20), rgba(58, 110, 245, 0) 68%),
    radial-gradient(520px 520px at 4% 38%,  rgba(255, 106, 213, 0.16), rgba(255, 106, 213, 0) 68%),
    radial-gradient(560px 460px at 78% 72%, rgba(255, 106, 213, 0.13), rgba(255, 106, 213, 0) 68%),
    radial-gradient(600px 520px at 22% 96%, rgba(58, 110, 245, 0.16), rgba(58, 110, 245, 0) 68%),
    radial-gradient(420px 420px at 55% 30%, rgba(178, 166, 255, 0.12), rgba(178, 166, 255, 0) 68%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
main { flex: 1; }
.icon { width: 20px; height: 20px; flex: none; }

/* ---------- Header ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .container { display: flex; align-items: center; gap: 24px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.logo-link { display: block; line-height: 0; flex: none; }
.logo-link img { height: 34px; width: auto; }
.wordmark { display: inline-flex; align-items: center; line-height: 1; font-family: var(--display); font-size: 28px; letter-spacing: -0.04em; text-decoration: none; color: var(--ink); }
.wm-holo { font-weight: 700; background: var(--holo); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: foil 10s linear infinite; }
.wm-ex { font-weight: 900; font-style: italic; color: var(--blue); }
.wm-arrows { width: 24px; height: 24px; color: var(--blue); margin-left: 4px; flex: none; }
.wordmark.on-ink .wm-ex, .wordmark.on-ink .wm-arrows, .wordmark.on-ink .wm-exmark { color: #B07CFF; }
/* "EX" with the arrows built into the X, traced from the original HoloEx logo */
.wm-exmark { height: 1.12em; width: auto; flex: none; color: var(--blue); margin-left: 0.04em; transform: translateY(0.02em); }
.wordmark:hover { color: var(--ink); }
@keyframes foil { to { background-position: 300% 0; } }
@media (prefers-reduced-motion: reduce) { .wm-holo { animation: none; } }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a { padding: 10px 14px; border-radius: 8px; font-weight: 600; font-size: 15px; color: var(--ink-2); text-decoration: none; }
.main-nav a:hover { background: var(--field); color: var(--ink); }
.main-nav a[aria-current="page"] { background: var(--blue-tint); color: var(--blue-dark); font-weight: 700; }
.search { flex: 1 1 220px; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 44px; border-radius: 10px; background: var(--field); color: var(--muted); }
.search input { border: 0; background: transparent; font-size: 15px; color: var(--ink); flex: 1; min-width: 0; outline: none; }
.avatar-btn { width: 44px; height: 44px; border-radius: 999px; background: var(--blue); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 700; text-decoration: none; flex: none; }
.avatar-btn:hover { color: var(--white); background: var(--blue-dark); }
.header-spacer { flex: 1 1 120px; }
.site-header .header-login, .site-header .header-cta { min-height: 44px; flex: none; }
.site-header .header-login { margin-left: auto; }
.avatar-btn[hidden] { display: none; }
/* Home page header also has Log in + Start trading, so its search can shrink further, and the
   CTA steps aside on tablets (the hero repeats it) to keep the header on one row. */
.site-header .search { flex-basis: 140px; min-width: 0; }
@media (min-width: 721px) and (max-width: 900px) { .site-header .header-cta { display: none; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 20px; border-radius: 12px; font-weight: 700; font-size: 15px; text-decoration: none; border: 1px solid transparent; background: none; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); color: var(--white); }
.btn-outline { background: var(--white); border-color: var(--line-2); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink-2); color: var(--ink); }
.btn-lg { min-height: 56px; padding: 0 26px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-danger-text { color: var(--warn); }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--white); font-weight: 600; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--white); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--blue-tint); color: var(--blue-dark); }
.pill-good { background: var(--good-bg); color: var(--good); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }

/* ---------- Panels ---------- */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.panel h2 { font-weight: 800; font-size: 20px; }
.eyebrow { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.muted { color: var(--muted); }
.stat-num { font-family: var(--display); font-weight: 800; font-size: 28px; }

/* ---------- Trading card ---------- */
.hcard { width: 100%; aspect-ratio: 5 / 7; container-type: inline-size; color: var(--ink); }
.hcard-outer { height: 100%; display: flex; flex-direction: column; }
.hcard.is-graded .hcard-outer { padding: 4cqw; border-radius: 4.5cqw; background: linear-gradient(180deg, #EEF1F6, #DCE1EA); border: 1px solid #BFC6D4; gap: 3cqw; }
.hcard-label { background: var(--white); border: 1px solid #C3CAD8; border-radius: 1.6cqw; padding: 2.4cqw 3.2cqw; display: flex; align-items: center; justify-content: space-between; gap: 2cqw; font-size: 4cqw; font-weight: 700; line-height: 1.1; }
.hcard-label span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcard-grade { color: var(--white); background: var(--blue); border-radius: 1cqw; padding: 1cqw 2.4cqw; white-space: nowrap; }
.hcard-face { flex: 1; min-height: 0; position: relative; border-radius: 4.5cqw; padding: 4.2cqw; display: flex; flex-direction: column; gap: 3cqw; overflow: hidden; box-shadow: inset 0 0 0 1.4cqw rgba(255, 255, 255, 0.35); }
.hcard.is-graded .hcard-face { border-radius: 2.6cqw; }
.hcard-top { display: flex; justify-content: space-between; align-items: baseline; gap: 2cqw; color: var(--white); padding: 1cqw 1.4cqw 0; }
.hcard-name { font-family: var(--display); font-weight: 800; font-size: 7.4cqw; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcard-tag { font-size: 4.2cqw; font-weight: 700; opacity: 0.9; white-space: nowrap; }
.hcard-art { flex: 1; min-height: 0; position: relative; border-radius: 2cqw; overflow: hidden; border: 0.8cqw solid rgba(255, 255, 255, 0.55); }
.hcard-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hcard-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.42) 46%, rgba(255,255,255,0) 60%); background-size: 250% 100%; background-position: 100% 0; transition: background-position 0.8s ease; }
.hcard:hover .hcard-art::after { background-position: 0 0; }
.hcard-bottom { display: flex; justify-content: space-between; gap: 2cqw; color: var(--white); font-size: 4.2cqw; font-weight: 600; padding: 0 1.4cqw 0.6cqw; opacity: 0.95; }
.hcard-bottom span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Real card photo (Pokémon TCG API); the drawn face is the fallback */
.hcard-photo { flex: 1; min-height: 0; position: relative; border-radius: 4.5cqw; overflow: hidden; background: #DCE1EA; }
.hcard.is-graded .hcard-photo { border-radius: 2.6cqw; }
.hcard-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hcard-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.35) 46%, rgba(255,255,255,0) 60%); background-size: 250% 100%; background-position: 100% 0; transition: background-position 0.8s ease; pointer-events: none; }
.hcard:hover .hcard-photo::after { background-position: 0 0; }
.hcard.has-img .hcard-face { display: none; }
.hcard.has-img.no-img .hcard-photo { display: none; }
.hcard.has-img.no-img .hcard-face { display: flex; }

/* ---------- Footer ---------- */
.site-footer { position: relative; color: #C9CFE0; background:
    radial-gradient(600px 300px at 92% 100%, rgba(46, 213, 170, 0.22), rgba(46, 213, 170, 0) 60%),
    radial-gradient(520px 260px at 6% 0%, rgba(139, 61, 232, 0.45), rgba(139, 61, 232, 0) 60%),
    radial-gradient(360px 200px at 55% 110%, rgba(255, 106, 213, 0.18), rgba(255, 106, 213, 0) 60%),
    var(--navy); }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--holo-bar); }
.site-footer .container { padding-top: 48px; padding-bottom: 48px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
.site-footer img { height: 36px; width: auto; }
.slogan { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 20px; color: var(--white); margin-top: 14px; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; font-size: 15px; }
.footer-nav a { color: #C9CFE0; text-decoration: none; }
.footer-nav a:hover { color: var(--white); }
.footer-copy { width: 100%; font-size: 13px; color: #9AA3C2; border-top: 1px solid #262E55; padding-top: 20px; }

/* ---------- Home ---------- */
.hero { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 80px; padding-bottom: 72px; }
.hero-copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero-badge { align-self: flex-start; padding: 7px 14px; border-radius: 999px; background: var(--blue-tint); color: var(--blue-dark); font-weight: 700; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.hero h1 { font-weight: 900; font-size: clamp(42px, 6vw, 80px); line-height: 0.98; letter-spacing: -0.03em; }
.hero h1 em { color: var(--blue); font-style: italic; }
.hero-lede { font-size: 20px; line-height: 1.55; color: var(--muted); max-width: 540px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 36px; flex-wrap: wrap; padding-top: 8px; }
.hero-stats .stat-num { font-size: 30px; }
.hero-art { flex: 1 1 400px; min-width: 0; display: flex; justify-content: center; }
.card-fan { position: relative; width: 100%; max-width: 460px; height: 520px; }
.card-fan .fan { position: absolute; }
.card-fan .fan-left { left: 4%; top: 40px; width: 52%; transform: rotate(-11deg); opacity: 0.92; }
.card-fan .fan-right { right: 2%; top: 30px; width: 52%; transform: rotate(10deg); opacity: 0.92; }
.card-fan .fan-front { left: 22%; top: 0; width: 58%; box-shadow: 0 30px 60px rgba(15, 18, 34, 0.28); border-radius: 14px; }
.card-fan .fan-buttons { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 18px; }
.round { width: 64px; height: 64px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.round-pass { background: var(--white); border: 1px solid var(--line-2); color: var(--pass); }
.round-go { background: var(--blue); color: var(--white); box-shadow: 0 10px 24px rgba(139, 61, 232, 0.4); }
.band { background: rgba(255, 255, 255, 0.72); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section { padding-top: 80px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 40px; }
.section h2 { font-weight: 900; font-size: clamp(32px, 4vw, 44px); max-width: 720px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
/* Home: product rows (a real bit of the app beside each pitch), trade-stage track, dark sign-off band */
.hm-feat { padding-top: 96px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 88px; }
.hm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.hm-row:nth-child(even) .hm-copy { order: 2; }
.hm-kicker { font-weight: 700; color: var(--blue); font-size: 15px; margin-bottom: 10px; }
.hm-copy h2 { font-weight: 900; font-size: clamp(30px, 3.6vw, 42px); line-height: 1.05; margin-bottom: 14px; }
.hm-copy p { color: var(--muted); font-size: 18px; line-height: 1.55; max-width: 460px; }
.hm-demo { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; min-height: 300px; display: flex; align-items: center; justify-content: center; gap: 18px; position: relative; overflow: hidden; }
.hm-demo img { border-radius: 10px; box-shadow: 0 14px 30px rgba(20, 12, 38, .18); }
.hm-swipe img { width: 170px; }
.hm-swipe .hm-ghost { position: absolute; width: 150px; opacity: .5; filter: saturate(.6); }
.hm-swipe .hm-ghost.l { left: 8%; transform: rotate(-14deg) translateY(10px); }
.hm-swipe .hm-ghost.r { right: 8%; transform: rotate(12deg) translateY(10px); }
.hm-swipe .hm-main { position: relative; z-index: 1; transform: rotate(3deg); }
.hm-stamp { position: absolute; z-index: 2; top: 34px; right: calc(50% - 110px); transform: rotate(12deg); border: 3px solid var(--blue); color: var(--blue); font-family: var(--display); font-weight: 900; padding: 2px 10px; border-radius: 6px; background: rgba(255, 255, 255, .85); font-size: 20px; }
.hm-price { flex-direction: column; align-items: stretch; gap: 14px; }
.hm-price-top { display: flex; gap: 14px; align-items: center; }
.hm-price-top img { width: 56px; border-radius: 5px; box-shadow: none; }
.hm-price-top b { font-family: var(--display); font-size: 18px; display: block; }
.hm-price-top span { color: var(--muted); font-size: 14px; }
.hm-price-top .hm-big { margin-left: auto; font-family: var(--display); font-weight: 900; font-size: 30px; }
.hm-up { color: #11845B; font-weight: 700; font-size: 14px; }
.hm-grades { display: flex; gap: 8px; }
.hm-grades div { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13px; color: var(--muted); }
.hm-grades div b { display: block; color: var(--ink); font-family: var(--display); font-size: 16px; }
.hm-grades div.on { border-color: var(--blue); background: var(--blue-tint); }
.hm-pc { text-decoration: none; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.hm-pc img { height: 18px; box-shadow: none; border-radius: 0; }
.hm-binder { background: var(--navy); display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 22px; }
.hm-binder img { width: 100%; border-radius: 6px; box-shadow: none; outline: 1px solid rgba(255, 255, 255, .2); outline-offset: 3px; }
.hm-prof { position: absolute; left: 16px; bottom: 16px; background: #fff; border-radius: 999px; padding: 6px 14px 6px 6px; display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); }
.hm-prof i { width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; font-style: normal; display: grid; place-items: center; }
.hm-steps { padding-top: 24px; padding-bottom: 96px; }
.hm-steps h2 { font-weight: 900; font-size: clamp(30px, 3.6vw, 42px); margin-bottom: 36px; }
.hm-track { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.hm-track::before { content: ""; position: absolute; left: 12px; right: 12px; top: 11px; height: 2px; background: repeating-linear-gradient(90deg, var(--line-2) 0 8px, transparent 8px 14px); }
.hm-st { position: relative; padding-right: 24px; }
.hm-st .dot { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--blue); display: grid; place-items: center; margin-bottom: 18px; position: relative; }
.hm-st:last-child .dot { background: var(--blue); }
.hm-st .tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue-dark); background: var(--blue-tint); padding: 3px 8px; border-radius: 6px; margin-bottom: 10px; }
.hm-st h3 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.hm-st p { color: var(--muted); line-height: 1.5; }
.hm-cta { background: var(--navy); color: #fff; overflow: hidden; position: relative; }
.hm-cta .container { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 32px; padding-top: 72px; padding-bottom: 72px; }
.hm-cta h2 { font-weight: 900; font-size: clamp(30px, 3.8vw, 46px); line-height: 1.05; margin-bottom: 14px; }
.hm-cta p { color: #C9BFE0; font-size: 18px; margin-bottom: 24px; max-width: 460px; }
.hm-fan { position: relative; height: 260px; }
.hm-fan img { position: absolute; width: 150px; border-radius: 9px; box-shadow: 0 20px 40px rgba(0, 0, 0, .45); top: 20px; }
@media (max-width: 820px) {
  .hm-row, .hm-cta .container { grid-template-columns: 1fr; gap: 28px; }
  .hm-row:nth-child(even) .hm-copy { order: 0; }
  .hm-track { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .hm-track::before { display: none; }
  .hm-fan { height: 220px; }
  .hm-fan img { width: 120px; }
}
.btn-white { background: var(--white); color: var(--blue-dark); }
.btn-white:hover { background: var(--blue-tint); color: var(--blue-dark); }

/* ---------- Layout with side columns ---------- */
.three-col { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding-top: 32px; padding-bottom: 56px; }
.side { flex: 1 1 250px; max-width: 100%; min-width: 0; }
.center-col { flex: 999 1 420px; min-width: 0; }

/* ---------- Swipe ---------- */
.filters { display: flex; flex-direction: column; gap: 22px; }
.filter-group { display: flex; flex-direction: column; gap: 10px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.range-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.range-row strong { color: var(--ink); }
input[type="range"] { accent-color: var(--blue); }
/* Checkboxes: quiet when off, blue when on */
input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; border-radius: 6px; border: 1.5px solid var(--line-2); background: var(--white); display: inline-grid; place-content: center; cursor: pointer; flex: none; }
input[type="checkbox"]::before { content: ""; width: 12px; height: 12px; transform: scale(0); transition: transform 0.12s ease; background: var(--white); clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); }
input[type="checkbox"]:checked { background: var(--blue); border-color: var(--blue); }
input[type="checkbox"]:checked::before { transform: scale(1); }
input[type="checkbox"]:hover { border-color: var(--blue); }
input[type="range"] { width: 100%; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; min-height: 44px; }

.deck-col { display: flex; flex-direction: column; align-items: center; gap: 22px; overflow: hidden; padding: 0 16px; }
.deck-count { font-size: 14px; color: var(--muted); }
.deck-empty { width: 100%; max-width: 360px; aspect-ratio: 5 / 7; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; border-style: dashed; border-color: var(--line-2); font-size: 15px; }
input[type="range"]:disabled { opacity: 0.4; }
.deck-count strong { color: var(--ink); }
.deck { position: relative; width: 100%; max-width: 360px; touch-action: pan-y; }
.deck-shadow { position: absolute; border-radius: 18px; }
.deck-shadow.s1 { inset: 14px -14px -14px 14px; background: #DDE2EC; transform: rotate(4deg); }
.deck-shadow.s2 { inset: 7px -7px -7px 7px; background: #E8ECF3; transform: rotate(2deg); }
.deck-top { position: relative; border-radius: 18px; box-shadow: var(--shadow-lg); cursor: grab; user-select: none; will-change: transform; }
.deck-top.dragging { cursor: grabbing; }
.deck-top.fly { transition: transform 0.42s cubic-bezier(.25,.75,.35,1), opacity 0.42s cubic-bezier(.6,0,.9,.4); }
.deck-top.snap { transition: transform 0.45s cubic-bezier(0.2, 1.35, 0.4, 1), opacity 0.3s ease; }
.swipe-stamp { position: absolute; top: 22px; padding: 6px 14px; border-radius: 10px; font-family: var(--display); font-weight: 900; font-size: 26px; letter-spacing: 0.04em; border: 4px solid; opacity: 0; pointer-events: none; z-index: 2; background: rgba(255,255,255,0.9); }
.swipe-stamp.pass { right: 18px; color: var(--pass); border-color: var(--pass); transform: rotate(12deg); }
.swipe-stamp.want { left: 18px; color: var(--blue); border-color: var(--blue); transform: rotate(-12deg); }
.owner-panel { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; }
.owner-row { display: flex; align-items: center; gap: 12px; }
.initials { width: 40px; height: 40px; border-radius: 999px; background: var(--navy); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; }
.owner-row .who { flex: 1; min-width: 0; }
.owner-row .who a { font-weight: 700; font-size: 16px; text-decoration: none; color: var(--ink); }
.two-up { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.price-box { padding: 12px; border-radius: 10px; background: var(--bg); }
.price-box .lbl { font-size: 12px; color: var(--muted); font-weight: 600; }
.price-box .val { font-family: var(--display); font-weight: 800; font-size: 22px; }
.wants { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.wants .tag { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); font-weight: 600; }
.swipe-buttons { display: flex; gap: 20px; align-items: center; }
.swipe-buttons button { border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.sb-pass { width: 68px; height: 68px; background: var(--white); border: 1px solid var(--line-2); color: var(--pass); box-shadow: 0 6px 16px rgba(15, 18, 34, 0.08); }
.sb-save { width: 54px; height: 54px; background: var(--white); border: 1px solid var(--line-2); color: var(--muted); }
.sb-save[aria-pressed="true"] { color: var(--blue); border-color: var(--blue); background: var(--blue-tint); }
.sb-offer { width: 68px; height: 68px; background: var(--blue); border: 0; color: var(--white); box-shadow: 0 10px 24px rgba(139, 61, 232, 0.4); }
.toast { min-height: 22px; font-size: 14px; font-weight: 600; color: var(--blue-dark); text-align: center; }
.offer-panel { display: flex; flex-direction: column; gap: 16px; }
.offer-list { display: flex; flex-direction: column; gap: 8px; }
.offer-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 12px; border-radius: 12px; background: var(--white); border: 2px solid var(--line); text-align: left; }
.offer-item[aria-pressed="true"] { background: var(--blue-tint); border-color: var(--blue); }
.swatch { width: 34px; height: 46px; border-radius: 5px; flex: none; }
.offer-item .txt { flex: 1; min-width: 0; }
.offer-item .txt b { display: block; font-size: 14px; }
.offer-item .txt small { display: block; font-size: 12px; color: var(--muted); }
.offer-item .v { font-weight: 700; font-size: 14px; flex-shrink: 0; white-space: nowrap; }
/* Rows sit in scrolling lists: never squash them below their content, and keep long names inside the row. */
.offer-item { flex-shrink: 0; flex-wrap: wrap; row-gap: 4px; }
.offer-item > :first-child { flex-shrink: 0; }
.offer-item .txt { flex: 1 1 110px; }
.offer-item .txt b, .offer-item .txt small { overflow-wrap: break-word; }
.offer-item .v { margin-left: auto; }
.offer-item .want-tag { white-space: nowrap; }
.offer-item .txt small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.balance { padding: 14px; border-radius: 12px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.balance-row { display: flex; justify-content: space-between; font-size: 14px; }
.bar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; transition: width 0.3s ease; }
.verdict { padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 700; }
.fine { font-size: 12px; color: var(--muted); }

/* ---------- Profile / Binder ---------- */
.cover { background: var(--navy); height: 110px; position: relative; overflow: hidden; }
.cover svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.profile-head { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; margin-top: -36px; position: relative; }
.big-avatar { width: 128px; height: 128px; border-radius: 999px; background: var(--blue); border: 6px solid var(--bg); display: flex; align-items: center; justify-content: center; color: var(--white); font-family: var(--display); font-weight: 900; font-size: 44px; flex: none; }
.profile-name { flex: 1 1 320px; min-width: 0; padding-bottom: 6px; }
.profile-name .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-name h1 { font-weight: 900; font-size: 34px; }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-bottom: 6px; }
.bio { margin-top: 14px; font-size: 16px; line-height: 1.5; max-width: 620px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-top: 24px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.stat .muted { font-size: 14px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 32px; border-bottom: 1px solid var(--line); }
.tab { min-height: 48px; padding: 0 18px; border: 0; background: transparent; font-size: 16px; font-weight: 600; color: var(--ink-2); margin-bottom: -1px; border-bottom: 3px solid transparent; }
.tab span { font-weight: 600; color: var(--muted); }
.tab[aria-selected="true"] { font-weight: 800; color: var(--ink); border-bottom-color: var(--blue); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 20px 0; }
.toolbar .grow { flex: 1 1 20px; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.sort select { min-height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--white); font-size: 14px; color: var(--ink); }
.binder-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.trade-badge { padding: 3px 8px; border-radius: 999px; background: var(--blue); color: var(--white); font-size: 11px; font-weight: 800; letter-spacing: 0.04em; }
.pager { display: flex; align-items: center; gap: 10px; }
.pager button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--white); display: flex; align-items: center; justify-content: center; }
.pager span { font-weight: 700; font-size: 15px; min-width: 130px; text-align: center; }
.binder { background: var(--navy); border-radius: 22px; padding: 18px; box-shadow: 0 30px 60px rgba(15, 18, 34, 0.28), inset 0 0 0 3px var(--blue); }
.binder-spread { display: flex; flex-wrap: wrap; align-items: stretch; position: relative; perspective: 2400px; }
.binder-page.under { filter: brightness(0.92); }
/* The turning leaf: a page lifted off the binder and rotated over the rings */
.leaf { position: absolute; z-index: 5; transform-style: preserve-3d; transition: transform 0.9s cubic-bezier(0.45, 0.05, 0.3, 1); will-change: transform; pointer-events: none; }
.leaf-next { transform-origin: left center; }
.leaf-prev { transform-origin: right center; }
.leaf-next.turning { transform: rotateY(-180deg); }
.leaf-prev.turning { transform: rotateY(180deg); }
.leaf-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.leaf-back { transform: rotateY(180deg); }
.leaf-shade { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.9s ease; }
.leaf-next .leaf-front .leaf-shade { background: linear-gradient(to left, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55)); }
.leaf-next .leaf-back .leaf-shade { background: linear-gradient(to right, rgba(0,0,0,0) 40%, rgba(0,0,0,0.5)); opacity: 1; }
.leaf-prev .leaf-front .leaf-shade { background: linear-gradient(to right, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55)); }
.leaf-prev .leaf-back .leaf-shade { background: linear-gradient(to left, rgba(0,0,0,0) 40%, rgba(0,0,0,0.5)); opacity: 1; }
.leaf.turning .leaf-front .leaf-shade { opacity: 1; }
.leaf.turning .leaf-back .leaf-shade { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .leaf { transition: none; } }
.binder-page { flex: 1 1 340px; min-width: 0; background: var(--navy-2); padding: 16px; }
.binder-page.left { border-radius: 12px 0 0 12px; }
.binder-page.right { border-radius: 0 12px 12px 0; }
.binder-spine { flex: 0 0 46px; display: flex; flex-direction: column; justify-content: space-around; align-items: center; background: #080C1C; padding: 40px 0; }
.binder-spine i { width: 34px; height: 16px; border-radius: 999px; border: 4px solid #B7BDC9; background: #080C1C; }
.pockets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sleeve { position: relative; display: block; padding: 7px; border-radius: 8px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.22); text-decoration: none; transition: transform 0.15s ease; }
.sleeve:hover { transform: translateY(-3px); }
.sleeve::before { content: ""; position: absolute; inset: 0; border-radius: 8px; background: linear-gradient(160deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.04) 28%, rgba(255,255,255,0) 50%, rgba(255,255,255,0.08) 100%); pointer-events: none; z-index: 1; }
.sleeve::after { content: ""; position: absolute; left: 7px; right: 7px; top: 0; height: 4px; border-radius: 0 0 4px 4px; background: rgba(255, 255, 255, 0.28); z-index: 1; }
.sleeve .req-badge { position: absolute; top: -8px; left: -8px; z-index: 3; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: #E5484D; color: #fff; font-size: 13px; font-weight: 800; border: 2px solid var(--white); box-shadow: 0 2px 8px rgba(0,0,0,0.35); }
.sleeve .trade-badge { position: absolute; top: 12px; right: 12px; z-index: 2; font-size: 10px; padding: 3px 7px; box-shadow: 0 2px 6px rgba(0,0,0,0.3); }
.sleeve .value-tag { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 2; padding: 4px 9px; border-radius: 999px; background: var(--white); color: var(--ink); font-family: var(--display); font-size: 12px; font-weight: 800; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,0.3); }
.empty-sleeve { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 5 / 7; border-radius: 8px; border: 1.5px dashed rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.03); color: #B9C0E4; font-size: 13px; font-weight: 600; text-decoration: none; }
.empty-sleeve:hover { color: var(--white); border-color: rgba(255,255,255,0.6); }
.empty-sleeve.is-blank, .empty-sleeve.is-blank:hover { border-color: rgba(255, 255, 255, 0.18); cursor: default; }
/* Moving cards between sleeves (own binder) */
.rearrange-btn { min-height: 44px; padding: 0 14px; font-size: 14px; gap: 8px; margin-left: auto; }
.rearrange-btn .icon { width: 18px; height: 18px; }
.rearrange-btn[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--white); }
.move-hint { margin: -4px 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--blue-tint); color: var(--ink); font-size: 14px; font-weight: 600; }
.sleeve[draggable="true"] { cursor: grab; }
.binder-spread.is-arranging .sleeve, .binder-spread.is-arranging .empty-sleeve { cursor: pointer; }
.binder-spread.is-arranging .sleeve:not(.is-moving) { animation: sleeve-wiggle 0.5s ease-in-out infinite alternate; }
.binder-spread .sleeve.is-moving { opacity: 0.45; outline: 2px solid var(--white); outline-offset: 2px; transform: none; }
.binder-spread.is-arranging .sleeve.is-moving { opacity: 1; outline: 3px solid #F7D154; box-shadow: 0 0 0 6px rgba(247, 209, 84, 0.25); transform: translateY(-4px) scale(1.03); }
.empty-sleeve.drop-ok { border-color: rgba(255,255,255,0.55); color: var(--white); }
.binder-spread.is-dragging .empty-sleeve { border-color: rgba(255,255,255,0.55); }
.sleeve.drop-over, .empty-sleeve.drop-over { outline: 3px solid #F7D154; outline-offset: 2px; background: rgba(247, 209, 84, 0.12); }
.pager button.drop-over { border-color: var(--blue); background: var(--blue-tint); }
@keyframes sleeve-wiggle { from { transform: rotate(-0.6deg); } to { transform: rotate(0.6deg); } }
@media (prefers-reduced-motion: reduce) { .binder-spread.is-arranging .sleeve:not(.is-moving) { animation: none; } }
.page-num { text-align: center; margin-top: 12px; font-size: 12px; color: #8F97C4; font-weight: 600; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
.grid-card { display: flex; flex-direction: column; gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-decoration: none; color: var(--ink); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.grid-card:hover { color: var(--ink); transform: translateY(-3px); box-shadow: 0 12px 24px rgba(15, 18, 34, 0.1); }
.grid-card .meta { display: flex; flex-direction: column; gap: 4px; padding: 0 2px; }
.grid-card .nm { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid-card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.grid-card .val { font-family: var(--display); font-weight: 800; font-size: 16px; }
.grid-card .pill { align-self: flex-start; margin-top: 4px; font-size: 12px; padding: 4px 9px; }
.reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.review { display: flex; flex-direction: column; gap: 10px; }
.review .stars { color: var(--blue); font-size: 16px; letter-spacing: 2px; }
.review p { font-size: 15px; line-height: 1.5; }

/* ---------- Messages ---------- */
.convos { display: flex; flex-direction: column; gap: 6px; padding: 16px; max-height: 720px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.convos > * { flex: none; }
/* The list scrolls under its heading once there are more conversations than fit */
.convos h1 { font-weight: 800; font-size: 22px; margin: -16px -16px 4px; padding: 20px 22px 10px; position: sticky; top: -16px; z-index: 1; background: var(--white); }
@media (max-width: 900px) { .convos { max-height: 380px; } }
.convo { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; text-decoration: none; color: var(--ink); border: 0; background: transparent; width: 100%; text-align: left; }
.convo:hover { background: var(--bg); color: var(--ink); }
.convo[aria-current="true"] { background: var(--blue-tint); }
.convo .initials { width: 42px; height: 42px; }
.convo .txt { flex: 1; min-width: 0; }
.convo .txt b { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 15px; }
.convo-handle { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convo .txt small { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread { width: 10px; height: 10px; border-radius: 999px; background: var(--blue); flex: none; }
.chat { display: flex; flex-direction: column; min-height: 720px; padding: 0; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.chat-head .initials { width: 44px; height: 44px; }
.chat-head .who { flex: 1; min-width: 0; }
.chat-head .who a { font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none; }
.chat-head .who div { font-size: 13px; color: var(--muted); }
.chat-body { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 12px; background: #FAFBFC; overflow-y: auto; max-height: 640px; }
.day { align-self: center; font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 10px; border-radius: 999px; background: #EEF0F4; }
.msg { display: flex; flex-direction: column; gap: 4px; max-width: 75%; }
.msg.them { align-self: flex-start; align-items: flex-start; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.bubble { padding: 11px 14px; font-size: 15px; line-height: 1.45; }
.msg.them .bubble { border-radius: 16px 16px 16px 4px; background: #EEF0F4; }
.msg.me .bubble { border-radius: 16px 16px 4px 16px; background: var(--blue); color: var(--white); }
.msg time { font-size: 12px; color: var(--muted); padding: 0 4px; }
.offer-card { align-self: flex-end; width: 100%; max-width: 440px; border: 2px solid var(--blue); border-radius: var(--radius); background: var(--white); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.offer-card.from-them { align-self: flex-start; }
.offer-card .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.offer-card .title { font-family: var(--display); font-weight: 800; font-size: 16px; display: inline-flex; align-items: center; gap: 8px; color: var(--blue-dark); }
.offer-card .sides { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.offer-card .side-list { flex: 1 1 140px; display: flex; flex-direction: column; gap: 6px; }
.offer-card .line { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.offer-card .line .swatch { width: 22px; height: 30px; border-radius: 4px; }
.offer-card .line b { flex: 1; font-weight: 600; }
.offer-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.offer-actions .btn { min-height: 44px; padding: 0 18px; border-radius: 10px; }
.composer { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); align-items: center; }
.composer input[type="text"] { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); font-size: 15px; background: var(--white); }
.icon-btn { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--white); color: var(--muted); display: flex; align-items: center; justify-content: center; flex: none; }
.detail-stack { display: flex; flex-direction: column; gap: 16px; }
.mini-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mini-cards > div { display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; font-size: 12px; color: var(--muted); }
.mini-cards .hcard-wrap { width: 100%; max-width: 110px; }
.kv { font-size: 14px; display: flex; flex-direction: column; gap: 8px; }
.kv div { display: flex; justify-content: space-between; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 700; }
.progress { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.progress li { display: flex; gap: 12px; align-items: center; font-size: 15px; color: var(--muted); }
.progress .dot { width: 26px; height: 26px; border-radius: 999px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; background: var(--white); border: 2px solid #C3CAD8; color: transparent; }
.progress li.done { color: var(--ink); font-weight: 700; }
.progress li.done .dot { background: var(--blue); border-color: var(--blue); color: var(--white); }

/* ---------- Card detail ---------- */
.crumbs { font-size: 14px; color: var(--muted); padding-top: 28px; }
.crumbs a { color: var(--muted); }
.crumbs strong { color: var(--ink); }
.detail { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; padding-top: 24px; padding-bottom: 56px; }
.detail-card { flex: 1 1 300px; max-width: 420px; display: flex; flex-direction: column; gap: 16px; }
.detail-card .hcard-wrap { border-radius: 18px; box-shadow: var(--shadow-lg); }
.detail-card .row { display: flex; gap: 10px; }
.detail-card .row .btn { flex: 1; white-space: nowrap; padding: 0 12px; }
.detail-info { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.detail-info > div > h1 { font-weight: 900; font-size: clamp(32px, 4vw, 44px); }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--field); }
.seg button { min-height: 40px; padding: 0 16px; border-radius: 9px; border: 0; background: transparent; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.seg button[aria-selected="true"] { background: var(--white); color: var(--ink); font-weight: 800; box-shadow: 0 1px 3px rgba(18,23,58,0.15); }
.prices { display: flex; flex-direction: column; gap: 16px; }
.prices .head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.big-price { font-family: var(--display); font-weight: 900; font-size: 48px; letter-spacing: -0.02em; line-height: 1.1; }
.price-meta { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-end; }
.chart { width: 100%; height: 140px; display: block; }
.axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.mini-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.mini-prices .price-box .val { font-size: 20px; }
.split { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.split > * { flex: 1 1 300px; }
.ai { background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.ai h2 { font-weight: 800; font-size: 20px; }
.ai .soft { color: #B9C0E4; }
.ai .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ai .score { text-align: center; flex: none; }
.ai .score b { display: block; font-family: var(--display); font-weight: 900; font-size: 46px; line-height: 1; }
.ai .score small { font-size: 12px; color: #B9C0E4; font-weight: 600; }
.uploads { display: flex; gap: 10px; }
.upload { flex: 1; height: 78px; border-radius: 10px; border: 1px dashed #4A5590; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: #B9C0E4; background: transparent; }
.upload:hover { border-color: #7D8FF0; color: var(--white); }
.subgrades { display: flex; flex-direction: column; gap: 10px; }
.subgrade { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.subgrade .k { width: 74px; color: #D6DAF0; }
.subgrade .track { flex: 1; height: 8px; border-radius: 999px; background: #2A3263; overflow: hidden; }
.subgrade .track span { display: block; height: 100%; border-radius: 999px; background: #7D8FF0; }
.subgrade .v { width: 30px; text-align: right; font-weight: 700; }
.owners { display: flex; flex-direction: column; gap: 12px; }
.owner { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid #EEF0F4; }
.owner .initials { width: 38px; height: 38px; font-size: 13px; }
.owner .txt { flex: 1; min-width: 0; }
.owner .txt a { display: block; font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none; }
.owner .txt small { display: block; font-size: 13px; color: var(--muted); }
.owner .btn { min-height: 40px; padding: 0 14px; border-radius: 10px; border-color: var(--blue); color: var(--blue-dark); font-size: 14px; }

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .site-header .container { gap: 12px; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .main-nav a { flex: none; }
  .search, .site-header .search { order: 2; flex: 1 1 100%; }
  .header-spacer { display: none; }
  .site-header .header-login, .site-header .header-cta { min-height: 40px; padding: 0 14px; font-size: 14px; }
  .site-header .avatar-btn { width: 40px; height: 40px; }
  .hx-signed-in .site-header .header-cta { display: none; }
  .hero { padding-top: 40px; gap: 32px; }
  .card-fan { height: 420px; }
  .binder { padding: 10px; }
  .binder-spine { flex: 1 1 100%; flex-direction: row; justify-content: space-around; padding: 10px 40px; }
  .binder-page.left { border-radius: 12px 12px 0 0; }
  .binder-page.right { border-radius: 0 0 12px 12px; }
  .pockets { gap: 8px; }
  .binder-page { padding: 10px; }
  .chat { min-height: 560px; }
  .msg { max-width: 88%; }
}

/* ---------- Pearl Holo accents (Direction E) ---------- */
/* Swipe: soft blue + pink glow in the space around the deck, like the app mockup */
.deck-shadow.s1 { background: #FFE0F3; }
.deck-shadow.s2 { background: #DCE5FF; }
.sb-save[aria-pressed="true"] { color: var(--pink-ink); border-color: var(--pink); background: var(--pink); }
.hcard-tag { opacity: 1; background: var(--holo); color: var(--ink); padding: 0.8cqw 2.4cqw; border-radius: 1.6cqw; font-size: 3.6cqw; font-weight: 800; }
.wants .tag { border-color: #FFC6EA; background: #FFF0FA; color: #9C2470; }
.pill { background: var(--blue-tint); color: var(--blue-dark); }
.toast { color: var(--blue-dark); }

/* Home */
.hero-badge { background: var(--holo); background-size: 300% 100%; color: var(--ink); animation: foil 10s linear infinite; }

/* Binder cover + profile */
.cover { background:
    radial-gradient(520px 280px at 88% 0%, rgba(139, 61, 232, 0.6), rgba(139, 61, 232, 0) 62%),
    radial-gradient(380px 240px at 62% 120%, rgba(46, 213, 170, 0.32), rgba(46, 213, 170, 0) 60%),
    radial-gradient(420px 260px at 8% 120%, rgba(255, 106, 213, 0.35), rgba(255, 106, 213, 0) 60%),
    radial-gradient(260px 160px at 30% -20%, rgba(255, 214, 92, 0.22), rgba(255, 214, 92, 0) 60%),
    var(--navy); }
.cover::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--holo-bar); }
.big-avatar { background: linear-gradient(145deg, var(--blue) 0%, #6F23D1 60%, #3A2FB8 100%); }
.trade-badge { background: var(--pink); color: var(--pink-ink); }

/* Messages */
.unread { background: var(--pink); }
.msg.them .bubble { background: var(--field); }
.convo[aria-current="true"] { background: var(--blue-tint); box-shadow: inset 3px 0 0 var(--blue); }

/* Header */
.avatar-btn { background: linear-gradient(145deg, var(--blue) 0%, #3A2FB8 100%); }

/* AI grade estimate: light card like the rest of the theme */
.ai { background: var(--white); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(15, 18, 34, 0.06); }
.ai .soft { color: var(--muted); }
.ai .score b { color: var(--blue); }
.ai .score small { color: var(--muted); }
.upload { border-color: var(--line-2); color: var(--muted); background: var(--field); }
.upload:hover { border-color: var(--blue); color: var(--blue-dark); background: var(--blue-tint); }
.subgrade .k { color: var(--ink-2); }
.subgrade .track { background: var(--field); }
.subgrade .track span { background: var(--blue); }
.owner { border-top-color: var(--line); }

/* ---------- Card page states: market / someone's copy / your copy ---------- */
.context-strip { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 10px 16px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); font-size: 14px; }
.context-strip b { font-weight: 800; }
.context-strip a { text-decoration: none; }
.ctx-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--muted); flex: none; }
.context-strip.theirs .ctx-dot { background: var(--pink); }
.context-strip.mine .ctx-dot { background: var(--blue); }
.context-strip.mine { border-color: var(--blue); background: var(--blue-tint); }
.pill-trade { background: var(--pink); color: var(--pink-ink); }
.btn-icon { flex: 0 0 46px !important; padding: 0 !important; }
.btn-icon[aria-pressed="true"] { background: var(--pink); border-color: var(--pink); color: var(--pink-ink); }
.detail-card .btn-danger-text { background: transparent; border: 0; justify-content: center; }
.copy-panel { display: flex; flex-direction: column; gap: 16px; }
.copy-panel .head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.copy-panel .owner-row .who a { text-decoration: none; color: var(--ink); font-weight: 700; }
.photos { display: grid; grid-template-columns: repeat(2, minmax(0, 200px)); gap: 12px; }
.photo { margin: 0; position: relative; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.photo img { width: 100%; aspect-ratio: 5 / 7; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--field); }
.photo-empty { width: 100%; aspect-ratio: 5 / 7; border-radius: 10px; border: 1.5px dashed var(--line-2); background: var(--field); color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 600; text-align: center; padding: 12px; }
.upload-btn:hover { border-color: var(--blue); color: var(--blue-dark); background: var(--blue-tint); }
.photo-btn { position: absolute; top: 10px; right: 10px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,0.92); font-size: 13px; font-weight: 700; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field .muted { font-weight: 500; }
.field select, .field input { min-height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--white); font-size: 15px; font-weight: 500; color: var(--ink); }
.field select:disabled, .field input:disabled { background: var(--field); color: var(--muted); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 700; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 44px; height: 26px; border-radius: 999px; background: var(--line-2); position: relative; transition: background 0.15s ease; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 999px; background: var(--white); transition: transform 0.15s ease; box-shadow: 0 1px 3px rgba(15,18,34,0.25); }
.switch input:checked + .track { background: var(--blue); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid var(--blue); outline-offset: 2px; }
.mini-link { text-decoration: none; color: var(--ink); font-size: 13px; }
.mini-link .hcard-wrap { margin-bottom: 4px; }
.ai .row .btn svg { width: 18px; height: 18px; }

/* Grade-based value and graded copies */
.mini-prices .price-box.is-current { outline: 2px solid var(--blue); outline-offset: -2px; background: var(--blue-tint); }
.mini-prices .price-box.is-current .val { color: var(--blue-dark); }
.grade-value { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.gv-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; font-size: 14px; border-top: 1px solid var(--line); }
.gv-row:first-child { border-top: 0; }
.gv-row b { font-family: var(--display); font-weight: 800; font-size: 16px; white-space: nowrap; }
.gv-row.total { background: var(--blue-tint); }
.gv-row.total b { color: var(--blue-dark); font-size: 20px; }
.gv-row.total span { font-weight: 700; }
.gv-row small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); margin-top: 2px; }
.pill-slab { background: var(--ink); color: var(--white); }
.slab-label { gap: 2px; border-style: solid; background: linear-gradient(180deg, #F6F7FB, #E6EAF3); color: var(--ink); }
.slab-brand { font-family: var(--display); font-weight: 900; font-size: 22px; letter-spacing: 0.04em; }
.slab-grade { font-family: var(--display); font-weight: 900; font-size: 40px; line-height: 1; color: var(--blue); }

/* Swipe deck: the card itself is the drag target, never its image */
.deck-top { touch-action: none; -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
.deck-top .flip-front img, .deck-top .flip-front svg, .deck-top .hcard, .deck-top .fb-chart { pointer-events: none; -webkit-user-drag: none; user-select: none; }

/* ---------- Dialogs (add card, edit profile) ---------- */
.dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(20, 12, 38, 0.35); color: var(--ink); font-family: var(--body); }
.dialog::backdrop { background: rgba(20, 12, 38, 0.55); }
.dialog-body { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.dialog-body h2 { font-weight: 800; font-size: 22px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); flex: 1; }
.field input, .field select, .field textarea { font: inherit; font-size: 15px; color: var(--ink); min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--white); }
.field textarea { resize: vertical; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.address-gate { width: min(480px, calc(100vw - 32px)); }
.address-gate .dialog-body { max-height: calc(100dvh - 32px); overflow-y: auto; }
.address-gate .ag-lede { font-size: 14px; line-height: 1.5; }
.address-gate .ag-lede b { color: var(--ink); }
.acct-ship-fields { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; max-width: 460px; }
.account-ship .ag-error { color: #B3261E; font-size: 14px; font-weight: 600; margin-top: 8px; }
.account-ship .field em { font-style: normal; font-weight: 500; }
.acct-ship-fields .ag-row { display: grid; grid-template-columns: 1fr 80px 110px; gap: 10px; }
.acct-ship-fields .ag-row .field, .account-ship .acct-ship-fields .field { margin-top: 0; min-width: 0; max-width: none; }
.acct-ship-fields .field input, .address-gate .field input { min-height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--white); font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); width: 100%; }
.address-gate .field em { font-style: normal; font-weight: 500; }
.address-gate .ag-row { display: grid; grid-template-columns: 1fr 80px 110px; gap: 10px; }
.address-gate .ag-row .field { min-width: 0; }
.address-gate .ag-error { color: #B3261E; font-size: 14px; font-weight: 600; }
.address-gate .dialog-actions { justify-content: space-between; align-items: center; }
@media (max-width: 420px) { .address-gate .ag-row, .acct-ship-fields .ag-row { grid-template-columns: 1fr 1fr; } .address-gate .ag-city, .acct-ship-fields .ag-city { grid-column: 1 / -1; } }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.add-results { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.add-result { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--line); background: var(--white); }
.add-result[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-tint); }
.add-result img, .add-result .swatch { width: 36px; height: 50px; border-radius: 4px; object-fit: cover; flex: none; background: var(--line); }
.add-result b { display: block; font-size: 14px; }
.add-result small { display: block; font-size: 12px; color: var(--muted); }
.google-sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: rgba(20, 12, 38, 0.55); }
.google-sheet-card { background: var(--white); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 16px; font-weight: 700; }

/* PriceCharting credit — required wherever their prices are shown */
.price-credit { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); text-decoration: none; padding: 8px 0 0; }
.price-credit img { height: 28px; width: auto; display: block; }
.price-credit.compact img { height: 22px; }
.price-credit-mark { font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.price-credit-link { color: var(--blue); font-weight: 600; }
.legend .price-credit { padding: 0; }
.price-credit:hover .price-credit-link { text-decoration: underline; }
.price-credit.compact { font-size: 12px; padding-top: 4px; }
.owner-panel .price-credit { padding: 0; margin-top: -4px; }
.pc-mark { display: inline-block; vertical-align: -3px; margin-left: 4px; }
.pc-mark img { height: 16px; width: auto; display: block; }

/* Messages page (live) */
.day.sys { max-width: 90%; text-align: center; }
.offer-card.is-old { opacity: 0.72; border-color: var(--line-2); }
.linkish { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; font-weight: 600; cursor: pointer; }
.linkish:hover { text-decoration: underline; }
.next-step { display: flex; flex-direction: column; gap: 12px; }
.next-step h2 { font-size: 18px; }
.next-step p { font-size: 14px; line-height: 1.5; }
.ship-to { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; }
.ship-to b { font-size: 14px; }
.ship-to span.muted { font-size: 13px; line-height: 1.5; }
.ship-to address { font-style: normal; white-space: pre-line; line-height: 1.5; font-weight: 600; }
.ship-to .field textarea { min-height: 80px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--white); font: inherit; font-size: 15px; color: var(--ink); resize: vertical; }
.ship-to-head { display: flex; justify-content: space-between; align-items: baseline; }
.ship-to-head .linkish { font-size: 13px; }
/* Shipping panel: one row per package, then the action for this step */
.legs { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.leg { display: flex; flex-direction: column; gap: 6px; padding: 12px; min-width: 0; }
.leg + .leg { border-top: 1px solid var(--line); }
.leg-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.leg-label { font-size: 14px; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.ship-slot { display: flex; justify-content: center; }
.next-step.in-chat { width: 100%; max-width: 440px; box-shadow: none; border: 1px solid var(--line-2); }
.leg .pill { font-size: 12px; padding: 3px 9px; flex: none; }
.pill-muted { background: var(--bg); color: var(--muted); }
.trk { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 13px; }
.trk b { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.trk-num { font-variant-numeric: tabular-nums; }
.leg-links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; font-weight: 600; }
.leg-links a { color: var(--blue); text-decoration: none; }
.leg-links a:hover { text-decoration: underline; }
.ship-manual { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.ship-manual .field { margin-top: 0; }
.next-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.toast-float { position: fixed; inset: auto 16px 24px; margin: 0 auto; width: fit-content; max-width: min(520px, calc(100vw - 32px)); min-height: 0; padding: 12px 18px; border: 0; border-radius: 14px; background: var(--navy); color: #fff; box-shadow: 0 8px 28px rgba(20, 12, 38, .28); line-height: 1.4; }
.toast-float:not(:popover-open) { display: none; }
.trade-badge.pending-badge { background: var(--warn); color: var(--white); }
.btn.is-disabled { opacity: .55; pointer-events: none; }
.list-switch { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; }
.list-switch .fine { margin: 0; }
.unlisted-note { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--blue-tint); border: 1px solid rgba(139,61,232,.25); }
.unlisted-note strong { font-family: Archivo, sans-serif; font-size: 16px; color: var(--navy); }
.unlisted-note span { font-size: 14px; color: var(--muted); }
.dialog-error { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-size: 14px; font-weight: 600; }
.postage { display: flex; flex-direction: column; gap: 10px; }
.rates { display: flex; flex-direction: column; gap: 6px; }
.rate { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--white); cursor: pointer; font-size: 14px; }
.rate:has(input:checked) { border-color: var(--blue); background: var(--blue-tint); }
.rate input { accent-color: var(--blue); margin: 0; }
.rate-name { flex: 1; min-width: 0; line-height: 1.35; }
.rate-name small { display: block; color: var(--muted); font-size: 12px; }
.rate-name .pill { font-size: 11px; padding: 1px 6px; vertical-align: 1px; }
.rate-price { font-weight: 700; white-space: nowrap; }
.convo-n { display: inline-block; flex: none; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--blue); background: var(--blue-tint); padding: 1px 6px; border-radius: 999px; vertical-align: middle; }
/* Several trades with one trader: tabs under the chat header pick which one the side panel is about */
.trade-tabs { display: flex; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.trade-tabs[hidden] { display: none; }
.trade-tab { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 12px; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--white); font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer; }
.trade-tab .pill { font-size: 11px; padding: 2px 8px; }
.trade-tab[aria-selected="true"] { border-color: var(--blue); background: var(--blue-tint); color: var(--blue-dark); }
.offer-card .title .convo-n { margin-left: 2px; }
.offer-card[data-trade] { cursor: default; }
.chat-body:has(.offer-card.is-picked) .offer-card:not(.is-picked) { cursor: pointer; opacity: .62; border-color: var(--line-2); }
.offer-card.is-picked.is-old { opacity: .8; }
.stars { display: flex; gap: 4px; }
.stars button { background: none; border: 0; font-size: 30px; line-height: 1; color: #C3CAD8; cursor: pointer; padding: 0 2px; }
.stars button.on { color: #F5B301; }
.counter-dialog { width: min(760px, calc(100vw - 32px)); }
.counter-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.counter-cols .offer-list { max-height: 320px; overflow-y: auto; }
.c-find { width: 100%; height: 38px; padding: 0 12px; margin-bottom: 8px; border: 1px solid var(--line-2); border-radius: 10px; font: inherit; font-size: 14px; background: var(--white); }
.c-find:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.c-find[hidden] { display: none; }
.msg-done[hidden], .msg-form[hidden] { display: none; }
.chat-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 60px 24px; min-height: 360px; font-size: 16px; }
.chat-empty .muted { font-size: 14px; max-width: 360px; line-height: 1.5; }
.btn.is-busy { opacity: 0.6; pointer-events: none; }
.convo .pill { font-size: 11px; padding: 3px 8px; flex: none; }
.convo .tgt { color: var(--ink); font-weight: 600; }
/* Trades in progress: strip above the Messages list */
.pending-strip { flex: 1 1 100%; min-width: 0; padding: 14px 16px; }
.pt-head { display: flex; align-items: baseline; gap: 10px; margin: 0 2px 10px; font-size: 15px; }
.pt-head .muted { font-size: 13px; }
.pt-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
.pt-item { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); text-align: left; cursor: pointer; scroll-snap-align: start; font: inherit; }
.pt-item:hover { border-color: var(--blue); }
.pt-item.is-current { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-tint); }
.pt-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.pt-top .pill { font-size: 11px; padding: 3px 8px; }
.pt-cards { display: flex; align-items: center; gap: 8px; }
.pt-side { display: flex; flex-direction: column; gap: 4px; min-width: 56px; }
.pt-side small { font-size: 11px; color: var(--muted); }
.pt-th { display: flex; align-items: center; gap: 4px; min-height: 36px; }
.pt-card { display: flex; }
.pt-side .swatch { width: 26px; height: 36px; border-radius: 4px; }
.pt-arrow { color: var(--muted); display: inline-flex; margin-top: 14px; }
.pt-arrow .icon { width: 16px; height: 16px; }
.pt-more, .pt-none { font-size: 12px; color: var(--muted); font-weight: 600; }
.kv div { gap: 10px; }

/* Legal pages */
.legal { max-width: 760px; padding-top: 40px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 14px; font-size: 16px; line-height: 1.65; }
.legal h1 { font-weight: 900; font-size: 40px; }
.legal h2 { font-weight: 800; font-size: 22px; margin-top: 18px; }
.legal h3 { font-weight: 700; font-size: 16px; margin-top: 4px; }
.legal ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.legal code { background: var(--bg); padding: 1px 6px; border-radius: 6px; font-size: 14px; }

/* Login page */
.login-body { min-height: 100vh; display: flex; flex-direction: column; }
.login-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 40px 16px; }
.login-logo { font-size: 34px; }
.login-card { width: min(440px, 100%); padding: 32px 28px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.login-card h1 { font-weight: 900; font-size: 28px; }
.login-card > .muted { font-size: 15px; line-height: 1.5; }
.login-google { min-height: 44px; margin-top: 8px; display: flex; justify-content: center; }
.login-note { font-size: 13px; color: var(--muted); line-height: 1.5; max-width: 340px; }
.login-note.is-error { color: var(--warn); }
.login-divider { width: 100%; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin-top: 6px; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-back a { color: var(--muted); text-decoration: none; }
.login-back a:hover { text-decoration: underline; }

/* Price range: two-thumb slider */
.dual-range { position: relative; height: 36px; margin-top: 6px; }
.dual-track { position: absolute; left: 11px; right: 11px; top: 50%; height: 6px; margin-top: -3px; border-radius: 999px; background: var(--line-2); }
.dual-fill { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--blue); }
.dual-range input[type="range"] { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 36px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; pointer-events: none; }
.dual-range input[type="range"]::-webkit-slider-runnable-track { background: transparent; height: 36px; }
.dual-range input[type="range"]::-moz-range-track { background: transparent; }
.dual-range input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; pointer-events: auto; width: 22px; height: 22px; margin-top: 7px; border-radius: 999px; background: var(--white); border: 3px solid var(--blue); box-shadow: 0 1px 4px rgba(20, 12, 38, 0.25); cursor: grab; transform: scale(0.64); transition: transform 0.15s ease; }
.dual-range input[type="range"]::-moz-range-thumb { pointer-events: auto; width: 16px; height: 16px; border-radius: 999px; background: var(--white); border: 3px solid var(--blue); box-shadow: 0 1px 4px rgba(20, 12, 38, 0.25); cursor: grab; transform: scale(0.64); transition: transform 0.15s ease; }
/* Grow to full size while hovered, focused or being dragged */
.dual-range input[type="range"]:hover::-webkit-slider-thumb, .dual-range input[type="range"]:focus-visible::-webkit-slider-thumb, .dual-range input[type="range"]:active::-webkit-slider-thumb { transform: scale(1); cursor: grabbing; }
.dual-range input[type="range"]:hover::-moz-range-thumb, .dual-range input[type="range"]:focus-visible::-moz-range-thumb, .dual-range input[type="range"]:active::-moz-range-thumb { transform: scale(1); cursor: grabbing; }
.dual-range input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--blue-tint); }
.dual-range input.on-top { z-index: 2; }
.range-inputs { display: flex; align-items: flex-end; gap: 8px; margin-top: 4px; }
.range-inputs label { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.range-inputs .muted { padding-bottom: 12px; font-size: 13px; }
.money { display: flex; align-items: center; height: 38px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--white); padding: 0 8px; gap: 2px; }
.money i { font-style: normal; color: var(--muted); font-size: 14px; }
.money input { width: 100%; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); background: transparent; -moz-appearance: textfield; }
.money input::-webkit-outer-spin-button, .money input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.money:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }

/* Edit profile: picture */
.avatar-edit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avatar-preview { width: 84px; height: 84px; font-size: 30px; border-width: 3px; background-position: center; }
.avatar-edit-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.avatar-edit-actions .btn { min-height: 40px; padding: 0 14px; font-size: 14px; cursor: pointer; }
.avatar-edit .fine { width: 100%; }

/* Header search results */
.search.has-results { position: relative; }
.search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 40; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(20, 12, 38, 0.18); padding: 6px; max-height: min(60vh, 480px); overflow-y: auto; overscroll-behavior: contain; color: var(--ink); }
.sr-fix { font-size: 13px; color: var(--muted); padding: 8px 10px 2px; margin: 0; }
.sr-fix b { color: var(--blue); }
.sr-head { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 4px; }
.sr-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.sr-item:hover, .sr-item.is-active { background: var(--blue-tint); }
.sr-thumb { width: 34px; height: 47px; border-radius: 4px; object-fit: cover; background: var(--bg); flex: none; }
.sr-blank { display: block; }
.sr-avatar { width: 34px; height: 34px; border-radius: 999px; background: var(--navy) center/cover; color: var(--white); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; }
.sr-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sr-txt b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-txt small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-go { font-size: 12px; font-weight: 700; color: var(--blue); flex: none; }
.sr-empty { padding: 14px 12px; font-size: 14px; color: var(--muted); }

/* Add-card dialog: results + closer look */
.add-dialog { width: min(760px, calc(100vw - 32px)); }
.add-pick { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 14px; align-items: start; }
.add-pick .add-results { max-height: 340px; }
.add-result .add-zoom { margin-left: auto; color: var(--muted); font-size: 16px; flex: none; }
.add-result > span:nth-child(2) { min-width: 0; }
.add-preview { position: sticky; top: 0; display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; min-height: 380px; }
.add-preview-blank { display: none; width: 100%; max-width: 220px; aspect-ratio: 5 / 7; border: 2px dashed var(--line-2); border-radius: 10px; color: var(--muted); font-size: 13px; padding: 20px; align-items: center; justify-content: center; }
.add-preview.is-empty .add-preview-blank { display: flex; }
.add-preview.is-empty img, .add-preview.is-empty .add-preview-txt { display: none; }
.add-preview img { width: 100%; max-width: 220px; aspect-ratio: 5 / 7; object-fit: contain; border-radius: 10px; background: var(--bg); box-shadow: 0 10px 30px rgba(20, 12, 38, 0.18); }
.add-preview-txt { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.add-preview-txt b { font-size: 15px; }
.add-preview-txt small { color: var(--muted); }
.add-preview-txt a { color: var(--blue); font-weight: 600; text-decoration: none; margin-top: 4px; }
#add-cond-help { line-height: 1.5; }
@media (max-width: 640px) {
  .add-pick { grid-template-columns: 1fr; }
  .add-preview { flex-direction: row; text-align: left; }
  .add-preview img { width: 90px; }
}

.sr-all { display: block; text-align: center; padding: 10px; margin-top: 4px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 700; color: var(--blue); text-decoration: none; position: sticky; bottom: -6px; background: var(--white); }
.sr-all:hover { text-decoration: underline; }

/* Search results page */
.results-page { padding-top: 32px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 24px; }
.results-head h1 { font-weight: 900; font-size: 32px; }
.results-head p { margin-top: 6px; font-size: 15px; }
.results-page h2 { font-weight: 800; font-size: 20px; }
.results-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: 14px; }
.trader-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.trader-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); }
.trader-card:hover { border-color: var(--blue); }
.trader-card .initials { width: 42px; height: 42px; }
.trader-card .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.trader-card b { font-size: 15px; }
.trader-card small { font-size: 13px; color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.result-card { display: flex; flex-direction: column; gap: 4px; padding: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.result-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(20, 12, 38, 0.14); border-color: var(--blue); }
.result-art { position: relative; aspect-ratio: 5 / 7; border-radius: 8px; background: var(--bg); overflow: hidden; margin-bottom: 6px; }
.result-art img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* Prices page before a search: recent cards, then hot ones with a flame in the corner. */
.feat-block + .feat-block { margin-top: 34px; }
.feat-block .results-bar { align-items: center; gap: 12px; flex-wrap: wrap; }
.feat-credit:empty { display: none; }
.hot-badge { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.94); box-shadow: 0 4px 12px rgba(255, 74, 60, 0.35), 0 0 0 2px rgba(255, 122, 26, 0.25); }
.hot-badge svg { width: 22px; height: 22px; animation: hot-flicker 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes hot-flicker { 0%, 100% { transform: scale(1) rotate(0); } 40% { transform: scale(1.08, 1.12) rotate(-3deg); } 70% { transform: scale(.97, 1.03) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .hot-badge svg { animation: none; } }
@media (max-width: 520px) { .hot-badge { width: 28px; height: 28px; top: 4px; right: 4px; } .hot-badge svg { width: 18px; height: 18px; } }
.result-card b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-card small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-foot { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; margin-top: 4px; }
.result-foot strong { font-size: 15px; }
.results-nav { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }
.results-empty { font-size: 15px; }

/* Footer line art */
.site-footer { overflow: hidden; }
/* The line art sits in its own band under the copyright line, so it never runs behind the logo or links. */
.site-footer { padding-bottom: 72px; }
.site-footer .footer-deco { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 72px; pointer-events: none; }
.site-footer .container { position: relative; padding-bottom: 24px; }

/* Hide the page body (not the header) while live data loads; see HX.ready() */
html.hx-loading main { visibility: hidden; }
html.hx-loading body::after { content: ""; position: fixed; left: 50%; top: 40%; width: 34px; height: 34px; margin: -17px; border-radius: 999px; border: 3px solid var(--line-2); border-top-color: var(--blue); animation: hx-spin 0.8s linear infinite; z-index: 5; }
@keyframes hx-spin { to { transform: rotate(360deg); } }

/* Search filters */
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; margin: 18px 0 8px; padding: 14px 16px; background: var(--white); border: 1px solid var(--line-2); border-radius: 14px; }
.filter-bar[hidden] { display: none; }
.filter-bar label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: var(--ink-2); letter-spacing: .02em; }
.filter-bar select, .filter-bar input[type=number] { font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); min-height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--white); max-width: 220px; }
.filter-bar select:focus, .filter-bar input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.filter-bar .f-price span { display: flex; align-items: center; gap: 6px; }
.filter-bar .f-price input { width: 88px; }
.filter-bar .f-price i { font-style: normal; color: var(--muted); }
.filter-bar .f-check { flex-direction: row; align-items: center; gap: 8px; min-height: 40px; font-size: 14px; font-weight: 500; letter-spacing: 0; }
.filter-bar .f-check input { width: 18px; height: 18px; accent-color: var(--blue); }
.filter-bar #f-clear { min-height: 40px; padding: 0 14px; }
.filter-bar #f-clear[hidden] { display: none; }
@media (max-width: 640px) { .filter-bar { padding: 12px; } .filter-bar label { flex: 1 1 calc(50% - 8px); } .filter-bar select { max-width: none; width: 100%; } .filter-bar .f-price { flex-basis: 100%; } .filter-bar .f-price span { width: 100%; } .filter-bar .f-price input { flex: 1; width: auto; min-width: 0; } }

.filters .f-input { width: 100%; min-height: 40px; padding: 0 10px; margin: 4px 0 12px; font: inherit; font-size: 14px; color: var(--ink); background: var(--white); border: 1px solid var(--line-2); border-radius: 10px; }
.filters .f-input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.filters .filter-group > label.eyebrow { display: block; }

/* Swipe: filters in a pop-up */
.deck-bar { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.only-card-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--blue-tint); color: var(--blue-dark); font-size: 14px; max-width: 100%; }
.only-card-chip b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.only-card-chip button { border: 0; background: transparent; color: inherit; font-size: 18px; line-height: 1; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; }
.only-card-chip button:hover { background: rgba(139,61,232,.15); }
.filter-open { gap: 8px; min-height: 40px; padding: 0 16px; }
.filter-open .icon { width: 18px; height: 18px; }
.filter-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 800; }
.filter-badge[hidden] { display: none; }
.filter-dialog { width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
.filter-dialog .dialog-body { max-height: calc(100vh - 32px); overflow-y: auto; }

img.swatch.thumb { object-fit: cover; background: var(--line); }


/* Swipe: message (up swipe) and offer-sent pop-ups */
.swipe-stamp.msg { top: auto; bottom: 26px; left: 50%; transform: translateX(-50%) rotate(-4deg); color: var(--teal, #2ED5AA); border-color: var(--teal, #2ED5AA); }
.sb-msg { width: 54px; height: 54px; background: var(--white); border: 1px solid var(--line-2); color: #1AA98A; }
.sb-msg:hover { border-color: #2ED5AA; background: #EAFBF5; }
.msg-dialog { width: min(460px, calc(100vw - 32px)); }
.sent-dialog { width: min(400px, calc(100vw - 32px)); }
.pick-dialog { width: min(460px, calc(100vw - 32px)); }
.pick-list { max-height: min(46vh, 380px); overflow-y: auto; margin: 4px -4px 0; padding: 4px; }
.pick-sum { font-size: 14px; margin: 0; }
.none-dialog { width: min(420px, calc(100vw - 32px)); }
.none-dialog h2 { margin: 0; }
.none-dialog p { margin: 0; }
.none-thumb { width: 96px; border-radius: 6px; box-shadow: 0 6px 18px rgba(20,12,38,.18); opacity: .55; filter: grayscale(.4); }
.sent-check { width: 64px; height: 64px; border-radius: 999px; display: grid; place-items: center; background: var(--blue-tint); color: var(--blue); }
.offer-sub { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 6px 0 -2px; }
.offer-item.is-wanted { border-color: #FFC6EA; }
.offer-item .txt b { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 4px; }
.offer-sub:first-child { margin-top: 0; }
.want-tag { display: inline-block; vertical-align: middle; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border-radius: 999px; background: #FFF0FA; color: #9C2470; margin-left: 4px; }
.offer-panel .offer-list { max-height: 360px; overflow-y: auto; }
.offer-panel.nudge { animation: hx-nudge .45s ease; }
@keyframes hx-nudge { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
#send-offer:disabled { opacity: .55; cursor: not-allowed; }


/* Swipe: the card flips over to show its price history */
.deck-top { perspective: 1400px; box-shadow: none; }
.flip { position: relative; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.2,.8,.2,1); border-radius: 18px; transform: rotateX(var(--rx, 0deg)) rotateY(calc(var(--ry, 0deg) + var(--flip, 0deg))); }
.deck-top.no-anim .flip { transition: none; }
.deck-top.flipped .flip { --flip: 180deg; }
.deck-top.tilting .flip { transition: transform .12s ease-out; }
.flip-face { backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 18px; }
.flip-front { position: relative; box-shadow: var(--shadow-lg); }
.flip-back { position: absolute; inset: 0; transform: rotateY(180deg); background: linear-gradient(160deg, #1B1033 0%, #140C26 60%, #1E1240 100%); color: #fff; padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.08); }
.flip-back::before { content: ""; position: absolute; inset: 0; background: var(--holo-bar); height: 4px; opacity: .9; }
.flip-back .muted { color: rgba(255,255,255,.6); }
.fb-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-top: 4px; }
.fb-head b { display: block; font-family: var(--display); font-weight: 900; font-size: 18px; line-height: 1.15; }
.fb-head small { display: block; font-size: 12px; margin-top: 2px; }
.fb-head .pill { flex: none; }
.fb-big { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.fb-big > span:first-child { font-family: var(--display); font-weight: 900; font-size: 34px; line-height: 1; }
.fb-label { font-size: 12px; color: rgba(255,255,255,.65); margin-top: -4px; }
.fb-chart { width: 100%; height: 96px; display: block; margin-top: 4px; }
.fb-axis { display: flex; justify-content: space-between; font-size: 11px; color: rgba(255,255,255,.5); margin-top: -4px; }
.fb-range { font-size: 12px; }
.fb-minis { display: flex; gap: 6px; flex-wrap: wrap; }
.fb-mini { display: flex; flex-direction: column; padding: 6px 9px; border-radius: 9px; background: rgba(255,255,255,.07); min-width: 62px; }
.fb-mini small { font-size: 10px; color: rgba(255,255,255,.55); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.fb-mini b { font-size: 14px; }
.fb-mini.is-current { background: rgba(139,61,232,.35); outline: 1px solid rgba(180,140,255,.6); }
.fb-facts { font-size: 12px; color: rgba(255,255,255,.75); display: flex; flex-direction: column; gap: 2px; }
.flip-back .price-credit { color: #fff; }
.flip-back .price-credit .price-credit-link { color: #D2BEFF; }
.fb-links { display: flex; gap: 8px; margin-top: auto; }
.fb-links .btn { flex: 1; min-height: 38px; padding: 0 10px; font-size: 13px; }
.fb-links .btn-outline { border-color: rgba(255,255,255,.35); color: #fff; background: transparent; }
.fb-links .btn-outline:hover { background: rgba(255,255,255,.1); }
.fb-chart { flex: 1; min-height: 80px; max-height: 150px; }
.fb-hint { font-size: 11px; text-align: center; }
@media (max-height: 760px) { .fb-chart { height: 72px; } .fb-facts { display: none; } }

/* Swipe: the next card waits underneath, tinted, and shows through as the top card moves */
.deck-under { position: absolute; inset: 0; border-radius: 18px; overflow: hidden; transform: translate(7px, 7px) rotate(2deg); transition: transform .35s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.deck-under .veil { position: absolute; inset: 0; background: #DCE5FF; transition: opacity .35s ease; }
.deck-under.is-next { transform: none; }
.deck-under.is-next .veil { opacity: 0; }
.deck-under.dragging, .deck-under.dragging .veil, .deck-under.no-anim, .deck-under.no-anim .veil { transition: none; }
.deck-under .hcard { pointer-events: none; }

/* Holo shine that follows the mouse or the phone's tilt */
.sheen { position: absolute; inset: 0; border-radius: 18px; pointer-events: none; z-index: 1; opacity: 0; transition: opacity .3s ease; mix-blend-mode: overlay; background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255,255,255,.55), rgba(255,255,255,0) 45%); }
.deck-top.tilting .sheen { opacity: 1; }

/* Undo button */
.sb-undo { width: 54px; height: 54px; background: var(--white); border: 1px solid var(--line-2); color: var(--blue); transition: opacity .2s ease; }
.sb-undo:hover { border-color: var(--blue); background: var(--blue-tint); }
.sb-undo:disabled { opacity: .4; cursor: default; }
.sb-undo:disabled:hover { border-color: var(--line-2); background: var(--white); }

/* Offer sent: the two cards meet, with confetti */
.sent-stage { position: relative; width: 100%; display: flex; justify-content: center; padding: 6px 0 2px; }
.sent-pair { display: flex; justify-content: center; }
.sp-card { width: 104px; border-radius: 10px; box-shadow: var(--shadow-lg); }
.sp-card:first-child { transform: rotate(-8deg); animation: hx-in-left .6s cubic-bezier(.2,1.35,.4,1) both; }
.sp-card:last-child { margin-left: -14px; transform: rotate(8deg); animation: hx-in-right .6s cubic-bezier(.2,1.35,.4,1) both; }
.sp-card .hcard-art::after, .sp-card .hcard-photo::after { display: none; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; left: 50%; top: 45%; width: 8px; height: 12px; border-radius: 2px; animation: hx-burst 1.4s cubic-bezier(.1,.7,.3,1) forwards; }
@keyframes hx-in-left { from { transform: translateX(-160px) rotate(-30deg); opacity: 0; } to { transform: rotate(-8deg); opacity: 1; } }
@keyframes hx-in-right { from { transform: translateX(160px) rotate(30deg); opacity: 0; } to { transform: rotate(8deg); opacity: 1; } }
@keyframes hx-burst { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sp-card, .confetti i { animation: none; } .deck-top.snap, .deck-under, .deck-under .veil { transition: none; } }

/* The owner panel sits above the deck so the swipe buttons stay right under the card */
@media (max-width: 720px) {
  .deck-col .toast { order: 6; }
  .deck-col .fine { order: 7; }
}
/* Messages: making an offer from a plain chat */
.head-offer { min-height: 38px; padding: 0 14px; font-size: 14px; }
.head-offer[hidden], .chat-head #status[hidden] { display: none; }
.offer-nudge { display: flex; align-items: center; gap: 14px; margin: 12px auto 4px; max-width: 520px; padding: 14px 16px; background: var(--white); border: 1px dashed var(--line-2); border-radius: 14px; }
.offer-nudge > div { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.offer-nudge .btn { flex: none; min-height: 40px; padding: 0 16px; }
@media (max-width: 560px) { .offer-nudge { flex-direction: column; align-items: stretch; text-align: center; } }

/* Price page: the grade boxes under the chart are clickable */
.mini-prices .price-box.is-pick { cursor: pointer; border: 1px solid transparent; transition: border-color .15s, background .15s, transform .15s; }
.mini-prices .price-box.is-pick:hover:not(.is-empty), .mini-prices .price-box.is-pick:focus-visible { border-color: var(--blue); background: var(--blue-tint); transform: translateY(-1px); outline: none; }
.mini-prices .price-box.is-pick.is-empty { cursor: default; opacity: .55; }
.mini-prices .price-box.is-pick.is-current { cursor: default; }

/* Account tab (your own binder) */
.tab-account { margin-left: auto; }
.account { display: grid; gap: 14px; max-width: 820px; margin-top: 20px; }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; }
.account-row > div:first-child { flex: 1 1 320px; }
.account-row h2 { font-size: 18px; margin-bottom: 4px; }
.account-row p { font-size: 14px; line-height: 1.5; }
.account-row b { color: var(--ink); word-break: break-all; }
.account-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.account-ship .field { margin-top: 10px; max-width: 420px; }
.account-ship .field textarea { min-height: 80px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--white); font: inherit; font-size: 15px; color: var(--ink); resize: vertical; }
.account-ship .account-actions { align-self: flex-end; }
.account-danger { border-color: #F3C4E2; }
.account .fine { margin-top: 4px; }
.account-list { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 15px; line-height: 1.45; }
.btn-danger { background: var(--warn); color: var(--white); }
.btn-danger:hover { background: #8E1F62; color: var(--white); }
.btn-danger:disabled { opacity: 0.45; cursor: not-allowed; }
.composer-note { margin: 0; padding: 0 16px 10px; font-size: 12px; color: var(--muted); text-align: center; }
.composer-note a { color: inherit; }
.withdraw-box { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 12px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); }
.withdraw-box .offer-actions { margin-top: 2px; }
.withdraw-box .fine { margin: 0; }
.meet-box { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); font-size: 14px; }
.meet-box .offer-actions { margin-top: 4px; }
.meet-box.meet-offer { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.meet-box.meet-offer .btn { min-height: 40px; padding: 0 14px; border-radius: 10px; }
.meet-tips { margin: 12px 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-2); }
.withdraw-reason { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.risk-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.risk-note a { color: inherit; text-decoration: underline; }
.composer :disabled { opacity: 0.5; cursor: not-allowed; }
.del-error { font-size: 14px; font-weight: 600; color: var(--warn); background: var(--warn-bg); border-radius: 10px; padding: 10px 12px; line-height: 1.45; }
@media (max-width: 640px) {
  .tab-account { margin-left: 0; }
  .account-actions { width: 100%; }
  .account-actions .btn { flex: 1 1 auto; }
}
/* Add-card dialog: find a card from a photo */
.scan-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 14px; padding: 12px 14px; border-radius: 12px; background: var(--blue-tint); }
.scan-row img[hidden] { display: none; }
.scan-row img { width: 44px; height: 60px; object-fit: cover; border-radius: 6px; flex: none; box-shadow: 0 4px 12px rgba(20, 12, 38, 0.18); }
.scan-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.scan-row img[hidden] + .scan-txt { grid-column: 1 / 3; }
.scan-txt b { font-size: 15px; color: var(--ink); }
.scan-txt .fine { font-size: 13px; color: var(--ink-2); }
.scan-btns { display: flex; gap: 8px; flex: none; }
.scan-btns .btn { min-height: 42px; padding: 0 14px; cursor: pointer; white-space: nowrap; gap: 8px; }

/* Live card scanner (scan.js): full-screen camera, card-shaped box, tips, auto-capture meter. */
.cam { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; color: #fff; overflow: hidden; font-family: var(--body); }
.cam::backdrop { background: #000; }
.cam-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-guide { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); height: min(64vh, calc((100vw - 64px) * 88 / 63)); aspect-ratio: 63 / 88; border-radius: 4.5%/3.2%; box-shadow: 0 0 0 200vmax rgba(10, 6, 20, 0.62); outline: 2px solid rgba(255, 255, 255, 0.55); transition: outline-color .2s; }
.cam-guide i { position: absolute; width: 26px; height: 26px; border: 4px solid #fff; transition: border-color .2s; }
.cam-guide i:nth-child(1) { left: -6px; top: -6px; border-right: 0; border-bottom: 0; border-top-left-radius: 10px; }
.cam-guide i:nth-child(2) { right: -6px; top: -6px; border-left: 0; border-bottom: 0; border-top-right-radius: 10px; }
.cam-guide i:nth-child(3) { left: -6px; bottom: -6px; border-right: 0; border-top: 0; border-bottom-left-radius: 10px; }
.cam-guide i:nth-child(4) { right: -6px; bottom: -6px; border-left: 0; border-top: 0; border-bottom-right-radius: 10px; }
.cam-guide.is-ok, .cam-guide.is-steady, .cam-guide.is-blur { outline-color: #2ED5AA; }
.cam-guide.is-ok i { border-color: #2ED5AA; }
.cam-guide.is-glare i, .cam-guide.is-dark i, .cam-guide.is-shadow i { border-color: #FFD65C; }
.cam-guide.is-snap { outline-color: #fff; box-shadow: 0 0 0 200vmax rgba(255, 255, 255, 0.85); transition: box-shadow .15s; }
.cam-meter { position: absolute; left: 12%; right: 12%; bottom: -22px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.25); overflow: hidden; }
.cam-meter span { display: block; height: 100%; width: 0; background: var(--holo-bar); transition: width .08s linear; }
.cam-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; padding: calc(env(safe-area-inset-top, 0px) + 14px) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.cam-btn { display: inline-flex; align-items: center; gap: 6px; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 999px; border: 0; background: rgba(20, 12, 38, 0.6); color: #fff; font: 600 15px var(--body); cursor: pointer; }
.cam-btn[hidden] { display: none; }
.cam-torch[aria-pressed="true"] { background: #FFD65C; color: var(--navy); }
.cam-btn:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.cam-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 max(20px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 22px) max(20px, env(safe-area-inset-left, 0px)); text-align: center; }
.cam-tip { margin: 0 auto; font: 700 19px/1.3 var(--display); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5); }
.cam-fine { margin: 6px auto 0; max-width: 34ch; font-size: 13.5px; line-height: 1.4; color: rgba(255, 255, 255, 0.78); }
@media (prefers-reduced-motion: reduce) { .cam-guide, .cam-guide i, .cam-meter span { transition: none; } }
.scan-row.is-busy .scan-btns { opacity: .5; pointer-events: none; }
.scan-row.is-busy .scan-txt .fine::before { content: ''; display: inline-block; width: 11px; height: 11px; margin-right: 7px; border: 2px solid var(--blue); border-right-color: transparent; border-radius: 50%; vertical-align: -1px; animation: hx-spin .8s linear infinite; }
/* "Take photo" only where there's a camera to point (phones, tablets) */
@media (hover: hover) and (pointer: fine) { .scan-cam { display: none !important; } }
@media (max-width: 560px) { .scan-btns { grid-column: 1 / -1; } .scan-btns .btn { flex: 1; } }

/* Slab ownership verification (my-card) */
.verify-box { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--blue-tint); flex-wrap: wrap; }
.verify-box.is-verified { background: var(--good-bg); }
.verify-box.is-rejected { background: var(--warn-bg); }
.verify-ico { width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; background: var(--white); font-weight: 800; color: var(--blue-dark); flex: none; }
.verify-box.is-verified .verify-ico { color: var(--good); }
.verify-box.is-rejected .verify-ico { color: var(--warn); }
.verify-txt { display: flex; flex-direction: column; gap: 2px; flex: 1 1 200px; min-width: 0; }
.verify-txt b { font-size: 15px; }
.verify-txt small { font-size: 13px; color: var(--ink-2); }
.verify-box .btn { min-height: 42px; }
.verify-code { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px; border: 2px dashed var(--blue); border-radius: 12px; background: var(--blue-tint); }
.verify-code small { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.verify-code b { font-family: var(--display); font-size: 30px; letter-spacing: .06em; color: var(--blue-dark); }
.verify-code span { font-weight: 700; color: var(--ink-2); }
.verify-pick { cursor: pointer; align-self: flex-start; }
.verify-preview { max-height: 200px; width: auto; max-width: 100%; border-radius: 10px; align-self: flex-start; }
.verify-err:empty { display: none; }
.verify-err { color: var(--warn); font-size: 14px; }
/* Chat photos */
.msg .bubble-photo { display: block; padding: 4px; background: var(--field); line-height: 0; }
.msg.me .bubble-photo { background: var(--blue); }
.bubble-photo img { display: block; max-width: min(260px, 60vw); max-height: 320px; border-radius: 12px; object-fit: cover; }
/* Small phones: the five swipe buttons must fit across the screen */
@media (max-width: 420px) {
  .swipe-buttons { gap: 10px; justify-content: center; }
  .sb-pass, .sb-offer { width: 60px; height: 60px; }
  .sb-save, .sb-msg, .sb-undo { width: 48px; height: 48px; }
}
@media (max-width: 640px) { .filter-bar .f-price { min-width: 0; } .filter-bar .f-price input { width: 0; } }
/* Binder Wishlist tab: what you're looking for */
.wish-tools { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.wish-tools[hidden] { display: none; }
.wish-tools h2 { font-size: 18px; }
.wish-tools-txt { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1; }
.wish-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.wish-tags .tag { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; border: 1px solid #FFC6EA; background: #FFF0FA; color: #9C2470; font-weight: 600; font-size: 14px; }
.wish-tags .tag button { border: 0; background: none; color: inherit; font-size: 16px; line-height: 1; padding: 0 2px; cursor: pointer; opacity: .7; }
.wish-tags .tag button:hover { opacity: 1; }
.wish-tag-form { display: flex; gap: 8px; max-width: 460px; }
.wish-tag-form[hidden] { display: none; }
.wish-tag-form input { flex: 1; min-width: 0; min-height: 42px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; font: inherit; }
.wish-card { position: relative; }
.wish-card .wish-link { display: block; color: inherit; }
.wish-avail { text-decoration: none; }
.wish-remove { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--white); color: var(--muted); font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(15, 18, 34, .12); }
.wish-remove:hover { color: var(--pass); border-color: var(--pass); }
@media (max-width: 640px) { .wish-tools { flex-direction: column; } .wish-tools > .btn { width: 100%; } }

/* Name rules: banner for accounts whose name needs changing, inline error in Edit profile */
.name-notice { background: var(--warn-bg); color: var(--pink-ink); border-bottom: 1px solid #F6C3E4; }
.name-notice .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; font-size: 14px; }
.name-notice .btn { min-height: 36px; padding: 0 14px; font-size: 14px; }
.form-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 14px; font-weight: 600; }
.field input.is-invalid { border-color: var(--warn); box-shadow: 0 0 0 3px rgba(176, 40, 122, 0.12); }

/* Report a trader (binder) */
.profile-actions .report-btn { color: var(--muted); }
.profile-actions .report-btn:hover { color: var(--warn); }
.report-reasons { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.report-reasons legend { font-size: 14px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.report-reasons label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; font-size: 15px; }
.report-reasons label:has(input:checked) { border-color: var(--blue); background: var(--blue-tint); }
.report-reasons input { accent-color: var(--blue); width: 18px; height: 18px; margin: 0; }

/* Binder archive: cards traded away in finished trades (owner only) */
.archive-help { margin: 6px 0 14px; font-size: 14px; }
.archive-card .archive-line { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.archive-card .archive-got { color: var(--muted); }

/* Signed out: binder and messages show a blank placeholder, clouded over, with a login prompt */
.lock-zone { position: relative; }
.lock-blur { filter: blur(7px) saturate(0.85); opacity: 0.75; pointer-events: none; user-select: none; }
.lock-card { position: absolute; z-index: 5; top: 96px; left: 50%; transform: translateX(-50%); width: min(420px, calc(100% - 32px)); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 28px 24px; background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(20, 12, 38, 0.22), inset 0 0 0 1px var(--line, #e6e0f0); }
.lock-card h2 { font-family: Archivo, sans-serif; font-weight: 800; font-size: 22px; line-height: 1.2; }
.lock-card .muted { font-size: 14px; line-height: 1.5; max-width: 320px; }
.lock-card .btn { margin-top: 6px; min-width: 160px; }
.lock-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #F0E6FF; color: var(--blue); }
.locked-avatar { background: #F0E6FF !important; color: var(--blue) !important; }
.msg-locked .lock-blur { display: flex; flex-wrap: wrap; gap: 24px; width: 100%; }
.msg-locked .lock-card { top: 200px; }
.msg-locked .chat { min-height: 560px; }
.msg-locked .convo .initials { background: #D9CCEE; }
.msg-locked .chat-head .initials { background: #D9CCEE; }
.ph-bar { display: block; height: 10px; border-radius: 6px; background: #E4DAF3; margin: 4px 0; }
.ph-bubble { height: 38px; }
.msg.them .ph-bubble { background: #EDE6F7; }
.msg.me .ph-bubble { background: #C9A8F5; }
.ph-input { flex: 1; height: 46px; border-radius: 10px; background: #F3EEFA; }

/* "More traders" carousel under Swipe */
.trader-rail { flex: 1 1 100%; min-width: 0; margin-top: 16px; }
.trader-rail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.trader-rail-head h2 { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 22px; }
.trader-rail-nav { display: flex; gap: 8px; }
.round-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--white); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.round-btn:hover { border-color: var(--blue); color: var(--blue); }
.round-btn:disabled { opacity: .35; cursor: default; border-color: var(--line-2); color: var(--ink); }
.trader-track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 2px; padding: 2px 2px 12px; scrollbar-width: thin; overscroll-behavior-x: contain; }
.trader-tile { flex: 0 0 220px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 14px 14px; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.trader-tile:hover, .trader-tile:focus-visible { transform: translateY(-2px); border-color: var(--line-2); box-shadow: 0 10px 24px rgba(20, 12, 38, .08); }
.trader-tile .tt-av { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 22px; margin-bottom: 6px; box-shadow: 0 0 0 3px var(--white), 0 0 0 5px #F0E6FF; }
.trader-tile .tt-name { font-weight: 800; font-size: 16px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trader-tile .tt-handle, .trader-tile .tt-loc { font-size: 13px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trader-tile .tt-stats { display: flex; gap: 10px; justify-content: center; font-size: 13px; margin-top: 6px; }
.trader-tile .tt-stats strong { font-weight: 800; }
.trader-tile .tt-cards { display: flex; justify-content: center; gap: 6px; margin-top: 10px; min-height: 60px; }
.trader-tile .tt-cards img, .trader-tile .tt-cards span { width: 43px; height: 60px; border-radius: 4px; object-fit: cover; background: #F3EEFA; box-shadow: 0 2px 6px rgba(20, 12, 38, .12); }
.trader-tile .tt-cta { margin-top: auto; padding-top: 12px; font-size: 14px; font-weight: 700; color: var(--blue); }
@media (max-width: 720px) {
  .trader-rail-nav { display: none; }
  .trader-tile { flex-basis: 180px; }
}

/* Swipe heart: hearting a card adds it to your wishlist and moves on */
.sb-save { color: #E0389E; }
.sb-save:hover { border-color: var(--pink); background: #FFF0FA; }
.sb-save svg { fill: currentColor; fill-opacity: 0; transition: fill-opacity .15s; }
.sb-save:hover svg, .sb-save[aria-pressed="true"] svg { fill-opacity: 1; }

/* Wishlist tab: whose copy a hearted card came from */
.wish-from { position: absolute; top: 8px; left: 8px; z-index: 2; max-width: calc(100% - 52px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 10px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; text-decoration: none; box-shadow: 0 4px 10px rgba(15, 18, 34, .18); }
.wish-from:hover { background: var(--blue); color: #fff; }
.sb-save[aria-pressed="true"] { color: #fff; border-color: #E0389E; background: #E0389E; }

/* Swipe: series tabs under the header ("All", then Pokémon eras), scrolls sideways */
.series-bar { background: var(--white); border-bottom: 1px solid var(--line); }
.series-wrap { position: relative; display: flex; align-items: center; }
.series-scroll { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 10px 2px; flex: 1; min-width: 0; }
.series-scroll::-webkit-scrollbar { display: none; }
.series-wrap::before, .series-wrap::after { content: ""; position: absolute; top: 0; bottom: 0; width: 44px; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 1; }
.series-wrap::before { left: 0; background: linear-gradient(90deg, var(--white) 40%, rgba(255,255,255,0)); }
.series-wrap::after { right: 0; background: linear-gradient(270deg, var(--white) 40%, rgba(255,255,255,0)); }
.series-wrap.fade-l::before, .series-wrap.fade-r::after { opacity: 1; }
.series-tab { flex: none; scroll-snap-align: start; border: 1px solid var(--line); background: var(--white); color: var(--ink); font: 600 14px/1 'DM Sans', sans-serif; padding: 9px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.series-tab:hover { border-color: var(--line-2); background: var(--blue-tint); }
.series-tab[aria-selected="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.series-tab.is-empty:not([aria-selected="true"]) { color: var(--muted); opacity: .7; }
.series-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.series-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--white); color: var(--blue-dark); font-size: 20px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(20,12,38,.1); }
.series-arrow:hover { background: var(--blue-tint); }
.series-arrow.prev { left: 0; } .series-arrow.next { right: 0; }
@media (max-width: 720px) { .series-arrow { display: none; } .series-scroll { padding: 8px 0; } .series-tab { font-size: 13px; padding: 8px 12px; } }


/* Swipe flashes: green check (right / offer), pink heart (up / heart button), red X (left / pass) */
.heart-pop { --c: #FF4FB8; --g: rgba(255, 79, 184, .4); position: absolute; left: 50%; top: 42%; width: min(96%, 380px); aspect-ratio: 1; z-index: 30; pointer-events: none; color: var(--c); transform: translate(-50%, -50%) scale(.3); opacity: 0; animation: swipe-pop .9s cubic-bezier(.2, .9, .3, 1.2) forwards; filter: drop-shadow(0 10px 30px var(--g)); }
.heart-pop svg { display: block; position: relative; }
.heart-pop.heart-pop svg { fill: currentColor; }
.heart-pop.check-pop svg, .heart-pop.x-pop svg { fill: none; }
.heart-pop::before { content: ""; position: absolute; left: 50%; top: 50%; width: 150%; height: 150%; margin: -75% 0 0 -75%; border-radius: 50%; background: radial-gradient(circle, var(--g), transparent 65%); animation: swipe-flash .5s ease-out forwards; }
.heart-pop.check-pop { --c: #16C964; --g: rgba(22, 201, 100, .4); left: calc(100% + 8px); top: 50%; width: 300px; transform-origin: -8px 50%; animation-name: swing-r; animation-duration: 1.5s; animation-timing-function: ease-out; }
.heart-pop.x-pop { --c: #FF2D3D; --g: rgba(255, 45, 61, .4); left: auto; right: calc(100% + 8px); top: 50%; width: 300px; transform-origin: calc(100% + 8px) 50%; animation-name: swing-l; animation-duration: 1.5s; animation-timing-function: ease-out; }
/* Beside the card, no tilt: flash in, hold, fade out */
@keyframes side-pop { 0% { transform: translateY(-50%) scale(.6); opacity: 0; } 18% { transform: translateY(-50%) scale(1.08); opacity: .9; } 30% { transform: translateY(-50%) scale(1); opacity: .6; } 42% { opacity: .9; } 60% { transform: translateY(-50%) scale(1); opacity: .6; } 100% { transform: translateY(-50%) scale(1); opacity: 0; } }
@media (max-width: 720px) { .heart-pop.check-pop { left: auto; right: -10px; width: 190px; } .heart-pop.x-pop { right: auto; left: -10px; width: 190px; } }
@keyframes swipe-flash { 0% { transform: scale(.4); opacity: 0; } 35% { opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
@keyframes swipe-pop { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 30% { transform: translate(-50%, -50%) scale(1.12); opacity: .6; } 55% { transform: translate(-50%, -50%) scale(1); opacity: .6; } 100% { transform: translate(-50%, -62%) scale(1.05); opacity: 0; } }
.deck[class*="glow-"] .deck-under, .deck[class*="glow-"] .deck-top { animation: deck-glow .9s ease-out; }
.deck.glow-check { --dg: rgba(22, 201, 100, .7); }
.deck.glow-x { --dg: rgba(255, 45, 61, .7); }
.deck.glow-heart { --dg: rgba(255, 79, 184, .75); }
@keyframes deck-glow { 0% { box-shadow: 0 0 0 0 transparent; } 30% { box-shadow: 0 0 0 4px var(--dg), 0 0 40px 6px var(--dg); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .heart-pop { animation: swipe-fade .8s ease-out forwards; } .heart-pop::before { animation: none; opacity: .6; } .deck .deck-under, .deck .deck-top { animation: none !important; } }
@keyframes swipe-fade { 0% { transform: translate(-50%, -50%); opacity: 0; } 20%, 60% { transform: translate(-50%, -50%); opacity: .6; } 100% { transform: translate(-50%, -50%); opacity: 0; } }
/* ---------- Auto-hiding header on phones (api.js toggles .hdr-hidden while scrolling down) ---------- */
.chat-back, .chat-info, .sheet-close, .sheet-shade, .who-st { display: none; }
@media (max-width: 720px) {
  .site-header { transition: transform .25s ease, box-shadow .25s ease; }
  .site-header.hdr-hidden { transform: translateY(-100%); box-shadow: none; }
  .site-header .container { padding-top: 10px; padding-bottom: 8px; row-gap: 8px; }
  .site-header .search { height: 40px; }
  .main-nav { scrollbar-width: none; margin: 0 -4px; }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { padding: 8px 12px; font-size: 14px; }
  /* Signed in, Log out lives in Binder → Account; the header keeps just the avatar. */
  .hx-signed-in .site-header .header-login { display: none; }
  .hx-signed-in .site-header .avatar-btn { margin-left: auto; }
  @media (prefers-reduced-motion: reduce) { .site-header { transition: none; } }
}

/* ---------- Messages on phones: list screen, then a full-screen chat ---------- */
@media (max-width: 720px) {
  main.three-col:has(.convos) { padding-top: 16px; padding-bottom: 32px; gap: 14px; }
  /* List screen */
  .m-list .chat, .m-list .detail-stack { display: none; }
  .m-list .convos { max-height: none; padding: 8px; }
  .m-list .convos h1 { position: static; margin: 0; padding: 10px 10px 6px; font-size: 24px; }
  .convo { padding: 12px 10px; min-height: 64px; }
  .convo .initials { width: 46px; height: 46px; }
  .pending-strip { padding: 12px; }
  .pt-item { padding: 8px 10px; gap: 6px; }

  /* Chat screen: fills the phone, header and list out of the way */
  html.m-chat-open, html.m-chat-open body { overflow: hidden; }
  .m-chat .convos, .m-chat .pending-strip { display: none; }
  .m-chat .chat { position: fixed; inset: 0; z-index: 40; min-height: 0; height: 100%; height: 100dvh; border-radius: 0; border: 0; box-shadow: none; margin: 0; }
  .m-chat .chat-body { max-height: none; min-height: 0; padding: 14px 12px; gap: 10px; overscroll-behavior: contain; }
  .m-chat .detail-stack { display: none; }

  .chat-head { flex-wrap: nowrap; gap: 8px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); background: var(--white); }
  .chat-back, .chat-info { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); padding: 0; }
  .chat-back .icon { width: 24px; height: 24px; }
  .chat-info { color: var(--blue-dark); }
  .chat-info .icon { width: 24px; height: 24px; }
  .chat-info[hidden] { display: none; }
  .chat-head .initials { width: 36px; height: 36px; font-size: 13px; }
  .chat-head .who { flex: 1 1 auto; }
  .chat-head .who a { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .chat-head .who div { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .chat-head .head-offer { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 999px; flex: none; }
  .chat-head #status { display: none; }
  .who-st { display: inline !important; font-weight: 700; color: var(--blue-dark); }
  /* "New trade" is also under trade details (Start another trade); the header keeps Make an offer. */
  .chat-head .head-offer.is-new-trade { display: none; }
  .m-list .convo[aria-current="true"] { background: transparent; box-shadow: none; border-color: transparent; }
  .trade-tabs { padding: 8px 10px; }

  .msg { max-width: 84%; }
  .bubble { padding: 9px 13px; }
  .day.sys { font-size: 11.5px; max-width: 94%; }
  .offer-card { padding: 12px; gap: 10px; max-width: 100%; }
  .offer-card .sides { flex-direction: column; align-items: stretch; gap: 6px; }
  .offer-card .side-list { flex: none; }
  .offer-card .sides > svg { align-self: center; transform: rotate(90deg); width: 18px; height: 18px; }
  .offer-card .line { font-size: 13px; }
  .offer-card .line b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .offer-actions .btn { flex: 1 1 auto; min-height: 42px; padding: 0 12px; }
  .offer-nudge { margin: 8px 0 2px; padding: 12px; }
  .next-step.in-chat { max-width: 100%; }

  .composer { gap: 8px; padding: 8px 10px; background: var(--white); }
  .composer-note { background: var(--white); padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .composer input[type="text"] { font-size: 16px; height: 44px; border-radius: 22px; padding: 0 16px; }   /* 16px stops iOS zooming in */
  .composer .btn { min-height: 44px !important; border-radius: 22px !important; padding: 0 16px; }
  .composer .icon-btn { border-radius: 999px; }

  /* Trade details: a sheet that slides up over the chat */
  .m-chat.m-details .sheet-shade { display: block; position: fixed; inset: 0; z-index: 41; background: rgba(20, 12, 38, .45); }
  .m-chat.m-details .detail-stack { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 42; max-height: 82vh; max-height: 82dvh; overflow-y: auto; overscroll-behavior: contain; gap: 0; padding: 8px 0 max(16px, env(safe-area-inset-bottom)); background: var(--white); border-radius: 20px 20px 0 0; box-shadow: 0 -12px 40px rgba(20, 12, 38, .25); animation: sheet-up .22s ease-out; }
  .m-chat.m-details .detail-stack > .panel { border: 0; box-shadow: none; border-radius: 0; padding: 14px 18px; }
  .m-chat.m-details .detail-stack > .panel + .panel { border-top: 1px solid var(--line); }
  .m-chat.m-details .sheet-close { display: block; align-self: flex-end; margin: 4px 12px -6px; border: 0; background: none; font: inherit; font-weight: 700; font-size: 15px; color: var(--blue-dark); padding: 8px; }
  .m-chat.m-details .mini-cards .hcard-wrap { max-width: 90px; }
}
@keyframes sheet-up { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .detail-stack { animation: none !important; } }

/* ---------- Small phone polish ---------- */
.owner-row .who a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owner-row .pill { flex: none; }
@media (max-width: 720px) {
  /* Binder tabs: one swipeable row instead of two stacked rows */
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-top: 24px; gap: 0; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; padding: 0 14px; font-size: 15px; }
}

/* The leaving card flashes: muted red (left), green (right), pink (up / heart) */
.card-tint { position: absolute; inset: 0; z-index: 5; border-radius: inherit; pointer-events: none; opacity: 0; animation: card-tint .42s ease-out forwards; }
.card-tint.tint-x { background: rgba(214, 72, 82, .42); }
.card-tint.tint-check { background: rgba(22, 190, 96, .42); }
.card-tint.tint-heart { background: rgba(255, 79, 184, .42); }
@keyframes card-tint { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: .85; } }
@media (prefers-reduced-motion: reduce) { .heart-pop.check-pop, .heart-pop.x-pop { animation: side-fade .8s ease-out forwards; } }
@keyframes side-fade { 0% { transform: translateY(-50%); opacity: 0; } 20%, 60% { transform: translateY(-50%); opacity: .6; } 100% { transform: translateY(-50%); opacity: 0; } }

/* The check and X swing out from the card's edge like a door, settle, then fade */
@keyframes swing-r { 0% { transform: translateY(-50%) rotate(110deg) scale(.5); opacity: 0; } 22% { transform: translateY(-50%) rotate(-14deg) scale(1.05); opacity: .95; } 34% { transform: translateY(-50%) rotate(6deg) scale(1); opacity: .95; } 44% { transform: translateY(-50%) rotate(0) scale(1); opacity: .9; } 100% { transform: translateY(-50%) rotate(0) scale(1.04); opacity: 0; } }
@keyframes swing-l { 0% { transform: translateY(-50%) rotate(-110deg) scale(.5); opacity: 0; } 22% { transform: translateY(-50%) rotate(14deg) scale(1.05); opacity: .5; } 34% { transform: translateY(-50%) rotate(-6deg) scale(1); opacity: .5; } 44% { transform: translateY(-50%) rotate(0) scale(1); opacity: .45; } 100% { transform: translateY(-50%) rotate(0) scale(1.04); opacity: 0; } }
@media (max-width: 720px) { .heart-pop.check-pop { transform-origin: 100% 50%; } .heart-pop.x-pop { transform-origin: 0 50%; } }

/* Swipe: Filters and the card count on top, then the card, the buttons just under it
   (clear of the cards peeking out behind), then the trader box. */
.deck-stage { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.deck-side { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.deck-side .deck-bar { margin-bottom: 0; }
.deck-main { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 22px; min-width: 0; }
.deck-main .swipe-buttons { margin-top: 16px; }

/* Site-wide notices (api.js HX.notices) */
.site-notice { border-bottom: 1px solid var(--line); font-size: 14px; background: var(--blue-tint); color: var(--blue-dark); }
.site-notice .container { display: flex; align-items: center; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
.site-notice p { margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.site-notice .icon { flex: none; width: 20px; height: 20px; }
.site-notice-link { color: inherit; font-weight: 700; text-decoration: underline; white-space: nowrap; }
.site-notice-x { flex: none; width: 32px; height: 32px; border: 0; border-radius: 999px; background: transparent; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.site-notice-x:hover { background: rgba(20, 12, 38, .08); }
.site-notice.lvl-success { background: #E3F8EF; color: #0B6B47; border-color: #BDEBD7; }
.site-notice.lvl-warning { background: #FFF4D6; color: #7A5200; border-color: #F5DE9A; }
.site-notice.lvl-urgent { background: #D92D6B; color: #fff; border-color: #B51F55; }
.notice-pop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(20, 12, 38, .55); }
.notice-pop-card { width: min(460px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 26px 24px 22px; display: flex; flex-direction: column; gap: 12px; text-align: center; align-items: center; border-top: 6px solid var(--blue); }
.notice-pop-card h2 { font-family: var(--display); font-weight: 900; font-size: 22px; margin: 0; }
.notice-pop-card p { margin: 0; color: var(--ink-2, var(--ink)); white-space: pre-wrap; overflow-wrap: anywhere; }
.notice-pop-icon { width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center; background: var(--blue-tint); color: var(--blue-dark); }
.notice-pop-icon .icon { width: 26px; height: 26px; }
.notice-pop-card.lvl-success { border-top-color: #18A36C; } .notice-pop-card.lvl-success .notice-pop-icon { background: #E3F8EF; color: #0B6B47; }
.notice-pop-card.lvl-warning { border-top-color: #E6A700; } .notice-pop-card.lvl-warning .notice-pop-icon { background: #FFF4D6; color: #7A5200; }
.notice-pop-card.lvl-urgent { border-top-color: #D92D6B; } .notice-pop-card.lvl-urgent .notice-pop-icon { background: #FFE4EE; color: #B51F55; }
.notice-pop-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.notice-pop-actions .btn { min-width: 120px; }
html.hx-pop-open { overflow: hidden; }
