:root {
  --paper: #f4f4ed;
  --surface: #fffefa;
  --ink: #19342e;
  --muted: #65766c;
  --accent: #245c49;
  --lime: #d6e7a5;
  --line: #dde3d8;
  --warm: #b9763d;
  --radius: 24px;
  --safe: env(safe-area-inset-bottom, 0px);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    15px/1.5 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--warm);
  outline-offset: 3px;
}
a {
  color: var(--accent);
}
button {
  min-height: 44px;
  border: 0;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(27px, 6.6vw, 35px);
  line-height: 1.1;
  letter-spacing: -1.3px;
  max-width: 340px;
  margin-bottom: 0;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.4px;
  margin-bottom: 12px;
}
h3 {
  font-size: 16px;
}
p {
  margin-bottom: 12px;
}
.app {
  max-width: 580px;
  margin: auto;
  padding: 0 20px calc(94px + var(--safe));
}
.top {
  padding: 24px 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.3px;
}
.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 1.5px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 3px;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 11px;
  color: var(--lime);
  font:
    700 24px Georgia,
    serif;
}
.round {
  width: 44px;
  border-radius: 50%;
  background: #e7ecdf;
  color: var(--ink);
  font-size: 21px;
}
.intro {
  padding: 26px 0 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 750;
  color: var(--muted);
  margin-bottom: 8px;
}
.phase {
  display: inline-block;
  font-size: 11px;
  background: #e3e9dc;
  color: var(--accent);
  padding: 7px 10px;
  border-radius: 30px;
}
.hero {
  background: linear-gradient(135deg, #163d31, #2d5946);
  color: white;
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
  overflow: hidden;
}
.hero:after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 160px;
  height: 160px;
  border: 1px solid #ffffff19;
  border-radius: 50%;
  pointer-events: none;
}
.hero .eyebrow {
  color: #cbd8ba;
}
.hero h2 {
  font-size: 29px;
  line-height: 1.15;
  letter-spacing: -1px;
  max-width: 330px;
  margin: 16px 0;
}
.hero p {
  color: #d8e3d4;
  font-size: 14px;
}
.hero .pill {
  background: #ffffff19;
  color: #e6f2d3;
}
.hero-meta {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 20px 0;
  font-size: 12px;
}
.hero-meta strong {
  font-size: 19px;
  display: block;
  font-variant-numeric: tabular-nums;
}
.pill {
  display: inline-block;
  border-radius: 30px;
  padding: 6px 10px;
  font-size: 11px;
  background: #e8efdf;
  color: var(--accent);
}
.hero .btn {
  background: var(--lime);
  color: #244232;
}
.btn {
  display: block;
  width: 100%;
  padding: 13px 16px;
  min-height: 48px;
  border-radius: 14px;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  margin-top: 10px;
  line-height: 1.4;
}
.primary {
  background: var(--accent);
  color: white;
}
.secondary {
  background: #e8eddf;
  color: var(--ink);
}
.text-btn {
  background: transparent;
  color: var(--accent);
  padding: 5px;
  font-size: 13px;
  font-weight: 650;
}
.next-run {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 17px;
  border-radius: 19px;
  margin: 13px 0 25px;
}
.next-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #e8eddf;
  font-size: 23px;
  flex-shrink: 0;
}
.next-run strong {
  display: block;
  font-size: 14px;
}
.next-run small {
  color: var(--muted);
  font-size: 12px;
}
.next-run .text-btn {
  margin-left: auto;
  white-space: nowrap;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 18px 0 2px;
}
.section-head h2 {
  margin: 0;
}
.subtle {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.session,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 18px;
}
.session h2 {
  margin: 10px 0;
}
.session-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.session select {
  max-width: 180px;
}
.exercise {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.exercise h3 {
  margin: 0 0 5px;
}
.exercise p {
  font-size: 12px;
  color: var(--muted);
  margin: 7px 0;
}
.exercise .dose {
  font-size: 12px;
  font-weight: 650;
  color: var(--ink);
}
.exercise .tag {
  font-size: 9px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--warm);
  margin-bottom: 5px;
}
.exercise details {
  font-size: 12px;
  margin: 8px 0;
  color: var(--muted);
}
.weight-row {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 12px;
}
.weight-row input {
  width: 86px;
  font-size: 17px;
  text-align: center;
  background: var(--paper);
  font-variant-numeric: tabular-nums;
}
.weight-row button {
  width: 40px;
  border-radius: 12px;
  background: #e9eddf;
}
.weight-row small {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}
.run-stage {
  display: flex;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.run-stage b {
  display: grid;
  place-items: center;
  font-size: 18px;
  width: 45px;
  height: 45px;
  background: #edf0e4;
  border-radius: 13px;
  flex-shrink: 0;
}
.run-stage span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.timer {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.timer strong {
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  margin-right: auto;
}
.timer button {
  border-radius: 10px;
  padding: 9px;
  background: #e7ecdf;
  font-size: 12px;
}
.goal {
  display: flex;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}
.goal:last-child {
  border: 0;
}
.goal-date {
  background: #e6ecdc;
  min-width: 58px;
  border-radius: 13px;
  text-align: center;
  padding: 8px;
}
.goal-date b {
  display: block;
  font-size: 23px;
  line-height: 1.1;
}
.goal-date small {
  font-size: 10px;
  text-transform: uppercase;
}
.goal strong {
  font-size: 14px;
}
.goal .subtle {
  margin: 4px 0;
}
.goal .goal-action {
  margin-left: auto;
  border-radius: 10px;
  background: transparent;
  padding: 8px;
  color: var(--muted);
}
.goal.inactive {
  opacity: 0.6;
}
.week-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 18px;
}
.week-controls strong {
  flex: 1;
  text-align: center;
  font-size: 13px;
}
.week-controls button {
  background: #e4eadd;
  border-radius: 12px;
  min-width: 42px;
}
.day-row {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 17px;
  padding: 14px;
  margin: 9px 0;
  width: 100%;
  text-align: left;
  color: var(--ink);
}
.day-row.today {
  border-color: var(--accent);
  background: #eaf0e0;
}
.day-date {
  width: 36px;
  flex-shrink: 0;
  text-align: center;
}
.day-date span {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
}
.day-date b {
  font-size: 20px;
}
.day-row .content {
  flex: 1;
  min-width: 0;
}
.day-row strong {
  font-size: 13px;
  display: block;
}
.day-row small {
  font-size: 11px;
  color: var(--muted);
}
.day-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c6d1bc;
  flex-shrink: 0;
}
.day-dot.run {
  background: var(--warm);
}
.day-dot.strength {
  background: var(--accent);
}
.day-dot.race {
  background: #a984b6;
}
.plan-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-size: 12px;
}
.plan-row small {
  color: var(--muted);
}
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.stat {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.stat strong {
  font-size: 30px;
  display: block;
}
.stat small {
  font-size: 12px;
  color: var(--muted);
}
.log-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.log-row button {
  background: transparent;
  min-height: 30px;
  color: var(--muted);
}
.inline-form {
  display: flex;
  gap: 10px;
  align-items: center;
}
.inline-form label {
  flex: 1;
  margin: 0;
}
.inline-form .btn {
  width: auto;
  margin: 0;
}
input,
select,
textarea {
  max-width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
}
input {
  min-width: 0;
}
textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0;
}
label input,
label select {
  display: block;
  width: 100%;
  margin-top: 7px;
}
.check-label {
  display: flex;
  gap: 10px;
  align-items: center;
}
.check-label input {
  width: 20px;
  margin: 0;
}
.tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  background: #f4f4edf2;
  backdrop-filter: blur(14px);
  padding: 10px 16px calc(10px + var(--safe));
  border-top: 1px solid var(--line);
  z-index: 10;
}
.tabs button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 90px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  border-radius: 14px;
  padding: 7px 15px;
}
.tabs span {
  font-size: 21px;
  line-height: 1.2;
}
.tabs [aria-current="page"] {
  background: #dfe8d1;
  color: var(--accent);
  font-weight: 700;
}
footer {
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  padding: 32px 0 0;
}
dialog {
  width: min(500px, calc(100% - 28px));
  border: 0;
  border-radius: 26px;
  background: var(--surface);
  color: var(--ink);
  padding: 24px;
  max-height: 88dvh;
  overflow-y: auto;
  box-shadow: 0 20px 80px #142c2950;
}
dialog::backdrop {
  background: #132f2b75;
  backdrop-filter: blur(4px);
}
dialog p,
dialog details {
  font-size: 13px;
  line-height: 1.6;
}
.dialog-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.dialog-head h2 {
  margin: 0;
}
.dialog-head button {
  background: #e7ecdf;
  border-radius: 50%;
  width: 40px;
}
.schedule-pair {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 10px;
}
.notice {
  background: #fff0d9;
  border-radius: 13px;
  padding: 12px;
  font-size: 12px;
  margin-top: 15px;
}
.toast {
  position: fixed;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 12px 20px;
  border-radius: 18px;
  z-index: 50;
  font-size: 13px;
  max-width: 90vw;
  opacity: 0;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
[hidden] {
  display: none !important;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}
summary {
  cursor: pointer;
  font-weight: 650;
  margin: 8px 0;
}
#scheduleSummary p {
  font-size: 13px;
}
#feedURL {
  font-size: 11px;
}
.check-date {
  font-size: 12px;
  color: var(--muted);
}
@media (min-width: 700px) {
  .app {
    padding-left: 28px;
    padding-right: 28px;
  }
  .hero {
    padding: 32px;
  }
  h1 {
    font-size: 36px;
  }
  .tabs button {
    min-width: 140px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
