/* ==========================================================
   Quix – Prototyp
   Stil: clean wie eine Apple-App. Neutrale Flächen,
   eine starke Farbe (Textmarker-Orange), Fächer in Textmarker-Farben.
   ========================================================== */

:root {
  color-scheme: light;
  --bg: #F2F2F7;
  --bg-elev: #FFFFFF;
  --card: #FFFFFF;
  --card2: #F2F2F7;
  --fill: rgba(120, 120, 128, .12);
  --fill2: rgba(120, 120, 128, .08);
  --text: #000000;
  --text2: rgba(60, 60, 67, .62);
  --text3: rgba(60, 60, 67, .32);
  --sep: rgba(60, 60, 67, .16);
  --bar: rgba(249, 249, 251, .78);
  --tint: #FF5A1F;
  --tint-soft: rgba(255, 90, 31, .12);
  --green: #34C759;
  --red: #FF3B30;
  --blue: #007AFF;
  --yellow: #FFCC00;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 20px rgba(0, 0, 0, .06);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .05), 0 18px 40px rgba(0, 0, 0, .10);
  --desk: #E9E9EE;
  --brand: linear-gradient(135deg, #FFA31F 0%, #FF5A2E 52%, #FF2D78 100%);
  --ease: cubic-bezier(.32, .72, 0, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --sat: max(env(safe-area-inset-top), 0px);
  --sab: max(env(safe-area-inset-bottom), 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #000000;
    --bg-elev: #1C1C1E;
    --card: #1C1C1E;
    --card2: #2C2C2E;
    --fill: rgba(120, 120, 128, .24);
    --fill2: rgba(120, 120, 128, .16);
    --text: #FFFFFF;
    --text2: rgba(235, 235, 245, .62);
    --text3: rgba(235, 235, 245, .3);
    --sep: rgba(84, 84, 88, .55);
    --bar: rgba(22, 22, 24, .78);
    --tint: #FF6A2E;
    --tint-soft: rgba(255, 106, 46, .18);
    --green: #30D158;
    --red: #FF453A;
    --blue: #0A84FF;
    --yellow: #FFD60A;
    --shadow: none;
    --shadow-lg: 0 18px 40px rgba(0, 0, 0, .5);
    --desk: #0B0B0D;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-elev: #1C1C1E;
  --card: #1C1C1E;
  --card2: #2C2C2E;
  --fill: rgba(120, 120, 128, .24);
  --fill2: rgba(120, 120, 128, .16);
  --text: #FFFFFF;
  --text2: rgba(235, 235, 245, .62);
  --text3: rgba(235, 235, 245, .3);
  --sep: rgba(84, 84, 88, .55);
  --bar: rgba(22, 22, 24, .78);
  --tint: #FF6A2E;
  --tint-soft: rgba(255, 106, 46, .18);
  --green: #30D158;
  --red: #FF453A;
  --blue: #0A84FF;
  --yellow: #FFD60A;
  --shadow: none;
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, .5);
  --desk: #0B0B0D;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; height: 100%;
  font-family: var(--font); font-size: 17px; line-height: 1.3;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; margin: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
svg { display: block; }

/* ---------- Rahmen (am Computer sieht es aus wie ein Handy) ---------- */
.app {
  position: relative; width: 100%; height: 100%; height: 100dvh;
  max-width: 520px; margin: 0 auto; overflow: hidden; background: var(--bg);
  isolation: isolate;
}
.statusbar, .homebar { display: none; }

@media (min-width: 720px) and (min-height: 760px) {
  body {
    display: grid; place-items: center; min-height: 100dvh;
    background:
      radial-gradient(60% 50% at 20% 15%, rgba(255, 163, 31, .18), transparent 70%),
      radial-gradient(50% 45% at 85% 80%, rgba(255, 45, 120, .14), transparent 70%),
      var(--desk);
  }
  .app {
    --sat: 50px; --sab: 22px;
    width: 400px; height: min(860px, calc(100dvh - 56px)); max-width: none; margin: 0;
    border-radius: 54px;
    box-shadow: 0 0 0 11px #0D0D0F, 0 0 0 12.5px #3A3A3E, 0 50px 100px -20px rgba(0, 0, 0, .45);
  }
  .statusbar {
    display: flex; position: absolute; z-index: 900; top: 0; left: 0; right: 0; height: 50px;
    align-items: center; justify-content: space-between; padding: 6px 30px 0 40px;
    font: 600 16px/1 var(--display); letter-spacing: -.2px; color: var(--text);
    pointer-events: none; transition: color .3s;
  }
  .statusbar svg { fill: currentColor; }
  .sb-icons { display: flex; gap: 6px; align-items: center; }
  .statusbar::after {
    content: ""; position: absolute; left: 50%; top: 11px; width: 120px; height: 34px;
    transform: translateX(-50%); background: #000; border-radius: 20px;
  }
  .homebar {
    display: block; position: absolute; z-index: 900; bottom: 8px; left: 50%;
    width: 134px; height: 5px; border-radius: 3px; transform: translateX(-50%);
    background: var(--text); opacity: .85; pointer-events: none; transition: background .3s;
  }
  .app.top-dark .statusbar { color: #fff; }
  .app.top-dark .homebar { background: #fff; }
  .app.sheet-open .statusbar { color: #fff; }
}

/* ---------- Screens & Navigation ---------- */
.screen {
  position: absolute; inset: 0; z-index: 1;
  background: var(--bg); overflow-x: hidden; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  transition: transform .52s var(--ease), opacity .35s ease, filter .52s var(--ease), border-radius .52s var(--ease);
  will-change: transform;
}
.screen.off-right { transform: translateX(100%); }
.screen.off-bottom { transform: translateY(100%); }
.screen.pushed { transform: translateX(-26%); filter: brightness(.94); }
.screen.covered { transform: scale(.94); border-radius: 30px; filter: brightness(.6); }
.screen.fade-in { opacity: 0; }
.screen:not(:first-of-type) { box-shadow: -8px 0 30px rgba(0, 0, 0, .06); }
.screen.no-scroll { overflow: hidden; }
.app.sheet-open { background: #000; }
.screen.behind-sheet { transform: scale(.915) translateY(calc(var(--sat) * .25 + 4px)); border-radius: 26px; filter: brightness(.82); overflow: hidden; }

.navbar {
  position: sticky; top: 0; z-index: 20;
  padding-top: var(--sat);
  transition: background .25s, box-shadow .25s, backdrop-filter .25s;
}
.navbar-inner {
  height: 46px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 8px;
}
.navbar .nb-left { justify-self: start; display: flex; align-items: center; }
.navbar .nb-right { justify-self: end; display: flex; align-items: center; gap: 4px; }
.navbar .nb-title {
  font: 600 17px/1 var(--display); letter-spacing: -.3px; opacity: 0; transform: translateY(4px);
  transition: opacity .2s, transform .2s; white-space: nowrap; max-width: 210px; overflow: hidden; text-overflow: ellipsis;
}
.scrolled > .navbar, .navbar.solid {
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px);
  box-shadow: 0 .5px 0 var(--sep);
}
.scrolled > .navbar .nb-title, .navbar.solid .nb-title { opacity: 1; transform: none; }
.nb-back {
  display: inline-flex; align-items: center; gap: 2px; height: 44px; padding: 0 8px 0 2px;
  color: var(--tint); font-size: 17px; letter-spacing: -.3px;
}
.nb-back .ic { width: 24px; height: 24px; }
.nb-btn {
  height: 44px; min-width: 44px; padding: 0 10px; color: var(--tint);
  display: inline-flex; align-items: center; justify-content: center; font-size: 17px; letter-spacing: -.3px;
}
.nb-btn.bold { font-weight: 600; }
.nb-circle {
  width: 32px; height: 32px; border-radius: 50%; background: var(--fill); color: var(--text2);
  display: inline-grid; place-items: center; margin: 0 6px;
}
.nb-circle .ic { width: 15px; height: 15px; }

.page { padding: 0 16px calc(var(--sab) + 40px); }
.page.with-tabbar { padding-bottom: calc(var(--sab) + 110px); }

.eyebrow {
  font: 600 13px/1.2 var(--font); text-transform: uppercase; letter-spacing: .2px; color: var(--text2);
}
.large-title {
  font: 700 34px/1.12 var(--display); letter-spacing: -.8px; margin: 2px 0 0;
}
.title1 { font: 700 28px/1.15 var(--display); letter-spacing: -.6px; margin: 0; }
.title2 { font: 700 22px/1.2 var(--display); letter-spacing: -.4px; margin: 0; }
.title3 { font: 600 20px/1.2 var(--display); letter-spacing: -.4px; margin: 0; }
.headline { font-weight: 600; letter-spacing: -.4px; }
.sub { font-size: 15px; color: var(--text2); letter-spacing: -.2px; line-height: 1.35; }
.foot { font-size: 13px; color: var(--text2); line-height: 1.35; }
.muted { color: var(--text2); }
.center { text-align: center; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 28px 4px 10px;
}
.section-head h3 { font: 700 22px/1.2 var(--display); letter-spacing: -.45px; margin: 0; }
.section-head .count { font-size: 15px; color: var(--text2); }
.group-label {
  font-size: 13px; text-transform: uppercase; color: var(--text2); margin: 26px 16px 7px; letter-spacing: .1px;
}

/* ---------- Icons ---------- */
.ic { display: inline-block; width: 22px; height: 22px; flex: none; }
.ic svg { width: 100%; height: 100%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 20px; border-radius: 14px;
  font-weight: 600; font-size: 17px; letter-spacing: -.3px;
  transition: transform .18s var(--ease), opacity .2s, background .2s;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(.97); opacity: .85; }
.btn[disabled] { opacity: .35; pointer-events: none; }
.btn-block { width: 100%; }
.btn-lg { height: 54px; border-radius: 16px; }
.btn-primary { background: linear-gradient(180deg, #FF7A35 0%, #FF5A1F 100%); color: #fff; box-shadow: 0 6px 16px -6px rgba(255, 90, 31, .6); }
.btn-secondary { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.btn-tinted { background: var(--tint-soft); color: var(--tint); }
.btn-plain { background: none; color: var(--tint); height: 44px; }
.btn-dark { background: var(--text); color: var(--bg-elev); }
.btn-white { background: #fff; color: #000; }
.btn .ic { width: 20px; height: 20px; }
.btn-small { height: 34px; padding: 0 14px; border-radius: 17px; font-size: 15px; }

.press { transition: transform .2s var(--ease); }
.press:active { transform: scale(.97); }

/* ---------- Karten & Listen ---------- */
.card { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); }
.group { background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.row {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 52px; padding: 10px 16px; text-align: left; background: var(--card);
  transition: background .15s;
}
button.row:active { background: var(--fill2); }
.row + .row::before {
  content: ""; position: absolute; top: 0; right: 0; left: var(--inset, 16px); height: .5px; background: var(--sep);
}
.row.has-icon { --inset: 60px; }
.row-icon {
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none;
}
.row-icon .ic { width: 19px; height: 19px; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 17px; letter-spacing: -.35px; line-height: 1.25; }
.row-sub { font-size: 14px; color: var(--text2); margin-top: 2px; line-height: 1.3; letter-spacing: -.1px; }
.row-right { color: var(--text2); font-size: 15px; display: flex; align-items: center; gap: 6px; flex: none; }
.chev { width: 14px; height: 14px; color: var(--text3); }
.row.danger .row-title { color: var(--red); }
.row.disabled { opacity: .45; }
.badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px;
  font-size: 12px; font-weight: 600; letter-spacing: 0;
}
.badge.ok { background: rgba(52, 199, 89, .15); color: var(--green); }
.badge.no { background: rgba(255, 59, 48, .13); color: var(--red); }
.badge.soon { background: var(--fill); color: var(--text2); }
.badge.tint { background: var(--tint-soft); color: var(--tint); }

/* ---------- Segment, Schalter, Chips, Felder ---------- */
.seg {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--fill); border-radius: 10px; padding: 2px; height: 34px;
}
.seg button {
  position: relative; z-index: 1; font-size: 13px; font-weight: 500; letter-spacing: -.1px; border-radius: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px;
}
.seg button.on { font-weight: 600; }
.seg .thumb {
  position: absolute; z-index: 0; top: 2px; bottom: 2px; left: 2px; border-radius: 8px;
  background: var(--bg-elev); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 1px 1px rgba(0, 0, 0, .04);
  transition: transform .35s var(--ease);
}
:root[data-theme="dark"] .seg .thumb { background: #636366; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg .thumb { background: #636366; } }

.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 2; }
.switch i {
  position: absolute; inset: 0; border-radius: 16px; background: var(--fill); transition: background .25s;
}
.switch i::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 3px 1px rgba(0, 0, 0, .06);
  transition: transform .3s var(--spring);
}
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(20px); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow);
  font-size: 15px; font-weight: 500; letter-spacing: -.2px; display: inline-flex; align-items: center; gap: 6px;
  transition: background .2s, color .2s, transform .15s;
}
.chip:active { transform: scale(.95); }
.chip.on { background: var(--text); color: var(--bg-elev); }

.field {
  width: 100%; height: 52px; border: 0; border-radius: 14px; background: var(--card); padding: 0 16px;
  font-size: 17px; letter-spacing: -.3px; outline: none; box-shadow: var(--shadow);
}
.field::placeholder, .textarea::placeholder { color: var(--text3); }
.textarea {
  width: 100%; min-height: 230px; border: 0; border-radius: 18px; background: var(--card); padding: 16px;
  font-size: 16px; line-height: 1.45; letter-spacing: -.2px; outline: none; resize: none; box-shadow: var(--shadow);
}
.field:focus, .textarea:focus { box-shadow: 0 0 0 3px var(--tint-soft), var(--shadow); }

/* ---------- App-Icon & Avatar ---------- */
.app-icon { width: 60px; height: 60px; border-radius: 22.5%; overflow: hidden; box-shadow: 0 10px 24px -8px rgba(255, 70, 50, .55); flex: none; }
.app-icon svg { width: 100%; height: 100%; }
.app-icon.xl { width: 104px; height: 104px; }
.avatar {
  display: grid; place-items: center; border-radius: 50%; flex: none;
  background: linear-gradient(160deg, #FFE2CC, #FFC3D8); line-height: 1;
}
:root[data-theme="dark"] .avatar { background: linear-gradient(160deg, #4A2A1E, #4A1E33); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { background: linear-gradient(160deg, #4A2A1E, #4A1E33); } }

/* ---------- Willkommen ---------- */
.welcome { display: flex; flex-direction: column; overflow: hidden; }
.blobs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.blobs i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: drift 14s ease-in-out infinite alternate; }
.blobs .b1 { width: 320px; height: 320px; background: #FFB01F; top: -80px; left: -90px; }
.blobs .b2 { width: 300px; height: 300px; background: #FF2D78; top: 120px; right: -140px; animation-delay: -5s; opacity: .35; }
.blobs .b3 { width: 260px; height: 260px; background: #FF5A2E; bottom: 60px; left: -60px; animation-delay: -9s; opacity: .25; }
@keyframes drift { to { transform: translate(40px, 30px) scale(1.15); } }
.welcome-inner {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--sat) + 44px) 32px 0; text-align: center;
}
.welcome-title { font: 800 44px/1 var(--display); letter-spacing: -1.5px; margin: 22px 0 8px; }
.welcome-sub { font-size: 20px; color: var(--text2); margin: 0; letter-spacing: -.4px; }
.features { margin-top: 38px; display: grid; gap: 22px; text-align: left; width: 100%; max-width: 330px; }
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature .ic { width: 34px; height: 34px; margin-top: 1px; }
.feature b { display: block; font-size: 16px; letter-spacing: -.3px; }
.feature span { font-size: 15px; color: var(--text2); letter-spacing: -.2px; line-height: 1.32; }
.welcome-actions { position: relative; padding: 18px 24px calc(var(--sab) + 16px); display: grid; gap: 10px; }
.fine { text-align: center; font-size: 12px; color: var(--text3); margin: 2px 0 0; }
.g-logo { width: 20px; height: 20px; }

.stagger > * { animation: rise .7s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: .06s; }
.stagger > *:nth-child(3) { animation-delay: .12s; }
.stagger > *:nth-child(4) { animation-delay: .18s; }
.stagger > *:nth-child(5) { animation-delay: .24s; }
.stagger > *:nth-child(6) { animation-delay: .30s; }
.stagger > *:nth-child(7) { animation-delay: .36s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Profil anlegen ---------- */
.avatar-pick { display: flex; flex-direction: column; align-items: center; margin: 14px 0 24px; }
.avatar-pick .avatar { width: 108px; height: 108px; font-size: 58px; box-shadow: var(--shadow-lg); transition: transform .35s var(--spring); }
.avatar-pick .avatar.bump { transform: scale(1.08); }
.emoji-row { display: flex; gap: 8px; overflow-x: auto; padding: 18px 16px 6px; margin: 0 -16px; scrollbar-width: none; }
.emoji-row::-webkit-scrollbar { display: none; }
.emoji-row button {
  flex: none; width: 50px; height: 50px; border-radius: 50%; font-size: 26px; background: var(--card); box-shadow: var(--shadow);
  transition: transform .2s var(--spring), box-shadow .2s;
}
.emoji-row button.on { box-shadow: 0 0 0 2.5px var(--tint), var(--shadow); transform: scale(1.06); }
.sticky-bottom {
  position: sticky; bottom: 0; z-index: 10; padding: 14px 16px calc(var(--sab) + 14px); margin-top: 18px;
  background: linear-gradient(to bottom, transparent, var(--bg) 34%);
}

/* ---------- Tabs & Startseite ---------- */
.tabs { overflow: hidden; }
.pane { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.pane[hidden] { display: none; }
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 6px 28px calc(var(--sab) + 6px);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px);
  box-shadow: 0 -.5px 0 var(--sep);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text3);
  font-size: 10.5px; font-weight: 600; letter-spacing: .1px; padding: 4px 0; transition: color .2s;
}
.tab .ic { width: 26px; height: 26px; }
.tab.on { color: var(--tint); }
.tab-add {
  width: 58px; height: 58px; border-radius: 50%; background: var(--brand); color: #fff; margin-top: -26px;
  display: grid; place-items: center; box-shadow: 0 10px 24px -6px rgba(255, 70, 50, .6), 0 0 0 5px var(--bg);
  transition: transform .25s var(--spring);
}
.tab-add:active { transform: scale(.92); }
.tab-add .ic { width: 28px; height: 28px; }

.home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 6px; }
.home-head .avatar { width: 40px; height: 40px; font-size: 22px; margin-bottom: 3px; }
.stat-row { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.stat-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 10px; border-radius: 16px;
  background: var(--card); box-shadow: var(--shadow); font: 600 14px/1 var(--round); letter-spacing: -.1px;
}
.stat-pill .ic { width: 17px; height: 17px; }
.stat-pill.fire .ic { color: #FF6A1F; }
.stat-pill.xp .ic { color: #FFB800; }
.stat-pill.lvl .ic { color: #AF52DE; }

.hero {
  position: relative; overflow: hidden; margin-top: 18px; border-radius: 26px; padding: 20px; color: #fff;
  background: var(--brand); box-shadow: 0 20px 40px -18px rgba(255, 60, 60, .55);
}
.hero::before {
  content: ""; position: absolute; width: 260px; height: 260px; right: -80px; top: -110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .35), transparent 65%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), transparent 40%);
}
.hero-top { position: relative; display: flex; justify-content: space-between; gap: 12px; }
.hero .eyebrow { color: rgba(255, 255, 255, .85); }
.hero h2 { font: 700 28px/1.1 var(--display); letter-spacing: -.7px; margin: 6px 0 6px; }
.hero p { margin: 0; font-size: 15px; color: rgba(255, 255, 255, .88); letter-spacing: -.2px; }
.hero .ring-wrap { position: relative; flex: none; }
.hero .ring-label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font: 700 15px/1 var(--round); }
.hero .ring-label small { display: block; font-size: 10px; font-weight: 600; opacity: .8; margin-top: 2px; }
.hero-btn {
  position: relative; margin-top: 18px; width: 100%; height: 50px; border-radius: 15px; background: #fff; color: #FF4A2A;
  font-weight: 700; font-size: 17px; letter-spacing: -.3px; display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .35); transition: transform .2s var(--ease);
}
.hero-btn:active { transform: scale(.97); }
.hero-btn .ic { width: 18px; height: 18px; }

.week { display: flex; justify-content: space-between; padding: 14px 16px 16px; }
.week-day { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--text2); }
.week-day i {
  width: 32px; height: 32px; border-radius: 50%; background: var(--fill2); display: grid; place-items: center; font-style: normal;
}
.week-day.done i { background: var(--brand); color: #fff; }
.week-day.done i .ic { width: 16px; height: 16px; }
.week-day.today i { box-shadow: inset 0 0 0 2px var(--tint); }
.week-day.today { color: var(--tint); }
.week-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 0; }
.week-head b { font-size: 15px; letter-spacing: -.2px; }

.deck-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.deck-card {
  position: relative; display: flex; flex-direction: column; text-align: left; min-height: 172px;
  background: var(--card); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow);
  transition: transform .25s var(--ease);
}
.deck-card:active { transform: scale(.965); }
.deck-top {
  position: relative; height: 84px; display: flex; align-items: flex-end; padding: 0 14px 10px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 30%, transparent), color-mix(in srgb, var(--c) 10%, transparent));
}
.deck-emoji { font-size: 38px; line-height: 1; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .12)); }
.deck-ring { position: absolute; top: 12px; right: 12px; }
.deck-ring .ring-label { position: absolute; inset: 0; display: grid; place-items: center; font: 700 10.5px/1 var(--round); color: var(--text); }
.deck-body { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.deck-title { font-weight: 600; font-size: 16px; letter-spacing: -.35px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deck-meta { font-size: 13px; color: var(--text2); letter-spacing: -.1px; }
.deck-due {
  position: absolute; top: 12px; left: 12px; height: 22px; padding: 0 8px; border-radius: 11px;
  background: rgba(255, 255, 255, .85); color: #000; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 3px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.deck-add {
  min-height: 172px; border-radius: 22px; border: 1.5px dashed var(--text3); color: var(--text2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; font-size: 15px; letter-spacing: -.2px; transition: transform .25s var(--ease), background .2s;
}
.deck-add:active { transform: scale(.965); background: var(--fill2); }
.deck-add span.plus { width: 44px; height: 44px; border-radius: 50%; background: var(--tint-soft); color: var(--tint); display: grid; place-items: center; }

/* ---------- Profil ---------- */
.profile-card { display: flex; flex-direction: column; align-items: center; padding: 24px 16px 20px; margin-top: 14px; }
.profile-card .avatar { width: 92px; height: 92px; font-size: 50px; }
.profile-card h2 { font: 700 24px/1.2 var(--display); letter-spacing: -.5px; margin: 12px 0 2px; }
.level-bar { width: 100%; margin-top: 16px; }
.level-bar .lb-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--text2); margin-bottom: 7px; }
.level-bar .lb-top b { color: var(--text); font-weight: 600; }
.level-bar .lb-track { height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.level-bar .lb-fill { height: 100%; border-radius: 4px; background: var(--brand); transition: width .8s var(--ease); }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.stat-tile { padding: 14px 16px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.stat-tile .ic { width: 22px; height: 22px; }
.stat-tile b { display: block; font: 700 28px/1.1 var(--round); letter-spacing: -.5px; margin-top: 8px; }
.stat-tile span { font-size: 13px; color: var(--text2); }

/* ---------- Sheet ---------- */
.sheet-wrap { position: absolute; inset: 0; z-index: 500; pointer-events: none; }
.sheet-back { position: absolute; inset: 0; background: rgba(0, 0, 0, 0); transition: background .45s; pointer-events: auto; }
.sheet-wrap.open .sheet-back { background: rgba(0, 0, 0, .25); }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--sat) + 12px);
  background: var(--bg); border-radius: 26px 26px 0 0; overflow: hidden; pointer-events: auto;
  transform: translateY(105%); transition: transform .52s var(--ease);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .18);
}
.sheet-wrap.open .sheet { transform: translateY(0); }
.sheet.dragging { transition: none; }
.sheet-grabber { position: absolute; z-index: 30; top: 0; left: 0; right: 0; height: 22px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.sheet-grabber::after { content: ""; width: 38px; height: 5px; border-radius: 3px; background: var(--text3); }
.sheet-page {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; background: var(--bg);
  transition: transform .5s var(--ease), filter .5s var(--ease);
}
.sheet-page.off-right { transform: translateX(100%); }
.sheet-page.pushed { transform: translateX(-26%); filter: brightness(.94); }
.sheet-page .navbar { padding-top: 10px; }
.sheet-page .navbar.solid, .sheet-page.scrolled > .navbar { background: var(--bar); }

.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 22px; padding: 16px; min-height: 128px;
  border-radius: 20px; background: var(--card); box-shadow: var(--shadow); text-align: left;
  transition: transform .25s var(--ease);
}
.tile:active { transform: scale(.965); }
.tile .tile-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.tile .tile-ic .ic { width: 24px; height: 24px; }
.tile b { display: block; font-size: 16px; letter-spacing: -.3px; }
.tile div span { font-size: 13px; color: var(--text2); letter-spacing: -.1px; }

