/* ============================================================
   EzzyBoard — kid-first activity board styles
   Palette tuned for white-on-color icons (>=3:1) and ink text (>=4.5:1)
   ============================================================ */

:root {
  --ink: #243b53;
  --ink-soft: #52606d;
  --primary: #7048e8;
  --primary-2: #5f3dc4;
  --accent: #0b7285;
  --danger: #e03131;
  --success: #2f9e44;
  --ok-ink: #115e20;
  --warn: #e8590c;
  --card-bg: #ffffff;
  --bg-top: #e7f0fd;
  --bg-bottom: #fdf6ec;
  --pill-bg: #ffffff;
  --ring-track: #e9ecef;
  --radius: 24px;
  --shadow-soft: 0 10px 30px rgba(36, 59, 83, 0.12);
  --shadow-pop: 0 18px 44px rgba(36, 59, 83, 0.22);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  font-family: 'Fredoka', 'Baloo 2', system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(112, 72, 232, 0.10), transparent 40%),
    radial-gradient(circle at 88% 4%, rgba(25, 113, 194, 0.10), transparent 36%),
    linear-gradient(180deg, var(--bg-top) 0%, #f4f1fb 42%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  min-height: 100dvh;
  padding-bottom: 96px;
  -webkit-tap-highlight-color: transparent;
}

.material-symbols-rounded {
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
  user-select: none;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

button { font-family: inherit; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ---------- top bar ---------- */

#topBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 6px;
  max-width: 680px;
  margin: 0 auto;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.brand-icon {
  font-size: 34px;
  background: linear-gradient(135deg, var(--primary), #1971c2);
  color: #fff;
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--shadow-soft);
}

#appTitle {
  font-family: 'Baloo 2', 'Fredoka', sans-serif;
  font-size: 26px;
  font-weight: 800;
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0.2px;
}

.date-chip {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.header-right { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  border: none;
  background: var(--pill-bg);
  color: var(--ink);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(36, 59, 83, 0.12);
  position: relative;
  transition: transform 0.15s ease, background 0.2s ease;
}
.icon-btn:hover { transform: translateY(-2px); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn .material-symbols-rounded { font-size: 22px; }

.parent-btn.unlocked {
  background: var(--primary);
  color: #fff;
}
.parent-dot {
  position: absolute;
  top: 2px; right: 2px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid #fff;
}

.sync-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--pill-bg);
  box-shadow: 0 4px 14px rgba(36, 59, 83, 0.12);
  transition: background 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}
.sync-pill .material-symbols-rounded { font-size: 17px; }
.sync-pill .sync-text { max-width: 70px; overflow: hidden; text-overflow: ellipsis; }
.sync-pill.synced { color: var(--ok-ink); }
.sync-pill.offline { color: var(--ink-soft); }
.sync-pill.syncing { color: var(--accent); }
.sync-pill.error { color: var(--danger); }
.sync-pill.syncing .material-symbols-rounded { animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 430px) {
  .sync-pill .sync-text { display: none; }
  .sync-pill { padding: 8px 10px; }
}

/* ---------- sky strip ---------- */

#skyBox {
  position: relative;
  max-width: 680px;
  margin: 4px auto 0;
  padding: 0 8px;
}

#skySvg { width: 100%; height: 64px; display: block; }

#sunDot, #sunHalo, #moonDot {
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.8s ease;
}

.clock-chip {
  position: absolute;
  right: 12px;
  top: 20px;
  margin: 0;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  padding: 3px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(36, 59, 83, 0.1);
}

/* ---------- up next ---------- */

.up-next {
  max-width: 680px;
  margin: 10px auto 0;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, rgba(112, 72, 232, 0.12), rgba(25, 113, 194, 0.10));
  border-radius: var(--radius);
  font-size: 15px;
}

.up-next-label {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--primary-2);
}

.up-next-icon { font-size: 22px; color: var(--primary-2); animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }

#upNextTitle { font-size: 17px; font-weight: 600; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-next-time { margin-left: auto; color: var(--ink-soft); font-weight: 600; white-space: nowrap; }

/* ---------- day progress ---------- */

