:root {
  color-scheme: light;
  --surface: #fff; --field: #fffdf8; --tint: #fff8e0; --tint2: #fff0c2; --tint3: #fff3c8; --warm: #fffaf0;
  --glass: var(--glass); --glass2: var(--glass2); --glow: #ffe9b8;
  --ok-bg: #dff5e6; --ok-ink: #1d6b3d; --bad-bg: #fbe0dc; --warn-ink: #8a6200; --warn-bg: #ffe9c7; --gold-bg: #fff2b3;
  --bg: #fff6e4;
  --card: #ffffff;
  --ink: #3b2a20;
  --muted: #8a7767;
  --line: #f0e2c8;
  --accent: #f5b301;
  --accent-ink: #4a3300;
  --good: #2f9e5b;
  --bad: #c0392b;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(120, 80, 20, .10);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #2b241c; --field: #1c1712; --tint: #3b2f16; --tint2: #4a3b14; --tint3: #4d3f1a; --warm: #2a2214;
  --glass: rgba(255, 255, 255, .07); --glass2: rgba(255, 200, 80, .07); --glow: #3a2a10;
  --ok-bg: #173a22; --ok-ink: #8fe3ab; --bad-bg: #44201c; --warn-ink: #f3c75f; --warn-bg: #4a3512; --gold-bg: #4d3d12;
  --bg: #17130f; --card: #231d16; --ink: #f2e9db; --muted: #ab9c8c; --line: #3d3228; --bad: #ff8b7c;
  --shadow: 0 6px 24px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 50% -200px, var(--glow) 0%, var(--bg) 60%);
  background-attachment: fixed;
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}
.hidden { display: none !important; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; margin: 0; }
.muted { color: var(--muted); }
.error { color: var(--bad); min-height: 1.4em; margin: .25rem 0; font-size: .95rem; }

