/* ============================================================
   The Broom Book — design system
   Aesthetic: a private wedding suite meets the casino floor.
   Warm ivory paper, deep table-felt green, brushed gold.
   ============================================================ */

:root {
  --paper:        #f5f1e8;
  --paper-2:      #fdfaf3;
  --card:         #ffffff;
  --ink:          #1a1b17;
  --ink-soft:     #56584f;
  --ink-faint:    #8a8c83;
  --line:         #e4dece;
  --line-strong:  #d4ccb8;

  --green:        #14502f;
  --green-deep:   #0c3520;
  --green-soft:   #e8f2eb;
  --felt:         #0c3520;
  --gold:         #c9a227;
  --gold-rich:    #b8893b;
  --gold-soft:    #f3e8d2;
  --red:          #b23b3b;
  --red-soft:     #f7e9e6;
  --blue:         #2f5d8a;

  --shadow-sm: 0 1px 2px rgba(28,29,26,.05), 0 1px 3px rgba(28,29,26,.04);
  --shadow-md: 0 4px 14px rgba(28,29,26,.07), 0 2px 6px rgba(28,29,26,.05);
  --shadow-lg: 0 18px 50px rgba(28,29,26,.16), 0 6px 18px rgba(28,29,26,.10);

  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --nav-h: 66px;
  --max: 560px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    repeating-linear-gradient(45deg,  transparent, transparent 22px, rgba(184,137,59,.028) 22px, rgba(184,137,59,.028) 23px),
    repeating-linear-gradient(-45deg, transparent, transparent 22px, rgba(184,137,59,.028) 22px, rgba(184,137,59,.028) 23px),
    radial-gradient(130% 65% at 50% -8%, #f8f5ec 0%, var(--paper) 60%) fixed,
    var(--paper);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 16px; color: var(--ink); }
a { color: inherit; }

/* ---- layout -------------------------------------------------- */
#app { max-width: var(--max); margin: 0 auto; min-height: 100dvh; position: relative; }

.screen {
  padding: 0 16px calc(var(--nav-h) + env(safe-area-inset-bottom) + 36px);
  animation: rise .32s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- top bar ------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 16px 12px;
  background: linear-gradient(to bottom, var(--paper) 70%, rgba(247,244,238,0));
  backdrop-filter: blur(6px);
}
.brand { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand .eyebrow {
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
}
.brand h1 {
  font-family: var(--serif); font-weight: 600; font-size: 22px;
  letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.balance-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--felt); color: #fdf8e8;
  padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 15px;
  box-shadow: var(--shadow-sm); white-space: nowrap;
  border: 2px dashed rgba(201,162,39,.55);
  letter-spacing: .01em;
}
.balance-pill .coin { font-size: 14px; filter: saturate(1.2); }
.balance-pill.flash { animation: pop .5s ease; }
@keyframes pop { 0%{transform:scale(1)} 35%{transform:scale(1.12)} 100%{transform:scale(1)} }

/* ---- section heads ------------------------------------------ */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 2px 12px; }
.section-head h2 { font-family: var(--serif); font-weight: 600; font-size: 25px; letter-spacing: -.015em; }
.section-head h2::before { content: '♦ '; color: var(--gold); font-size: .6em; vertical-align: .12em; }
.section-head .hint { font-size: 12.5px; color: var(--ink-faint); }

