/* 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; }

/* ---------- 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; }
.feature { padding: 28px; border-radius: var(--radius); background: var(--bg); display: flex; flex-direction: column; gap: 12px; }
.feature-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--blue); color: var(--white); display: flex; align-items: center; justify-content: center; }
.feature h3, .step h3 { font-weight: 800; font-size: 22px; letter-spacing: -0.01em; }
.feature p, .step p { font-size: 16px; line-height: 1.55; color: var(--muted); }
.step { padding: 28px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.step-num { font-family: var(--display); font-weight: 900; font-size: 48px; color: var(--blue); line-height: 1; }
.cta-band { background: var(--blue); color: var(--white); }
.cta-band .container { padding-top: 64px; padding-bottom: 64px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.cta-band h2 { font-weight: 900; font-size: clamp(28px, 3.6vw, 40px); max-width: 640px; }
.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%; }
.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.35s ease, opacity 0.35s ease; }
.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; }
.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 .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); }
.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; }
.convos h1 { font-weight: 800; font-size: 22px; margin: 4px 6px 10px; }
.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: block; font-size: 15px; }
.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 { order: 2; flex: 1 1 100%; }
  .header-spacer { 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; }
.feature:nth-child(even) .feature-icon { background: var(--pink); color: var(--pink-ink); }
.step-num { background: linear-gradient(100deg, var(--blue) 0%, #7C5CFF 55%, var(--pink) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta-band { background:
    radial-gradient(520px 320px at 92% 130%, rgba(255, 106, 213, 0.5), rgba(255, 106, 213, 0) 62%),
    radial-gradient(420px 320px at 0% -40%, rgba(127, 223, 255, 0.35), rgba(127, 223, 255, 0) 60%),
    var(--blue); }

/* 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; }
.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; }
.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; }
.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; }
.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-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 { 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; }
.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; }
.site-footer .footer-deco { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.site-footer .container { position: relative; }

/* 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; margin-bottom: 12px; }
.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)); }
.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; } }

/* Phones: the swipe buttons sit right under the card; the owner panel follows */
@media (max-width: 720px) {
  .deck-col .swipe-buttons { order: 4; }
  .deck-col .owner-panel { order: 5; }
  .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] { 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; }
