/* Elevate Gym – Gestaltung
   Idee: Gewichtsblock am Gerät. Anthrazit wie Gerätestahl (RAL 7016), Signalgelb wie der
   Steckstift (RAL 1003), Zahlen wie auf Gewichtsplatten gestempelt. Gelb nur für die
   wichtigste Aktion und die gewählte Platte. */

@font-face { font-family: 'Barlow'; src: url('../fonts/barlow-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('../fonts/barlow-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('../fonts/barlow-sc-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('../fonts/barlow-sc-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --font-text: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-num: 'Barlow Semi Condensed', 'Barlow', -apple-system, system-ui, sans-serif;

  --bg: #E6E9EB;
  --surface: #FFFFFF;
  --surface-2: #F1F3F4;
  --ink: #1F272C;
  --ink-2: #55616A;
  --line: #C6CDD2;
  --grid: #E4E8EB;
  --frame: #373F43;
  --frame-ink: #F3F5F6;
  --frame-ink-2: #C3CBD0;
  --plate: #2A3135;
  --plate-ink: #ECEFF1;
  --pin: #F5A800;
  --pin-ink: #1F272C;
  --pin-soft: #FFF1C7;
  --pin-soft-ink: #6B4A00;
  --stop: #B42318;
  --stop-soft: #FCE9E6;
  --ok-soft: #DDEFE4;
  --ok-ink: #1E5E3A;
  --data: #2B6A9E;
  --link: #23608F;
  --focus: #0B63CE;
  --shadow: 0 1px 2px rgba(20, 26, 30, 0.06);

  --r-s: 6px;
  --r-m: 12px;
  --r-l: 18px;
  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #171C1F;
  --surface: #222A2E;
  --surface-2: #2A3338;
  --ink: #EDF0F2;
  --ink-2: #A8B3BA;
  --line: #3B474E;
  --grid: #2F393F;
  --frame: #2B3337;
  --frame-ink: #F3F5F6;
  --frame-ink-2: #B9C2C8;
  --plate: #12171A;
  --plate-ink: #E8ECEE;
  --pin: #FFB51F;
  --pin-ink: #171C1F;
  --pin-soft: #3A3218;
  --pin-soft-ink: #FFD574;
  --stop: #FF7B6B;
  --stop-soft: #3B2220;
  --ok-soft: #1E3A2B;
  --ok-ink: #8FD9A8;
  --data: #4A93CF;
  --link: #8CC4F0;
  --focus: #7AB8FF;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
html.large-text { font-size: 20px; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
html.sheet-open body { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
a { color: var(--link); }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.num { font-family: var(--font-num); }
.muted { color: var(--ink-2); }
.small { font-size: 0.88rem; }
.center { text-align: center; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.stack-xs { display: flex; flex-direction: column; gap: 6px; }
.stack-s { display: flex; flex-direction: column; gap: 10px; }
.stack-m { display: flex; flex-direction: column; gap: 16px; }
.stack-l { display: flex; flex-direction: column; gap: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.inline-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.view-pad { padding: 18px 16px 24px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.icon { flex: none; display: block; }

/* ---------- Gerüst ---------- */
.app { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.boot { padding: 40vh 24px 0; text-align: center; color: var(--ink-2); }
.mode-bare::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top); background: var(--frame); z-index: 30; }
.main { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 4px;
  padding: env(safe-area-inset-top) max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left));
  min-height: calc(56px + env(safe-area-inset-top));
  background: var(--frame); color: var(--frame-ink);
}
.topbar-title { font: 700 1.2rem/1.1 var(--font-num); letter-spacing: 0.01em; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-spacer, .tbar-spacer { width: 48px; height: 48px; }
.brand { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; }
.brand-mark rect { fill: var(--frame-ink-2); }
.brand-mark .brand-pinned { fill: var(--frame-ink); }
.brand-mark .brand-pin { fill: var(--pin); }

.bottom { position: sticky; bottom: 0; z-index: 20; width: 100%; }
.abar {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
}
.abar > * { max-width: 608px; margin: 0 auto; }
.mode-training .abar, .mode-bare .abar { position: sticky; bottom: 0; z-index: 20; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.abar-row { display: flex; gap: 8px; align-items: stretch; }
.abar-stack { display: flex; flex-direction: column; gap: 8px; }
.abar-secondary .btn { flex: 1 1 0; min-width: 0; min-height: 48px; font-size: 0.95rem; padding: 0 10px; }
.abar-secondary .btn-label { white-space: normal; line-height: 1.05; }

.tabbar {
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 58px; color: var(--ink-2); text-decoration: none; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.01em;
}
.tab.is-active { color: var(--ink); }
.tab.is-active::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--pin); }

.live-pill {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; border: 0; cursor: pointer;
  padding: 8px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  background: var(--frame); color: var(--frame-ink); font-size: 0.92rem; text-align: left;
}
.live-pill span:nth-child(2) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-pill b { font-family: var(--font-num); color: var(--pin); }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pin); flex: none; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

.banner {
  display: flex; align-items: center; gap: 10px; margin: 12px 16px 0; padding: 10px 12px;
  background: var(--pin-soft); color: var(--pin-soft-ink); border-radius: var(--r-m); font-size: 0.92rem;
}
.banner span { flex: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 18px; border-radius: var(--r-m); border: 1.5px solid transparent;
  font: 600 1.05rem/1.1 var(--font-num); letter-spacing: 0.01em; text-align: center;
  cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: transform 0.08s ease, filter 0.12s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.btn-s { min-height: 44px; padding: 0 14px; font-size: 0.98rem; }
.btn-l { min-height: 56px; font-size: 1.15rem; flex: 1; }
.btn-xl { min-height: 64px; font-size: 1.3rem; flex: 1; width: 100%; }
.btn-primary { background: var(--pin); color: var(--pin-ink); }
.btn-primary:active { filter: brightness(0.94); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-quiet { background: var(--surface-2); color: var(--ink); border-color: transparent; }
.btn-danger { background: var(--stop-soft); color: var(--stop); border-color: color-mix(in srgb, var(--stop) 35%, transparent); }
.btn-frame { background: rgba(255, 255, 255, 0.08); color: var(--frame-ink); border-color: rgba(255, 255, 255, 0.28); }
.btn-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 48px; height: 48px; border-radius: var(--r-m); border: 0; background: transparent; color: var(--ink);
  cursor: pointer; touch-action: manipulation;
}
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.icon-btn-frame { color: var(--frame-ink); }
.icon-btn-quiet { background: var(--surface-2); min-height: 48px; }
.abar-secondary .icon-btn { width: 56px; height: auto; }

/* ---------- Typo-Bausteine ---------- */
.page-title { font: 700 2rem/1.05 var(--font-num); letter-spacing: -0.005em; }
.lead { font-size: 1.05rem; color: var(--ink-2); }
.section-title { font: 600 1.15rem/1.2 var(--font-num); letter-spacing: 0.01em; margin-bottom: 10px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head .section-title { margin-bottom: 10px; }
.section-aside { color: var(--ink-2); font-size: 0.9rem; }
.section-sub { color: var(--ink-2); font-size: 0.88rem; margin: -6px 0 8px; }
.mini-title { font: 600 0.92rem/1.3 var(--font-num); letter-spacing: 0.01em; color: var(--ink-2); margin: 12px 0 6px; }
.link { color: var(--link); text-underline-offset: 3px; }
.plain { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 6px; }

.badge {
  display: inline-flex; align-items: center; margin-left: 8px; padding: 2px 8px; border-radius: 999px;
  font: 600 0.72rem/1.4 var(--font-text); letter-spacing: 0.01em; vertical-align: 0.15em;
  background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.badge-example { background: var(--pin-soft); color: var(--pin-soft-ink); }
.badge-ok { background: var(--ok-soft); color: var(--ok-ink); }
.dev-meta .badge, .placard-badges .badge { margin-left: 0; }

.callout {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-m);
  background: var(--surface); border: 1px solid var(--line); font-size: 0.94rem;
}
.callout .icon { color: var(--ink-2); margin-top: 1px; }
.callout-pin { border-left: 5px solid var(--pin); }
.note-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); }
.note-title { font: 600 1.05rem/1.2 var(--font-num); }
.empty { text-align: center; padding: 36px 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-title { font: 700 1.35rem/1.2 var(--font-num); }
.empty-text { color: var(--ink-2); max-width: 32ch; }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 0.86rem; font-weight: 600; color: var(--ink-2); }
.field-hint { font-size: 0.86rem; color: var(--ink-2); }
.field-hint.is-error, .is-error { color: var(--stop); }
.input {
  width: 100%; min-height: 52px; padding: 12px 14px; border-radius: var(--r-m);
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font: 400 1rem/1.3 var(--font-text); appearance: none; -webkit-appearance: none;
}
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 38px; }
.textarea { min-height: 96px; resize: vertical; }
.input::placeholder { color: var(--ink-2); opacity: 0.75; }
.form-errors:empty { display: none; }
.form-errors { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: var(--r-m); background: var(--stop-soft); color: var(--stop); font-weight: 600; }
.form-errors p { display: flex; gap: 8px; align-items: flex-start; }

.toggle { display: flex; align-items: center; gap: 14px; min-height: 56px; cursor: pointer; position: relative; }
.toggle-text { flex: 1; display: flex; flex-direction: column; }
.toggle-label { font-weight: 600; }
.toggle-hint { font-size: 0.86rem; color: var(--ink-2); }
.toggle-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-ui { flex: none; width: 54px; height: 32px; border-radius: 16px; background: var(--line); position: relative; transition: background 0.15s ease; }
.toggle-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.15s ease; }
.toggle-input:checked + .toggle-ui { background: var(--ink); }
.toggle-input:checked + .toggle-ui::after { transform: translateX(22px); }
.toggle-input:focus-visible + .toggle-ui { outline: 3px solid var(--focus); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; }
.check-input { width: 24px; height: 24px; accent-color: var(--ink); flex: none; margin: 0; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.seg-btn {
  min-height: 52px; padding: 4px 6px; border-radius: var(--r-m); border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink); font: 600 1.05rem/1.1 var(--font-num); cursor: pointer; touch-action: manipulation;
}
.seg-btn.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.seg-btn.seg-warn.is-active { background: var(--stop); border-color: var(--stop); color: #fff; }
:root[data-theme='dark'] .seg-btn.seg-warn.is-active { color: #1A0F0D; }
.seg-rir .seg-btn { min-height: 48px; font-size: 1.1rem; }

.stepper { display: grid; grid-template-columns: 64px 1fr 64px; gap: 10px; align-items: center; }
.step-btn {
  width: 64px; height: 64px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; touch-action: manipulation;
}
.step-btn:active { background: var(--line); }
.step-btn:disabled { opacity: 0.35; cursor: default; }
.stepper-display {
  display: flex; align-items: center; justify-content: center; min-height: 64px; border-radius: 16px;
  background: transparent; border: 0; color: var(--ink); cursor: pointer;
}
.stepper-value { display: inline-flex; align-items: baseline; gap: 6px; }
.stepper-value b { font: 700 2.3rem/1 var(--font-num); }
.stepper-value small { font-size: 0.95rem; color: var(--ink-2); font-weight: 600; }

/* ---------- Gewichtsblock ---------- */
.wpick { display: grid; grid-template-columns: 64px 1fr 64px; gap: 10px; align-items: center; }
.wstack { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 2px 0; border: 0; background: transparent; cursor: pointer; touch-action: manipulation; }
.plate {
  display: flex; align-items: center; justify-content: center; width: 100%; max-width: 230px;
  border-radius: var(--r-s); background: var(--plate); color: var(--plate-ink); font-family: var(--font-num);
}
.plate-ghost { width: 74%; height: 24px; font-size: 0.86rem; font-weight: 600; opacity: 0.42; }
.plate-ghost.is-empty { opacity: 0.12; }
.plate-current { position: relative; height: 70px; gap: 6px; align-items: baseline; padding-top: 12px; box-shadow: inset 0 -3px 0 rgba(255, 255, 255, 0.06); }
.plate-current b { font-size: 2.55rem; line-height: 1; font-weight: 700; }
.plate-current small { font-size: 1rem; font-weight: 600; color: var(--plate-ink); opacity: 0.75; }
.plate-current .pin { position: absolute; right: -10px; top: 50%; width: 30px; height: 12px; margin-top: -6px; border-radius: 6px; background: var(--pin); }
.plate-current .pin::after { content: ''; position: absolute; right: -6px; top: -5px; width: 22px; height: 22px; border-radius: 50%; background: var(--pin); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18); }
.plate-current.is-unset { background: var(--surface); color: var(--ink-2); border: 2px solid var(--line); align-items: center; padding-top: 0; }
.plate-current.is-unset .pin { display: none; }
.plate-unset { font: 600 1.15rem/1 var(--font-num); }
.plate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-bottom: 8px; }
.plate-tile {
  min-height: 56px; border-radius: var(--r-s); border: 0; background: var(--plate); color: var(--plate-ink);
  display: flex; align-items: baseline; justify-content: center; gap: 4px; padding-top: 14px; cursor: pointer;
}
.plate-tile .num { font-size: 1.35rem; font-weight: 600; }
.plate-tile small { font-size: 0.75rem; opacity: 0.7; }
.plate-tile.is-active { box-shadow: 0 0 0 3px var(--pin); }
.num-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding-bottom: 8px; }
.num-tile { min-height: 52px; border-radius: var(--r-m); border: 1.5px solid var(--line); background: var(--surface-2); cursor: pointer; }
.num-tile .num { font-size: 1.3rem; font-weight: 600; }
.num-tile.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- Startbildschirm ---------- */
.home { display: flex; flex-direction: column; gap: 26px; padding: 18px 16px 24px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.greet-date { color: var(--ink-2); font-size: 0.92rem; }
.greet-title { font: 700 2.3rem/1.05 var(--font-num); letter-spacing: -0.01em; }
.placard { display: flex; flex-direction: column; gap: 10px; padding: 20px 18px; border-radius: var(--r-l); background: var(--frame); color: var(--frame-ink); }
.placard-label { font-size: 0.86rem; font-weight: 600; color: var(--frame-ink-2); }
.placard-title { font: 700 2.1rem/1.02 var(--font-num); letter-spacing: -0.005em; }
.placard-badges:empty { display: none; }
.placard-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.placard-meta { color: var(--frame-ink-2); font-size: 0.95rem; }
.placard-sub { margin-top: 6px; font-size: 0.9rem; font-weight: 600; }
.placard-note { font-size: 0.86rem; color: var(--frame-ink-2); }
.placard .btn-frame { align-self: flex-start; }
.time-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(46px, 1fr)); gap: 6px; }
.tchip {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 58px; border-radius: var(--r-m);
  border: 1.5px solid rgba(255, 255, 255, 0.28); background: transparent; color: var(--frame-ink); cursor: pointer; touch-action: manipulation;
}
.tchip b { font-size: 1.35rem; line-height: 1; }
.tchip small { font-size: 0.72rem; color: var(--frame-ink-2); }
.tchip.is-active { background: var(--pin); border-color: var(--pin); color: var(--pin-ink); }
.tchip.is-active small { color: var(--pin-ink); }

