/* CardVault – dunkles Kino-Layout: schwarze Fläche, großes Titelbild aus der wertvollsten Karte,
   fette enge Schrift, kleine Großbuchstaben für Kategorien, Pillen-Knöpfe. Jede Kategorie hat ihre Akzentfarbe. */
@font-face { font-family: "Inter Tight"; src: url("../fonts/inter-tight.woff2") format("woff2"); font-weight: 600 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  /* Farben */
  --ink: #000;
  --panel: #0e0e10;
  --card: #161618;
  --field: #1e1e21;
  --raise: #2a2a2e;
  --line: rgba(255, 255, 255, .1);
  --line-2: rgba(255, 255, 255, .18);
  --text: #fdfdfd;
  --soft: rgba(255, 255, 255, .78);
  --muted: rgba(255, 255, 255, .55);
  --up: #3ddc84;
  --down: #ff5d73;
  --warn: #ffd15c;
  /* Akzent je Kategorie (wird über body[data-game] umgeschaltet) */
  --accent: #ffd15c;
  --accent-deep: #3a2c06;
  /* Schrift */
  --display: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  /* Maße */
  --tabbar-h: 72px;
  --safe-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --safe-bottom: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  color-scheme: dark;
}
body[data-game="pokemon"] { --accent: #ffd15c; --accent-deep: #3a2c06; }
body[data-game="yugioh"] { --accent: #c7a8ff; --accent-deep: #22163f; }
body[data-game="soccer"] { --accent: #8fe3b0; --accent-deep: #0c2e1d; }
body[data-game="football"] { --accent: #ffab9c; --accent-deep: #3a1510; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 15px/1.5 var(--body);
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
}
input, select { user-select: text; -webkit-user-select: text; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: -.025em; line-height: 1.05; text-wrap: balance; }
.eyebrow { font-family: var(--body); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }

/* ---------- Layout ---------- */
#app { height: 100%; display: flex; flex-direction: column; }
main { flex: 1; position: relative; overflow: hidden; }
.view {
  position: absolute; inset: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(var(--safe-top) + 8px) 18px calc(var(--tabbar-h) + var(--safe-bottom) + 28px);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.view.active { opacity: 1; pointer-events: auto; }
#view-collection { padding-top: 0; }
#view-scan { padding: 0; overflow: hidden; }

/* ---------- Titelbild (Sammlung) ---------- */
.hero {
  position: relative; margin: 0 -18px 6px;
  min-height: min(470px, 58vh);
  padding: calc(var(--safe-top) + 8px) 18px 22px;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden; isolation: isolate;
}
.hero-art {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 80% at 80% 10%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 60%),
    linear-gradient(180deg, var(--accent-deep), #000 92%);
  background-size: cover; background-position: center 22%;
}
/* Auf die Illustration der Karte zoomen – Kartentext würde hinter dem Wert stören */
.hero-art[data-art="pokemon"] { background-size: 220% auto; background-position: 50% 19%; }
.hero-art[data-art="yugioh"] { background-size: 200% auto; background-position: 50% 40%; }
.hero-art[data-art="photo"] { background-size: 160% auto; background-position: 50% 35%; }
@media (min-width: 700px) { .hero-art[data-art] { background-size: cover; } }
.hero-art::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,.15) 48%, rgba(0,0,0,.92) 88%, #000 100%),
    radial-gradient(90% 70% at 0% 100%, rgba(0,0,0,.65), transparent 70%);
}
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
.brand img { width: 30px; height: 30px; }
.hero-body { display: flex; flex-direction: column; gap: 6px; padding-top: 40px; }
.value-amount { font-family: var(--display); font-weight: 900; font-size: clamp(46px, 13vw, 64px); letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.value-meta { display: flex; gap: 8px; align-items: center; color: var(--soft); font-size: 14.5px; font-weight: 500; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.hero-actions .btn { height: 44px; padding: 0 18px; font-size: 15px; }
.change { font-weight: 700; font-variant-numeric: tabular-nums; }
.change.up { color: var(--up); }
.change.down { color: var(--down); }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text); background: rgba(255,255,255,.08);
  transition: transform .15s ease, background .15s ease;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn.glass { background: rgba(0,0,0,.42); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.icon-btn.lg { width: 54px; height: 54px; }
.icon-btn.on { background: var(--accent); color: #000; border-color: transparent; }

/* ---------- Knöpfe (Pillen) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  font-family: var(--body); font-weight: 700; font-size: 15.5px; letter-spacing: -.01em;
  transition: transform .15s ease, background .15s ease, opacity .15s ease;
}
.btn svg { width: 18px; height: 18px; stroke-width: 2.4; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; }
.btn.white { background: #fff; color: #000; }
.btn.primary { background: var(--accent); color: #000; }
.btn.outline { border: 1.5px solid rgba(255,255,255,.82); color: #fff; }
.btn.secondary { background: var(--field); color: var(--text); }
.btn.danger { background: rgba(255, 93, 115, .14); color: var(--down); }
.btn.wide { width: 100%; }
.btn.spinning svg { animation: spin 1s linear infinite; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  height: 36px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,.8); font-size: 13px; font-weight: 700;
}

/* ---------- Kategorien (wie eine Hauptnavigation) ---------- */
.chips {
  display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -18px 22px; padding: 4px 18px 0; border-bottom: 1px solid var(--line);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: baseline; gap: 5px;
  padding: 10px 0 12px; position: relative;
  font-size: 12.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
  transition: color .15s ease;
}
.chip span { font-size: 11px; letter-spacing: 0; opacity: .7; }
.chip span:empty { display: none; }
.chip.on { color: var(--text); }
.chip.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }

/* ---------- Abschnitte ---------- */
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.section-head h2 { font-size: 26px; }
.page-head { display: flex; flex-direction: column; gap: 6px; padding: 18px 0 18px; }
.page-head h1 { font-size: 38px; }

/* ---------- Eingabefelder ---------- */
.toolbar { display: flex; gap: 10px; }
.input-wrap {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 16px; border-radius: 999px;
  background: var(--field); border: 1px solid transparent;
}
.input-wrap:focus-within { border-color: var(--line-2); }
.input-wrap svg { width: 18px; height: 18px; color: var(--muted); }
.input-wrap input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: 500 15px var(--body); }
.input-wrap input::placeholder { color: var(--muted); }
.input-wrap.big { height: 54px; }
.input-wrap.big input { font-size: 16px; }
input[type="search"]::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }
select {
  height: 46px; padding: 0 36px 0 16px; border-radius: 999px; appearance: none; -webkit-appearance: none;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 14px;
  border: 0; color: var(--text); font: 600 14px var(--body); outline: 0;
}
.search-form { margin-top: 4px; }
.search-tip { color: var(--muted); font-size: 13px; margin: 12px 2px 18px; }
.search-tip b { color: var(--text); }

/* ---------- Karten-Raster ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 20px 12px; }
.tile { text-align: left; display: flex; flex-direction: column; gap: 4px; animation: rise .35s ease both; }
.tile:active .tile-img { transform: scale(.96); }
.tile-img {
  position: relative; aspect-ratio: 63 / 88; border-radius: 9px; overflow: hidden;
  background: var(--card); margin-bottom: 4px;
  transition: transform .15s ease;
}
.tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .3s ease; }
.tile-img img.loaded { opacity: 1; }
.tile-img .noimg { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; color: var(--soft); font: 700 12px var(--body); text-align: center; padding: 8px; background: linear-gradient(160deg, var(--raise), var(--card)); }
.noimg-icon { font-size: 30px; }
.qty-badge {
  position: absolute; top: 6px; right: 6px; min-width: 24px; height: 22px; padding: 0 7px;
  border-radius: 999px; display: grid; place-items: center;
  background: #fff; color: #000; font-size: 11.5px; font-weight: 800;
}
.game-badge {
  position: absolute; left: 6px; top: 6px; padding: 3px 7px; border-radius: 999px;
  background: rgba(0,0,0,.72); font-size: 9.5px; font-weight: 800; letter-spacing: .08em; backdrop-filter: blur(6px);
}
.tile-name { font-family: var(--display); font-size: 15px; font-weight: 800; letter-spacing: -.015em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-sub { font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-price { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile-price.na { color: var(--muted); font-weight: 600; }
.skeleton { background: linear-gradient(90deg, var(--card) 0%, var(--raise) 50%, var(--card) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }

/* ---------- Leerer Zustand ---------- */
.empty { text-align: center; padding: 26px 12px; }
.empty h2 { font-size: 24px; margin-bottom: 8px; }
.empty p { color: var(--soft); margin: 0 auto 22px; max-width: 290px; }
.empty.small { padding-top: 34px; }
.empty-art { position: relative; height: 150px; margin-bottom: 22px; }
.ghost-card { position: absolute; left: 50%; top: 10px; width: 92px; height: 128px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.ghost-card.c1 { transform: translateX(-110%) rotate(-12deg); }
.ghost-card.c3 { transform: translateX(10%) rotate(12deg); }
.ghost-card.c2 { transform: translateX(-50%) translateY(-6px); z-index: 1; background: var(--accent); border: 0; }
.ghost-card.c2::after { content: ""; position: absolute; inset: 8px; border-radius: 6px; border: 2px dashed rgba(0,0,0,.3); }

/* ---------- Tableiste ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: grid; grid-template-columns: 1fr 100px 1fr; align-items: center;
  background: rgba(0,0,0,.88); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  transition: transform .25s ease;
}
body.scanning .tabbar { transform: translateY(calc(100% + 48px)); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; height: 100%; justify-content: center; }
.tab svg { width: 21px; height: 21px; }
.tab.active { color: var(--text); }
.scan-fab {
  width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: #000;
  transition: transform .15s ease;
}
.scan-fab svg { width: 24px; height: 24px; stroke-width: 2.4; }
.tab-scan { gap: 3px; }
.tab-scan:active .scan-fab { transform: scale(.92); }

/* ---------- Scanner ---------- */
.scanner { position: absolute; inset: 0; background: #000; overflow: hidden; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.scan-mask { position: absolute; inset: 0; display: grid; place-items: center; padding: 120px 0 230px; pointer-events: none; }
.scan-frame { position: relative; height: min(58vh, calc(84vw * 88 / 63)); aspect-ratio: 63 / 88; border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .32); transition: opacity .3s ease; }
.scanner.tracking .scan-frame { opacity: 0; }
.corner { position: absolute; width: 30px; height: 30px; border: 3px solid rgba(255,255,255,.92); }
.corner.tl { left: -2px; top: -2px; border-right: 0; border-bottom: 0; border-top-left-radius: 18px; }
.corner.tr { right: -2px; top: -2px; border-left: 0; border-bottom: 0; border-top-right-radius: 18px; }
.corner.bl { left: -2px; bottom: -2px; border-right: 0; border-top: 0; border-bottom-left-radius: 18px; }
.corner.br { right: -2px; bottom: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: 18px; }
.focus-ring {
  position: absolute; z-index: 2; width: 74px; height: 74px; margin: -37px 0 0 -37px; border-radius: 50%;
  border: 2px solid #fff; pointer-events: none; animation: focus .7s ease both;
}
.scan-top {
  position: absolute; left: 0; right: 0; top: 0; z-index: 3;
  padding: calc(var(--safe-top) + 12px) 16px 0;
  display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 10px;
}
.scan-top-right { display: flex; justify-content: flex-end; }
.live-status {
  justify-self: center; display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  padding: 9px 14px; border-radius: 999px; background: rgba(0,0,0,.6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.live-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.live-status.ok::before { background: var(--up); box-shadow: 0 0 10px var(--up); }
.live-status.warn::before { background: var(--warn); }
.mode-switch {
  position: absolute; left: 50%; top: calc(var(--safe-top) + 66px); transform: translateX(-50%); z-index: 3;
  display: flex; gap: 2px; padding: 4px; border-radius: 999px; width: max-content;
  background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.mode-switch button { padding: 7px 14px; border-radius: 999px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.72); white-space: nowrap; }
.mode-switch button.on { background: #fff; color: #000; }
.scan-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 40px 16px calc(var(--safe-bottom) + 26px);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.7) 45%);
}
.scan-hint { text-align: center; font-size: 13px; font-weight: 500; color: var(--soft); max-width: 330px; }
.cam-options { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.pill-toggle {
  height: 32px; padding: 0 14px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.5);
  font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: rgba(255,255,255,.8);
}
.pill-toggle.on { background: #fff; color: #000; border-color: #fff; }
.zoom { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.14); }
.zoom button { min-width: 38px; height: 26px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 800; color: rgba(255,255,255,.8); }
.zoom button.on { background: #fff; color: #000; }
.scan-controls { display: flex; align-items: center; justify-content: center; gap: 44px; }
.shutter { position: relative; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; }
.shutter-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.shutter-ring circle { fill: none; stroke: rgba(255,255,255,.95); stroke-width: 4; }
#shutter-progress { stroke-dasharray: 258; stroke-dashoffset: 0; transition: stroke-dashoffset .15s linear, stroke .2s ease; }
.shutter.armed #shutter-progress { stroke: var(--up); }
.shutter span { width: 64px; height: 64px; border-radius: 50%; background: #fff; transition: transform .15s ease, background .2s ease; }
.shutter:active span { transform: scale(.86); }
.shutter:disabled { opacity: .5; }
.scan-status {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4;
  width: min(330px, 86vw); padding: 16px; border-radius: 20px;
  display: flex; gap: 14px; align-items: center;
  background: rgba(14,14,16,.94); border: 1px solid var(--line); backdrop-filter: blur(16px);
}
.scan-thumb { width: 64px; aspect-ratio: 63 / 88; border-radius: 6px; object-fit: cover; flex: none; animation: rise .3s ease both; }
.scan-status-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.scan-status-text { font-family: var(--display); font-weight: 800; font-size: 17px; }
.progress { height: 4px; border-radius: 2px; background: var(--raise); overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--accent); transition: width .25s ease; }
.camera-error {
  position: absolute; inset: 0; z-index: 2; padding: 40px 28px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px;
  background: #000;
}
.camera-error > svg { width: 44px; height: 44px; color: var(--muted); }
.camera-error h3 { font-size: 24px; }
.camera-error p { color: var(--soft); max-width: 300px; margin: 0 0 8px; }
.camera-error .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ---------- Sheets ---------- */
.sheet { position: fixed; inset: 0; z-index: 40; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.7); animation: fade .2s ease both; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: calc(100% - var(--safe-top) - 20px); overflow-y: auto;
  padding: 8px 18px calc(var(--safe-bottom) + 24px);
  background: var(--panel); border-radius: 24px 24px 0 0; border-top: 1px solid var(--line);
  animation: slideup .3s cubic-bezier(.2, .9, .3, 1) both;
}
.sheet.closing .sheet-panel { animation: slidedown .2s ease both; }
.sheet.closing .sheet-backdrop { animation: fade .2s ease reverse both; }
.sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--raise); margin: 4px auto 16px; }
.sheet-title { font-size: 28px; margin: 4px 0 16px; }

.detail-head { display: flex; gap: 16px; }
.detail-img { width: 42%; max-width: 190px; flex: none; aspect-ratio: 63/88; border-radius: 12px; overflow: hidden; background: var(--card); box-shadow: 0 24px 50px -20px rgba(0,0,0,1); }
.detail-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-info { min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-top: 2px; }
.detail-info h2 { font-size: 26px; overflow-wrap: anywhere; }
.meta-line { color: var(--soft); font-size: 13.5px; }
.detail-info h2 + .meta-line { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.match-tag { background: rgba(61,220,132,.14); color: var(--up); border-color: transparent; }

.price-box { margin: 20px 0 16px; padding: 18px; border-radius: 18px; background: var(--card); }
.price-main { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.price-main small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.price-main b { font-family: var(--display); font-size: 40px; font-weight: 900; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.price-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.price-stats div { padding: 10px 12px; border-radius: 12px; background: var(--field); }
.price-stats small { display: block; color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.price-stats b { font-size: 15px; font-variant-numeric: tabular-nums; }
.price-foot { margin-top: 12px; color: var(--muted); font-size: 11.5px; }

.label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 9px; }
.segmented { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--field); flex-wrap: wrap; gap: 2px; }
.segmented button { padding: 8px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--soft); }
.segmented button.on { background: #fff; color: #000; }
.segmented.wide { display: flex; width: 100%; margin-bottom: 14px; }
.segmented.wide button { flex: 1; }
#variant-select { width: 100%; }
.stepper { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; background: var(--field); padding: 4px; }
.stepper button { width: 38px; height: 38px; border-radius: 50%; font-size: 20px; font-weight: 700; }
.stepper button:active { background: var(--raise); }
.stepper span { min-width: 34px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.actions .btn { flex: 1; }

.alts { margin-top: 24px; }
.alts-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.alts-scroll .tile { width: 92px; flex: none; scroll-snap-align: start; }
.alts-scroll .tile.sel .tile-img { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Trefferauswahl ---------- */
.choice-head { margin-bottom: 14px; }
.choice-head p { color: var(--soft); margin: 6px 0 0; font-size: 14px; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 10px; }
.match-badge { position: absolute; right: 6px; bottom: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.78); font-size: 11px; font-weight: 800; color: var(--up); }
.match-badge.mid { color: var(--warn); }
.match-badge.low { color: var(--muted); }
.seen { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; background: var(--card); margin: 6px 0 14px; }
.seen img { width: 56px; aspect-ratio: 63 / 88; object-fit: cover; border-radius: 6px; flex: none; }
.seen b { display: block; font-size: 14px; }
.seen small { color: var(--soft); font-size: 13px; }

/* ---------- Echtheits-Check ---------- */
.fake-box { margin-top: 18px; padding: 18px; border-radius: 18px; background: var(--card); }
.fake-box .row-between h3 { font-size: 18px; }
.fake-box > p { color: var(--soft); font-size: 13px; margin: 8px 0 12px; }
.verdict { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; margin: 6px 0 14px; font-family: var(--display); font-weight: 800; font-size: 17px; }
.verdict .v-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; flex: none; color: #000; }
.verdict.ok { background: rgba(61,220,132,.12); color: var(--up); }
.verdict.ok .v-icon { background: var(--up); }
.verdict.warn { background: rgba(255,209,92,.12); color: var(--warn); }
.verdict.warn .v-icon { background: var(--warn); }
.verdict.bad { background: rgba(255,93,115,.14); color: var(--down); }
.verdict.bad .v-icon { background: var(--down); }
.check-list { display: flex; flex-direction: column; gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check i { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 900; margin-top: 1px; }
.check i.ok { background: rgba(61,220,132,.18); color: var(--up); }
.check i.warn { background: rgba(255,209,92,.18); color: var(--warn); }
.check i.bad { background: rgba(255,93,115,.2); color: var(--down); }
.check i.na { background: var(--raise); color: var(--muted); }
.check b { display: block; }
.check small { color: var(--soft); }
.tips { margin-top: 14px; }
.tips summary { cursor: pointer; font-weight: 700; list-style: none; text-decoration: underline; text-underline-offset: 3px; }
.tips summary::-webkit-details-marker { display: none; }
.tips ol { margin: 10px 0 0; padding-left: 20px; color: var(--soft); font-size: 14px; display: flex; flex-direction: column; gap: 8px; }
.disclaimer { color: var(--muted); font-size: 12px; margin-top: 12px; }

/* ---------- Formular (Sportkarten) ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.field label { display: block; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.field input { width: 100%; height: 48px; padding: 0 16px; border-radius: 14px; background: var(--field); border: 1px solid transparent; color: var(--text); font: 500 15px var(--body); outline: 0; }
.field input:focus { border-color: var(--line-2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-pick { width: 120px; aspect-ratio: 63/88; border-radius: 12px; flex: none; overflow: hidden; background: var(--field); border: 1.5px dashed var(--line-2); display: grid; place-items: center; text-align: center; color: var(--soft); font-size: 12px; font-weight: 700; }
.photo-pick img { width: 100%; height: 100%; object-fit: cover; }
.form-head { display: flex; gap: 14px; align-items: flex-start; }
.form-head .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.hint { color: var(--soft); font-size: 13px; padding: 12px 14px; border-radius: 14px; background: var(--card); }
.sport-panel { padding: 24px 20px; border-radius: 20px; background: linear-gradient(160deg, #0c2e1d, var(--card) 70%); display: flex; flex-direction: column; gap: 8px; }
.sport-panel h2 { font-size: 24px; }
.sport-panel > p { color: var(--soft); margin: 0; }

/* ---------- Einstellungen ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; width: 100%; padding: 15px 16px; border-radius: 16px; background: var(--card); }
.list-item small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.list-item svg { color: var(--muted); }
.list-item.danger b, .list-item.danger svg { color: var(--down); }
.list-item.armed { background: rgba(255,93,115,.14); }
.fineprint { color: var(--muted); font-size: 12px; margin-top: 18px; line-height: 1.6; }

/* ---------- Tutorial ---------- */
.onboarding { position: fixed; inset: 0; z-index: 60; overflow: hidden; background: #000; display: flex; flex-direction: column; padding: var(--safe-top) 0 calc(var(--safe-bottom) + 22px); }
.skip { position: absolute; right: 18px; top: calc(var(--safe-top) + 16px); z-index: 2; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); padding: 8px; }
.ob-track { flex: 1; display: flex; transition: transform .45s cubic-bezier(.2, .9, .3, 1); }
.ob-slide { flex: 0 0 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 60px 24px 14px; position: relative; isolation: isolate; }
.ob-slide::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(110% 70% at 70% 20%, var(--tint), transparent 70%), #000; }
.ob-slide[data-tint="gold"] { --tint: rgba(255, 196, 64, .4); }
.ob-slide[data-tint="blue"] { --tint: rgba(76, 141, 255, .4); }
.ob-slide[data-tint="red"] { --tint: rgba(255, 93, 115, .38); }
.ob-slide[data-tint="green"] { --tint: rgba(61, 220, 132, .34); }
.ob-text { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.ob-slide h2 { font-size: 38px; font-weight: 900; }
.ob-slide p { color: var(--soft); margin: 0; font-size: 16px; }
.ob-slide p b { color: #fff; }
.ob-footer { padding: 0 24px; display: flex; align-items: center; gap: 18px; }
.ob-footer .btn { flex: 1; max-width: 300px; margin-left: auto; }
.dots { display: flex; gap: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.3); transition: width .3s ease, background .3s ease; }
.dots i.on { width: 22px; background: #fff; }

.ob-art { flex: 1; position: relative; display: grid; place-items: center; min-height: 220px; }
.fan { position: absolute; width: 116px; height: 162px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); }
.fan.f1 { background: linear-gradient(160deg, #4c8dff, #1b2d5c); transform: rotate(-16deg) translateX(-62px); }
.fan.f3 { background: linear-gradient(160deg, #c7a8ff, #3b2a6b); transform: rotate(16deg) translateX(62px); }
.fan.f2 { background: linear-gradient(160deg, #ffe08a, #f2b100); z-index: 1; transform: translateY(-10px); box-shadow: 0 24px 60px -20px rgba(255,180,0,.7); animation: float 3s ease-in-out infinite; }
.fan.f2::after { content: "€"; position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px; border-radius: 50%; background: #000; color: #ffd15c; display: grid; place-items: center; font: 900 30px var(--display); }
.mini-frame { position: relative; width: 156px; height: 216px; border-radius: 16px; border: 3px solid var(--up); display: grid; place-items: center; box-shadow: 0 0 40px rgba(61,220,132,.4); }
.mini-card { width: 132px; height: 186px; border-radius: 10px; background: linear-gradient(160deg, #ffe680, #f0b400); position: relative; }
.mini-num { position: absolute; left: 8px; bottom: 6px; font-size: 11px; font-weight: 800; color: #1d1500; }
.art-price { display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: center; }
.price-pill { padding: 18px 28px; border-radius: 22px; background: var(--card); text-align: center; }
.price-pill small { display: block; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.price-pill b { font: 900 46px var(--display); letter-spacing: -.035em; }
.variant-row { display: flex; gap: 6px; }
.variant-row span { padding: 8px 14px; border-radius: 999px; background: var(--card); color: var(--soft); font-size: 13px; font-weight: 700; }
.variant-row span.on { background: #fff; color: #000; }
.art-fake { display: flex; flex-direction: column; gap: 10px; width: 230px; justify-content: center; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 999px; background: var(--card); font-weight: 700; font-size: 14px; }
.check-row i { width: 12px; height: 12px; border-radius: 50%; }
.check-row i.ok { background: var(--up); }
.check-row i.warn { background: var(--warn); }
.art-collection { display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; }
.stack-value { text-align: center; }
.stack-value small { display: block; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.stack-value b { font: 900 40px var(--display); letter-spacing: -.035em; }
.mini-grid { display: grid; grid-template-columns: repeat(3, 46px); gap: 8px; }
.mini-grid i { height: 64px; border-radius: 6px; background: var(--card); }
.mini-grid i:nth-child(2) { background: #ffd15c; }
.mini-grid i:nth-child(4) { background: #c7a8ff; }
.mini-grid i:nth-child(6) { background: #8fe3b0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px); z-index: 80;
  transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px);
  padding: 13px 20px; border-radius: 999px;
  background: #fff; color: #000; font-weight: 700; font-size: 14px; text-align: center;
  box-shadow: 0 14px 34px -10px rgba(0,0,0,.8);
  animation: toast .25s ease both;
}
body.scanning .toast { bottom: calc(var(--safe-bottom) + 210px); }

/* ---------- Animationen ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes slideup { from { transform: translateY(100%); } }
@keyframes slidedown { to { transform: translateY(100%); } }
@keyframes float { 50% { transform: translateY(-18px); } }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes focus { from { transform: scale(1.5); opacity: 0; } 60% { transform: scale(.95); opacity: 1; } to { transform: scale(1); opacity: .9; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (min-width: 700px) {
  .view { padding-left: max(18px, calc(50% - 340px)); padding-right: max(18px, calc(50% - 340px)); }
  .hero { margin-left: calc(-1 * max(18px, calc(50% - 340px))); margin-right: calc(-1 * max(18px, calc(50% - 340px))); padding-left: max(18px, calc(50% - 340px)); padding-right: max(18px, calc(50% - 340px)); }
  .chips { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .sheet-panel { left: 50%; width: 580px; transform: translateX(-50%); animation-name: fade; }
}