/* ---- filter tabs -------------------------------------------- */
.tabs { display: inline-flex; gap: 4px; background: #efeae0; padding: 4px; border-radius: 999px; }
.tabs button {
  padding: 7px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  color: var(--ink-soft); transition: .18s;
}
.tabs button.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---- market card -------------------------------------------- */
/* card suit watermark on every market card */
.card { position: relative; }
.card::after {
  content: '♠'; position: absolute; bottom: 10px; right: 14px;
  font-size: 52px; color: var(--line); opacity: .35; pointer-events: none;
  line-height: 1; z-index: 0;
}
.card:nth-child(2n)::after  { content: '♥'; color: #d4a0a0; }
.card:nth-child(3n)::after  { content: '♦'; color: #d4b87a; }
.card:nth-child(4n)::after  { content: '♣'; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  padding: 16px; margin-bottom: 14px; position: relative; overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card.tap:active { transform: scale(.99); }
.card .topline { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; flex-wrap: wrap; }

.chip {
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px;
}
.chip.ou   { background: var(--gold-soft); color: #8a6321; }
.chip.yn   { background: var(--green-soft); color: var(--green); }
.chip.live { background: var(--red-soft); color: var(--red); }
.chip.locked { background: #ecebe6; color: var(--ink-soft); }
.chip.resolved { background: var(--green); color: #fdfbf4; }
.chip.void { background: #ecebe6; color: var(--ink-faint); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1.6s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.35} }

.card h3 { font-family: var(--serif); font-weight: 600; font-size: 18.5px; line-height: 1.25; letter-spacing: -.01em; }
.card .desc { font-size: 13.5px; color: var(--ink-soft); margin-top: 5px; }
.card .meta { font-size: 12px; color: var(--ink-faint); margin-top: 10px; display: flex; gap: 12px; flex-wrap: wrap; }
.card .meta b { color: var(--ink-soft); font-weight: 600; }

/* outcome rows */
.outcomes { margin-top: 13px; display: flex; flex-direction: column; gap: 8px; }
.outcome {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 14px; border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--line); background: var(--paper-2); text-align: left; width: 100%;
  transition: .15s;
}
.outcome .fill {
  position: absolute; inset: 0 auto 0 0; background: var(--green-soft);
  border-radius: var(--r); transition: width .5s cubic-bezier(.2,.7,.3,1); z-index: 0;
}
.outcome:nth-child(2) .fill { background: var(--gold-soft); }
.outcome > * { position: relative; z-index: 1; }
.outcome .o-left { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.outcome .o-label { font-weight: 600; font-size: 14.5px; line-height: 1.2; }
.outcome .mine-tag {
  font-size: 10px; font-weight: 700; color: var(--gold); margin-top: 4px;
  letter-spacing: .01em; display: flex; align-items: center; gap: 3px;
}
.outcome .o-right {
  text-align: right; display: flex; flex-direction: column; align-items: flex-end;
  line-height: 1.15; flex-shrink: 0;
}
.outcome .o-prob { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.outcome .o-mult { font-size: 11px; color: var(--ink-faint); margin-top: 2px; font-variant-numeric: tabular-nums; }
.outcome.win { border-color: var(--green); box-shadow: 0 0 0 1.5px var(--green) inset; }
.outcome.win .fill { background: var(--green-soft); width: 100% !important; }
.outcome.btn:active { transform: scale(.985); }
.outcome.btn { cursor: pointer; }

/* ---- empty state -------------------------------------------- */
.empty { text-align: center; padding: 54px 24px; color: var(--ink-faint); }
.empty .big { font-size: 40px; margin-bottom: 10px; }
.empty h3 { font-family: var(--serif); font-size: 20px; color: var(--ink-soft); font-weight: 600; }
.empty p { font-size: 14px; margin-top: 6px; }

/* ---- leaderboard -------------------------------------------- */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: 8px 0 22px; }
.pod { display: flex; flex-direction: column; align-items: center; flex: 1; max-width: 130px; }
.pod .av { margin-bottom: 8px; }
.pod .plate {
  width: 100%; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r) var(--r) 6px 6px; box-shadow: var(--shadow-sm);
  text-align: center; padding: 12px 6px 14px;
}
.pod.p1 .plate { padding-bottom: 30px; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold-soft), var(--shadow-md); }
.pod.p2 .plate { padding-bottom: 18px; }
.pod .rank-em { font-size: 22px; }
.pod .pname { font-weight: 600; font-size: 13px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pod .pbal { font-size: 12.5px; color: var(--green); font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }

.lb-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  margin-bottom: 8px; box-shadow: var(--shadow-sm);
}
.lb-row.me { border-color: var(--green); box-shadow: 0 0 0 1.5px var(--green-soft); }
.lb-rank { width: 22px; text-align: center; font-weight: 700; color: var(--ink-faint); font-size: 14px; }
.lb-main { flex: 1; min-width: 0; }
.lb-name { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.lb-sub { font-size: 11.5px; color: var(--ink-faint); margin-top: 1px; }
.lb-bal { text-align: right; }
.lb-bal .b { font-weight: 700; font-size: 15.5px; font-variant-numeric: tabular-nums; }
.lb-bal .p { font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.up { color: var(--green); } .down { color: var(--red); }

.badge {
  font-size: 9.5px; font-weight: 700; letter-spacing: .03em; padding: 2px 7px;
  border-radius: 999px; background: var(--gold-soft); color: #8a6321; white-space: nowrap;
}

/* avatar */
.av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 15px; flex-shrink: 0; box-shadow: var(--shadow-sm); }
.av.lg { width: 64px; height: 64px; font-size: 24px; }
.av.sm { width: 30px; height: 30px; font-size: 12px; }

/* ---- activity feed ------------------------------------------ */
.feed-item { display: flex; gap: 11px; padding: 11px 2px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.feed-item:last-child { border-bottom: none; }
.feed-ico { font-size: 16px; width: 26px; height: 26px; display: grid; place-items: center;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 8px; flex-shrink: 0; }
.feed-text { font-size: 13.5px; line-height: 1.4; }
.feed-time { font-size: 11px; color: var(--ink-faint); margin-top: 2px; }

/* ---- profile ------------------------------------------------ */
.profile-head { display: flex; align-items: center; gap: 14px; margin: 6px 0 18px; }
.profile-head .pn { font-family: var(--serif); font-size: 24px; font-weight: 600; }
.profile-head .ps { font-size: 13px; color: var(--ink-faint); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 13px 14px; box-shadow: var(--shadow-sm);
}
.stat .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; font-family: var(--serif); }
.stat .l { font-size: 11.5px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 4px; }
.badge-row .badge { font-size: 11px; padding: 5px 10px; }

.hist-row { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.hist-row:last-child { border: none; }
.hist-row .h-title { font-size: 13.5px; font-weight: 500; }
.hist-row .h-sub { font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; }
.hist-row .h-amt { text-align: right; font-weight: 700; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---- bottom nav --------------------------------------------- */
.nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--max); z-index: 50;
  display: flex; justify-content: space-around; align-items: center;
  height: var(--nav-h); padding-bottom: env(safe-area-inset-bottom);
  background: var(--felt);
  border-top: 2px solid var(--gold);
  box-shadow: 0 -4px 24px rgba(0,0,0,.32);
}
.nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; color: rgba(253,248,232,.38);
  font-size: 10.5px; font-weight: 600; flex: 1; padding: 8px 0; transition: color .15s; }
.nav button .ic { width: 23px; height: 23px; }
.nav button.active { color: var(--gold); }
.nav .fab-slot { flex: 0 0 64px; position: relative; }
.fab {
  position: absolute; left: 50%; top: -30px; transform: translateX(-50%);
  width: 66px; height: 66px; border-radius: 50%;
  background: var(--gold); color: var(--felt); display: grid; place-items: center;
  box-shadow: 0 10px 28px rgba(0,0,0,.45); border: 3px solid var(--felt);
  font-size: 46px; font-weight: 300; line-height: 1;
  transition: transform .15s;
}
.fab:active { transform: translateX(-50%) scale(.91); }

/* ---- buttons ------------------------------------------------ */
.btn-primary {
  width: 100%; background: var(--green); color: #fdfbf4; padding: 15px; border-radius: var(--r);
  font-weight: 600; font-size: 15.5px; box-shadow: var(--shadow-sm); transition: .15s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:active { transform: scale(.985); }
.btn-primary:disabled { opacity: .5; }
.btn-ghost { width: 100%; background: var(--paper-2); border: 1px solid var(--line-strong);
  padding: 13px; border-radius: var(--r); font-weight: 600; font-size: 14.5px; color: var(--ink-soft); }
.btn-row { display: flex; gap: 8px; }
.btn-row > * { flex: 1; }
.btn-danger { color: var(--red); background: var(--red-soft); border: 1px solid #eccfc9; }

/* ---- forms -------------------------------------------------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; letter-spacing: .01em; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--paper-2); transition: .15s; outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); background: #fff; }
.field .help { font-size: 11.5px; color: var(--ink-faint); margin-top: 5px; }
.field textarea { resize: vertical; min-height: 64px; }

.seg { display: flex; gap: 6px; background: #efeae0; padding: 4px; border-radius: var(--r); }
.seg button { flex: 1; padding: 11px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--ink-soft); transition: .15s; }
.seg button.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }

.chips-row { display: flex; gap: 7px; flex-wrap: wrap; }
.chips-row button {
  padding: 9px 14px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line-strong);
  font-weight: 600; font-size: 13.5px; transition: .15s;
}
.chips-row button.active { background: var(--green); color: #fdfbf4; border-color: var(--green); }

/* ---- modal / sheet ------------------------------------------ */
.scrim { position: fixed; inset: 0; background: rgba(28,29,26,.42); z-index: 60; opacity: 0;
  animation: fade .2s forwards; backdrop-filter: blur(2px); }
@keyframes fade { to { opacity: 1; } }
.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: var(--max); z-index: 61;
  background: var(--paper-2); border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--shadow-lg); padding: 8px 18px calc(20px + env(safe-area-inset-bottom));
  max-height: 92dvh; overflow-y: auto; animation: slideup .32s cubic-bezier(.2,.8,.25,1) both;
}
@keyframes slideup { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
.sheet-topbar { display: flex; align-items: center; justify-content: center; padding: 12px 0 16px; position: relative; touch-action: none; cursor: grab; }
.sheet .grab { width: 38px; height: 4px; background: var(--line-strong); border-radius: 999px; margin: 0; }
.sheet-x {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--line); color: var(--ink-soft);
  font-size: 13px; display: grid; place-items: center;
  transition: background .15s;
}
.sheet-x:hover { background: var(--line-strong); color: var(--ink); }
.sheet h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.sheet .sub { font-size: 13px; color: var(--ink-soft); margin-top: 3px; margin-bottom: 16px; }

.towin {
  background: var(--green-soft); border: 1px solid #cfe0d4; border-radius: var(--r);
  padding: 13px 15px; margin: 14px 0; display: flex; justify-content: space-between; align-items: center;
}
.towin .l { font-size: 13px; color: var(--green); font-weight: 600; }
.towin .v { font-family: var(--serif); font-weight: 700; font-size: 22px; color: var(--green-deep); font-variant-numeric: tabular-nums; }

/* ---- join screen -------------------------------------------- */
.join { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 32px 26px; }
.join .crest { text-align: center; margin-bottom: 26px; }
.join .crest .suits-row { display: flex; justify-content: center; gap: 14px; font-size: 22px; margin-bottom: 6px; }
.join .crest .suits-row span:nth-child(1) { color: var(--ink-soft); }
.join .crest .suits-row span:nth-child(2) { color: #b23b3b; }
.join .crest .suits-row span:nth-child(3) { color: #b8893b; }
.join .crest .suits-row span:nth-child(4) { color: var(--ink-soft); }
.join .crest .eyebrow { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-top: 8px; }
.join .crest h1 { font-family: var(--serif); font-size: 42px; font-weight: 700; letter-spacing: -.025em; line-height: 1.0; margin-top: 4px; }
.marquee-rule { display: flex; align-items: center; gap: 10px; margin: 12px auto 0; max-width: 220px; }
.marquee-rule::before, .marquee-rule::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to right, transparent, var(--gold), transparent); }
.marquee-rule::after { background: linear-gradient(to left, transparent, var(--gold), transparent); }
.join .crest .names { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink-soft); margin-top: 8px; }
.join .crest .blurb { font-size: 13.5px; color: var(--ink-soft); margin-top: 14px; max-width: 340px; margin-inline: auto; }
.join .stats-line {
  display: flex; justify-content: center; gap: 0; margin: 18px 0 26px;
  background: var(--felt); border-radius: var(--r); overflow: hidden;
  border: 1px solid rgba(201,162,39,.35);
}
.join .stats-line .s {
  text-align: center; flex: 1; padding: 12px 8px;
  border-right: 1px solid rgba(201,162,39,.2);
}
.join .stats-line .s:last-child { border-right: none; }
.join .stats-line .s .v { font-family: var(--serif); font-size: 21px; font-weight: 700; color: var(--gold); }
.join .stats-line .s .l { font-size: 10px; color: rgba(253,248,232,.45); text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }
.join-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 20px; box-shadow: var(--shadow-md); }
.join-back { background: none; border: none; color: var(--ink-soft); font-size: 13px; padding: 0; cursor: pointer; margin-bottom: 14px; display: inline-flex; align-items: center; gap: 4px; }
.join-back:hover { color: var(--ink); }
.join-mode-title { font-family: var(--serif); font-size: 24px; font-weight: 600; margin-bottom: 18px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-faint); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; margin: 18px 0; }
.divider::before, .divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }

/* ---- toast & confetti --------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 18px); transform: translate(-50%, 30px);
  background: var(--ink); color: var(--paper-2); padding: 12px 18px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500; z-index: 80; opacity: 0; pointer-events: none;
  transition: .3s cubic-bezier(.2,.8,.25,1); max-width: 88%; text-align: center; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--red); }
.toast.win { background: var(--green); }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; display: none; }

/* ---- misc --------------------------------------------------- */
.skeleton { background: linear-gradient(90deg, #eee9df 25%, #f3efe7 50%, #eee9df 75%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--r); }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-card { height: 150px; margin-bottom: 14px; }
.spin { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.center-load { display: grid; place-items: center; padding: 60px; }
.center-load .spin { border-color: var(--line-strong); border-top-color: var(--green); width: 28px; height: 28px; }
.muted { color: var(--ink-faint); }
.tabular { font-variant-numeric: tabular-nums; }
.admin-gear { font-size: 18px; padding: 6px; opacity: .55; }
.fine { font-size: 11px; color: var(--ink-faint); text-align: center; margin-top: 18px; line-height: 1.5; }

/* ---- sparkline ---------------------------------------------- */
.spark-wrap { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.spark-label { font-size: 11.5px; color: var(--ink-faint); font-weight: 600; display: flex; justify-content: space-between; margin-bottom: 5px; }
.spark-pct { font-variant-numeric: tabular-nums; }
.spark-svg { width: 100%; height: 34px; display: block; border-radius: 4px; overflow: visible; }
.spark-axis { display: flex; justify-content: space-between; font-size: 10px; color: var(--ink-faint); margin-top: 3px; font-variant-numeric: tabular-nums; }
.spark-placeholder { height: 34px; display: flex; align-items: center; justify-content: center; position: relative; }
.spark-placeholder .dash-line { position: absolute; left: 0; right: 0; top: 50%; height: 1px; border-top: 1.5px dashed var(--line-strong); }
.spark-placeholder .label { font-size: 11px; color: var(--ink-faint); background: var(--card); padding: 0 8px; position: relative; z-index: 1; }

/* ---- hot badge & countdown ---------------------------------- */
.chip.hot { background: #fff3e0; color: #c44d00; }
.hot-badge { display: none; }
.closes-in { font-size: 11px; color: var(--ink-faint); font-weight: 600; padding: 4px 9px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }

/* ---- admin user management ---------------------------------- */
.admin-user-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r);
  margin-bottom: 7px;
}
.admin-user-row .aur-main { flex: 1; min-width: 0; }
.admin-user-row .aur-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.admin-user-row .aur-name input { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; padding: 4px 8px; border: 1px solid var(--green); border-radius: 8px; background: #fff; outline: none; }
.admin-user-row .aur-sub { font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; }
.admin-user-row .aur-actions { display: flex; gap: 5px; flex-shrink: 0; }
.aur-btn { font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper-2); color: var(--ink-soft); }
.aur-btn.edit { background: var(--green-soft); color: var(--green); border-color: #cfe0d4; }
.aur-btn.save { background: var(--green); color: #fff; border-color: var(--green); }
.aur-btn.del  { background: var(--red-soft); color: var(--red); border-color: #eccfc9; }
.aur-btn.adjust { background: var(--gold-soft); color: #8a6321; border-color: #e0cfa0; }
.add-user-form { background: var(--green-soft); border: 1px solid #cfe0d4; border-radius: var(--r); padding: 13px; margin-top: 10px; display: none; }
.add-user-form.open { display: block; }
.add-user-form .row { display: flex; gap: 8px; margin-bottom: 10px; }
.add-user-form .row .field { flex: 1; margin-bottom: 0; }
.respect-note { background: #fff8e1; border: 1px solid #f0d96a; border-radius: var(--r); padding: 12px 14px; font-size: 13px; color: #7a5c00; margin-bottom: 14px; line-height: 1.5; }
.respect-note strong { display: block; margin-bottom: 2px; }
.idea-card { background: var(--paper-2); border: 1px dashed var(--line-strong); border-radius: var(--r);
  padding: 12px 14px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.idea-card .it { font-size: 13.5px; font-weight: 500; }
.idea-card .il { font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; }
.idea-card button { flex-shrink: 0; background: var(--green-soft); color: var(--green); font-weight: 700;
  padding: 7px 12px; border-radius: 999px; font-size: 12.5px; }