.week { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.day-name { font-size: 0.82rem; font-weight: 600; color: var(--ink-2); }
.day.is-today .day-name { color: var(--ink); }
.day-mark { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; background: transparent; }
.day.is-planned .day-mark { border-color: var(--ink-2); }
.day.is-done .day-mark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.day.is-today .day-mark { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--pin); }
.week-legend { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink-2); margin-left: 8px; }
.lg:first-child { margin-left: 0; }
.lg-done { background: var(--ink); border-color: var(--ink); }

.hints { display: flex; flex-direction: column; gap: 8px; }
.hint-row, .row-link, .dev-row, .plan-row {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px;
  border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.hint-row > .icon:first-child { color: var(--ink-2); }
.row-main, .hint-row > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-main small, .hint-row small { color: var(--ink-2); font-size: 0.86rem; }
.row-main b { font-weight: 600; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.list-muted .dev-row { opacity: 0.7; }
.dev-thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; }
.dev-thumb-num { display: flex; align-items: center; justify-content: center; background: var(--plate); color: var(--plate-ink); font: 700 1.2rem/1 var(--font-num); }
.plan-days { flex: none; min-width: 52px; min-height: 40px; padding: 4px 8px; border-radius: var(--r-s); background: var(--plate); color: var(--plate-ink); display: flex; align-items: center; justify-content: center; font: 700 1rem/1.1 var(--font-num); text-align: center; }

/* ---------- Training ---------- */
.tbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 6px;
  padding: env(safe-area-inset-top) max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left));
  min-height: calc(56px + env(safe-area-inset-top));
  background: var(--frame); color: var(--frame-ink);
}
.tbar-mid { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.tbar-title { font: 600 1.05rem/1.15 var(--font-num); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tbar-time { font-size: 0.95rem; color: var(--pin); font-variant-numeric: tabular-nums; }
.tbar-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: var(--r-m); border: 1.5px solid rgba(255, 255, 255, 0.28); background: transparent; color: var(--frame-ink); font: 600 0.95rem/1 var(--font-num); cursor: pointer; }

.tview { display: flex; flex-direction: column; gap: 14px; padding-bottom: 18px; }
.tview > * { margin-left: max(16px, env(safe-area-inset-left)); margin-right: max(16px, env(safe-area-inset-right)); }
.tprog { display: flex; align-items: center; gap: 10px; padding-top: 12px; }
.tprog-segs { flex: 1; display: flex; gap: 4px; }
.tprog-seg { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.tprog-seg.is-done { background: var(--ink); }
.tprog-seg.is-stopped { background: var(--stop); }
.tprog-seg.is-skipped { background: var(--line); opacity: 0.5; }
.tprog-seg.is-current { background: var(--pin); }
.tprog-label { font-size: 0.82rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }

.dev-head { display: flex; flex-direction: column; gap: 10px; }
.dev-head-row { display: flex; gap: 12px; align-items: flex-start; }
.dev-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dev-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dev-meta:empty { display: none; }
.dev-num { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: var(--r-s); background: var(--plate); color: var(--plate-ink); font: 700 0.95rem/1.5 var(--font-num); letter-spacing: 0.02em; }
.dev-name { font: 700 2.15rem/1.02 var(--font-num); letter-spacing: -0.005em; overflow-wrap: anywhere; }
.dev-photo { flex: none; width: 72px; height: 72px; padding: 0; border: 0; border-radius: var(--r-m); overflow: hidden; cursor: pointer; background: var(--surface-2); }
.dev-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-full { width: 100%; border-radius: var(--r-m); }
.dev-settings {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--ink);
}
.setting { display: flex; flex-direction: column; justify-content: center; min-height: 54px; padding: 6px 12px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); }
.setting small { font-size: 0.76rem; font-weight: 600; color: var(--ink-2); }
.setting b { font: 700 1.3rem/1.1 var(--font-num); }
.setting-empty b { font-size: 1rem; font-weight: 600; color: var(--ink-2); }
.dev-settings-edit { display: flex; align-items: center; justify-content: center; width: 44px; min-height: 54px; color: var(--ink-2); }

