:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0b1f33;
  background: #f3f6f8;
  font-synthesis: none;
  --yellow: #ffc400;
  --yellow-soft: #fff5c7;
  --navy: #092238;
  --muted: #65768a;
  --line: #dce4ea;
  --card: #fff;
  --green: #15803d;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 100% 0, #fff6cc 0, transparent 30rem), #f3f6f8; }
button { font: inherit; }
.topbar { height: 72px; padding: 0 max(20px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; background: rgba(9,34,56,.97); color: #fff; position: sticky; top: 0; z-index: 10; box-shadow: 0 8px 24px rgba(9,34,56,.15); }
.brand { color: inherit; text-decoration: none; display: flex; gap: 10px; align-items: center; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--yellow); color: var(--navy); font-size: 21px; font-weight: 900; transform: skew(-6deg); }
.brand strong { display: block; font-size: 18px; line-height: 1; }
.brand small { display: block; margin-top: 4px; color: #aec2d3; font-size: 9px; letter-spacing: .16em; }
.secure-pill { border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 7px 10px; color: #c7d4de; font-size: 12px; }
.secure-pill span { color: #4ade80; }
.app-shell { width: min(760px, 100%); min-height: calc(100vh - 126px); margin: 0 auto; padding: 24px 16px 48px; }
.state-card { min-height: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; display: grid; align-content: center; justify-items: center; text-align: center; padding: 36px 24px; box-shadow: 0 18px 50px rgba(9,34,56,.07); }
.state-card h1 { margin: 18px 0 8px; font-size: 25px; }
.state-card p { margin: 0; max-width: 390px; color: var(--muted); line-height: 1.55; }
.state-icon { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: var(--yellow-soft); color: #8a6500; font-size: 32px; }
.loader { width: 45px; height: 45px; border: 4px solid #e5ebef; border-top-color: var(--yellow); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero { padding: 4px 2px 20px; }
.eyebrow { margin: 0 0 8px; color: #8a6500; font-weight: 800; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(28px, 8vw, 42px); letter-spacing: -.04em; line-height: 1.06; }
.hero p { margin: 10px 0 0; color: var(--muted); }
.day-tabs { display: flex; gap: 9px; overflow-x: auto; padding: 4px 2px 14px; scrollbar-width: none; }
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab { flex: 0 0 auto; min-width: 84px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 15px; background: #fff; color: var(--navy); font-weight: 750; cursor: pointer; transition: .18s ease; }
.day-tab:hover { border-color: #d0a100; transform: translateY(-1px); }
.day-tab:active { transform: scale(.97); }
.day-tab[aria-selected="true"] { background: var(--navy); color: #fff; border-color: var(--navy); box-shadow: 0 8px 18px rgba(9,34,56,.17); }
.summary { margin: 4px 0 15px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #edd67a; background: linear-gradient(135deg, #fff9df, #fff3b8); border-radius: 16px; }
.summary strong { display: block; font-size: 14px; }
.summary span { color: #806613; font-size: 12px; }
.progress-ring { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--yellow) var(--progress), rgba(9,34,56,.1) 0); position: relative; font-size: 11px; font-weight: 900; }
.progress-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff8d8; }
.progress-ring span { position: relative; color: var(--navy); }
.workout-list { display: grid; gap: 14px; }
.exercise-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 10px 30px rgba(9,34,56,.06); }
.exercise-media { position: relative; aspect-ratio: 16 / 10; background: #e8eef2; overflow: hidden; }
.exercise-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #f8fafb; opacity: 0; animation: frames 2s steps(1,end) infinite; }
.exercise-media img:first-child { opacity: 1; }
.exercise-media img:nth-child(2) { animation-delay: 1s; }
@keyframes frames { 0%,49.9% { opacity: 1 } 50%,100% { opacity: 0 } }
.media-placeholder { height: 100%; display: grid; place-items: center; color: #8293a3; font-weight: 700; }
.position-badge { position: absolute; top: 12px; left: 12px; z-index: 2; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--yellow); color: var(--navy); font-weight: 900; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.exercise-body { padding: 18px; }
.exercise-heading { display: flex; align-items: flex-start; gap: 12px; }
.exercise-heading h2 { margin: 0; flex: 1; font-size: 20px; line-height: 1.2; }
.check-button { width: 42px; height: 42px; border-radius: 13px; border: 1px solid #bfcbd4; background: #fff; color: transparent; cursor: pointer; font-weight: 900; transition: .18s ease; }
.check-button:hover { border-color: var(--green); }
.check-button:active { transform: scale(.94); }
.check-button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.tag { padding: 5px 8px; border-radius: 999px; background: #edf2f5; color: #52677a; font-size: 11px; font-weight: 700; }
.prescription { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metric { min-width: 0; padding: 12px 9px; text-align: center; border-radius: 13px; background: #f4f7f9; }
.metric strong { display: block; font-size: 16px; overflow-wrap: anywhere; }
.metric small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.notes { margin: 13px 0 0; padding: 11px 12px; border-left: 3px solid var(--yellow); background: var(--yellow-soft); border-radius: 0 10px 10px 0; color: #5f4c0d; font-size: 13px; line-height: 1.45; }
details { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
summary { cursor: pointer; color: #354e63; font-weight: 750; font-size: 13px; }
.instructions { margin: 11px 0 0; padding-left: 21px; color: #52677a; font-size: 13px; line-height: 1.55; }
.empty-day { padding: 38px 20px; text-align: center; background: #fff; border: 1px dashed #c8d4dc; border-radius: 20px; }
.empty-day strong { display: block; margin-bottom: 5px; }
.empty-day span { color: var(--muted); font-size: 13px; }
.privacy-note { margin-top: 20px; text-align: center; color: #738394; font-size: 11px; line-height: 1.5; }
.retry { margin-top: 20px; border: 0; border-radius: 13px; padding: 12px 18px; background: var(--yellow); color: var(--navy); font-weight: 850; cursor: pointer; }
.retry:active { transform: scale(.97); }
footer { min-height: 54px; display: grid; place-items: center; color: #8291a0; font-size: 11px; padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 620px) {
  .exercise-card { display: grid; grid-template-columns: 42% 58%; }
  .exercise-media { aspect-ratio: auto; min-height: 340px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .exercise-media img:first-child { opacity: 1; }
  .exercise-media img:not(:first-child) { display: none; }
}
