:root {
  --plum: #2B1640;
  --plum-2: #3A2156;
  --porcelain: #F6F4FA;
  --paper: #FFFFFF;
  --ink: #1E1726;
  --ink-2: #5A5066;
  --line: #E3DEEC;
  --amethyst: #6B3FA0;
  --amethyst-dark: #55307F;
  --gold: #B8892B;
  --gold-soft: #F4EAD2;
  --ok: #2F7D4F;
  --warn: #A4471E;
  --radius-s: 8px;
  --radius-m: 14px;
  --tabs-h: 64px;
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--porcelain);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom));
}
a { color: var(--amethyst); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- frame ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--plum); color: #F6F4FA;
}
.mark { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.mark span { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: 0.04em; }
.me-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px;
  border-radius: 999px; background: var(--plum-2); color: #F6F4FA; text-decoration: none; font-size: 14px;
}
.me-chip .piece { color: var(--gold); font-size: 18px; line-height: 1; }

main { max-width: 640px; margin: 0 auto; padding: 18px 16px 28px; outline: none; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(6, 1fr);
  height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--paper); border-top: 1px solid var(--line);
}
.tabs a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--ink-2); text-decoration: none; font-size: 11px; font-weight: 500;
}
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.tabs a[aria-current="page"] { color: var(--amethyst); }
.tabs a[aria-current="page"] svg { stroke-width: 2.4; }

/* ---------- type ---------- */
h1 { font-size: 26px; line-height: 1.2; margin: 4px 0 6px; letter-spacing: -0.01em; }
h2 { font-size: 19px; line-height: 1.3; margin: 26px 0 10px; }
h3 { font-size: 16px; margin: 0 0 4px; }
p { margin: 0 0 12px; }
.lede { color: var(--ink-2); margin-bottom: 18px; }
.small { font-size: 14px; color: var(--ink-2); }
.rank-name { font-family: var(--display); font-weight: 700; letter-spacing: 0.03em; }

