/* Hocus Chokus Timer
   Verwaltung (Liste, Editor, Einstellungen): eigenes, ruhiges App-Design (Material-/iOS-Anmutung,
   Hocus-Rot #c1121f als Akzent, Karten 14 px, Bedienelemente 8 px – keine Pillen).
   Laufender Timer: Vollbild-Farbflächen wie beim Android-Original (Farben gemessen:
   Vorbereiten #e6b100, Training #00d477, Pause #eb002b, Abkühlen #2196f3, Finish #008291, Text #212121,
   pausiert = Farbe × 0,335, Phasenname = Farbe 40 % Richtung Weiß). */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface2: #f7f7f9;
  --text: #1b1c1e;
  --text2: #66686d;
  --line: #e4e7eb;
  --primary: #c1121f;
  --primary-soft: #fbe9ea;
  --dark: #17181a;
  --tonal: #eceef1;
  --r-card: 10px;
  --r-ctl: 8px;
  --shadow: 0 1px 2px rgba(20,22,30,.06), 0 2px 10px rgba(20,22,30,.05);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Roboto, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.35;
  overscroll-behavior-y: none;
  -webkit-user-select: none; user-select: none;
  -webkit-font-smoothing: antialiased;
}
input, textarea { -webkit-user-select: text; user-select: text; font: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }
.ic { width: 24px; height: 24px; fill: currentColor; vertical-align: middle; flex: none; }

#app { min-height: 100%; }
.view { min-height: 100vh; min-height: 100dvh; }

/* ---------- Gemeinsame Bausteine ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 4px;
  min-height: 60px; padding: 4px 8px 4px 12px;
  padding-top: calc(4px + env(safe-area-inset-top));
  background: var(--dark); color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.topbar .title { flex: 1; min-width: 0; font-size: 18px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.topbar .ibtn, .topbar .ibtn.dark { color: #fff; }
.topbar .ibtn:active { background: rgba(255,255,255,.12); }
.topbar .btn.text { color: #ff6b6b; }
.topbar .logo { width: 38px; height: 38px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #fff; object-fit: cover; margin-right: 10px; flex: none; }
.ibtn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-ctl); color: var(--text2); flex: none; }
.ibtn:active { background: rgba(0,0,0,.06); }
.ibtn.dark { color: var(--text); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px;
  border-radius: var(--r-ctl); font-size: 15px; font-weight: 600; white-space: nowrap; flex: none;
}
.btn .ic { width: 20px; height: 20px; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:active { background: #a30f1a; }
.btn.darkbtn { background: var(--dark); color: #fff; }
.btn.tonal { background: var(--tonal); color: var(--text); }
.btn.tonal:active { background: #dfe2e7; }
.btn.text { color: var(--primary); padding: 0 10px; }
.btn.block { width: 100%; }
.btn.belt {
  background: linear-gradient(to right, #1a1a1a 0, #1a1a1a 70%, #d72929 70%, #d72929 85%, #1a1a1a 85%, #1a1a1a 100%);
  color: #fff; padding: 0 46px 0 16px; border-radius: 6px; letter-spacing: .03em; box-shadow: 0 3px 10px rgba(0,0,0,.28);
}
.btn.belt:active { transform: translateY(1px); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.belt-line { display: flex; height: 5px; margin: -6px 4px 14px; }
.belt-line span { display: block; height: 100%; }
.belt-line .a { width: 120px; background: var(--dark); border-radius: 2px 0 0 2px; }
.belt-line .r { width: 24px; background: var(--primary); }
.belt-line .b { width: 14px; background: var(--dark); border-radius: 0 2px 2px 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 6px; background: var(--tonal); color: var(--text2); font-size: 13px; font-weight: 500; white-space: nowrap; }
.card { background: var(--surface); border-radius: var(--r-card); border: 1px solid var(--line); }
.vol-row { display: flex; align-items: center; gap: 10px; padding: 2px 16px 10px; color: var(--text2); }
.vol-row .ic { width: 22px; height: 22px; }
.vol-row span { display: inline-flex; }
input[type=range].slider { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; margin: 0; }
input[type=range].slider::-webkit-slider-runnable-track { height: 4px; background: #d5d7dc; border-radius: 2px; }
input[type=range].slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); margin-top: -8px; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
input[type=range].slider::-moz-range-track { height: 4px; background: #d5d7dc; border-radius: 2px; }
input[type=range].slider::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: var(--primary); }

/* Stepper: [−] Wert [+] */
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper .ibtn { width: 40px; height: 40px; background: var(--tonal); color: var(--text); }
.stepper .ibtn .ic { width: 22px; height: 22px; }
.stepper .val { min-width: 84px; text-align: center; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; padding: 0 4px; }
.stepper .val.num { min-width: 56px; }
.stepper.small .ibtn { width: 34px; height: 34px; }
.stepper.small .val { font-size: 17px; min-width: 40px; }
.stepper.big .val { font-size: 26px; min-width: 110px; }
.stepper.big .ibtn { width: 44px; height: 44px; }