.day-progress {
  max-width: 680px;
  margin: 10px auto 2px;
  padding: 2px 16px 0;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 5px;
}

.progress-flag { color: var(--ok-ink); font-weight: 700; }

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(36, 59, 83, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f9e44, #0ca678 45%, #1971c2);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- timeline cards ---------- */

main { max-width: 680px; margin: 0 auto; padding: 0 12px; }

.timeline {
  list-style: none;
  margin: 8px 0 0;
  padding: 0 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 3px solid transparent;
  border-left: 10px solid var(--card-color, var(--primary));
  box-shadow: var(--shadow-soft);
  padding: 11px 12px;
  cursor: default;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease, filter 0.3s ease;
  animation: card-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  touch-action: pan-y;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.editable .card { cursor: pointer; }

.card.past { opacity: 0.62; filter: saturate(0.5); }

.card.done { opacity: 0.85; }
.card.done .card-title { color: var(--ink-soft); }
.card.done::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: var(--radius);
  background: rgba(47, 158, 68, 0.07);
  pointer-events: none;
}

/* NOW card: breathing colored glow */
.card.now {
  border-color: color-mix(in srgb, var(--card-color, var(--primary)) 55%, white);
  box-shadow: var(--shadow-pop);
  transform: scale(1.015);
  z-index: 2;
}
.card.now::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: calc(var(--radius) + 4px);
  background: color-mix(in srgb, var(--card-color, var(--primary)) 18%, transparent);
  filter: blur(10px);
  z-index: -1;
  animation: now-breathe 2.6s ease-in-out infinite;
}
@keyframes now-breathe {
  0%, 100% { opacity: 0.55; transform: scale(0.99); }
  50% { opacity: 1; transform: scale(1.02); }
}

.now-badge {
  position: absolute;
  top: -12px;
  right: 14px;
  background: color-mix(in srgb, var(--card-color, var(--primary)) 72%, #1a2634);
  color: #fff;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: 1.6px;
  padding: 3px 12px 4px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(36, 59, 83, 0.25);
  animation: badge-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
@keyframes badge-pop { from { transform: scale(0); } to { transform: scale(1); } }

/* special cards: dashed frame + tint */
.card.special {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--card-color, var(--primary)) 60%, white);
  border-left-style: solid;
  background: color-mix(in srgb, var(--card-color, var(--primary)) 6%, white);
}

.time-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 52px;
  font-family: 'Baloo 2', sans-serif;
}
.time-col .t-start { font-size: 15.5px; font-weight: 700; line-height: 1.1; }
.time-col .t-end { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); line-height: 1.1; }

.check-btn {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--card-color, var(--primary)) 65%, white);
  background: #fff;
  color: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.check-btn .material-symbols-rounded { font-size: 24px; }
