/* Final responsive layout layer. Shared dimensions, no device-specific offsets. */
:root { --control-size: 48px; --edge-gap: 12px; }
.topbar { width:100%; margin-inline:0; box-sizing:border-box; }
.primary-nav { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:8px; }
.primary-nav .brand { min-width:0; min-height:var(--control-size); gap:8px; }
.brand-copy { min-width:0; }
.brand-copy strong { overflow-wrap:anywhere; }
.primary-nav .topbar-action { margin:0; min-width:var(--control-size); min-height:var(--control-size); padding:10px; }
.active-workout-banner { position:fixed; inset-inline:0; left:0; right:0; width:calc(100% - 24px); max-width:28rem; margin-inline:auto; transform:none; bottom:max(12px,env(safe-area-inset-bottom)); box-sizing:border-box; }
:root { --start-dock-height:calc(81px + env(safe-area-inset-bottom, 0px)); }
.start-panel {
  position:fixed; inset:auto 0 0; width:100%; max-width:none; margin:0;
  display:grid; grid-template-columns:minmax(0,1fr); justify-items:center;
  padding:12px max(16px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  box-sizing:border-box; transform:none; border:0; border-top:1px solid #263443;
  border-radius:0; background:#0b141e; box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none;
}
.start-panel > div { display:none; }
.start-panel #startButton { width:100%; max-width:28rem; min-height:56px; justify-content:center; margin:0; white-space:normal; border-radius:12px; background:#9eafff; color:#0b1430; box-shadow:none; }
#homeScreen:has(.start-panel:not(.is-hidden)) { padding-bottom:calc(var(--start-dock-height) + 16px); }
html:has(#homeScreen.active .start-panel:not(.is-hidden)) { scroll-padding-bottom:calc(var(--start-dock-height) + 16px); }
.active-workout-banner { flex-wrap:wrap; justify-content:center; text-align:center; }
.banner-actions { display:flex; flex-wrap:wrap; justify-content:center; }
.workout-header { grid-template-columns:minmax(0,1fr); justify-items:stretch; justify-content:stretch; width:100%; margin-inline:0; box-sizing:border-box; }
.workout-header-topline { grid-template-columns:48px minmax(0,1fr) 48px; gap:8px; }
.workout-header-leading { grid-column:1; grid-row:1; }
.workout-wordmark { display:none; }
.workout-session-copy { grid-column:2; grid-row:1; }
.workout-session-copy h1 { display:block; font-size:14px; white-space:normal; }
.workout-session-meta .eyebrow { font-size:11px; }
.workout-session-meta .session-badge { font-size:10px; }
.workout-header .timer-controls { grid-column:1/-1; grid-row:2; justify-self:center; justify-content:center; flex-wrap:wrap; gap:12px; }
.workout-header .timer-pill { min-height:48px; padding:4px 12px; font-size:22px; font-variant-numeric:tabular-nums; }
.workout-header .timer-value-wrap small { font-size:11px; }
.workout-header .timer-toggle { min-height:48px; min-width:80px; font-size:14px; }
.workout-header .workout-back-button { width:48px; min-height:48px; }
.workout-header-actions { width:100%; display:flex; flex-wrap:wrap; justify-content:center; gap:8px; }
.workout-header-actions > button { flex:1 1 5rem; max-width:12rem; min-width:0; min-height:48px; padding:8px 4px; font-size:12px; white-space:normal; }
.rest-popover { left:0; right:0; margin-inline:auto; width:min(100%,22rem); max-height:60dvh; }
.rest-panel-close,.rest-overlay-close { width:48px; height:48px; min-width:48px; font-size:24px; }
.rest-overlay, .rest-overlay.visible { position:fixed; left:0; right:0; top:auto; bottom:max(12px,env(safe-area-inset-bottom)); margin-inline:auto; width:calc(100% - 24px); max-width:22rem; transform:none; }
.rest-overlay-panel { box-sizing:border-box; padding:20px 16px 16px; max-height:75dvh; overflow:auto; }
.rest-overlay-panel > .section-kicker { padding-inline:48px; }
.rest-overlay-actions button,.rest-overlay-skip,.rest-popover button { min-height:48px; }
@media(max-width:380px) { .brand-copy small {display:none;} .brand-copy strong {font-size:13px;} .brand-mark {width:32px;height:32px;min-width:32px;} }
@media(max-height:500px) { .workout-header {position:relative;top:0;} .rest-overlay-panel {max-height:60dvh;} }
