/* fritzgetz 2.0 - Mode-Kampagne statt Formular: kraeftige Farbflaechen, Plakat-Typo (Anton), DM Sans fuer Text.
   Drei Looks: nacht (Standard, Schwarz + Acid-Lime), koralle (Warmweiss + Koralle), lila (Lavendel + Violett). */
@font-face { font-family: "Anton"; src: url("/fonts/anton.woff") format("woff"); font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/fonts/dmsans.woff") format("woff"); font-weight: 100 1000; font-display: swap; }

:root, [data-look="nacht"] {
  --bg: #0b0b0e;
  --surface: #17171c;
  --surface-2: #222229;
  --surface-3: #2e2e36;
  --ink: #f6f5f1;
  --ink-2: #a8a5a0;
  --ink-3: #6f6d69;
  --line: rgba(255, 255, 255, .08);
  --primary: #f6f5f1;
  --on-primary: #0b0b0e;
  --hero-bg: #d9ff3e;
  --hero-ink: #0b0b0e;
  --hero-tile: rgba(11, 11, 14, .08);
  --fab-bg: #d9ff3e;
  --fab-ink: #0b0b0e;
  --chip-on: #d9ff3e;
  --chip-on-ink: #0b0b0e;
  --accent: #ff5a3c;
  --accent-soft: rgba(255, 90, 60, .16);
  --win: #d9ff3e;
  --win-ink: #0b0b0e;
  --win-soft: rgba(217, 255, 62, .14);
  --glass: rgba(14, 14, 18, .62);
  --glass-ink: #f6f5f1;
  --shadow-1: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 6px 20px rgba(0, 0, 0, .35);
  --shadow-2: 0 24px 60px rgba(0, 0, 0, .55);
  color-scheme: dark;
}
[data-look="koralle"] {
  --bg: #fff7f1;
  --surface: #ffffff;
  --surface-2: #f6ebe3;
  --surface-3: #ecdcd0;
  --ink: #1a1210;
  --ink-2: #6e5f58;
  --ink-3: #a8978e;
  --line: rgba(26, 18, 16, .08);
  --primary: #1a1210;
  --on-primary: #ffffff;
  --hero-bg: #ff5a3c;
  --hero-ink: #ffffff;
  --hero-tile: rgba(255, 255, 255, .16);
  --fab-bg: #1a1210;
  --fab-ink: #ffffff;
  --chip-on: #1a1210;
  --chip-on-ink: #ffffff;
  --accent: #ff5a3c;
  --accent-soft: #ffe1d9;
  --win: #0c8f5f;
  --win-ink: #ffffff;
  --win-soft: #d8f2e6;
  --glass: rgba(255, 255, 255, .78);
  --glass-ink: #1a1210;
  --shadow-1: 0 1px 2px rgba(60, 20, 10, .05), 0 8px 24px rgba(60, 20, 10, .07);
  --shadow-2: 0 24px 60px rgba(60, 20, 10, .2);
  color-scheme: light;
}
[data-look="lila"] {
  --bg: #f3f0ff;
  --surface: #ffffff;
  --surface-2: #e9e4fb;
  --surface-3: #dcd4f7;
  --ink: #16112c;
  --ink-2: #625a80;
  --ink-3: #9d96b8;
  --line: rgba(22, 17, 44, .08);
  --primary: #16112c;
  --on-primary: #ffffff;
  --hero-bg: #6b4eff;
  --hero-ink: #ffffff;
  --hero-tile: rgba(255, 255, 255, .14);
  --fab-bg: #d9ff3e;
  --fab-ink: #16112c;
  --chip-on: #6b4eff;
  --chip-on-ink: #ffffff;
  --accent: #ff4f7b;
  --accent-soft: #ffe0e9;
  --win: #6b4eff;
  --win-ink: #ffffff;
  --win-soft: #e6e0ff;
  --glass: rgba(255, 255, 255, .78);
  --glass-ink: #16112c;
  --shadow-1: 0 1px 2px rgba(40, 20, 120, .05), 0 8px 24px rgba(40, 20, 120, .08);
  --shadow-2: 0 24px 60px rgba(40, 20, 120, .2);
  color-scheme: light;
}
:root {
  --r-xl: 32px;
  --r-l: 26px;
  --r-m: 18px;
  --r-s: 12px;
  --display: "Anton", "Archivo Black", Impact, "Arial Narrow Bold", sans-serif;
  --spring: cubic-bezier(.2, .9, .25, 1.15);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font: 16px/1.45 "DM Sans", "Google Sans Flex", Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
.ic { width: 24px; height: 24px; flex: none; }
.hidden { display: none !important; }
.invisible { visibility: hidden; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, #111); display: inline-block; flex: none; box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--ink) 22%, transparent); }

#app { max-width: 720px; margin: 0 auto; }

/* ---------------------------------------------------------------- Kopfzeile */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + var(--safe-t)) 16px 10px 20px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
.topbar.overlay { position: fixed; left: 0; right: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; max-width: 720px; margin: 0 auto; padding-left: 16px; }
.topbar.overlay::before { content: ""; position: absolute; inset: 0 0 -18px; background: linear-gradient(var(--bg) 55%, transparent); opacity: 0; z-index: -1; pointer-events: none; animation: bar-in linear both; animation-timeline: scroll(root); animation-range: 120px 300px; }
@keyframes bar-in { to { opacity: 1; } }
.scan.fake-cam { background: #2a2622 center 30% / cover no-repeat; }
.topbar .title { font-weight: 700; font-size: 18px; }
.brand { font-weight: 800; font-size: 24px; letter-spacing: -.05em; display: flex; align-items: baseline; gap: 2px; }
.brand i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; transform: translateY(-1px); }
.topbar.on-hero { background: var(--hero-bg); color: var(--hero-ink); backdrop-filter: none; -webkit-backdrop-filter: none; }
[data-look="koralle"] .on-hero .brand i { background: var(--hero-ink); }
.topbar.on-hero .icon-btn:active { background: var(--hero-tile); }
.icon-btn { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; transition: background .2s, transform .25s var(--spring); }
.icon-btn:active { transform: scale(.9); background: var(--surface-2); }
.icon-btn.ghost { visibility: hidden; }
.icon-btn.glass { background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow-1); }
.icon-btn.on { background: #ffd84d; color: #121214; }

/* ---------------------------------------------------------------- Start */
.home { padding: 0 16px; }
.hero {
  background: var(--hero-bg); color: var(--hero-ink); margin: 0 -16px 18px; padding: 6px 20px 22px;
  border-radius: 0 0 var(--r-xl) var(--r-xl); position: relative; overflow: hidden;
}
.hero::after { content: ""; position: absolute; right: -60px; top: -40px; width: 220px; height: 220px; border-radius: 50%; border: 34px solid var(--hero-tile); pointer-events: none; }
.eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 700; letter-spacing: .01em; opacity: .75; position: relative; z-index: 1; }
.hero h1 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(66px, 20vw, 104px); line-height: .9; letter-spacing: .004em; margin: 0; position: relative; z-index: 1; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 20px; position: relative; z-index: 1; }
.stats > div { background: var(--hero-tile); border-radius: var(--r-m); padding: 12px 13px 11px; min-width: 0; }
.stats b { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats span { font-size: 12.5px; font-weight: 600; opacity: .72; }
.stats .win { background: var(--hero-ink); color: var(--hero-bg); }
.stats .win span { opacity: .8; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 4px 14px; margin: 0 -16px; padding-left: 20px; padding-right: 20px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; font-size: 14.5px; white-space: nowrap;
  transition: background .2s, color .2s, transform .25s var(--spring);
}
.chip em { font-style: normal; color: var(--ink-3); font-weight: 600; }
.chip:active { transform: scale(.94); }
.chip.active { background: var(--chip-on); color: var(--chip-on-ink); box-shadow: none; }
.chip.active em { color: color-mix(in srgb, var(--chip-on-ink) 55%, transparent); }
.chip.active .dot { box-shadow: 0 0 0 1.5px var(--chip-on), 0 0 0 3px color-mix(in srgb, var(--chip-on-ink) 45%, transparent); }
.chip .dot[style*="transparent"] { display: none; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card {
  background: var(--surface); border-radius: var(--r-l); overflow: hidden; box-shadow: var(--shadow-1); cursor: pointer;
  animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms);
  transition: transform .3s var(--spring), box-shadow .3s;
}
.card:active { transform: scale(.97); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.media { position: relative; aspect-ratio: 4 / 5; background: var(--surface-2); }
.media img, .media .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.media .ph, .detail-media .ph { display: grid; }
.detail-media .ph .ic { width: 28%; height: 28%; }
.ph { display: grid; place-items: center; color: var(--ink-3); background: linear-gradient(160deg, var(--surface-2), var(--surface-3)); }
.ph .ic { width: 40%; height: 40%; stroke-width: 1.4; }
.pill {
  position: absolute; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; letter-spacing: -.01em;
}
.pill.store { left: 8px; bottom: 8px; background: var(--glass); color: var(--glass-ink); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); max-width: calc(100% - 16px); }
.pill.sale { right: 8px; top: 8px; background: var(--accent); color: #fff; font-family: var(--display); font-weight: 400; font-size: 15px; letter-spacing: .02em; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 45%, transparent); }
.pill.sale.big { height: 40px; padding: 0 16px; font-size: 21px; right: 16px; top: auto; bottom: 18px; }
.meta { padding: 11px 13px 14px; }
.meta h3 { margin: 0 0 6px; font-size: 14.5px; line-height: 1.25; font-weight: 600; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.price { margin: 0; display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.price b { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.price s, .big-price s { color: var(--ink-3); font-size: 13.5px; }
.price.searching { color: var(--ink-2); font-size: 13.5px; gap: 8px; align-items: center; }
.spark { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }

.fab-space { height: calc(110px + var(--safe-b)); }
.fab {
  position: fixed; left: 50%; bottom: calc(22px + var(--safe-b)); transform: translateX(-50%); z-index: 30;
  display: inline-flex; align-items: center; gap: 12px; height: 68px; padding: 0 30px 0 26px; border-radius: 999px;
  background: var(--fab-bg); color: var(--fab-ink); font-weight: 800; font-size: 18px; letter-spacing: -.01em; text-decoration: none;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--fab-bg) 40%, rgba(0,0,0,.35)), 0 2px 6px rgba(0, 0, 0, .25);
  transition: transform .35s var(--spring), box-shadow .3s;
  animation: fab-in .6s var(--spring) both .1s;
}
.fab .ic { width: 28px; height: 28px; }
.fab:active { transform: translateX(-50%) scale(.93); }
.fab.wide { width: min(calc(100% - 32px), 520px); justify-content: center; }
@keyframes fab-in { from { opacity: 0; transform: translate(-50%, 30px) scale(.8); } }

/* ---------------------------------------------------------------- Leerer Zustand */
.empty { text-align: center; padding: 10px 12px 0; }
.empty h2 { font-size: 27px; font-weight: 800; letter-spacing: -.04em; line-height: 1.08; margin: 26px 0 10px; }
.empty p { color: var(--ink-2); margin: 0 auto; max-width: 340px; }
.empty-art { position: relative; height: 190px; display: grid; place-items: center; }
.tag-card {
  width: 150px; height: 170px; border-radius: 22px; background: #f6f5f1; color: #111; box-shadow: var(--shadow-2); transform: rotate(-7deg);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; position: relative; animation: float 5s ease-in-out infinite;
}
.tag-card::before { content: ""; position: absolute; top: 14px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 1px 3px rgba(0,0,0,.15); }
.tag-card .bars { height: 44px; margin-bottom: 12px; background: repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 5px, #111 5px 6px, transparent 6px 9px, #111 9px 12px, transparent 12px 14px); border-radius: 3px; opacity: .85; }
.tag-card span { font-family: var(--display); font-size: 24px; letter-spacing: .01em; text-align: left; }
.price-drop { position: absolute; right: calc(50% - 125px); top: 22px; display: flex; align-items: center; gap: 4px; padding: 10px 14px 10px 10px; border-radius: 18px; background: var(--accent); color: #fff; font-family: var(--display); font-size: 22px; box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 45%, transparent); transform: rotate(6deg); animation: float 5s ease-in-out infinite reverse; }
@keyframes float { 50% { translate: 0 -8px; } }
.steps { list-style: none; padding: 0; margin: 26px auto 0; display: grid; gap: 10px; max-width: 360px; text-align: left; }
.steps li { display: flex; gap: 14px; align-items: center; background: var(--surface); border-radius: var(--r-m); padding: 14px 16px; box-shadow: var(--shadow-1); }
.steps .ic { width: 22px; height: 22px; color: var(--fab-ink); background: var(--fab-bg); padding: 8px; box-sizing: content-box; border-radius: 12px; }
.steps b { display: block; font-size: 15px; }
.steps span { font-size: 14px; color: var(--ink-2); }

/* ---------------------------------------------------------------- Scanner */
#layer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
#layer.open { pointer-events: auto; }
.scan { position: absolute; inset: 0; background: #000; color: #fff; animation: fade .25s var(--ease); overflow: hidden; }
@keyframes fade { from { opacity: 0; } }
.scan video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-shade { position: absolute; inset: 0; background: radial-gradient(120% 70% at 50% 40%, rgba(0,0,0,.0) 30%, rgba(0,0,0,.55) 100%); }
.frame {
  position: absolute; left: 50%; top: 38%; width: min(78vw, 360px); height: min(46vw, 210px); transform: translate(-50%, -50%);
  border-radius: 28px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); transition: box-shadow .3s;
}
.frame i { position: absolute; width: 44px; height: 44px; border: 4px solid #fff; transition: border-color .25s, transform .4s var(--spring); }
.frame i:nth-child(1) { left: -2px; top: -2px; border-right: 0; border-bottom: 0; border-top-left-radius: 28px; }
.frame i:nth-child(2) { right: -2px; top: -2px; border-left: 0; border-bottom: 0; border-top-right-radius: 28px; }
.frame i:nth-child(3) { left: -2px; bottom: -2px; border-right: 0; border-top: 0; border-bottom-left-radius: 28px; }
.frame i:nth-child(4) { right: -2px; bottom: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: 28px; }
.laser { position: absolute; left: 18px; right: 18px; height: 2px; top: 50%; background: linear-gradient(90deg, transparent, var(--accent), transparent); box-shadow: 0 0 18px 3px color-mix(in srgb, var(--accent) 70%, transparent); animation: laser 2.2s ease-in-out infinite; border-radius: 2px; }
@keyframes laser { 0%, 100% { transform: translateY(-70px); opacity: .3; } 50% { transform: translateY(70px); opacity: 1; } }
.frame.hit i { border-color: #4ade80; transform: scale(.94); }
.frame.hit .laser { display: none; }
.scan-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: calc(12px + var(--safe-t)) 16px; font-weight: 700; }
.scan-top .icon-btn.glass { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: none; }
.scan-hint { position: absolute; left: 24px; right: 24px; top: calc(38% + min(23vw, 105px) + 22px); text-align: center; margin: 0; font-weight: 600; font-size: 15px; text-shadow: 0 1px 8px rgba(0,0,0,.5); display: flex; justify-content: center; align-items: center; gap: 10px; }
.scan-panel {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 16px calc(18px + var(--safe-b));
  background: var(--surface); color: var(--ink); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.35);
  animation: up .45s var(--spring);
}
@keyframes up { from { transform: translateY(100%); } }
.panel-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; margin: 2px 4px 10px; }
.panel-label .ic { width: 18px; height: 18px; }
.scan-chips { margin: 0 -16px; padding: 0 16px 14px; }
.scan-actions { display: flex; gap: 10px; }
.scan-actions .btn { flex: 1; white-space: nowrap; padding: 0 14px; font-size: 15.5px; }
.manual label { display: block; font-weight: 700; margin: 2px 4px 8px; }
.manual input { width: 100%; height: 60px; border-radius: var(--r-m); border: 0; background: var(--surface-2); padding: 0 18px; font-size: 22px; font-weight: 700; letter-spacing: .04em; margin-bottom: 16px; outline: none; }
.manual input:focus { box-shadow: inset 0 0 0 2px var(--ink); }

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 22px; border-radius: 999px;
  font-weight: 700; font-size: 16px; transition: transform .25s var(--spring), background .2s, opacity .2s; position: relative; text-decoration: none;
}
.btn .ic { width: 22px; height: 22px; }
.btn:active { transform: scale(.95); }
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.cta { background: var(--fab-bg); color: var(--fab-ink); font-weight: 800; }
.btn.cta.loading::after { border-color: var(--fab-ink); border-right-color: transparent; }
.btn.tonal { background: var(--surface-2); }
.btn.text { height: 44px; padding: 0 14px; color: var(--ink-2); }
.btn.danger { background: var(--accent-soft); color: var(--accent); }
.btn.xl { width: 100%; height: 62px; font-size: 17.5px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn.loading { color: transparent; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--on-primary); border-right-color: transparent; animation: spin .7s linear infinite; }
.btn.done { background: var(--win); color: var(--win-ink); animation: pop .4s var(--spring); }
@keyframes pop { 40% { transform: scale(1.04); } }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- Bottom Sheet */
.sheet-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .35); animation: fade .25s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 720px; margin: 0 auto; z-index: 2;
  background: var(--surface); color: var(--ink); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 10px 18px calc(14px + var(--safe-b));
  box-shadow: 0 -12px 48px rgba(0, 0, 0, .3); transform: translateY(100%); transition: transform .5s var(--spring);
  max-height: 92dvh; overflow-y: auto;
}
.sheet.in { transform: none; }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 0 auto 16px; }
.product { display: flex; gap: 16px; align-items: center; }
.pimg { width: 104px; height: 130px; border-radius: var(--r-m); object-fit: cover; flex: none; background: var(--surface-2); }
.pinfo { min-width: 0; }
.pstore { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.pinfo h2 { font-size: 21px; font-weight: 800; line-height: 1.15; letter-spacing: -.035em; margin: 6px 0 6px; }
.pcode { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pprice { display: flex; align-items: center; justify-content: space-between; margin: 18px 2px 18px; gap: 12px; }
.pprice b { font-family: var(--display); font-weight: 400; font-size: 46px; letter-spacing: .01em; line-height: 1; }
.stock { font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 999px; white-space: nowrap; }
.stock.in { background: var(--win-soft); color: var(--win); }
.stock.out { background: var(--accent-soft); color: var(--accent); }
.sheet-foot { display: flex; justify-content: center; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.choices { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px 14px; padding: 0 18px; }
.choice { flex: none; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 14px; background: var(--surface-2); font-weight: 600; }
.choice b { font-variant-numeric: tabular-nums; }
.choice.active { background: var(--primary); color: var(--on-primary); }
.nf { text-align: center; padding: 6px 8px 16px; }
.nf-icon { width: 64px; height: 64px; border-radius: 22px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--surface-2); }
.nf h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.03em; }
.nf p { margin: 0; color: var(--ink-2); }

/* ---------------------------------------------------------------- Detail */
.detail { padding-bottom: 20px; }
.detail-media { position: relative; aspect-ratio: 4 / 4.6; max-height: 62dvh; width: 100%; background: var(--surface-2); border-radius: 0 0 var(--r-xl) var(--r-xl); overflow: hidden; }
.detail-media img, .detail-media .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-body { padding: 20px 18px 0; }
.detail-body h1 { font-size: 28px; font-weight: 800; line-height: 1.08; letter-spacing: -.045em; margin: 8px 0 12px; }
.big-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.big-price b { font-family: var(--display); font-weight: 400; font-size: 58px; letter-spacing: .01em; line-height: .95; }
.big-price s { font-size: 18px; }
.save-badge { background: var(--win-soft); color: var(--win); font-weight: 700; font-size: 13.5px; padding: 6px 11px; border-radius: 999px; }
.muted { color: var(--ink-3); font-size: 14px; }
.chart { margin: 18px 0 4px; background: var(--surface); border-radius: var(--r-l); padding: 16px 14px 12px; box-shadow: var(--shadow-1); color: var(--ink); }
.chart svg { width: 100%; height: 140px; display: block; overflow: visible; }
.chart .win { color: var(--win); }
.chart svg path.win, .chart svg .dotend.win { color: var(--win); }
.chart svg .dotend { fill: currentColor; stroke: var(--surface); stroke-width: 3; }
.chart svg:has(.win) { color: var(--win); }
.chart-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); margin-top: 8px; font-variant-numeric: tabular-nums; gap: 6px; }
.chart.skeleton { height: 190px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty-chart { color: var(--ink-3); text-align: center; padding: 32px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.tile { background: var(--surface); border-radius: var(--r-m); padding: 14px; box-shadow: var(--shadow-1); display: grid; gap: 2px; }
.tile .ic { width: 20px; height: 20px; color: var(--ink-3); margin-bottom: 6px; }
.tile span { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.tile b { font-size: 15.5px; font-variant-numeric: tabular-nums; }
.pending-box { display: flex; gap: 14px; align-items: center; background: var(--surface); border-radius: var(--r-l); padding: 18px; box-shadow: var(--shadow-1); }
.pending-box p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.expiry { display: flex; align-items: center; gap: 8px; justify-content: center; color: var(--ink-3); font-size: 13px; margin: 18px 0; }
.expiry .ic { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- Einstellungen + Karten */
.setting-card { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-1); overflow: hidden; }
.setting-card .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; min-height: 68px; text-decoration: none; }
.setting-card .row + .row { border-top: 1px solid var(--line); }
.setting-card .row > div:first-child, .setting-card a.row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.setting-card a.row > span { flex: 1; }
.setting-card .row .ic { color: var(--ink-2); }
.setting-card b { display: block; font-size: 15.5px; font-weight: 650; }
.setting-card small { display: block; color: var(--ink-2); font-size: 13px; margin-top: 1px; }
.setting-card select { border: 0; background: var(--surface-2); border-radius: 12px; height: 40px; padding: 0 10px; max-width: 46%; font-weight: 600; }
.target-input { display: flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 14px; padding: 0 12px; height: 44px; flex: none; }
.target-input span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.target-input input { width: 74px; border: 0; background: none; font-weight: 700; font-size: 16px; outline: none; text-align: right; font-variant-numeric: tabular-nums; }
.switch { position: relative; width: 56px; height: 32px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); transition: background .25s; }
.switch i::after { content: ""; position: absolute; left: 4px; top: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .35s var(--spring); }
.switch input:checked + i { background: var(--chip-on); }
.switch input:checked + i::after { transform: translateX(24px); background: var(--chip-on-ink); }
.switch input:disabled + i { opacity: .4; }
.settings { padding: 4px 16px 40px; }
.group { margin-bottom: 22px; }
.group h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); margin: 8px 6px 10px; }
.code { display: block; margin: 0 16px 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font: 600 14px ui-monospace, monospace; letter-spacing: .04em; }
.restore { display: flex; gap: 8px; padding: 0 16px 16px; }
.restore input { flex: 1; min-width: 0; height: 52px; border-radius: 999px; border: 0; background: var(--surface-2); padding: 0 18px; outline: none; }
.fineprint { color: var(--ink-3); font-size: 12.5px; margin: 10px 6px 0; }
.version { text-align: center; color: var(--ink-3); font-size: 12.5px; margin-top: 18px; }

