/* Zeiterfassung CAT marketing – vier Designs über html[data-design]:
   frost (Mattglas silberblau) · carbon (Schwarz mit CAT-Blau)
   Alle Farben als Tokens; Bausteine nutzen nur Tokens. */

/* ================= Grund-Tokens (Frost) ================= */
:root {
  --ease: cubic-bezier(.32,.72,0,1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --num-weight: 200;
  --title-weight: 300;
  --radius: 28px;
  --radius-sm: 18px;
  --blur: 22px;

  --bg-solid: #C7D3DF;
  --bg-paint: linear-gradient(160deg, #DCE5EE 0%, #B9C8D7 55%, #A3B5C7 100%);
  --blob-1: #7F9CBB; --blob-2: #F2F6FA; --blob-3: #4E6C8C;
  --ink: #0F1D2B; --ink-2: #2A3B4D; --muted: #5A6C80;
  --card: rgba(255,255,255,.42); --card-strong: rgba(246,249,252,.86); --card-border: rgba(255,255,255,.65);
  --card-shadow: 0 10px 30px rgba(30,52,78,.14);
  --line: rgba(15,29,43,.12); --line-2: rgba(15,29,43,.07);
  --pri: #111A24; --pri-fg: #FFFFFF;
  --hero: #FFFFFF; --hero-fg: #111A24;
  --accent: #FFFFFF; --accent-2: rgba(255,255,255,.35); --tick: rgba(15,29,43,.35); --tick-strong: #0F1D2B; --accent-glow: rgba(255,255,255,.9);
  --pos: #11663B; --neg: #A52A20;
  --warn-bg: rgba(255,236,190,.65); --warn-border: rgba(214,170,70,.45); --warn: #6E4A00;
  --miss-bg: rgba(255,214,208,.6); --miss-border: rgba(200,80,66,.35); --miss: #8E2418;
  --ok-bg: rgba(206,236,217,.7); --ok-fg: #12553A;
  --we-bg: rgba(255,255,255,.18);
  --link: #1F4E86;
  --input-bg: rgba(255,255,255,.6); --input-border: rgba(15,29,43,.18); --focus: #1F4E86;
  --header-fg: #0F1D2B;
  --tabs-bg: rgba(255,255,255,.55);
  --fade: #A3B5C7;
  --code-u-bg: rgba(200,222,250,.8); --code-u-fg: #1C4A86;
  --code-k-bg: rgba(250,214,210,.8); --code-k-fg: #8A281F;
  --code-bs-bg: rgba(228,216,250,.8); --code-bs-fg: #553290;
  --code-a-bg: rgba(206,236,217,.8); --code-a-fg: #14573A;
  --shadow: rgba(20,35,55,.25); --backdrop: rgba(70,90,115,.28);
  --toast-bg: #111A24;
  color-scheme: light;
}

/* ================= Carbon ================= */
:root[data-design="carbon"] {
  --num-weight: 200; --title-weight: 300;
  --bg-solid: #06080C;
  --bg-paint: radial-gradient(120% 60% at 50% -10%, rgba(0,171,168,.20) 0%, rgba(6,8,12,0) 60%), #06080C;
  --blob-1: rgba(0,171,168,.38); --blob-2: rgba(70,110,170,.22); --blob-3: rgba(0,171,168,.14);
  --ink: #F2F4F8; --ink-2: #C9CED8; --muted: #8C95A6;
  --card: rgba(255,255,255,.045); --card-strong: rgba(16,19,26,.92); --card-border: rgba(0,171,168,.24);
  --card-shadow: 0 0 0 1px rgba(255,255,255,.02), 0 18px 40px rgba(0,0,0,.45);
  --line: rgba(255,255,255,.10); --line-2: rgba(255,255,255,.06);
  --pri: #00ABA8; --pri-fg: #021A19;
  --hero: #00ABA8; --hero-fg: #021A19;
  --accent: #1CC3BF; --accent-2: rgba(0,171,168,.16); --tick: rgba(255,255,255,.22); --tick-strong: #1CC3BF; --accent-glow: rgba(28,195,191,.75);
  --pos: #6FD39A; --neg: #FF8F84;
  --warn-bg: rgba(229,176,79,.10); --warn-border: rgba(229,176,79,.35); --warn: #F2C873;
  --miss-bg: rgba(255,110,95,.09); --miss-border: rgba(255,110,95,.35); --miss: #FF9C92;
  --ok-bg: rgba(111,211,154,.1); --ok-fg: #8FE0AE;
  --we-bg: rgba(255,255,255,.02);
  --link: #5FD9D6;
  --input-bg: rgba(255,255,255,.04); --input-border: rgba(255,255,255,.16); --focus: #1CC3BF;
  --header-fg: #F2F4F8;
  --tabs-bg: rgba(14,17,23,.86);
  --fade: #06080C;
  --code-u-bg: rgba(110,160,240,.15); --code-u-fg: #A9CBF5;
  --code-k-bg: rgba(255,120,110,.14); --code-k-fg: #FFB2AA;
  --code-bs-bg: rgba(180,140,255,.15); --code-bs-fg: #CDB5F5;
  --code-a-bg: rgba(111,211,154,.13); --code-a-fg: #8FE0AE;
  --shadow: rgba(0,0,0,.6); --backdrop: rgba(0,0,0,.55);
  --toast-bg: #00ABA8;
  color-scheme: dark;
}

/* ================= Plasma ================= */
:root[data-design="plasma"] {
  --num-weight: 600; --title-weight: 500;
  --bg-solid: #030504;
  --bg-paint: radial-gradient(90% 40% at 50% -8%, rgba(0,171,168,.10) 0%, rgba(3,5,4,0) 70%), radial-gradient(70% 40% at 100% 105%, rgba(70,200,120,.08) 0%, rgba(3,5,4,0) 70%), #030504;
  --blob-1: rgba(0,171,168,.14); --blob-2: rgba(60,200,120,.08); --blob-3: rgba(0,120,110,.08);
  --ink: #F1F7F5; --ink-2: #C9D8D4; --muted: #87A29C;
  --card: rgba(255,255,255,.05); --card-strong: rgba(12,18,17,.94); --card-border: rgba(120,255,220,.14);
  --card-shadow: 0 18px 40px rgba(0,0,0,.45);
  --line: rgba(255,255,255,.10); --line-2: rgba(255,255,255,.06);
  --pri: #2CE5C9; --pri-fg: #03201B;
  --hero: #FFFFFF; --hero-fg: #0B1513;
  --accent: #2CE5C9; --accent-2: rgba(44,229,201,.14); --tick: rgba(255,255,255,.22); --tick-strong: #2CE5C9; --accent-glow: rgba(44,229,201,.8);
  --pos: #7CF29A; --neg: #FF8F84;
  --warn-bg: rgba(255,196,90,.10); --warn-border: rgba(255,196,90,.35); --warn: #FFD27A;
  --miss-bg: rgba(255,110,95,.09); --miss-border: rgba(255,110,95,.35); --miss: #FF9C92;
  --ok-bg: rgba(124,242,154,.1); --ok-fg: #9BF5B4;
  --we-bg: rgba(255,255,255,.02);
  --link: #6EF0DA;
  --input-bg: rgba(255,255,255,.05); --input-border: rgba(255,255,255,.16); --focus: #2CE5C9;
  --header-fg: #F1F7F5;
  --tabs-bg: rgba(12,18,17,.86);
  --fade: #030504;
  --code-u-bg: rgba(110,160,240,.15); --code-u-fg: #A9CBF5;
  --code-k-bg: rgba(255,120,110,.14); --code-k-fg: #FFB2AA;
  --code-bs-bg: rgba(180,140,255,.15); --code-bs-fg: #CDB5F5;
  --code-a-bg: rgba(124,242,154,.13); --code-a-fg: #9BF5B4;
  --shadow: rgba(0,0,0,.6); --backdrop: rgba(0,0,0,.55);
  --toast-bg: #2CE5C9;
  color-scheme: dark;
}

/* ================= Grundlagen ================= */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 17px; line-height: 1.35; color: var(--ink); background: var(--bg-solid);
  -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
a { color: var(--link); }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.pos { color: var(--pos); } .neg { color: var(--neg); } .muted { color: var(--muted); }
.ic { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mt0 { margin-top: 0 !important; } .mt10 { margin-top: 10px; } .mt12 { margin-top: 12px; } .m0 { margin: 0; }

/* Hintergrund: Verlauf + weich treibende Lichtflecken */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg-paint); }
.bg i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .85; animation: drift 26s ease-in-out infinite alternate; }
.bg i:nth-child(1) { width: 70vmax; height: 70vmax; left: -30vmax; top: -25vmax; background: var(--blob-1); }
.bg i:nth-child(2) { width: 55vmax; height: 55vmax; right: -25vmax; top: 20vh; background: var(--blob-2); animation-duration: 32s; animation-delay: -8s; }
.bg i:nth-child(3) { width: 60vmax; height: 60vmax; left: -10vmax; bottom: -35vmax; background: var(--blob-3); animation-duration: 38s; animation-delay: -16s; }
[data-design="carbon"] .bg i, [data-design="plasma"] .bg i { opacity: .5; filter: blur(80px); }
[data-design="carbon"] .bg::after { content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 28px 28px; -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 0%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 20%, #000 0%, transparent 75%); }
@keyframes drift { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(6vmax,4vmax) scale(1.08); } 100% { transform: translate(-4vmax,8vmax) scale(.95); } }

