/* Daily Slice, after the app's warm palette (ui/theme/Color.kt, GameScreen.kt, DailyStatsView.kt). */
@font-face {
  font-family: 'Bangers';
  src: url('../fonts/bangers.ttf') format('truetype');
  font-display: swap;
}
:root {
  --bg-top: #FFF8F0; --bg-mid: #FFF0F5; --bg-bot: #EFF8FF;
  --brown: #5D4037; --brown-65: rgba(93, 64, 55, 0.65); --brown-50: rgba(93, 64, 55, 0.5);
  --card: #FFFBF7; --pink: #FF6B8A; --sky: #48DBFB; --sky-ink: #1E9CC0; --accent: #AF7BF7; --freeze: #2E86C1;
  --orange: #FF9F43; --gold: #FFD700;
  --bangers: 'Bangers', 'Impact', system-ui, sans-serif;
  color-scheme: light;
}

body {
  color: var(--brown); min-height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--bg-top), var(--bg-mid) 50%, var(--bg-bot)) fixed;
}
main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 0 16px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.bangers { font-family: var(--bangers); font-weight: 400; letter-spacing: 0.04em; }

/* ---- Top bar ---- */
.topbar { display: flex; align-items: center; gap: 4px; max-width: 560px; width: 100%; margin: 0 auto; padding: max(8px, env(safe-area-inset-top)) 8px 0; }
.title { flex: 1; text-align: center; }
.title h1 { font-family: var(--bangers); font-weight: 400; font-size: 28px; letter-spacing: 0.05em; line-height: 1.1; }
.theme { font-size: 12px; font-weight: 800; letter-spacing: 0.25em; color: var(--accent); }
.icon-btn { width: 48px; height: 48px; display: grid; place-items: center; border: 0; background: none; border-radius: 50%; color: var(--brown); flex: none; text-decoration: none; }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn:hover { background: rgba(93, 64, 55, 0.07); }
#sound-btn[aria-pressed='true'] .mute, #sound-btn[aria-pressed='false'] .waves { display: none; }