/* ---------------------------------------------------------------- Toast + Dialog */
.toast {
  position: fixed; left: 50%; bottom: calc(108px + var(--safe-b)); transform: translate(-50%, 20px); opacity: 0; z-index: 80;
  display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 18px; background: var(--ink); color: var(--bg);
  font-weight: 600; font-size: 14.5px; width: max-content; max-width: calc(100% - 32px); box-shadow: var(--shadow-2);
  transition: opacity .25s, transform .4s var(--spring); pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok .ic { color: #4ade80; }
.dialog-wrap { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: rgba(0,0,0,0); transition: background .2s; }
.dialog-wrap.in { background: rgba(0, 0, 0, .4); }
.dialog { background: var(--surface); border-radius: 30px; padding: 26px 22px 16px; width: min(100%, 400px); text-align: center; transform: scale(.9); opacity: 0; transition: transform .4s var(--spring), opacity .2s; box-shadow: var(--shadow-2); }
.dialog-wrap.in .dialog { transform: none; opacity: 1; }
.dialog-icon { width: 56px; height: 56px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto 14px; background: var(--surface-2); }
.dialog-icon.danger { background: var(--accent-soft); color: var(--accent); }
.dialog h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.03em; }
.dialog p { margin: 0 0 18px; color: var(--ink-2); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 6px; }

/* ---------------------------------------------------------------- Onboarding */
.onboard {
  position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px 22px calc(26px + var(--safe-b)); transition: opacity .35s, transform .35s var(--ease);
}
.onboard.out { opacity: 0; transform: scale(1.03); }
.onboard h1 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(52px, 15vw, 82px); line-height: .98; letter-spacing: .005em; margin: 0 0 18px; }
.onboard h1 em { font-style: normal; color: var(--hero-bg); }
[data-look="nacht"] .onboard .btn.cta { box-shadow: 0 0 40px rgba(217, 255, 62, .35); }
.onboard p { color: var(--ink-2); font-size: 17px; margin: 0 0 26px; }
.onboard small { text-align: center; color: var(--ink-3); margin-top: 14px; font-size: 12.5px; }
.ob-art { flex: 1; position: relative; min-height: 200px; }
.ob-tag, .ob-drop { position: absolute; display: flex; align-items: center; gap: 10px; border-radius: 24px; font-weight: 800; letter-spacing: -.03em; box-shadow: var(--shadow-2); }
.ob-tag { left: 8%; top: 22%; padding: 22px 26px; font-family: var(--display); font-weight: 400; font-size: 34px; background: #f6f5f1; color: #111; transform: rotate(-8deg); animation: float 6s ease-in-out infinite; }
.ob-tag span { text-decoration: line-through; text-decoration-thickness: 3px; text-decoration-color: var(--accent); }
.ob-drop { right: 8%; top: 48%; padding: 18px 22px; font-family: var(--display); font-weight: 400; font-size: 34px; background: var(--hero-bg); color: var(--hero-ink); transform: rotate(5deg); animation: float 6s ease-in-out infinite reverse; }
.loading-page { display: grid; place-items: center; height: 60vh; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

/* Look-Auswahl in den Einstellungen */
.looks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 14px; }
.look { border-radius: 20px; padding: 10px; background: var(--surface-2); color: var(--ink); text-align: left; display: grid; gap: 8px; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .2s, transform .25s var(--spring); }
.look:active { transform: scale(.95); }
.look.active { box-shadow: inset 0 0 0 2px var(--ink); }
.look .sw { height: 64px; border-radius: 14px; position: relative; overflow: hidden; }
.look .sw i { position: absolute; left: 8px; bottom: 8px; width: 34px; height: 14px; border-radius: 99px; }
.look b { font-size: 14px; }
