@font-face {
  font-family: Outfit;
  src: url("fonts/outfit-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("fonts/outfit-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("fonts/outfit-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("fonts/outfit-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("fonts/outfit-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --bg-2: #fff6f5;
  --card: #ffffff;
  --ink: #141416;
  --muted: #3f4a55;
  --line: #ececec;
  --coral: #ff4b5c;
  --coral-dark: #e1273c;
  --coral-soft: #ffe6e8;
  --navy: #16324f;
  --blue: #2563eb;
  --blue-soft: #e8efff;
  --gold: #f6c453;
  --gold-soft: #fff4d8;
  --green: #0f9f6e;
  --green-soft: #e6f7f0;
  --ok: #0b7a55;
  --shadow: 0 12px 30px rgba(20, 20, 22, 0.06);
  --radius: 24px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
  --nav-h: 76px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Outfit, "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 18px;
  line-height: 1.4;
  min-height: 100%;
  letter-spacing: -0.015em;
}
body {
  padding-top: var(--safe-top);
  padding-bottom: calc(var(--nav-h) + var(--safe-bot) + 16px);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--coral-dark); font-weight: 650; }

.app-wrap {
  max-width: 540px;
  margin: 0 auto;
  padding: 12px 16px 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}
.brand h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.safety-strip {
  background: var(--coral-soft);
  color: #8a1422;
  border-radius: 18px;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 650;
  margin-bottom: 12px;
  border: 1px solid #ffd0d5;
}
.safety-strip strong { font-weight: 800; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
}
.card h2 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.card .sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 14px;
  font-weight: 500;
}

.week-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.pill {
  display: inline-block;
  background: var(--coral-soft);
  color: var(--coral-dark);
  font-weight: 750;
  font-size: 0.74rem;
  padding: 5px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.pill.gold { background: var(--gold-soft); color: #8a5a00; }
.pill.blue { background: var(--blue-soft); color: #1d4ed8; }

.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.day {
  text-align: center;
  border-radius: 16px;
  padding: 8px 1px 6px;
  background: #f7f7f8;
  border: 2px solid transparent;
  min-height: 78px;
  min-width: 0;
}
.day .dow {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.day .mins {
  display: block;
  font-size: 1.02rem;
  font-weight: 800;
  margin-top: 6px;
  letter-spacing: -0.03em;
}
.day .tag {
  display: block;
  font-size: 0.64rem;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 650;
}
.day.today { border-color: var(--coral); background: var(--coral-soft); }
.day.today .dow, .day.today .mins { color: var(--coral-dark); }
.day.done { background: var(--green-soft); }
.day.done .mins { color: var(--ok); }
.day.rest { background: #f7f7f8; }
.day.flag { background: var(--coral-soft); }

.today-target {
  margin-top: 12px;
  background: var(--bg-2);
  border-radius: 18px;
  padding: 12px 14px;
  font-weight: 750;
  border: 1px solid #ffe1e3;
}
.today-target span {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.tips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 12px;
}
.tip {
  background: #f7f7f8;
  border-radius: 18px;
  padding: 14px;
  font-size: 0.88rem;
  color: var(--ink);
  font-weight: 500;
}
.tip b { display: block; margin-bottom: 4px; font-weight: 800; font-size: 0.92rem; }

.btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  border-radius: 22px;
  font-weight: 800;
  font-size: 1.2rem;
  padding: 14px 18px;
  letter-spacing: -0.02em;
}
.btn-start {
  background: var(--coral);
  color: #fff;
  margin: 0 0 10px;
  font-size: 1.45rem;
  min-height: 80px;
  box-shadow: 0 14px 28px rgba(255, 75, 92, 0.28);
}
.btn-start:active { background: var(--coral-dark); transform: scale(0.99); }
.btn-stop {
  background: var(--navy);
  color: #fff;
  font-size: 1.35rem;
  min-height: 80px;
  margin-top: 16px;
}
.btn-stop:active { filter: brightness(0.95); transform: scale(0.99); }
.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--line);
  min-height: 56px;
  font-size: 1.02rem;
}
.btn-coral { background: var(--coral); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  min-height: 48px;
  font-weight: 650;
  font-size: 0.98rem;
}
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn svg { width: 22px; height: 22px; flex: 0 0 22px; }

.live { text-align: center; padding: 6px 0 2px; }
.live .timer {
  font-size: 4.25rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  margin: 10px 0 18px;
}
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  text-align: left;
}
.metric {
  background: var(--bg-2);
  border-radius: 18px;
  padding: 14px;
}
.metric label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.metric b {
  display: block;
  font-size: 1.12rem;
  margin-top: 5px;
  letter-spacing: -0.03em;
}

.route-box {
  margin-top: 16px;
  background: var(--bg-2);
  border-radius: 20px;
  height: 210px;
  position: relative;
  overflow: hidden;
  border: 1px solid #ffe1e3;
}
.route-box svg { width: 100%; height: 100%; display: block; }
.route-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 650;
  padding: 16px;
  text-align: center;
}

.notice {
  margin-top: 14px;
  background: var(--gold-soft);
  color: #6b4500;
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 0.9rem;
  font-weight: 650;
  text-align: left;
}
.notice.good { background: var(--green-soft); color: var(--ok); }
.notice.bad { background: var(--coral-soft); color: #8a1422; }

.install-card { background: #fffaf3; border-color: #f6e4b8; }

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}
.choice {
  min-height: 76px;
  border-radius: 18px;
  border: 1.5px solid var(--line);
  background: #f7f7f8;
  font-weight: 800;
  font-size: 1.02rem;
  padding: 8px;
}
.choice.selected {
  border-color: var(--coral);
  background: var(--coral-soft);
  color: var(--coral-dark);
}
.choice.warn.selected {
  border-color: var(--coral-dark);
  background: var(--coral-soft);
  color: #8a1422;
}

.effort-row {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  margin: 8px 0 14px;
}
.effort {
  min-height: 46px;
  border-radius: 12px;
  background: #f7f7f8;
  border: 1.5px solid var(--line);
  font-weight: 800;
  font-size: 0.92rem;
  padding: 0;
}
.effort.selected { border-color: var(--coral); background: var(--coral-soft); color: var(--coral-dark); }

.check-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f7f7f8;
  border-radius: 16px;
  padding: 14px;
  font-weight: 650;
  border: 1.5px solid transparent;
  text-align: left;
  width: 100%;
}
.check.on { border-color: var(--coral); background: var(--coral-soft); }

.alert-box {
  background: #fff5f6;
  border: 2px solid var(--coral);
  border-radius: 20px;
  padding: 18px;
  margin: 14px 0;
  text-align: left;
}
.alert-box h3 { margin: 0 0 8px; color: #8a1422; font-size: 1.2rem; }
.alert-box a.call {
  display: flex;
  margin-top: 14px;
  background: var(--coral);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  border-radius: 16px;
  min-height: 58px;
  align-items: center;
  justify-content: center;
}

.field { margin: 12px 0; }
.field label { display: block; font-weight: 750; font-size: 0.9rem; margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  min-height: 54px;
}
.field textarea { min-height: 88px; resize: vertical; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.stepper {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  gap: 10px;
  align-items: center;
}
.stepper .val {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.stepper button {
  min-height: 64px;
  border-radius: 18px;
  background: var(--coral-soft);
  color: var(--coral-dark);
  font-size: 2rem;
  font-weight: 800;
  border: 1.5px solid #ffd0d5;
}
.stepper button:active { background: #ffd4d8; }

.log-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.log-item:last-child { border-bottom: 0; }
.log-item b { font-size: 1.05rem; }
.log-item .meta { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.log-flag { color: #8a1422; font-weight: 800; font-size: 0.84rem; }

.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}
.stat {
  background: #f7f7f8;
  border-radius: 18px;
  padding: 14px;
}
.stat label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat b { font-size: 1.45rem; letter-spacing: -0.04em; }
.ready {
  border-radius: 18px;
  padding: 16px;
  font-weight: 700;
  margin-top: 8px;
}
.ready.yes { background: var(--green-soft); color: var(--ok); }
.ready.no { background: var(--gold-soft); color: #6b4500; }

.week-list { display: flex; flex-direction: column; gap: 10px; }
.week-row {
  background: #fff;
  border-radius: 20px;
  padding: 16px;
  border: 1.5px solid var(--line);
  text-align: left;
  width: 100%;
  box-shadow: var(--shadow);
}
.week-row.current { border-color: var(--coral); background: var(--coral-soft); }
.week-row h3 { margin: 0 0 4px; font-size: 1.05rem; font-weight: 800; }
.week-row p { margin: 0; color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.week-days { margin-top: 8px; font-size: 0.86rem; font-weight: 650; }

.nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--nav-h) + var(--safe-bot));
  padding-bottom: var(--safe-bot);
  background: #fff;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 20;
  max-width: 540px;
  margin: 0 auto;
}
.nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #6b7280;
  font-weight: 700;
  font-size: 0.72rem;
  min-height: var(--nav-h);
  letter-spacing: 0.01em;
}
.nav button.on { color: var(--coral-dark); }
.nav svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.screen { display: none; }
.screen.on { display: block; }

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin: 22px 0 8px;
  font-weight: 500;
}
.sources a { display: block; margin: 8px 0; font-weight: 650; }
.small { font-size: 0.88rem; color: var(--muted); font-weight: 500; }
.hide { display: none !important; }
.center { text-align: center; }
.list { margin: 0; padding-left: 1.15rem; }
.list li { margin: 8px 0; }

.step-dots { display: flex; justify-content: center; gap: 6px; margin: 2px 0 14px; }
.step-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  display: block;
}
.step-dots i.on { background: var(--coral); width: 20px; border-radius: 8px; }

@media (min-width: 700px) {
  body { font-size: 19px; }
  .live .timer { font-size: 4.6rem; }
}
