:root {
  --navy: #0f2a44;
  --navy-2: #183b5a;
  --gold: #c8a45d;
  --beige: #f6efe4;
  --paper: #fffaf2;
  --ink: #1f2933;
  --muted: #687586;
  --line: rgba(15,42,68,.14);
  --shadow: 0 18px 42px rgba(15,42,68,.13);
}
* { box-sizing: border-box; }
html { background: var(--navy); }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--navy) 0%, #143655 34%, var(--beige) 34%, var(--beige) 100%);
  min-height: 100vh;
}
button, input, textarea { font: inherit; }
button {
  border: 0;
  background: var(--navy);
  color: white;
  border-radius: 16px;
  padding: 12px 16px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(15,42,68,.16);
}
button:active { transform: translateY(1px); }
.secondary { background: #eef1f5; color: var(--navy); box-shadow: none; }
.hidden { display: none !important; }
.app-shell { width: min(980px, 100%); margin: 0 auto; padding: env(safe-area-inset-top) 14px 28px; }
.hero {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  color: white; padding: 28px 4px 20px;
}
.eyebrow { margin: 0 0 8px; color: var(--gold); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }
h1 { margin: 0; font-size: clamp(2rem, 8vw, 4rem); line-height: .95; }
.subtitle { margin: 12px 0 0; color: rgba(255,255,255,.82); max-width: 640px; }
.install-btn { background: var(--gold); color: #1f2933; white-space: nowrap; }
.tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 16px;
  position: sticky; top: 0; z-index: 10; background: linear-gradient(180deg, #143655, rgba(20,54,85,.92));
}
.tab { min-width: max-content; background: rgba(255,255,255,.14); color: white; box-shadow: none; padding: 10px 14px; border: 1px solid rgba(255,255,255,.12); }
.tab.active { background: var(--gold); color: #1f2933; }
.view { display: none; animation: fade .18s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: .2; transform: translateY(4px);} to { opacity: 1; transform: none;} }
.card {
  background: rgba(255,250,242,.96);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 28px;
  padding: 18px;
  box-shadow: var(--shadow);
  margin: 0 0 16px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
h2 { margin: 0; font-size: 1.3rem; color: var(--navy); }
.pill { background: rgba(200,164,93,.18); color: #71551e; padding: 7px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.top3 { display: grid; gap: 10px; }
.task-line, .capture-item, .study-item {
  display: flex; align-items: center; gap: 10px; background: white; border: 1px solid var(--line); border-radius: 18px; padding: 10px;
}
.task-line input[type="text"], .inline-form input, .reading-box input, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: white; color: var(--ink); outline-color: var(--gold);
}
.task-line input[type="text"] { border: 0; padding: 8px; }
input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--navy); }
.timeline { display: grid; gap: 10px; }
.time-row { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.time { color: var(--gold); font-weight: 900; }
.inline-form { display: flex; gap: 8px; margin-top: 12px; }
.inline-form input { flex: 1; min-width: 0; }
.check-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.capture-item span, .study-item span { flex: 1; }
.icon-btn { padding: 8px 10px; border-radius: 12px; background: #f2e9dc; color: var(--navy); box-shadow: none; }
.area-grid { display: grid; gap: 12px; }
.area-card { background: white; border: 1px solid var(--line); border-radius: 22px; padding: 14px; }
.area-card h3 { margin: 0 0 10px; color: var(--navy); }
.area-card ul, .static-checks { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.7; }
.focus-card { text-align: center; }
.timer { font-size: clamp(4rem, 22vw, 8rem); line-height: 1; color: var(--navy); font-weight: 900; letter-spacing: -0.06em; margin: 20px 0 8px; }
.focus-note, .muted { color: var(--muted); }
.button-row { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.wrap { flex-wrap: wrap; justify-content: flex-start; }
.editable-list { display: grid; gap: 8px; }
.reading-box, label { display: grid; gap: 8px; color: var(--navy); font-weight: 800; }
.reading-box { gap: 12px; margin-bottom: 12px; }
textarea { min-height: 92px; resize: vertical; font-weight: 500; }
@media (min-width: 760px) {
  main { display: grid; }
  .area-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 24px; }
}
@media (max-width: 460px) {
  .inline-form, .button-row { flex-direction: column; }
  .time-row { grid-template-columns: 72px 1fr; }
  .hero { flex-direction: column; }
}
.hero-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sync-pill.ok { background: rgba(34,197,94,.18); color: #d1fae5; border: 1px solid rgba(209,250,229,.22); }
.sync-pill.warn { background: rgba(200,164,93,.22); color: #fff7d6; border: 1px solid rgba(255,247,214,.22); }
.sync-pill.err { background: rgba(239,68,68,.2); color: #fee2e2; border: 1px solid rgba(254,226,226,.3); }
.sync-status.ok { color: #166534; font-weight: 700; }
.sync-status.warn { color: #8a5b00; font-weight: 700; }
.sync-status.err { color: #b91c1c; font-weight: 700; }

.install-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fffaf2;
  border: 1px solid rgba(200,164,93,.55);
  border-radius: 22px;
  padding: 14px;
  box-shadow: 0 12px 28px rgba(15,42,68,.14);
  margin: 0 0 16px;
}
.install-guide strong { color: var(--navy); font-size: 1.05rem; }
.install-guide p { margin: 4px 0 0; color: var(--muted); line-height: 1.45; }
@media (max-width: 560px) { .install-guide { flex-direction: column; align-items: stretch; } }