.sug { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--line); }
.sug-increase { border-left-color: var(--pin); }
.sug-decrease { border-left-color: var(--data); }
.sug-start { border-left-color: var(--ink-2); }
.sug-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sug-main { display: flex; flex-direction: column; gap: 2px; }
.sug-label { font-size: 0.86rem; font-weight: 600; color: var(--ink-2); }
.sug-value { font: 700 2.2rem/1 var(--font-num); }
.sug-none .sug-value { font-size: 1.5rem; color: var(--ink-2); }
.sug-tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font: 600 0.88rem/1.2 var(--font-num); white-space: nowrap; }
.sug-tag-increase { background: var(--pin-soft); color: var(--pin-soft-ink); }
.sug-reason { font-size: 0.95rem; }
.sug-warn { display: flex; gap: 8px; align-items: flex-start; font-size: 0.92rem; font-weight: 600; color: var(--stop); }
.sug .btn { align-self: flex-start; }
.last { display: flex; flex-direction: column; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line); }
.last-label { font-size: 0.82rem; font-weight: 600; color: var(--ink-2); }
.last-sets { font: 600 1.2rem/1.25 var(--font-num); }
.last-effort, .last-note { font-size: 0.88rem; color: var(--ink-2); }
.why summary, .disclosure summary { display: flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--link); cursor: pointer; list-style: none; }
.why summary::-webkit-details-marker, .disclosure summary::-webkit-details-marker { display: none; }
.why summary::after, .disclosure summary::after { content: '+'; margin-left: 8px; font-family: var(--font-num); font-size: 1.2rem; }
.why[open] summary::after, .disclosure[open] summary::after { content: '–'; }
.basis, .checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; }
.checks li { display: flex; gap: 8px; align-items: flex-start; }
.checks .ok .icon { color: var(--ok-ink); }
.checks .no .icon { color: var(--stop); }
.checks small { color: var(--ink-2); }
.disclosure { padding: 4px 16px 12px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); }
.disclosure > div { margin-top: 8px; }