/* ---- Stage ---- */
.hint { min-height: 22px; text-align: center; font-weight: 700; color: var(--brown-65); }
.stage { position: relative; width: 100%; }
#canvas { width: 100%; height: min(100vw, 62vh, 520px); touch-action: none; cursor: crosshair; display: block; }
#canvas.done { cursor: default; }
.nudge { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-weight: 800; color: var(--pink); opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.nudge.show { opacity: 1; }

/* ---- Result (DailyStatsBody) ---- */
.result { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; animation: rise 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.done-title { font-family: var(--bangers); font-size: 32px; color: var(--accent); letter-spacing: 0.04em; }
.card { width: 100%; background: var(--card); border-radius: 24px; box-shadow: 0 8px 28px rgba(93, 64, 55, 0.14); padding: 22px 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.caption { font-size: 13px; font-weight: 800; letter-spacing: 0.3em; color: var(--brown-50); }
.split { display: flex; align-items: flex-end; gap: 6px; font-family: var(--bangers); line-height: 1; }
.split .a, .split .b { font-size: 64px; }
.split .a { color: var(--pink); }
.split .b { color: var(--sky); }
.split .colon { font-size: 52px; color: rgba(93, 64, 55, 0.4); }
.offby { font-size: 14px; color: var(--brown-65); font-variant-numeric: tabular-nums; }
.verdict { font-family: var(--bangers); font-size: 22px; letter-spacing: 0.05em; }
.freeze-note { color: var(--freeze); font-weight: 700; font-size: 14px; }
.section { font-family: var(--bangers); font-size: 22px; letter-spacing: 0.04em; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; gap: 4px; }
.stat b { display: block; font-family: var(--bangers); font-weight: 400; font-size: 30px; line-height: 1.1; }
.stat span { font-size: 12px; color: var(--brown-65); white-space: pre-line; line-height: 1.2; }
.freezes { width: 100%; border-radius: 14px; background: rgba(46, 134, 193, 0.08); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.freezes .row { display: flex; align-items: center; justify-content: center; gap: 8px; }
.freezes .cubes { font-size: 20px; }
.freezes .cubes .empty { opacity: 0.25; }
.freezes b { font-family: var(--bangers); font-weight: 400; font-size: 18px; letter-spacing: 0.05em; }
.freezes p { font-size: 13px; color: var(--brown-65); }
.dist { width: 100%; display: flex; flex-direction: column; gap: 4px; }
.dist-row { display: flex; align-items: center; gap: 10px; }
.dist-row .lbl { width: 28px; font-family: var(--bangers); font-size: 18px; text-align: end; }
.dist-row .bar { display: block; height: 22px; min-width: 24px; border-radius: 6px; background: rgba(175, 123, 247, 0.35); color: #fff; font-size: 13px; font-weight: 800; text-align: end; padding: 0 8px; line-height: 22px; }
.dist-row.hi .bar { background: var(--accent); }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; border-radius: 18px; border: 0;
  font-family: var(--bangers); font-size: 21px; letter-spacing: 0.06em; text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(175, 123, 247, 0.35); }
.btn.outline { background: transparent; border: 2px solid rgba(93, 64, 55, 0.35); color: var(--brown); min-height: 50px; font-size: 18px; }
.btn:hover { filter: brightness(1.05); }

/* Next blob countdown (NextDailyCountdown) */
.countdown { width: 100%; border-radius: 18px; background: rgba(175, 123, 247, 0.08); padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.countdown p { font-size: 13px; font-weight: 800; letter-spacing: 0.2em; color: var(--accent); }
.clock { display: flex; align-items: center; gap: 6px; }
.clock span { font-family: var(--bangers); font-size: 30px; background: #fff; border-radius: 12px; padding: 4px 10px; min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; }
.clock i { font-family: var(--bangers); font-style: normal; font-size: 26px; color: rgba(175, 123, 247, 0.6); }
.track { width: 100%; height: 4px; border-radius: 2px; background: rgba(175, 123, 247, 0.15); overflow: hidden; }
.track b { display: block; height: 100%; background: var(--accent); }

.app-cta { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px; background: #fff; box-shadow: 0 4px 16px rgba(93, 64, 55, 0.1); text-align: start; }
.app-cta img { width: 60px; height: 60px; border-radius: 14px; flex: none; }
.app-cta div { display: flex; flex-direction: column; gap: 4px; }
.app-cta b { font-family: var(--bangers); font-weight: 400; font-size: 20px; letter-spacing: 0.04em; }
.app-cta p { font-size: 14px; color: var(--brown-65); }
.play-badge { align-self: flex-start; margin-top: 4px; padding: 8px 14px; border-radius: 12px; background: #1D2433; color: #fff; text-decoration: none; font-size: 14px; font-weight: 800; display: inline-flex; align-items: center; gap: 8px; }
.play-badge svg { width: 18px; height: 18px; }

/* ---- Dialog, toast, footer ---- */
.dialog { border: 0; border-radius: 28px; padding: 24px; width: min(420px, calc(100vw - 32px)); background: var(--card); color: var(--brown); box-shadow: 0 16px 40px rgba(93, 64, 55, 0.3); }
.dialog::backdrop { background: rgba(60, 40, 30, 0.4); }
.dialog h2 { font-family: var(--bangers); font-weight: 400; font-size: 30px; letter-spacing: 0.04em; text-align: center; color: var(--accent); margin-bottom: 10px; }
.dialog .blob { display: block; width: 120px; height: 90px; margin: 0 auto 6px; }
.dialog ul { margin: 0 0 16px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.toast { position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px); z-index: 60; padding: 12px 18px; border-radius: 12px; background: var(--brown); color: #fff; font-weight: 800; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.site-footer { max-width: 560px; margin: 0 auto; padding: 16px 16px 32px; font-size: 12px; color: var(--brown-65); text-align: center; }
.site-footer a { color: var(--accent); }

/* ---- Past puzzles: the practice result, and the archive grid (archive/) ---- */
.practice-line { font-size: 15px; color: var(--brown-65); }
.practice-line b { color: var(--brown); font-family: var(--bangers); font-weight: 400; font-size: 20px; letter-spacing: 0.04em; }
.practice-note { font-size: 13px; color: var(--brown-65); }
.archive { width: 100%; display: flex; flex-direction: column; gap: 14px; padding-top: 8px; }
.archive .intro { color: var(--brown-65); text-align: center; font-size: 15px; }
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 10px; }
.cell {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px 12px; border-radius: 18px;
  background: var(--card); box-shadow: 0 3px 12px rgba(93, 64, 55, 0.1); color: var(--brown); text-decoration: none; transition: transform 0.15s;
}
.cell:hover { transform: translateY(-2px); }
.cell .n { font-family: var(--bangers); font-size: 20px; letter-spacing: 0.04em; }
.cell svg { width: 60px; height: 60px; overflow: visible; margin: 2px 0 4px; }
.cell .date { font-size: 12px; color: var(--brown-65); }
.cell .twist { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; color: var(--accent); min-height: 13px; }
.cell .score { font-family: var(--bangers); font-size: 20px; letter-spacing: 0.04em; }
.cell .score.best { color: var(--brown-65); font-size: 16px; }
.cell .score.none { color: rgba(93, 64, 55, 0.35); }
.cell.today { background: var(--accent); color: #fff; }
.cell.today .date, .cell.today .twist { color: rgba(255, 255, 255, 0.85); }

/* Share the text or the picture card (share.js), side by side. */
.share-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