/* Glas */
.glass, .card, .tile, .days, .tabs, .todo, .dsg-menu, .pop, .ctl {
  background: var(--card); border: 1px solid var(--card-border); box-shadow: var(--card-shadow);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%); backdrop-filter: blur(var(--blur)) saturate(150%);
}

/* ================= Rahmen ================= */
.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; color: var(--header-fg); }
[data-design="plasma"] .top { background: linear-gradient(#030504 60%, rgba(3,5,4,0)); }
[data-design="carbon"] .top { background: linear-gradient(#06080C 60%, rgba(6,8,12,0)); }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand .mark { display: flex; width: 38px; height: 38px; }
.brand .mark svg { width: 38px; height: 38px; }
/* CAT-Logo-Symbol: Rahmen immer im Logo-Blau, das „Λ“ in Schriftfarbe (hell auf dunklem Grund) */
.lf { fill: none; stroke: #00ABA8; stroke-width: 48; }
.la { fill: none; stroke: currentColor; stroke-width: 56; stroke-linecap: round; stroke-linejoin: round; }
[data-design="frost"] .brand .mark { color: #3C3C3B; }
.login .logo { display: block; width: 72px; height: 72px; margin: 0 0 18px; color: var(--ink); }
.brand .word { display: flex; flex-direction: column; line-height: 1.12; letter-spacing: .16em; font-size: 11.5px; font-weight: 600; }
.brand .word span { opacity: .7; font-weight: 500; }
.top .sp { flex: 1; }
.who { font-weight: 600; font-size: 15.5px; }
.dsg { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 600;
  color: inherit; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
[data-design="frost"] .dsg { background: rgba(255,255,255,.45); border-color: rgba(255,255,255,.8); }
.net { margin: 0 16px; padding: 8px 14px; border-radius: 14px; background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-border); font-size: 15px; }
main { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 8px 16px calc(150px + env(safe-area-inset-bottom)); }
.page-msg { padding: 40px 0; text-align: center; color: var(--muted); }

/* Dunkler Verlauf hinter der schwebenden Leiste: Inhalte blenden darunter weich aus */
.app::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; pointer-events: none;
  height: calc(150px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--fade) 0%, var(--fade) 38%, color-mix(in srgb, var(--fade) 75%, transparent) 62%, transparent 100%); }
/* Schwebende Navigationsleiste mit gleitender Markierung */
.tabs { position: fixed; z-index: 6; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; padding: 6px; border-radius: 999px; background: var(--tabs-bg); width: min(360px, calc(100vw - 32px)); }
.tabs a { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-height: 56px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 12.5px; font-weight: 600; transition: color .3s; }
.tabs a.on { color: var(--hero-fg); }
.tabs .ind { position: absolute; z-index: 0; top: 6px; bottom: 6px; left: 6px; width: 0; border-radius: 999px; background: var(--hero);
  box-shadow: 0 4px 14px var(--shadow); transition: transform .6s var(--ease), width .6s var(--ease); }

/* ================= Bausteine ================= */
h1 { font-size: 30px; line-height: 1.1; margin: 4px 0 4px; font-weight: var(--title-weight); letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 26px 4px 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sub { color: var(--muted); margin: 0 0 16px; }
.card { border-radius: var(--radius); padding: 18px; }
.card + .card { margin-top: 12px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.eyebrow { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px;
  border: 1px solid var(--input-border); border-radius: 999px; background: transparent; color: var(--ink); font-weight: 600; font-size: 16.5px;
  cursor: pointer; text-decoration: none; transition: transform .35s var(--ease), background .2s, opacity .2s; }
.btn:active, .chip:active, .ctl button:active, .day:active, .todo:active { transform: scale(.97); }
.btn.pri { background: var(--pri); border-color: var(--pri); color: var(--pri-fg); }
.btn.gold { background: var(--hero); border-color: var(--hero); color: var(--hero-fg); }
.btn.danger { color: var(--neg); }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: .4; cursor: default; transform: none; }
.btn.link { border: 0; background: none; min-height: 44px; padding: 0 6px; color: var(--link); }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btns .btn { flex: 1 1 auto; }
.chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-top: 12px; }
.chip { min-height: 48px; border: 1px solid var(--input-border); border-radius: 999px; background: transparent; font-weight: 600; cursor: pointer;
  transition: transform .35s var(--ease); }

label.f { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 6px 4px; letter-spacing: .04em; text-transform: uppercase; }
input.in, select.in { width: 100%; min-height: 54px; padding: 8px 16px; border: 1px solid var(--input-border); border-radius: var(--radius-sm);
  background: var(--input-bg); font-size: 20px; }
input[type="time"].in { font-variant-numeric: tabular-nums; -webkit-appearance: none; appearance: none; text-align: left; font-weight: 500; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 .full { grid-column: 1 / -1; }
.calc { font-size: 15.5px; color: var(--muted); margin-top: 12px; }
.calc b { color: var(--ink); font-size: 19px; }

.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; padding: 4px; border-radius: 999px; background: var(--line-2); }
.seg .seg-ind { position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 999px; background: var(--hero); box-shadow: 0 2px 8px var(--shadow);
  transition: transform .55s var(--ease), width .55s var(--ease); }
.seg button { position: relative; z-index: 1; min-height: 44px; border: 0; border-radius: 999px; background: transparent; font-weight: 600; font-size: 15px;
  cursor: pointer; color: var(--muted); transition: color .3s; }
.seg button.on { color: var(--hero-fg); }
.pchips { display: flex; gap: 6px; margin-top: 8px; }
.pchips button { flex: 1; min-height: 40px; border: 1px solid var(--input-border); border-radius: 999px; background: transparent; font-size: 15px; cursor: pointer;
  transition: background .2s, color .2s; }
.pchips button.on { background: var(--hero); color: var(--hero-fg); border-color: var(--hero); font-weight: 700; }

.warns { list-style: none; margin: 10px 0 0; padding: 0; }
.warns li { padding: 10px 14px; border-radius: 16px; background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-border); font-size: 15px; }
.warns li + li { margin-top: 6px; }
.note { padding: 12px 14px; border-radius: 16px; background: var(--line-2); color: var(--ink-2); font-size: 15.5px; }
.note.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-border); }
.note.ok { background: var(--ok-bg); color: var(--ok-fg); }
.note.ok a { color: inherit; font-weight: 700; }
.note.bad { background: var(--miss-bg); color: var(--miss); border: 1px solid var(--miss-border); }

/* ================= Heute: Ring ================= */
.hello { margin: 6px 4px 0; }
.hello .sub { margin-top: 2px; }
.dial { position: relative; width: min(84vw, 330px); aspect-ratio: 1; margin: 10px auto 0; }
.dial svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dial .track { fill: none; stroke: var(--accent-2); stroke-width: 10; }
.dial .prog { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.6s var(--ease);
  filter: drop-shadow(0 0 6px var(--accent-glow)); }
.dial .over { fill: none; stroke: var(--pos); stroke-width: 10; stroke-linecap: round; opacity: .9; transition: stroke-dashoffset 1.6s var(--ease); }
.dial .tk { stroke: var(--tick); stroke-width: 1.4; stroke-linecap: round; }
.dial .tk.big { stroke: var(--tick-strong); stroke-width: 2.2; }
.dial .knob { fill: var(--accent); filter: drop-shadow(0 0 8px var(--accent-glow)); transition: transform 1.6s var(--ease); }
.dial .ring2 { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 7; }
.dial .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.dial .center .lab { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.dial .center .big { font-size: clamp(54px, 17vw, 74px); font-weight: var(--num-weight); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin: 6px 0 4px; }
.dial .center .big small { font-size: .32em; font-weight: 400; letter-spacing: 0; color: var(--muted); margin-left: 4px; }
.dial .center .meta { font-size: 15px; color: var(--ink-2); }
.dial .center .live { display: inline-flex; align-items: center; gap: 6px; }
.pulse { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 0 var(--pos); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pos) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }

/* Bedienleiste unter dem Ring (wie im Beispiel: links · großer Knopf · rechts) */
.ctl { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: min(100%, 330px); margin: 14px auto 0; padding: 8px; border-radius: 999px; }
.ctl button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: transparent; cursor: pointer;
  color: var(--ink); font-size: 12.5px; font-weight: 600; transition: transform .35s var(--ease); }
