/* ==========================================================================
   Stevie's Get Stuff Done Place
   cosy hearth by default · fireworks when you win
   ========================================================================== */

@font-face {
  font-family: 'Nunito';
  src: url('../fonts/nunito.woff2') format('woff2');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --bg: #211711;
  --bg-2: #2a1e16;
  --card: #31241b;
  --card-2: #3a2b20;
  --line: #4a3627;
  --text: #f6ecdf;
  --muted: #b7a08c;
  --accent: #f4a259;
  --accent-2: #ef6351;
  --accent-soft: rgba(244, 162, 89, .14);
  --gem: #ffd166;
  --good: #9dd9a3;
  --night: #12101d;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --radius: 18px;
  --font: 'Nunito', ui-rounded, 'Segoe UI', system-ui, -apple-system, sans-serif;
}

[data-theme="ocean"] {
  --bg: #101b21; --bg-2: #142229; --card: #1a2b33; --card-2: #21343d;
  --line: #2d4550; --text: #e8f2f4; --muted: #93aeb5;
  --accent: #5cc8d7; --accent-2: #3f8efc; --accent-soft: rgba(92, 200, 215, .14);
  --gem: #8be0e8;
}

[data-theme="meadow"] {
  --bg: #131b12; --bg-2: #182417; --card: #1f2d1d; --card-2: #263723;
  --line: #35492f; --text: #eef4e8; --muted: #a3b598;
  --accent: #a3c161; --accent-2: #6aa84f; --accent-soft: rgba(163, 193, 97, .14);
  --gem: #d3e97a;
}

[data-theme="aurora"] {
  --bg: #120f1d; --bg-2: #181327; --card: #1f1930; --card-2: #281f3d;
  --line: #3a2d56; --text: #f0eaf8; --muted: #a698c2;
  --accent: #b78bfa; --accent-2: #f472b6; --accent-soft: rgba(183, 139, 250, .14);
  --gem: #99f6e4;
}

* { box-sizing: border-box; }
html { height: 100%; }

/* the hidden attribute must always win, even over display:flex components */
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(900px 500px at -20% 110%, rgba(239, 99, 81, .08), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 18px 30px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  gap: 18px;
}

button { font-family: var(--font); cursor: pointer; }
input, select { font-family: var(--font); }

/* ---------------------------------------------------------------- topbar */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 2px;
}

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

.brand-mark {
  color: var(--accent);
  font-size: 22px;
  filter: drop-shadow(0 0 8px var(--accent-soft));
  animation: gentle-spin 24s linear infinite;
  display: inline-block;
}

.brand-mark.big { font-size: 42px; }

@keyframes gentle-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 17px; font-weight: 800; letter-spacing: .2px; }
.brand-text em { font-style: normal; font-size: 11.5px; color: var(--muted); }

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

.week-dots { display: flex; gap: 4px; align-items: center; margin-right: 2px; }

.week-dots i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--line);
  display: inline-block;
  transition: all .3s;
}
.week-dots i.on { background: var(--accent); box-shadow: 0 0 6px var(--accent-soft); }
.week-dots i.today { outline: 1.5px solid var(--muted); outline-offset: 1.5px; }
.week-dots i.today.on { outline-color: var(--accent); }

.gem-chip {
  display: flex; align-items: center; gap: 5px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  transition: transform .2s;
}
.gem-chip .gem { color: var(--gem); font-size: 13px; }
.gem-chip.bump { animation: bump .5s ease; }

@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

.icon-btn {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  width: 36px; height: 36px;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1;
  transition: all .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); }

/* ---------------------------------------------------------------- capture */

.capture-inner {
  display: flex;
  gap: 10px;
}

#captureInput {
  flex: 1;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 16px;
  padding: 15px 18px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
#captureInput::placeholder { color: var(--muted); }
#captureInput:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.capture-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #2b1708;
  font-weight: 800;
  font-size: 15px;
  border: none;
  border-radius: var(--radius);
  padding: 0 20px;
  white-space: nowrap;
  transition: transform .15s, filter .15s;
}
.capture-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.capture-btn:active { transform: translateY(0) scale(.98); }