.check-btn:hover { transform: scale(1.08); }
.check-btn:active { transform: scale(0.92); }
.done .check-btn {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
  animation: check-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes check-pop {
  0% { transform: scale(0.4); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.icon-chip {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--card-color, var(--primary));
  color: #fff;
  display: grid;
  place-items: center;
}
.icon-chip .material-symbols-rounded { font-size: 24px; }

.card-body { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.card-title {
  font-family: 'Baloo 2', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: break-word;
}
.card-sub {
  margin: 1px 0 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
}
.card-sub .material-symbols-rounded { font-size: 15px; }

.done-chip {
  color: var(--ok-ink);
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.done-chip .material-symbols-rounded { font-size: 16px; }

/* timer ring on the now card */
.timer-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
}
.timer-wrap svg { transform: rotate(-90deg); width: 52px; height: 52px; }
.timer-track { fill: none; stroke: var(--ring-track); stroke-width: 6; }
.timer-fg {
  fill: none;
  stroke: var(--card-color, var(--primary));
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s linear;
}
.timer-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
}

/* drag affordances */
.drag-handle {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: #adb5bd;
  cursor: grab;
  padding: 4px 2px;
  margin-left: -2px;
  border-radius: 10px;
  touch-action: none;
}
.drag-handle .material-symbols-rounded { font-size: 24px; display: block; }
.drag-handle:hover { color: var(--ink-soft); background: rgba(36, 59, 83, 0.06); }
body:not(.parent-on) .drag-handle { display: none; }

.card.dragging {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  cursor: grabbing;
  box-shadow: var(--shadow-pop);
  transform: rotate(1.6deg) scale(1.03);
  opacity: 0.97;
  animation: none;
  border-style: solid;
  border-color: var(--card-color, var(--primary));
}
.card-placeholder {
  border: 3px dashed color-mix(in srgb, var(--primary) 45%, white);
  border-radius: var(--radius);
  background: rgba(112, 72, 232, 0.06);
}

/* star burst on check */
.burst { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 5; }
.burst span {
  position: absolute;
  left: 32px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px;
  border-radius: 3px;
  background: var(--b-color, #f59f00);
  animation: burst-fly 0.8s ease-out forwards;
}
.burst span.star {
  width: 0; height: 0; border-radius: 0;
  background: transparent;
}
@keyframes burst-fly {
  0% { transform: translate(0, 0) scale(0.4) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--bx), var(--by)) scale(1.1) rotate(var(--br)); opacity: 0; }
}

/* ---------- add row + upcoming ---------- */

.add-row {
  display: flex;
  gap: 10px;
  margin: 14px 4px 0;
  flex-wrap: wrap;
}

.add-btn {
  flex: 1 1 160px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 3px dashed color-mix(in srgb, var(--primary) 55%, white);
  background: rgba(255, 255, 255, 0.7);
  color: var(--primary-2);
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}
.add-btn:hover { transform: translateY(-2px); background: #fff; }
.add-btn:active { transform: scale(0.96); }
.add-btn.special {
  border-color: color-mix(in srgb, var(--warn) 55%, white);
  color: #b02500;
}
.add-btn .material-symbols-rounded { font-size: 24px; }

.empty-note {
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 28px 12px;
}

.upcoming { margin: 22px 4px 0; }
.upcoming h2 {
  font-family: 'Baloo 2', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
}
.upcoming h2 .material-symbols-rounded { font-size: 20px; }
.upcoming ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.upcoming li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  padding: 9px 12px;
  box-shadow: 0 4px 12px rgba(36, 59, 83, 0.08);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
}
.editable .upcoming li { cursor: pointer; }
body:not(.parent-on) .upcoming li { cursor: default; }
.upcoming .u-icon {
  width: 34px; height: 34px;
  border-radius: 11px;
  background: var(--card-color, var(--primary));
  color: #fff;
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.upcoming .u-icon .material-symbols-rounded { font-size: 19px; }
.upcoming .u-title { font-family: 'Baloo 2', sans-serif; font-weight: 700; }
.upcoming .u-when { margin-left: auto; color: var(--ink-soft); font-weight: 600; white-space: nowrap; }

/* ---------- sheets ---------- */

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(36, 59, 83, 0.45);
  z-index: 80;
  animation: fade-in 0.25s ease backwards;
}
@keyframes fade-in { from { opacity: 0; } }

.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  margin: 0 auto;
  max-width: 520px;
  background: #fff;
  border-radius: 28px 28px 0 0;
  z-index: 90;
  box-shadow: 0 -14px 50px rgba(36, 59, 83, 0.3);
  animation: sheet-up 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
}
.sheet.narrow { max-width: 380px; }
@keyframes sheet-up { from { transform: translateY(100%); } }

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 6px;
}
.sheet-head h2 {
  font-family: 'Baloo 2', sans-serif;
  font-size: 21px;
  font-weight: 800;
  margin: 0;
}

.sheet-body { padding: 8px 18px 14px; overflow-y: auto; }

.field { display: block; margin: 0 0 14px; }
.field-label {
  display: block;
  font-family: 'Baloo 2', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-soft);
  margin-bottom: 5px;
}

.oc-input {
  width: 100%;
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  background: #f6f5fb;
  border: 2px solid #e2dff2;
  border-radius: 14px;
  padding: 10px 12px;
}
.oc-input:focus { border-color: var(--primary); outline: none; }
.oc-input.big { font-size: 20px; font-weight: 600; padding: 12px 14px; }
.oc-input.center { text-align: center; letter-spacing: 4px; font-family: 'Baloo 2', sans-serif; }

