@font-face {
  font-family: Outfit;
  src: url("fonts/Outfit-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #FBF6EA;
  --butter: #FBE38E;
  --blush: #F6C6D8;
  --sage: #C9D9A6;
  --lilac: #D9D2F5;
  --teal: #A8DCD5;
  --peach: #FAD7B8;
  --coral: #F4A39A;
  --ink: #111111;
  --white: #FFFFFF;
  --track: #EDE6D8;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 108px;
  --radius: 28px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background: var(--cream);
  color: var(--ink);
  font-family: Outfit, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 420;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  justify-content: center;
}

.app {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  position: relative;
  background: var(--cream);
  overflow-x: hidden;
}

.boot {
  padding: 48px 24px;
  text-align: center;
  color: var(--ink);
  opacity: 0.6;
}

.screen {
  padding: calc(20px + var(--safe-top)) 20px calc(var(--nav-h) + var(--safe-bottom) + 8px);
  min-height: 100dvh;
}

.screen.is-player,
.screen.is-carrier,
.screen.is-thanks {
  padding-bottom: calc(32px + var(--safe-bottom));
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  margin-bottom: 8px;
}

.icon-btn {
  width: 48px;
  height: 48px;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.icon-btn img { width: 48px; height: 48px; display: block; }

.kicker {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
}

h1, .hero {
  font-weight: 300;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.hero {
  font-size: clamp(2.4rem, 11vw, 3.15rem);
  margin: 12px 0 28px;
}

.hero em { font-style: italic; font-weight: 300; }

h1 { font-size: 2.15rem; margin: 4px 0 20px; }

h2 { font-size: 1.05rem; font-weight: 560; margin-bottom: 8px; }

p, li, label, .body { font-size: 1.02rem; line-height: 1.45; }

.muted { opacity: 0.62; font-size: 0.95rem; }

.decor {
  position: relative;
  height: 120px;
  margin: 0 0 8px;
}

.decor img { position: absolute; }
.decor .scallop { width: 92px; left: -8px; top: 8px; transform: rotate(-12deg); }
.decor .blob { width: 110px; right: 4px; top: 0; }

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
}

.card.butter { background: var(--butter); }
.card.blush { background: var(--blush); }
.card.sage { background: var(--sage); }
.card.lilac { background: var(--lilac); }
.card.teal { background: var(--teal); }
.card.peach { background: var(--peach); }

.start-card {
  background: var(--butter);
  border-radius: var(--radius);
  padding: 28px 22px 22px;
  margin-top: 8px;
}

.start-card p { margin: 8px 0 22px; max-width: 16em; }

.start-pill {
  display: inline-flex;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.start-pill img { width: 168px; height: auto; display: block; }

.list { display: flex; flex-direction: column; gap: 12px; }

.ex-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  color: var(--ink);
  font-family: inherit;
  background: var(--white);
}

.ex-card img.tile { width: 64px; height: 64px; flex: none; }
.ex-card .meta { flex: 1; min-width: 0; }
.ex-card .title { font-weight: 560; font-size: 1.05rem; }
.ex-card .freq { font-weight: 430; opacity: 0.7; margin-top: 2px; font-size: 0.92rem; }
.badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--white);
  border-radius: 999px;
  padding: 4px 8px;
  opacity: 0.85;
}

.osc-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.osc-list li {
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.osc-list strong { font-weight: 560; min-width: 9.5em; }

.wave { width: 100%; height: 40px; margin: 16px 0 8px; object-fit: contain; }

.player-head { text-align: center; margin-top: 4px; }
.player-head h1 { font-size: 1.65rem; margin-bottom: 6px; }
.hz-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 2px;
  height: 52px;
  margin-bottom: 8px;
}
.hz-row img { height: 44px; width: auto; }
.hz-row img.unit { height: 36px; margin-left: 6px; }

.visual-wrap {
  position: relative;
  width: min(300px, 78vw);
  height: min(300px, 78vw);
  margin: 12px auto 20px;
  border-radius: 28px;
  overflow: hidden;
  background: #05060f;
}

.visual-wrap canvas,
.visual-wrap svg.anim,
.visual-wrap svg.tutorial {
  width: 100%;
  height: 100%;
  display: block;
}

.note {
  transition: opacity 0.4s ease;
}
.note.is-fading { opacity: 0; }

.timer-wrap {
  position: relative;
  width: 168px;
  height: 168px;
  margin: 0 auto 16px;
}

.timer-wrap .ring {
  width: 100%;
  height: 100%;
}

.timer-wrap .time {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.note, .placeholder {
  text-align: center;
  margin: 0 auto 16px;
  max-width: 22em;
  min-height: 3em;
}

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 8px;
}

.controls .icon-btn.lg img { width: 72px; height: 72px; }
.controls .icon-btn.lg { width: 72px; height: 72px; }

.hidden { display: none !important; }

.field { margin: 0 0 22px; }
.field label { display: block; font-weight: 560; margin-bottom: 8px; }
.field .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
input[type="range"] {
  width: 100%;
  accent-color: var(--ink);
  margin-top: 8px;
}
select {
  font: inherit;
  background: var(--white);
  border: 0;
  border-radius: 16px;
  padding: 10px 14px;
  color: var(--ink);
}

.offline-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sage);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 560;
  font-size: 0.92rem;
}
.offline-pill.is-wait { background: var(--peach); }

.thanks {
  text-align: center;
  padding-top: 48px;
}
.thanks h1 { font-size: 2.4rem; }
.thanks .duration {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: -0.04em;
  margin: 12px 0 28px;
}
.thanks .scallop-lg { width: 140px; margin: 0 auto 24px; display: block; }

.carrier-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100dvh;
  padding: calc(20px + var(--safe-top)) 20px calc(32px + var(--safe-bottom));
}
.carrier-screen .orb {
  width: 220px;
  height: 220px;
  margin: 24px 0 48px;
}
.carrier-screen .icon-btn { margin-top: auto; }

.nav {
  position: fixed;
  left: 50%;
  bottom: calc(12px + var(--safe-bottom));
  transform: translateX(-50%);
  width: min(390px, calc(100% - 24px));
  height: 80px;
  background: var(--ink);
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 10px;
  z-index: 20;
}

.nav button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--white);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.nav button svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.nav button.is-active svg { stroke-width: 2.5; }

.nav .fab {
  width: 72px;
  height: 72px;
  margin-top: -28px;
  background: var(--white);
  border-radius: 50%;
  color: var(--ink);
  box-shadow: none;
}
.nav .fab svg { stroke: var(--ink); width: 26px; height: 26px; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.stat-grid .card { min-height: 110px; }
.progress-hero { text-align: center; padding: 24px 12px 8px; }
.progress-hero img.big-ring { width: 180px; height: 180px; }
.progress-hero .pct { font-size: 2.4rem; font-weight: 300; letter-spacing: -0.04em; margin-top: -8px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
