/* NeuroFlow - Avalon-Look (wie die trailLion-Short-Overlays seit 12.9.2026):
   Navy-Glas-Kacheln, dünne 2-px-Eisblau-Linie mit weichem Glow, weiße fette Ziffern,
   führende Null gedimmt, Labels eisblau in Versalien, keine Panels, keine Schatten. Kein externer Font. */
:root {
  --navy: #06101f;               /* (6,16,34) Grund */
  --navy-2: #0a182e;             /* (10,24,46) Kachel */
  --glass: rgba(10,24,46,.82);
  --ice: #96dcff;                /* (150,220,255) Eisblau */
  --ice-line: rgba(160,222,255,.5);
  --ice-glow: rgba(140,215,255,.22);
  --ice-soft: rgba(150,220,255,.14);
  --white: #ecf6ff;              /* (236,246,255) Ziffern */
  --dim: #5f7da0;                /* (95,125,160) gedimmt */
  --muted: #7f9dbf;
  --text: #dbe9f5;
  --inhale: #96dcff;
  --exhale: #6f93bf;
  --hold: #ffffff;
  --recovery: #a9f2d9;
  --danger: #f28c8c;
  --r: 14px;
  --heavy: "Arial Black", "Helvetica Neue", Arial, system-ui, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--navy); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
body { position: fixed; inset: 0; overflow: hidden; }
#lattice { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; will-change: transform; transform-origin: 50% 50%; opacity: .7; }
.screen { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; padding: max(env(safe-area-inset-top), 12px) 20px max(env(safe-area-inset-bottom), 16px); overflow-y: auto; }
.screen[hidden] { display: none; }

/* Kopfzeile */
.top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.top-actions { display: flex; gap: 8px; }
.brand { font-family: var(--heavy); font-weight: 900; letter-spacing: .2em; font-size: 13px; color: var(--ice); display: flex; align-items: center; gap: 8px; text-transform: uppercase; }
.brand-mark { width: 9px; height: 9px; border-radius: 50%; background: var(--ice); box-shadow: 0 0 10px var(--ice); }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--ice-line); background: var(--glass); color: var(--ice); font-size: 17px; cursor: pointer; box-shadow: 0 0 14px var(--ice-glow); }
.icon-btn:active { transform: scale(.94); }

/* Layout */
.center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; width: 100%; max-width: 420px; margin: 0 auto; }
.center.top-align { justify-content: flex-start; padding-top: 18px; gap: 16px; }
.narrow { max-width: 420px; }
h1 { margin: 0; font-family: var(--heavy); font-weight: 900; font-size: 30px; letter-spacing: .14em; color: var(--white); text-transform: uppercase; text-shadow: 0 0 22px rgba(150,220,255,.35); }
h2 { margin: 0 0 4px; font-family: var(--heavy); font-weight: 900; font-size: 20px; letter-spacing: .1em; color: var(--ice); text-transform: uppercase; }
.sub { margin: -14px 0 0; font-family: var(--heavy); font-size: 11px; letter-spacing: .22em; color: var(--ice); text-transform: uppercase; opacity: .85; }

/* Ziffernkacheln (Avalon-Zählerbox) */
.tiles { display: inline-flex; gap: 5px; align-items: center; }
.tiles .t { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 44px; padding: 0 6px; border-radius: 8px; background: var(--navy-2); border: 2px solid var(--ice-line); box-shadow: 0 0 12px var(--ice-glow); font-family: var(--heavy); font-weight: 900; font-size: 26px; color: var(--white); line-height: 1; }
.tiles .t.dim { color: var(--dim); }
.tiles .sep { font-family: var(--heavy); font-weight: 900; font-size: 24px; color: var(--ice); margin: 0 1px; }
.tiles.lg .t { min-width: 46px; height: 60px; font-size: 36px; border-radius: 10px; }
.tiles.lg .sep { font-size: 32px; }
.facts { display: flex; width: 100%; justify-content: space-around; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.facts.sm .tiles .t { min-width: 26px; height: 36px; font-size: 20px; padding: 0 4px; border-radius: 7px; }
.facts.sm .tiles .sep { font-size: 18px; }
.facts.sm .tiles { gap: 3px; }
.facts > div { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.facts span { font-family: var(--heavy); font-size: 11px; letter-spacing: .16em; color: var(--ice); text-transform: uppercase; }

/* Home-Orb */
.hero-orb { width: 150px; height: 150px; border-radius: 50%; border: 2px solid var(--ice-line); box-shadow: 0 0 26px var(--ice-glow), inset 0 0 28px rgba(150,220,255,.1); display: grid; place-items: center; }
.hero-orb span { width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ffffff 0%, var(--ice) 45%, rgba(150,220,255,0) 72%); animation: heroPulse 4.5s ease-in-out infinite; }
@keyframes heroPulse { 0%,100% { transform: scale(.7); opacity: .7 } 50% { transform: scale(1.35); opacity: 1 } }

/* Buttons: Kachel-Stil, kein Fill */
.cta { width: 100%; padding: 17px; border-radius: var(--r); border: 2px solid var(--ice-line); background: var(--glass); color: var(--ice); font-family: var(--heavy); font-weight: 900; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; box-shadow: 0 0 20px var(--ice-glow); }
.cta.amber { color: var(--white); }
.cta:active { transform: scale(.97); }
.ghost { padding: 13px; border-radius: 12px; border: 2px solid rgba(160,222,255,.22); background: var(--glass); color: var(--muted); font-family: var(--heavy); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; width: 100%; }
.ghost.small { width: auto; padding: 8px 12px; font-size: 11px; }
.ghost.danger { color: var(--danger); }
.row { display: flex; gap: 12px; width: 100%; }
.row > * { flex: 1; }
.foot { display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--heavy); font-size: 9px; letter-spacing: .16em; color: var(--dim); text-transform: uppercase; padding-top: 12px; }
.foot a { color: var(--dim); }