.stepper {
  display: flex;
  align-items: center;
  gap: 12px;
}
.step-btn {
  width: 44px; height: 44px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--primary), #1971c2);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(112, 72, 232, 0.35);
  transition: transform 0.12s ease;
}
.step-btn:active { transform: scale(0.9); }
.step-btn .material-symbols-rounded { font-size: 24px; }
.step-value {
  font-family: 'Baloo 2', sans-serif;
  font-size: 19px;
  font-weight: 800;
  min-width: 96px;
  text-align: center;
}

.special-times { display: flex; gap: 8px; }
.special-times .field { flex: 1 1 0; min-width: 0; }
.special-times .oc-input { padding: 9px 8px; font-size: 14.5px; }

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  border: 2px solid #e2dff2;
  background: #f6f5fb;
  border-radius: 14px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  transition: transform 0.12s ease, background 0.2s, color 0.2s, border-color 0.2s;
}
.chip .material-symbols-rounded { font-size: 26px; }
.chip[aria-pressed='true'] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  animation: chip-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes chip-pop { 50% { transform: scale(1.15); } }
.chip:active { transform: scale(0.92); }

.chip.color-chip {
  width: 40px; height: 40px;
  border-radius: 50%;
  padding: 0;
  border: 3px solid transparent;
  background: var(--swatch);
}
.chip.color-chip[aria-pressed='true'] {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 3px #fff;
}

.sheet-foot {
  display: flex;
  gap: 10px;
  padding: 12px 18px calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid #efeef7;
}

.primary-btn {
  flex: 1 1 auto;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), #1971c2);
  color: #fff;
  font-family: 'Baloo 2', sans-serif;
  font-size: 18px;
  font-weight: 800;
  padding: 14px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(112, 72, 232, 0.4);
  transition: transform 0.12s ease;
}
.primary-btn:active { transform: scale(0.96); }
.primary-btn.wide { width: 100%; }
.primary-btn .material-symbols-rounded { font-size: 22px; }

.danger-btn {
  border: 2px solid #ffc9c9;
  background: #fff5f5;
  color: var(--danger);
  border-radius: 18px;
  font-family: 'Baloo 2', sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 12px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease, transform 0.12s ease;
}
.danger-btn:hover { background: #ffe3e3; }
.danger-btn.armed {
  background: var(--danger);
  color: #fff;
  animation: wobble 0.4s ease;
}
@keyframes wobble {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.danger-btn .material-symbols-rounded { font-size: 20px; }

.lock-question {
  font-family: 'Baloo 2', sans-serif;
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  margin: 6px 0 12px;
}
.lock-hint {
  text-align: center;
  color: var(--danger);
  font-weight: 700;
  margin: 6px 0 0;
  animation: badge-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- snackbar ---------- */

.snackbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: 16px;
  box-shadow: var(--shadow-pop);
  animation: snack-up 0.3s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  max-width: min(480px, 92vw);
}
@keyframes snack-up { from { transform: translate(-50%, 30px); opacity: 0; } }
.snackbar button {
  border: none;
  background: transparent;
  color: #ffd43b;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 15.5px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
}
.snackbar button:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- celebration ---------- */

.celebration { position: fixed; inset: 0; pointer-events: none; z-index: 200; overflow: hidden; }

.confetti-piece {
  position: absolute;
  top: -16px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(105dvh) rotate(720deg); opacity: 0; }
}

.all-done-banner {
  position: fixed;
  left: 50%;
  top: 18%;
  transform: translate(-50%, -50%);
  z-index: 210;
  background: linear-gradient(135deg, #ffd43b, #ff922b);
  color: #5c3b00;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 30px;
  padding: 18px 30px;
  border-radius: 26px;
  box-shadow: var(--shadow-pop);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: banner-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  pointer-events: none;
  white-space: nowrap;
}
.all-done-banner .material-symbols-rounded { font-size: 40px; color: #fff; }
@keyframes banner-in { from { transform: translate(-50%, -50%) scale(0.3); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .card.now { transform: none; }
}

@media (min-width: 700px) {
  #appTitle { font-size: 30px; }
  .timeline { gap: 12px; }
  .card { padding: 14px 18px; }
}