.capture-hint {
  margin: 8px 4px 0;
  font-size: 12px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- the one thing */

.now-label {
  margin: 0 4px 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.now-card {
  background: linear-gradient(160deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.now-card::before {
  content: '';
  position: absolute;
  inset: -40% 55% 55% -20%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent);
  pointer-events: none;
}

.now-empty {
  text-align: center;
  padding: 18px 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
.now-empty strong { color: var(--text); }

.now-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }

.chip {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(0,0,0,.18);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
}

.min-pill {
  font-size: 12.5px;
  font-weight: 900;
  color: #2b1708;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  padding: 4px 11px;
  border-radius: 999px;
  box-shadow: 0 2px 10px var(--accent-soft);
}

.now-title {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 8px;
}

.now-step {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}
.now-step::before { content: '↳ '; color: var(--accent); }

.now-buttons { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.primary-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #2b1708;
  font-weight: 900;
  font-size: 15px;
  border: none;
  border-radius: 14px;
  padding: 13px 22px;
  transition: transform .15s, filter .15s, box-shadow .15s;
  box-shadow: 0 4px 18px var(--accent-soft);
}
.primary-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.primary-btn:active { transform: scale(.97); }
.primary-btn.big { font-size: 17px; padding: 16px 28px; border-radius: 16px; }
.primary-btn.small { font-size: 13px; padding: 9px 14px; }

.ghost-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
  font-size: 13.5px;
  border-radius: 12px;
  padding: 10px 14px;
  transition: all .15s;
}
.ghost-btn:hover { color: var(--text); border-color: var(--accent); }
.ghost-btn.small { font-size: 12.5px; padding: 8px 11px; }

.tick-link {
  background: none; border: none;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline dotted;
  padding: 8px 4px;
}
.tick-link:hover { color: var(--good); }

.now-actions { display: flex; justify-content: flex-end; margin-top: 10px; }

/* the two understudies beneath the headline task */
.alt-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }

.alt-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 11px 14px;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.alt-card:hover { border-color: var(--accent); transform: translateX(3px); }

.alt-play {
  flex: none;
  background: var(--accent-soft);
  color: var(--accent);
  border: none;
  font-weight: 900;
  font-size: 12px;
  border-radius: 10px;
  padding: 9px 11px;
  white-space: nowrap;
}
.alt-play:hover { background: var(--accent); color: #2b1708; }

.alt-body { flex: 1; min-width: 0; }
.alt-title {
  font-size: 14px; font-weight: 700; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.alt-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* the time pill is clickable — change the estimate any time */
button.min-pill { border: none; cursor: pointer; font-family: var(--font); transition: transform .15s, filter .15s; }
button.min-pill:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* time editor */
.time-task { color: var(--muted); font-size: 13.5px; margin: -6px 0 14px; }

.time-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.time-chip {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 800;
  font-size: 13.5px;
  border-radius: 999px;
  padding: 8px 14px;
  transition: all .15s;
}
.time-chip:hover { border-color: var(--accent); }
.time-chip.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #2b1708;
  border-color: transparent;
}

.time-custom { display: flex; align-items: center; gap: 8px; }
.time-custom input {
  width: 80px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  padding: 9px 10px;
  outline: none;
  text-align: center;
}
.time-custom input:focus { border-color: var(--accent); }
.time-custom span { color: var(--muted); font-size: 13.5px; }
.time-custom .primary-btn { width: auto; margin: 0 0 0 auto; }

.time-note { font-size: 11.5px; color: var(--muted); margin: 14px 0 0; }

/* minutes chip on drawer rows */
.row-mins {
  flex: none;
  background: none;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-weight: 800;
  font-size: 11.5px;
  border-radius: 999px;
  padding: 5px 9px;
  white-space: nowrap;
}
.row-mins:hover { border-color: var(--accent); color: var(--accent); }

/* ---------------------------------------------------------------- today meter */

.today {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px 20px;
}

.meter-wrap { position: relative; width: 84px; height: 84px; flex: none; }
.meter { width: 84px; height: 84px; transform: rotate(-90deg); }
.meter-track { fill: none; stroke: var(--line); stroke-width: 10; }
.meter-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset .8s cubic-bezier(.22, 1, .36, 1);
}

.meter-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  line-height: 1.05;
}
.meter-text strong { font-size: 22px; font-weight: 900; }
.meter-text span { font-size: 10.5px; color: var(--muted); }