.ctl .side { width: 74px; height: 64px; border-radius: 999px; }
.ctl .side .ic { width: 24px; height: 24px; }
.ctl .main { width: 92px; height: 92px; border-radius: 50%; background: var(--hero); color: var(--hero-fg); font-size: 14px;
  box-shadow: 0 10px 26px var(--shadow), 0 0 0 6px color-mix(in srgb, var(--hero) 22%, transparent); }
.ctl .main .ic { width: 30px; height: 30px; }
.ctl .main.stop { background: var(--pri); color: var(--pri-fg); }
.ctl.one { padding: 6px; }
.zeit { display: flex !important; flex-direction: row !important; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 6px 18px 6px 6px !important;
  border-radius: 999px; background: var(--hero) !important; color: var(--hero-fg) !important; text-align: left; box-shadow: 0 8px 22px var(--shadow); }
.zeit .zi { width: 60px; height: 60px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--hero-fg); color: var(--hero); }
.zeit .zi .ic { width: 26px; height: 26px; }
.zeit .zt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.zeit .zt b { font-size: 19px; font-weight: 600; }
.zeit .zt small { font-size: 14px; color: inherit; opacity: .72; font-weight: 500; }
.zeit .za { opacity: .5; display: flex; }
.hint-line { text-align: center; color: var(--muted); font-size: 14px; margin-top: 10px; }

