:root {
  --bg: #f4fbff;
  --card: #ffffff;
  --ink: #14213d;
  --muted: #5d6f85;
  --blue: #2f66f6;
  --aqua: #18b9c9;
  --mint: #24bf8a;
  --yellow: #ffd166;
  --line: #dce9f5;
  --shadow: 0 24px 70px rgba(33, 82, 148, .16);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, #dff4ff 0, transparent 32rem),
    radial-gradient(circle at 90% 8%, #e9fff5 0, transparent 26rem),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
}

main { max-width: 1120px; margin: 0 auto; padding: 22px; }

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 34px;
  padding: 12px 16px;
  background: rgba(255,255,255,.88);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 10px 24px rgba(22,31,54,.06);
  backdrop-filter: blur(12px);
}

.site-brand { display: inline-flex; align-items: center; gap: 10px; color: #172033; text-decoration: none; font-weight: 850; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: #172033; color: #fff; }
.site-nav a:not(.site-brand) { color: #4b5565; text-decoration: none; font-weight: 750; }
.site-nav a:hover { text-decoration: underline; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 36px; align-items: center; padding: 18px 0 42px; }
.eyebrow { margin: 0 0 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--blue); font-size: .78rem; font-weight: 900; }
h1 { margin: 0 0 18px; font-size: clamp(2.55rem, 7vw, 5.55rem); line-height: .9; letter-spacing: -.075em; }
h2 { letter-spacing: -.035em; }
.lede { max-width: 650px; margin: 0; color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.32rem); line-height: 1.65; }

.preset-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.pill, .sound, .secondary, .primary {
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
.pill { padding: 11px 15px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.pill.active { color: #fff; background: #172033; border-color: #172033; }

.timer-card { background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 34px; padding: 24px; box-shadow: var(--shadow); text-align: center; }
.timer-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--muted); font-weight: 850; }
.sound { padding: 9px 13px; color: var(--ink); background: #edf7ff; border: 1px solid #cfe4fa; }
.sound[aria-pressed="false"] { background: #fff6e1; }
.progress-wrap { position: relative; width: min(292px, 74vw); margin: 0 auto; }
.ring { display: block; width: 100%; transform: rotate(-90deg); }
.ring-bg, .ring-fill { fill: none; stroke-width: 18; }
.ring-bg { stroke: #e7eef8; }
.ring-fill { stroke: var(--blue); stroke-linecap: round; transition: stroke-dashoffset .35s linear, stroke .2s ease; }
.time { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(3rem, 11vw, 4.7rem); font-weight: 950; letter-spacing: -.06em; }
#phaseTitle { margin: 6px 0 4px; font-size: 1.8rem; }
#phaseHint { min-height: 3.2em; margin: 0 auto 18px; color: var(--muted); line-height: 1.5; }

.mouth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.mouth-grid div { padding: 13px 10px; border: 1px solid var(--line); border-radius: 18px; background: #f8fbff; text-align: left; }
.mouth-grid strong, .mouth-grid span { display: block; }
.mouth-grid span { margin-top: 3px; color: var(--muted); font-size: .82rem; line-height: 1.35; }
.mouth-grid div.active { background: linear-gradient(135deg, #2f66f6, #18b9c9); color: #fff; border-color: transparent; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(47,102,246,.22); }
.mouth-grid div.active span { color: rgba(255,255,255,.86); }

.custom-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; padding: 12px 14px; border-radius: 18px; background: #f8fbff; border: 1px solid var(--line); text-align: left; }
.custom-row label { color: var(--muted); font-weight: 850; }
.custom-row input { width: 92px; padding: 10px 12px; border: 1px solid #cbd9e8; border-radius: 14px; font: inherit; font-weight: 850; color: var(--ink); }
.actions { display: flex; gap: 12px; margin-top: 18px; }
.primary, .secondary { flex: 1; padding: 14px 16px; }
.primary { color: #fff; background: var(--blue); box-shadow: 0 12px 26px rgba(47,102,246,.25); }
.secondary { color: var(--ink); background: #eef4fb; }

.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.info-card, .tips-card, .faq, .related { background: #fff; border: 1px solid var(--line); border-radius: 26px; padding: 24px; box-shadow: 0 12px 34px rgba(33,82,148,.08); }
.info-card p, .info-card li, .tips-card p, .faq p { color: var(--muted); line-height: 1.65; }
ol { padding-left: 1.2rem; }
.tips-card { margin-top: 18px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.steps div { padding: 16px; border-radius: 20px; background: #f8fbff; border: 1px solid var(--line); }
.steps span { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-bottom: 10px; border-radius: 999px; color: #fff; background: var(--mint); font-weight: 900; }
.steps strong { display: block; }
.steps p { margin-bottom: 0; font-size: .94rem; }

.faq { margin-top: 18px; }
details { padding: 16px 0; border-top: 1px solid var(--line); }
details:first-of-type { border-top: 0; }
summary { cursor: pointer; font-weight: 900; }
.related { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 18px; }
.related h2 { flex-basis: 100%; margin: 0 0 4px; }
.related a { color: var(--blue); background: #edf7ff; border: 1px solid #cfe4fa; border-radius: 999px; padding: 10px 13px; text-decoration: none; font-weight: 850; }
footer { padding: 34px 0 12px; color: var(--muted); text-align: center; }

@media (max-width: 880px) {
  .hero, .content-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  main { padding: 14px; }
  .site-nav { border-radius: 20px; padding: 10px 12px; }
  .brand-mark { width: 30px; height: 30px; }
  .timer-card, .info-card, .tips-card, .faq, .related { border-radius: 24px; padding: 18px; }
  .timer-topline, .custom-row { align-items: stretch; flex-direction: column; }
  .mouth-grid, .steps { grid-template-columns: 1fr; }
  .actions { flex-direction: column; }
}