.saved-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.saved-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 12px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.saved-idx { flex: none; width: 30px; height: 30px; border-radius: var(--r-s); background: var(--plate); color: var(--plate-ink); display: flex; align-items: center; justify-content: center; font: 700 0.95rem/1 var(--font-num); }
.saved-main { font-size: 1.2rem; font-weight: 600; }
.saved-meta { flex: 1; font-size: 0.86rem; color: var(--ink-2); }
.saved-row .icon { color: var(--ink-2); }

.setform { display: flex; flex-direction: column; gap: 16px; padding: 16px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); }
.setform-host { display: flex; flex-direction: column; gap: 12px; }
.sf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sf-title { font: 700 1.45rem/1.1 var(--font-num); }
.sf-target { font: 600 1rem/1.2 var(--font-num); color: var(--ink-2); }
.sf-hint { font-size: 0.9rem; color: var(--ink-2); margin-top: -8px; }
.sf-group { display: flex; flex-direction: column; gap: 8px; }
.sf-label { font-size: 0.86rem; font-weight: 600; color: var(--ink-2); }
.sf-label small { font-weight: 400; }
.pain { display: flex; flex-direction: column; gap: 6px; }
.pain-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: var(--r-m);
  border: 1.5px solid color-mix(in srgb, var(--stop) 45%, transparent); background: transparent; color: var(--stop); font: 600 1rem/1.1 var(--font-num); cursor: pointer;
}
.pain-btn.is-on { background: var(--stop); color: #fff; border-color: var(--stop); }
:root[data-theme='dark'] .pain-btn.is-on { color: #1A0F0D; }
.pain-note { font-size: 0.88rem; color: var(--stop); }
.urgent { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: var(--r-m); background: var(--stop-soft); color: var(--stop); font-weight: 600; }

.warm-panel { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 16px; border-radius: var(--r-l); background: var(--frame); color: var(--frame-ink); }
.warm-panel .muted { color: var(--frame-ink-2); }
.warm-time { font: 700 4.4rem/1 var(--font-num); font-variant-numeric: tabular-nums; }
.warm-time.is-over { color: var(--pin); font-size: 2.6rem; }

/* Pause */
.rest {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column;
  background: var(--frame); color: var(--frame-ink);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
  animation: rest-in 0.22s ease-out;
}
@keyframes rest-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.rest-inner { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; text-align: center; overflow-y: auto; }
.rest-saved { display: inline-flex; align-items: center; gap: 6px; font-size: 0.92rem; color: var(--frame-ink-2); }
.rest-status { font: 600 1.3rem/1.2 var(--font-num); }
.rest-time { font: 700 clamp(5rem, 30vw, 8.5rem)/0.95 var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.rest.is-over .rest-time { color: var(--pin); }
.rest.is-over .rest-status { color: var(--pin); }
.rest-bar { width: min(340px, 82%); height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.rest-fill { display: block; height: 100%; background: var(--pin); transform-origin: left center; transition: transform 0.5s linear; }
.rest-adjust { display: flex; gap: 10px; margin-top: 4px; }
.rest-adjust .btn { min-width: 104px; }
.rest-next { display: flex; flex-direction: column; gap: 4px; width: min(380px, 100%); margin-top: 14px; padding: 14px 16px; border-radius: var(--r-m); background: rgba(255, 255, 255, 0.07); text-align: left; }
.rest-next-label { font-size: 0.86rem; color: var(--frame-ink-2); font-weight: 600; }
.rest-next-name { font: 700 1.5rem/1.1 var(--font-num); }
.rest-next-settings { font-size: 0.95rem; }
.rest-next-weight { font: 600 1.15rem/1.3 var(--font-num); color: var(--pin); }
.rest-actions { padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.rest-actions .btn { max-width: 608px; margin: 0 auto; display: flex; }

/* Übersicht & Auswahl */
.ov-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ov-item { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 0; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); }
.ov-item.is-current { border-color: var(--pin); box-shadow: inset 4px 0 0 var(--pin); }
.ov-item.is-excluded, .ov-item.is-skipped { opacity: 0.75; }
.ov-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 10px; border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--ink); }
.ov-status-icon { width: 22px; flex: none; color: var(--ink-2); }
.ov-text { display: flex; flex-direction: column; min-width: 0; }
.ov-text small { color: var(--ink-2); font-size: 0.84rem; }
.ov-move { display: flex; }
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 14px;
  border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); text-align: left; cursor: pointer;
}
.choice > .icon { color: var(--ink-2); }
.choice > span { display: flex; flex-direction: column; gap: 2px; }
.choice b .badge { margin-left: 6px; vertical-align: 2px; }
.choice small { color: var(--ink-2); font-size: 0.86rem; }
.choice-compact { min-height: 52px; }
.choice-danger, .choice-danger > .icon { color: var(--stop); }
.kv-row { display: grid; grid-template-columns: 1fr 0.8fr 48px; gap: 8px; align-items: center; }

