/* Ironclub: jeder Bereich ist ein eigener Raum mit eigener Stimmung.
   Raum 01 Atelier (Kupfer, Blueprint) · Raum 02 Gym Floor (Neon-Rot, Gummiboden)
   Raum 03 Trophäenraum (Gold, Bordeaux) · Raum 04 Spa (Aqua, Glas) */

:root {
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --round: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

/* Räume: Farben und Schriften */
body[data-room="plan"] {
  --bg: #15120f; --fg: #f0e7db; --dim: #a5988b; --accent: #e0955f; --on-accent: #1a1109;
  --card: rgba(255, 244, 230, .035); --line: rgba(224, 149, 95, .22); --panel: #1c1813;
  --field: #211c17; --head: var(--mono); --radius: 6px;
}
body[data-room="training"] {
  --bg: #09090b; --fg: #f5f5f6; --dim: #8b8b94; --accent: #ff3d2e; --on-accent: #fff; --lime: #c6ff3d;
  --card: rgba(19, 19, 22, .84); --line: #2c2c33; --panel: #141417; --field: #1b1b1f; --head: var(--sans); --radius: 18px;
}
body[data-room="raenge"] {
  --bg: #0c090b; --fg: #f4ebd9; --dim: #ab9e89; --accent: #e2b85c; --on-accent: #1b1305;
  --card: rgba(23, 16, 15, .82); --line: rgba(226, 184, 92, .3); --panel: #1a1113; --field: #21171a; --head: var(--serif); --radius: 20px;
}
body[data-room="koerper"] {
  --bg: #05171a; --fg: #e8fbf9; --dim: #8fb7b6; --accent: #4fe3d6; --on-accent: #032326;
  --card: rgba(6, 26, 30, .68); --line: rgba(160, 255, 245, .16); --panel: #0a2327; --field: rgba(255, 255, 255, .07);
  --head: var(--round); --radius: 24px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: #000; color-scheme: dark; }
body {
  margin: 0; min-height: 100dvh; background: transparent; color: var(--fg);
  font: 16px/1.45 var(--sans); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
body.lock { overflow: hidden; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: .35; cursor: default; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

#view { position: relative; max-width: 560px; margin: 0 auto; padding: calc(var(--safe-t) + 22px) 16px calc(112px + var(--safe-b)); }
#view.enter { animation: enter .38s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Hintergrund je Raum: dein Foto, unverändert. Lesbarkeit kommt von dunklen Glasflächen hinter Text und Karten. */
#bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: var(--bg); }
#bg::before { content: ""; position: absolute; inset: 0; background-size: cover; background-position: center; }
body[data-room="plan"] #bg::before { background-image: url(../img/plan.webp); }
body[data-room="training"] #bg::before { background-image: url(../img/training.webp); }
body[data-room="raenge"] #bg::before { background-image: url(../img/raenge.webp); }
body[data-room="koerper"] #bg::before { background-image: url(../img/koerper.webp); }

/* Dunkle Glasflächen für alles, was direkt auf dem Foto steht */
.room-head, .hero, .unranked, .foot {
  background: rgba(8, 8, 10, .6); border: 1px solid var(--line); border-radius: 20px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.room-head { padding: 16px 18px; }
.hero { padding: 26px 16px 24px; margin-bottom: 14px; overflow: hidden; }
.unranked { padding: 14px 16px; }
.foot { padding: 10px 14px; }
.room-plan .room-head, .room-plan .foot { border-radius: 6px; }

/* Kopfbereich jedes Raums */
.room-head { margin-bottom: 20px; }
.eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); display: flex; align-items: center; gap: 10px; }
.title { font-family: var(--head); font-size: 34px; line-height: 1.05; margin: 8px 0 8px; }
.sub { color: var(--dim); font-size: 15px; }

.room-plan .eyebrow { font-family: var(--mono); }
.room-plan .eyebrow::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.room-plan .title { font-size: 28px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }

.room-training .eyebrow { font-weight: 800; }
.room-training .title { font-size: 48px; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -.02em; transform: skewX(-6deg); transform-origin: left; text-shadow: 0 0 28px rgba(255, 61, 46, .4); }

.room-raenge .room-head { text-align: center; }
.room-raenge .eyebrow { justify-content: center; font-family: var(--serif); letter-spacing: .32em; font-size: 11px; }
.room-raenge .title { font-size: 44px; font-style: italic; font-weight: 500; background: linear-gradient(180deg, #fff1c2, #d9a94b 55%, #8c6420); -webkit-background-clip: text; background-clip: text; color: transparent; }

.room-koerper .eyebrow { display: inline-flex; padding: 5px 12px; border-radius: 999px; background: rgba(79, 227, 214, .12); border: 1px solid var(--line); letter-spacing: .12em; font-size: 11px; }
.room-koerper .title { font-weight: 600; font-size: 36px; }

/* Karten */
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.card h3 { font-size: 18px; }
.card.empty h3, .card.notice h3 { margin-bottom: 6px; }
.card.empty .btn, .card.notice .btn { margin-top: 14px; }

.room-plan .card {
  --c: var(--accent);
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / 14px 2px no-repeat, linear-gradient(var(--c), var(--c)) 0 0 / 2px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / 14px 2px no-repeat, linear-gradient(var(--c), var(--c)) 100% 0 / 2px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / 14px 2px no-repeat, linear-gradient(var(--c), var(--c)) 0 100% / 2px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / 14px 2px no-repeat, linear-gradient(var(--c), var(--c)) 100% 100% / 2px 14px no-repeat,
    rgba(26, 20, 14, .8);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.room-koerper .card { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 10px 30px rgba(0, 0, 0, .18); }

/* Buttons und Felder */
.btn { display: block; width: 100%; min-height: 50px; padding: 12px 18px; border-radius: calc(var(--radius) - 4px); border: 1px solid var(--line); background: transparent; font-weight: 650; text-align: center; margin-top: 10px; }
.btn:first-child { margin-top: 0; }
.btn.small { min-height: 42px; padding: 8px 12px; font-size: 14px; }
.btn.primary, .btn.go { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn.ghost { color: var(--fg); }
.btn.danger { color: #ff8a80; border-color: rgba(255, 138, 128, .4); }
.btn.link { border: 0; color: var(--dim); min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.btn.wide { margin-top: 12px; }
.btn-row { display: grid; gap: 10px; margin-top: 12px; }
.btn-row .btn { margin: 0; }
.btn:active:not(:disabled) { transform: scale(.98); }
.room-training .btn.go { min-height: 58px; font-size: 18px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; font-style: italic; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset, 0 8px 28px rgba(255, 61, 46, .38); animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset, 0 8px 40px rgba(255, 61, 46, .62); } }
.room-raenge .btn.primary { background: linear-gradient(180deg, #f5d98a, #c9962f); }
.room-koerper .btn.primary { background: linear-gradient(135deg, #7ff0e6, #2fb8d6); }
.room-plan .btn { text-transform: uppercase; letter-spacing: .08em; font-family: var(--mono); font-size: 13px; }
.room-plan .btn.link { text-transform: none; }

.field { display: block; margin-top: 12px; }
.field > span { display: block; font-size: 13px; color: var(--dim); margin-bottom: 6px; }
.input { width: 100%; height: 50px; padding: 0 14px; border-radius: calc(var(--radius) - 4px); border: 1px solid var(--line); background: var(--field); color: var(--fg); font-size: 16px; }
.input.big { height: 62px; font-size: 28px; font-weight: 700; text-align: center; }
.input:focus, .num:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.stack > * + * { margin-top: 12px; }
.stack > .btn { margin-top: 10px; }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.error { color: #ff8a80; font-size: 14px; }
.error:empty { display: none; }
.foot { color: var(--dim); font-size: 12px; text-align: center; margin-top: 22px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: 14px; }
.chip.on { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 650; }
.chip.static { cursor: default; color: var(--dim); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.stepper button { width: 42px; height: 40px; border: 0; background: transparent; font-size: 22px; line-height: 1; }
.stepper span { padding: 0 10px; font-size: 14px; color: var(--dim); min-width: 84px; text-align: center; }
.stepper b { color: var(--fg); font-size: 17px; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--dim); white-space: nowrap; }
.ico { display: inline-flex; }
.ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.stat { text-align: center; padding: 12px 6px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.stat b { display: block; font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--dim); }
.hazard { height: 9px; border-radius: 3px; background: repeating-linear-gradient(-45deg, var(--accent) 0 10px, #0a0a0b 10px 20px); margin: 14px 0; opacity: .9; }
.badge { display: inline-flex; flex: none; }
.badge svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5)); }

/* Tab-Leiste */
#tabs { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--safe-b)); width: min(536px, calc(100% - 24px)); z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; border-radius: 26px; background: rgba(14, 14, 17, .74);
  backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4); border: 1px solid rgba(255, 255, 255, .09); box-shadow: 0 12px 40px rgba(0, 0, 0, .5); }
#tabs button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 6px; border: 0; border-radius: 20px; background: transparent; color: #8a8a93; font-size: 11px; transition: color .25s, background .25s; }
#tabs button.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
#tabs button.live::after { content: ""; position: absolute; top: 6px; right: calc(50% - 20px); width: 8px; height: 8px; border-radius: 50%; background: #c6ff3d; box-shadow: 0 0 10px #c6ff3d; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* Sheets, Toasts */
.sheet { position: fixed; inset: 0; z-index: 50; }
.backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); animation: fade .25s both; }
.panel { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(560px, 100%); max-height: 90dvh; overflow: auto; overscroll-behavior: contain;
  background: var(--panel); border: 1px solid var(--line); border-bottom: 0; border-radius: 26px 26px 0 0; padding: 10px 18px calc(22px + var(--safe-b)); animation: rise .32s cubic-bezier(.2, .9, .25, 1) both; }
@keyframes rise { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
@keyframes fade { from { opacity: 0; } }
.grab { width: 44px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .2); margin: 0 auto 10px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-head h2 { font-family: var(--head); font-size: 21px; }
.x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); font-size: 22px; line-height: 1; }
.picker { max-height: 52dvh; overflow: auto; margin: 0 -4px; padding: 0 4px; }
.picker-head { margin: 14px 0 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.pick { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; padding: 13px 12px; margin-top: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .03); }
.pick.new { border-style: dashed; color: var(--accent); }
.pick small { color: var(--dim); }
#toasts { position: fixed; left: 0; right: 0; top: calc(var(--safe-t) + 12px); z-index: 60; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { padding: 12px 18px; border-radius: 16px; background: #1b1b1f; border: 1px solid #34343b; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-weight: 650; font-size: 15px; animation: drop .35s cubic-bezier(.2, .9, .3, 1.2) both; max-width: 92vw; }
.toast.pr { border-color: #c6ff3d; color: #c6ff3d; box-shadow: 0 0 24px rgba(198, 255, 61, .3); }
.toast.rank { border-color: #ffd76a; color: #ffd76a; box-shadow: 0 0 30px rgba(255, 215, 106, .4); }
.toast.out { opacity: 0; transform: translateY(-10px); transition: .4s; }
@keyframes drop { from { opacity: 0; transform: translateY(-18px) scale(.94); } }

/* Raum 01: Atelier */
.day-head { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; row-gap: 2px; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; }
.day-no { grid-column: 1; font: 700 11px var(--mono); letter-spacing: .2em; color: var(--accent); }
.day-title { grid-column: 1; font: 700 20px var(--head); }
.day-meta { grid-column: 1; font-size: 13px; color: var(--dim); }
.chev { grid-column: 2; grid-row: 1 / 4; align-self: center; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font: 400 20px var(--mono); color: var(--accent); }
.day.open .day-head { margin-bottom: 4px; }
.ex-list { margin: 14px 0; border-top: 1px dashed var(--line); }
.ex-row { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.ex-top { display: flex; align-items: center; gap: 10px; }
.ex-no { font: 12px var(--mono); color: var(--accent); }
.ex-name { flex: 1; font-weight: 600; }
.ex-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.mini-actions { display: flex; gap: 6px; }
.mini-actions button { width: 42px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: transparent; }
.mini-actions .del { color: #ff8a80; }
.day-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.day-actions .btn { margin: 0; }
.day-actions .danger { grid-column: 1 / -1; }

/* Raum 02: Gym Floor */
.day-card { padding: 0; overflow: hidden; border-radius: var(--radius); }
.day-card .hazard { margin: 0; border-radius: 0; height: 7px; }
.day-card-body { padding: 16px 16px 18px; }
.day-card h3 { font-size: 30px; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -.01em; margin: 2px 0 6px; }
.day-card .day-no { font-family: var(--sans); font-weight: 800; }
.preview { color: var(--dim); font-size: 14px; }
.last { color: var(--dim); font-size: 13px; margin: 6px 0 14px; }
.last b { color: var(--fg); font-weight: 650; }
.room-head.live .clock { font: 900 44px var(--sans); font-style: italic; font-variant-numeric: tabular-nums; color: var(--accent); text-shadow: 0 0 24px rgba(255, 61, 46, .55); }
.live-bar { display: flex; align-items: baseline; justify-content: space-between; }
.progress-count { font-weight: 700; color: var(--dim); }
.rec { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: blink 1.2s infinite; }
.room-head.live .title { font-size: 34px; margin-bottom: 4px; }
.ex-head { display: flex; align-items: center; gap: 10px; }
.ex-head h3 { flex: 1; font-size: 19px; font-weight: 800; }
.mini-x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .06); color: var(--dim); }
.ex > .last { margin: 8px 0 12px; }
.set-head, .set { display: grid; grid-template-columns: 24px 76px 1fr 1fr 54px; gap: 6px; align-items: center; }
.set-head { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); text-align: center; padding-bottom: 6px; }
.set { margin-top: 8px; }
.set .n { font-weight: 800; color: var(--dim); text-align: center; }
.num { width: 100%; height: 54px; padding: 0 6px; text-align: center; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; border-radius: 14px; border: 2px solid #2a2a30; background: var(--field); color: var(--fg); }
.num::placeholder { color: #4d4d55; font-weight: 600; }
.check { width: 54px; height: 54px; border-radius: 14px; border: 2px solid #2a2a30; background: var(--field); color: #55555c; font-size: 26px; font-weight: 900; transition: .2s; }
.set.done .num { border-color: rgba(198, 255, 61, .5); color: var(--lime); }
.set.done .check { background: var(--lime); border-color: var(--lime); color: #0a0a0b; box-shadow: 0 0 20px rgba(198, 255, 61, .5); }
.set.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.ex-tools { display: flex; gap: 8px; margin-top: 12px; }
.ex-tools button { flex: 1; height: 42px; border-radius: 12px; border: 1px dashed #34343b; background: transparent; color: var(--dim); font-weight: 650; }
.ups { display: grid; gap: 10px; }
.ups li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .05); }
.ups li > span:last-child { display: grid; }
.ups small { color: var(--dim); }
.pr-dot { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(198, 255, 61, .15); color: #c6ff3d; }

/* Raum 03: Trophäenraum */
.hero { position: relative; text-align: center; padding: 22px 0 26px; margin-bottom: 8px; }
.hero .spot { position: absolute; left: 50%; top: -30px; width: 130%; height: 300px; transform: translateX(-50%); pointer-events: none;
  background: conic-gradient(from 158deg at 50% 0%, transparent 0, color-mix(in srgb, var(--rc) 34%, transparent) 22deg, transparent 44deg, transparent 360deg); filter: blur(8px); }
.hero .badge { position: relative; filter: drop-shadow(0 0 26px color-mix(in srgb, var(--rc) 60%, transparent)); animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.hero-label { position: relative; margin-top: 12px; font: 11px var(--serif); letter-spacing: .3em; text-transform: uppercase; color: var(--dim); }
.hero-rank { position: relative; font: italic 500 40px/1.1 var(--serif); color: var(--rc); text-shadow: 0 0 30px color-mix(in srgb, var(--rc) 45%, transparent); }
.hero-ex { position: relative; color: var(--dim); }
.plaque { display: flex; gap: 14px; width: 100%; text-align: left; align-items: center;
  border: 1px solid transparent;
  background: linear-gradient(160deg, #1d1416, #120c0e) padding-box, linear-gradient(135deg, #f7dc8a, #6f5019 45%, #f7dc8a 100%) border-box; }
.plaque-body { flex: 1; min-width: 0; }
.plaque-name { font: 600 18px var(--serif); }
.plaque-rank { font: italic 600 15px var(--serif); color: var(--rc); }
.plaque-best { font-size: 13px; color: var(--dim); margin: 2px 0 10px; }
.bar { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--rc) 60%, #000), var(--rc)); box-shadow: 0 0 10px var(--rc); }
.plaque-next { font-size: 12px; color: var(--dim); margin-top: 6px; }
.legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 6px; margin-top: 16px; }
.legend-item { display: grid; justify-items: center; gap: 4px; font: 12px var(--serif); color: var(--rc); text-align: center; }
.unranked { margin-top: 20px; }
.unranked h3 { font: italic 500 18px var(--serif); margin-bottom: 10px; color: var(--dim); }
.ladder { display: grid; gap: 8px; }
.ladder li { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line); }
.ladder-name { font: 600 16px var(--serif); color: var(--rc); }
.ladder-goal { font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
.ladder li.passed { opacity: .5; }
.ladder li.now { border-color: var(--rc); background: color-mix(in srgb, var(--rc) 12%, transparent); box-shadow: 0 0 20px color-mix(in srgb, var(--rc) 25%, transparent); }

/* Raum 04: Spa */
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.bw { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.bw-now b { font-size: 54px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.bw-now span { font-size: 20px; color: var(--dim); margin-left: 6px; }
.bw-meta { font-size: 13px; color: var(--dim); text-align: right; }
.up { color: #ffb86b; } .down { color: var(--accent); }
.spark { color: var(--accent); margin-top: 14px; height: 96px; }
.spark svg { width: 100%; height: 100%; display: block; }
.streak-row { display: flex; align-items: center; gap: 14px; }
.flame { width: 54px; height: 54px; display: grid; place-items: center; font-size: 28px; border-radius: 18px; background: radial-gradient(circle at 50% 70%, rgba(255, 160, 60, .35), rgba(255, 160, 60, .05)); }
.streak-n b { font-size: 30px; font-weight: 600; }
.goal { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 6px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--dim); font-size: 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 8px; font-weight: 600; }
.nav { width: 42px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; font-size: 22px; line-height: 1; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dow { text-align: center; font-size: 11px; color: var(--dim); padding-bottom: 2px; }
.cell { height: 38px; display: grid; place-items: center; border-radius: 14px; font-size: 14px; color: var(--dim); }
.cell.blank { visibility: hidden; }
.cell.trained { background: linear-gradient(135deg, #7ff0e6, #2fb8d6); color: var(--on-accent); font-weight: 700; box-shadow: 0 0 14px rgba(79, 227, 214, .4); }
.cell.today { outline: 2px solid rgba(255, 255, 255, .55); outline-offset: -2px; color: var(--fg); }
.cell.trained.today { color: var(--on-accent); }
h4 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin: 16px 0 10px; font-weight: 600; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 78px 1fr 26px; gap: 10px; align-items: center; font-size: 14px; }
.bar-n { text-align: right; font-variant-numeric: tabular-nums; }
.track { position: relative; height: 12px; border-radius: 8px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.track u { position: absolute; top: 0; bottom: 0; background: rgba(79, 227, 214, .14); }
.track i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 8px; background: rgba(160, 255, 245, .35); z-index: 1; }
.bar-row.ok i { background: linear-gradient(90deg, #4fe3d6, #7ff0e6); box-shadow: 0 0 12px rgba(79, 227, 214, .5); }
.bar-row.high i { background: linear-gradient(90deg, #ffb86b, #ff8a5c); }
.bars + .small { margin-top: 14px; }
.bar-row.none .bar-label, .bar-row.none .bar-n { color: var(--dim); opacity: .6; }

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

/* Letztes Training: eigene Spalte neben jedem Satz */
.prev { font-size: 13px; color: var(--dim); text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; padding: 4px 2px; border-radius: 10px; background: rgba(255, 255, 255, .04); line-height: 1.2; }
.prev b { color: var(--fg); font-size: 15px; font-weight: 800; }
.prev.none { opacity: .5; }
.set-head span:nth-child(2) { color: var(--fg); opacity: .8; }

/* Einseitig / Beidseitig */
.ex-side { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 10px 0 4px; }
.ex-side small { color: var(--dim); font-size: 12px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--dim); }
.seg button.on { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.ex > .ex-side { margin: 0 0 12px; }

@media (max-width: 359px) {
  .set-head, .set { grid-template-columns: 20px 66px 1fr 1fr 48px; gap: 4px; }
  .num { font-size: 20px; }
  .check { width: 48px; }
}

/* Tablet und Desktop: breiter, Karten nebeneinander */
@media (min-width: 640px) {
  #view { max-width: 680px; }
}
@media (min-width: 960px) {
  #view { max-width: 1080px; padding-left: 36px; padding-right: 36px; padding-top: calc(var(--safe-t) + 40px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; align-items: start; }
  #view > .room-head, #view > .hero, #view > .hazard, #view > .unranked, #view > .foot, #view > .plaques,
  #view > .card.empty, #view > .card.notice { grid-column: 1 / -1; }
  #view > .btn.wide { grid-column: 1 / -1; justify-self: center; width: min(460px, 100%); }
  #view > .room-head .sub { max-width: 640px; }
  .room-raenge .room-head .sub { margin-inline: auto; }
  .plaques { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; }
  .title { font-size: 40px; }
  .room-training .title { font-size: 60px; }
  .room-raenge .title { font-size: 56px; }
  .room-plan .title { font-size: 34px; }
  .room-head.live .clock { font-size: 56px; }
  .hero { padding-top: 34px; }
  .card { padding: 20px; }
  #tabs { width: 480px; bottom: 22px; }
  #tabs button { padding: 10px 0 8px; font-size: 12px; }
}
@media (min-width: 1280px) {
  #view { max-width: 1200px; }
}


/* Eingangsanimation: fake Ladescreen, dann öffnen sich zwei Metalltüren */
body.intro-on { overflow: hidden; }
#intro { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; color: #f5f5f6; overflow: hidden; }
#intro .door { position: absolute; top: 0; bottom: 0; width: 50.2%; transition: transform .85s cubic-bezier(.75, 0, .2, 1);
  background:
    radial-gradient(90% 60% at 100% 50%, rgba(255, 61, 46, .16), transparent 70%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .02) 0 2px, transparent 2px 7px),
    #08080a; }
#intro .door.l { left: 0; box-shadow: inset -2px 0 0 #ff3d2e, inset -14px 0 30px -10px rgba(255, 61, 46, .55); }
#intro .door.r { right: 0; box-shadow: inset 2px 0 0 #ff3d2e, inset 14px 0 30px -10px rgba(255, 61, 46, .55); }
#intro .door.r { background:
    radial-gradient(90% 60% at 0% 50%, rgba(255, 61, 46, .16), transparent 70%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .02) 0 2px, transparent 2px 7px),
    #08080a; }
.intro-core { position: relative; z-index: 2; width: min(340px, 84vw); text-align: center; transition: opacity .35s, transform .5s; }
#intro.open .intro-core { opacity: 0; transform: scale(1.12); }
#intro.open .door.l { transform: translateX(-101%); }
#intro.open .door.r { transform: translateX(101%); }
#intro.done { pointer-events: none; }

.intro-logo { width: 116px; height: 58px; fill: #fff; filter: drop-shadow(0 0 14px rgba(255, 61, 46, .85)) drop-shadow(0 0 40px rgba(255, 61, 46, .45));
  animation: logo-in .8s cubic-bezier(.2, 1.3, .3, 1) both; }
.intro-logo rect { animation: lift 1.6s ease-in-out .5s 1 both; transform-origin: center; transform-box: fill-box; }
@keyframes logo-in { from { opacity: 0; transform: scale(.4) rotate(-14deg); } to { opacity: 1; transform: none; } }
@keyframes lift { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-5px); } 60% { transform: translateY(0); } }

.intro-word { display: flex; justify-content: center; margin: 18px 0 22px; font: 900 40px/1 var(--sans); font-style: italic; letter-spacing: .06em; text-transform: uppercase; }
.intro-word span { display: inline-block; opacity: 0; transform: translateY(22px) skewX(-8deg);
  animation: letter .5s cubic-bezier(.2, .9, .3, 1) calc(.35s + var(--i) * .05s) both; text-shadow: 0 0 24px rgba(255, 61, 46, .5); }
@keyframes letter { to { opacity: 1; transform: translateY(0) skewX(-8deg); } }

.intro-rooms { display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; }
.intro-rooms i { font: normal 700 10px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: 6px 9px; border-radius: 999px; border: 1px solid #2b2b31; color: #55555d; transition: .35s; }
.intro-rooms i.on { color: var(--c); border-color: var(--c); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 55%, transparent); }
.intro-rooms i[data-room="plan"] { --c: #e0955f; } .intro-rooms i[data-room="training"] { --c: #ff3d2e; }
.intro-rooms i[data-room="raenge"] { --c: #e2b85c; } .intro-rooms i[data-room="koerper"] { --c: #4fe3d6; }

.intro-bar { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.intro-bar b { display: block; height: 100%; width: 100%; border-radius: 4px; transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, #ff3d2e, #ff8a3d); box-shadow: 0 0 14px #ff3d2e; }
.intro-status { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #8b8b94; font-variant-numeric: tabular-nums; }
.intro-pct { color: #f5f5f6; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  #intro .door { transition-duration: .01s; }
}
