:root {
  --ink: #4b3545;
  --muted: #66515c;
  --paper: #fbf9f6;
  --card: rgba(255, 255, 255, 0.78);
  --line: #e8e1e4;
  --green: #5e354c;
  --green-dark: #4b3545;
  --mint: #c9f2e8;
  --peach: #edde69;
  --yellow: #edde69;
  --turquoise: #51d7ba;
  --shadow: 0 18px 50px rgba(94, 53, 76, 0.11);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: "Montserrat", system-ui, sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }

.grain { display: none; }

.shell { width: min(1040px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 70px; position: relative; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 0; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; font-family: "Quicksand", sans-serif; font-weight: 700; letter-spacing: -.02em; }
.brand-logo-wrap { width: 56px; height: 56px; flex: 0 0 56px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--green); box-shadow: 0 7px 16px rgba(94,53,76,.18); }
.brand-logo { width: 36px; height: 36px; object-fit: contain; object-position: center; transform: translateX(1px); }
.brand-name { display: grid; line-height: 1.02; }
.brand-name small { margin-top: 3px; color: var(--muted); font-family: "Montserrat", sans-serif; font-size: .54rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.patient-slogan { display: none; font-family: "Playfair Display", Georgia, serif; font-size: 1.25rem; line-height: .9; font-weight: 500; }
.patient-slogan em { font-weight: 500; }
.privacy-pill { color: var(--muted); font-size: .82rem; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: rgba(255,255,255,.35); }

.site-masthead { overflow: hidden; color: white; background: var(--green); }
.masthead-link { display: block; color: inherit; text-decoration: none; }
.masthead-link .masthead-brand { transition: opacity .18s ease; }
.masthead-link:hover .masthead-brand { opacity: .92; }
.masthead-link:focus-visible { outline: 3px solid var(--yellow); outline-offset: -3px; }
.masthead-inner { width: min(1180px, 100%); min-height: 170px; margin: 0 auto; position: relative; }
.masthead-brand { display: flex; align-items: center; gap: 22px; width: 71%; min-height: 170px; padding: 24px 30px; position: relative; z-index: 2; }
.masthead-brand > img { width: 62px; height: 62px; object-fit: contain; }
.masthead-name { display: grid; min-width: 122px; font-size: 1.24rem; letter-spacing: .14em; line-height: 1.17; }
.masthead-name strong { font-weight: 500; }
.masthead-divider { align-self: stretch; width: 1px; max-height: 82px; margin: auto 4px; background: rgba(255,255,255,.3); }
.masthead-message { display: grid; flex: 1; min-width: 0; gap: 8px; }
.masthead-message > strong { font-family: "Playfair Display", Georgia, serif; font-size: clamp(2rem, 3.5vw, 2.7rem); line-height: .94; font-weight: 500; }
.masthead-message > strong em { font-weight: 500; }
.tagline-line { display: block; white-space: nowrap; }
.masthead-message small { font-size: .7rem; letter-spacing: .15em; }
.masthead-stripes { position: absolute; right: -6%; top: -20%; width: 29%; height: 140%; display: flex; gap: 13px; transform: skewX(-19deg); }
.masthead-stripes i { display: block; width: 31%; height: 100%; flex: 0 0 31%; background: var(--paper); }
.masthead-stripes i:nth-child(2) { background: var(--turquoise); }
.masthead-stripes i:nth-child(3) { background: var(--yellow); }
.masthead-stripes i:nth-child(4) { display: none; }

.hero { margin-bottom: 30px; padding: 48px 0 44px; border-bottom: 1px solid var(--line); }
.eyebrow { text-transform: uppercase; letter-spacing: .15em; font-weight: 700; color: var(--green); font-size: .75rem; margin: 0 0 10px; }
h1, h2 { font-family: "Playfair Display", Georgia, serif; font-weight: 500; letter-spacing: -.035em; margin: 0; }
h1 { font-size: clamp(3.1rem, 8vw, 5.6rem); line-height: .9; max-width: 720px; }
h1 em { font-weight: 500; }
h2 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1; }

