/* ===================================================================
   Pokédex – Design-System
   Dunkles Premium-Theme mit Holo-Akzenten, helles Theme über prefers-color-scheme.
   =================================================================== */
:root {
  --bg: #0b0d12;
  --bg2: #11141b;
  --surface: #161a24;
  --surface2: #1d2230;
  --surface3: #262c3c;
  --line: rgba(255, 255, 255, .07);
  --line2: rgba(255, 255, 255, .14);
  --text: #eef0f6;
  --muted: #8e96ab;
  --muted2: #5f6778;
  --accent: #5b8cff;
  --accent2: #a06bff;
  --pink: #ff5c8a;
  --gold: #f5c542;
  --green: #3ddc84;
  --red: #ff4d5a;
  --grad: linear-gradient(135deg, #5b8cff 0%, #a06bff 50%, #ff5c8a 100%);
  --grad-soft: linear-gradient(135deg, rgba(91,140,255,.18), rgba(160,107,255,.14), rgba(255,92,138,.12));
  --radius: 18px;
  --tab-h: 64px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --shadow: 0 12px 32px rgba(0, 0, 0, .4);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, .3);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f4f8;
    --bg2: #ffffff;
    --surface: #ffffff;
    --surface2: #f3f5fa;
    --surface3: #e9ecf4;
    --line: rgba(16, 20, 30, .08);
    --line2: rgba(16, 20, 30, .14);
    --text: #12151c;
    --muted: #6b7284;
    --muted2: #9aa1b2;
    --shadow: 0 12px 32px rgba(20, 30, 60, .14);
    --shadow-sm: 0 4px 14px rgba(20, 30, 60, .10);
    color-scheme: light;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { height: 100%; }
body {
  margin: 0; min-height: 100%;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 15px; line-height: 1.4;
  background: var(--bg); color: var(--text);
  overscroll-behavior-y: none; -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(900px 500px at -10% -10%, rgba(91,140,255,.16), transparent 60%),
    radial-gradient(700px 420px at 110% 0%, rgba(255,92,138,.12), transparent 60%);
  background-attachment: fixed;
}
body.locked { overflow: hidden; }
a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; }
h2.h { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 26px 4px 10px; }
.muted { color: var(--muted); font-size: .86rem; }
.small { font-size: .8rem; }
.center { text-align: center; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.grow { flex: 1; min-width: 120px; }
[hidden] { display: none !important; }

/* ---------- Kopfzeile ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--sat) + 10px) 18px 10px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.brand .ball {
  width: 26px; height: 26px; border-radius: 50%; position: relative; flex: none;
  background: linear-gradient(180deg, #ff4d5a 0 48%, #12141c 48% 54%, #fff 54%);
  box-shadow: 0 0 0 2px rgba(255,255,255,.08), 0 6px 14px rgba(255,77,90,.35);
}
.brand .ball::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; transform: translate(-50%, -50%); border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #12141c; }
.top-right { display: flex; align-items: center; gap: 10px; }
.top-total { text-align: right; line-height: 1.1; }
.top-total b { display: block; font-size: 1rem; font-variant-numeric: tabular-nums; }
.top-total span { font-size: .68rem; color: var(--muted); }
.syncdot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted2); flex: none; transition: .3s; }
.syncdot.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.syncdot.busy { background: var(--gold); animation: pulse 1s infinite; }
.syncdot.err { background: var(--red); }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- Layout / Tabs ---------- */
main { padding: 14px 14px calc(var(--tab-h) + var(--sab) + 36px); max-width: 1100px; margin: 0 auto; }
.view { display: none; animation: fade .25s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.tabbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--sab) + 10px); z-index: 40;
  height: var(--tab-h); display: flex; padding: 6px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--line2); border-radius: 22px; box-shadow: var(--shadow);
  max-width: 640px; margin: 0 auto;
}
.tab {
  flex: 1; border: none; background: none; color: var(--muted); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: .64rem; font-weight: 600; border-radius: 16px; position: relative; transition: .2s;
}
.tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tab.active { color: var(--text); background: color-mix(in srgb, var(--surface3) 80%, transparent); }
.tab.active svg { stroke: url(#gradStroke); }
.tab .badge { position: absolute; top: 6px; right: 14%; background: var(--grad); color: #fff; border-radius: 999px; padding: 1px 6px; font-size: .62rem; font-weight: 800; }

/* ---------- Eingaben & Buttons ---------- */
input[type=text], input[type=search], input[type=number], select, textarea {
  font: inherit; font-size: 16px; /* 16px = kein Auto-Zoom auf iOS */
  padding: 11px 13px; border-radius: 12px; width: 100%;
  border: 1px solid var(--line2); background: var(--surface); color: var(--text);
  min-width: 0; -webkit-appearance: none; appearance: none; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91,140,255,.22); }
input[type=search]::-webkit-search-decoration, input[type=search]::-webkit-search-cancel-button { display: none; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
textarea { resize: vertical; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: inherit; font-size: .92rem; font-weight: 650; padding: 11px 16px; border-radius: 13px;
  border: 1px solid var(--line2); background: var(--surface); color: var(--text);
  cursor: pointer; white-space: nowrap; transition: transform .1s, background .15s, border-color .15s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--grad); color: #fff; border: none; box-shadow: 0 8px 22px rgba(91,140,255,.32); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); }
.btn.big { padding: 14px 22px; font-size: 1rem; border-radius: 15px; }
.btn.small { padding: 7px 11px; font-size: .8rem; border-radius: 10px; }
.btn:disabled { opacity: .45; pointer-events: none; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.switch:last-child { border-bottom: none; }
.switch input { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 999px; background: var(--surface3); position: relative; flex: none; cursor: pointer; transition: .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { left: 21px; }

.seg { display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 3px; }
.seg button { flex: 1; border: none; background: none; color: var(--muted); padding: 8px 6px; border-radius: 10px; font-size: .8rem; font-weight: 650; cursor: pointer; transition: .15s; white-space: nowrap; }
.seg button.active { background: var(--surface3); color: var(--text); box-shadow: var(--shadow-sm); }

.chip {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line2); background: var(--surface);
  color: var(--text); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer;
}
.chip.active { background: var(--grad); border-color: transparent; color: #fff; }
.chip .n { color: var(--muted); font-weight: 500; }
.chip.active .n { color: rgba(255,255,255,.8); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.status { min-height: 1.3em; margin: 10px 2px; color: var(--muted); font-size: .88rem; }
.status.error { color: var(--red); }
.status.ok { color: var(--green); }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 10px; font-size: .72rem; font-weight: 700; background: var(--surface3); color: var(--muted); }
.pill.good { background: rgba(61,220,132,.15); color: var(--green); }
.pill.warn { background: rgba(245,197,66,.16); color: var(--gold); }
.pill.bad { background: rgba(255,77,90,.15); color: var(--red); }
.pill.grad { background: var(--grad); color: #fff; }

/* ---------- Hero (Sammlungswert) ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 18px 18px 16px; margin-bottom: 14px;
  background: var(--grad); color: #fff; box-shadow: 0 16px 40px rgba(120,100,255,.35);
}
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 200px at 90% -20%, rgba(255,255,255,.35), transparent 60%); pointer-events: none; }
.hero .label { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.hero .value { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 10px; font-variant-numeric: tabular-nums; }
.hero .mini { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .mini div { font-size: .78rem; opacity: .95; }
.hero .mini b { display: block; font-size: 1rem; font-variant-numeric: tabular-nums; }

/* ---------- Scanner ---------- */
.scanner {
  position: relative; width: 100%; max-width: 520px; margin: 0 auto; aspect-ratio: 3 / 4;
  background: #06070a; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line2);
}
@media (min-width: 700px) { .scanner { aspect-ratio: 4 / 3; max-width: 680px; } }
#video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  height: 78%; aspect-ratio: 63 / 88; border-radius: 16px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(4, 6, 10, .55);
}
.frame .c { position: absolute; width: 28px; height: 28px; border: 3px solid #fff; border-radius: 6px; transition: border-color .2s; }
.frame .c.tl { top: -2px; left: -2px; border-right: none; border-bottom: none; border-radius: 10px 0 0 0; }
.frame .c.tr { top: -2px; right: -2px; border-left: none; border-bottom: none; border-radius: 0 10px 0 0; }
.frame .c.bl { bottom: -2px; left: -2px; border-right: none; border-top: none; border-radius: 0 0 0 10px; }
.frame .c.br { bottom: -2px; right: -2px; border-left: none; border-top: none; border-radius: 0 0 10px 0; }
.frame.busy .c { border-color: var(--gold); }
.frame.ok .c { border-color: var(--green); }
.frame .laser { position: absolute; left: 6%; right: 6%; height: 2px; top: 0; background: linear-gradient(90deg, transparent, var(--accent), var(--pink), transparent); opacity: 0; box-shadow: 0 0 12px var(--accent); }
.frame.busy .laser { opacity: 1; animation: laser 1.4s ease-in-out infinite; }
@keyframes laser { 0% { top: 4%; } 50% { top: 94%; } 100% { top: 4%; } }
.frame .hint { position: absolute; left: 50%; bottom: -34px; transform: translateX(-50%); white-space: nowrap; color: #fff; font-size: .74rem; font-weight: 600; text-shadow: 0 1px 4px #000; }
.scan-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; z-index: 3; }
.scan-pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,.5); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 6px 11px; font-size: .74rem; font-weight: 600; }
.scan-bottom { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 36px; z-index: 3; }
.scan-pill.big { font-size: .86rem; padding: 9px 16px; max-width: 92%; text-align: center; white-space: normal; }
.varseg { display: flex; gap: 6px; }
.varseg button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 6px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surface); color: var(--muted); font: inherit; font-size: .78rem; cursor: pointer; }
.varseg button b { color: var(--text); font-size: .82rem; }
.varseg button span { color: var(--green); font-weight: 700; font-variant-numeric: tabular-nums; }
.varseg button.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); box-shadow: 0 0 0 2px rgba(91,140,255,.25); }
.shutter { width: 72px; height: 72px; border-radius: 50%; border: 4px solid #fff; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.shutter span { width: 56px; height: 56px; border-radius: 50%; background: #fff; transition: transform .1s; }
.shutter:active span { transform: scale(.85); }
.shutter:disabled { opacity: .35; }
.iconbtn {
  border: 1px solid rgba(255,255,255,.18); background: rgba(0,0,0,.5); color: #fff; font: inherit; font-size: 1.15rem;
  border-radius: 50%; width: 50px; height: 50px; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 0;
}
.iconbtn small { font-size: .55rem; font-weight: 700; letter-spacing: .04em; }
.iconbtn.active { background: var(--grad); border-color: transparent; }
.camera-off {
  position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px;
  background: radial-gradient(500px 300px at 50% 0%, rgba(91,140,255,.25), transparent 70%), linear-gradient(180deg, #171b26, #0a0c11); color: #dfe3ea;
}
.camera-off.hidden { display: none; }
.camera-off-inner { display: flex; flex-direction: column; gap: 14px; align-items: center; max-width: 320px; }
.camera-off h3 { margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }
.camera-off p { margin: 0; color: #aab1c2; font-size: .9rem; }
.scan-ico { width: 64px; height: 64px; border-radius: 20px; background: var(--grad); display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 30px rgba(91,140,255,.4); }
.scan-ico svg { width: 32px; height: 32px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.scan-result { margin-top: 14px; }
.hscroll { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll .tile { flex: 0 0 148px; scroll-snap-align: start; }
.hscroll:empty { display: none; }
.debug { font-size: .8rem; color: var(--muted); margin-top: 8px; }
.debug summary { cursor: pointer; }
.debug-crops { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.debug-crops canvas { max-width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.debug pre { white-space: pre-wrap; background: var(--surface); padding: 10px; border-radius: 10px; font-size: .72rem; }

/* ---------- Suche ---------- */
.searchbox { position: relative; }
.searchbox input { padding: 14px 44px 14px 44px; border-radius: 16px; font-size: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.searchbox .ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; pointer-events: none; }
.searchbox .clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: none; background: var(--surface3); color: var(--muted); width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: .9rem; }
.search-meta { display: flex; gap: 8px; align-items: center; margin: 10px 0; flex-wrap: wrap; }
.examples { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (max-width: 360px) { .grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Karten-Kacheln ---------- */
.tile {
  position: relative; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .12s, box-shadow .12s; display: flex; flex-direction: column;
}
.tile:active { transform: scale(.97); }
@media (hover: hover) { .tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); } }
.tile .img { aspect-ratio: 63 / 88; background: var(--surface2); display: flex; align-items: center; justify-content: center; position: relative; }
.tile .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .img .noimg { color: var(--muted2); font-size: .72rem; text-align: center; padding: 10px; }
.tile .info { padding: 8px 10px 10px; }
.tile .name { font-weight: 700; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .meta { font-size: .7rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.tile .prices { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; gap: 6px; }
.price { font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; font-size: .9rem; }
.psa { font-weight: 700; color: var(--gold); font-size: .72rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile .flag, .tile .qty, .tile .match {
  position: absolute; z-index: 2; border-radius: 999px; padding: 2px 7px; font-size: .68rem; font-weight: 800;
  background: rgba(8,10,16,.72); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.tile .flag { top: 8px; left: 8px; }
.tile .qty { top: 8px; right: 8px; background: var(--grad); }
.tile .match { bottom: 8px; left: 8px; background: var(--green); color: #052; }
.tile.skel .img { background: linear-gradient(90deg, var(--surface) 25%, var(--surface3) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.tile.skel .name, .tile.skel .meta { height: 10px; border-radius: 5px; background: var(--surface3); width: 70%; }
.tile.skel .meta { width: 50%; margin-top: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.toolbar { display: flex; gap: 8px; margin: 10px 0; }
.toolbar input { flex: 1; }
.toolbar select { flex: 0 0 auto; width: auto; max-width: 48%; }
.empty { text-align: center; color: var(--muted); padding: 44px 14px; grid-column: 1 / -1; }
.empty .big { font-size: 2.4rem; margin-bottom: 8px; }

/* ---------- Bottom-Sheet (Kartendetail) ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.sheet.open { pointer-events: auto; }
.sheet-bg { position: absolute; inset: 0; background: rgba(2, 4, 8, .62); opacity: 0; transition: opacity .25s; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet.open .sheet-bg { opacity: 1; }
.panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 94dvh; display: flex; flex-direction: column;
  background: var(--bg2); border-radius: 26px 26px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.5);
  transform: translateY(104%); transition: transform .32s cubic-bezier(.2, .8, .2, 1);
}
.sheet.open .panel { transform: none; }
.handle { width: 42px; height: 5px; border-radius: 3px; background: var(--line2); margin: 10px auto 4px; flex: none; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 16px 8px; flex: none; }
.panel-head b { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 16px calc(var(--sab) + 96px); overscroll-behavior: contain; }
.panel-actions {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; padding: 10px 16px calc(var(--sab) + 12px);
  background: linear-gradient(180deg, transparent, var(--bg2) 30%);
}
.panel-actions .btn { flex: 1; }
@media (min-width: 760px) {
  .panel { left: 50%; right: auto; top: 50%; bottom: auto; width: min(960px, 94vw); max-height: 92vh; transform: translate(-50%, -46%); opacity: 0; border-radius: 26px; transition: transform .25s, opacity .25s; }
  .sheet.open .panel { transform: translate(-50%, -50%); opacity: 1; }
  .handle { display: none; }
}
.detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 760px) { .detail { grid-template-columns: 320px minmax(0, 1fr); } }
.detail > div { min-width: 0; }
.holo { position: relative; width: 100%; max-width: 300px; margin: 0 auto; border-radius: 14px; overflow: hidden; box-shadow: 0 18px 44px rgba(0,0,0,.5); aspect-ratio: 63 / 88; background: var(--surface2); }
.holo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.holo::after { content: ""; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.28) 46%, rgba(160,107,255,.25) 52%, transparent 60%); transform: translateX(-60%); animation: shine 1.8s ease-out .25s 1; pointer-events: none; }
@keyframes shine { to { transform: translateX(60%); } }
.holo .noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .85rem; }
.detail h2 { margin: 0 0 4px; font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }
.detail h3 { margin: 20px 0 8px; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.bigprice { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; color: var(--green); font-variant-numeric: tabular-nums; }
.bigprice.gold { color: var(--gold); font-size: 1.5rem; }
table.prices { border-collapse: collapse; width: 100%; font-size: .86rem; }
table.prices td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
table.prices td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid label, label.col { display: flex; flex-direction: column; gap: 5px; font-size: .74rem; font-weight: 600; color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.spark { width: 100%; height: 52px; }
.langrow { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.alt { margin: 6px 0 2px; }
.alt .hscroll .tile { flex-basis: 118px; }
.alt .hscroll .tile .info { padding: 6px 8px 8px; }
.conf { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }

/* ---------- Statistik ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow-sm); }
.stat .v { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; font-size: .84rem; align-items: center; }
.bar b { font-variant-numeric: tabular-nums; }
.bar .track { grid-column: 1 / -1; height: 7px; background: var(--surface3); border-radius: 4px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--grad); border-radius: 4px; }
.toplist .tile { flex: 0 0 132px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--sab) + 22px); transform: translateX(-50%) translateY(16px);
  background: var(--surface3); color: var(--text); border: 1px solid var(--line2); padding: 11px 16px; border-radius: 14px; font-size: .88rem; font-weight: 600;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 80; max-width: 90vw; text-align: center; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
ol.steps { padding-left: 20px; margin: 6px 0; }
ol.steps li { margin: 4px 0; }