.tip {
  margin-top: 16px; padding: 16px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow);
}
.tip-head { display: flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: -.3px; }
.tip-head .ic { width: 20px; height: 20px; color: #FFB800; }
.tip p { margin: 6px 0 12px; font-size: 14px; color: var(--text2); letter-spacing: -.1px; line-height: 1.38; }
.tip blockquote {
  margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--fill2); font-size: 14px; line-height: 1.4; letter-spacing: -.1px;
}

.detect {
  display: flex; align-items: center; gap: 8px; margin: 10px 4px 0; font-size: 14px; letter-spacing: -.1px; color: var(--text2);
  min-height: 20px; transition: color .2s;
}
.detect .ic { width: 18px; height: 18px; }
.detect.good { color: var(--green); font-weight: 600; }
.paste-row { display: flex; gap: 8px; margin-top: 10px; }

/* ---------- Alert & Toast ---------- */
.alert-wrap {
  position: absolute; inset: 0; z-index: 800; display: grid; place-items: center; background: rgba(0, 0, 0, 0);
  transition: background .25s;
}
.alert-wrap.open { background: rgba(0, 0, 0, .32); }
.alert {
  width: 272px; border-radius: 16px; overflow: hidden; text-align: center;
  background: rgba(242, 242, 247, .86); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  transform: scale(1.12); opacity: 0; transition: transform .3s var(--spring), opacity .2s;
  color: #000;
}
:root[data-theme="dark"] .alert { background: rgba(37, 37, 39, .88); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .alert { background: rgba(37, 37, 39, .88); color: #fff; } }
.alert-wrap.open .alert { transform: scale(1); opacity: 1; }
.alert-body { padding: 19px 16px 17px; }
.alert-body b { display: block; font-size: 17px; letter-spacing: -.4px; }
.alert-body p { margin: 4px 0 0; font-size: 13px; line-height: 1.35; letter-spacing: -.05px; }
.alert-btns { display: grid; border-top: .5px solid var(--sep); }
.alert-btns.two { grid-template-columns: 1fr 1fr; }
.alert-btns button { height: 44px; font-size: 17px; color: var(--blue); letter-spacing: -.4px; }
.alert-btns button + button { box-shadow: -.5px 0 0 var(--sep); }
.alert-btns:not(.two) button + button { box-shadow: 0 -.5px 0 var(--sep); }
.alert-btns button.bold { font-weight: 600; }
.alert-btns button.destructive { color: var(--red); }
.alert-btns button:active { background: rgba(120, 120, 128, .16); }

.toast {
  position: absolute; z-index: 850; left: 50%; top: calc(var(--sat) + 8px); transform: translate(-50%, -140%);
  display: flex; align-items: center; gap: 8px; padding: 0 18px 0 14px; height: 46px; border-radius: 23px;
  background: var(--bg-elev); box-shadow: 0 10px 30px rgba(0, 0, 0, .14), 0 0 0 .5px var(--sep);
  font-size: 15px; font-weight: 600; letter-spacing: -.2px; white-space: nowrap;
  transition: transform .5s var(--spring);
}
.toast.show { transform: translate(-50%, 0); }
.toast .ic { width: 20px; height: 20px; color: var(--green); }

/* ---------- Bau-Animation ---------- */
.build { display: flex; flex-direction: column; align-items: center; padding: calc(var(--sat) + 70px) 32px 40px; }
.build-orb { position: relative; width: 132px; height: 132px; }
.build-orb .spin {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, #FFA31F, #FF5A2E, #FF2D78, #AF52DE, #FFA31F);
  animation: spin 1.6s linear infinite; filter: blur(.5px);
  -webkit-mask: radial-gradient(circle, transparent 56%, #000 57%); mask: radial-gradient(circle, transparent 56%, #000 57%);
}
.build-orb .glow { position: absolute; inset: -20px; border-radius: 50%; background: conic-gradient(from 0deg, #FFA31F, #FF5A2E, #FF2D78, #AF52DE, #FFA31F); filter: blur(34px); opacity: .45; animation: spin 3s linear infinite; }
.build-orb .core {
  position: absolute; inset: 18px; border-radius: 50%; background: var(--bg-elev); display: grid; place-items: center;
  box-shadow: inset 0 0 0 .5px var(--sep);
}
.build-orb .core .ic { width: 44px; height: 44px; color: #FF5A2E; animation: pulse 1.4s ease-in-out infinite; }
.build.done .build-orb .spin { animation-duration: 6s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(1.12); } }
.build h1 { font: 700 26px/1.2 var(--display); letter-spacing: -.6px; margin: 34px 0 6px; text-align: center; }
.build .sub { text-align: center; }
.steps { margin-top: 28px; width: 100%; max-width: 300px; display: grid; gap: 14px; }
.step { display: flex; align-items: center; gap: 12px; font-size: 16px; letter-spacing: -.3px; opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .5s var(--ease); }
.step.show { opacity: 1; transform: none; }
.step .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.step .dot .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--fill); border-top-color: var(--tint); animation: spin .8s linear infinite; }
.step.ok .dot { background: var(--green); color: #fff; animation: popin .4s var(--spring); }
.step.ok .dot .ic { width: 14px; height: 14px; }
@keyframes popin { from { transform: scale(.3); } }

/* ---------- Check-Seite ---------- */
.check-head { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.emoji-btn {
  width: 64px; height: 64px; border-radius: 18px; font-size: 36px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--c) 18%, var(--card)); box-shadow: var(--shadow);
}
.title-input {
  flex: 1; min-width: 0; border: 0; outline: none; background: none; padding: 4px 0;
  font: 700 26px/1.2 var(--display); letter-spacing: -.6px;
}
.check-sum { margin-top: 18px; padding: 16px; display: flex; gap: 12px; align-items: center; }
.check-sum .big { font: 700 34px/1 var(--round); letter-spacing: -.8px; }
.item-row .row-title { font-size: 16px; }
.del-btn { width: 34px; height: 34px; border-radius: 50%; color: var(--red); display: grid; place-items: center; flex: none; }
.del-btn:active { background: rgba(255, 59, 48, .12); }
.del-btn .ic { width: 19px; height: 19px; }
.row.removing { animation: collapse .35s var(--ease) forwards; }
@keyframes collapse { to { opacity: 0; min-height: 0; height: 0; padding-top: 0; padding-bottom: 0; } }
.mc-line { font-size: 13.5px; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.mc-line .ok { color: var(--green); font-weight: 600; }
.mc-line .no { color: var(--text2); }

/* ---------- Zettel-Seite ---------- */
.ring-wrap { position: relative; }
.avatar-pick .emoji-row { align-self: stretch; }
.deck-hero {
  margin: calc(-1 * (var(--sat) + 46px)) -16px 0; padding: calc(var(--sat) + 56px) 16px 6px; text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 26%, var(--bg)) 0%, var(--bg) 100%);
}
.deck-hero .big-emoji {
  width: 88px; height: 88px; margin: 0 auto; border-radius: 26px; background: var(--card); display: grid; place-items: center;
  font-size: 50px; box-shadow: var(--shadow-lg);
}
.deck-hero h1 { font: 700 30px/1.15 var(--display); letter-spacing: -.7px; margin: 16px 0 4px; }
.mastery { display: flex; align-items: center; gap: 16px; padding: 16px; margin-top: 16px; }
.mastery .ring-wrap { position: relative; flex: none; }
.mastery .ring-label { position: absolute; inset: 0; display: grid; place-items: center; font: 700 19px/1 var(--round); letter-spacing: -.4px; }
.mastery b { display: block; font-size: 17px; letter-spacing: -.35px; }
.mastery .sub { margin-top: 2px; }
.mastery-chips { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

.rec {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 16px; border-radius: 22px; color: #fff; text-align: left; margin-top: 12px;
  transition: transform .25s var(--ease);
}
.rec:active { transform: scale(.975); }
.rec::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .16), transparent 55%); pointer-events: none; }
.rec .game-ic { width: 54px; height: 54px; border-radius: 15px; background: rgba(255, 255, 255, .22); }
.rec .game-ic .ic { width: 30px; height: 30px; }
.rec small { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; opacity: .85; }
.rec b { display: block; font-size: 19px; letter-spacing: -.4px; margin: 2px 0; }
.rec div span { font-size: 14px; opacity: .92; letter-spacing: -.1px; line-height: 1.3; display: block; }
.rec .play { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; flex: none; margin-left: auto; }
.rec .play .ic { width: 18px; height: 18px; margin-left: 2px; }

