
:root {
  --bg: #f7f3ec; --ink: #1b1d1a; --muted: #6b6a63; --card: #ffffff; --line: #e6dfd2;
  --cedar: #1f3a2e; --cedar-2: #2e5543; --ember: #d9822b; --ember-2: #b86a1c; --danger: #b3261e;
  --shadow: 0 10px 30px rgba(31, 58, 46, .18);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121714; --ink: #eef0ea; --muted: #a3a79d; --card: #1b221e; --line: #2b352f; --cedar: #8fc3a5; --cedar-2: #a9d6bb; --shadow: 0 10px 30px rgba(0,0,0,.45); }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
main { min-height: 100%; max-width: 520px; margin: 0 auto; }
.screen { display: none; min-height: 100vh; min-height: 100dvh; flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 16px) 20px calc(env(safe-area-inset-bottom) + 20px); }
.screen.is-on { display: flex; animation: rise .28s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.top { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.brand { font-size: 14px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.hero { margin-top: 5vh; }
.title { font-size: 34px; line-height: 1.12; margin: 0 0 10px; letter-spacing: -.01em; }
.lede { font-size: 19px; margin: 0; color: var(--ink); }
.muted { color: var(--muted); margin: 8px 0; }
.hints { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hints li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; color: var(--muted); }
.center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; }
.mic-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 220px; }
.mic { width: 132px; height: 132px; border-radius: 50%; border: 0; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, var(--ember), var(--ember-2)); color: #fff; box-shadow: var(--shadow);
  display: grid; place-items: center; transition: transform .12s ease; }
.mic:active { transform: scale(.96); }
.mic svg { width: 54px; height: 54px; fill: currentColor; }
.mic-label { margin: 14px 0 0; font-weight: 600; color: var(--muted); }
.photos-block { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 4px; }
.strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.strip:empty { display: none; }
.thumb { position: relative; flex: 0 0 auto; width: 84px; height: 84px; border-radius: 14px; overflow: hidden; background: var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.is-busy img { opacity: .5; }
.thumb.is-busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.7); border-top-color: transparent; animation: spin .8s linear infinite; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.55); color: #fff; font-size: 16px; line-height: 26px; padding: 0; cursor: pointer; }
.thumb.is-bad { outline: 2px solid var(--danger); }
@keyframes spin { to { transform: rotate(360deg); } }
.picker { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px;
  border-radius: 16px; border: 0; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; }
.btn svg { width: 22px; height: 22px; fill: currentColor; }
.btn-primary { background: var(--cedar); color: #fff; box-shadow: var(--shadow); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #0f1511; } }
.btn-primary:disabled { opacity: .5; }
.btn-ghost { background: var(--card); color: var(--cedar); border: 1.5px solid var(--line); }
.btn-quiet { background: transparent; color: var(--muted); min-height: 48px; }
.link { background: none; border: 0; color: var(--cedar); font: inherit; font-weight: 600; padding: 8px; cursor: pointer; }
.actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 16px; }
.row { display: flex; gap: 8px; }
.level { position: relative; width: 180px; height: 180px; margin-bottom: 18px; }
.ring, .core { position: absolute; inset: 0; margin: auto; border-radius: 50%; }
.ring { background: var(--ember); opacity: .22; transform: scale(.72); transition: transform .08s linear; }
.core { width: 110px; height: 110px; background: radial-gradient(circle at 35% 30%, var(--ember), var(--ember-2)); box-shadow: var(--shadow); }
.is-paused .ring { transform: scale(.72) !important; opacity: .1; }
.timer { font-size: 44px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 0; letter-spacing: .02em; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: blink 1.2s ease-in-out infinite; }
.is-paused .rec-dot { animation: none; opacity: .35; }
@keyframes blink { 50% { opacity: .25; } }
.pulse { width: 56px; height: 56px; border-radius: 50%; background: var(--cedar); opacity: .8; animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(.7); opacity: .35; } }
.tick { width: 84px; height: 84px; border-radius: 50%; background: var(--cedar); display: grid; place-items: center; margin-bottom: 12px; animation: pop .35s ease-out; }
.tick svg { width: 46px; height: 46px; fill: #fff; }
@media (prefers-color-scheme: dark) { .tick svg { fill: #0f1511; } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 24px); transform: translate(-50%, 20px);
  background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-size: 15px; max-width: calc(100% - 32px);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