.today-text p { margin: 0; font-size: 15px; font-weight: 700; }
.today-text .today-sub { margin-top: 4px; font-size: 12.5px; color: var(--muted); font-weight: 400; }

/* ---------------------------------------------------------------- night mode */

.night {
  position: relative;
  text-align: center;
  padding: 12vh 10px 40px;
  min-height: 70vh;
}

body.night-active {
  background: linear-gradient(180deg, #0e0c18 0%, #151226 100%);
}

.night-stars, .night-stars::before, .night-stars::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,.5), transparent),
    radial-gradient(2px 2px at 60% 20%, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 1px at 80% 50%, rgba(255,255,255,.45), transparent),
    radial-gradient(1.5px 1.5px at 90% 80%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 10% 85%, rgba(255,255,255,.4), transparent),
    radial-gradient(1.5px 1.5px at 70% 90%, rgba(255,255,255,.55), transparent),
    radial-gradient(1px 1px at 30% 10%, rgba(255,255,255,.5), transparent);
  pointer-events: none;
  animation: twinkle 5s ease-in-out infinite alternate;
}
.night-stars::before { transform: translate(12px, 30px) scale(1.15); animation-delay: 1.6s; opacity: .7; }
.night-stars::after { transform: translate(-20px, 10px) scale(.9); animation-delay: 3.1s; opacity: .5; }

@keyframes twinkle { from { opacity: .35; } to { opacity: .9; } }

.night h2 { font-size: 26px; font-weight: 800; margin: 0 0 6px; position: relative; }
.night p { color: var(--muted); margin: 0 0 26px; position: relative; }

.night-capture {
  display: flex; gap: 10px;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
}

#nightInput {
  flex: 1;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.14);
  border-radius: 16px;
  color: var(--text);
  font-size: 16px;
  padding: 16px 18px;
  outline: none;
}
#nightInput:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

#nightAdd {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #2b1708; font-weight: 800; font-size: 15px;
  border: none; border-radius: 16px; padding: 0 20px;
}

.night-done {
  margin-top: 20px !important;
  color: var(--good) !important;
  font-weight: 700;
  animation: fade-up .5s ease;
}

.night-switch { margin-top: 8vh; opacity: .75; position: relative; }

/* ---------------------------------------------------------------- footer */

.foot {
  margin-top: auto;
  text-align: center;
  color: var(--muted);
  font-size: 11.5px;
  padding-top: 10px;
}
.foot-dot { margin: 0 6px; opacity: .6; }
.linkish {
  background: none; border: none; padding: 0;
  color: var(--muted); font-size: 11.5px;
  text-decoration: underline dotted;
}
.linkish:hover { color: var(--accent); }

/* ---------------------------------------------------------------- nudge */

.nudge {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: min(440px, calc(100vw - 32px));
  background: var(--card-2);
  border: 1px solid var(--accent);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 14px 40px rgba(0,0,0,.5), 0 0 24px var(--accent-soft);
  z-index: 60;
  animation: fade-up .45s cubic-bezier(.22, 1, .36, 1);
}