/* Abschluss */
.sum-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sum-row { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); }
.sum-main { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.sum-main small { color: var(--ink-2); }
.sum-sets { font-size: 1.15rem; font-weight: 600; }
.sum-cmp { font-size: 0.88rem; color: var(--ink-2); }

/* ---------- Sheets ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(12, 15, 17, 0.5); opacity: 0; transition: opacity 0.18s ease; }
.sheet-backdrop.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; display: flex; flex-direction: column;
  max-height: 88vh; max-height: 88dvh; margin: 0 auto; max-width: 640px;
  background: var(--surface); color: var(--ink); border-radius: 20px 20px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(100%); transition: transform 0.22s ease-out; outline: none;
}
.sheet.show { transform: none; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 12px 8px 4px 18px; }
.sheet-title { flex: 1; font: 700 1.3rem/1.2 var(--font-num); }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 18px 18px; }
.sheet-actions { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.sheet-actions .btn { flex: 1; }
.error-list { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; color: var(--stop); font-size: 0.92rem; }
.file-name { display: flex; align-items: center; gap: 8px; font-weight: 600; overflow-wrap: anywhere; }

/* ---------- Toast ---------- */
.toast-host { position: fixed; left: 0; right: 0; top: calc(env(safe-area-inset-top) + 64px); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { display: flex; align-items: center; gap: 8px; max-width: 520px; padding: 12px 16px; border-radius: var(--r-m); background: var(--ink); color: var(--bg); font-weight: 600; font-size: 0.95rem; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18); opacity: 0; transform: translateY(-8px); transition: opacity 0.2s ease, transform 0.2s ease; }
.toast.show { opacity: 1; transform: none; }
.toast-error { background: var(--stop); color: #fff; }
:root[data-theme='dark'] .toast-error { color: #1A0F0D; }
.toast-ok .icon { color: var(--pin); }

/* ---------- Geräte & Pläne ---------- */
.kv { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--ink-2); font-size: 0.9rem; }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.dev-detail-head { display: flex; flex-direction: column; gap: 14px; }
.dev-detail-photo { width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--r-l); }
.hist-list { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hist-row { display: grid; grid-template-columns: 92px 1fr; gap: 2px 10px; padding: 10px 12px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.hist-row small { grid-column: 2; color: var(--ink-2); font-size: 0.84rem; }
.hist-date { color: var(--ink-2); font-size: 0.9rem; }
.hist-sets { font-weight: 600; }
.photo-preview { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--r-m); }
.quick-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qchip { display: inline-flex; align-items: center; gap: 4px; min-height: 42px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 0.92rem; }
.start-weight-value { font: 700 1.5rem/1.2 var(--font-num); min-width: 110px; }
.day-chips { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dchip { min-height: 50px; border-radius: var(--r-m); border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: 600 1rem/1 var(--font-num); cursor: pointer; }
.dchip.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pex-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pex { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); }
.pex-move { display: flex; flex-direction: column; }
.pex-move .icon-btn { height: 40px; }
.pex-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 8px 4px; min-height: 64px; justify-content: center; border: 0; background: transparent; text-align: left; color: var(--ink); cursor: pointer; }
.pex-main small { color: var(--ink-2); font-size: 0.86rem; }
.estimate { font-weight: 600; color: var(--ink-2); }

/* ---------- Fortschritt ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); }
.tile-label { font-size: 0.78rem; font-weight: 600; color: var(--ink-2); line-height: 1.2; }
.tile-value { font: 700 1.9rem/1 var(--font-num); }
.tile-sub { font-size: 0.74rem; color: var(--ink-2); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 4px; padding: 14px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); }
.compare-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.compare-label { font-size: 0.8rem; font-weight: 600; color: var(--ink-2); }
.compare-col b { font-size: 1.1rem; overflow-wrap: anywhere; }
.compare-delta { grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid var(--line); font-weight: 600; }
.sets-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: var(--surface); border-radius: var(--r-m); overflow: hidden; }
.sets-table th, .sets-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.sets-table th { font-size: 0.8rem; color: var(--ink-2); font-weight: 600; }
.sets-table td.num { font-variant-numeric: tabular-nums; font-weight: 600; }

.chart { position: relative; margin: 6px 0 0; padding: 12px 10px 4px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); }
.chart-box { width: 100%; }
.chart-svg { display: block; overflow: visible; touch-action: pan-y; }
.chart-grid { stroke: var(--grid); stroke-width: 1; }
.chart-axis { stroke: var(--line); stroke-width: 1; }
.chart-tick { fill: var(--ink-2); font: 500 12px var(--font-num); font-variant-numeric: tabular-nums; }
.chart-value { fill: var(--ink); font: 600 13px var(--font-num); }
.chart-bar { fill: var(--data); }
.chart-line { fill: none; stroke: var(--data); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: var(--data); stroke: var(--surface); stroke-width: 2; }
.chart-cross { stroke: var(--ink-2); stroke-width: 1; }
.chart-hit { fill: transparent; cursor: pointer; outline: none; }
.chart-hit:focus-visible { stroke: var(--focus); stroke-width: 2; }
.chart-tip { position: absolute; top: 2px; z-index: 2; display: flex; flex-direction: column; padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 0.82rem; line-height: 1.3; pointer-events: none; white-space: nowrap; }
.chart-tip b { font: 700 1rem/1.2 var(--font-num); }
.chart-table { margin-top: 4px; }
.chart-table summary { min-height: 44px; display: flex; align-items: center; font-size: 0.9rem; font-weight: 600; color: var(--link); cursor: pointer; }
.chart-table table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-bottom: 8px; }
.chart-table th, .chart-table td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.chart-table th[scope='row'] { font-weight: 400; color: var(--ink-2); }

/* ---------- Einrichtung & Hilfe ---------- */
.onb { display: flex; flex-direction: column; gap: 22px; padding: calc(env(safe-area-inset-top) + 28px) max(20px, env(safe-area-inset-right)) 24px max(20px, env(safe-area-inset-left)); }
.onb-hero { display: flex; flex-direction: column; gap: 12px; }
.onb-mark { display: flex; flex-direction: column; gap: 5px; width: 92px; position: relative; }
.onb-mark span { display: block; height: 18px; border-radius: 4px; background: var(--plate); }
.onb-mark .is-pinned::after { content: ''; position: absolute; right: -14px; margin-top: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--pin); }
.onb-title { font: 700 3rem/1 var(--font-num); letter-spacing: -0.01em; }
.prose .section { display: flex; flex-direction: column; gap: 8px; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { counter-increment: step; position: relative; padding-left: 44px; min-height: 30px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 30px; height: 30px; border-radius: var(--r-s); background: var(--plate); color: var(--plate-ink); display: flex; align-items: center; justify-content: center; font: 700 0.95rem/1 var(--font-num); }

@media (min-width: 700px) {
  .main { padding-top: 8px; }
}
@media (max-width: 374px) {
  .abar-secondary .btn .icon { display: none; }
  .abar-secondary .btn { font-size: 0.9rem; padding: 0 6px; }
  .abar-secondary .icon-btn { width: 48px; }
}
@media (max-width: 360px) {
  html { font-size: 17px; }
  .stepper, .wpick { grid-template-columns: 56px 1fr 56px; gap: 8px; }
  .step-btn { width: 56px; height: 56px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-height: 700px) {
  .rest-inner { gap: 8px; justify-content: flex-start; padding-top: 20px; }
  .rest-time { font-size: 4.6rem; }
  .rest-next { margin-top: 4px; padding: 10px 14px; }
  .warm-time { font-size: 3.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Google-Backup ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row .btn { flex: 1 1 auto; }
.steps-setup { gap: 24px; }
.steps-setup li { display: flex; flex-direction: column; gap: 10px; }
.steps-setup li > p:first-child { min-height: 30px; display: flex; align-items: center; font-size: 1.05rem; }
.input-url { font: 500 0.95rem/1.35 var(--font-text); word-break: break-all; resize: vertical; min-height: 88px; }
.input-key { font: 600 1.15rem/1.2 var(--font-num); letter-spacing: 0.08em; text-transform: uppercase; }
.code-area { font: 0.78rem/1.4 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; white-space: pre; overflow: auto; min-height: 220px; }
.cloud-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--line); }
.cloud-ok { border-left-color: var(--ok-ink); }
.cloud-pending { border-left-color: var(--pin); }
.cloud-busy { border-left-color: var(--data); }
.cloud-paused { border-left-color: var(--ink-2); }
.cloud-head { display: flex; align-items: center; gap: 10px; }
.cloud-head .icon { flex: none; color: var(--ink-2); }
.cloud-ok .cloud-head .icon { color: var(--ok-ink); }
.cloud-title { font: 700 1.25rem/1.15 var(--font-num); }
.cloud-note { padding: 12px 14px; border-radius: var(--r-m); background: var(--surface-2); }
.cloud-pending .cloud-note { background: var(--pin-soft); color: var(--pin-soft-ink); }
.key-box { padding: 14px; border-radius: var(--r-m); background: var(--surface-2); }
.key-text { font: 700 1.5rem/1.2 var(--font-num); letter-spacing: 0.06em; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.choice[aria-busy='true'] { opacity: 0.7; }
.form-errors-detail { font-weight: 400; }
.btn-stack { display: flex; flex-direction: column; gap: 8px; }
.btn-stack .btn-label { white-space: normal; padding: 6px 0; }