/* Schalter (Material-Stil) */
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .track { position: absolute; inset: 0; border-radius: 14px; background: #c9ccd3; transition: background .15s; }
.switch .knob { position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: left .15s; }
.switch input:checked ~ .track { background: var(--primary); }
.switch input:checked ~ .knob { left: 23px; }

/* Zeilen in Karten (Einstellungen, Optionen) */
.rows { padding: 2px 0; }
.row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 16px; }
.row + .row { border-top: 1px solid var(--line); }
.row.stack { flex-direction: column; align-items: stretch; gap: 8px; padding-bottom: 12px; }
.row.stack .segm { align-self: flex-start; }
.row .lbl { flex: 1; min-width: 0; font-size: 16px; }
.row .lbl small { display: block; color: var(--text2); font-size: 13px; margin-top: 1px; }
.row .value { display: inline-flex; align-items: center; gap: 2px; color: var(--text2); font-size: 15px; padding: 6px 0 6px 6px; }
.row .value .ic { width: 20px; height: 20px; }
.row .dot { width: 26px; height: 26px; border-radius: 50%; position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
button.row { width: 100%; text-align: left; }
.section-title { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text2); margin: 22px 20px 8px; }

/* ---------- Liste ---------- */
.list-body { padding: 4px 12px 40px; }
.section-head { display: flex; align-items: center; gap: 6px; padding: 10px 4px 12px; }
.section-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 22px; font-weight: 700; }
.preset { position: relative; display: flex; align-items: stretch; gap: 10px; padding: 12px 10px 12px 14px; margin-bottom: 10px; }
.preset .preset-body { flex: 1; min-width: 0; cursor: pointer; padding-right: 6px; }
.preset .nm { font-size: 16px; font-weight: 700; line-height: 1.25; margin-bottom: 3px; word-break: break-word; }
.preset .meta { font-size: 12.5px; line-height: 1.35; color: var(--text2); }
.preset .total-line { font-size: 12.5px; line-height: 1.35; color: var(--text2); margin: 2px 0 9px; }
.preset .total-line b { color: var(--text); font-weight: 700; }
.preset .acts { flex: none; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 6px; }
.preset .meta b { color: var(--text); font-weight: 600; }
.preset .meta .mdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 4px 0 0; vertical-align: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
.tl { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; }
.tl span { display: block; height: 100%; min-width: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.tl span.lp { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.45) 0 3px, transparent 3px 7px); }
.preset .more { width: 36px; height: 34px; color: var(--text2); }
.beltplay {
  flex: none; width: 66px; height: 46px; border-radius: 6px; color: #fff; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  background: linear-gradient(to right, #1a1a1a 0, #1a1a1a 70%, #d72929 70%, #d72929 85%, #1a1a1a 85%, #1a1a1a 100%);
  box-shadow: 0 3px 10px rgba(0,0,0,.28);
}
.beltplay .ic { width: 28px; height: 28px; }
.beltplay:active { transform: translateY(1px); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
/* Dezenter Merch-Hinweis unter der Timerliste (mit kleinem Herz) */
.merch-line { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 20px 0 4px; padding: 8px 6px; text-decoration: none; color: var(--text2); font-size: 12.5px; }
.merch-line .ic { width: 13px; height: 13px; color: var(--primary); flex: none; }
.merch-line span { border-bottom: 1px solid #d9dce1; padding-bottom: 1px; }
.merch-line:active span { border-bottom-color: var(--primary); color: var(--text); }
.sort-mode .merch-line { display: none; }
.empty { text-align: center; color: var(--text2); padding: 40px 16px; }
.empty .ic { width: 48px; height: 48px; color: #c9ccd3; margin-bottom: 8px; }
.sort-mode .preset { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 14px; }
.sort-mode .preset .preset-body { flex: 1; min-width: 0; }
.sort-mode .preset .tl, .sort-mode .preset .meta, .sort-mode .preset .total-line { display: none; }
.sort-mode .preset { align-items: center; }

/* ---------- Menüs, Dialoge, Toast, Sheet ---------- */
#overlay { position: fixed; inset: 0; z-index: 50; background: rgba(20,22,30,.35); }
#overlay.clear { background: transparent; }
.menu { position: absolute; min-width: 200px; background: var(--surface); border-radius: 12px; padding: 6px; box-shadow: 0 6px 24px rgba(20,22,30,.22); z-index: 51; }
.menu button { display: block; width: 100%; text-align: left; padding: 12px 14px; font-size: 16px; border-radius: 8px; }
.menu button:active { background: var(--tonal); }
.menu button.danger { color: var(--primary); }
.menu button .ic.heart-red { width: 15px; height: 15px; color: var(--primary); margin-left: 6px; vertical-align: -2px; }
.dialog { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(92vw, 400px); background: var(--surface); border-radius: 18px; padding: 22px 22px 12px; box-shadow: 0 12px 40px rgba(20,22,30,.3); }
.dialog h3 { margin: 0 0 12px; font-size: 19px; font-weight: 600; }
.dialog p { margin: 0 0 12px; font-size: 16px; color: var(--text); }
.dialog input[type=text], .dialog input[type=number] { width: 100%; font-size: 22px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r-ctl); background: var(--surface2); outline: none; }
.dialog input:focus { border-color: var(--primary); }
.dialog textarea { width: 100%; font-size: 13px; font-family: ui-monospace, Consolas, monospace; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r-ctl); background: var(--surface2); outline: none; resize: vertical; -webkit-user-select: text; user-select: text; }
.dialog textarea:focus { border-color: var(--primary); }
.dialog .actions { display: flex; justify-content: flex-end; gap: 4px; margin-top: 14px; }
.dialog .actions button { padding: 10px 14px; color: var(--primary); font-weight: 600; border-radius: var(--r-ctl); }
.dialog .actions button:active { background: var(--primary-soft); }
.dialog .list { margin: 0 -8px; }
.dialog .list button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 12px; font-size: 16px; border-radius: var(--r-ctl); }
.dialog .list button.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
#toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 60; background: var(--dark); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 15px; max-width: 90vw; box-shadow: 0 4px 16px rgba(0,0,0,.3); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface); padding: 8px 8px calc(16px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; box-shadow: 0 -6px 24px rgba(20,22,30,.2); }
.sheet .grip { width: 36px; height: 4px; border-radius: 2px; background: #d5d7dc; margin: 4px auto 12px; }
.sheet h3 { margin: 0 12px 8px; font-size: 17px; font-weight: 600; }
.palette { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 6px; padding: 6px 10px 4px; }
.swatch-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text2); }
.swatch { width: 54px; height: 54px; border-radius: 50%; position: relative; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
.swatch.on::after { content: ''; position: absolute; inset: -5px; border: 3px solid var(--text); border-radius: 50%; }

/* ---------- Editor ---------- */
.edit-body { padding: 4px 12px 48px; }
.name-card { padding: 4px 16px; margin-bottom: 12px; }
.name-card input { width: 100%; border: 0; background: transparent; font-size: 20px; font-weight: 600; color: var(--text); outline: none; padding: 12px 0; }
.name-card input::placeholder { color: #a5a8b0; font-weight: 500; }
.group { margin-bottom: 12px; overflow: hidden; }
.group-head { display: flex; align-items: center; gap: 8px; padding: 10px 6px 10px 16px; }
.group-head .sets { display: inline-flex; align-items: center; gap: 10px; }
.group-head .sets .lbl { font-size: 15px; font-weight: 600; color: var(--text2); }
.group-head .spacer { flex: 1; }
.group-head .dirbtn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 40px; border-radius: var(--r-ctl); background: var(--tonal); color: var(--text); }
.group-head .dirbtn .ic { width: 26px; height: 26px; }
.group-head .dirbtn.off { color: var(--text2); }
.group-head .dirbtn.on { background: var(--dark); color: #fff; }
.stepper.off .val { color: var(--text2); }
.group-head .dirbtn + .dirbtn { margin-left: 4px; }
.group-body { padding: 0 10px; display: flex; flex-direction: column; gap: 10px; }
.group-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px 12px 10px; }
.group-foot .dur { font-size: 15px; font-weight: 600; color: var(--text2); font-variant-numeric: tabular-nums; }
.add-group { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 50px; border: 2px dashed #c9ccd3; border-radius: var(--r-card); color: var(--text2); font-weight: 600; margin-bottom: 12px; }
.total-card { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; margin-bottom: 12px; font-size: 17px; font-weight: 600; }
.total-card span:last-child { font-size: 20px; font-variant-numeric: tabular-nums; }
.finish-card { margin-bottom: 12px; }
.finish-card h3 { margin: 0; padding: 14px 16px 4px; font-size: 16px; font-weight: 600; }

.ival { border-radius: 10px; padding: 8px 10px 8px 14px; position: relative; overflow: hidden; border: 1px solid rgba(0,0,0,.07); }
.ival::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--ivc); }
.ival .row1 { display: flex; align-items: center; gap: 4px; }
.ival .name { flex: 1; min-width: 0; border: 0; border-bottom: 1.5px solid transparent; background: transparent; font-size: 17px; font-weight: 600; color: var(--text); outline: none; padding: 6px 2px; }
.ival .name:focus { border-bottom-color: rgba(0,0,0,.35); }
.ival .name::placeholder { color: rgba(0,0,0,.4); font-weight: 500; }
.ival .row2 { display: flex; align-items: center; gap: 8px; margin: 4px 0 6px; flex-wrap: wrap; }
.ival .modes { display: inline-flex; background: rgba(255,255,255,.55); border-radius: var(--r-ctl); padding: 3px; }
.ival .modes button { height: 30px; padding: 0 12px; border-radius: 6px; font-size: 13px; font-weight: 600; color: rgba(0,0,0,.55); }
.ival .modes button.on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.ival .row2 .spacer { flex: 1; }
.ival .stepper .ibtn { background: rgba(255,255,255,.6); }
.ival .reps-steppers { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ival .row3 { display: flex; align-items: center; gap: 2px; margin: 0 -4px 0 -6px; }
.ival .colorbtn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px; border-radius: var(--r-ctl); font-size: 14px; font-weight: 600; color: rgba(0,0,0,.7); }
.ival .colorbtn .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--ivc); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.ival .row3 .spacer { flex: 1; }
.ival .row3 .ibtn { color: rgba(0,0,0,.6); }
.ival .row3 .ibtn.on { background: rgba(255,255,255,.7); color: var(--text); }
.ival .adv { margin: 6px -10px -8px -14px; padding: 2px 6px 4px 14px; background: rgba(255,255,255,.55); }
.ival .adv .row { padding: 4px 6px 4px 0; min-height: 48px; }
.ival .adv .row + .row { border-top-color: rgba(0,0,0,.08); }
.ival .adv .row .lbl { font-size: 15px; font-weight: 500; }
.ival .adv .row .lbl small { color: rgba(0,0,0,.55); }
.ival .adv .choice { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; }
.ival .adv .choice span { min-width: 90px; text-align: center; }
.ival .adv .choice .ibtn { width: 36px; height: 36px; }
.ival .adv .tog { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 36px; border-radius: var(--r-ctl); color: rgba(0,0,0,.4); }
.ival .adv .tog.on { background: var(--dark); color: #fff; }

/* ---------- Einstellungen ---------- */
.prev-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; width: calc(100% - 32px); height: 200px; margin: 16px 16px 10px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); font-family: Roboto, "Segoe UI", system-ui, sans-serif; }
.prev-screen .pc { font-size: 24px; line-height: 1; margin-bottom: 10px; }
.prev-screen .pd { font-size: 62px; line-height: .9; font-variant-numeric: tabular-nums; }
.prev-screen .pl { font-size: 24px; font-weight: 800; margin-top: 12px; text-transform: uppercase; transform: scaleX(.86); }
.prev-screen .pf { font-size: 30px; font-weight: 800; text-transform: uppercase; }
.phase-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 16px 6px; }
.pchip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 8px; border-radius: var(--r-ctl); border: 1.5px solid var(--line); font-size: 14px; font-weight: 600; color: var(--text); }
.pchip.on { border-color: var(--dark); background: #fff; box-shadow: 0 0 0 1px var(--dark); }
.pchip .dot { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
.hint { margin: 0 16px 6px; font-size: 12.5px; color: var(--text2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px 6px; }
.chipbtn { height: 36px; padding: 0 14px; border-radius: var(--r-ctl); border: 1.5px solid var(--line); font-size: 14px; font-weight: 600; color: var(--text); }
.chipbtn.on { background: var(--dark); color: #fff; border-color: var(--dark); }
.segm { display: inline-flex; background: var(--tonal); border-radius: var(--r-ctl); padding: 3px; }
.segm button { height: 30px; padding: 0 10px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--text2); }
.segm button.on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.settings-body .row > .ic { color: var(--text2); }
.settings-body { padding: 0 12px 40px; }
.settings-body .version { color: var(--text2); font-size: 13px; text-align: center; margin: 28px 0 0; }
.settings-body .version img { width: 40px; height: 40px; border-radius: 50%; display: block; margin: 0 auto 8px; box-shadow: var(--shadow); }

/* ---------- Laufender Timer (Optik wie das Original) ---------- */
#view-run {
  position: fixed; inset: 0; z-index: 30; overflow: hidden; color: #212121;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  touch-action: none; cursor: default;
  transition: background-color .15s;
}
#view-run .stack { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; padding: 0 2vw; }
#view-run .counter { font-size: 23vw; line-height: 1; font-weight: 400; margin-bottom: 0.32em; font-variant-numeric: tabular-nums; }
#view-run .digits { font-size: 40vw; line-height: 0.9; font-weight: 400; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; }
#view-run .label {
  font-size: 21vw; line-height: 1; font-weight: 700; text-transform: uppercase; margin-top: 0.38em;
  font-family: "Roboto Condensed", "Arial Narrow", Roboto, "Segoe UI", sans-serif; font-stretch: condensed;
  white-space: nowrap; max-width: none; overflow: visible; transform-origin: center; transform: scaleX(.86);
}
#view-run .ctl { position: absolute; left: 0; right: 0; top: 0; padding-top: env(safe-area-inset-top); opacity: 0; transition: opacity .2s; pointer-events: none; }
#view-run.ctl-on .ctl { opacity: 1; pointer-events: auto; }
#view-run .ctl .vol { display: flex; align-items: center; gap: 12px; padding: 12px 20px 0 16px; color: #212121; }
#view-run .ctl .vol .ic { width: 28px; height: 28px; }
#view-run .ctl .vol span { display: inline-flex; }
#view-run .ctl input[type=range].slider::-webkit-slider-runnable-track { background: #000; height: 3px; }
#view-run .ctl input[type=range].slider::-webkit-slider-thumb { background: #000; width: 18px; height: 18px; margin-top: -7.5px; box-shadow: none; }
#view-run .ctl input[type=range].slider::-moz-range-track { background: #000; }
#view-run .ctl input[type=range].slider::-moz-range-thumb { background: #000; }
#view-run .ctl .nav { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px; }
#view-run .ctl .nav .ibtn { width: 52px; height: 52px; color: #212121; }
#view-run .ctl .nav .ibtn .ic { width: 30px; height: 30px; }
/* Hinweis-Balken im Blackbelt-Stil der Website (wie "Probetraining sichern") */
#view-run .hint {
  flex: 1; margin: 0 6px; text-align: center; color: #fff; font-size: 1rem; font-weight: 700; letter-spacing: .3px;
  padding: 9px 16px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(to right, #1a1a1a 0, #1a1a1a 70%, #d72929 70%, #d72929 85%, #1a1a1a 85%, #1a1a1a 100%);
  box-shadow: 0 4px 14px rgba(0,0,0,.45);
}
#view-run .fab {
  position: absolute; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 50%;
  background: rgba(23,24,26,.85); color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 3px 6px rgba(0,0,0,.35);
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
#view-run .fab .ic { width: 30px; height: 30px; }
#view-run.ctl-on .fab, #view-run.paused .fab { opacity: 1; pointer-events: auto; }
#view-run .confirm { position: absolute; left: 0; right: 0; bottom: 18vh; text-align: center; font-size: 22px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
#view-run.done .fin { font-size: 40px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
#view-run.done .fin-btns { position: absolute; left: 0; right: 0; top: 66%; display: flex; justify-content: center; gap: 28px; }
#view-run.done .fin-btns button { width: 68px; height: 68px; border-radius: 8px; background: rgba(23,24,26,.85); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
#view-run.done .fin-btns button .ic { width: 40px; height: 40px; }
#view-run.done .fin-hint { position: absolute; left: 0; right: 0; bottom: 8vh; text-align: center; color: rgba(0,0,0,.55); font-size: 14px; }

@media (orientation: landscape) {
  #view-run .digits { font-size: 55vh; }
  #view-run .counter { position: absolute; left: 4vw; bottom: 4vh; font-size: 12vh; margin: 0; }
  #view-run .label { position: absolute; right: 4vw; bottom: 4vh; font-size: 11vh; margin: 0; transform: none; }
  #view-run .stack { padding: 0; }
}
@media (min-width: 700px) and (orientation: portrait) {
  #view-run .digits { font-size: 36vw; }
}
@media (min-width: 640px) {
  /* Am Desktop: Inhalt UND Kopfzeile auf dieselbe 640-px-Spalte zentrieren */
  .list-body, .edit-body, .settings-body { max-width: 640px; margin: 0 auto; }
  .topbar { padding-left: max(12px, calc((100% - 640px) / 2 + 12px)); padding-right: max(8px, calc((100% - 640px) / 2 + 8px)); }
}