.nudge-title {
  margin: 0 0 4px;
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.nudge-task { margin: 0 0 12px; font-size: 15.5px; font-weight: 700; }
.nudge-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@keyframes fade-up {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%; bottom: 22px;
  transform: translateX(-50%);
  background: var(--card-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow);
  z-index: 70;
  animation: fade-up .4s ease;
  max-width: calc(100vw - 40px);
}
.toast .sorted { color: var(--muted); font-weight: 400; font-size: 12.5px; }

/* ---------------------------------------------------------------- drawer */

.drawer-veil, .modal-veil {
  position: fixed; inset: 0;
  background: rgba(10, 6, 4, .55);
  backdrop-filter: blur(3px);
  z-index: 80;
  animation: fade-in .25s ease;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(430px, 94vw);
  background: var(--bg-2);
  border-left: 1px solid var(--line);
  z-index: 90;
  display: flex;
  flex-direction: column;
  animation: slide-in .35s cubic-bezier(.22, 1, .36, 1);
  box-shadow: -20px 0 60px rgba(0,0,0,.45);
}

@keyframes slide-in {
  from { transform: translateX(60px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.drawer-head { padding: 20px 22px 12px; position: relative; }
.drawer-head h2 { margin: 0 0 4px; font-size: 20px; font-weight: 900; }
.drawer-head p { margin: 0; font-size: 12.5px; color: var(--muted); }
.drawer-close { position: absolute; top: 16px; right: 16px; }

.drawer-body { flex: 1; overflow-y: auto; padding: 6px 14px 20px; }

.cat-group { margin-bottom: 6px; }

.cat-head {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  background: none; border: none;
  color: var(--muted);
  font-size: 13px; font-weight: 800;
  padding: 10px 8px;
  text-align: left;
  border-radius: 10px;
}
.cat-head:hover { background: var(--card); color: var(--text); }
.cat-head .count {
  margin-left: auto;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  padding: 2px 8px;
}
.cat-head .tri { transition: transform .2s; font-size: 10px; }
.cat-group.open .tri { transform: rotate(90deg); }

.cat-items { display: none; }
.cat-group.open .cat-items { display: block; }

.task-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  margin: 6px 2px;
  transition: border-color .15s;
}
.task-row:hover { border-color: var(--accent); }

.row-play {
  flex: none;
  background: var(--accent-soft);
  color: var(--accent);
  border: none;
  font-weight: 900;
  font-size: 11.5px;
  border-radius: 10px;
  padding: 8px 10px;
  white-space: nowrap;
}
.row-play:hover { background: var(--accent); color: #2b1708; }

.row-title { flex: 1; font-size: 14px; font-weight: 600; line-height: 1.35; cursor: text; }
.row-title input {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: 8px;
  font-size: 14px;
  padding: 6px 8px;
  outline: none;
}

.row-check {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: none;
  color: transparent;
  font-size: 15px;
  transition: all .2s;
}
.row-check:hover { border-color: var(--good); color: var(--good); }

.row-del {
  flex: none;
  background: none; border: none;
  color: var(--line);
  font-size: 15px;
  padding: 4px;
}
.row-del:hover { color: var(--accent-2); }

.drawer-done {
  border-top: 1px solid var(--line);
  padding: 12px 22px 18px;
  font-size: 12.5px;
  color: var(--muted);
  max-height: 30vh;
  overflow-y: auto;
}
.drawer-done .done-row { padding: 4px 0; }
.drawer-done .done-row s { opacity: .7; }
.drawer-done .done-row .g { color: var(--gem); font-weight: 700; }
.drawer-done .undo { background: none; border: none; color: var(--muted); font-size: 11px; text-decoration: underline dotted; }

/* ---------------------------------------------------------------- timer */

.timer-overlay {
  position: fixed; inset: 0;
  background: rgba(14, 9, 6, .92);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in .3s ease;
}

.timer-box { text-align: center; padding: 20px; max-width: 480px; }

.timer-task { font-size: 20px; font-weight: 800; margin: 0 0 6px; }
.timer-step { color: var(--muted); margin: 0 0 26px; font-size: 14px; }
.timer-step::before { content: '↳ '; color: var(--accent); }

.ring-wrap { position: relative; width: 230px; height: 230px; margin: 0 auto 28px; }
.ring { width: 230px; height: 230px; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--line); stroke-width: 11; }
.ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 11;
  stroke-linecap: round;
  stroke-dasharray: 552.9;
  stroke-dashoffset: 0;
  transition: stroke .4s;
}

.ring-wrap.grace .ring-fill { stroke: var(--accent-2); animation: ring-pulse 1.2s ease-in-out infinite; }

@keyframes ring-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}

.ring-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ring-text strong { font-size: 46px; font-weight: 900; font-variant-numeric: tabular-nums; }
.ring-text span { color: var(--muted); font-size: 13px; margin-top: 2px; }

.timer-actions { display: flex; flex-direction: column; gap: 10px; align-items: center; }

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

#confetti {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 110;
}