.game-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; }
.game-ic .ic { width: 24px; height: 24px; }
.row.game-row { --inset: 76px; min-height: 70px; padding-top: 12px; padding-bottom: 12px; gap: 16px; }
.best { font: 600 15px/1 var(--round); color: var(--text2); display: flex; align-items: center; gap: 4px; }
.best .ic { width: 15px; height: 15px; color: #FFB800; }
.weak-bar { width: 64px; height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.weak-bar i { display: block; height: 100%; background: var(--red); border-radius: 3px; }
.date-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- Ergebnis ---------- */
.results { text-align: center; }
.res-hero {
  position: relative; overflow: hidden; padding: calc(var(--sat) + 26px) 24px 30px; color: #fff;
  border-radius: 0 0 34px 34px;
}
.res-hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 60% at 50% 0%, rgba(255, 255, 255, .3), transparent 70%); pointer-events: none; }
.res-hero .game-ic { margin: 0 auto; width: 58px; height: 58px; border-radius: 16px; background: rgba(255, 255, 255, .22); }
.res-hero .game-ic .ic { width: 32px; height: 32px; }
.res-game { margin-top: 10px; font-size: 14px; font-weight: 600; opacity: .9; letter-spacing: -.1px; }
.res-hero h1 { font: 800 34px/1.1 var(--display); letter-spacing: -.9px; margin: 10px 0 0; }
.res-score { font: 800 76px/1 var(--round); letter-spacing: -3px; margin-top: 16px; font-variant-numeric: tabular-nums; }
.res-score-label { font-size: 15px; opacity: .85; margin-top: 2px; }
.record {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; height: 32px; padding: 0 14px; border-radius: 16px;
  background: rgba(255, 255, 255, .95); color: #000; font-size: 14px; font-weight: 700; letter-spacing: -.1px;
  animation: popin .6s var(--spring) .5s both;
}
.record .ic { width: 16px; height: 16px; color: #FFB800; }
.res-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: -22px 16px 0; padding: 16px 6px; position: relative; z-index: 2; }
.res-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.res-stat + .res-stat { box-shadow: -.5px 0 0 var(--sep); }
.res-stat b { font: 700 24px/1.1 var(--round); letter-spacing: -.4px; }
.res-stat span { font-size: 12.5px; color: var(--text2); }
.res-stat .ring-wrap { position: relative; }
.res-stat .ring-label { position: absolute; inset: 0; display: grid; place-items: center; font: 700 13px/1 var(--round); }
.res-actions { display: grid; gap: 10px; }
.why { font-size: 14px; color: var(--text2); margin-top: 4px; line-height: 1.35; }
.right-answer { color: var(--green); font-weight: 600; font-size: 15px; margin-top: 3px; letter-spacing: -.2px; }