/* ---------- buttons / inputs ---------- */
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: .6rem 1rem; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer;
  transition: transform .06s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { box-shadow: 0 2px 10px rgba(120, 80, 20, .15); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: #d99c00; color: var(--accent-ink); }
.btn.good { background: var(--good); border-color: #23804a; color: #fff; }
.btn.danger { background: var(--surface); border-color: #e8b4ad; color: var(--bad); }
.btn.ghost { background: transparent; }
.btn.small { padding: .3rem .75rem; font-size: .85rem; }
.btn.icon { width: 2.6rem; height: 2.6rem; padding: 0; font-size: 1.6rem; line-height: 1; }

input, textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--field);
  border: 1px solid var(--line); border-radius: 12px; padding: .65rem .8rem;
}
input:focus, textarea:focus, .btn:focus-visible, .day:focus-visible {
  outline: 3px solid rgba(245, 179, 1, .45); outline-offset: 1px;
}
label { display: block; font-weight: 600; font-size: .9rem; margin: .8rem 0 .3rem; }
label input { margin-top: .3rem; font-weight: 400; }
textarea { resize: vertical; min-height: 4.2rem; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem; }

/* ---------- login ---------- */
#login-view { min-height: 100vh; display: grid; place-items: center; padding: 1.2rem; }
.login-card { width: min(380px, 100%); text-align: center; }
.login-card h1 { font-size: 2rem; }
.login-card label { text-align: left; }
.login-card .btn { width: 100%; margin-top: .6rem; }
.login-star { width: 120px; margin: 0 auto .4rem; }

/* ---------- app shell ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1.1rem; max-width: 760px; margin: 0 auto;
}
.topbar h1 { font-size: 1.5rem; }
.who { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .9rem; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 .8rem 3rem; display: grid; gap: .9rem; }


/* ---------- calendar ---------- */
.cal-nav { display: flex; align-items: center; justify-content: space-between; }
.cal-nav h2 { font-size: 1.4rem; }
.cal-sub { text-align: center; margin: .2rem 0 .6rem; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.weekdays div { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: .2rem 0; }
.day {
  position: relative; aspect-ratio: 1 / 1.08; background: var(--field); border: 1px solid var(--line);
  border-radius: 12px; padding: 0; font: inherit; color: inherit; cursor: pointer; overflow: hidden;
  text-align: left;
}
.day.other { visibility: hidden; }
.day.future { opacity: .45; cursor: default; }
.day.today { border: 2px solid var(--accent); background: var(--tint); }
.day:not(.future):hover { box-shadow: 0 2px 10px rgba(120, 80, 20, .18); }
.day .num { position: absolute; top: 3px; left: 6px; font-size: .72rem; font-weight: 700; color: var(--muted); z-index: 2; }
.day .stars { position: absolute; inset: 0; display: flex; padding: 12px 0 0; }
.day .stars.lanes-1 { align-items: center; justify-content: center; }
.day .lane { flex: 1; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; min-width: 0; padding: 0 1px 2px; }
.day .lane svg { height: auto; }
.day .stars.lanes-1 .lane.k1 svg { width: 88%; }
.day .stars.lanes-1 .lane.k2 svg, .day .stars.lanes-1 .lane.k3 svg, .day .stars.lanes-1 .lane.k4 svg { width: 46%; }
.day .stars.lanes-1 .lane.k5 svg { width: 32%; }
.day .stars.lanes-2 .lane.k1 svg { width: 94%; }
.day .stars.lanes-2 .lane.k2 svg, .day .stars.lanes-2 .lane.k3 svg, .day .stars.lanes-2 .lane.k4 svg, .day .stars.lanes-2 .lane.k5 svg { width: 48%; }

.legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; justify-content: center; color: var(--muted); font-size: .85rem; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend svg { width: 22px; height: 22px; }

/* ---------- star text ---------- */
.star-text { font-family: "Segoe Script", "Bradley Hand", "Brush Script MT", "Snell Roundhand", cursive; font-weight: 700; }
.pop { animation: pop .55s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pop { from { transform: scale(.2) rotate(-25deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pop { animation: none; } }

/* ---------- pending panel ---------- */
#pending-panel h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.pending-item { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.pending-item:first-of-type { border-top: 0; }
.pending-item svg { width: 44px; height: 44px; flex: none; }
.pending-item .info { flex: 1; min-width: 0; }
.pending-item .info b { display: block; }
.pending-item .info small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending-item .btns { display: flex; gap: .4rem; flex: none; }

/* ---------- dialog ---------- */
dialog {
  border: 0; border-radius: 22px; padding: 0; width: min(440px, 94vw); max-height: 90vh;
  box-shadow: 0 20px 60px rgba(60, 30, 0, .35); background: var(--card); color: var(--ink);
}
dialog::backdrop { background: rgba(60, 35, 10, .45); backdrop-filter: blur(2px); }
.dlg { padding: 1.2rem; }
.dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.dlg-head h3 { font-size: 1.3rem; }
.star-entry { border: 1px solid var(--line); border-radius: 16px; padding: .8rem; margin: .7rem 0; text-align: center; background: var(--field); }
.star-entry .big { width: min(220px, 70%); margin: 0 auto .3rem; }
.star-entry .big svg { width: 100%; height: auto; }
.star-entry h4 { margin: .2rem 0; font-family: Georgia, serif; font-size: 1.1rem; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: .15rem .6rem; border-radius: 999px; }
.badge.pending { background: var(--tint2); color: var(--warn-ink); }
.badge.approved { background: var(--ok-bg); color: var(--ok-ink); }
.badge.declined { background: var(--bad-bg); color: var(--bad); }
.note { color: var(--muted); font-style: italic; margin: .4rem 0; word-break: break-word; }
.row-btns { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-top: .5rem; }
.place-box { margin-top: 1rem; padding-top: .8rem; border-top: 2px dashed var(--line); }
.place-box h4 { margin: 0 0 .4rem; font-family: Georgia, serif; font-size: 1.1rem; }
.type-picker { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0; }
.type-opt {
  display: flex; align-items: center; gap: .4rem; padding: .35rem .7rem .35rem .4rem;
  border: 2px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; font: inherit; font-weight: 600;
}
.type-opt svg { width: 28px; height: 28px; }
.type-opt[aria-pressed="true"] { border-color: var(--accent); background: var(--tint); }
.place-box .btn.primary { width: 100%; margin-top: .6rem; }

@media (max-width: 420px) {
  .day .num { font-size: .65rem; left: 4px; }
  .cal-nav h2 { font-size: 1.2rem; }
}

/* =================== v2 =================== */
.fun, .score-num { font-family: "Chalkboard SE", "Marker Felt", "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive; }
.small-text { font-size: .85rem; margin: .15rem 0; }
.pad { padding: .8rem; text-align: center; }

/* scoreboard */
.scoreboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.score-card { border: 2px solid; border-radius: 20px; padding: .6rem .8rem .7rem; text-align: center; box-shadow: var(--shadow); }
.score-top { display: flex; align-items: center; justify-content: center; gap: .4rem; font-weight: 700; }
.score-top svg { width: 26px; height: 26px; }
.score-num { font-size: 3.2rem; line-height: 1.05; font-weight: 700; letter-spacing: -.02em; }
.score-sub { font-size: .78rem; color: var(--muted); }

/* inbox */
#inbox { border: 2px solid #ffd45c; background: var(--warm); }
#inbox h3, .card h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.inbox-list { display: grid; gap: .3rem; }
.inbox-row {
  display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; font: inherit; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .5rem .7rem; cursor: pointer;
}
.inbox-row:hover { box-shadow: 0 2px 10px rgba(120, 80, 20, .15); }
.inbox-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.inbox-text small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; }
.chev { color: var(--muted); font-size: 1.3rem; }

/* tabs */
.tabs { display: flex; gap: .3rem; background: var(--glass); padding: .25rem; border-radius: 999px; }
.tab {
  flex: 1; border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--muted);
  padding: .5rem .3rem; border-radius: 999px; cursor: pointer; display: inline-flex; gap: .4rem; align-items: center; justify-content: center;
}
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px rgba(120, 80, 20, .15); }
.tab:focus-visible { outline: 3px solid rgba(245, 179, 1, .45); }
.badge-dot { background: var(--bad); color: #fff; font-size: .72rem; min-width: 1.3rem; height: 1.3rem; border-radius: 999px; display: inline-grid; place-items: center; padding: 0 .3rem; }
.panel { display: grid; gap: .9rem; }
.cal-top { display: flex; justify-content: center; }
.cal-top .btn { min-width: 12rem; }

/* calendar day tint for lanes handled in JS */
.badge.returned, .badge.rejected { background: var(--bad-bg); color: var(--bad); }
.who-line { margin: 0 0 .3rem; color: var(--muted); font-size: .9rem; }

/* dialog */
dialog { overflow: auto; }
dialog.wide { width: min(720px, 96vw); }
.dlg-head { align-items: flex-start; }
.dlg input, .dlg textarea, .dlg select { margin: .3rem 0; }
.section { border-top: 1px solid var(--line); padding-top: .8rem; margin-top: .8rem; }
.section h4 { margin: 0 0 .4rem; font-family: Georgia, serif; }
.section .btn { margin-top: .4rem; }

/* picker */
.picker { border: 1px solid var(--line); border-radius: 14px; padding: .4rem; background: var(--field); }
.picker input { margin: 0 0 .3rem; }
.picker-list { max-height: 220px; overflow: auto; display: grid; gap: .25rem; align-content: start; }
.pick-head { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: .4rem .3rem .1rem; }
.pick-row {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%;
  font: inherit; color: inherit; text-align: left; padding: .5rem .7rem; border: 2px solid transparent;
  border-radius: 10px; background: var(--surface); cursor: pointer;
}
.pick-row:hover:not(:disabled) { background: var(--tint); }
.pick-row[aria-pressed="true"] { border-color: var(--accent); background: var(--tint3); }
.pick-row:disabled { opacity: .45; cursor: default; }
.pick-title small { color: var(--muted); }
.pts { font-weight: 800; color: var(--ok-ink); background: var(--ok-bg); padding: .1rem .55rem; border-radius: 999px; white-space: nowrap; }

/* suggest + forms */
.suggest-form { display: grid; gap: .5rem; }
.suggest-form h3 { margin: 0; }
.suggest-row { display: flex; gap: .5rem; align-items: center; }
.suggest-row > input { flex: 1; min-width: 0; margin: 0; }
.pts-field { display: inline-flex; align-items: center; gap: .3rem; margin: 0; font-weight: 700; }
.pts-field input { width: 5.5rem; margin: 0; }
.pts-field span { color: var(--muted); font-weight: 600; }
.suggest-form input { margin: 0; }
.suggest-form .btn { justify-self: start; }
.reveal { display: grid; gap: .4rem; margin-top: .6rem; padding: .6rem; background: var(--warm); border-radius: 12px; border: 1px dashed #e8d3a0; }
.reveal .btn { justify-self: start; }

/* ledger */
.ledger-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.ledger-head h3 { margin: 0; }
.count { font-family: system-ui, sans-serif; font-size: .9rem; }
.ledger-tools { display: flex; gap: .5rem; margin-bottom: .5rem; }
.ledger-tools input { flex: 1; min-width: 0; margin: 0; }
.ledger-tools select { width: auto; margin: 0; }
.ledger-list { max-height: 340px; overflow: auto; display: grid; gap: .4rem; align-content: start; padding-right: 2px; }
.ledger-list.tall { max-height: 60vh; }
.ledger-list.redemptions { max-height: 280px; }
.ledger-row {
  display: grid; grid-template-columns: 1fr auto; gap: .2rem .6rem; align-items: center;
  border: 1px solid var(--line); border-radius: 14px; padding: .6rem .8rem; background: var(--field);
}
.ledger-main { display: flex; flex-direction: column; min-width: 0; word-break: break-word; }
.ledger-main small { color: var(--muted); font-size: .78rem; }
.big-pts { font-size: 1.15rem; display: inline-flex; align-items: baseline; gap: .2rem; }
.big-pts small { font-size: .7rem; font-weight: 600; }
.ledger-actions { grid-column: 1 / -1; display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.tag-btn { border: 0; background: var(--tint2); color: var(--warn-ink); font: inherit; font-size: .8rem; font-weight: 700; padding: .25rem .7rem; border-radius: 999px; cursor: pointer; }
.balance-line { text-align: center; color: var(--muted); }
.balance-line b { font-size: 1.6rem; color: var(--ink); }

/* negotiation */
.log { display: grid; gap: .5rem; margin: .6rem 0; max-height: 40vh; overflow: auto; }
.bubble { border: 1px solid var(--line); border-left: 6px solid #ccc; border-radius: 12px; padding: .5rem .7rem; background: var(--field); word-break: break-word; }
.bubble .b-detail { font-weight: 700; margin: .15rem 0; }
.b-status { font-size: .85rem; color: var(--muted); }
.b-status.accepted { color: var(--ok-ink); font-weight: 700; }
.b-status.returned, .b-status.rejected { color: var(--bad); }
.ask { background: var(--tint); border-radius: 12px; padding: .5rem .7rem; margin: .4rem 0; }
.ask small { color: var(--muted); display: block; }
.neg-actions { margin-top: .6rem; }
.neg-actions h4 { margin: 0 0 .3rem; font-family: Georgia, serif; }
.neg-actions .row-btns { justify-content: flex-start; }
.user-row { margin: .4rem 0; }
.user-line { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.user-line .btn { margin: 0 0 0 auto; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 100; max-width: min(92vw, 420px);
  background: #3b2a20; color: #fff; padding: .7rem 1.1rem; border-radius: 14px; box-shadow: 0 8px 30px rgba(0, 0, 0, .3);
}
.toast.ok { background: #1d6b3d; }

/* =================== focus tasks =================== */
.focus-zone { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.focus-slot {
  display: flex; align-items: center; gap: .7rem; text-align: left; font: inherit; color: var(--muted);
  background: var(--glass); border: 2px dashed var(--line); border-radius: 16px; padding: .6rem .9rem; cursor: pointer;
}
.focus-slot:hover { background: var(--surface); }
.focus-slot .bolt { font-size: 1.6rem; }
.slot-text { display: flex; flex-direction: column; }
.slot-text b { color: var(--ink); }
.slot-text small { color: var(--muted); }
body.dragging-task .focus-slot { background: var(--tint); border-color: var(--accent) !important; animation: slotpulse 1s ease-in-out infinite; }
.focus-slot.over { background: var(--tint2); transform: scale(1.02); }
@keyframes slotpulse { 50% { box-shadow: 0 0 0 5px rgba(245, 179, 1, .25); } }
@media (prefers-reduced-motion: reduce) { body.dragging-task .focus-slot { animation: none; } }
.ledger-row.draggable { cursor: grab; }
.ledger-row.draggable:active { cursor: grabbing; }

.focus-card { border: 2px solid; border-radius: 18px; padding: .7rem .9rem .8rem; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.focus-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
  background: linear-gradient(90deg, #ffd21f, #fff3a8, #ffd21f);
}
.focus-head { display: flex; align-items: center; gap: .4rem; font-size: .9rem; margin-top: .2rem; }
.focus-head .bolt { font-size: 1.1rem; }
.mult-pill { margin-left: auto; background: #ffd21f; color: #4a3300; font-weight: 800; border-radius: 999px; padding: .05rem .6rem; }
.focus-card h3 { font-size: 1.25rem; margin: .25rem 0; word-break: break-word; }
.focus-meta { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.cd { font-family: "Chalkboard SE", "Marker Felt", "Segoe Print", "Comic Sans MS", cursive; font-size: 1.15rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.focus-card.expired .cd { color: var(--bad); }
.focus-bar { height: 8px; border-radius: 999px; background: rgba(0, 0, 0, .08); margin: .4rem 0 .2rem; overflow: hidden; }
.focus-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #ffd21f, #f5b301); border-radius: 999px; transition: width 1s linear; }
.focus-card.expired .focus-fill { background: var(--bad); }
.focus-card .row-btns { justify-content: flex-start; margin-top: .4rem; }

.focus-star { filter: drop-shadow(0 0 2px rgba(255, 210, 31, .9)); }
.badge.focus { background: var(--gold-bg); color: var(--warn-ink); margin-left: .3rem; border: 1px solid #ffd21f; }

.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .3rem 0; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .25rem .7rem; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.chip:hover { background: var(--tint); border-color: var(--accent); }
.suggest-row select { width: auto; margin: 0; }
.pt { padding-top: .5rem; }
.focus-preview { background: var(--tint); border: 1px solid #ffd45c; border-radius: 12px; padding: .5rem .8rem; margin: .6rem 0; font-size: .92rem; }
#modal .dlg > .btn.primary { width: 100%; }

/* =================== v3: groups, invites, notifications =================== */
#login-view, #join-view { min-height: 100vh; display: grid; place-items: center; padding: 1.2rem; }
#join-view.hidden { display: none; }
.login-card .btn.ghost { border-color: transparent; color: var(--muted); }
.group-name { flex: 1; min-width: 0; margin-left: .6rem; color: var(--muted); font-size: .85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar { gap: .4rem; }

.scoreboard.compact { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.scoreboard.compact .score-num { font-size: 2.2rem; }
.scoreboard.compact .score-card { padding: .45rem .5rem .5rem; }
.scoreboard.compact .score-name { font-size: .9rem; overflow-wrap: anywhere; }

.note-box { background: var(--warm); border: 1px solid var(--line); border-radius: 14px; padding: .7rem .8rem; margin: .5rem 0; }
.note-box > b { display: block; margin-bottom: .3rem; }
.note-box .row-btns, .section .row-btns { justify-content: flex-start; }
.note-box form input { margin: .3rem 0; }

.toggle { display: flex; align-items: flex-start; gap: .6rem; margin: .45rem 0; font-weight: 400; cursor: pointer; }
.toggle input { width: 1.25rem; height: 1.25rem; margin: .15rem 0 0; flex: none; accent-color: var(--accent); }
.toggle span { display: flex; flex-direction: column; }
.toggle b { font-weight: 600; }
.toggle small { color: var(--muted); font-size: .8rem; }
.toggle.off { opacity: .55; }

.invite-row { display: grid; gap: .25rem; padding: .6rem 0; border-top: 1px dashed var(--line); }
.invite-row input { margin: 0; font-size: .85rem; }
.group-row { display: flex; flex-direction: column; padding: .35rem 0; border-top: 1px dashed var(--line); }
@media (max-width: 560px) {
  .topbar { flex-wrap: wrap; row-gap: 0; }
  .topbar .group-name { order: 3; flex: 1 0 100%; margin: -.15rem 0 0; }
}

/* =================== streak bonus =================== */
.streak-box { border: 1px dashed var(--line); border-radius: 14px; padding: .5rem .7rem; margin: .5rem 0; background: var(--glass2); }
.streak-box .toggle { margin: .2rem 0; }
.streak-box .suggest-row > input { max-width: 7rem; }
.streak-sum { color: var(--muted); margin: .4rem 0 .1rem; }
.chip[aria-pressed="true"] { background: var(--tint2); border-color: var(--accent); }
.streak-line { display: block; color: var(--warn-ink); font-size: .8rem; }
.flame { font-size: .8rem; }
.badge.streak { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid #ffc36b; margin-left: .3rem; }

/* ---------- theme picker ---------- */
.theme-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.focus-card h3, .focus-card b { color: var(--ink); }