/* Start/Ende als große Zahlen (wie Bild 3) */
.se { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border-radius: var(--radius); padding: 18px 20px; margin-top: 14px; }
.se .k { font-size: 14px; color: var(--muted); }
.se .v { font-size: 40px; font-weight: var(--num-weight); font-variant-numeric: tabular-nums; line-height: 1.1; letter-spacing: -.01em; }
.se .foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; color: var(--ink-2); font-size: 15px; border-top: 1px solid var(--line); padding-top: 10px; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { border-radius: var(--radius-sm); padding: 12px 14px; }
.tile .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.tile .v { font-size: clamp(19px, 6.4vw, 26px); white-space: nowrap; font-weight: var(--num-weight); font-variant-numeric: tabular-nums; margin-top: 2px; letter-spacing: -.01em; }
[data-design="frost"] .tile .v, [data-design="carbon"] .tile .v { font-weight: 300; }
dialog .tile { padding: 10px 12px; }
dialog .tile .v { font-size: clamp(17px, 5.2vw, 22px); }
.todo { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 12px 16px; border-radius: var(--radius-sm);
  color: var(--miss); border-color: var(--miss-border); font-weight: 600; text-align: left; cursor: pointer; transition: transform .35s var(--ease); }
.todo + .todo { margin-top: 8px; }
.todo.warn { color: var(--warn); border-color: var(--warn-border); }

