:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --ink: #142033;
  --muted: #677386;
  --line: #e4e8ef;
  --nav: #101827;
  --nav-2: #172237;
  --accent: #e83e57;
  --accent-2: #ff6278;
  --gold: #f5b63d;
  --green: #16a36a;
  --red: #d73a4f;
  --shadow: 0 16px 40px rgba(25, 37, 58, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 26px 18px 20px;
  display: flex; flex-direction: column; background: var(--nav); color: white;
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; color: white; text-decoration: none; padding: 0 8px 28px; }
.brand strong { display: block; font-size: 20px; letter-spacing: -.03em; }
.brand small { display: block; color: #8f9bb1; font-size: 11px; margin-top: 2px; text-transform: uppercase; letter-spacing: .11em; }
.brand-mark {
  width: 42px; aspect-ratio: 1; border-radius: 50%; position: relative; display: grid; place-items: center;
  background: linear-gradient(to bottom, var(--accent) 0 46%, #202b3e 46% 54%, white 54% 100%);
  box-shadow: 0 0 0 3px rgba(255,255,255,.08);
}
.brand-mark::before { content: ""; position: absolute; left: 0; right: 0; height: 4px; background: #202b3e; }
.brand-mark span { width: 13px; aspect-ratio: 1; border-radius: 50%; background: white; border: 4px solid #202b3e; z-index: 1; }
.nav-list { display: grid; gap: 6px; }
.nav-item {
  width: 100%; border: 0; border-radius: 11px; background: transparent; color: #aab4c5;
  display: flex; align-items: center; gap: 12px; padding: 12px 13px; text-align: left; transition: .18s ease;
}
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { color: white; background: var(--nav-2); box-shadow: inset 3px 0 0 var(--accent); }
.nav-item > span:first-child { width: 20px; text-align: center; font-size: 18px; }
.nav-count { margin-left: auto; background: rgba(255,255,255,.1); min-width: 24px; height: 22px; padding: 0 7px; border-radius: 99px; display: grid; place-items: center; font-size: 11px; }
.sidebar-spacer { flex: 1; }
.privacy-note { margin: 18px 6px 0; padding: 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(255,255,255,.035); }
.privacy-note strong { display: block; font-size: 12px; margin-bottom: 5px; }
.privacy-note span { display: block; color: #8e9aaf; font-size: 11px; line-height: 1.5; }

.main-content { min-width: 0; padding: 0 38px; }
.topbar { min-height: 108px; display: flex; align-items: center; gap: 24px; justify-content: space-between; }
.topbar h1 { margin: 2px 0 0; font-size: 29px; letter-spacing: -.04em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.eyebrow { margin: 0; color: #8a95a6; font-size: 10px; letter-spacing: .14em; font-weight: 800; }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 24px; }
.button {
  border: 1px solid transparent; border-radius: 10px; padding: 10px 15px; font-weight: 750; font-size: 13px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { color: white; background: var(--accent); box-shadow: 0 8px 22px rgba(232,62,87,.22); }
.button.primary:hover { background: var(--accent-2); }
.button.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.button.light { background: white; color: var(--ink); }
.button.danger { color: white; background: var(--red); }
.button.ghost.danger { color: var(--red); border-color: #f3c5cc; background: #fff8f9; }
.text-button { border: 0; background: transparent; color: var(--accent); font-weight: 750; }

.view { display: none; animation: viewIn .24s ease; }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.hero-panel {
  min-height: 218px; border-radius: 22px; padding: 34px 38px; color: white; overflow: hidden; position: relative;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 30px;
  background:
    radial-gradient(circle at 88% 18%, rgba(255,255,255,.12) 0 3%, transparent 3.2%),
    radial-gradient(circle at 87% 17%, transparent 0 11%, rgba(255,255,255,.05) 11.2% 11.8%, transparent 12%),
    linear-gradient(120deg, #152137, #222d43 65%, #17243b);
  box-shadow: var(--shadow);
}
.hero-panel::after { content: ""; position: absolute; width: 320px; height: 320px; border: 42px solid rgba(255,255,255,.035); border-radius: 50%; right: -70px; top: -120px; }
.hero-panel > * { position: relative; z-index: 1; }
.hero-panel h2 { max-width: 660px; margin: 14px 0 10px; font-size: clamp(30px, 4vw, 48px); line-height: 1.02; letter-spacing: -.05em; }
.hero-panel p:not(.eyebrow) { margin: 0; max-width: 620px; color: #b8c2d2; font-size: 15px; line-height: 1.65; }
.status-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 750; letter-spacing: .03em; color: #dce3ee; }
.status-chip i { width: 8px; height: 8px; border-radius: 50%; background: #47d895; box-shadow: 0 0 0 5px rgba(71,216,149,.12); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; margin: 18px 0; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: relative; min-width: 0; }
.stat-card p { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 650; }
.stat-card strong { display: block; max-width: calc(100% - 30px); font-size: 25px; letter-spacing: -.035em; }
.stat-card small { display: block; color: #9aa3b1; font-size: 10px; margin-top: 7px; }
.stat-icon { position: absolute; right: 16px; top: 18px; width: 31px; height: 31px; border-radius: 9px; background: #f2f4f8; display: grid; place-items: center; color: #7e899b; font-weight: 800; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr); gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.panel-heading h3 { margin: 4px 0 0; font-size: 18px; letter-spacing: -.025em; }
.empty-state { min-height: 180px; padding: 26px; border: 1px dashed #d9dee8; border-radius: 14px; display: grid; place-items: center; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); margin-bottom: 5px; }
.recent-list { display: grid; gap: 5px; }
.recent-row { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 9px 5px; border-bottom: 1px solid #eef0f4; }
.recent-row:last-child { border-bottom: 0; }
.recent-row img { width: 42px; height: 58px; object-fit: contain; }
.recent-row strong, .mover-row strong { display: block; font-size: 13px; }
.recent-row small, .mover-row small { color: var(--muted); font-size: 10px; }
.recent-value { text-align: right; font-weight: 800; font-size: 13px; }
.movers-list { display: grid; gap: 10px; }
.mover-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; padding: 11px 0; border-bottom: 1px solid #eef0f4; }
.mover-row:last-child { border: 0; }
.change { border-radius: 99px; padding: 5px 8px; font-size: 10px; font-weight: 800; }
.change.up { color: #08764c; background: #e8f8f1; }
.change.down { color: #b32a3d; background: #fdecef; }
.change.flat { color: #6f7887; background: #f1f3f6; }

.search-hero { text-align: center; padding: 38px 20px 24px; }
.search-hero h2 { margin: 6px 0 8px; font-size: clamp(35px, 5vw, 54px); letter-spacing: -.055em; }
.search-hero > p:not(.eyebrow) { max-width: 620px; margin: 0 auto; color: var(--muted); line-height: 1.6; }
.search-box { max-width: 760px; margin: 25px auto 13px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 7px 7px 7px 15px; background: white; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 12px 35px rgba(30,42,64,.08); }
.search-box > span { color: #8b95a4; font-size: 22px; }
.search-box input { width: 100%; border: 0; outline: 0; padding: 11px 5px; color: var(--ink); }
.quick-searches { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; color: #8f99a8; font-size: 11px; }
.quick-searches button { border: 0; background: #e9ecf1; border-radius: 99px; padding: 5px 9px; color: #596476; font-size: 10px; }
.search-status { text-align: center; min-height: 31px; color: var(--muted); font-size: 12px; }
.card-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 17px; padding-bottom: 30px; }
.result-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.result-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.result-image { aspect-ratio: 245 / 337; padding: 14px; display: grid; place-items: center; background: linear-gradient(145deg,#f4f6f9,#e9edf3); }
.result-image img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(30,40,56,.12)); }
.result-body { padding: 13px; }
.result-body h3 { margin: 0 0 5px; font-size: 14px; line-height: 1.25; }
.result-body p { margin: 0 0 12px; color: var(--muted); font-size: 10px; min-height: 26px; }
.result-body .button { width: 100%; }
.skeleton { min-height: 340px; border-radius: 16px; background: linear-gradient(90deg,#edf0f4,#f7f8fa,#edf0f4); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.collection-toolbar { display: flex; align-items: center; gap: 10px; padding: 13px; margin-bottom: 14px; }
.filter-field { min-width: 220px; flex: 1; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; }
.filter-field input { width: 100%; border: 0; outline: 0; padding: 10px 2px; }
.collection-toolbar select { border: 1px solid var(--line); border-radius: 10px; background: white; padding: 10px 32px 10px 11px; }
.collection-summary { display: flex; justify-content: space-between; gap: 10px; margin: 0 4px 12px; color: var(--muted); font-size: 11px; }
.collection-list { display: grid; gap: 10px; }
.collection-row { display: grid; grid-template-columns: 64px minmax(170px,1.2fr) minmax(150px,.8fr) minmax(120px,.7fr) minmax(120px,.7fr) auto; gap: 16px; align-items: center; padding: 13px 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.collection-row img { width: 55px; height: 76px; object-fit: contain; }
.collection-name strong { display: block; font-size: 14px; margin-bottom: 4px; }
.collection-name small, .collection-detail small { color: var(--muted); font-size: 10px; }
.collection-detail span { display: block; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.value-cell { text-align: right; }
.value-cell strong { display: block; font-size: 15px; }
.value-cell small { color: var(--muted); font-size: 9px; }
.sparkline { width: 90px; height: 30px; overflow: visible; }
.row-actions { display: flex; gap: 5px; }
.icon-button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: white; color: #687386; }

.site-footer { display: flex; justify-content: space-between; gap: 30px; padding: 30px 2px 35px; color: #969fad; font-size: 9px; line-height: 1.5; }

.modal { width: min(720px, calc(100% - 24px)); max-height: calc(100vh - 30px); border: 0; border-radius: 22px; padding: 0; color: var(--ink); box-shadow: 0 28px 90px rgba(15,24,39,.28); }
.modal::backdrop { background: rgba(8,14,24,.65); backdrop-filter: blur(4px); }
.modal-frame { position: relative; padding: 27px; }
.modal-close { position: absolute; right: 18px; top: 15px; border: 0; background: transparent; color: #788394; font-size: 28px; z-index: 2; }
.modal-card-preview { display: grid; grid-template-columns: 140px minmax(0,1fr); gap: 23px; align-items: center; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.modal-image-wrap { min-height: 190px; display: grid; place-items: center; border-radius: 14px; padding: 10px; background: var(--surface-2); }
.modal-image-wrap img { max-height: 195px; filter: drop-shadow(0 12px 15px rgba(26,35,49,.15)); }
.modal-card-preview h2 { margin: 6px 0 7px; font-size: 27px; letter-spacing: -.04em; }
.modal-meta { color: var(--muted); font-size: 12px; }
.price-badge { display: inline-flex; margin-top: 8px; border-radius: 99px; padding: 7px 10px; background: #edf7f2; color: #13754f; font-size: 10px; font-weight: 800; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field > span { font-size: 11px; font-weight: 800; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #dfe3ea; border-radius: 9px; background: white; padding: 10px 11px; outline: none; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #aeb7c6; box-shadow: 0 0 0 3px rgba(81,97,121,.08); }
.field small { color: var(--muted); font-size: 9px; }
.estimate-strip { margin-top: 17px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 15px; padding: 14px 16px; border-radius: 12px; background: #f4f6f9; }
.estimate-strip span { font-size: 11px; font-weight: 750; }
.estimate-strip strong { font-size: 19px; }
.estimate-strip small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; }
.modal-actions { display: flex; align-items: center; gap: 9px; margin-top: 22px; }
.action-spacer { flex: 1; }
.small-modal { width: min(520px, calc(100% - 24px)); }
.settings-intro { color: var(--muted); font-size: 12px; line-height: 1.6; }
.settings-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.settings-section h3 { margin: 0 0 10px; font-size: 14px; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.file-button { display: inline-block; }
.file-button input { position: absolute; opacity: 0; pointer-events: none; }
.danger-zone { border-color: #f1d5d9; }

.toast-region { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 100; }
.toast { min-width: 250px; max-width: 360px; padding: 13px 15px; color: white; background: #172237; border-radius: 11px; box-shadow: var(--shadow); font-size: 12px; animation: toastIn .2s ease; }
.toast.error { background: #a92f40; }
.toast.success { background: #11744e; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .collection-row { grid-template-columns: 58px minmax(160px,1fr) minmax(110px,.7fr) minmax(110px,.7fr) auto; }
  .collection-row .spark-cell { display: none; }
}

@media (max-width: 780px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: -270px; width: 250px; transition: left .22s ease; box-shadow: 15px 0 50px rgba(0,0,0,.18); }
  .sidebar.open { left: 0; }
  .main-content { padding: 0 16px; }
  .mobile-menu { display: block; }
  .topbar { min-height: 90px; }
  .topbar-actions .ghost { display: none; }
  .hero-panel { align-items: flex-start; flex-direction: column; padding: 27px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .collection-toolbar { flex-wrap: wrap; }
  .filter-field { flex-basis: 100%; }
  .collection-toolbar select { flex: 1; }
  .collection-row { grid-template-columns: 52px minmax(0,1fr) auto; gap: 11px; }
  .collection-row .collection-detail, .collection-row .spark-cell { display: none; }
  .modal-card-preview { grid-template-columns: 95px minmax(0,1fr); }
  .modal-image-wrap { min-height: 135px; }
  .modal-card-preview h2 { font-size: 21px; }
  .site-footer { flex-direction: column; gap: 7px; }
}

@media (max-width: 520px) {
  .topbar h1 { font-size: 23px; }
  .topbar-actions .button { padding: 9px 11px; }
  .hero-panel h2 { font-size: 35px; }
  .stats-grid { grid-template-columns: 1fr; }
  .search-box { grid-template-columns: auto minmax(0,1fr); }
  .search-box .button { grid-column: 1 / -1; }
  .card-results { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .result-body { padding: 10px; }
  .modal-frame { padding: 22px 17px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .modal-card-preview { grid-template-columns: 80px minmax(0,1fr); gap: 14px; }
  .modal-image-wrap { min-height: 110px; padding: 6px; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions .action-spacer { display: none; }
  .modal-actions .button { flex: 1; }
}

/* BinderWorth 2.0 brand and scanner */
:root {
  --nav: #0d1326;
  --nav-2: #171f38;
  --accent: #6d4aff;
  --accent-2: #8b5cf6;
  --accent-soft: #efeaff;
  --purple-3: #a78bfa;
  --warning: #facc15;
}
.brand { display: grid; gap: 7px; padding: 0 7px 28px; }
.brand img { width: 205px; max-width: 100%; }
.brand small { margin-left: 1px; font-size: 8px; letter-spacing: .12em; color: #8791aa; }
.nav-item.active { background: linear-gradient(90deg, rgba(109,74,255,.28), rgba(109,74,255,.06)); box-shadow: inset 3px 0 0 var(--accent-2); }
.nav-item em { margin-left: auto; padding: 3px 6px; border-radius: 99px; font-style: normal; font-size: 8px; font-weight: 900; color: #fff; background: var(--accent); }
.button.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 8px 22px rgba(109,74,255,.25); }
.button.primary:hover { background: linear-gradient(135deg, #7959ff, #9a70ff); }
.text-button { color: var(--accent); }
.global-estimate-banner { margin: -2px 0 18px; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid #eadca0; border-radius: 12px; background: #fffbea; color: #5a4a08; font-size: 11px; }
.global-estimate-banner span { color: #796a2d; }
.global-estimate-banner button, .site-footer button { margin-left: auto; border: 0; background: transparent; color: var(--accent); font-size: inherit; font-weight: 800; text-decoration: underline; }
.branded-hero { min-height: 250px; align-items: center; background: radial-gradient(circle at 83% 20%, rgba(139,92,246,.35), transparent 25%), radial-gradient(circle at 92% 75%, rgba(109,74,255,.22), transparent 32%), linear-gradient(120deg, #0d1326, #151e38 58%, #2d1e62); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-secondary { color: #fff; border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.07); }
.hero-card-stack { position: relative; width: 190px; height: 160px; flex: 0 0 190px; }
.hero-card-stack span { position: absolute; width: 94px; height: 132px; border-radius: 12px; border: 2px solid rgba(255,255,255,.7); background: linear-gradient(160deg, #6d4aff, #171f38 66%); box-shadow: 0 20px 40px rgba(0,0,0,.28); }
.hero-card-stack span:nth-child(1) { right: 55px; top: 15px; transform: rotate(-14deg); opacity: .55; }
.hero-card-stack span:nth-child(2) { right: 26px; top: 8px; transform: rotate(9deg); opacity: .75; }
.hero-card-stack span:nth-child(3) { right: 42px; top: 13px; display: grid; place-items: center; font-size: 33px; font-weight: 900; color: #fff; background: linear-gradient(145deg, #8b5cf6, #2c1b65 65%, #0d1326); }
.hero-card-stack span:nth-child(3)::after { content: "✦"; position: absolute; right: 7px; top: 5px; color: var(--warning); font-size: 17px; }

.scan-hero { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(260px,.65fr); gap: 28px; align-items: end; padding: 30px 2px 18px; }
.scan-hero h2 { margin: 7px 0 10px; font-size: clamp(36px,5vw,58px); letter-spacing: -.06em; line-height: .98; }
.scan-hero p { margin: 0; max-width: 720px; color: var(--muted); line-height: 1.65; }
.ai-chip { display: inline-flex; padding: 6px 9px; border-radius: 99px; color: #5b35dc; background: var(--accent-soft); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.scan-rules { display: grid; gap: 6px; padding: 18px; border-radius: 16px; color: #c7cfe0; background: var(--nav); font-size: 11px; }
.scan-rules strong { color: #fff; margin-bottom: 3px; }
.scan-rules span::before { content: "✓"; margin-right: 7px; color: #40d58f; font-weight: 900; }
.scan-warning { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 12px; align-items: start; margin-bottom: 18px; padding: 14px 16px; border: 1px solid #eadca0; border-radius: 14px; background: #fffbea; color: #594b0d; }
.scan-warning > span { width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; background: #facc15; color: #3d3200; font-weight: 950; }
.scan-warning strong { font-size: 12px; }
.scan-warning p { margin: 4px 0 0; color: #75682b; font-size: 11px; line-height: 1.55; }
.scan-grid { display: grid; grid-template-columns: minmax(360px,.95fr) minmax(420px,1.2fr); gap: 18px; padding-bottom: 26px; }
.capture-panel, .scan-result-panel { min-width: 0; }
.service-pill { padding: 5px 8px; border-radius: 99px; background: #eff2f7; color: #657187; font-size: 9px; font-weight: 850; }
.service-pill.ready { background: #e7f8f0; color: #08764c; }
.service-pill.offline { background: #fff2d6; color: #855f00; }
.capture-stage { position: relative; min-height: 500px; overflow: hidden; display: grid; place-items: center; border-radius: 18px; background: radial-gradient(circle at 50% 40%, #26304b, #0b1020 68%); }
.capture-stage video, .capture-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: none; background: #090d18; }
.capture-stage.camera-active video, .capture-stage.preview-active > img { display: block; }
.capture-stage.camera-active .scan-placeholder, .capture-stage.preview-active .scan-placeholder { display: none; }
.scan-placeholder { max-width: 240px; padding: 25px; text-align: center; color: #98a4ba; }
.scan-placeholder strong, .scan-placeholder span { display: block; }
.scan-placeholder strong { margin: 12px 0 6px; color: #fff; }
.scan-placeholder span { font-size: 11px; line-height: 1.5; }
.camera-symbol { margin: auto; width: 64px; height: 64px; border-radius: 19px; display: grid; place-items: center; color: #fff; font-size: 31px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 18px 40px rgba(109,74,255,.28); }
.card-guide { pointer-events: none; position: absolute; width: min(70%, 310px); aspect-ratio: 2.5 / 3.5; border: 2px solid rgba(255,255,255,.7); border-radius: 16px; box-shadow: 0 0 0 999px rgba(4,8,16,.25); display: none; }
.capture-stage.camera-active .card-guide { display: block; }
.card-guide::before, .card-guide::after { content: ""; position: absolute; inset: -2px; border-radius: 16px; background: linear-gradient(var(--accent-2),var(--accent-2)) left top/38px 4px no-repeat, linear-gradient(var(--accent-2),var(--accent-2)) left top/4px 38px no-repeat, linear-gradient(var(--accent-2),var(--accent-2)) right top/38px 4px no-repeat, linear-gradient(var(--accent-2),var(--accent-2)) right top/4px 38px no-repeat, linear-gradient(var(--accent-2),var(--accent-2)) left bottom/38px 4px no-repeat, linear-gradient(var(--accent-2),var(--accent-2)) left bottom/4px 38px no-repeat, linear-gradient(var(--accent-2),var(--accent-2)) right bottom/38px 4px no-repeat, linear-gradient(var(--accent-2),var(--accent-2)) right bottom/4px 38px no-repeat; }
.card-guide span { position: absolute; left: 50%; bottom: -38px; transform: translateX(-50%); width: max-content; padding: 6px 9px; border-radius: 99px; color: #fff; background: rgba(6,10,20,.8); font-size: 9px; }
.scan-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.scan-identify { margin-left: auto; color: #fff; background: linear-gradient(135deg, #2ac582, #0d9d67); box-shadow: 0 8px 22px rgba(13,157,103,.18); }
.scan-privacy { margin: 13px 2px 0; color: #8a94a5; font-size: 9px; line-height: 1.5; }
.scan-status { min-height: 350px; display: grid; place-content: center; text-align: center; color: var(--muted); }
.scan-status strong, .scan-status span { display: block; }
.scan-status strong { margin: 12px 0 6px; color: var(--ink); }
.scan-status span { max-width: 300px; font-size: 11px; line-height: 1.55; }
.scan-status-icon { margin: auto; width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); font-size: 28px; }
.scan-status.loading .scan-status-icon { animation: scanPulse 1.15s infinite; }
@keyframes scanPulse { 50% { transform: scale(1.08); box-shadow: 0 0 0 12px rgba(109,74,255,.08); } }
.scan-readout { margin-bottom: 14px; padding: 13px 14px; border-radius: 13px; background: #f5f2ff; border: 1px solid #e5dcff; }
.scan-readout-head { display: flex; justify-content: space-between; gap: 12px; }
.scan-readout h4 { margin: 0 0 4px; font-size: 16px; }
.scan-readout p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.confidence { flex: 0 0 auto; height: fit-content; padding: 5px 8px; border-radius: 99px; color: #4f2bc4; background: #e7ddff; font-size: 9px; font-weight: 900; }
.scan-evidence { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.scan-evidence span { padding: 4px 7px; border-radius: 99px; background: white; border: 1px solid #e6e1f4; color: #6f6485; font-size: 8px; }
.scan-candidates { display: grid; gap: 10px; }
.scan-candidate { display: grid; grid-template-columns: 74px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.scan-candidate.best { border-color: #bcaaff; box-shadow: 0 10px 28px rgba(109,74,255,.09); }
.scan-candidate img { width: 67px; height: 92px; object-fit: contain; }
.scan-candidate h4 { margin: 0 0 4px; font-size: 13px; }
.scan-candidate p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.candidate-estimate { margin-top: 6px; font-size: 12px; font-weight: 850; }
.candidate-estimate small { margin-left: 5px; color: var(--muted); font-size: 8px; font-weight: 650; }
.match-badge { display: inline-block; margin-bottom: 6px; padding: 3px 6px; border-radius: 99px; color: #4f2bc4; background: #eee8ff; font-size: 8px; font-weight: 900; }
.scan-candidate-actions { display: grid; gap: 7px; justify-items: end; }
.scan-candidate-actions .button { white-space: nowrap; }
.scan-no-match { padding: 18px; border: 1px dashed #d8ddea; border-radius: 14px; text-align: center; color: var(--muted); font-size: 11px; line-height: 1.55; }
.search-scan-cta { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 20px; color: #98a1af; font-size: 10px; }
.modal-estimate-warning { margin-top: 10px; padding: 12px 14px; border: 1px solid #eadca0; border-radius: 12px; background: #fffbea; }
.modal-estimate-warning strong, .modal-estimate-warning span { display: block; }
.modal-estimate-warning strong { color: #5a4a08; font-size: 11px; }
.modal-estimate-warning span { margin-top: 4px; color: #77692c; font-size: 9px; line-height: 1.45; }
.estimate-ack { margin-top: 13px; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 8px; align-items: start; color: #5f6878; font-size: 10px; line-height: 1.45; }
.estimate-ack input { margin-top: 2px; accent-color: var(--accent); }
.terms-modal { width: min(690px, calc(100% - 24px)); }
.terms-highlight { margin: 18px 0; padding: 15px 16px; border-radius: 13px; color: #fff; background: linear-gradient(135deg, #33206e, #6d4aff); line-height: 1.5; }
.terms-copy { max-height: 58vh; overflow: auto; padding-right: 8px; }
.terms-copy h3 { margin: 18px 0 5px; font-size: 13px; }
.terms-copy p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.legal-review-note { margin-top: 18px !important; padding: 11px; border-radius: 10px; background: #f2f4f8; font-weight: 700; }
.site-footer strong { color: #737d8e; }
.site-footer button { margin-left: 4px; }

@media (max-width: 1100px) {
  .scan-grid { grid-template-columns: 1fr; }
  .capture-stage { min-height: 560px; }
}
@media (max-width: 780px) {
  .global-estimate-banner { align-items: flex-start; flex-wrap: wrap; }
  .global-estimate-banner button { margin-left: 0; }
  .hero-card-stack { display: none; }
  .scan-hero { grid-template-columns: 1fr; }
  .capture-stage { min-height: 500px; }
  .scan-candidate { grid-template-columns: 66px minmax(0,1fr); }
  .scan-candidate-actions { grid-column: 1 / -1; grid-template-columns: 1fr; justify-items: stretch; }
  .scan-candidate-actions .button { width: 100%; }
}
@media (max-width: 520px) {
  .scan-hero h2 { font-size: 39px; }
  .capture-stage { min-height: 430px; }
  .scan-actions .button, .scan-actions .file-button { flex: 1 1 calc(50% - 5px); text-align: center; }
  .scan-identify { margin-left: 0; flex-basis: 100% !important; }
  .global-estimate-banner { font-size: 10px; }
  .search-scan-cta { flex-direction: column; }
}

/* Monetisation-ready components */
.ad-slot { margin: 18px 0; min-height: 92px; display: grid; place-content: center; gap: 4px; text-align: center; border: 1px dashed #cfd5e1; border-radius: 16px; background: linear-gradient(135deg, #fbfcfe, #f3f5f9); color: #8993a4; }
.ad-slot span { font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.ad-slot strong { color: #667185; font-size: 12px; }
.ad-slot small { font-size: 9px; }
.collector-tools { margin: 18px 0 0; }
.affiliate-label { padding: 5px 8px; border-radius: 99px; background: #fff4d7; color: #7b5a00; font-size: 8px; font-weight: 900; }
.tool-links { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.tool-links a { min-height: 105px; display: flex; flex-direction: column; justify-content: end; gap: 5px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; background: radial-gradient(circle at 85% 18%, rgba(139,92,246,.16), transparent 28%), linear-gradient(145deg,#fff,#f6f3ff); transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.tool-links a:hover { transform: translateY(-3px); border-color: #c6b8ff; box-shadow: 0 12px 24px rgba(69,49,133,.09); }
.tool-links strong { font-size: 13px; }
.tool-links span { color: var(--accent); font-size: 9px; font-weight: 800; }
.affiliate-smallprint { margin: 12px 0 0; color: #8d96a5; font-size: 8px; line-height: 1.5; }
.shop-card-panel { margin-top: 14px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid #ded7ff; border-radius: 13px; background: #f7f4ff; }
.shop-card-panel strong, .shop-card-panel small { display: block; }
.shop-card-panel strong { margin: 3px 0 4px; font-size: 12px; }
.shop-card-panel small { max-width: 420px; color: #7d7590; font-size: 9px; line-height: 1.45; }
.affiliate-button { color: #fff; background: linear-gradient(135deg,#4726b6,#6d4aff); white-space: nowrap; text-decoration: none; }

@media (max-width: 900px) {
  .tool-links { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .tool-links { grid-template-columns: 1fr; }
  .shop-card-panel { grid-template-columns: 1fr; }
  .affiliate-button { width: 100%; text-align: center; }
}


/* OCR accuracy upgrade */
.capture-stage.preview-active { min-height: 560px; }
.capture-stage.preview-active > img { object-fit: contain; padding: 18px; }
.capture-stage.preview-active .card-guide { display: none; }
.capture-stage.preview-active::after { content: 'Everything visible is scanned · safety border added automatically'; position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 28px); padding: 6px 9px; border-radius: 99px; color: #fff; background: rgba(6,10,20,.82); font-size: 9px; font-weight: 750; text-align: center; pointer-events: none; }
.capture-stage.preview-active > img { outline: 2px solid rgba(139,92,246,.55); outline-offset: -18px; }
.crop-tools { margin-top: 14px; padding: 14px; border: 1px solid #ded8f4; border-radius: 14px; background: #f8f6ff; }
.crop-tools-head { display: flex; justify-content: space-between; gap: 14px; align-items: start; }
.crop-tools-head strong, .crop-tools-head span { display: block; }
.crop-tools-head strong { font-size: 12px; }
.crop-tools-head span { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.crop-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.crop-presets .button { padding: 8px 11px; font-size: 10px; }
.crop-control-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 16px; margin-top: 13px; }
.crop-control-grid label span { display: block; margin-bottom: 5px; color: #625b75; font-size: 9px; font-weight: 800; }
.crop-control-grid input[type="range"] { width: 100%; accent-color: var(--accent); }
.crop-tip { margin: 10px 0 0; color: #837b96; font-size: 8px; line-height: 1.5; }
.scan-correction { margin-top: 12px; padding-top: 12px; border-top: 1px solid #ded7f5; }
.scan-correction-title { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 8px; }
.scan-correction-title strong { font-size: 10px; }
.scan-correction-title span { color: var(--muted); font-size: 8px; }
.scan-correction-grid { display: grid; grid-template-columns: 2fr repeat(3,1fr); gap: 8px; }
.scan-correction-grid label span { display: block; margin-bottom: 4px; color: #746d84; font-size: 8px; font-weight: 800; }
.scan-correction-grid input, .scan-correction-grid select { width: 100%; min-height: 34px; padding: 7px 8px; border: 1px solid #d8d2e7; border-radius: 9px; background: #fff; font: inherit; font-size: 10px; }
.scan-correction-actions { display: flex; justify-content: flex-end; margin-top: 9px; }
.match-badge.strong { color: #075c3b; background: #dcf8eb; }
.match-badge.likely { color: #3f2a9b; background: #ece7ff; }
.match-badge.possible { color: #765300; background: #fff0c7; }
.match-badge.weak { color: #8d2d2d; background: #ffe3e3; }
.match-reasons { margin-top: 5px !important; color: #746d84 !important; }
.visual-match-note { margin-left: 5px; color: #6d4aff; font-weight: 800; }
.ocr-quality { flex: 0 0 auto; height: fit-content; padding: 5px 8px; border-radius: 99px; font-size: 9px; font-weight: 900; }
.ocr-quality.good { color: #075c3b; background: #dcf8eb; }
.ocr-quality.partial { color: #765300; background: #fff0c7; }
.ocr-quality.weak { color: #8d2d2d; background: #ffe3e3; }
@media (max-width: 620px) {
  .crop-control-grid, .scan-correction-grid { grid-template-columns: 1fr; }
  .capture-stage.preview-active { min-height: 480px; }
}

.capture-stage.camera-active video { object-fit: cover; }


/* BinderWorth 2.4: draggable upload crop and image-first comparison */
.capture-stage.preview-active {
  cursor: grab;
  touch-action: none;
  user-select: none;
  overflow: hidden;
}
.capture-stage.preview-active.is-dragging { cursor: grabbing; }
.capture-stage.preview-active > img { pointer-events: none; }
.capture-stage.preview-active::before {
  content: 'Drag photo to reposition';
  position: absolute;
  z-index: 4;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(6,10,20,.78);
  font-size: 9px;
  font-weight: 800;
  pointer-events: none;
}
.visual-match-note { text-transform: none; }

/* BinderWorth 2.6 — privacy-light scan feedback */
.scan-feedback-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid #d8ceff;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8f5ff, #ffffff);
}
.scan-feedback-copy { display: grid; gap: 5px; max-width: 660px; }
.scan-feedback-copy strong { color: var(--ink); font-size: 14px; }
.scan-feedback-copy p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.scan-feedback-copy small { color: #6a6283; font-size: 10px; }
.feedback-toggle, .settings-toggle { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.feedback-toggle { margin-top: 3px; font-size: 11px; font-weight: 700; color: #3d2c76; }
.feedback-toggle input, .settings-toggle input { width: 17px; height: 17px; margin: 0; accent-color: var(--purple); flex: 0 0 auto; }
.settings-toggle span { display: grid; gap: 4px; }
.settings-toggle strong { font-size: 13px; }
.settings-toggle small { color: var(--muted); font-size: 10px; line-height: 1.5; font-weight: 400; }
.feedback-settings { border-color: #d8ceff; background: #faf8ff; }

@media (max-width: 720px) {
  .scan-feedback-panel { align-items: stretch; flex-direction: column; }
  .scan-feedback-panel .button { width: 100%; }
}

/* BinderWorth 2.8 — user-friendly navigation and progressive disclosure */
:root {
  --content-max: 1380px;
  --touch: 46px;
  --soft-purple: #f5f2ff;
}

body { background: #f5f6f9; }
.main-content { width: 100%; max-width: calc(var(--content-max) + 76px); margin: 0 auto; }
.button, .nav-item, .icon-button { min-height: var(--touch); }
.button:focus-visible, .nav-item:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(109,74,255,.28); outline-offset: 2px;
}
.sidebar { width: 230px; padding-inline: 16px; }
.app-shell { grid-template-columns: 230px minmax(0,1fr); }
.brand { padding-bottom: 22px; }
.nav-item { font-weight: 700; }
.topbar { min-height: 92px; }
.topbar h1 { font-size: 26px; }

.global-estimate-banner {
  margin: 0 0 16px; padding: 9px 12px; border-color: #e5e0c8; background: #fffdf5;
  color: #60551d; border-radius: 12px;
}
.global-estimate-banner .estimate-icon {
  width: 23px; height: 23px; flex: 0 0 23px; display: grid; place-items: center; border-radius: 50%;
  background: #f5df7b; color: #443b0c; font-weight: 900;
}
.global-estimate-banner div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.global-estimate-banner div span { color: #817541; }

.branded-hero { min-height: 210px; padding: 30px 34px; }
.branded-hero h2 { font-size: clamp(34px,4vw,48px); }
.hero-primary { min-width: 150px; }
.home-actions { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 16px 0; }
.home-actions button {
  min-height: 82px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 11px;
  padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); text-align: left;
  box-shadow: 0 8px 24px rgba(22,30,52,.04); transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.home-actions button:hover { transform: translateY(-2px); border-color: #cfc3ff; box-shadow: 0 12px 28px rgba(53,37,112,.08); }
.home-actions button > span:nth-child(2) { min-width: 0; }
.home-actions strong, .home-actions small { display: block; }
.home-actions strong { font-size: 13px; }
.home-actions small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.home-actions b { color: var(--accent); font-size: 23px; }
.home-action-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--soft-purple); color: var(--accent); font-size: 20px; }

.stats-grid { margin-top: 14px; }
.stat-card { padding: 18px; }
.ad-slot.hidden { display: none !important; }
.collector-tools { margin-top: 16px; }

.scan-intro { margin: 4px 0 12px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 25px; padding: 22px 24px; }
.scan-intro h2 { margin: 7px 0 5px; font-size: clamp(28px,4vw,42px); letter-spacing: -.045em; }
.scan-intro p { margin: 0; color: var(--muted); line-height: 1.55; }
.scan-stepper { display: flex; align-items: center; gap: 8px; color: #8791a1; font-size: 9px; font-weight: 800; white-space: nowrap; }
.scan-stepper span { display: flex; align-items: center; gap: 5px; }
.scan-stepper b { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #edf0f5; color: #6d7788; }
.scan-stepper .active { color: #4c30b5; }
.scan-stepper .active b { color: #fff; background: var(--accent); }
.scan-stepper i { width: 22px; height: 1px; background: #dce0e8; }
.scan-help { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.scan-help summary { padding: 12px 15px; cursor: pointer; color: #4e596b; font-size: 11px; font-weight: 800; }
.scan-help .scan-rules { margin: 0 12px 12px; padding: 13px 15px; grid-template-columns: repeat(2,minmax(0,1fr)); background: #f5f7fa; color: #5f6a7c; }
.scan-help .scan-rules strong { color: var(--ink); }
.scan-warning.compact { margin-bottom: 12px; padding: 10px 12px; grid-template-columns: 27px minmax(0,1fr); }
.scan-warning.compact > span { width: 25px; height: 25px; }
.scan-warning.compact p { margin-top: 2px; }
.scan-grid { align-items: start; }
.capture-panel, .scan-result-panel { padding: 18px; }
.capture-stage { min-height: 470px; }
.scan-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.scan-actions .button, .scan-actions .file-button { width: 100%; display: grid; place-items: center; text-align: center; }
.scan-actions .scan-identify { grid-column: 1 / -1; margin: 0; min-height: 52px; font-size: 14px; }
.crop-tools { margin-top: 12px; padding: 0; overflow: hidden; }
.crop-tools > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 13px 14px; cursor: pointer; }
.crop-tools > summary::-webkit-details-marker { display: none; }
.crop-tools > summary span strong, .crop-tools > summary span small { display: block; }
.crop-tools > summary span strong { font-size: 12px; }
.crop-tools > summary span small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.crop-tools > summary b { color: var(--accent); transition: transform .2s ease; }
.crop-tools[open] > summary b { transform: rotate(180deg); }
.crop-tools-body { padding: 0 14px 14px; }
.scan-privacy { margin-top: 10px; color: #7e8898; font-size: 9px; }
.scan-privacy summary { cursor: pointer; font-weight: 800; }
.scan-privacy p { margin: 7px 0 0; line-height: 1.5; }
.scan-result-panel { min-height: 360px; }

.search-hero { padding-top: 20px; }
.search-hero h2 { font-size: clamp(30px,5vw,46px); }
.collection-toolbar { position: sticky; top: 8px; z-index: 10; box-shadow: 0 10px 28px rgba(22,30,52,.06); }

.mobile-bottom-nav { display: none; }

@media (max-width: 1100px) {
  .home-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .scan-intro { grid-template-columns: 1fr; }
  .scan-stepper { justify-content: flex-start; }
}

@media (max-width: 780px) {
  body { padding-bottom: 78px; }
  .app-shell { display: block; }
  .main-content { padding: 0 13px; }
  .sidebar { width: min(84vw,300px); left: -320px; }
  .topbar { position: sticky; top: 0; z-index: 20; min-height: 68px; margin-inline: -13px; padding-inline: 13px; background: rgba(245,246,249,.92); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(221,225,233,.8); }
  .topbar .eyebrow { display: none; }
  .topbar h1 { font-size: 21px; }
  .topbar-actions { display: none; }
  .mobile-menu { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
  .global-estimate-banner { margin-top: 10px; font-size: 9px; }
  .global-estimate-banner div { display: grid; gap: 1px; }
  .global-estimate-banner button { margin-left: auto; }
  .branded-hero { min-height: 190px; padding: 24px; border-radius: 18px; }
  .branded-hero h2 { margin-top: 12px; font-size: 34px; }
  .branded-hero p:not(.eyebrow) { font-size: 13px; }
  .home-actions { grid-template-columns: 1fr 1fr; gap: 9px; }
  .home-actions button { min-height: 76px; grid-template-columns: 36px minmax(0,1fr); padding: 12px; }
  .home-actions button b { display: none; }
  .home-action-icon { width: 36px; height: 36px; border-radius: 11px; font-size: 17px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { min-height: 118px; padding: 15px; }
  .stat-card strong { font-size: 20px; }
  .dashboard-grid { gap: 12px; }
  .panel { border-radius: 15px; }
  .collector-tools { display: none; }
  .site-footer { padding-bottom: 15px; }

  .scan-intro { padding: 18px; }
  .scan-stepper { width: 100%; justify-content: space-between; gap: 4px; }
  .scan-stepper span { display: grid; justify-items: center; gap: 3px; font-size: 8px; }
  .scan-stepper i { flex: 1; }
  .scan-help .scan-rules { grid-template-columns: 1fr; }
  .scan-grid { gap: 12px; }
  .capture-panel, .scan-result-panel { padding: 13px; }
  .capture-stage, .capture-stage.preview-active { min-height: min(62vh,520px); }
  .scan-result-panel { min-height: 220px; }
  .scan-status { min-height: 210px; }
  .crop-control-grid { grid-template-columns: 1fr; }

  .collection-toolbar { top: 74px; padding: 10px; }
  .collection-toolbar .button { flex: 1; }
  .collection-row { grid-template-columns: 58px minmax(0,1fr) auto; padding: 12px; }
  .collection-name small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .value-cell strong { font-size: 14px; }

  .modal { width: 100%; max-height: 92vh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .modal-frame { max-height: 92vh; overflow: auto; padding-bottom: 100px; }
  .modal-actions { position: sticky; bottom: -100px; margin: 18px -17px -100px; padding: 12px 17px calc(12px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); z-index: 5; }
  .modal-actions .button.primary { min-height: 48px; }

  .mobile-bottom-nav {
    position: fixed; z-index: 60; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom));
    height: 62px; display: grid; grid-template-columns: repeat(4,1fr); padding: 5px; border: 1px solid rgba(222,225,234,.95);
    border-radius: 18px; background: rgba(255,255,255,.94); backdrop-filter: blur(18px); box-shadow: 0 14px 42px rgba(12,18,35,.18);
  }
  .mobile-bottom-nav .mobile-tab {
    min-height: 50px; display: grid; place-items: center; align-content: center; gap: 2px; padding: 4px; border-radius: 13px; color: #778195; background: transparent; box-shadow: none;
  }
  .mobile-bottom-nav .mobile-tab > span:first-child { width: auto; font-size: 19px; }
  .mobile-bottom-nav .mobile-tab small { font-size: 9px; font-weight: 800; }
  .mobile-bottom-nav .mobile-tab.active { color: #fff; background: linear-gradient(135deg,var(--accent),var(--accent-2)); box-shadow: 0 8px 18px rgba(109,74,255,.25); }
  .toast-region { left: 12px; right: 12px; bottom: 82px; }
  .toast { width: 100%; min-width: 0; }
}

@media (max-width: 430px) {
  .home-actions { grid-template-columns: 1fr; }
  .home-actions button { min-height: 68px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { min-height: 108px; }
  .stat-card p { font-size: 10px; }
  .stat-card small { font-size: 8px; }
  .scan-actions { grid-template-columns: 1fr; }
  .scan-actions .scan-identify { grid-column: auto; }
  .capture-stage, .capture-stage.preview-active { min-height: 430px; }
  .card-results { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* BinderWorth 2.9 — set grouping, progress and missing-card checklist */
.sets-hero { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:24px 26px; margin-bottom:16px; }
.sets-hero h2 { margin:5px 0 7px; font-size:30px; letter-spacing:-.04em; }
.sets-hero p:not(.eyebrow) { margin:0; max-width:700px; color:var(--muted); line-height:1.55; font-size:13px; }
.set-stats-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
.set-stats-grid article { min-width:0; padding:17px 18px; border:1px solid var(--line); border-radius:15px; background:var(--surface); }
.set-stats-grid span,.set-stats-grid small { display:block; color:var(--muted); }
.set-stats-grid span { font-size:10px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.set-stats-grid strong { display:block; margin:6px 0 4px; font-size:22px; letter-spacing:-.035em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.set-stats-grid small { font-size:9px; line-height:1.35; }
.sets-toolbar { display:flex; gap:10px; align-items:center; padding:11px; margin-bottom:10px; }
.sets-toolbar .filter-field { flex:1; }
.sets-toolbar select { min-height:41px; border:1px solid var(--line); border-radius:10px; padding:0 12px; background:#fff; color:var(--ink); }
.set-list-status,.set-card-status { color:var(--muted); font-size:10px; margin:8px 2px 10px; }
.set-list { display:grid; gap:10px; }
.set-row { display:grid; grid-template-columns:120px minmax(0,1fr) auto; gap:18px; align-items:center; padding:15px 16px; border:1px solid var(--line); border-radius:16px; background:var(--surface); transition:.16s ease; }
.set-row:hover { border-color:#d4caef; box-shadow:0 10px 28px rgba(25,37,58,.06); }
.set-row.complete { border-color:#bde8d6; background:linear-gradient(90deg,#f8fffb,#fff 35%); }
.set-row-logo { height:58px; display:grid; place-items:center; border-radius:12px; background:var(--surface-2); overflow:hidden; }
.set-row-logo img { max-width:104px; max-height:46px; object-fit:contain; }
.set-row-logo span { font-size:27px; color:#a5afbd; }
.set-row-main { min-width:0; }
.set-row-title { display:flex; justify-content:space-between; gap:14px; align-items:flex-start; }
.set-row-title strong,.set-row-title small { display:block; }
.set-row-title strong { font-size:15px; }
.set-row-title small { margin-top:4px; color:var(--muted); font-size:9px; }
.set-row-title b { white-space:nowrap; font-size:15px; }
.set-progress-track { height:8px; overflow:hidden; margin-top:10px; border-radius:999px; background:#eceff4; }
.set-progress-track i { display:block; height:100%; width:0; border-radius:inherit; background:linear-gradient(90deg,var(--accent),var(--accent-2)); transition:width .25s ease; }
.set-row.complete .set-progress-track i { background:var(--green); }
.set-row-meta { display:flex; justify-content:space-between; gap:12px; margin-top:6px; color:var(--muted); font-size:9px; }
.set-counting-note { margin:13px 2px 0; padding:12px 14px; border-radius:12px; background:#f8f5ff; color:#645c78; font-size:10px; line-height:1.5; }
.set-modal { width:min(1040px,96vw); }
.set-modal-frame { padding-bottom:26px; }
.set-modal-head { display:grid; grid-template-columns:150px minmax(0,1fr); gap:22px; align-items:center; padding-bottom:18px; border-bottom:1px solid var(--line); }
.set-logo-wrap { min-height:74px; display:grid; place-items:center; border-radius:14px; background:var(--surface-2); }
.set-logo-wrap img { max-width:130px; max-height:60px; object-fit:contain; }
.set-modal-head h2 { margin:5px 0 5px; font-size:27px; letter-spacing:-.04em; }
.set-progress-card { display:grid; grid-template-columns:260px minmax(0,1fr); align-items:center; gap:22px; margin:16px 0; padding:15px 17px; border:1px solid var(--line); border-radius:14px; background:#fbfbfd; }
.set-progress-card span,.set-progress-card small { display:block; color:var(--muted); }
.set-progress-card span { font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.set-progress-card strong { display:block; margin:3px 0; font-size:23px; }
.set-progress-card small { font-size:9px; }
.set-progress-track.large { height:12px; margin:0; }
.set-card-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; }
.segmented { display:flex; gap:4px; padding:4px; border:1px solid var(--line); border-radius:11px; background:#f5f7fa; }
.segmented button { border:0; border-radius:8px; padding:8px 11px; background:transparent; color:var(--muted); font-size:10px; font-weight:800; }
.segmented button.active { color:#fff; background:var(--nav); box-shadow:0 5px 12px rgba(20,32,51,.12); }
.segmented span { display:inline-grid; place-items:center; min-width:18px; height:18px; margin-left:3px; padding:0 4px; border-radius:99px; background:rgba(255,255,255,.14); font-size:8px; }
.filter-field.compact { width:min(310px,42%); }
.set-card-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:11px; max-height:54vh; overflow:auto; padding:3px 2px 6px; }
.set-card-grid > .empty-state { grid-column:1/-1; }
.set-card-tile { min-width:0; padding:9px; border:1px solid var(--line); border-radius:14px; background:#fff; display:flex; flex-direction:column; }
.set-card-tile.owned { border-color:#bde8d6; background:#fbfffd; }
.set-card-image { position:relative; min-height:184px; display:grid; place-items:center; overflow:hidden; border-radius:10px; background:#f3f5f8; }
.set-card-image img { width:100%; height:184px; object-fit:contain; }
.set-card-image > span { color:#aab3c0; font-size:32px; }
.set-card-image b { position:absolute; left:7px; top:7px; padding:5px 7px; border-radius:99px; color:#fff; background:#6e7787; font-size:7px; letter-spacing:.08em; }
.set-card-tile.owned .set-card-image b { background:var(--green); }
.set-card-info { padding:9px 2px 7px; min-height:58px; }
.set-card-info strong,.set-card-info small { display:block; }
.set-card-info strong { font-size:11px; line-height:1.25; }
.set-card-info small { margin-top:3px; color:var(--muted); font-size:8px; line-height:1.3; }
.set-card-actions { display:grid; gap:6px; margin-top:auto; }
.button.small { min-height:32px; padding:7px 9px; font-size:9px; text-align:center; text-decoration:none; display:grid; place-items:center; }
.set-affiliate-note { margin-top:12px; }
.set-card-skeleton { min-height:260px; border-radius:14px; background:linear-gradient(90deg,#f0f2f6 25%,#f8f9fb 37%,#f0f2f6 63%); background-size:400% 100%; animation:shimmer 1.3s infinite; }

@media (max-width: 1000px) {
  .set-stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .set-card-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}

@media (max-width: 780px) {
  .mobile-bottom-nav { grid-template-columns:repeat(5,1fr); }
  .mobile-bottom-nav .mobile-tab small { font-size:8px; }
  .mobile-bottom-nav .mobile-tab > span:first-child { font-size:17px; }
  .sets-hero { padding:17px; align-items:flex-start; }
  .sets-hero h2 { font-size:25px; }
  .sets-hero .button { display:none; }
  .set-stats-grid { gap:8px; }
  .set-stats-grid article { padding:13px; min-height:96px; }
  .set-stats-grid strong { font-size:18px; }
  .sets-toolbar { position:sticky; top:74px; z-index:10; display:grid; grid-template-columns:1fr; }
  .sets-toolbar select { width:100%; }
  .set-row { grid-template-columns:74px minmax(0,1fr); gap:11px; padding:12px; }
  .set-row-logo { height:52px; }
  .set-row-logo img { max-width:68px; max-height:40px; }
  .set-row > .button { grid-column:1/-1; width:100%; }
  .set-row-title { gap:8px; }
  .set-row-title b { font-size:12px; }
  .set-modal-frame { padding-bottom:24px; }
  .set-modal-head { grid-template-columns:90px minmax(0,1fr); gap:13px; }
  .set-logo-wrap { min-height:62px; }
  .set-logo-wrap img { max-width:78px; max-height:48px; }
  .set-modal-head h2 { font-size:21px; }
  .set-progress-card { grid-template-columns:1fr; gap:10px; }
  .set-card-toolbar { display:grid; gap:9px; }
  .segmented { width:100%; }
  .segmented button { flex:1; padding:8px 5px; }
  .filter-field.compact { width:100%; }
  .set-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); max-height:none; overflow:visible; }
  .set-card-image,.set-card-image img { min-height:0; height:170px; }
}

@media (max-width: 430px) {
  .set-card-grid { gap:8px; }
  .set-card-tile { padding:7px; }
  .set-card-image,.set-card-image img { height:150px; }
  .set-card-actions { gap:5px; }
}


/* BinderWorth 3.0 — master sets, goals and wanted shopping list */
.set-goals-panel { margin: 0 0 14px; }
.set-goals-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.set-goals-list button { border:1px solid var(--line); background:var(--surface-2); border-radius:13px; padding:12px 14px; display:flex; justify-content:space-between; align-items:center; gap:10px; text-align:left; cursor:pointer; color:var(--ink); }
.set-goals-list button:hover { border-color:#d4caef; background:#faf8ff; }
.set-goals-list span,.set-goals-list strong,.set-goals-list small { display:block; }
.set-goals-list strong { font-size:12px; }
.set-goals-list small { margin-top:3px; color:var(--muted); font-size:9px; }
.set-goals-list b { font-size:10px; white-space:nowrap; color:var(--accent); }

.sets-hero-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.workspace-tabs { display:flex; gap:5px; padding:6px; margin-bottom:12px; }
.workspace-tabs button { border:0; background:transparent; color:var(--muted); padding:10px 15px; border-radius:10px; font:inherit; font-size:11px; font-weight:800; cursor:pointer; }
.workspace-tabs button.active { color:var(--accent); background:#f0ecff; }
.workspace-tabs span,#wantedHeroCount { display:inline-grid; place-items:center; min-width:20px; height:20px; padding:0 6px; border-radius:99px; background:#ece7ff; color:var(--accent); font-size:9px; }

.wanted-summary-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:12px; }
.wanted-summary-grid article { padding:17px 18px; border:1px solid var(--line); border-radius:15px; background:var(--surface); }
.wanted-summary-grid span,.wanted-summary-grid small { display:block; color:var(--muted); }
.wanted-summary-grid span { font-size:10px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.wanted-summary-grid strong { display:block; margin:6px 0 4px; font-size:22px; }
.wanted-summary-grid small { font-size:9px; }
.wanted-list-status { color:var(--muted); font-size:10px; margin:8px 2px 10px; }
.wanted-list { display:grid; gap:8px; }
.wanted-row { display:grid; grid-template-columns:62px minmax(0,1fr) auto; gap:13px; align-items:center; padding:10px 12px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.wanted-row > img { width:54px; height:70px; object-fit:contain; border-radius:8px; background:var(--surface-2); }
.wanted-row-main { min-width:0; }
.wanted-row-main strong,.wanted-row-main small,.wanted-row-main span { display:block; }
.wanted-row-main strong { font-size:12px; }
.wanted-row-main small { margin-top:3px; color:var(--muted); font-size:9px; }
.wanted-row-main span { width:max-content; max-width:100%; margin-top:6px; padding:4px 7px; border-radius:99px; background:#fff1f6; color:#a73c67; font-size:8px; font-weight:800; }
.wanted-row-actions { display:flex; gap:6px; align-items:center; }
.wanted-active { border-color:#e7b8ca !important; background:#fff1f6 !important; color:#a73c67 !important; }

.set-row { grid-template-columns:34px 120px minmax(0,1fr) auto; }
.set-pin-icon { width:32px; height:32px; border:0; border-radius:10px; background:#f2f4f7; color:#8a93a1; cursor:pointer; font-size:17px; }
.set-pin-icon.active { background:#fff5d7; color:#b98600; }
.set-row.pinned { border-color:#ded3fb; }
.set-mode-pill { display:inline-block; margin-right:5px; padding:3px 6px; border-radius:99px; font-size:7px; font-weight:900; letter-spacing:.08em; vertical-align:1px; }
.set-mode-pill.basic { background:#edf1f6; color:#667181; }
.set-mode-pill.master { background:#eee8ff; color:#5a36b5; }

.set-goal-actions { display:flex; align-items:center; gap:9px; flex-wrap:wrap; margin-top:11px; }
#pinSetBtn.active { border-color:#e5ca75; background:#fff8dd; color:#8b6900; }
.mode-switch { display:flex; gap:3px; padding:3px; border-radius:10px; background:#eff1f5; }
.mode-switch button { border:0; background:transparent; border-radius:8px; padding:7px 11px; font:inherit; font-size:9px; font-weight:800; color:var(--muted); cursor:pointer; }
.mode-switch button.active { background:#fff; color:var(--accent); box-shadow:0 1px 4px rgba(25,37,58,.08); }
.set-shopping-actions { display:flex; gap:8px; margin:0 0 12px; flex-wrap:wrap; }

.set-card-tile.part-owned { border-color:#e2d8fa; background:#fdfbff; }
.set-card-image em { position:absolute; right:7px; top:7px; padding:5px 7px; border-radius:99px; color:#775800; background:#fff3bf; font-size:7px; font-style:normal; font-weight:900; letter-spacing:.05em; }
.variant-chips { display:flex; flex-wrap:wrap; gap:4px; margin-top:7px; }
.variant-chips span { margin:0; width:auto; padding:4px 6px; border-radius:99px; font-size:7px; font-weight:800; line-height:1; }
.variant-chips .owned { background:#e3f7ed; color:#247a54; }
.variant-chips .wanted { background:#fff0f5; color:#a73c67; }
.variant-chips .missing { background:#f0f2f5; color:#7b8490; }
.set-card-actions .affiliate-button { text-align:center; }
.set-card-actions .button { white-space:normal; }
.segmented { flex-wrap:wrap; }

@media (max-width: 900px) {
  .set-goals-list { grid-template-columns:1fr; }
  .set-row { grid-template-columns:32px 74px minmax(0,1fr); }
  .set-row > .button { grid-column:1/-1; }
  .wanted-row { grid-template-columns:54px minmax(0,1fr); }
  .wanted-row-actions { grid-column:1/-1; display:grid; grid-template-columns:1fr 1fr auto; }
}
@media (max-width: 620px) {
  .sets-hero-actions { width:100%; display:grid; grid-template-columns:1fr 1fr; }
  .workspace-tabs { position:sticky; top:68px; z-index:10; background:rgba(255,255,255,.96); backdrop-filter:blur(10px); }
  .workspace-tabs button { flex:1; padding-inline:8px; }
  .wanted-summary-grid { gap:8px; }
  .wanted-summary-grid article { padding:13px; }
  .wanted-row { grid-template-columns:46px minmax(0,1fr); padding:9px; }
  .wanted-row > img { width:44px; height:58px; }
  .wanted-row-actions { grid-template-columns:1fr 1fr 36px; }
  .set-row { grid-template-columns:28px 62px minmax(0,1fr); gap:8px; }
  .set-pin-icon { width:28px; height:28px; font-size:15px; }
  .set-row-logo { height:46px; }
  .set-row-logo img { max-width:58px; max-height:36px; }
  .set-row-title { display:block; }
  .set-row-title b { display:block; margin-top:6px; }
  .set-card-toolbar .segmented { width:100%; overflow-x:auto; flex-wrap:nowrap; justify-content:flex-start; padding-bottom:3px; }
  .set-card-toolbar .segmented button { flex:0 0 auto; }
  .set-shopping-actions { display:grid; grid-template-columns:1fr 1fr; }
  .set-goal-actions { align-items:stretch; }
}

/* BinderWorth 3.1 — value history */
.collection-history-panel { margin-top: 18px; overflow: hidden; }
.history-panel-heading { align-items: flex-start; gap: 16px; }
.history-panel-heading small { display: block; margin-top: 5px; color: var(--muted); }
.history-range { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2, #f7f8fb); }
.history-range button { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 800; font-size: .76rem; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.history-range button.active { background: var(--ink); color: #fff; }
.history-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 8px 0 12px; }
.history-kpis > div { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface-2, #fafbfc); min-width: 0; }
.history-kpis span { display: block; color: var(--muted); font-size: .75rem; font-weight: 700; margin-bottom: 5px; }
.history-kpis strong { font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere; }
.history-kpis strong.up { color: var(--green); }
.history-kpis strong.down { color: var(--red); }
.history-kpis strong.flat { color: var(--ink); }
.collection-history-chart { min-height: 250px; position: relative; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, rgba(99,91,255,.025), rgba(99,91,255,0)); overflow: hidden; }
.collection-history-chart svg { width: 100%; min-height: 250px; display: block; }
.history-grid-line { stroke: #e7e9f0; stroke-width: 1; }
.history-axis-label { fill: #7d8494; font-size: 10px; font-weight: 700; }
.history-area { fill: rgba(99,91,255,.08); }
.history-value-line { fill: none; stroke: #635bff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.history-cost-line { fill: none; stroke: #8b93a5; stroke-width: 2; stroke-dasharray: 6 6; stroke-linecap: round; stroke-linejoin: round; }
.history-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; text-align: center; padding: 20px; color: var(--muted); }
.history-empty strong { color: var(--ink); }
.history-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; color: var(--muted); font-size: .77rem; font-weight: 700; }
.history-legend span { display: inline-flex; align-items: center; gap: 6px; }
.history-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.history-legend .value-dot { background: #635bff; }
.history-legend .cost-dot { background: #8b93a5; }
.history-note { margin: 10px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.card-price-history { border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; background: var(--surface-2, #fafbfc); }
.card-price-history > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-price-history > div:first-child strong { font-size: .9rem; }
.card-price-history > div:first-child span { color: var(--muted); font-size: .74rem; }
.card-history-chart { margin-top: 9px; min-height: 76px; display: grid; align-items: center; }
.card-history-chart svg { display: block; width: 100%; height: 120px; }
.card-history-line { fill: none; stroke: #635bff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.card-history-empty { color: var(--muted); font-size: .78rem; padding: 18px 0; text-align: center; }
.card-history-single { display: flex; align-items: baseline; gap: 8px; padding: 15px 0; }
.card-history-single strong { font-size: 1.2rem; }
.card-history-single span { color: var(--muted); font-size: .75rem; }
.value-settings { margin-top: 14px; }

@media (max-width: 760px) {
  .history-panel-heading { flex-direction: column; }
  .history-range { width: 100%; }
  .history-range button { flex: 1; }
  .history-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-history-chart, .collection-history-chart svg { min-height: 220px; }
}

/* BinderWorth 3.2 account + cloud sync */
.account-panel { display:flex; gap:14px; align-items:center; justify-content:space-between; padding:14px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.72); }
.account-copy { display:grid; gap:3px; min-width:0; }
.account-copy strong { font-size:14px; overflow-wrap:anywhere; }
.account-copy span { font-size:12px; color:var(--muted); line-height:1.45; }
.account-copy .sync-state-dot { display:inline-block; width:9px; height:9px; border-radius:999px; background:#9aa2b3; margin-right:5px; }
.account-copy .sync-state-dot.synced { background:#20a464; }
.account-copy .sync-state-dot.syncing { background:#d99916; }
.account-copy .sync-state-dot.error { background:#d84c4c; }
.cloud-privacy-note { margin:10px 0 0; font-size:11px; line-height:1.5; color:var(--muted); }
.account-form-grid { margin-top:18px; }
.account-message { min-height:20px; margin:12px 0 0; font-size:12px; color:var(--muted); }
.account-message.error { color:#b63030; }
.account-message.success { color:#16804c; }
.account-actions { margin-top:16px; }
.sync-conflict-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:18px; }
.sync-conflict-grid article { display:grid; gap:7px; align-content:start; padding:15px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.74); }
.sync-conflict-grid article > span { font-size:10px; font-weight:800; letter-spacing:.1em; color:var(--muted); }
.sync-conflict-grid article strong { font-size:15px; }
.sync-conflict-grid article small { min-height:34px; color:var(--muted); line-height:1.4; }
.sync-conflict-grid article .button { margin-top:5px; }
.status-chip.cloud-synced i { background:#65e39c; box-shadow:0 0 0 4px rgba(101,227,156,.14); }

@media (max-width: 680px) {
  .account-panel { align-items:stretch; flex-direction:column; }
  .account-panel .button-row, .account-panel > .button { width:100%; }
  .account-panel .button { flex:1; }
  .sync-conflict-grid { grid-template-columns:1fr; }
  .account-actions { display:grid; grid-template-columns:1fr; gap:8px; }
  .account-actions .action-spacer { display:none; }
}


/* BinderWorth 3.2.1 — account navigation + header brand polish */
.account-menu-item { position: relative; }
.account-menu-copy { min-width: 0; flex: 1; display: grid; gap: 2px; }
.account-menu-copy strong { font-size: 13px; font-weight: 750; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-menu-copy small { font-size: 9px; color: #7f8da5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-menu-item:hover .account-menu-copy small { color: #aab5c7; }
.account-menu-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 999px; background: #69768b; box-shadow: 0 0 0 3px rgba(255,255,255,.04); }
.account-menu-dot.signed-in { background: #47d895; box-shadow: 0 0 0 4px rgba(71,216,149,.11); }
.account-menu-dot.offline { background: #d99916; box-shadow: 0 0 0 4px rgba(217,153,22,.11); }
.account-menu-item:disabled { opacity: .62; cursor: default; }

.topbar-title { min-width: 0; display: grid; align-content: center; }
.topbar-brand-logo { width: 188px; height: auto; display: block; margin-top: 4px; }
.account-danger-zone { margin-top: 18px; }
.account-danger-zone .button { width: 100%; }

@media (max-width: 780px) {
  .topbar-title { flex: 1; }
  .topbar-brand-logo { width: 154px; max-height: 42px; object-fit: contain; object-position: left center; margin-top: 0; }
}

@media (max-width: 380px) {
  .topbar-brand-logo { width: 136px; }
}


/* BinderWorth 3.2.2 — youth visual refresh */
:root {
  --accent: #7a4cff;
  --accent-2: #ff5ec4;
  --accent-soft: #f5efff;
  --nav: #120f2f;
  --nav-2: #21194f;
  --bg: #f8f7ff;
  --surface-2: #f8f6ff;
  --cyan-pop: #4edcf1;
  --gold-pop: #ffd84f;
  --mint-pop: #6ef1b3;
}
body {
  background:
    radial-gradient(circle at top right, rgba(122,76,255,.08), transparent 24%),
    radial-gradient(circle at 0% 20%, rgba(255,94,196,.08), transparent 20%),
    linear-gradient(180deg, #faf9ff, #f4f6fb 42%, #f7f8ff);
}
.sidebar {
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.08), transparent 18%),
    radial-gradient(circle at 85% 16%, rgba(78,220,241,.12), transparent 16%),
    linear-gradient(180deg, #130f35, #17133f 42%, #0e1329);
}
.brand img { filter: drop-shadow(0 8px 16px rgba(122,76,255,.18)); }
.nav-item {
  border: 1px solid transparent;
  border-radius: 14px;
}
.nav-item:hover {
  border-color: rgba(255,255,255,.08);
  background: rgba(255,255,255,.08);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(122,76,255,.32), rgba(78,220,241,.1));
  box-shadow: inset 3px 0 0 var(--gold-pop), 0 10px 22px rgba(16,19,40,.22);
}
.button {
  border-radius: 14px;
}
.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 26px rgba(122,76,255,.24);
}
.button.light.hero-primary {
  border: 0;
  box-shadow: 0 12px 22px rgba(255,255,255,.18);
}
.global-estimate-banner {
  border-color: #f2e9b3;
  background: linear-gradient(135deg, #fffdf0, #fff8d9);
  box-shadow: 0 10px 20px rgba(125,104,17,.05);
}
.youth-hero {
  min-height: 285px;
  background:
    radial-gradient(circle at 14% 16%, rgba(255,216,79,.14), transparent 14%),
    radial-gradient(circle at 83% 18%, rgba(78,220,241,.24), transparent 22%),
    radial-gradient(circle at 72% 72%, rgba(255,94,196,.20), transparent 22%),
    linear-gradient(135deg, #191443, #27185b 46%, #1a2a66 86%);
}
.youth-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 10% 22%, rgba(255,255,255,.20) 0 2px, transparent 2.5px),
    radial-gradient(circle at 22% 58%, rgba(255,255,255,.15) 0 1.5px, transparent 2px),
    radial-gradient(circle at 56% 20%, rgba(255,255,255,.16) 0 2px, transparent 2.5px),
    radial-gradient(circle at 86% 62%, rgba(255,255,255,.16) 0 2px, transparent 2.5px);
  opacity: .8;
  pointer-events: none;
}
.hero-copy { max-width: 720px; }
.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}
.mini-badge {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.12);
}
.badge-purple { background: rgba(122,76,255,.28); }
.badge-cyan { background: rgba(78,220,241,.18); color: #d9fbff; }
.badge-gold { background: rgba(255,216,79,.18); color: #fff4bb; }
.hero-playground {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex: 0 0 360px;
  min-height: 190px;
}
.hero-card-stack {
  transform: translateY(6px);
}
.hero-card-stack span { border-color: rgba(255,255,255,.85); }
.hero-card-stack span:nth-child(1) { background: linear-gradient(160deg, #ff5ec4, #25155d 68%); }
.hero-card-stack span:nth-child(2) { background: linear-gradient(160deg, #4edcf1, #24386d 68%); }
.hero-card-stack span:nth-child(3) { background: linear-gradient(145deg, #ffd84f, #ff8e5d 40%, #7a4cff 100%); }
.binder-buddy {
  position: relative;
  width: 160px;
  min-height: 180px;
  display: grid;
  align-content: start;
  justify-items: center;
}
.binder-buddy-stars span {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(135deg, #fff0a1, #ffd84f);
  clip-path: polygon(50% 0, 62% 36%, 100% 50%, 62% 64%, 50% 100%, 38% 64%, 0 50%, 38% 36%);
  animation: buddyFloat 4.2s ease-in-out infinite;
}
.binder-buddy-stars span:nth-child(1) { left: 10px; top: 18px; animation-delay: -.4s; }
.binder-buddy-stars span:nth-child(2) { right: 6px; top: 8px; width: 14px; height: 14px; animation-delay: -1.4s; }
.binder-buddy-stars span:nth-child(3) { right: 22px; bottom: 50px; width: 12px; height: 12px; animation-delay: -2.1s; }
.buddy-card-face {
  position: relative;
  width: 124px;
  height: 164px;
  border-radius: 22px;
  background: linear-gradient(160deg, #ffffff, #f6edff 42%, #d7f9ff 100%);
  border: 3px solid rgba(255,255,255,.7);
  box-shadow: 0 18px 36px rgba(17,18,51,.28);
  transform: rotate(8deg);
}
.buddy-card-top, .buddy-card-bottom {
  position: absolute;
  left: 14px;
  right: 14px;
  border-radius: 14px;
}
.buddy-card-top {
  top: 16px;
  height: 24px;
  background: linear-gradient(90deg, #7a4cff, #ff5ec4);
}
.buddy-card-bottom {
  left: 18px;
  right: 18px;
  bottom: 18px;
  height: 34px;
  background: linear-gradient(90deg, rgba(122,76,255,.16), rgba(78,220,241,.18));
}
.buddy-card-line {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 56px;
  height: 8px;
  border-radius: 99px;
  background: rgba(122,76,255,.10);
}
.buddy-card-core {
  position: absolute;
  left: 50%;
  top: 80px;
  width: 58px;
  height: 58px;
  transform: translateX(-50%);
  border-radius: 18px;
  background: linear-gradient(145deg, #ffd84f, #ff8e5d 48%, #7a4cff);
  box-shadow: inset 0 3px 9px rgba(255,255,255,.34);
}
.buddy-card-core::after {
  content: '';
  position: absolute;
  inset: 15px;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
}
.buddy-eyes {
  position: absolute;
  left: 50%;
  top: 62px;
  width: 52px;
  display: flex;
  justify-content: space-between;
  transform: translateX(-50%);
}
.buddy-eyes i {
  width: 10px;
  height: 16px;
  border-radius: 999px;
  background: #1d2550;
  position: relative;
}
.buddy-eyes i::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 3px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
}
.buddy-smile {
  position: absolute;
  left: 50%;
  top: 88px;
  width: 26px;
  height: 14px;
  transform: translateX(-50%);
  border-bottom: 4px solid #1d2550;
  border-radius: 0 0 24px 24px;
}
.buddy-bubble {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 16px;
  background: rgba(255,255,255,.12);
  color: #eaf0ff;
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
  max-width: 150px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.12);
}
@keyframes buddyFloat {
  50% { transform: translateY(-6px) rotate(12deg); }
}
.youth-strip-panel {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 6px 0 16px;
  border: 1px solid #e7dcff;
  background: linear-gradient(135deg, #ffffff, #fbf8ff 55%, #f3fffe);
  box-shadow: 0 16px 28px rgba(38,25,84,.05);
}
.youth-strip-panel h3 {
  margin: 4px 0 6px;
  font-size: 24px;
  letter-spacing: -.04em;
}
.youth-strip-panel p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.youth-strip-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.youth-strip-badges span {
  padding: 9px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f0eaff, #fff4fc);
  border: 1px solid #e5d8ff;
  color: #4f3aa5;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.home-actions button {
  position: relative;
  overflow: hidden;
  border: 1px solid #e6dcff;
  background: linear-gradient(180deg, #ffffff, #fbf9ff);
}
.home-actions button::after {
  content: '';
  position: absolute;
  inset: auto -20% -55% auto;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(122,76,255,.11), transparent 65%);
}
.home-actions button:nth-child(2)::after { background: radial-gradient(circle, rgba(78,220,241,.14), transparent 65%); }
.home-actions button:nth-child(3)::after { background: radial-gradient(circle, rgba(255,94,196,.11), transparent 65%); }
.home-actions button:nth-child(4)::after { background: radial-gradient(circle, rgba(255,216,79,.16), transparent 65%); }
.home-actions button:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 16px 32px rgba(40,31,94,.10);
}
.home-action-icon {
  background: linear-gradient(145deg, #f7f2ff, #fff);
  border: 1px solid #eadfff;
  box-shadow: inset 0 -1px 0 rgba(122,76,255,.10);
}
.stat-card {
  overflow: hidden;
  border-color: #eae2ff;
  background: linear-gradient(180deg, #ffffff, #fcfbff);
}
.stat-card::after {
  content: '';
  position: absolute;
  right: -12px;
  bottom: -12px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(122,76,255,.10), transparent 65%);
}
.stat-card:nth-child(2)::after { background: radial-gradient(circle, rgba(78,220,241,.12), transparent 65%); }
.stat-card:nth-child(3)::after { background: radial-gradient(circle, rgba(255,94,196,.10), transparent 65%); }
.stat-card:nth-child(4)::after { background: radial-gradient(circle, rgba(255,216,79,.18), transparent 65%); }
.stat-icon {
  background: linear-gradient(145deg, #fff, #f4efff);
  color: #5c3df0;
}
.scan-intro,
.sets-hero,
.search-hero,
.collection-toolbar,
.panel {
  box-shadow: 0 10px 25px rgba(35,26,82,.05);
}
.scan-intro,
.sets-hero {
  border: 1px solid #e8defd;
  background: linear-gradient(135deg, #ffffff, #fbf8ff 70%, #f1fffb);
}
.scan-stepper .active b {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.search-box {
  border-color: #eadfff;
}
.result-card,
.collection-row,
.set-card,
.set-row,
.wanted-card,
.wanted-list-card,
.progress-mode-card,
.progress-summary-card {
  box-shadow: 0 8px 18px rgba(33,23,72,.05);
}
.tool-links a {
  background: radial-gradient(circle at 88% 18%, rgba(255,216,79,.20), transparent 26%), linear-gradient(145deg,#fff,#f6f3ff);
}
@media (max-width: 960px) {
  .hero-playground {
    flex: 0 1 auto;
    width: 100%;
    justify-content: center;
  }
  .youth-strip-panel {
    grid-template-columns: 1fr;
  }
  .youth-strip-badges {
    justify-content: flex-start;
  }
}
@media (max-width: 780px) {
  .youth-hero {
    min-height: 240px;
  }
  .hero-playground {
    display: none;
  }
  .hero-badge-row {
    margin-top: 10px;
  }
  .mini-badge {
    font-size: 9px;
    padding: 6px 9px;
  }
  .youth-strip-panel h3 {
    font-size: 21px;
  }
}
@media (max-width: 430px) {
  .youth-strip-badges span {
    width: 100%;
    text-align: center;
  }
}


/* BinderWorth 3.2.3 — gamification */
.gameboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .95fr);
  gap: 16px;
  margin: 16px 0;
}
.collector-panel,
.badge-panel,
.quest-panel {
  border-color: #e9ddff;
  background: linear-gradient(180deg, #fff, #fcfbff);
  box-shadow: 0 12px 26px rgba(33, 24, 84, .05);
}
.collector-rank-pill {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #7a4cff, #ff5ec4);
}
.collector-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}
.collector-level-ring {
  width: 132px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #fff 53%, transparent 54%),
    conic-gradient(from 210deg, #7a4cff, #ff5ec4, #ffd84f, #4edcf1, #7a4cff);
  box-shadow: 0 18px 34px rgba(38, 24, 88, .12);
}
.collector-level-ring strong,
.collector-level-ring span {
  display: block;
}
.collector-level-ring strong {
  margin-top: 4px;
  font-size: 42px;
  line-height: 1;
  color: #261659;
}
.collector-level-ring span {
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: .14em;
  font-weight: 900;
  color: #796ca7;
}
.collector-xp-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
}
.collector-xp-row strong {
  font-size: 22px;
}
.collector-xp-row small {
  color: var(--muted);
}
.xp-track {
  position: relative;
  margin-top: 10px;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #efe8ff;
}
.xp-track i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #7a4cff, #ff5ec4 55%, #ffd84f);
}
.collector-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.collector-mini-grid article {
  padding: 12px;
  border: 1px solid #ece4ff;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #faf8ff);
}
.collector-mini-grid span,
.collector-mini-grid strong {
  display: block;
}
.collector-mini-grid span {
  color: #7d7597;
  font-size: 10px;
}
.collector-mini-grid strong {
  margin-top: 6px;
  font-size: 18px;
}
.achievement-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.achievement-badge {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #ebe5fb;
  background: #fbfbff;
}
.achievement-badge.unlocked {
  border-color: #e2d5ff;
  background: linear-gradient(135deg, #fff, #faf4ff 65%, #f0fdff);
}
.achievement-badge.locked {
  opacity: .78;
}
.achievement-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 22px;
  background: linear-gradient(145deg, #f5efff, #fff);
  border: 1px solid #e4dbff;
}
.achievement-copy strong,
.achievement-copy small {
  display: block;
}
.achievement-copy strong {
  font-size: 14px;
}
.achievement-copy small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}
.achievement-state {
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
  color: #6c608f;
  background: #f1ecff;
}
.achievement-badge.unlocked .achievement-state {
  color: #fff;
  background: linear-gradient(135deg, #7a4cff, #ff5ec4);
}
.quest-panel {
  margin: 0 0 16px;
}
.quest-list {
  display: grid;
  gap: 12px;
}
.quest-card {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #e9e2ff;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #fcfbff);
}
.quest-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-size: 24px;
  background: linear-gradient(145deg, #f8f2ff, #fff);
  border: 1px solid #e6dcff;
}
.quest-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.quest-head strong {
  font-size: 15px;
}
.quest-head span {
  color: #6f6296;
  font-size: 11px;
  font-weight: 800;
}
.quest-copy small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}
.quest-progress {
  position: relative;
  margin-top: 10px;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #efe9ff;
}
.quest-progress i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #4edcf1, #7a4cff, #ff5ec4);
}
.quest-complete {
  padding: 18px;
  border: 1px dashed #ddd0ff;
  border-radius: 16px;
  text-align: center;
  background: linear-gradient(135deg, #fff, #fbf7ff);
}
.quest-complete strong,
.quest-complete span {
  display: block;
}
.quest-complete strong {
  font-size: 18px;
}
.quest-complete span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}
@media (max-width: 1100px) {
  .gameboard-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 780px) {
  .collector-main,
  .quest-card {
    grid-template-columns: 1fr;
  }
  .collector-level-ring {
    width: 116px;
    margin: 0 auto;
  }
  .collector-mini-grid {
    grid-template-columns: 1fr 1fr;
  }
  .quest-card .button {
    width: 100%;
  }
}
@media (max-width: 520px) {
  .collector-mini-grid {
    grid-template-columns: 1fr;
  }
  .achievement-badge {
    grid-template-columns: 40px minmax(0, 1fr);
  }
  .achievement-state {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .quest-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* BinderWorth 3.2.4 — celebrations, monthly challenge and wanted spotlight */
.challenge-spotlight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin: 0 0 16px;
}
.monthly-challenge-panel,
.wanted-spotlight-panel {
  border-color: #e7dcff;
  background: linear-gradient(145deg, #fff, #fbf8ff 62%, #f2fffd);
}
.challenge-reward {
  padding: 7px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff1a8, #ffd84f);
  color: #694a00;
  font-size: 10px;
  font-weight: 950;
  box-shadow: 0 7px 18px rgba(171, 123, 0, .12);
}
.monthly-challenge-panel > p {
  margin: -3px 0 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.monthly-progress-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.monthly-progress-row strong { font-size: 22px; }
.monthly-progress-row small { color: #786e93; font-size: 10px; }
.monthly-progress-track {
  height: 13px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee8ff;
  position: relative;
}
.monthly-progress-track i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #4edcf1, #7a4cff 52%, #ff5ec4);
  transition: width .45s ease;
}
.monthly-progress-track.complete i {
  background: linear-gradient(90deg, #6ef1b3, #4edcf1, #ffd84f);
}
.wanted-spotlight-list { display: grid; gap: 8px; }
.wanted-spotlight-card {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #ece5ff;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.wanted-spotlight-card:hover {
  transform: translateY(-2px);
  border-color: #d9caff;
  box-shadow: 0 10px 22px rgba(45, 31, 95, .08);
}
.wanted-spotlight-image {
  width: 44px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
  background: linear-gradient(145deg, #f5efff, #effcff);
}
.wanted-spotlight-image img { width: 100%; height: 100%; object-fit: contain; }
.wanted-spotlight-image i { color: #7a4cff; font-style: normal; font-size: 20px; }
.wanted-spotlight-card strong,
.wanted-spotlight-card small { display: block; }
.wanted-spotlight-card strong { font-size: 12px; }
.wanted-spotlight-card small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.wanted-spotlight-card b { color: #7a4cff; font-size: 20px; }
.wanted-spotlight-empty {
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 18px;
  border: 1px dashed #ddd1ff;
  border-radius: 15px;
  text-align: center;
  background: #fcfaff;
}
.wanted-spotlight-empty strong { font-size: 14px; }
.wanted-spotlight-empty span { color: var(--muted); font-size: 10px; line-height: 1.5; }
.wanted-spotlight-empty .button { margin-top: 5px; }

.celebration-region {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  pointer-events: none;
  padding: 18px;
}
.celebration-pop {
  position: relative;
  width: min(430px, calc(100vw - 30px));
  overflow: hidden;
  padding: 28px 26px 24px;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 28px;
  color: white;
  text-align: center;
  background:
    radial-gradient(circle at 18% 10%, rgba(255,216,79,.28), transparent 24%),
    radial-gradient(circle at 85% 18%, rgba(78,220,241,.22), transparent 23%),
    linear-gradient(145deg, #25185a, #6f3ff2 54%, #d849a8);
  box-shadow: 0 32px 90px rgba(16, 10, 50, .42);
  pointer-events: auto;
  animation: celebrationIn .42s cubic-bezier(.2,.8,.2,1);
}
.celebration-pop.set {
  background: radial-gradient(circle at 20% 10%, rgba(255,255,255,.23), transparent 22%), linear-gradient(145deg, #6e4300, #d99300 48%, #ffd84f);
  color: #fff9dd;
}
.celebration-pop.monthly {
  background: radial-gradient(circle at 82% 14%, rgba(255,255,255,.25), transparent 25%), linear-gradient(145deg, #0c6170, #24a7bd 48%, #7a4cff);
}
.celebration-pop.level {
  background: radial-gradient(circle at 15% 10%, rgba(255,216,79,.28), transparent 25%), linear-gradient(145deg, #291664, #7a4cff 47%, #ff5ec4);
}
.celebration-pop.leaving { animation: celebrationOut .25s ease forwards; }
.celebration-symbol {
  width: 76px;
  height: 76px;
  margin: 0 auto 13px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.26);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
  font-size: 38px;
  backdrop-filter: blur(10px);
  animation: celebrationBounce .9s ease .2s both;
}
.celebration-pop p {
  margin: 0 0 6px;
  font-size: 10px;
  letter-spacing: .17em;
  font-weight: 950;
  opacity: .78;
}
.celebration-pop > strong {
  display: block;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -.04em;
}
.celebration-pop > span {
  display: block;
  max-width: 330px;
  margin: 10px auto 18px;
  color: rgba(255,255,255,.86);
  font-size: 12px;
  line-height: 1.55;
}
.celebration-pop button {
  min-width: 120px;
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: white;
  color: #33206e;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(0,0,0,.14);
}
.celebration-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti-piece {
  position: absolute;
  top: -18px;
  width: 9px;
  height: 15px;
  border-radius: 3px;
  background: #ffd84f;
  animation: confettiFall 2.5s ease-in infinite;
}
.confetti-piece:nth-child(3n) { background: #4edcf1; }
.confetti-piece:nth-child(3n+1) { background: #ff86d5; }
.confetti-piece:nth-child(4n) { border-radius: 50%; width: 10px; height: 10px; }
.c1{left:4%;animation-delay:-.2s}.c2{left:10%;animation-delay:-1.1s}.c3{left:16%;animation-delay:-.5s}.c4{left:22%;animation-delay:-1.8s}.c5{left:28%;animation-delay:-.9s}.c6{left:34%;animation-delay:-1.5s}.c7{left:40%;animation-delay:-.3s}.c8{left:46%;animation-delay:-1.9s}.c9{left:52%;animation-delay:-.8s}.c10{left:58%;animation-delay:-1.4s}.c11{left:64%;animation-delay:-.1s}.c12{left:70%;animation-delay:-1.7s}.c13{left:76%;animation-delay:-.6s}.c14{left:82%;animation-delay:-1.2s}.c15{left:88%;animation-delay:-.4s}.c16{left:94%;animation-delay:-1.6s}.c17{left:25%;animation-delay:-2.1s}.c18{left:73%;animation-delay:-2.2s}
@keyframes celebrationIn { from { opacity: 0; transform: translateY(20px) scale(.9) rotate(-1deg); } to { opacity: 1; transform: none; } }
@keyframes celebrationOut { to { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes celebrationBounce { 0% { transform: scale(.5) rotate(-12deg); } 55% { transform: scale(1.12) rotate(4deg); } 100% { transform: scale(1); } }
@keyframes confettiFall { 0% { transform: translateY(-20px) rotate(0deg); opacity: 0; } 12% { opacity: 1; } 100% { transform: translateY(470px) rotate(560deg); opacity: .15; } }

@media (max-width: 900px) {
  .challenge-spotlight-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .celebration-pop { padding: 24px 19px 20px; border-radius: 23px; }
  .celebration-pop > strong { font-size: 24px; }
  .celebration-symbol { width: 66px; height: 66px; font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .celebration-pop,
  .celebration-pop.leaving,
  .celebration-symbol,
  .confetti-piece,
  .monthly-progress-track i { animation: none !important; transition: none !important; }
  .celebration-confetti { display: none; }
}

/* Achievement rarity tiers */
.achievement-badge.unlocked.bronze .achievement-icon { background: linear-gradient(145deg, #fff6ef, #e9b48e); border-color: #d99a6d; color: #7e4424; }
.achievement-badge.unlocked.silver .achievement-icon { background: linear-gradient(145deg, #ffffff, #dce3ef); border-color: #b6c0d0; color: #4f5d72; }
.achievement-badge.unlocked.gold .achievement-icon { background: linear-gradient(145deg, #fffbe3, #ffd84f); border-color: #e9bc28; color: #775600; }
.achievement-badge.unlocked.prismatic {
  border-color: #d9c7ff;
  background: linear-gradient(120deg, #fff, #f5edff 24%, #edfdff 48%, #fff7dc 72%, #fff0fa);
}
.achievement-badge.unlocked.prismatic .achievement-icon {
  background: linear-gradient(135deg, #7a4cff, #4edcf1 34%, #ffd84f 66%, #ff5ec4);
  border-color: rgba(122,76,255,.35);
  color: white;
  box-shadow: 0 8px 18px rgba(122,76,255,.16);
}
.achievement-badge.unlocked.prismatic .achievement-state {
  background: linear-gradient(90deg, #7a4cff, #4edcf1, #ff5ec4);
}


/* BinderWorth 3.2.5 — compact achievement board, sidebar badges and clickable stats */
.stat-card-button {
  width: 100%;
  min-height: 136px;
  appearance: none;
  text-align: left;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.stat-card-button:hover {
  transform: translateY(-3px);
  border-color: #d5c5ff;
  box-shadow: 0 16px 30px rgba(42, 30, 95, .10);
}
.stat-card-button:focus-visible {
  outline: 3px solid rgba(122, 76, 255, .25);
  outline-offset: 3px;
}
.stat-card-link {
  position: relative;
  z-index: 2;
  display: inline-flex;
  margin-top: 11px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .02em;
}
.achievements-nav .badge-nav-count {
  background: linear-gradient(135deg, rgba(122,76,255,.45), rgba(255,94,196,.32));
  color: #fff;
}
.achievement-board-heading > div small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}
.dashboard-achievement-scroll {
  height: 342px;
  max-height: 342px;
  overflow-y: auto;
  overflow-x: hidden;
  grid-auto-rows: 78px;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #cdbdff #f4efff;
  overscroll-behavior: contain;
}
.dashboard-achievement-scroll::-webkit-scrollbar { width: 7px; }
.dashboard-achievement-scroll::-webkit-scrollbar-track { background: #f4efff; border-radius: 99px; }
.dashboard-achievement-scroll::-webkit-scrollbar-thumb { background: #cdbdff; border-radius: 99px; }
.dashboard-achievement-scroll .achievement-badge {
  height: 78px;
  min-height: 78px;
  overflow: hidden;
}
.dashboard-achievement-scroll .achievement-copy small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.achievements-page-hero {
  margin: 4px 0 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 28px 30px;
  overflow: hidden;
  border-color: #e4d7ff;
  background:
    radial-gradient(circle at 92% 12%, rgba(78,220,241,.18), transparent 25%),
    radial-gradient(circle at 72% 88%, rgba(255,94,196,.13), transparent 28%),
    linear-gradient(135deg, #fff, #fbf8ff 58%, #f5ffff);
}
.achievements-page-hero h2 {
  margin: 7px 0 8px;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -.05em;
}
.achievements-page-hero p:not(.eyebrow) {
  max-width: 690px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}
.achievements-page-level {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr);
  gap: 15px;
  align-items: center;
}
.achievements-concept-b-wrap {
  width: 220px;
  max-width: 34vw;
}
.achievements-concept-b-wrap .concept-b-level-ring {
  width: 220px;
  max-width: 100%;
}
.achievements-page-level > div:last-child > strong,
.achievements-page-level > div:last-child > small {
  display: block;
}
.achievements-page-level > div:last-child > strong {
  margin-top: 10px;
  font-size: 23px;
}
.achievements-page-level > div:last-child > small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}
.achievements-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 20px;
}
.achievement-page-progress {
  height: 10px;
  margin: -3px 0 17px;
  overflow: hidden;
  position: relative;
  border-radius: 999px;
  background: #efe9ff;
}
.achievement-page-progress i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #4edcf1, #7a4cff, #ff5ec4);
  transition: width .35s ease;
}
.achievement-full-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.achievement-full-grid .achievement-badge {
  min-height: 92px;
}
.achievements-side-stack {
  display: grid;
  gap: 16px;
}
.achievements-stat-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.achievements-stat-list > div {
  min-height: 94px;
  display: grid;
  align-content: center;
  padding: 14px;
  border: 1px solid #eae2ff;
  border-radius: 15px;
  background: linear-gradient(180deg, #fff, #fbf9ff);
}
.achievements-stat-list span,
.achievements-stat-list strong { display: block; }
.achievements-stat-list span { color: var(--muted); font-size: 10px; }
.achievements-stat-list strong { margin-top: 6px; font-size: 20px; }
.achievements-monthly-panel {
  border-color: #e7dcff;
  background: linear-gradient(145deg, #fff, #fbf8ff 62%, #f2fffd);
}
.achievements-monthly-panel > p {
  margin: -3px 0 15px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

@media (max-width: 1120px) {
  .achievements-page-grid { grid-template-columns: 1fr; }
  .achievement-full-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .achievements-page-hero { grid-template-columns: 1fr; padding: 22px; }
  .achievements-page-level {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 16px;
  }
  .achievements-page-level > div:last-child {
    display: grid;
    justify-items: center;
  }
  .achievement-full-grid { grid-template-columns: 1fr; }
  .dashboard-achievement-scroll { height: 342px; max-height: 342px; }
}
@media (max-width: 520px) {
  .dashboard-achievement-scroll .achievement-badge {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }
  .dashboard-achievement-scroll .achievement-state {
    grid-column: auto;
    justify-self: end;
    max-width: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .achievements-page-hero {
    padding: 18px 16px;
  }
  .achievements-page-hero h2 {
    font-size: 26px;
  }
  .achievements-page-level {
    grid-template-columns: 1fr;
    width: 100%;
    justify-items: center;
    gap: 14px;
  }
  .achievements-concept-b-wrap {
    width: min(180px, 62vw);
    max-width: min(180px, 62vw);
  }
  .achievements-concept-b-wrap .concept-b-level-ring {
    width: min(180px, 62vw);
  }
  .achievements-concept-b-wrap .concept-b-level-core strong { font-size: 52px; }
  .achievements-page-level > div:last-child {
    width: 100%;
    justify-items: center;
    text-align: center;
  }
  .achievements-page-level > div:last-child > strong {
    margin-top: 4px;
    font-size: 28px;
    line-height: 1;
  }
  .achievements-page-level > div:last-child > small {
    font-size: 12px;
    line-height: 1.4;
  }
  .collector-rank-pill {
    max-width: 100%;
  }
  .achievements-stat-list { grid-template-columns: 1fr; }
  .stat-card-button { min-height: 126px; }
}


/* BinderWorth 3.2.6 — Concept B collector level */
.collector-panel-concept-b {
  position: relative;
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(129, 94, 255, .42);
  background:
    radial-gradient(circle at 52% 22%, rgba(122,76,255,.30), transparent 30%),
    radial-gradient(circle at 82% 58%, rgba(255,94,196,.14), transparent 28%),
    linear-gradient(145deg, #0d1232, #171242 52%, #15113a);
  box-shadow: 0 20px 44px rgba(20, 14, 66, .18), inset 0 0 0 1px rgba(255,255,255,.025);
}
.collector-panel-concept-b::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .65;
  background-image:
    radial-gradient(circle at 15% 18%, rgba(255,216,79,.9) 0 1.5px, transparent 2px),
    radial-gradient(circle at 31% 68%, rgba(78,220,241,.65) 0 1.5px, transparent 2px),
    radial-gradient(circle at 72% 22%, rgba(255,255,255,.75) 0 1px, transparent 1.5px),
    radial-gradient(circle at 88% 76%, rgba(255,94,196,.65) 0 1.5px, transparent 2px);
}
.collector-panel-concept-b > * { position: relative; z-index: 1; }
.concept-b-heading { margin-bottom: 10px; }
.concept-b-heading h3 { margin: 5px 0 5px; font-size: 23px; letter-spacing: -.035em; }
.concept-b-heading > div > p:not(.eyebrow) { margin: 0; color: #aeb9d8; font-size: 11px; line-height: 1.55; }
.collector-panel-concept-b .eyebrow { color: #74e5f4; }
.concept-b-main {
  display: grid;
  grid-template-columns: minmax(210px, .9fr) minmax(210px, 1fr);
  gap: 20px;
  align-items: center;
  min-height: 230px;
}
.concept-b-level-wrap { display: grid; place-items: center; }
.concept-b-level-ring {
  --level-progress: 0%;
  position: relative;
  width: min(220px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  filter: drop-shadow(0 0 20px rgba(90,81,255,.28));
  background: conic-gradient(from -90deg,
    #46e8f5 0%,
    #5f8cff calc(var(--level-progress) * .42),
    #c150ff calc(var(--level-progress) * .72),
    #ffd84f var(--level-progress),
    rgba(100,82,178,.20) var(--level-progress),
    rgba(100,82,178,.20) 100%);
}
.concept-b-level-ring::before {
  content: '';
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #24135b, #0b1231 70%);
  box-shadow: inset 0 0 0 2px rgba(223,211,255,.30), inset 0 0 28px rgba(122,76,255,.18);
  z-index: 1;
}
.concept-b-level-ring::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: repeating-conic-gradient(from -90deg, transparent 0deg 12deg, rgba(11,9,41,.92) 12deg 14deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 29px), #000 calc(100% - 28px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 29px), #000 calc(100% - 28px));
  z-index: 2;
  pointer-events: none;
}
.concept-b-segment-mask {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 0 22px rgba(78,220,241,.12), inset 0 0 20px rgba(122,76,255,.10);
  z-index: 3;
  pointer-events: none;
}
.concept-b-level-core {
  position: relative;
  z-index: 4;
  width: 72%;
  height: 72%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.concept-b-crown {
  display: block;
  margin-bottom: 4px;
  color: #ffd84f;
  font-size: 22px;
  line-height: 1;
  text-shadow: 0 0 14px rgba(255,216,79,.35);
}
.concept-b-level-core strong {
  display: block;
  margin: 0;
  font-size: clamp(54px, 6vw, 78px);
  line-height: .9;
  letter-spacing: -.06em;
  color: #ffe16a;
  text-shadow: 0 5px 0 rgba(139,83,0,.30), 0 0 24px rgba(255,216,79,.12);
}
.concept-b-level-core > span:last-child {
  display: block;
  margin-top: 12px;
  padding-top: 6px;
  min-width: 90px;
  border-top: 1px solid rgba(255,216,79,.42);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .22em;
}
.concept-b-rank-zone { min-width: 0; }
.concept-b-rank-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  padding: 8px 15px 8px 8px;
  border: 1px solid rgba(255,216,79,.55);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(29,27,67,.96), rgba(11,16,48,.96));
  box-shadow: 0 10px 26px rgba(0,0,0,.18), inset 0 0 14px rgba(255,216,79,.06);
}
.concept-b-rank-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid #ffd84f;
  color: #ffd84f;
  font-size: 22px;
  background: #11173d;
}
.concept-b-rank-badge small,
.concept-b-rank-badge strong { display: block; }
.concept-b-rank-badge small { color: #aaa5c9; font-size: 8px; letter-spacing: .11em; font-weight: 900; }
.concept-b-rank-badge strong { margin-top: 2px; color: #ffe16a; font-size: 16px; }
.concept-b-rank-zone > p { margin: 14px 0 12px; max-width: 330px; color: #b7c0dc; font-size: 11px; line-height: 1.6; }
.concept-b-next {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 9px 11px;
  border: 1px solid rgba(118,102,218,.38);
  border-radius: 12px;
  color: #c4c6eb;
  background: rgba(55,40,122,.18);
  font-size: 10px;
  font-weight: 750;
}
.concept-b-next > span:first-child { color: #4edcf1; }
.concept-b-xp-panel {
  margin-top: 8px;
  padding: 14px 16px 15px;
  border: 1px solid rgba(112,90,214,.28);
  border-radius: 16px;
  background: rgba(8,12,39,.40);
}
.concept-b-xp-labels { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.concept-b-xp-labels strong { color: #58e5f4; font-size: 18px; }
.concept-b-xp-labels span { color: #b9bed6; font-size: 10px; }
.concept-b-xp-track {
  position: relative;
  height: 12px;
  margin-top: 9px;
  background: rgba(9,12,42,.86);
  border: 1px solid rgba(117,96,217,.58);
  box-shadow: inset 0 0 9px rgba(0,0,0,.35);
}
.concept-b-xp-track i {
  background: linear-gradient(90deg, #47e7f3, #775dff 58%, #ff5ec4);
  box-shadow: 0 0 12px rgba(78,220,241,.28);
}
.concept-b-xp-track .xp-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,.20), transparent 18% 82%, rgba(255,255,255,.08));
}
.concept-b-mini-grid { margin-top: 12px; }
.collector-panel-concept-b .concept-b-mini-grid article {
  border-color: rgba(112,91,205,.30);
  background: linear-gradient(180deg, rgba(25,23,67,.86), rgba(10,15,46,.84));
}
.collector-panel-concept-b .concept-b-mini-grid span { color: #9ba6c5; }
.collector-panel-concept-b .concept-b-mini-grid strong { color: #fff; }
@media (max-width: 1100px) {
  .concept-b-main { grid-template-columns: minmax(190px,.8fr) minmax(190px,1fr); }
}
@media (max-width: 780px) {
  .concept-b-main { grid-template-columns: 1fr; }
  .concept-b-level-ring { width: min(230px, 72vw); }
  .concept-b-rank-zone { display: grid; justify-items: center; text-align: center; }
  .concept-b-rank-zone > p { margin-inline: auto; }
  .concept-b-next { justify-content: center; }
  .concept-b-xp-labels { flex-direction: column; gap: 3px; }
}
@media (max-width: 430px) {
  .concept-b-level-ring { width: min(205px, 72vw); }
  .concept-b-level-core strong { font-size: 58px; }
  .concept-b-rank-badge { width: 100%; justify-content: center; }
}


/* BinderWorth 3.2.7 — set-specific mini quests */
.quest-card:has([data-open-quest-set]) {
  border-color: #dfd1ff;
  background:
    radial-gradient(circle at 92% 18%, rgba(255,216,79,.15), transparent 22%),
    linear-gradient(135deg, #fff, #faf6ff 62%, #f2fcff);
}
.quest-card:has([data-open-quest-set]) .quest-icon {
  background: linear-gradient(145deg, #fff4ba, #f7efff 58%, #e9fbff);
  border-color: #e8d69e;
}
.quest-card:has([data-open-quest-set]) .button {
  border-color: #d9c9ff;
  color: #5834c8;
  background: #fff;
}
.quest-panel .panel-heading small {
  max-width: 520px;
  text-align: right;
  line-height: 1.45;
}
@media (max-width: 780px) {
  .quest-panel .panel-heading small {
    text-align: left;
  }
}

/* BinderWorth 3.3 — scanner accuracy diagnostics */
.scanner-confidence-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
  padding: 14px 15px;
  border: 1px solid #ded8f0;
  border-radius: 15px;
  background: linear-gradient(135deg, #fff, #f8f6ff);
}
.scanner-confidence-card strong,
.scanner-confidence-card p { display: block; }
.scanner-confidence-card strong { margin: 3px 0 4px; font-size: 17px; letter-spacing: -.02em; }
.scanner-confidence-card p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.scanner-confidence-card > b {
  min-width: 62px;
  min-height: 62px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-size: 18px;
  background: #f1edff;
  color: #5f42c4;
}
.scanner-confidence-card.very-high { border-color: #b9ead4; background: linear-gradient(135deg,#f5fffa,#fff); }
.scanner-confidence-card.very-high > b { color: #08764c; background: #ddf8eb; }
.scanner-confidence-card.high { border-color: #c9dffa; background: linear-gradient(135deg,#f7fbff,#fff); }
.scanner-confidence-card.high > b { color: #2265a3; background: #e4f1ff; }
.scanner-confidence-card.medium { border-color: #eee0a8; background: linear-gradient(135deg,#fffdf4,#fff); }
.scanner-confidence-card.medium > b { color: #7b5a00; background: #fff3c9; }
.scanner-confidence-card.low { border-color: #efc8cf; background: linear-gradient(135deg,#fff8f9,#fff); }
.scanner-confidence-card.low > b { color: #a42f42; background: #fde9ed; }
.scan-diagnostic-chips {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 7px;
  margin-bottom: 13px;
}
.scan-diagnostic-chips span {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 11px;
  border: 1px solid #e5e1ed;
  background: #fff;
  color: #746d84;
  font-size: 8px;
  line-height: 1.35;
}
.scan-diagnostic-chips b { display: block; margin-bottom: 2px; color: #3d354f; font-size: 8px; text-transform: uppercase; letter-spacing: .06em; }
.scan-diagnostic-chips .agree,
.scan-diagnostic-chips .exact,
.scan-diagnostic-chips .strong { border-color: #c8ead9; background: #f1fbf6; color: #08764c; }
.scan-diagnostic-chips .close,
.scan-diagnostic-chips .good { border-color: #d9cef9; background: #f8f5ff; color: #5c3fb4; }
.scan-diagnostic-chips .conflict,
.scan-diagnostic-chips .weak { border-color: #f0cbd2; background: #fff6f7; color: #a42f42; }
.scan-diagnostic-chips .unknown,
.scan-diagnostic-chips .missing,
.scan-diagnostic-chips .not-compared { background: #f5f6f9; color: #7c8492; }
.candidate-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.candidate-badges .match-badge { margin-bottom: 0; }
.candidate-confidence {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 900;
}
.candidate-confidence.very-high { color: #075c3b; background: #ddf8eb; }
.candidate-confidence.high { color: #245f94; background: #e5f2ff; }
.candidate-confidence.medium { color: #765300; background: #fff0c7; }
.candidate-confidence.low { color: #8d2d2d; background: #ffe3e3; }
.scan-candidate { position: relative; overflow: hidden; }
.scan-candidate.best.very-high { border-color: #7edab1; box-shadow: 0 12px 30px rgba(8,118,76,.11); }
.scan-candidate.best.high { border-color: #9fc7ec; box-shadow: 0 12px 30px rgba(40,100,160,.09); }
.best-match-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  padding: 5px 10px;
  border-radius: 0 13px 0 12px;
  color: #fff;
  background: linear-gradient(135deg,#0b9f68,#52d49d);
  font-size: 7px;
  font-weight: 950;
  letter-spacing: .13em;
}
.scan-retry-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid #e0dbee;
  border-radius: 13px;
  background: #faf9fd;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}
.scan-retry-bar .button { min-height: 36px; padding-block: 7px; }
.scan-retry-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
@media (max-width: 620px) {
  .scan-diagnostic-chips { grid-template-columns: 1fr 1fr; }
  .scanner-confidence-card { grid-template-columns: 1fr auto; }
  .scanner-confidence-card > b { min-width: 54px; min-height: 54px; }
  .scan-retry-bar { align-items: stretch; flex-direction: column; }
  .scan-retry-bar .button { width: 100%; }
}

/* BinderWorth 3.4 — onboarding and reliability polish */
.network-status-banner { display:flex; align-items:center; gap:12px; margin:0 0 14px; padding:12px 14px; border:1px solid rgba(255,190,88,.28); border-radius:16px; background:rgba(255,183,77,.09); color:var(--text); }
.network-status-banner.hidden { display:none; }
.network-status-banner.online { border-color:rgba(83,220,166,.28); background:rgba(83,220,166,.09); }
.network-status-icon { display:grid; place-items:center; width:34px; height:34px; flex:0 0 34px; border-radius:11px; background:rgba(255,255,255,.07); font-weight:900; }
.network-status-banner div { min-width:0; flex:1; }
.network-status-banner strong, .network-status-banner span { display:block; }
.network-status-banner span { color:var(--muted); font-size:12px; }
.network-status-banner .text-button { flex:0 0 auto; }

.getting-started-panel { margin-bottom:16px; border-color:rgba(86,215,255,.22); background:linear-gradient(145deg,rgba(36,42,83,.9),rgba(25,28,58,.92)); }
.getting-started-panel.hidden { display:none; }
.getting-started-head { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; margin-bottom:16px; }
.getting-started-head h3 { margin:3px 0 5px; }
.getting-started-head p:last-child { margin:0; color:var(--muted); }
.getting-started-steps { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.getting-started-steps button { display:grid; grid-template-columns:38px minmax(0,1fr) auto; align-items:center; gap:10px; min-height:92px; padding:13px; border:1px solid rgba(255,255,255,.08); border-radius:15px; color:var(--text); background:rgba(255,255,255,.035); text-align:left; cursor:pointer; }
.getting-started-steps button:hover { border-color:rgba(86,215,255,.35); transform:translateY(-1px); }
.getting-started-steps b { display:grid; place-items:center; width:34px; height:34px; border-radius:12px; background:linear-gradient(135deg,#7d5cff,#3ecfff); color:white; }
.getting-started-steps strong, .getting-started-steps small { display:block; }
.getting-started-steps small { margin-top:3px; color:var(--muted); line-height:1.3; }
.getting-started-steps i { color:#73dcff; font-style:normal; font-size:22px; }

.welcome-modal::backdrop { background:rgba(4,6,18,.78); backdrop-filter:blur(8px); }
.welcome-frame { width:min(620px,calc(100vw - 24px)); overflow:hidden; }
.welcome-progress { display:flex; gap:7px; margin:0 0 24px; padding-right:40px; }
.welcome-progress i { display:block; width:28px; height:5px; border-radius:999px; background:rgba(255,255,255,.10); transition:.2s ease; }
.welcome-progress i.active { width:46px; background:linear-gradient(90deg,#825cff,#4bd7ff); }
.welcome-slide { display:none; min-height:300px; animation:welcomeIn .22s ease; }
.welcome-slide.active { display:block; }
.welcome-slide h2 { font-size:clamp(28px,5vw,42px); line-height:1.04; margin:7px 0 12px; }
.welcome-slide > p:last-child { color:var(--muted); font-size:16px; max-width:54ch; }
.welcome-visual { display:flex; align-items:center; gap:12px; min-height:112px; margin-bottom:22px; }
.welcome-logo-mark { display:grid; place-items:center; width:92px; height:92px; border-radius:26px; background:linear-gradient(145deg,#7652ff,#35d8ff); color:#fff; font-size:29px; font-weight:950; box-shadow:0 18px 44px rgba(88,99,255,.28); transform:rotate(-4deg); }
.welcome-visual span { padding:7px 11px; border:1px solid rgba(255,255,255,.10); border-radius:999px; color:#cdd5ff; background:rgba(255,255,255,.04); font-size:12px; font-weight:800; }
.welcome-step-visual { display:flex; align-items:center; justify-content:center; gap:8px; min-height:120px; margin-bottom:20px; padding:18px; border-radius:20px; background:linear-gradient(135deg,rgba(126,90,255,.12),rgba(62,207,255,.08)); }
.welcome-step-visual b { display:grid; place-items:center; width:50px; height:50px; border-radius:16px; background:rgba(255,255,255,.08); font-size:21px; }
.welcome-step-visual span { color:var(--muted); font-size:11px; font-weight:800; }
.welcome-step-visual i { color:#71dcff; font-style:normal; }
.welcome-feature-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:8px 0 24px; }
.welcome-feature-grid span { display:flex; align-items:center; gap:9px; min-height:64px; padding:13px; border:1px solid rgba(255,255,255,.08); border-radius:15px; background:rgba(255,255,255,.035); color:#77dcff; }
.welcome-feature-grid strong { color:var(--text); }
.welcome-actions { display:flex; align-items:center; gap:9px; padding-top:8px; border-top:1px solid rgba(255,255,255,.07); }
@keyframes welcomeIn { from { opacity:0; transform:translateX(8px); } to { opacity:1; transform:none; } }

.retry-empty { display:grid; gap:12px; justify-items:center; }
.retry-empty .button { min-width:140px; }

@media (max-width:800px) {
  .getting-started-head { flex-direction:column; gap:8px; }
  .getting-started-steps { grid-template-columns:1fr; }
  .getting-started-steps button { min-height:78px; }
  .network-status-banner { align-items:flex-start; }
  .network-status-banner .text-button { align-self:center; }
}
@media (max-width:520px) {
  .welcome-feature-grid { grid-template-columns:1fr; }
  .welcome-step-visual { gap:5px; }
  .welcome-step-visual b { width:42px; height:42px; }
  .welcome-step-visual span { display:none; }
}
/* 3.4 colour corrections for dark onboarding surfaces */
.getting-started-panel { color:#fff; }
.getting-started-panel .getting-started-head p:last-child,
.getting-started-panel .getting-started-steps small { color:#b7c2e3; }
.getting-started-panel .text-button { color:#83e5ff; }
.getting-started-steps button { color:#fff; }
.welcome-modal { background:#111632; color:#fff; }
.welcome-modal .modal-close { color:#aeb8d6; }
.welcome-modal .eyebrow { color:#9adfff; }
.welcome-slide > p:last-child { color:#b6bfdc; }
.welcome-feature-grid strong { color:#fff; }
.network-status-banner { color:var(--ink); }
.welcome-actions .button.ghost { background:rgba(255,255,255,.07); color:#fff; border-color:rgba(255,255,255,.11); }
.welcome-actions .button.subtle { background:transparent; color:#b6bfdc; border-color:transparent; }
.scan-recovery-actions .button-row { justify-content:center; margin-top:10px; }

@media (max-width: 520px) {
  .brand img { max-width: 170px; height: auto; }
  .topbar-brand-logo { max-width: 154px; height: auto; }
}
