/* Chores: the design system. Dark, restrained, one accent colour per boy (set as --ac from the API). */

:root {
  --bg: #07080b;
  --ac: #3ddc97;
  --ac2: #f0b84a;
  --text: #f4f4f0;
  --muted: #a3a6ae;
  --dim: #6d7080;
  --line: rgba(255, 255, 255, 0.1);
  --bad: #ff6b8b;
  --glass-a: rgba(255, 255, 255, 0.09);
  --glass-b: rgba(255, 255, 255, 0.03);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, 'SF Pro Display', system-ui, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
html, body { margin: 0; min-height: 100%; color: var(--text); font: 16px/1.45 var(--font); -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
/* The body stays transparent so the blobs behind the page show through. */
body { overflow-x: hidden; background: transparent; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }

#app { position: relative; min-height: 100dvh; isolation: isolate; }

/* Backdrop: two soft colour blobs and a little film grain. */
.bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.45; will-change: transform; }
.blob.b1 { width: 300px; height: 300px; left: -90px; top: -70px; background: var(--ac); }
.blob.b2 { width: 340px; height: 340px; right: -150px; bottom: 40px; background: #5b4bff; opacity: 0.32; }
body.ice .blob.b1 { background: #4aa8ff; }
body.ice .blob.b2 { background: #1d5a8f; opacity: 0.5; }
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>"); }

/* Layout */
.screen { max-width: 520px; margin: 0 auto; padding: calc(var(--safe-top) + 18px) 18px calc(var(--safe-bottom) + 112px); }
.screen.centered { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding-bottom: calc(var(--safe-bottom) + 28px); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: #8d909a; }
.title { font-size: 28px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; }
.subtitle { color: var(--muted); font-size: 15px; margin-top: 6px; }
.center { text-align: center; }
.hidden { display: none !important; }

/* Glass */
.glass { background: linear-gradient(145deg, var(--glass-a), var(--glass-b)); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.panel { padding: 14px; }

/* Buttons */
.btn { display: block; width: 100%; min-height: 52px; padding: 14px 18px; border: 0; border-radius: 16px; font-weight: 650; font-size: 16px; text-align: center;
  background: linear-gradient(135deg, var(--ac), color-mix(in srgb, var(--ac) 40%, white)); color: #07080b;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--ac) 38%, transparent); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.5; }
.btn.ghost { background: rgba(255, 255, 255, 0.07); color: var(--text); border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: none; }
.btn.bad { background: linear-gradient(135deg, var(--bad), #ffb3c3); box-shadow: none; }
.link { background: none; border: 0; padding: 10px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

.chip { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; border: 1px solid rgba(255, 255, 255, 0.18); color: var(--muted); white-space: nowrap; }
.chip.ok { border-color: var(--ac); color: var(--ac); }
.chip.warn { border-color: var(--ac2); color: var(--ac2); }
.chip.bad { border-color: var(--bad); color: var(--bad); }

/* Avatar */
.avatar { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 18px; display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 700; color: #07080b; background: linear-gradient(135deg, var(--ac), color-mix(in srgb, var(--ac) 40%, white)); }

/* PIN pad */
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 26px 0 8px; }
.pin-dots i { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid #6a6e7a; transition: background 0.12s, border-color 0.12s, transform 0.12s; }
.pin-dots i.on { background: var(--ac); border-color: var(--ac); transform: scale(1.12); }
.pin-error { min-height: 22px; text-align: center; color: var(--bad); font-size: 14px; }
.pin-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px auto 0; max-width: 320px; }
.pin-keys button { min-height: 62px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); font-size: 24px; }
.pin-keys button:active { background: color-mix(in srgb, var(--ac) 35%, transparent); }
.pin-keys .blank { visibility: hidden; }

/* Text input used for the invite code */
.field { width: 100%; min-height: 56px; padding: 12px 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06);
  font-size: 24px; letter-spacing: 0.22em; text-align: center; text-transform: uppercase; outline: none; }
.field:focus { border-color: var(--ac); }
/* A free-text box (a reason or a note), not a code */
.field.text { min-height: 0; font-family: inherit; color: inherit; font-size: 15.5px; letter-spacing: normal; text-align: left; text-transform: none; resize: none; }

/* Tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around; padding: 10px 12px calc(var(--safe-bottom) + 8px);
  background: linear-gradient(transparent, rgba(7, 8, 11, 0.96) 38%); }
.tabs button { flex: 1; max-width: 120px; background: none; border: 0; padding: 4px 0 2px; color: #7d808a; font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tabs button .pill { width: 44px; height: 30px; border-radius: 11px; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.tabs button.on { color: var(--text); }
.tabs button.on .pill { background: rgba(255, 255, 255, 0.13); }
.tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs .badge { position: absolute; margin: -6px 0 0 26px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--ac2); color: #07080b; font-size: 10px; font-weight: 700; line-height: 16px; }

/* Toast */
.toasts { position: fixed; left: 14px; right: 14px; top: calc(var(--safe-top) + 10px); z-index: 50; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { padding: 13px 16px; border-radius: 16px; font-size: 14.5px; pointer-events: auto; }
.toast.bad { border-color: var(--bad); }
.toast.ok { border-color: var(--ac); }
.toast b { font-weight: 650; }

/* Sync banner */
.sync { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; font-size: 13px; background: rgba(240, 184, 74, 0.12); border: 1px solid rgba(240, 184, 74, 0.4); color: var(--ac2); }
.sync .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ac2); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

@media (max-width: 380px) { .title { font-size: 25px; } .screen { padding-left: 14px; padding-right: 14px; } }
@media (prefers-reduced-motion: reduce) { .blob, .sync .dot { animation: none; } }

/* ---------- Today ---------- */
.today-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.today-head .who { font-size: 13px; color: var(--muted); }
.today-head .who b { color: var(--text); font-weight: 600; }
.streak { display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px 5px 9px; border-radius: 30px; font-weight: 650; }
.streak svg { width: 20px; height: 24px; }
.streak.frozen { color: #8fd0ff; }
.streak .num { display: inline-block; min-width: 1ch; text-align: center; overflow: hidden; }

/* Day strip */
.strip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; margin: 14px 0 4px; }
.strip button { padding: 7px 0 6px; border-radius: 12px; border: 1px solid transparent; background: rgba(255, 255, 255, 0.05); color: #8d909a; font-size: 10.5px; line-height: 1.2; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.strip button .n { font-size: 14px; font-weight: 600; color: var(--text); }
.strip button .mark { width: 14px; height: 14px; border-radius: 50%; display: block; border: 1.5px solid #4a4d57; }
.strip .complete { background: color-mix(in srgb, var(--ac) 14%, transparent); }
.strip .complete .mark { background: var(--ac); border-color: var(--ac); }
.strip .missed .mark { border-color: var(--bad); opacity: 0.8; }
.strip .excused .mark { border-style: dashed; border-color: var(--ac2); }
.strip .today { background: rgba(255, 255, 255, 0.12); border-color: var(--ac); box-shadow: 0 0 14px color-mix(in srgb, var(--ac) 40%, transparent); }
.strip .today .mark { border-color: var(--ac); }
.strip .future { opacity: 0.45; }

/* Ring */
.ring-wrap { position: relative; width: 176px; height: 176px; margin: 16px auto 8px; }
.ring-wrap svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring-track { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 11; }
.ring-arc { fill: none; stroke-width: 11; stroke-linecap: round; filter: drop-shadow(0 0 7px var(--ac)); }
.ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-text b { font-size: 44px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.ring-text span { font-size: 10px; letter-spacing: 0.2em; color: var(--muted); margin-top: 6px; }

/* Sections and chore cards */
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 4px 8px; }
.section-title .eyebrow { margin: 0; }
.section-title .count { font-size: 12px; color: var(--dim); }
.collapsed-row { width: 100%; text-align: left; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--muted); display: flex; justify-content: space-between; }
.chore { position: relative; margin-bottom: 9px; overflow: hidden; }
.chore-main { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 13px; padding: 13px 14px; background: none; border: 0; text-align: left; }
.chore-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chore-name { font-size: 15.5px; overflow-wrap: anywhere; position: relative; }
.chore-meta { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.chore .chips { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cb { position: relative; flex: none; width: 26px; height: 26px; border-radius: 9px; border: 1.5px solid #565a66; }
.cb-fill { position: absolute; inset: -1.5px; border-radius: 9px; background: linear-gradient(135deg, var(--ac), color-mix(in srgb, var(--ac) 35%, white)); transform: scale(0); }
.cb-check { position: absolute; inset: 3px; width: 18px; height: 18px; }
.cb-check path { fill: none; stroke: #07080b; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 22; stroke-dashoffset: 22; }
.state-done .cb, .state-late .cb { border-color: transparent; }
.state-done .cb-fill, .state-late .cb-fill { transform: scale(1); }
.state-done .cb-check path, .state-late .cb-check path { stroke-dashoffset: 0; }
.state-done .chore-name, .state-late .chore-name { color: #868993; text-decoration: line-through; text-decoration-color: #5d606b; }
.state-pending .cb { border-style: dashed; border-color: var(--ac2); }
.state-rejected .cb, .state-disputed .cb { border-color: var(--bad); }
.state-rejected, .state-disputed { border-color: rgba(255, 107, 139, 0.55); }
.state-excused .cb { border-style: dashed; border-color: var(--ac2); }
.state-excused .chore-name { color: #868993; }
.check-opts { display: none; gap: 8px; padding: 0 14px 14px; }
.chore.open .check-opts { display: flex; }
.check-opts button { flex: 1; min-height: 48px; border-radius: 13px; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.07); font-size: 14.5px; }
.check-opts button:active { background: var(--ac); color: #07080b; }
.rip { position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; pointer-events: none; opacity: 0.5; background: radial-gradient(var(--ac), transparent 70%); }
.load-error { padding: 18px; text-align: center; }

/* Bottom sheet */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.55); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 520px; max-height: 82dvh; overflow-y: auto; padding: 18px 18px calc(var(--safe-bottom) + 22px); border-radius: 24px 24px 0 0; background: #101216; border: 1px solid var(--line); border-bottom: 0; }
.sheet h2 { font-size: 20px; margin-bottom: 4px; }
.sheet-close { float: right; }
.sheet-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.pick-row { width: 100%; align-items: center; border: 0; color: inherit; text-align: left; cursor: pointer; }
.pick-row .tick-box { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid #565a66; }
.pick-row[aria-pressed="true"] { background: color-mix(in srgb, var(--ac) 18%, transparent); }
.pick-row[aria-pressed="true"] .tick-box { border-color: transparent; background: var(--ac); }
.select-bar { display: flex; gap: 8px; justify-content: flex-end; margin: 4px 0 6px; }
.select-bar .btn { width: auto; flex: 1; }
.select-bar .link { margin-left: auto; }
.chore.pick .chore-name { text-decoration: none; color: inherit; }
.sheet-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); font-size: 14.5px; }

/* ---------- Photos, leaving checks, install help, Mum's week ---------- */
.preview-holder { text-align: center; }
.preview { display: block; width: 100%; max-height: 46dvh; object-fit: contain; border-radius: 16px; border: 1px solid var(--line); background: #000; }
.photo-actions { display: flex; gap: 10px; }
.photo-actions .btn { flex: 1; }
.leaving-box { margin: 14px 0 0; padding: 14px; }
.leaving-box .chip { margin-left: 8px; }
.leaving-box p { margin-top: 6px; }
.install-help { margin: 14px 0 0; }
.install-help ol { margin: 8px 0 12px; padding-left: 20px; color: var(--muted); }
.install-help li + li { margin-top: 4px; }
.grace-note { margin-bottom: 4px; }
.mums { text-align: center; padding-top: calc(var(--safe-top) + 56px); }
.mums .crystal { width: 96px; height: 96px; margin: 0 auto 18px; filter: drop-shadow(0 0 22px rgba(124, 212, 255, 0.7)); }
.mums .big { font-size: 56px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; margin: 6px 0 2px; color: #bfe6ff; }
.mums .glass { margin-top: 26px; text-align: left; }
body.ice .btn { background: linear-gradient(135deg, #3aa0ff, #bfe6ff); box-shadow: 0 8px 24px rgba(58, 160, 255, 0.35); }

/* ---------- Visit tab ---------- */
.visit-switch { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.visit-switch .label { text-align: center; }
.visit-switch .label b { display: block; font-size: 17px; }
.visit-switch .label span { font-size: 12.5px; color: var(--muted); }
.arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.07); font-size: 20px; line-height: 1; }
.arrow[disabled] { opacity: 0.3; }
.result-banner { margin-top: 14px; padding: 13px 14px; }
.result-banner b { display: block; font-size: 16px; }
.result-banner.ok { border-color: var(--ac); } .result-banner.ok b { color: var(--ac); }
.result-banner.bad { border-color: var(--bad); } .result-banner.bad b { color: var(--bad); }
.result-banner.warn { border-color: var(--ac2); } .result-banner.warn b { color: var(--ac2); }
.needed { margin-top: 14px; padding: 14px; }
.needed .bar { height: 8px; border-radius: 5px; background: rgba(255, 255, 255, 0.1); margin: 10px 0 12px; overflow: hidden; }
.needed .bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--ac), #fff); }
.needed ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }

.grid { margin-top: 14px; padding: 10px 8px 12px; --cols: minmax(84px, 1.6fr) repeat(8, minmax(0, 1fr)); }
.grid .row { display: grid; grid-template-columns: var(--cols); gap: 4px; align-items: center; margin-top: 5px; }
.grid .row.head { margin-top: 0; }
.grid .dayhead { text-align: center; font-size: 10px; color: #8d909a; line-height: 1.15; padding: 2px 0; border-radius: 8px; }
.grid .dayhead b { display: block; font-size: 12px; color: var(--text); font-weight: 600; }
.grid .dayhead.today { background: rgba(255, 255, 255, 0.1); box-shadow: 0 0 0 1px var(--ac); }
.grid .rowname { font-size: 11.5px; line-height: 1.18; color: #d6d8de; background: none; border: 0; padding: 0 2px; text-align: left; min-height: 32px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.cell { height: 28px; border-radius: 8px; border: 0; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: none; color: transparent; }
.cell.na { visibility: hidden; }
.cell.todo { border: 1.5px solid #565a66; }
.cell.today { border: 1.5px solid var(--ac); box-shadow: 0 0 10px color-mix(in srgb, var(--ac) 45%, transparent); }
.cell.done { background: linear-gradient(135deg, var(--ac), color-mix(in srgb, var(--ac) 35%, white)); color: #07080b; }
.cell.done::after { content: "\2713"; }
.cell.late { background: rgba(240, 184, 74, 0.2); border: 1px solid var(--ac2); color: var(--ac2); }
.cell.late::after { content: "\2713"; }
.cell.missed { background: rgba(255, 107, 139, 0.16); color: var(--bad); }
.cell.missed::after { content: "\00d7"; font-size: 16px; }
.cell.pending { border: 1.5px dashed var(--ac2); color: var(--ac2); }
.cell.pending::after { content: "\2026"; }
.cell.rejected, .cell.disputed { border: 1.5px solid var(--bad); color: var(--bad); }
.cell.rejected::after, .cell.disputed::after { content: "!"; }
.cell.excused { border: 1.5px dashed #8d909a; color: #8d909a; }
.cell.excused::after { content: "\2013"; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; font-size: 11px; color: #8d909a; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend .cell { width: 14px; height: 14px; border-radius: 5px; font-size: 9px; }
.visit-items { margin-top: 14px; padding: 6px 14px; }
.visit-items .sheet-row { width: 100%; background: none; color: inherit; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.visit-items .sheet-row:last-child { border-bottom: 0; }

/* ---------- Rewards tab ---------- */
.h2h { margin-top: 14px; padding: 14px; }
.h2h .lead { font-size: 22px; font-weight: 650; letter-spacing: -0.01em; }
.h2h .pair { display: flex; gap: 10px; margin-top: 12px; }
.h2h .player { flex: 1; padding: 12px 8px; border-radius: 16px; text-align: center; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); }
.h2h .player.lead { border-color: var(--ac); }
.h2h .player b.n { display: block; font-size: 30px; font-weight: 600; line-height: 1.1; }
.h2h .player small { display: block; color: var(--muted); font-size: 11.5px; }
.h2h .player .name { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.h2h .you { color: var(--ac); font-weight: 600; }
.h2h-note { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.chest-card { margin-top: 14px; padding: 14px; }
.chest-card .row b { font-size: 17px; }
.chest-card ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.chest-card .btn { margin-top: 14px; }
.chest-card.ready { border-color: var(--ac2); box-shadow: 0 0 28px rgba(240, 184, 74, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.records { display: flex; gap: 8px; margin-top: 14px; }
.records > div { flex: 1; padding: 11px 4px; text-align: center; border-radius: 14px; }
.records b { display: block; font-size: 22px; font-weight: 600; }
.records span { font-size: 10.5px; color: var(--muted); }
.history-row { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; margin-top: 8px; text-align: left; }
.history-row small { display: block; color: var(--muted); font-size: 12px; }

.h2h small svg { width: 12px; height: 15px; }
.needed .group { margin-top: 10px; font-size: 14px; }
.needed .group b { display: block; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: #8d909a; font-weight: 500; margin-bottom: 2px; }

/* ---------- Reward chest ---------- */
.sparks { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 70; pointer-events: none; }
.streak canvas { width: 30px; height: 34px; display: block; margin: -4px -2px -6px -2px; }
.chest-stage { position: fixed; inset: 0; z-index: 80; background: radial-gradient(circle at 50% 38%, #2a1d08 0%, #07080b 62%); overflow: hidden; }
.chest-stage .rays { position: absolute; left: 50%; top: 40%; width: 760px; height: 760px; margin: -380px 0 0 -380px; border-radius: 50%; opacity: 0; mix-blend-mode: screen;
  background: repeating-conic-gradient(rgba(255, 208, 110, 0.5) 0 5deg, transparent 5deg 22deg); -webkit-mask-image: radial-gradient(circle, #000 6%, transparent 66%); mask-image: radial-gradient(circle, #000 6%, transparent 66%); }
.chest-stage .halo { position: absolute; left: 50%; top: 40%; width: 380px; height: 380px; margin: -190px 0 0 -190px; border-radius: 50%; background: radial-gradient(rgba(255, 196, 90, 0.55), transparent 65%); opacity: 0.5; }
.chest-stage .scene { position: absolute; inset: 0; }
.chest-stage .pers { position: absolute; inset: 0; perspective: 900px; perspective-origin: 50% 38%; }
.chest-stage .stage3d { position: absolute; left: 50%; top: 40%; width: 0; height: 0; transform-style: preserve-3d; cursor: pointer; }
.chest3d { position: absolute; left: 0; top: 0; transform-style: preserve-3d; transform: rotateX(-20deg) rotateY(-30deg) scale(1.25); }
.chest3d .f { position: absolute; backface-visibility: hidden; }
.chest3d .lid, .chest3d .lid-box { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.chest3d .wood { background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0) 0 11px, rgba(0, 0, 0, 0.22) 11px 12px), linear-gradient(#9b6330, #6a3d17); }
.chest3d .woodS { background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0) 0 11px, rgba(0, 0, 0, 0.28) 11px 12px), linear-gradient(#7e4d22, #522d0f); }
.chest3d .bands::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(90deg, transparent 12%, #f0b84a 12% 19%, transparent 19% 81%, #f0b84a 81% 88%, transparent 88%); }
.chest3d .gold { background: linear-gradient(135deg, #ffe29a, #c8902c 55%, #8a5d12); }
.chest3d .inside { background: radial-gradient(circle, #ffd88a, #c88a2a 60%, #5a3510); }
.chest3d .lidinside { background: #2a1708; }
.chest3d .clasp { position: absolute; left: -14px; top: -2px; width: 28px; height: 34px; border-radius: 5px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); }
.chest-stage .coins-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.chest-stage .flash-layer { position: absolute; inset: 0; opacity: 0; pointer-events: none; background: radial-gradient(circle at 50% 40%, #fff, transparent 60%); mix-blend-mode: screen; }
.chest-stage .amt { position: absolute; left: 0; right: 0; top: 12%; text-align: center; font-size: 76px; font-weight: 700; letter-spacing: -0.03em; color: #ffd98a; text-shadow: 0 0 40px rgba(255, 190, 80, 0.7); opacity: 0; }
.chest-stage.chest-video { background: #04060d; }
.chest-video .chest-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; cursor: pointer; background: #04060d; }
.chest-stage.chest-video .chest-msg { bottom: 0; padding: 90px 28px calc(var(--safe-bottom) + 40px); background: linear-gradient(transparent, rgba(4, 6, 13, 0.92) 55%); pointer-events: none; }
.chest-video .chest-msg .btn { pointer-events: auto; }
.chest-video h2:not(:empty) { animation: chest-tap 1.4s ease-in-out infinite; }
@keyframes chest-tap { 50% { opacity: 0.45; } }
.chest-video .amt { top: 17%; pointer-events: none; }
.chest-video .amt.baked { opacity: 0; }
.chest-video .amt.rise { animation: chest-amt 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) forwards; }
@keyframes chest-amt { from { opacity: 0; transform: translateY(30px) scale(0.4); } to { opacity: 1; transform: none; } }
.chest-stage .chest-msg { position: absolute; left: 0; right: 0; bottom: calc(var(--safe-bottom) + 40px); text-align: center; padding: 0 28px; }
.chest-stage .chest-msg h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.chest-stage .chest-msg p { margin-top: 6px; }
.chest-stage .chest-msg .btn { margin-top: 20px; }

/* Reminder times */
.reminder-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; }
.reminder-row .check-row { flex: 1; min-width: 0; }
.reminder-row .time { width: 120px; min-height: 48px; font-size: 18px; text-align: center; letter-spacing: normal; }
.reminders-link { text-align: center; margin-top: 18px; }

/* Pick your night */
.day-options { display: flex; flex-direction: column; gap: 8px; }
.day-option { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); text-align: left; }
.day-option.mine { border-color: var(--ac); }
.day-option[aria-disabled=true] { opacity: 0.45; cursor: not-allowed; }

/* Asking Rob to excuse something */
.ask-link { display: block; margin: 0 14px 10px; font-size: 13px; }
.chore.asked { border-color: color-mix(in srgb, var(--ac2) 55%, transparent); }
.day-ask { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 14px 0 4px; text-align: center; }
.cell.asked { outline: 2px dashed var(--ac2); outline-offset: -2px; }
.asks-list .sheet-row { align-items: flex-start; gap: 12px; }
.asks-list .sheet-row span:last-child { text-align: right; overflow-wrap: anywhere; }
.visit-items .sheet-row.tappable { cursor: pointer; }

/* Asking Rob: "I can't do it" or "I did it, forgot to tick" */
.kind-choice { gap: 8px; }
.kind-choice .btn.on { border-color: var(--ac2); box-shadow: inset 0 0 0 1px var(--ac2); }

/* What's new, and the new-version bar */
.news-card { margin: 12px 0; display: flex; flex-direction: column; gap: 8px; border: 1px solid color-mix(in srgb, var(--ac) 45%, transparent); }
.news-card .news-item p { margin-top: 2px; }
.update-bar { position: fixed; left: 12px; right: 12px; top: calc(env(safe-area-inset-top, 0px) + 10px); z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 16px; }
.update-bar .btn { width: auto; padding: 8px 16px; min-height: 0; }

/* Feedback */
.feedback-list { display: flex; flex-direction: column; gap: 10px; }
.feedback-row { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); display: flex; flex-direction: column; gap: 4px; }
.feedback-row.done .feedback-body { color: var(--muted); }
.feedback-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.feedback-row .link { align-self: flex-start; }
.kind-choice { flex-wrap: wrap; }