/* ================= Plasma: Ring-Karte und Blöcke ================= */
.hero { position: sticky; top: calc(58px + env(safe-area-inset-top)); z-index: 0; height: min(112vw, 440px); margin-top: 0; }
/* Ring frei auf dem Hintergrund; Zeichenfläche bis an den Bildrand, damit Funken nicht abgeschnitten wirken */
.hero canvas { position: absolute; top: -24px; bottom: -24px; left: -16px; right: -16px; width: calc(100% + 32px); height: calc(100% + 48px); pointer-events: none; }
.hero ~ * { position: relative; z-index: 1; }
/* dunkler Hof hinter dem Ring */
.hero::before { content: ""; position: absolute; left: -16px; right: -16px; top: -30px; bottom: -30px; pointer-events: none;
  background: radial-gradient(closest-side, #000 0%, rgba(0,0,0,.85) 55%, rgba(0,0,0,0) 100%); }
.hero-top { position: absolute; z-index: 1; left: 18px; right: 18px; top: 18px; display: flex; justify-content: space-between; align-items: center; }
.ava { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; letter-spacing: .03em;
  color: #03201B; background: linear-gradient(135deg, #2CE5C9, #7CF29A); box-shadow: 0 0 22px rgba(44,229,201,.45); }
.hero-date { padding: 9px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(5,10,9,.45); font-size: 12.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hero-mid { position: absolute; z-index: 1; left: 0; right: 0; top: 46%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; text-align: center; pointer-events: none; }
.hero-lab { font-size: 15px; font-weight: 500; color: var(--ink-2); }
.hero-num { font-size: clamp(46px, 14vw, 62px); font-weight: 600; line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 28px rgba(44,229,201,.4); }
.hero-num.word { font-size: clamp(30px, 9vw, 40px); letter-spacing: -.01em; margin: 6px 0 4px; }
.hero-pill { position: absolute; z-index: 1; left: 50%; bottom: 36px; transform: translateX(-50%); white-space: nowrap; padding: 3px 9px; border-radius: 999px;
  border: 1px solid rgba(124,242,190,.7); background: rgba(6,24,21,.7); font-weight: 600; font-size: 11.5px; letter-spacing: .02em; color: var(--ink);
  box-shadow: 0 0 10px rgba(44,229,201,.25); }
.ruler { position: absolute; z-index: 1; left: 22%; right: 22%; bottom: 6px; height: 30px; }
.ruler svg { width: 100%; height: 100%; overflow: visible; }
.ruler .rt { stroke: rgba(255,255,255,.22); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ruler .rt.on { stroke: #7CF2D0; filter: drop-shadow(0 0 3px rgba(44,229,201,.9)); }
.ruler .rm { stroke: rgba(124,242,190,.85); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.ruler .rl { fill: rgba(255,255,255,.38); font-size: 8px; font-family: var(--font); }

.blocks { display: grid; gap: 12px; margin-top: 12px; }
.blk-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.blk { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; min-height: 172px; padding: 22px 20px 20px;
  border-radius: 34px; border: 1px solid rgba(255,255,255,.08); color: #FFFFFF; text-align: left; cursor: pointer; font: inherit;
  background-size: 220% 220%; animation: blkflow 16s ease-in-out infinite alternate; transition: transform .35s var(--ease); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.blk:active { transform: scale(.97); }
.blk-t { font-size: 31px; font-weight: 500; line-height: 1.04; letter-spacing: -.015em; }
.blk-row .blk-t { font-size: 25px; }
.blk-row .blk { min-height: 176px; justify-content: flex-end; gap: 12px; padding: 60px 16px 16px; }
.blk-row .blk-t { font-size: 24px; hyphens: manual; }
.blk-row .blk-f { flex-wrap: nowrap; }
.blk-row .pillw { font-size: 13px; padding: 6px 11px; }
.blk-row .arr { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; }
.blk-f { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pillw { padding: 8px 14px; border-radius: 999px; background: #FFFFFF; color: #0B1513; font-weight: 600; font-size: 15px; white-space: nowrap; }
.arr { width: 40px; height: 40px; flex: none; border-radius: 50%; background: #FFFFFF; color: #0B1513; display: inline-flex; align-items: center; justify-content: center; }
.arr .ic { width: 20px; height: 20px; stroke-width: 2; }
.blk-main { min-height: 0; background-image: radial-gradient(90% 80% at 88% 8%, rgba(255,255,255,.38), transparent 55%), radial-gradient(80% 90% at 0% 100%, #064C42 0%, transparent 70%), linear-gradient(135deg, #2CE5C9 0%, #13A894 40%, #0A6B5E 100%); }
.blk-main.stop { background-image: radial-gradient(90% 80% at 88% 8%, rgba(255,255,255,.28), transparent 55%), radial-gradient(80% 90% at 0% 100%, #3A0F18 0%, transparent 70%), linear-gradient(135deg, #13A894 0%, #0E5D58 45%, #1B2A33 100%); }
.blk-a { color: #0B2414; background-image: radial-gradient(80% 70% at 20% 0%, rgba(255,255,255,.55), transparent 60%), linear-gradient(160deg, #B6F5C0 0%, #5BC27F 50%, #22713F 100%); }
.blk-a .pillw, .blk-a .arr { background: rgba(255,255,255,.92); }
.blk-b { background-image: radial-gradient(70% 70% at 85% 10%, #0B4D27 0%, transparent 70%), radial-gradient(90% 80% at 0% 100%, #9BE8AE 0%, transparent 65%), linear-gradient(140deg, #3FAE63 0%, #17703A 60%, #0B3F21 100%); }
.blk-c { min-height: 150px; background-image: radial-gradient(90% 80% at 50% 125%, rgba(160,86,52,.6), transparent 70%), radial-gradient(70% 60% at 100% 0%, rgba(44,229,201,.08), transparent 70%), linear-gradient(180deg, #1B201F, #161A19); }
.blk-c .arr { background: rgba(255,255,255,.08); color: #FFFFFF; border: 1px solid rgba(255,255,255,.18); }
.blk-c .pillw { background: rgba(255,255,255,.1); color: var(--ink-2); }
.blk-s { min-height: 120px; background-image: radial-gradient(80% 80% at 100% 0%, rgba(205,181,245,.35), transparent 60%), linear-gradient(140deg, #3B2A66 0%, #1F1838 100%); }
.blk-zeit { min-height: 0; gap: 14px; padding: 20px 20px 18px; }
.blk-zeit .blk-t { font-size: 27px; }
@keyframes blkflow { 0% { background-position: 0% 0%; } 100% { background-position: 100% 100%; } }

/* ================= Monat ================= */
.mhead { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; }
.mhead h1 { flex: 1; text-align: center; margin: 0; font-size: 25px; }
.ibtn { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--card-border); border-radius: 50%;
  background: var(--card); color: var(--ink); cursor: pointer; -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); transition: transform .35s var(--ease); }
.ibtn:active { transform: scale(.9); }
.ibtn:disabled { opacity: .35; }
.days { margin-top: 14px; border-radius: var(--radius); overflow: hidden; }
.day { display: grid; grid-template-columns: 50px 1fr auto; align-items: center; gap: 10px; width: 100%; min-height: 60px; padding: 9px 16px;
  border: 0; border-top: 1px solid var(--line-2); background: transparent; color: var(--ink); text-align: left; cursor: pointer;
  transition: transform .35s var(--ease), background .2s; }
.day:first-child { border-top: 0; }
.day.we, .day.hol { background: var(--we-bg); }
.day.today { box-shadow: inset 3px 0 0 var(--accent); }
[data-design="frost"] .day.today { box-shadow: inset 3px 0 0 var(--ink); }
.day.fut { color: var(--muted); }
.day .d { font-size: 12.5px; color: var(--muted); font-weight: 600; line-height: 1.1; }
.day .d b { display: block; font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; font-weight: var(--num-weight); }
[data-design="frost"] .day .d b, [data-design="carbon"] .day .d b { font-weight: 300; }
.day.fut .d b { color: var(--muted); }
.day .m { min-width: 0; }
.day .m .t { font-variant-numeric: tabular-nums; font-weight: 600; }
.day .m small { display: block; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day .h { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
.day .h small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.day.miss .m .t { color: var(--miss); }
.day .hw { grid-column: 2 / -1; font-size: 14px; color: var(--warn); display: flex; gap: 6px; align-items: flex-start; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.b-A { background: var(--code-a-bg); color: var(--code-a-fg); }
.b-U { background: var(--code-u-bg); color: var(--code-u-fg); }
.b-K { background: var(--code-k-bg); color: var(--code-k-fg); }
.b-BS { background: var(--code-bs-bg); color: var(--code-bs-fg); }
.wait { color: var(--warn); font-size: 13px; font-weight: 600; }

/* ================= Dialog (Glas, Hintergrund verschwimmt) ================= */
dialog { position: fixed; inset: 0; z-index: 60; height: fit-content; width: min(560px, calc(100vw - 24px)); max-width: 100vw; max-height: 86vh; margin: auto; padding: 0;
  border: 1px solid var(--card-border); border-radius: calc(var(--radius) + 4px); background: var(--card-strong); color: var(--ink);
  box-shadow: 0 30px 80px var(--shadow); -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%); overflow: hidden; }
dialog:focus { outline: none; }
#dlgBody { padding: 20px 18px 18px; overflow-y: auto; max-height: 86vh; }
/* Hintergrund wird grau und unscharf (wie im Video) */
.dscrim { position: fixed; inset: 0; z-index: 55; background: var(--backdrop);
  -webkit-backdrop-filter: blur(16px) saturate(35%); backdrop-filter: blur(16px) saturate(35%); }
/* Platzhalter, der vom angetippten Element zum Fenster wächst */
.ghost { position: fixed; z-index: 57; pointer-events: none; box-shadow: 0 30px 80px var(--shadow);
  -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); }
.dh { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.dh h3 { margin: 0; font-size: 22px; flex: 1; font-weight: var(--title-weight); }
.dh .x { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--line-2); cursor: pointer; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; }
.sect + .sect { margin-top: 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--hero); }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeout { to { opacity: 0; } }

/* Wischen zum Bestätigen */
.slide { position: relative; height: 64px; border-radius: 999px; background: var(--line-2); border: 1px solid var(--line); overflow: hidden; user-select: none; touch-action: none; margin-top: 16px; }
.slide .fill { position: absolute; inset: 0 auto 0 0; width: 64px; border-radius: 999px; background: color-mix(in srgb, var(--hero) 30%, transparent); }
.slide .txt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-left: 50px; font-weight: 600; color: var(--muted);
  background: linear-gradient(90deg, var(--muted) 0%, var(--ink) 50%, var(--muted) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; animation: shine 2.4s linear infinite; }
.slide .knob { position: absolute; top: 4px; left: 4px; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--hero); color: var(--hero-fg);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px var(--shadow); cursor: grab; }
.slide.done .knob { background: var(--pos); color: #fff; }
.slide.busy .txt { animation: none; }
@keyframes shine { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Kleines Auswahlmenü (Abwesend, Design) – wächst ebenfalls aus dem Knopf */
.pop, .dsg-menu { position: fixed; z-index: 60; min-width: 220px; padding: 8px; border-radius: 24px; background: var(--card-strong); }
.pop button, .dsg-menu button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 0 14px; border: 0; border-radius: 16px;
  background: transparent; color: var(--ink); font-size: 17px; font-weight: 600; text-align: left; cursor: pointer; }
.pop button:active, .dsg-menu button:active { background: var(--line-2); }
.sw { width: 30px; height: 30px; border-radius: 50%; flex: none; border: 1px solid rgba(127,127,127,.35); }
.sw-frost { background: linear-gradient(140deg, #F2F6FA, #8FA9C4 60%, #4E6C8C); }
.sw-plasma { background: radial-gradient(circle at 50% 50%, transparent 0 34%, #2CE5C9 40%, rgba(44,229,201,.25) 50%, transparent 60%), radial-gradient(circle at 70% 80%, #3FBF6E, transparent 55%), #050807; }
.sw-carbon { background: radial-gradient(circle at 50% 30%, #1CC3BF 0 18%, #06080C 40%); }
.dsg-menu .on::after { content: "✓"; margin-left: auto; color: var(--link); }
@keyframes popin { from { opacity: 0; transform: scale(.6) translateY(12px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes popout { to { opacity: 0; transform: scale(.85); filter: blur(4px); } }

/* Seitenwechsel und gestaffeltes Einblenden */
main.enter > * { animation: rise .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rise { from { opacity: 0; transform: translateY(22px) scale(.98); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
.days.enter .day { animation: rise .7s var(--ease) both; animation-delay: calc(120ms + var(--i, 0) * 28ms); }

#toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px) scale(.9); z-index: 40;
  max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 999px; background: var(--toast-bg); color: #fff; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .35s, transform .6s var(--ease); box-shadow: 0 10px 30px var(--shadow); }
[data-design="carbon"] #toast, [data-design="plasma"] #toast { color: #021A19; }
#toast.on { opacity: 1; transform: translateX(-50%); }
#toast.bad { background: #B42F27; color: #fff; }

/* ================= Anmeldung ================= */
.login { max-width: 420px; margin: 3vh auto 0; }
.login .card { padding: 24px 20px; }
.login .pin { letter-spacing: .4em; font-variant-numeric: tabular-nums; }
.err { color: var(--neg); font-weight: 600; margin-top: 10px; min-height: 1.3em; }

/* Design-Auswahl auf der Seite „Ich“ */
.dpick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dpick button { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: transparent; color: var(--ink); cursor: pointer; font-weight: 600; text-align: left; transition: transform .35s var(--ease); }
.dpick button.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.dpick .pv { width: 100%; height: 64px; border-radius: 12px; }
.dpick .pv.sw-frost, .dpick .pv.sw-plasma, .dpick .pv.sw-carbon { width: 100%; height: 64px; border-radius: 12px; }

/* ================= Stundenzettel ================= */
.sheet { background: #fff; color: #111; border-radius: 16px; padding: 16px; overflow-x: auto; }
.sheet h2 { margin: 0 0 10px; font-size: 18px; color: #111; text-transform: none; letter-spacing: 0; }
.sheet .kopf { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 14px; margin-bottom: 12px; }
.sheet table { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
.sheet th, .sheet td { border: 1px solid #9AA0AA; padding: 3px 5px; text-align: center; white-space: nowrap; }
.sheet th { background: #EEF0F3; font-weight: 600; }
.sheet td.l { text-align: left; white-space: normal; }
.sheet tr.we td { background: #F4F5F7; }
.sheet tfoot td { font-weight: 700; }
.sheet .fuss { font-size: 12.5px; margin-top: 12px; color: #333; }
.prose { font-size: 16px; }
.prose h2 { font-size: 15px; }
.prose p, .prose li { color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  .top, .tabs, .net, .noprint, #toast, .bg { display: none !important; }
  main { padding: 0; max-width: none; }
  body { background: #fff; }
  .sheet { padding: 0; }
}