.celebrate {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(14, 9, 6, .6);
  z-index: 105;
  animation: fade-in .25s ease;
}

.celebrate-card {
  background: linear-gradient(160deg, var(--card-2), var(--card));
  border: 1px solid var(--accent);
  border-radius: 26px;
  text-align: center;
  padding: 36px 44px;
  box-shadow: 0 24px 80px rgba(0,0,0,.6), 0 0 60px var(--accent-soft);
  animation: pop .5s cubic-bezier(.18, 1.4, .4, 1);
  max-width: min(420px, 88vw);
}

.celebrate-card.golden {
  border-color: var(--gem);
  box-shadow: 0 24px 80px rgba(0,0,0,.6), 0 0 90px rgba(255, 209, 102, .35);
}

@keyframes pop {
  0% { transform: scale(.6); opacity: 0; }
  70% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.celebrate-big { font-size: 30px; font-weight: 900; margin: 0 0 6px; }
.celebrate-sub { color: var(--muted); margin: 0 0 16px; font-size: 15px; line-height: 1.5; }
.celebrate-gems {
  font-size: 20px; font-weight: 900;
  color: var(--gem);
  margin: 0 0 20px;
  animation: bump .6s ease .25s both;
}

/* ---------------------------------------------------------------- pin + welcome */

.pin-overlay, .welcome-overlay {
  position: fixed; inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  z-index: 120;
  display: flex; align-items: center; justify-content: center;
}

.pin-box, .welcome-box {
  text-align: center;
  padding: 30px;
  max-width: 420px;
  animation: fade-up-c .5s ease;
}

@keyframes fade-up-c {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pin-box h1, .welcome-box h1 { font-size: 26px; font-weight: 900; margin: 12px 0 6px; }
.pin-box p, .welcome-box p { color: var(--muted); margin: 0 0 22px; line-height: 1.6; }

#pinInput {
  display: block;
  width: 200px;
  margin: 0 auto 14px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  font-size: 26px;
  letter-spacing: 10px;
  text-align: center;
  padding: 13px;
  outline: none;
}
#pinInput:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.pin-msg { min-height: 20px; color: var(--accent-2) !important; font-weight: 700; margin-top: 14px !important; }
.welcome-note { min-height: 20px; margin-top: 16px !important; font-weight: 700; }

/* ---------------------------------------------------------------- modals */

.modal {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(430px, 92vw);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  z-index: 95;
  box-shadow: var(--shadow);
  animation: pop .35s cubic-bezier(.18, 1.3, .4, 1);
}

.modal h2 { margin: 0 0 16px; font-size: 19px; font-weight: 900; }

.setting-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  font-weight: 600;
}
.setting-row select {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 13.5px;
}
.setting-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); }

.themes-row { flex-wrap: wrap; }
.theme-picks { display: flex; gap: 8px; }
.theme-dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--line);
  padding: 0;
  position: relative;
}
.theme-dot.active { border-color: var(--text); box-shadow: 0 0 0 3px var(--accent-soft); }
.theme-dot.locked { opacity: .38; }
.theme-dot .lock {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.theme-dot[data-t="hearth"] { background: linear-gradient(135deg, #f4a259, #ef6351); }
.theme-dot[data-t="ocean"]  { background: linear-gradient(135deg, #5cc8d7, #3f8efc); }
.theme-dot[data-t="meadow"] { background: linear-gradient(135deg, #a3c161, #6aa84f); }
.theme-dot[data-t="aurora"] { background: linear-gradient(135deg, #b78bfa, #f472b6); }

.setting-note { font-size: 12px; color: var(--muted); margin: 14px 0; line-height: 1.5; }

.modal .primary-btn { width: 100%; margin-top: 6px; }

.why-list { padding-left: 18px; margin: 0 0 18px; }
.why-list li { margin-bottom: 12px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.why-list li strong { color: var(--text); }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 620px) {
  #app { padding: 12px 14px 24px; }
  .brand-text em { display: none; }
  .week-dots { display: none; }
  .now-title { font-size: 19px; }
  .today { gap: 14px; padding: 14px 16px; }
  .capture-btn { padding: 0 16px; }
}

/* ---------------------------------------------------------------- motion care */

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