.panel { background: #f5f0e9; border: 1px solid #eee6df; box-shadow: 0 14px 38px rgba(94,53,76,.07); border-radius: 20px; padding: 32px; }
.panel-head { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 22px; }
.panel-head p { color: var(--muted); margin: 7px 0 0; font-size: .92rem; }
.patient-name-field { max-width: 390px; margin: 0 0 22px; color: var(--green); font-size: .76rem; letter-spacing: .04em; }
.patient-name-field input { margin-top: 2px; background: #fffefd; font-size: .95rem; }
.duration-badge { white-space: nowrap; background: rgba(237, 222, 105, .38); color: var(--green-dark); border-radius: 999px; padding: 9px 13px; font-weight: 700; font-size: .85rem; }

.exercise-list { display: grid; gap: 12px; }
.exercise-row { display: grid; grid-template-columns: 38px 1fr auto; gap: 13px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: #fffefd; }
.exercise-number { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(237,222,105,.45); color: var(--green); font-weight: 700; }
.exercise-summary { display: grid; gap: 5px; min-width: 0; }
.exercise-summary strong { overflow: hidden; text-overflow: ellipsis; }
.exercise-summary span { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.empty-state { min-height: 128px; display: grid; place-items: center; align-content: center; gap: 6px; padding: 20px; text-align: center; border: 1px dashed rgba(94,53,76,.25); border-radius: 18px; color: var(--muted); }
.empty-state > span { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 50%; background: rgba(81,215,186,.17); color: var(--green); font-size: 1.35rem; }
.empty-state strong { color: var(--ink); }
.empty-state small { font-size: .78rem; }
label { display: grid; gap: 6px; font-size: .72rem; color: var(--muted); font-weight: 700; }
input { width: 100%; border: 1px solid var(--line); background: rgba(255,255,255,.76); border-radius: 11px; padding: 11px 12px; color: var(--ink); outline: none; }
input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(94,53,76,.12); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--muted); display: grid; place-items: center; }
.icon-btn:hover { color: #a43b31; border-color: rgba(164,59,49,.3); }
.exercise-actions { display: flex; gap: 7px; }
.icon-btn.edit:hover { color: var(--green); border-color: rgba(94,53,76,.35); background: rgba(94,53,76,.04); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; }
.sound-test { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: .78rem; }
.sound-btn { border: 1px solid var(--line); background: rgba(255,255,255,.5); color: var(--ink); padding: 8px 10px; border-radius: 10px; }
.sound-btn:hover { background: white; }
.secondary { border: 1px solid var(--green); color: var(--green); background: transparent; border-radius: 13px; padding: 11px 15px; font-weight: 700; }
.rounds-question { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 18px; border-left: 4px solid var(--yellow); background: #fffefd; }
.rounds-question > div:first-child { display: grid; gap: 4px; }
.rounds-question strong { color: var(--green); }
.rounds-question span { color: var(--muted); font-size: .78rem; line-height: 1.4; }
.rounds-control { display: grid; grid-template-columns: 38px minmax(88px, auto) 38px; align-items: center; gap: 8px; }
.rounds-control button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--green); font-size: 1.2rem; }
.rounds-control output { text-align: center; color: var(--ink); font-weight: 700; font-size: .86rem; }

.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.primary, .copy-link, .open-plan { min-height: 52px; border: 0; border-radius: 15px; padding: 15px 18px; font-weight: 700; transition: transform .16s, box-shadow .16s, background .16s; }
.primary { color: white; background: var(--green); box-shadow: 0 10px 22px rgba(94,53,76,.2); }
.copy-link { color: var(--ink); background: var(--yellow); }
.open-plan { color: var(--green); background: white; border: 1px solid var(--turquoise); box-shadow: 0 8px 18px rgba(81,215,186,.12); }
.open-plan span { display: inline-block; margin-left: 4px; transition: transform .16s; }
.primary:hover, .copy-link:hover, .open-plan:hover { transform: translateY(-2px); }
.open-plan:hover span { transform: translate(2px, -2px); }
.primary:disabled, .copy-link:disabled, .open-plan:disabled { opacity: .38; cursor: not-allowed; transform: none; box-shadow: none; }
.microcopy { margin: 13px 2px 0; color: var(--muted); text-align: center; font-size: .78rem; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 18px; background: rgba(75,53,69,.38); backdrop-filter: blur(8px); }
.modal-backdrop[hidden], [hidden] { display: none !important; }
.modal { position: relative; width: min(610px, 100%); max-height: calc(100vh - 36px); overflow: auto; padding: 30px; border-radius: 26px; background: var(--paper); box-shadow: 0 24px 70px rgba(75,53,69,.28); }
.modal-close { position: absolute; top: 15px; right: 16px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: white; color: var(--ink); font-size: 1.5rem; }
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.preset-card { min-height: 125px; display: grid; align-content: center; gap: 7px; text-align: left; border: 1px solid var(--line); border-radius: 18px; padding: 18px; color: var(--ink); background: white; transition: transform .16s, border-color .16s; }
.preset-card:hover { transform: translateY(-2px); border-color: var(--green); }
.preset-card strong { font-family: "Quicksand", sans-serif; font-size: 1.03rem; }
.preset-card span, .preset-card small { color: var(--muted); font-size: .79rem; }
.preset-card:first-child { background: rgba(237,222,105,.28); }
.custom-card { background: rgba(81,215,186,.12); }
.back-link { margin: 0 0 22px; padding: 0; border: 0; background: transparent; color: var(--muted); }
.exercise-name-field { margin-top: 24px; font-size: .78rem; }
.exercise-name-field input { padding: 15px; font-size: 1rem; }
.custom-times { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 15px; }
.edit-params { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 15px; }
.edit-note { margin: 12px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.edit-params input:disabled { background: #eee9e4; color: var(--muted); cursor: not-allowed; }
.modal-add { width: 100%; margin-top: 22px; }

.patient-shell { height: calc(100svh - 170px); min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(760px, calc(100% - 28px)); margin: 0 auto; padding: 18px 0 22px; position: relative; overflow: hidden; }
.patient-top { min-height: 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.patient-restart { display: inline-flex; align-items: center; gap: 6px; padding: 5px 2px; border: 0; background: transparent; color: var(--muted); font-size: .82rem; font-weight: 600; }
.patient-restart svg { width: 16px; height: 16px; }
.patient-restart span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.patient-restart:hover, .patient-restart:focus-visible { color: var(--green); outline: none; }
.patient-duration { padding: 7px 11px; font-size: .76rem; }
.timer-stage { display: grid; place-items: center; align-content: center; text-align: center; padding: 30px 0 18px; }
.phase { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 13px; text-transform: uppercase; letter-spacing: .17em; color: var(--green); font-weight: 700; font-size: .78rem; }
.phase-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.exercise-name { width: 100%; height: 1.9em; display: flex; align-items: center; justify-content: center; overflow: hidden; font-family: "Playfair Display", Georgia, serif; font-size: clamp(2.6rem, 10vw, 5rem); line-height: .95; margin: 0 auto 20px; max-width: 650px; padding: 0 .08em; letter-spacing: -.035em; text-wrap: balance; }
.round-label { height: 2.8em; display: flex; align-items: center; justify-content: center; color: var(--muted); line-height: 1.4; margin-bottom: 15px; }
.clock-wrap { width: min(72vw, 310px); aspect-ratio: 1; position: relative; display: grid; place-items: center; margin: 0 auto 28px; cursor: pointer; border-radius: 50%; -webkit-tap-highlight-color: transparent; }
.clock-wrap:focus-visible { outline: 3px solid rgba(94,53,76,.3); outline-offset: 5px; }
.clock-wrap svg { position: absolute; inset: 0; transform: rotate(-90deg); width: 100%; height: 100%; }
.clock-bg, .clock-progress { fill: none; stroke-width: 8; }
.clock-bg { stroke: rgba(24,50,45,.09); }
.clock-progress { stroke: var(--green); stroke-linecap: round; transition: stroke-dashoffset .3s linear; }
.clock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; text-align: center; font-family: "Playfair Display", Georgia, serif; font-size: clamp(4.7rem, 18vw, 7.5rem); font-weight: 500; line-height: 1; letter-spacing: 0; font-variant-numeric: tabular-nums lining-nums; font-feature-settings: "tnum" 1, "lnum" 1; }
.patient-welcome { display: none; }
.patient-greeting { margin: 0; color: var(--green); font-family: "Playfair Display", Georgia, serif; font-size: clamp(2.35rem, 7vw, 3.7rem); line-height: .95; letter-spacing: -.025em; }
.patient-welcome-kicker { margin: 0; color: var(--green); font-size: .7rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.patient-welcome-copy { max-width: 330px; margin: 0 auto; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.patient-shell.is-waiting .patient-welcome { display: grid; gap: 12px; place-items: center; position: relative; z-index: 1; }
.patient-shell.is-waiting .patient-top { padding-bottom: 14px; }
.patient-shell.is-waiting .timer-stage { width: min(100%, 620px); min-height: min(54vh, 440px); justify-self: center; align-content: center; gap: 24px; padding: 34px 24px; overflow: hidden; border: 1px solid rgba(94,53,76,.09); border-radius: 30px; background: radial-gradient(circle at 3% 5%, rgba(81,215,186,.22), transparent 31%), radial-gradient(circle at 96% 92%, rgba(237,222,105,.3), transparent 30%), #fffefa; box-shadow: 0 18px 48px rgba(94,53,76,.09); }
.patient-shell.is-waiting .phase,
.patient-shell.is-waiting .exercise-name,
.patient-shell.is-waiting .round-label,
.patient-shell.is-waiting .timer-controls { display: none; }
.patient-shell.is-waiting .clock-wrap { width: clamp(142px, 34vw, 174px); margin: 0 auto; background: rgba(255,255,255,.92); border: 8px solid var(--turquoise); box-shadow: 0 13px 28px rgba(81,215,186,.2), inset 0 0 0 1px rgba(94,53,76,.04); transition: transform .18s ease, box-shadow .18s ease; }
.patient-shell.is-waiting .clock-wrap:hover { transform: translateY(-2px); box-shadow: 0 17px 32px rgba(94,53,76,.26); }
.patient-shell.is-waiting .clock-wrap svg { display: none; }
.patient-shell.is-waiting .clock { gap: 0; color: var(--green); font-family: "Montserrat", sans-serif; font-size: 1.14rem; font-weight: 750; letter-spacing: .01em; transform: none; transition: none; }
.patient-shell.is-waiting .clock::before { content: ""; width: 0; height: 0; opacity: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 0 solid var(--green); transform: translate(-3px, .5px) scale(.75); transition: none; }
.patient-shell.is-waiting .clock-wrap:focus-visible .clock { gap: 0; font-size: 0; letter-spacing: 0; }
.patient-shell.is-waiting .clock-wrap:focus-visible .clock::before { opacity: 1; border-top-width: 13px; border-bottom-width: 13px; border-left-width: 22px; transform: translate(3px, .5px) scale(1); }
@media (hover: hover) {
  .patient-shell.is-waiting .clock-wrap:hover .clock { gap: 0; font-size: 0; letter-spacing: 0; }
  .patient-shell.is-waiting .clock-wrap:hover .clock::before { opacity: 1; border-top-width: 13px; border-bottom-width: 13px; border-left-width: 22px; transform: translate(3px, .5px) scale(1); }
}
.patient-shell.is-waiting .progress-strip,
.patient-shell.is-waiting .patient-restart { visibility: hidden; }
.timer-controls { display: grid; grid-template-columns: 52px minmax(160px, 230px) 52px; justify-content: center; gap: 12px; }
.circle-btn { border: 1px solid var(--line); background: rgba(255,255,255,.55); color: var(--ink); width: 52px; height: 52px; border-radius: 50%; font-size: 1.15rem; }
.play-btn { border: 0; background: var(--ink); color: white; border-radius: 999px; font-weight: 700; font-size: 1rem; }
.progress-strip { width: min(100%, 500px); display: grid; grid-template-columns: repeat(var(--exercise-count, 1), minmax(0, 1fr)); gap: clamp(7px, 1.5vw, 12px); align-items: center; margin: 18px auto 18px; padding: 0 1px; }
.progress-exercise { position: relative; min-width: 0; height: 24px; display: grid; grid-template-columns: repeat(var(--round-count, 1), minmax(0, 1fr)); gap: 0; align-items: stretch; }
.progress-exercise::before { content: ""; position: absolute; z-index: 0; left: 0; right: 0; top: 10px; height: 4px; border-radius: 999px; background: rgba(94,53,76,.1); box-shadow: inset 0 0 0 1px rgba(94,53,76,.035); transition: background .2s ease, transform .2s ease, box-shadow .2s ease; }
.progress-exercise.visited::before { background: rgba(94,53,76,.22); }
.progress-exercise.complete::before { background: rgba(94,53,76,.38); }
.progress-exercise.current::before { transform: scaleY(1.3); box-shadow: 0 2px 7px rgba(94,53,76,.18); }
.progress-seg { position: relative; z-index: 1; min-width: 0; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.progress-seg.active::after { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 4px; background: var(--green); transform: scaleY(1.3); box-shadow: 0 2px 7px rgba(94,53,76,.18); }
.progress-seg:first-child::after { border-radius: 999px 0 0 999px; }
.progress-seg:last-child::after { border-radius: 0 999px 999px 0; }
.progress-seg:only-child::after { border-radius: 999px; }
.progress-seg:hover::after, .progress-seg:focus-visible::after { transform: scaleY(1.65); }
.progress-seg:focus-visible { outline: none; }
.patient-web-block { display: grid; place-items: center; gap: 4px; margin-top: 6px; }
.patient-web-cta { display: inline-flex; align-items: center; gap: 4px; padding: 0 3px 1px; border-bottom: 1px solid transparent; color: var(--green); text-decoration: none; text-transform: uppercase; font-size: .5rem; font-weight: 700; line-height: 1.1; letter-spacing: .14em; transition: border-color .18s ease, transform .18s ease; }
.patient-web-cta:hover, .patient-web-cta:focus-visible { border-bottom-color: var(--yellow); transform: translateY(-1px); outline: none; }
.patient-web-dot { width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: var(--turquoise); box-shadow: 0 0 0 2px rgba(81,215,186,.13); }
.patient-signature { margin: 0; color: var(--green); text-align: center; text-decoration: none; font-size: .68rem; font-weight: 700; letter-spacing: .045em; transition: opacity .18s ease; }
.patient-signature:hover, .patient-signature:focus-visible { opacity: .72; outline: none; }

.done-card { text-align: center; max-width: 620px; margin: 10vh auto 0; }
.done-orbit { width: 92px; height: 92px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; font-size: 2.6rem; margin: 0 auto 24px; }
.done-card h1 { font-size: clamp(3.4rem, 12vw, 6.3rem); }
.done-card p { color: var(--muted); max-width: 430px; margin: 20px auto 28px; line-height: 1.6; }
.done-card .done-message { color: var(--ink); font-size: clamp(1.25rem, 3vw, 1.65rem); font-weight: 650; line-height: 1.35; }
.invalid-plan h1 { max-width: 620px; font-size: clamp(2.8rem, 9vw, 5.3rem); }
.invalid-plan-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: white; border-radius: 999px; padding: 11px 17px; font-size: .86rem; transition: .22s; z-index: 10; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 720px) {
  .shell { width: min(100% - 22px, 600px); padding-top: 20px; }
  .topbar { margin-bottom: 28px; }
  .privacy-pill { display: none; }
  .masthead-inner { min-height: 100px; }
  .masthead-brand { gap: 12px; width: 69%; min-height: 100px; padding: 12px; }
  .masthead-brand > img { width: 48px; height: 48px; }
  .masthead-name, .masthead-divider { display: none; }
  .masthead-message { display: grid; gap: 6px; }
  .masthead-message > strong { font-size: clamp(1.05rem, 4.8vw, 1.9rem); line-height: .9; }
  .masthead-message small { font-size: .52rem; letter-spacing: .11em; }
  .masthead-stripes { right: -6%; top: -10%; width: 31%; height: 120%; gap: 6px; transform: skewX(-19deg); }
  .masthead-stripes i { width: auto; flex: 1 1 0; }
  .topbar { margin-bottom: 0; }
  .hero { padding: 34px 0 30px; }
  h1 { font-size: clamp(3.2rem, 17vw, 5rem); }
  .panel { padding: 17px; border-radius: 22px; }
  .panel-head { align-items: start; }
  .brand-logo-wrap { width: 48px; height: 48px; flex-basis: 48px; }
  .brand-logo { width: 35px; height: 35px; }
  .exercise-row { grid-template-columns: 34px 1fr auto; gap: 10px; padding: 12px; }
  .exercise-number { width: 34px; height: 34px; }
  .actions { grid-template-columns: 1fr; }
  .toolbar { align-items: start; }
  .sound-test { width: 100%; flex-wrap: wrap; }
  .rounds-question { align-items: flex-start; flex-direction: column; }
  .modal { padding: 25px 18px 20px; border-radius: 22px; }
  .preset-grid { grid-template-columns: 1fr; }
  .preset-card { min-height: 92px; }
  .custom-times { grid-template-columns: 1fr; }
  .edit-params { grid-template-columns: 1fr; }
  .patient-shell { height: calc(100svh - 100px); min-height: 0; grid-template-rows: auto minmax(0, 1fr) auto; padding: 10px 0 10px; overflow: hidden; }
  .patient-top { min-height: 20px; flex: 0 0 auto; }
  .timer-stage { min-height: 0; overflow-y: auto; padding: 12px 0 10px; scrollbar-width: none; }
  .timer-stage::-webkit-scrollbar { display: none; }
  .exercise-name { height: clamp(4.465rem, 20.9vw, 7.79rem); font-size: clamp(1.9rem, 9vw, 4.1rem); margin-bottom: 12px; }
  .round-label { margin-bottom: 10px; }
  .clock-wrap { width: min(58vw, 245px); margin-bottom: 14px; }
  .clock { font-size: clamp(4rem, 17vw, 6.2rem); }
  .progress-strip { margin-bottom: 6px; }
  .patient-web-block { margin-top: 8px; }
  .patient-signature { font-size: .6rem; line-height: 1.2; }
}

@media (min-width: 521px) and (max-height: 820px) {
  .patient-shell { padding-top: 8px; padding-bottom: 10px; row-gap: 8px; }
  .patient-top { min-height: 18px; }
  .timer-stage { min-height: 0; align-content: start; overflow: hidden; padding: 5px 0 8px; }
  .phase { margin-bottom: 7px; }
  .exercise-name { font-size: clamp(2.35rem, min(7vw, 7vh), 4rem); margin-bottom: 8px; }
  .round-label { margin-bottom: 7px; }
  .clock-wrap { width: min(35vw, 24vh, 200px); margin-bottom: 9px; }
  .clock { font-size: clamp(3.7rem, 14vh, 6rem); }
  .progress-strip { margin-bottom: 6px; }
  .patient-web-block { margin-top: 8px; }
}

@media (max-width: 520px) and (max-height: 760px) {
  .patient-shell { padding-top: 6px; padding-bottom: 6px; }
  .patient-top { min-height: 18px; }
  .timer-stage { align-content: start; overflow: hidden; padding: 4px 0 6px; }
  .phase { margin-bottom: 6px; font-size: .7rem; }
  .exercise-name { margin-bottom: 7px; }
  .round-label { height: 2.35em; margin-bottom: 4px; }
  .clock-wrap { width: min(48vw, 200px); margin-bottom: 8px; }
  .clock { font-size: clamp(3.7rem, 16vw, 5.5rem); }
  .progress-strip { margin-top: 12px; margin-bottom: 4px; }
  .patient-web-block { margin-top: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