/* ---------- surfaces ---------- */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px; margin-bottom: 12px; }
.list { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); margin-bottom: 12px; }
.list > a, .list > div { display: block; padding: 14px 16px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.list > :first-child { border-top: 0; }
.list .meta { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.empty { color: var(--ink-2); padding: 18px 16px; }

/* gold means earned: streaks, ranks, best answers */
.earned { color: var(--gold); }
.streak { display: flex; align-items: baseline; gap: 10px; }
.streak b { font-size: 34px; line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border: 0; border-radius: var(--radius-s);
  background: var(--amethyst); color: #fff; font: 600 16px var(--body); cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--amethyst-dark); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.quiet { background: transparent; color: var(--amethyst); border: 1px solid var(--line); }
.btn.block { width: 100%; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
input, select, textarea {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-s);
  font: 16px var(--body); color: var(--ink); background: var(--paper);
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--amethyst); outline: none; box-shadow: 0 0 0 3px #6B3FA022; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: end; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  position: relative; display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; font-size: 15px;
}
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice:has(input:checked) { background: var(--plum); border-color: var(--plum); color: #fff; }
.choice:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: auto; margin-top: 4px; }

/* ---------- welcome ---------- */
.welcome { margin: -18px -16px 0; padding: 22px 22px 34px; background: var(--plum); color: var(--porcelain); }
.welcome h1 { font-family: var(--display); font-size: 34px; letter-spacing: 0.02em; margin-bottom: 14px; }
.welcome p { color: #DCD3EA; max-width: 34ch; }
.ladder-mini { font-size: 30px; letter-spacing: 6px; color: #8E79AC; margin: 18px 0 4px; }
.ladder-mini .on { color: var(--gold); }

/* ---------- the rank ladder (the one bold thing) ---------- */
.ladder { margin: -18px -16px 4px; padding: 22px 16px 18px; background: var(--plum); color: var(--porcelain); }
.ladder ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); position: relative; }
.ladder ol::before { content: ""; position: absolute; left: 8%; right: 8%; top: 27px; height: 2px; background: #4D3270; }
.ladder ol > li { position: relative; text-align: center; font-size: 11px; color: #A592C0; }
.ladder .p { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 6px; border-radius: 50%;
  background: var(--plum); border: 2px solid #4D3270; font-size: 30px; line-height: 1; color: #8E79AC; position: relative; z-index: 1; }
.ladder ol > li.done .p { color: var(--porcelain); border-color: #8E79AC; }
.ladder ol > li.here .p { color: var(--plum); background: var(--gold); border-color: var(--gold); }
.ladder ol > li.here { color: var(--gold); font-weight: 700; }
.ladder .now { margin-top: 18px; }
.ladder .now .rank-name { font-size: 26px; color: var(--gold); display: block; }
.ladder .need { color: #DCD3EA; font-size: 14px; margin: 8px 0 0; padding-left: 18px; text-align: left; }
.bar-meter { height: 8px; border-radius: 999px; background: #4D3270; overflow: hidden; margin-top: 10px; }
.bar-meter i { display: block; height: 100%; background: var(--gold); }

/* ---------- Q&A ---------- */
.answer { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; margin-bottom: 10px; }
.answer.ai { border-style: dashed; background: #FBFAFD; }
.answer.best { border-color: var(--gold); box-shadow: inset 4px 0 0 var(--gold); }
.answer .who { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 14px; margin-bottom: 8px; }
.answer .who b { font-weight: 700; }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #EEE8F6; color: var(--amethyst-dark); }
.tag.gold { background: var(--gold-soft); color: #7A5814; }
.tag.ok { background: #E3F2E9; color: var(--ok); }
.body-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.body-text strong { font-weight: 700; }
.votes { display: flex; gap: 8px; margin-top: 10px; }
.vote { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font: 14px var(--body); cursor: pointer; }
.vote[aria-pressed="true"] { background: var(--plum); color: #fff; border-color: var(--plum); }

/* ---------- lessons ---------- */
.path { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.path .count { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.lesson-link { display: flex !important; justify-content: space-between; gap: 10px; }
.lesson-link .state { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.lesson-link.done .state { color: var(--ok); }
.lesson-body { font-size: 17px; line-height: 1.65; }
.lesson-body table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 10px 0; display: block; overflow-x: auto; }
.lesson-body th, .lesson-body td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; }
.lesson-body code { background: #EEE8F6; padding: 1px 5px; border-radius: 4px; }
.anim { aspect-ratio: 16/9; border-radius: var(--radius-m); background: var(--plum); display: grid; place-items: center; color: #A592C0; margin-bottom: 16px; overflow: hidden; }
.anim video { width: 100%; height: 100%; object-fit: cover; }
.quiz fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.quiz legend { font-weight: 600; margin-bottom: 8px; }
.quiz .opt { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); margin-bottom: 6px; background: var(--paper); font-weight: 400; }
.quiz .opt input { width: auto; }
.quiz .opt.right { border-color: var(--ok); background: #EEF7F1; }
.quiz .opt.wrong { border-color: var(--warn); background: #FBEFEA; }
.why { font-size: 14px; color: var(--ink-2); margin: 4px 0 0; }

/* ---------- calculators ---------- */
.result { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-variant-numeric: tabular-nums; }
.result dt { color: var(--ink-2); }
.result dd { margin: 0; text-align: right; font-weight: 600; }
.result .big { font-size: 22px; }
.verdict { font-weight: 700; }
.verdict.good { color: var(--ok); }
.verdict.bad { color: var(--warn); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); padding: 3px; margin-bottom: 12px; }
.seg button { border: 0; background: none; padding: 8px 16px; border-radius: 999px; font: 600 14px var(--body); color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--plum); color: #fff; }

/* ---------- misc ---------- */
#toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-s); font-size: 15px; z-index: 30;
  max-width: calc(100% - 32px); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
#toast.show { opacity: 1; }
.back { display: inline-block; margin-bottom: 8px; text-decoration: none; font-size: 15px; }
.notice { background: var(--gold-soft); border-radius: var(--radius-s); padding: 12px 14px; font-size: 15px; margin-bottom: 12px; }
.error { color: var(--warn); font-size: 14px; margin-top: 8px; min-height: 1em; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 8px; }
.stats b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.stats span { font-size: 13px; color: var(--ink-2); }
.bars .b { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 4px 0; }
.bars .b i { height: 8px; background: #CFC3E2; border-radius: 4px; display: block; }
.bars .b.mine i { background: var(--amethyst); }
.bars .b.right span:first-child { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (min-width: 700px) {
  main { padding-top: 28px; }
  .welcome { border-radius: 0 0 var(--radius-m) var(--radius-m); }
}

/* ---------- Rooms (chat) ---------- */
.room-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.chat { display: flex; flex-direction: column; gap: 10px; padding-bottom: 86px; }
.msg { background: var(--paper); border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; padding: 8px 12px; max-width: 88%; }
.msg.mine { align-self: flex-end; background: #EFE9F7; border-radius: 12px 12px 4px 12px; }
.msg .who { font-size: 13px; margin-bottom: 2px; }
.msg .who b { font-weight: 700; }
.msg .t { font-size: 12px; color: var(--ink-2); }
.msg .mods { display: flex; gap: 6px; margin-top: 6px; }
.msg .mods button { font: 12px var(--body); border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 2px 8px; cursor: pointer; }
.pinned { background: var(--gold-soft); border-radius: var(--radius-s); padding: 8px 12px; font-size: 14px; margin-bottom: 10px; }
.composer { position: fixed; left: 0; right: 0; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); background: var(--porcelain);
  border-top: 1px solid var(--line); padding: 8px 12px; z-index: 9; }
.composer form { max-width: 640px; margin: 0 auto; display: flex; gap: 8px; }
.composer input { flex: 1; }
.room-list .lock { font-size: 13px; color: var(--ink-2); }

/* ---------- Deals ---------- */
.deal { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; margin-bottom: 10px; color: inherit; text-decoration: none; }
.deal .price { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.deal .facts { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.deal .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.deal-photos { display: flex; gap: 8px; overflow-x: auto; margin: 10px 0; }
.deal-photos img { height: 160px; border-radius: var(--radius-s); }
.locked-note { background: var(--plum); color: #DCD3EA; border-radius: var(--radius-m); padding: 14px 16px; margin-bottom: 12px; }
.locked-note strong { color: var(--gold); }

/* ---------- Membership ladder ---------- */
.tier { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px; margin-bottom: 14px; }
.tier.inner { border-color: var(--gold); box-shadow: inset 0 3px 0 var(--gold); }
.tier h3 { font-family: var(--display); font-size: 19px; letter-spacing: 0.02em; margin-bottom: 6px; }
.steps { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin: 12px 0 4px; }
.steps i { flex: 1; background: #CFC3E2; border-radius: 4px 4px 0 0; position: relative; }
.steps i.now { background: var(--gold); }
.steps-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); }
.seats { font-weight: 700; color: var(--gold); }

/* v0.3: forum, webinars, deal map */
.seg a.segl { display: inline-block; padding: 8px 16px; border-radius: 999px; font: 600 14px var(--body); color: var(--ink-2); text-decoration: none; }
.seg a.segl[aria-pressed="true"] { background: var(--plum); color: #fff; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 7px 14px; font: 600 14px var(--body); color: var(--ink-2); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--plum); border-color: var(--plum); color: #fff; }
.dealmap { height: 62vh; min-height: 360px; border-radius: var(--radius-m); border: 1px solid var(--line); overflow: hidden; }
.leaflet-popup-content { font: 14px/1.4 var(--body); }
.leaflet-popup-content a { color: var(--amethyst); font-weight: 600; }

/* v0.3: disclosures, not-advice, report and block */
.not-advice { font-size: 12px; line-height: 1.45; color: var(--ink-2); border-top: 1px solid var(--line); margin-top: 18px; padding-top: 10px; }
.not-advice a { color: inherit; }
.disclosure { background: #FFF7E3; border: 1px solid #E8C979; border-radius: var(--radius-s); padding: 12px 14px; margin: 12px 0; font-size: 14px; line-height: 1.45; color: #4A3A12; }
.linkish { background: none; border: 0; padding: 0; color: var(--amethyst); font: inherit; text-decoration: underline; cursor: pointer; }
.msg .who { cursor: pointer; }
.msg .acts { display: flex; gap: 6px; margin-top: 6px; }
.msg .acts button { font: 12px var(--body); border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 2px 8px; cursor: pointer; }
.sel { user-select: all; font-weight: 600; }

/* v0.4: Deal Puzzle, leaderboard, My deals, driving for dollars */
.puzzle-card { display: block; text-decoration: none; color: inherit; border-color: var(--gold); }
.pz-head { display: flex; align-items: center; gap: 12px; }
.pz-head > div { flex: 1; min-width: 0; }
.pz-piece { width: 44px; height: 44px; border-radius: 50%; background: var(--plum); color: var(--gold); display: grid; place-items: center; font-size: 26px; flex: none; }
.season { display: block; text-decoration: none; color: inherit; }
.puzzle h1 { font-size: 24px; }
.facts { margin: 10px 0 14px; padding-left: 18px; }
.facts li { margin: 4px 0; font-variant-numeric: tabular-nums; }
.pz-options { display: grid; gap: 8px; }
.pz-opt { text-align: left; font: 500 15px/1.35 var(--body); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--paper); color: var(--ink); cursor: pointer; }
.pz-opt:not([disabled]):hover { border-color: var(--amethyst); }
.pz-opt.right { border-color: #2F8F5B; background: #E9F6EE; }
.pz-opt.wrong { border-color: #B0473A; background: #FBECEA; }
.pz-why { margin-top: 12px; line-height: 1.5; }
.lb > div { display: flex; align-items: center; gap: 10px; }
.lb .place { width: 28px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lb .pts { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.lb .me { background: #F3EEFA; }
.photos-row { display: flex; gap: 8px; overflow-x: auto; margin: 10px 0; align-items: center; }
.photos-row img { height: 110px; border-radius: var(--radius-s); flex: none; }
.addphoto { flex: none; height: 110px; min-width: 110px; padding: 0 12px; border: 1.5px dashed var(--line); border-radius: var(--radius-s); display: grid; place-items: center; font-weight: 600; color: var(--amethyst); cursor: pointer; }
.rh { display: flex; gap: 10px; align-items: center; }
.rh > div { flex: 1; min-width: 0; }
.rh select { width: auto; }
.ddrow { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.ddrow input { margin-top: 4px; width: 20px; height: 20px; flex: none; }
.d4row { display: flex; gap: 12px; align-items: center; }
.d4row img, .d4row .noimg { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; background: #EEE8F6; }
.d4row > div { min-width: 0; }
#mic { margin-top: 8px; }

a.chip { text-decoration: none; display: inline-block; }

/* v0.4.1: launch animation + the Deal Puzzle as a game */
#splash { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 10px;
  background: radial-gradient(ellipse at 50% 40%, #3A1D57 0%, #2B1640 45%, #140A1F 100%); color: #F6F1E6; transition: opacity .45s ease; }
#splash.out { opacity: 0; pointer-events: none; }
#splash .sp-pawn { width: 200px; height: auto; opacity: 0; transform: translateY(30px) scale(.6); filter: drop-shadow(0 18px 40px rgba(0,0,0,.55)); }
#splash .sp-name { font-family: var(--display); font-weight: 700; font-size: 34px; letter-spacing: .5em; opacity: 0; }
#splash .sp-tag { font-size: 14px; color: #F3D27A; opacity: 0; }
#splash .sp-ring { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -90px 0 0 -5px; border: 3px solid #D4A63C; border-radius: 50%; opacity: 0; }
#splash.go .sp-pawn { animation: spPawn .7s cubic-bezier(.2,1.4,.4,1) .1s forwards; }
#splash.go .sp-ring { animation: spRing 1s ease-out .45s forwards; }
#splash.go .sp-name { animation: spName .6s ease-out .6s forwards; }
#splash.go .sp-tag { animation: spFade .5s ease-out 1s forwards; }
@keyframes spPawn { to { opacity: 1; transform: none; } }
@keyframes spRing { 0% { opacity: .9; width: 10px; height: 10px; margin: -90px 0 0 -5px; } 100% { opacity: 0; width: 560px; height: 560px; margin: -365px 0 0 -280px; } }
@keyframes spName { to { opacity: 1; letter-spacing: .06em; } }
@keyframes spFade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #splash.go * { animation-duration: .01s !important; animation-delay: 0s !important; } }

.puzzle-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 12px; border-radius: var(--radius-m); text-decoration: none;
  color: #F6F1E6; background: linear-gradient(135deg, #2B1640, #140A1F); border: 1px solid #5A3F12; box-shadow: 0 6px 18px rgba(43,22,64,.25); }
.puzzle-card > div { flex: 1; min-width: 0; }
.puzzle-card .small { color: #CDBFE0; }
.puzzle-card .pz-piece { background: #D4A63C; color: #140A1F; }
.pz-kicker { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #F3D27A; }
.pz-go { background: #D4A63C; color: #140A1F; font-weight: 800; border-radius: 999px; padding: 8px 16px; }

.pz { position: relative; overflow: hidden; margin: -8px -4px 0; padding: 18px 16px 22px; border-radius: 22px; color: #F6F1E6;
  background: repeating-conic-gradient(rgba(212,166,60,.06) 0 25%, transparent 0 50%) 0 0 / 56px 56px, linear-gradient(170deg, #2B1640, #140A1F 75%); }
.pz-open { min-height: calc(100vh - 120px); }
.pz-top { display: flex; align-items: center; gap: 10px; }
.pz-num { font-family: var(--display); font-weight: 700; letter-spacing: .04em; color: #F3D27A; }
.pz-crowns i { font-style: normal; color: rgba(243,210,122,.25); font-size: 15px; }
.pz-crowns i.on { color: #F3D27A; }
.pz-skip { margin-left: auto; color: #CDBFE0; font-size: 14px; }
.pz-meta { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; }
.pz-streak { background: rgba(212,166,60,.18); color: #F3D27A; border-radius: 999px; padding: 3px 10px; font-weight: 700; }
.pz-clock { font-variant-numeric: tabular-nums; color: #CDBFE0; }
.pz-title { font-family: var(--display); font-size: 30px; line-height: 1.1; margin: 14px 0 8px; color: #fff; }
.pz-scene { font-size: 17px; line-height: 1.45; color: #E9E1F4; margin: 0 0 14px; }
.pz-board { list-style: none; padding: 12px 14px; margin: 0 0 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(243,210,122,.25); border-radius: 14px; }
.pz-board li { padding: 5px 0 5px 22px; position: relative; font-variant-numeric: tabular-nums; }
.pz-board li::before { content: "♟"; position: absolute; left: 0; color: #D4A63C; }
.pz-q { font-weight: 800; font-size: 18px; margin: 0 0 12px; }
.pz-moves { display: grid; gap: 10px; }
.pz-move { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px; border-radius: 14px; border: 1.5px solid rgba(243,210,122,.35);
  background: rgba(20,10,31,.55); color: #fff; font: 600 16px/1.35 var(--body); cursor: pointer; transition: transform .12s, background .2s, border-color .2s; }
.pz-move b { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; background: #D4A63C; color: #140A1F; font-family: var(--display); }
.pz-move span { flex: 1; }
.pz-move em { font-style: normal; font-family: var(--display); font-weight: 700; font-size: 20px; }
.pz-move:not([disabled]):active, .pz-move.picked { transform: scale(.97); }
.pz-move.best { border-color: #6FD49A; background: rgba(47,143,91,.35); }
.pz-move.best em { color: #9BF0BE; }
.pz-move.miss { border-color: #F08A7C; background: rgba(176,71,58,.35); }
.pz-move.miss em { color: #FFB3A8; }
.pz-move.dim { opacity: .45; }
.pz-move.shake { animation: pzShake .4s; }
@keyframes pzShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.pz-result { text-align: center; margin: 18px 0 12px; }
.pz-verdict { font-family: var(--display); font-size: 34px; font-weight: 700; }
.pz-result.won .pz-verdict { color: #F3D27A; animation: pzPop .5s cubic-bezier(.2,1.6,.4,1); }
.pz-result.lost .pz-verdict { color: #FFB3A8; }
.pz-sub { color: #CDBFE0; font-size: 14px; margin-top: 4px; }
@keyframes pzPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.pz-take { display: flex; gap: 12px; background: #F6F1E6; color: #1b1325; border-radius: 16px; padding: 14px; }
.pz-take p { margin: 4px 0 0; line-height: 1.5; }
.pz-king { width: 40px; height: 40px; flex: none; border-radius: 50%; background: #2B1640; color: #F3D27A; display: grid; place-items: center; font-size: 24px; }
.pz-actions { display: grid; gap: 10px; margin-top: 14px; }
.pz-actions .btn { width: 100%; text-align: center; }
.pz .btn.quiet { background: transparent; color: #F6F1E6; border-color: rgba(246,241,230,.4); }
.pz-upsell { font-size: 14px; color: #CDBFE0; text-align: center; margin-top: 12px; }
.pz-upsell a, .pz-fine a { color: #F3D27A; }
.pz-fine { font-size: 11px; color: rgba(205,191,224,.7); text-align: center; margin: 16px 0 0; }
.pz-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pz-confetti span { position: absolute; top: -30px; font-size: 22px; color: #F3D27A; animation: pzFall linear forwards; }
.pz-confetti span:nth-child(3n) { color: #fff; } .pz-confetti span:nth-child(4n) { color: #B9A6D6; }
@keyframes pzFall { to { transform: translate(var(--drift), 110vh) rotate(var(--spin)); opacity: .2; } }

/* v0.4.2: the crest logo */
.mark img { border-radius: 50%; }
.puzzle-card .pz-piece { background: url(/static/icons/mark-128.png) center / cover no-repeat; color: transparent; }

/* ===================== v0.5: premium layer ===================== */
/* Dark mode: follows the phone unless the member picks Light or Dark in Me */
:root[data-theme="dark"] {
  --porcelain: #120A1A; --paper: #1C1226; --ink: #EEE7F6; --ink-2: #B7A9C9; --line: #33263F;
  --amethyst: #C3A1F2; --amethyst-dark: #A57FE0; --gold-soft: #3A2E14; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --porcelain: #120A1A; --paper: #1C1226; --ink: #EEE7F6; --ink-2: #B7A9C9; --line: #33263F;
    --amethyst: #C3A1F2; --amethyst-dark: #A57FE0; --gold-soft: #3A2E14; color-scheme: dark;
  }
}
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { background: #140C1D; color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .msg.mine { background: #2A1C3A; }
:root[data-theme="dark"] .disclosure { background: #2E2410; border-color: #6B5320; color: #F3E3B8; }
:root[data-theme="dark"] .lb .me, :root[data-theme="dark"] .pz-opt.right { background: #23173A; }
:root[data-theme="dark"] .tabs { background: #170E20; border-color: var(--line); }
:root[data-theme="dark"] .btn.quiet { background: transparent; color: var(--ink); border-color: var(--line); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) input, :root:not([data-theme="light"]) select, :root:not([data-theme="light"]) textarea { background: #140C1D; color: var(--ink); border-color: var(--line); }
  :root:not([data-theme="light"]) .msg.mine { background: #2A1C3A; }
  :root:not([data-theme="light"]) .disclosure { background: #2E2410; border-color: #6B5320; color: #F3E3B8; }
  :root:not([data-theme="light"]) .tabs { background: #170E20; border-color: var(--line); }
  :root:not([data-theme="light"]) .btn.quiet { background: transparent; color: var(--ink); border-color: var(--line); }
}

/* Member tiers: gold trim for Guild members, black and gold for the Inner Circle */
body[data-tier="member"] .bar { box-shadow: inset 0 -3px 0 #B8892B; }
body[data-tier="member"] .me-chip { box-shadow: 0 0 0 1.5px #D4A63C; }
body[data-tier="inner"] .bar { background: linear-gradient(180deg, #0B0710, #16101C); box-shadow: inset 0 -2px 0 #D4A63C; }
body[data-tier="inner"] .bar .mark span { color: #F3D27A; }
body[data-tier="inner"] .me-chip { background: #D4A63C; color: #140A1F; }
body[data-tier="inner"] .tabs a[aria-current="page"] { color: #B8892B; }
body[data-tier="inner"] .btn:not(.quiet) { background: linear-gradient(180deg, #2B1640, #140A1F); box-shadow: inset 0 0 0 1px #B8892B; }

/* Screen transitions and loading placeholders */
#view.enter > * { animation: viewIn .22s ease-out both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.skel { display: grid; gap: 12px; padding-top: 8px; }
.skel i { display: block; height: 16px; border-radius: 8px; background: linear-gradient(90deg, var(--line) 25%, var(--paper) 50%, var(--line) 75%); background-size: 200% 100%; animation: shimmer 1.1s infinite linear; }
.skel i.h { height: 30px; width: 60%; } .skel i.card { height: 90px; border-radius: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { #view.enter > *, .skel i { animation: none; } }
.offline { text-align: center; padding: 24px 0 8px; }
.offline img { border-radius: 50%; }

/* Upgrade sheet */
.sheet-wrap { position: fixed; inset: 0; z-index: 90; background: rgba(10,6,14,.55); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .2s; }
.sheet-wrap.out { opacity: 0; transition: opacity .2s; }
.sheet { width: 100%; max-width: 520px; background: linear-gradient(180deg, #2B1640, #140A1F); color: #F6F1E6; border-radius: 24px 24px 0 0;
  padding: 18px 20px calc(22px + env(safe-area-inset-bottom)); text-align: center; animation: sheetUp .28s cubic-bezier(.2,1,.3,1); }
.sheet-crest { width: 84px; margin-top: -54px; filter: drop-shadow(0 10px 22px rgba(0,0,0,.5)); }
.sheet h2 { font-family: var(--display); color: #F3D27A; margin: 6px 0 6px; font-size: 24px; }
.sheet-why { color: #E9E1F4; margin: 0 0 8px; }
.sheet-perks { list-style: none; padding: 0; margin: 10px 0 16px; text-align: left; }
.sheet-perks li { padding: 7px 0 7px 26px; position: relative; border-bottom: 1px solid rgba(255,255,255,.08); }
.sheet-perks li::before { content: "♛"; position: absolute; left: 0; color: #D4A63C; }
.sheet .btn { margin-top: 8px; } .sheet .btn:not(.quiet) { background: #D4A63C; color: #140A1F; }
.sheet .btn.quiet { background: transparent; color: #F6F1E6; border-color: rgba(246,241,230,.35); }
.sheet .linkish { color: #CDBFE0; margin-top: 12px; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* "Deals you missed" teaser */
.teaser { position: relative; display: block; border-radius: var(--radius-m); overflow: hidden; margin: 0 0 12px; text-decoration: none; color: inherit; border: 1px solid var(--line); background: var(--paper); }
.ghosts { padding: 12px; display: grid; gap: 8px; filter: blur(4px); opacity: .7; }
.ghosts i { display: block; height: 44px; border-radius: 10px; background: linear-gradient(90deg, #E9E1F4, #F4EAD2); }
.teaser-text { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 12px;
  background: linear-gradient(180deg, rgba(43,22,64,.25), rgba(43,22,64,.85)); color: #fff; }
.teaser-text .lock { font-size: 22px; } .teaser-text .small { color: #EDE4F7; }

/* Crowning moment */
.crowning { position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 24px 24px calc(24px + env(safe-area-inset-bottom)); color: #F6F1E6; background: radial-gradient(ellipse at 50% 35%, #3A1D57, #140A1F 70%); overflow: hidden; }
.crowning.inner { background: radial-gradient(ellipse at 50% 35%, #2A2010, #050307 70%); }
.crowning.out { opacity: 0; transition: opacity .3s; }
.crowning .rays { position: absolute; left: 50%; top: 32%; width: 900px; height: 900px; margin: -450px 0 0 -450px; opacity: .35;
  background: repeating-conic-gradient(from 0deg, rgba(243,210,122,.35) 0 6deg, transparent 6deg 18deg); animation: spin 18s linear infinite;
  -webkit-mask-image: radial-gradient(circle, #000 0, transparent 60%); mask-image: radial-gradient(circle, #000 0, transparent 60%); }
.cr-crest { position: relative; width: 170px; animation: crownIn .9s cubic-bezier(.2,1.4,.4,1) both; filter: drop-shadow(0 18px 40px rgba(0,0,0,.6)); }
.cr-kicker { position: relative; margin-top: 18px; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; color: #F3D27A; animation: fadeIn .5s .5s both; }
.cr-title { position: relative; font-family: var(--display); font-size: 36px; margin: 6px 0 10px; color: #fff; animation: fadeIn .5s .65s both; }
.cr-sub { position: relative; max-width: 360px; color: #E9E1F4; animation: fadeIn .5s .8s both; }
.crowning .btn { position: relative; max-width: 360px; margin-top: 18px; background: #D4A63C; color: #140A1F; animation: fadeIn .5s 1s both; }
@keyframes crownIn { from { opacity: 0; transform: translateY(-60px) scale(.6) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .crowning .rays, .cr-crest { animation: none; } }

/* Sign-in options */
.alt-signin { display: grid; gap: 10px; margin-top: 14px; justify-items: center; }
.alt-signin .or { width: 100%; display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 13px; }
.alt-signin .or::before, .alt-signin .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.gbtn { min-height: 44px; }
.btn.apple { background: #000; color: #fff; }
.btn.apple span::before { content: ""; }

/* Calendar */
.cal-day { font-size: 15px; color: var(--ink-2); margin: 18px 0 6px; }
.list > .cal-item { display: flex; gap: 12px; align-items: flex-start; }
.cal-time { width: 64px; flex: none; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--ink-2); padding-top: 2px; }
.cal-body { flex: 1; min-width: 0; }
.cal-body a { color: inherit; text-decoration: none; display: block; margin-top: 4px; }
.cal-add { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line); text-decoration: none; font-size: 20px; font-weight: 700; }
.k-followup .cal-time { color: var(--gold); }

/* Member card */
.mcard { position: relative; overflow: hidden; border-radius: 18px; padding: 18px 18px 16px; margin-bottom: 4px; color: #F6F1E6; min-height: 170px;
  background: linear-gradient(135deg, #3A1D57, #1A0D28 60%, #2B1640); box-shadow: 0 12px 28px rgba(43,22,64,.35), inset 0 0 0 1px rgba(243,210,122,.35); }
.mcard.tier-inner { background: linear-gradient(135deg, #1A1408, #060408 55%, #2A2010); box-shadow: 0 12px 28px rgba(0,0,0,.4), inset 0 0 0 1.5px #D4A63C; }
.mcard.tier-free { background: linear-gradient(135deg, #3B3346, #1E1726); }
.mc-crest { position: absolute; right: 6px; top: 8px; width: 108px; opacity: .95; }
.mc-top { font-family: var(--display); letter-spacing: .2em; font-size: 12px; color: #F3D27A; }
.mc-name { font-family: var(--display); font-size: 24px; margin-top: 30px; max-width: 70%; line-height: 1.15; }
.mc-tier { color: #E9E1F4; font-size: 14px; margin-top: 2px; }
.mc-row { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 18px; max-width: 64%; font-size: 12px; letter-spacing: .06em; color: #CDBFE0; font-variant-numeric: tabular-nums; }

/* Rank coins */
.coins { display: flex; gap: 12px; justify-content: space-around; margin-top: 8px; }
.coin { display: grid; justify-items: center; gap: 2px; opacity: .45; }
.coin.on { opacity: 1; }
.coin span { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; color: #5A3F12;
  background: radial-gradient(circle at 35% 30%, #FBE7A9, #D4A63C 55%, #8C6416); box-shadow: inset 0 0 0 3px rgba(255,255,255,.35), 0 3px 8px rgba(0,0,0,.25); }
.coin small { font-size: 12px; color: var(--ink-2); }
:root[data-theme="dark"] .tag { background: #2A1C3A; color: #D9C9F0; }
:root[data-theme="dark"] .tag.gold { background: #3A2E14; color: #F3D27A; }
:root[data-theme="dark"] .tag.ok { background: #16301F; color: #9BE0B5; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tag { background: #2A1C3A; color: #D9C9F0; }
  :root:not([data-theme="light"]) .tag.gold { background: #3A2E14; color: #F3D27A; }
  :root:not([data-theme="light"]) .tag.ok { background: #16301F; color: #9BE0B5; }
}

/* ---------- v0.6: doors, address lookup, posting, grades, stats, bids, draws, leads ---------- */
.doors { display: grid; gap: 10px; }
.door { display: flex; gap: 14px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; color: inherit; text-decoration: none; }
.door b { font-size: 30px; line-height: 1; color: var(--gold); width: 30px; text-align: center; flex: none; }
.door strong { display: block; font-size: 17px; }
.door .small { display: block; margin-top: 2px; }
.door:focus-visible, .door:hover { border-color: var(--amethyst); }
.perks { margin: 16px 0; padding-left: 20px; }
.perks li { margin: 4px 0; }
.ac-wrap { position: relative; }
.ac { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: 0 10px 28px rgba(30, 23, 38, 0.16); }
.ac li { padding: 10px 12px; border-radius: 6px; cursor: pointer; font-size: 15px; }
.ac li[aria-selected="true"], .ac li:hover { background: #EEE8F6; }
:root[data-theme="dark"] .ac li[aria-selected="true"], :root[data-theme="dark"] .ac li:hover { background: #2A1C3A; }
.found { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius-m); padding: 14px 16px; margin-bottom: 12px; }
.found-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.found-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px 14px; margin: 0 0 10px; }
.found-facts dt { font-size: 12px; color: var(--ink-2); }
.found-facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.warn-line { color: var(--warn); font-weight: 600; font-size: 14px; margin: 0 0 8px; }
label .tag { margin-left: 4px; vertical-align: 1px; }
.buyers { margin-bottom: 12px; }
.buyers:empty { display: none; }
.buyers-n { display: flex; align-items: baseline; gap: 10px; background: var(--plum); color: #fff; border-radius: var(--radius-m) var(--radius-m) 0 0; padding: 12px 16px; }
.buyers-n b { font-size: 34px; font-family: var(--display); color: var(--gold); line-height: 1; }
.buyers .small { background: var(--paper); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius-m) var(--radius-m); padding: 10px 16px; margin: 0; }
.photos-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.photos-row img { width: 84px; height: 64px; object-fit: cover; border-radius: 6px; }
.grade { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; font: 700 15px var(--body); color: #fff; margin-right: 8px; vertical-align: 2px; }
.grade.big { width: 64px; height: 64px; font-size: 34px; border-radius: 12px; flex: none; margin: 0; }
.gA { background: var(--ok); } .gB { background: #4C8A3F; } .gC { background: var(--gold); } .gD { background: #B8642B; } .gF { background: var(--warn); }
.gradebox { display: flex; gap: 16px; align-items: flex-start; }
.gradebox p { margin: 0 0 8px; }
.flags { margin: 0 0 8px; padding-left: 18px; color: var(--warn); font-size: 14px; }
.ai-note { border-left: 3px solid var(--amethyst); padding-left: 10px; font-size: 15px; }
.stats5 { grid-template-columns: repeat(5, 1fr); }
.stats5 b { font-size: 19px; }
.stats5 span { font-size: 12px; }
.portfolio { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.portfolio figure { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.portfolio figure:has(img + img) { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; }
.portfolio img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.portfolio figcaption { grid-column: 1 / -1; padding: 8px 10px; font-size: 13px; }
.checks { margin: 8px 0 12px; padding-left: 0; list-style: none; }
.checks li { padding: 4px 0 4px 26px; position: relative; font-size: 15px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border: 2px solid var(--line); border-radius: 4px; }
.checks li.done { color: var(--ink-2); text-decoration: line-through; }
.checks li.done::before { background: var(--ok); border-color: var(--ok); }
.draws { display: grid; gap: 8px; }
.draw { display: flex; justify-content: space-between; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; }
.draw img { width: 90px; height: 68px; object-fit: cover; border-radius: 6px; margin-top: 6px; display: block; }
.draw.confirmed, .draw.paid { border-left: 4px solid var(--ok); }
.draw.requested { border-left: 4px solid var(--gold); }
.featured { background: var(--gold-soft); border-radius: var(--radius-m); padding: 10px 12px; margin-bottom: 12px; }
.featured a { display: flex; flex-direction: column; padding: 8px 0 0; color: inherit; text-decoration: none; }
.lead .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.lead .score { font: 700 18px var(--body); color: var(--amethyst); font-variant-numeric: tabular-nums; }
.seg.scroll { display: flex; overflow-x: auto; max-width: 100%; }
.seg.scroll button { white-space: nowrap; }
.live-next { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.live-next > div { flex: 1 1 160px; }
.live-next strong { display: block; font-size: 18px; }
.cl-steps { list-style: none; padding: 0; margin: 12px 0; counter-reset: s; }
.cl-steps li { counter-increment: s; border-top: 1px solid var(--line); }
.cl-steps li:first-child { border-top: 0; }
.cl-steps a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0 10px 38px; position: relative; color: inherit; text-decoration: none; }
.cl-steps a::before { content: counter(s); position: absolute; left: 0; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.cl-steps li.done a::before { content: "\2713"; background: var(--ok); border-color: var(--ok); color: #fff; }
.roles .rolerow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.roles .rolerow:first-child { border-top: 0; padding-top: 0; }
.roles .rolerow strong { display: block; }
.lender summary { cursor: pointer; list-style: none; }
.lender summary::-webkit-details-marker { display: none; }
.lender[open] summary { margin-bottom: 10px; }
@media (max-width: 380px) { .stats5 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- v0.7: Recommended ---------- */
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0 10px; margin: 0 -16px; padding-left: 16px; scrollbar-width: none; }
.chips button { flex: none; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 7px 14px; font: 600 14px var(--body); cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--plum); border-color: var(--plum); color: #fff; }
.recs { margin-bottom: 12px; }
.rec { display: flex; gap: 12px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px; margin-bottom: 8px; color: inherit; text-decoration: none; }
.rec .place { font: 700 15px var(--display); color: var(--ink-2); width: 22px; text-align: center; flex: none; }
.rec:nth-child(-n+3) .place { color: var(--gold); font-size: 19px; }
.rec-main { flex: 1; min-width: 0; }
.rec .count { text-align: center; flex: none; min-width: 58px; }
.rec .count b { display: block; font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--amethyst); }
.rec .count span { font-size: 11px; color: var(--ink-2); }
.dblock { display: block; }
.stars { color: var(--gold); letter-spacing: 1px; }
.rate { display: flex; gap: 4px; margin: 4px 0 8px; flex-direction: row; }
.rate label { cursor: pointer; }
.rate input { position: absolute; opacity: 0; width: 0; height: 0; }
.rate span { font-size: 32px; line-height: 1; color: var(--line); transition: color .12s; }
.rate:has(input:checked) label span { color: var(--gold); }
.rate label:has(input:checked) ~ label span { color: var(--line); }
.rate label:has(input:focus-visible) span { outline: 2px solid var(--amethyst); border-radius: 4px; }
.notice a.dblock { margin-top: 6px; }

/* ---------- v0.8: My team ---------- */
.tm-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.tm-progress .bar-meter { flex: 1; margin: 0; }
.tm-flow { list-style: none; padding: 0; margin: 0; position: relative; }
.tm-step { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px; margin: 0 0 18px; }
.tm-step:not(:last-child)::after { content: ""; position: absolute; left: 27px; bottom: -19px; width: 2px; height: 18px; background: var(--line); }
.tm-step.filled:not(:last-child)::after { background: var(--gold); }
.tm-head { display: flex; align-items: center; gap: 12px; }
.tm-head > div { flex: 1; }
.tm-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 14px var(--body); border: 2px solid var(--line); color: var(--ink-2); flex: none; }
.tm-step.filled .tm-num { background: var(--plum); border-color: var(--gold); color: var(--gold); }
.tm-empty { margin: 8px 0 0 40px; }
.tm-person { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.tm-who { flex: 1; display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; min-width: 0; }
.tm-init { width: 38px; height: 38px; border-radius: 50%; background: var(--gold-soft); color: #7A5814; display: grid; place-items: center; font: 700 16px var(--display); flex: none; }
.tm-person.bench .tm-init { background: transparent; border: 1px dashed var(--line); color: var(--ink-2); }
.tm-bench { margin-top: 8px; }
.tm-bench summary { cursor: pointer; font-size: 14px; color: var(--amethyst); }
.tm-suggest { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.chip-add { border: 1px dashed var(--amethyst); background: transparent; color: var(--amethyst); border-radius: 999px; padding: 5px 10px; font: 600 13px var(--body); cursor: pointer; }
.tm-picker { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.tm-results { display: grid; gap: 6px; margin: 8px 0; }
.tm-hit { text-align: left; background: var(--porcelain); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; color: var(--ink); font: 15px var(--body); cursor: pointer; }
.tm-hit:hover, .tm-hit:focus-visible { border-color: var(--amethyst); }
.learn-more { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-2); margin: 8px 0 0; }
.learn-more a { color: var(--amethyst); font-weight: 600; }
.lm-mark { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--gold-soft); color: #7A5814; display: grid; place-items: center; font: 700 11px var(--body); margin-top: 1px; }
.tm-step .learn-more { margin-left: 40px; }
.sbx-banner { position: relative; z-index: 60; background: var(--gold); color: #1E1726; text-align: center; font: 700 12px var(--body); padding: 4px 8px; letter-spacing: .02em; }