/* Karten: Navy-Glas mit dünner Linie und Glow */
.card { width: 100%; background: var(--glass); border: 2px solid var(--ice-line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 0 22px var(--ice-glow); }
.card.warn { border-color: rgba(255,255,255,.45); box-shadow: 0 0 22px rgba(255,255,255,.12); }
.card.warn h2 { color: var(--white); }
.warnlist { margin: 0; padding-left: 18px; color: var(--text); font-size: 15px; line-height: 1.5; display: flex; flex-direction: column; gap: 8px; }
.plan { margin: 0; text-align: center; font-family: var(--heavy); font-size: 11px; letter-spacing: .14em; color: var(--ice); text-transform: uppercase; }
.card.best { align-items: center; gap: 10px; }
.card.best > span { font-family: var(--heavy); font-size: 11px; letter-spacing: .16em; color: var(--ice); text-transform: uppercase; }

/* Session */
.round { font-family: var(--heavy); font-size: 12px; letter-spacing: .16em; color: var(--ice); text-transform: uppercase; }
.session-center { gap: 12px; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.phase-title { margin: 0; font-family: var(--heavy); font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--ice); text-align: center; min-height: 26px; transition: color .6s; }
.orb-wrap { position: relative; width: min(78vw, 340px); aspect-ratio: 1; }
.orb-wrap::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(160,222,255,.28); box-shadow: 0 0 18px var(--ice-glow), inset 0 0 18px rgba(150,220,255,.06); pointer-events: none; }
.orb-body, .orb-glow, .orb-ring { position: absolute; border-radius: 50%; will-change: transform, opacity; }
.orb-body { width: 72%; height: 72%; left: 14%; top: 14%; }
.orb-glow { width: 120%; height: 120%; left: -10%; top: -10%; }
.orb-ring { width: 72%; height: 72%; left: 14%; top: 14%; border: 2px solid rgba(255,255,255,.85); opacity: 0; box-shadow: 0 0 22px rgba(255,255,255,.28), inset 0 0 26px rgba(255,255,255,.08); }
.orb-body i, .orb-glow i { position: absolute; inset: 0; border-radius: 50%; opacity: 0; will-change: opacity; }
.orb-body i { box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.orb-body .c0 { background: radial-gradient(circle at 36% 30%, #ffffff 0%, var(--inhale) 50%, #2a7fb0 100%); }
.orb-body .c1 { background: radial-gradient(circle at 36% 30%, #dfe9f5 0%, var(--exhale) 50%, #2d4a72 100%); }
.orb-body .c2 { background: radial-gradient(circle at 36% 30%, #ffffff 0%, #dfeeff 50%, #7fa6c8 100%); }
.orb-body .c3 { background: radial-gradient(circle at 36% 30%, #ffffff 0%, var(--recovery) 50%, #3f9c82 100%); }
.orb-glow .c0 { background: radial-gradient(circle, rgba(150,220,255,.55) 0%, rgba(150,220,255,.18) 40%, rgba(150,220,255,0) 70%); }
.orb-glow .c1 { background: radial-gradient(circle, rgba(111,147,191,.5) 0%, rgba(111,147,191,.16) 40%, rgba(111,147,191,0) 70%); }
.orb-glow .c2 { background: radial-gradient(circle, rgba(255,255,255,.5) 0%, rgba(255,255,255,.16) 40%, rgba(255,255,255,0) 70%); }
.orb-glow .c3 { background: radial-gradient(circle, rgba(169,242,217,.5) 0%, rgba(169,242,217,.16) 40%, rgba(169,242,217,0) 70%); }
.orb-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--heavy); font-weight: 900; pointer-events: none; text-align: center; }
.orb-text .big { font-size: 54px; line-height: 1; color: var(--white); -webkit-text-stroke: 1px rgba(6,16,34,.55); text-shadow: 0 0 16px rgba(6,16,34,.5); will-change: opacity; letter-spacing: .02em; }
.orb-text .big .dim { color: var(--dim); -webkit-text-stroke: 0; }
.orb-text .lbl { font-size: 11px; letter-spacing: .26em; color: var(--ice); margin-bottom: 10px; text-transform: uppercase; -webkit-text-stroke: 0; text-shadow: 0 0 8px rgba(6,16,34,.8); }
.orb-text .lbl:empty { display: none; }
.phase-hint { margin: 0; font-family: var(--heavy); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); text-align: center; min-height: 16px; }

/* Ergebnis: Balken eisblau, dünne Linie */
.bars { display: flex; align-items: flex-end; justify-content: center; gap: 14px; height: 140px; width: 100%; padding: 0 10px; }
.bars .bar { flex: 0 0 52px; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .bar i { display: block; width: 100%; border-radius: 6px; background: var(--navy-2); border: 2px solid var(--ice-line); box-shadow: 0 0 12px var(--ice-glow), inset 0 0 14px rgba(150,220,255,.12); min-height: 6px; }
.bars .bar b { font-family: var(--heavy); font-size: 13px; color: var(--white); }
.bars .bar span { font-family: var(--heavy); font-size: 10px; color: var(--ice); letter-spacing: .14em; }

/* Statistik */
.history { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 8px; }
.history li { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--glass); border: 2px solid rgba(160,222,255,.22); border-radius: 12px; padding: 12px 14px; font-family: var(--heavy); font-size: 12px; letter-spacing: .04em; }
.history li .d { color: var(--muted); }
.history li .h { color: var(--white); }
.history .empty { justify-content: center; color: var(--muted); }

/* Einstellungen */
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.setrow.col { flex-direction: column; align-items: stretch; }
.setrow b { display: block; font-family: var(--heavy); font-size: 12px; letter-spacing: .1em; color: var(--ice); text-transform: uppercase; }
.setrow span { display: block; font-size: 12px; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 38px; height: 38px; border-radius: 10px; border: 2px solid var(--ice-line); background: var(--navy-2); color: var(--ice); font-family: var(--heavy); font-size: 18px; cursor: pointer; }
.stepper button:disabled { opacity: .3; }
.stepper output { min-width: 44px; text-align: center; font-family: var(--heavy); font-size: 22px; color: var(--white); }
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; padding: 10px 6px; border-radius: 10px; border: 2px solid rgba(160,222,255,.22); background: var(--glass); color: var(--muted); cursor: pointer; display: flex; flex-direction: column; gap: 3px; font-family: var(--heavy); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.seg button small { font-family: var(--mono); font-size: 10px; opacity: .8; text-transform: none; letter-spacing: 0; }
.seg button.on { border-color: var(--ice-line); color: var(--white); box-shadow: 0 0 14px var(--ice-glow); }
.switch { appearance: none; width: 48px; height: 28px; border-radius: 999px; background: var(--navy-2); border: 2px solid rgba(160,222,255,.25); position: relative; cursor: pointer; flex-shrink: 0; transition: border-color .2s, box-shadow .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--dim); transition: transform .2s, background .2s, box-shadow .2s; }
.switch:checked { border-color: var(--ice-line); box-shadow: 0 0 12px var(--ice-glow); }
.switch:checked::after { transform: translateX(20px); background: var(--ice); box-shadow: 0 0 8px var(--ice); }
input[type=range] { width: 130px; accent-color: var(--ice); }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .hero-orb span { animation: none; } }
@media (min-width: 720px) { h1 { font-size: 36px; } .orb-wrap { width: 360px; } }

/* fit.traillion.at-Anbindung */
.fitform { display: flex; flex-direction: column; gap: 10px; }
.input { width: 100%; padding: 12px 14px; border-radius: 10px; border: 2px solid rgba(160,222,255,.3); background: var(--navy-2); color: var(--white); font-family: var(--mono); font-size: 14px; }
.input::placeholder { color: var(--dim); }
#fit-msg:empty { display: none; }