.confetti { position: absolute; inset: 0; z-index: 700; pointer-events: none; }

/* ==========================================================
   SPIELE (dunkel, wie Apple Arcade)
   ========================================================== */
.game { background: #000; color: #fff; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.game .g-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--g1, #FF5A2E) 45%, transparent), transparent 70%),
    radial-gradient(90% 60% at 50% 110%, color-mix(in srgb, var(--g2, #FF2D78) 35%, transparent), transparent 70%),
    #07070A;
}
.g-top {
  position: absolute; z-index: 20; top: 0; left: 0; right: 0; padding: calc(var(--sat) + 8px) 16px 0;
  display: flex; align-items: center; gap: 12px;
}
.g-close {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); color: #fff;
}
.g-close .ic { width: 16px; height: 16px; }
.g-score { margin-left: auto; font: 700 22px/1 var(--round); letter-spacing: -.4px; font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }
.g-timer { flex: 1; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.g-timer i { display: block; height: 100%; width: 100%; border-radius: 4px; background: #fff; transform-origin: left; }
.g-timer.low i { background: #FF453A; animation: blink .5s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .45; } }
.g-flash { position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0; transition: opacity .5s; }
.g-flash.ok { background: radial-gradient(80% 60% at 50% 50%, rgba(48, 209, 88, .38), transparent 70%); opacity: 1; transition: none; }
.g-flash.bad { background: radial-gradient(130% 90% at 50% 50%, transparent 40%, rgba(255, 69, 58, .55)); opacity: 1; transition: none; }
.g-count {
  position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: none;
  background: rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: opacity .3s;
}
.g-count span { font: 800 120px/1 var(--round); letter-spacing: -4px; animation: countpop .7s var(--ease) both; text-shadow: 0 10px 40px rgba(0, 0, 0, .4); }
.g-count span.go { font-size: 76px; letter-spacing: -2px; }
.g-count p { position: absolute; bottom: calc(var(--sab) + 90px); left: 0; right: 0; text-align: center; font-size: 17px; font-weight: 600; opacity: .9; margin: 0; letter-spacing: -.3px; }
@keyframes countpop { from { transform: scale(1.8); opacity: 0; } 30% { opacity: 1; } to { transform: scale(.9); opacity: 1; } }
.g-float {
  position: absolute; z-index: 40; font: 800 26px/1 var(--round); letter-spacing: -.5px; pointer-events: none;
  animation: floatup .9s var(--ease) forwards; text-shadow: 0 4px 14px rgba(0, 0, 0, .4);
}
@keyframes floatup { from { transform: translate(-50%, 0) scale(.6); opacity: 0; } 25% { opacity: 1; transform: translate(-50%, -14px) scale(1.1); } to { transform: translate(-50%, -70px) scale(1); opacity: 0; } }
.g-end {
  position: absolute; inset: 0; z-index: 70; display: grid; place-items: center; pointer-events: none;
  background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fadein .3s both;
}
.g-end b { font: 800 46px/1 var(--display); letter-spacing: -1.5px; animation: countpop .7s var(--ease) both; }
@keyframes fadein { from { opacity: 0; } }

/* ----- Wahr oder Wisch ----- */
.g-wisch { --g1: #30D158; --g2: #00C7BE; }
.w-combo {
  position: absolute; z-index: 20; top: calc(var(--sat) + 58px); left: 50%; transform: translateX(-50%);
  height: 30px; padding: 0 12px; border-radius: 15px; display: flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  font: 800 15px/1 var(--round); opacity: 0; transition: opacity .3s;
}
.w-combo.show { opacity: 1; }
.w-combo.pop { animation: combopop .4s var(--spring); }
.w-combo .ic { width: 16px; height: 16px; color: #FF9F0A; }
@keyframes combopop { from { transform: translateX(-50%) scale(1.4); } }
.w-stage { position: absolute; z-index: 10; left: 20px; right: 20px; top: calc(var(--sat) + 104px); bottom: calc(var(--sab) + 130px); }
.w-card {
  position: absolute; inset: 0; border-radius: 30px; background: #fff; color: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 26px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); text-align: center; touch-action: none;
  transition: transform .45s var(--ease), opacity .3s;
}
.w-card.back1 { transform: translateY(24px) scale(.93); opacity: .6; }
.w-card.back2 { transform: translateY(46px) scale(.86); opacity: .3; }
.w-card.dragging { transition: none; }
.w-chip {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  height: 28px; padding: 0 12px; border-radius: 14px; background: #F2F2F7; font-size: 13px; font-weight: 600; color: #3C3C43;
  display: inline-flex; align-items: center; gap: 5px; letter-spacing: -.1px; max-width: 85%; overflow: hidden; text-overflow: ellipsis;
}
.w-text { font: 700 27px/1.22 var(--display); letter-spacing: -.6px; text-wrap: balance; }
.w-text.long { font-size: 23px; }
.w-num { position: absolute; bottom: 22px; font-size: 13px; color: #8E8E93; font-weight: 500; }
.w-stamp {
  position: absolute; top: 74px; padding: 6px 14px; border-radius: 10px; border: 3.5px solid; font: 800 24px/1 var(--display);
  letter-spacing: 1px; opacity: 0; pointer-events: none;
}
.w-stamp.yes { left: 24px; color: #30D158; border-color: #30D158; transform: rotate(-14deg); }
.w-stamp.no { right: 24px; color: #FF453A; border-color: #FF453A; transform: rotate(14deg); }
.w-card.explain { justify-content: flex-start; padding-top: 34px; animation: explainin .5s var(--spring); }
@keyframes explainin { from { transform: scale(.85); opacity: 0; } }
.w-card.explain .x-ic { width: 56px; height: 56px; border-radius: 50%; background: #FF3B30; color: #fff; display: grid; place-items: center; }
.w-card.explain .x-ic .ic { width: 26px; height: 26px; }
.w-card.explain h3 { font: 700 24px/1.2 var(--display); letter-spacing: -.5px; margin: 14px 0 4px; }
.w-card.explain .quote { font-size: 16px; color: #3C3C43; line-height: 1.4; margin: 10px 0 0; padding: 12px 14px; background: #F2F2F7; border-radius: 14px; }
.w-card.explain .verdict { font-size: 16px; margin-top: 14px; color: #3C3C43; }
.w-card.explain .verdict b { color: #000; }
.w-card.explain .whytext { font-size: 17px; font-weight: 600; line-height: 1.38; margin-top: 10px; letter-spacing: -.3px; }
.w-card.explain .btn { margin-top: auto; }
.w-controls {
  position: absolute; z-index: 20; left: 0; right: 0; bottom: calc(var(--sab) + 30px);
  display: flex; align-items: center; justify-content: center; gap: 28px;
}
.w-btn {
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .12); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  transition: transform .2s var(--spring), background .2s;
}
.w-btn:active { transform: scale(.9); }
.w-btn .ic { width: 32px; height: 32px; }
.w-btn.no { color: #FF453A; }
.w-btn.yes { color: #30D158; }
.w-hint { font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, .55); width: 90px; text-align: center; line-height: 1.3; }
.g-wisch.fire .g-bg { animation: firebg 1.2s ease-in-out infinite alternate; }
.g-wisch.fire::after {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  box-shadow: inset 0 0 60px 10px rgba(255, 140, 20, .55); animation: blink 1s ease-in-out infinite;
}
@keyframes firebg { to { filter: hue-rotate(-60deg) saturate(1.4); } }

/* ----- Tor-Rennen ----- */
.g-rennen canvas { position: absolute; inset: 0; z-index: 1; }
.r-hearts { display: flex; gap: 4px; }
.r-hearts .ic { width: 22px; height: 22px; color: #FF375F; transition: transform .3s var(--spring), opacity .3s; filter: drop-shadow(0 2px 6px rgba(255, 55, 95, .5)); }
.r-hearts .ic.lost { opacity: .22; transform: scale(.8); filter: none; color: #fff; }
.r-q {
  position: absolute; z-index: 20; left: 10px; right: 10px; top: calc(var(--sat) + 56px);
  padding: 14px 12px 12px; border-radius: 22px;
  background: rgba(20, 20, 24, .5); -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .18);
  transition: opacity .3s, transform .4s var(--ease);
}
.r-q.hide { opacity: 0; transform: translateY(-10px) scale(.98); }
.r-qlabel { padding: 0 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; opacity: .65; }
.r-qtext { padding: 0 4px; font: 700 20px/1.24 var(--display); letter-spacing: -.4px; margin-top: 5px; text-wrap: balance; }
.r-qtext.long { font-size: 17px; }
.r-ans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 12px; }
.r-pill {
  position: relative; min-height: 46px; padding: 8px 5px; border-radius: 13px; text-align: center;
  display: grid; place-items: center; font-size: 15px; font-weight: 700; letter-spacing: -.2px; line-height: 1.15;
  background: color-mix(in srgb, var(--lc) 22%, rgba(255, 255, 255, .06));
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--lc) 75%, transparent);
  transition: transform .3s var(--spring), background .25s, opacity .25s, box-shadow .25s;
  word-break: break-word; hyphens: auto;
}
.r-pill.empty { background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .3); }
.r-pill.mine { transform: translateY(-3px); box-shadow: inset 0 0 0 2.5px var(--lc), 0 6px 18px -6px var(--lc); }
.r-pill.right { background: #30D158; box-shadow: none; color: #fff; transform: scale(1.04); }
.r-pill.wrong { background: #FF453A; box-shadow: none; color: #fff; }
.r-pill.fade { opacity: .3; }
.r-toast {
  position: absolute; z-index: 30; left: 50%; top: 52%; transform: translate(-50%, -50%) scale(.9); opacity: 0;
  padding: 12px 18px; border-radius: 18px; text-align: center; max-width: 82%;
  background: rgba(20, 20, 24, .72); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  transition: opacity .25s, transform .35s var(--spring); pointer-events: none;
}
.r-toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.r-toast small { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; opacity: .7; }
.r-toast b { display: block; font-size: 20px; letter-spacing: -.4px; margin-top: 3px; color: #5CFFB0; }
.r-streak {
  position: absolute; z-index: 20; right: 16px; top: calc(var(--sat) + 50px); display: none;
}
.r-hint {
  position: absolute; z-index: 20; left: 0; right: 0; bottom: calc(var(--sab) + 26px); text-align: center;
  font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .8); transition: opacity .5s; pointer-events: none;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.r-hint .ic { width: 20px; height: 20px; animation: nudge 1s ease-in-out infinite; }
.r-hint .ic.l { animation-name: nudgel; }
@keyframes nudge { 50% { transform: translateX(5px); } }
@keyframes nudgel { 50% { transform: translateX(-5px); } }
.r-progress { position: absolute; z-index: 20; left: 0; right: 0; top: calc(var(--sat) + 4px); height: 3px; display: none; }
.r-badge {
  display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: 13px;
  background: rgba(255, 255, 255, .14); font: 800 13px/1 var(--round); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  opacity: 0; transition: opacity .3s;
}
.r-badge.show { opacity: 1; }
.r-badge .ic { width: 14px; height: 14px; color: #FF9F0A; }

/* ----- Neon-Kabel ----- */
.g-kabel .g-bg { background: radial-gradient(120% 60% at 50% 0%, #1B1F4A 0%, #0B0D22 55%, #05060F 100%); }
.k-title { font-weight: 700; font-size: 16px; letter-spacing: -.3px; }
.k-title small { display: block; font-size: 12px; font-weight: 600; opacity: .6; letter-spacing: 0; margin-top: 2px; }
.k-time { margin-left: auto; font: 700 17px/1 var(--round); font-variant-numeric: tabular-nums; opacity: .9; }
.k-sky { position: absolute; z-index: 2; left: 0; right: 0; top: calc(var(--sat) + 58px); height: 168px; }
.k-sky svg { width: 100%; height: 100%; }
.k-sky .bld { fill: #151936; transition: fill .6s; }
.k-sky .win { fill: #23284F; transition: fill .5s; }
.k-sky .lit .bld { fill: #1E2350; }
.k-sky .lit .win { fill: var(--wc, #FFD66B); }
.k-sky .moon { fill: #FFF6D9; opacity: .9; }
.k-sky .glow { opacity: 0; transition: opacity 1s; }
.k-sky.all .glow { opacity: 1; }
.k-board {
  position: absolute; z-index: 5; left: 14px; right: 14px; top: calc(var(--sat) + 246px); bottom: calc(var(--sab) + 24px);
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 46px; align-content: center;
}
.k-col { display: grid; gap: 12px; align-content: center; }
.k-item {
  position: relative; min-height: 74px; padding: 10px 12px; border-radius: 16px; text-align: left;
  background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  color: #fff; display: flex; align-items: center; transition: transform .25s var(--spring), box-shadow .25s, background .25s, opacity .3s;
  touch-action: none;
}
.k-item.left { font-weight: 700; font-size: 15px; letter-spacing: -.3px; line-height: 1.2; }
.k-item.right { font-size: 13px; line-height: 1.3; letter-spacing: -.1px; color: rgba(255, 255, 255, .88); }
.k-item .k-dot {
  position: absolute; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%;
  background: #0B0D22; box-shadow: inset 0 0 0 2.5px rgba(255, 255, 255, .45);
}
.k-item.left .k-dot { right: -7px; }
.k-item.right .k-dot { left: -7px; }
.k-item.sel { background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 2px var(--nc, #5CE1FF), 0 0 24px -4px var(--nc, #5CE1FF); transform: scale(1.02); }
.k-item.sel .k-dot, .k-item.done .k-dot { background: var(--nc); box-shadow: 0 0 12px var(--nc); }
.k-item.done { background: color-mix(in srgb, var(--nc) 14%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--nc) 70%, transparent); }
.k-item.done.dim { opacity: .55; }
.k-item.shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.k-wires { position: absolute; z-index: 6; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.k-wires path { fill: none; stroke-linecap: round; }
.k-wires .live { stroke: rgba(255, 255, 255, .8); stroke-width: 3; stroke-dasharray: 2 7; }
.k-wires .bad { stroke: #FF453A; stroke-width: 3.5; animation: snap .5s ease forwards; }
@keyframes snap { to { opacity: 0; stroke-width: 1; } }
.k-wires .flow { stroke: #fff; stroke-width: 1.6; stroke-dasharray: 3 14; animation: flow .7s linear infinite; opacity: .9; }
@keyframes flow { to { stroke-dashoffset: -17; } }
.k-round {
  position: absolute; z-index: 40; inset: 0; display: grid; place-items: center; pointer-events: none;
  font: 800 40px/1 var(--display); letter-spacing: -1px; text-align: center;
  background: rgba(5, 6, 15, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fadein .3s both;
}
.k-round small { display: block; font-size: 16px; font-weight: 600; letter-spacing: -.2px; opacity: .7; margin-top: 10px; }
.k-round > div { animation: countpop .7s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* =========================================================
   Echte App: Konto, Hochladen, Rechtliches
   ========================================================= */
.form { display: grid; gap: 10px; margin-top: 22px; }
.form-err { display: none; margin: 12px 4px 0; font-size: 14px; line-height: 1.35; color: var(--red); letter-spacing: -.1px; }
.form-err.on { display: block; animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
input.field[type="date"] { appearance: none; -webkit-appearance: none; display: flex; align-items: center; color: var(--text); min-height: 52px; }
input.field[type="date"]::-webkit-date-and-time-value { text-align: left; }
.code-field { text-align: center; font: 600 28px/1 var(--round); letter-spacing: 10px; padding-left: 26px; }
.check-row { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; font-size: 15px; line-height: 1.4; letter-spacing: -.2px; color: var(--text); cursor: pointer; }
.check-row input {
  appearance: none; -webkit-appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border-radius: 7px;
  background: var(--card); box-shadow: inset 0 0 0 1.5px var(--text3); display: grid; place-items: center; transition: background .2s, box-shadow .2s;
}
.check-row input:checked { background: var(--tint); box-shadow: none; }
.check-row input:checked::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.inline-link { color: var(--tint); font-weight: 600; text-decoration: none; }
.parent-box { margin-top: 12px; padding: 14px; border-radius: 16px; background: var(--tint-soft); display: grid; gap: 10px; }
.parent-box[hidden] { display: none; }
.parent-box .foot { color: var(--text); margin: 0; }
.parent-box .check-row { margin-top: 0; }
.mail-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--brand); color: #fff; margin: 8px 0 18px; box-shadow: 0 10px 24px -8px rgba(255, 70, 50, .55); }
.mail-icon .ic { width: 32px; height: 32px; }
.spam-hint { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--fill2); font-size: 14px; line-height: 1.4; color: var(--text2); }
.spam-hint .ic { width: 18px; height: 18px; color: var(--blue); margin-top: 1px; }
.btn-spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; display: inline-block; }
.btn-secondary .btn-spinner, .btn-plain .btn-spinner, .photo .btn-spinner { border-color: var(--fill); border-top-color: var(--tint); }
.btn-spinner.big { width: 28px; height: 28px; border-color: var(--fill); border-top-color: var(--tint); margin-top: 34px; }
.loading-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* Hochladen: KI-Hinweis, PDF-Karte, Foto-Raster */
.ki-line { display: flex; align-items: center; gap: 8px; margin: 14px 4px 0; font-size: 14px; font-weight: 500; color: #E08600; letter-spacing: -.1px; }
.ki-line .ic { width: 18px; height: 18px; }
.ki-line.empty { color: var(--text2); }
.file-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.file-card .tile-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; }
.file-card .tile-ic .ic { width: 24px; height: 24px; }
.file-card .row-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.file-card.empty { padding: 0; }
.file-pick { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 16px 26px; border-radius: 20px; border: 2px dashed var(--sep); text-align: center; transition: transform .2s var(--ease); }
.file-pick:active { transform: scale(.98); }
.file-pick .tile-ic { margin-bottom: 6px; }
.file-pick b { font-size: 17px; letter-spacing: -.3px; }
.file-pick span:last-child { font-size: 13px; color: var(--text2); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photo, .photo-add { position: relative; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo.loading { display: grid; place-items: center; }
.photo-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.photo-x .ic { width: 14px; height: 14px; }
.photo-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--tint); box-shadow: none; border: 2px dashed var(--sep); background: none; padding: 8px; text-align: center; }
.photo-add .ic { width: 26px; height: 26px; }
.photo-grid.first { grid-template-columns: 1fr; }
.photo-grid.first .photo-add { aspect-ratio: auto; min-height: 150px; font-size: 16px; gap: 10px; }
.photo-grid.first .photo-add .ic { width: 34px; height: 34px; }

/* Bauen: Fehler */
.build-actions { width: 100%; max-width: 320px; display: grid; gap: 10px; margin-top: 30px; }
.build.failed .build-orb .glow { background: conic-gradient(from 0deg, #FF6B5E, #FF2D55, #8E8E93, #FF6B5E); opacity: .3; }
.build.failed .build-orb .spin { animation-play-state: paused; opacity: .4; }
.build.failed .build-orb .core .ic { animation: none; color: var(--text3); }

/* Rechtliche Seiten in der App */
.screen.legal { display: flex; flex-direction: column; overflow: hidden; }
.legal-frame { flex: 1; width: 100%; border: 0; background: var(--bg); }
