/* GameSwipe – vier Designs über CSS-Variablen. Kein Framework, keine Fremd-Schriften. */

:root,
[data-theme="werkstatt"] {
  --bg: #161513;
  --surface: #201f1c;
  --surface-2: #2a2925;
  --line: #3a3833;
  --text: #ece8df;
  --muted: #9d978a;
  --accent: #ff5a1f;
  --accent-ink: #160a04;
  --like: #58c46c;
  --nope: #ec4d4d;
  --sale: #ffcf3a;
  --sale-ink: #1d1600;
  --radius: 6px;
  --radius-lg: 10px;
  --card-shadow: 0 1px 0 #ffffff0d inset, 0 18px 40px -18px #000c;
  --border-w: 1px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Arial Narrow", "Roboto Condensed", "Helvetica Neue Condensed", "Liberation Sans Narrow", system-ui, sans-serif;
  --head-transform: uppercase;
  --head-spacing: 0.04em;
  --head-weight: 800;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

[data-theme="papier"] {
  --bg: #f1ece1;
  --surface: #fbf8f1;
  --surface-2: #ebe5d8;
  --line: #1d1b17;
  --text: #1d1b17;
  --muted: #6b655a;
  --accent: #c8361d;
  --accent-ink: #fff8ef;
  --like: #2f7d3e;
  --nope: #c8361d;
  --sale: #1d1b17;
  --sale-ink: #fbf8f1;
  --radius: 2px;
  --radius-lg: 3px;
  --card-shadow: 5px 5px 0 #1d1b17;
  --border-w: 1.5px;
  --font: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --font-head: Georgia, "Times New Roman", serif;
  --head-transform: none;
  --head-spacing: -0.01em;
  --head-weight: 700;
  color-scheme: light;
}

[data-theme="arcade"] {
  --bg: #0c0e19;
  --surface: #141729;
  --surface-2: #1c2038;
  --line: #2c3256;
  --text: #e8e9f3;
  --muted: #8a8fb3;
  --accent: #ffd23f;
  --accent-ink: #141000;
  --like: #2be07c;
  --nope: #ff4f6d;
  --sale: #2be07c;
  --sale-ink: #00160a;
  --radius: 0;
  --radius-lg: 0;
  --card-shadow: 0 0 0 2px #2c3256, 6px 6px 0 #000;
  --border-w: 2px;
  --font: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --font-head: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --head-transform: uppercase;
  --head-spacing: 0.02em;
  --head-weight: 800;
  color-scheme: dark;
}

[data-theme="klar"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f3f5;
  --line: #e2e4e8;
  --text: #121417;
  --muted: #6a707a;
  --accent: #2457ff;
  --accent-ink: #ffffff;
  --like: #16a34a;
  --nope: #dc2626;
  --sale: #16a34a;
  --sale-ink: #ffffff;
  --radius: 10px;
  --radius-lg: 16px;
  --card-shadow: 0 1px 2px #0000000f, 0 12px 32px -12px #0000002e;
  --border-w: 1px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --head-transform: none;
  --head-spacing: -0.02em;
  --head-weight: 700;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3, .head {
  font-family: var(--font-head);
  text-transform: var(--head-transform);
  letter-spacing: var(--head-spacing);
  font-weight: var(--head-weight);
  margin: 0;
  line-height: 1.1;
}

.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.boot, .noscript { padding: 40px 20px; text-align: center; color: var(--muted); }

/* ---------- Grundlayout ---------- */
.app { min-height: 100%; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: max(10px, env(safe-area-inset-top)) 20px 10px;
  background: var(--bg);
  border-bottom: var(--border-w) solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 2px; font-size: 22px; white-space: nowrap; }
.brand b { color: var(--accent); }

.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav button {
  background: none; border: 0; padding: 8px 12px; border-radius: var(--radius);
  color: var(--muted); cursor: pointer; display: flex; align-items: center; gap: 8px;
  font-family: var(--font-head); text-transform: var(--head-transform); letter-spacing: var(--head-spacing); font-weight: 700;
}
.nav button[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav button svg { width: 18px; height: 18px; }
.nav .count {
  font-family: var(--font); font-size: 11px; font-weight: 700; min-width: 18px; padding: 1px 5px;
  border-radius: 99px; background: var(--accent); color: var(--accent-ink); text-align: center;
}
.spacer { flex: 1; }
.me {
  display: flex; align-items: center; gap: 8px; background: none; border: var(--border-w) solid var(--line);
  border-radius: 99px; padding: 4px 12px 4px 4px; cursor: pointer;
}
.avatar.guest { background: var(--surface-2); color: var(--text); }
.avatar.guest svg { width: 16px; height: 16px; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 13px;
}
[data-theme="arcade"] .avatar, [data-theme="arcade"] .me { border-radius: 0; }

main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 20px; }

/* Handy: Navigation nach unten */
@media (max-width: 720px) {
  .topbar { padding-left: 16px; padding-right: 12px; }
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0;
    background: var(--bg); border-top: var(--border-w) solid var(--line);
    padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .nav button { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 10px; flex: 1; position: relative; }
  .nav button svg { width: 22px; height: 22px; }
  .nav .count { position: absolute; top: 2px; left: calc(50% + 6px); }
  .me .me-name { display: none; }
  .me { padding: 2px; border: 0; }
  main { padding: 12px 12px calc(84px + env(safe-area-inset-bottom)); }
}

/* ---------- Knöpfe & Formulare ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius); cursor: pointer; text-decoration: none;
  background: var(--surface-2); border: var(--border-w) solid var(--line); font-weight: 600;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.danger { color: var(--nope); }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn.ghost { background: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:disabled { opacity: 0.5; cursor: default; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--muted); }
.input, .select {
  width: 100%; padding: 11px 12px; border-radius: var(--radius);
  background: var(--surface); border: var(--border-w) solid var(--line);
}
.input:focus, .select:focus { outline: none; border-color: var(--accent); }
.hint { font-size: 13px; color: var(--muted); margin: -6px 0 14px; }
.error { color: var(--nope); font-size: 14px; min-height: 1.2em; margin: 0 0 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: var(--border-w) solid var(--line); background: var(--surface); border-radius: 99px;
  padding: 5px 11px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
[data-theme="arcade"] .chip, [data-theme="papier"] .chip { border-radius: var(--radius); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  border: var(--border-w) solid var(--line); background: var(--surface); padding: 7px 12px; cursor: pointer;
  font-size: 14px; border-radius: var(--radius);
}
.seg button:hover { border-color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- Anmeldung ---------- */
.auth { max-width: 380px; margin: 6vh auto 40px; padding: 0 4px; }
.auth h1 { font-size: 40px; margin-bottom: 6px; }
.auth h1 b { color: var(--accent); }
.auth .lead { color: var(--muted); margin: 0 0 24px; }
.auth .panel { padding: 20px; }
.tabs { display: flex; gap: 0; margin-bottom: 18px; border-bottom: var(--border-w) solid var(--line); }
.tabs button {
  background: none; border: 0; padding: 10px 14px; cursor: pointer; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: calc(-1 * var(--border-w));
}
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }

.panel {
  background: var(--surface); border: var(--border-w) solid var(--line); border-radius: var(--radius-lg);
}
[data-theme="papier"] .panel { box-shadow: 4px 4px 0 var(--line); }

/* ---------- Wisch-Bereich ---------- */
.swipe-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
/* Filter zu: Spiel im Mittelpunkt. Filter auf: Leiste links */
.swipe-layout:not(.filters-open) .filters-side { display: none; }
.swipe-layout.filters-open { grid-template-columns: 280px minmax(0, 1fr); }
.swipe-layout.filters-open .filters-side { animation: slide-in 0.2s ease-out; }
@keyframes slide-in { from { opacity: 0; transform: translateX(-12px); } }
@media (max-width: 900px) { .swipe-layout, .swipe-layout.filters-open { grid-template-columns: 1fr; } .filters-side, .swipe-layout.filters-open .filters-side { display: none; } }

.filters-side { position: sticky; top: 80px; padding: 18px; max-height: calc(100vh - 100px); overflow: auto; }
.filters-side h2 { font-size: 18px; margin-bottom: 14px; }
.fgroup { margin-bottom: 18px; }
.fgroup > .flabel { font-size: 12px; color: var(--muted); margin-bottom: 8px; display: block; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.range { width: 100%; accent-color: var(--accent); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.filter-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.filter-bar .summary { font-size: 13px; color: var(--muted); white-space: nowrap; }

.stage { display: flex; flex-direction: column; align-items: center; }
.deck { position: relative; width: 100%; max-width: 420px; height: min(640px, calc(100dvh - 250px)); min-height: 470px; }


.card {
  position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: var(--border-w) solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow); touch-action: pan-y; user-select: none; -webkit-user-select: none;
  transform-origin: 50% 110%; will-change: transform;
}
.card.behind { transform: translateY(10px) scale(0.965); filter: brightness(0.85); pointer-events: none; }
.card.behind2 { transform: translateY(20px) scale(0.93); filter: brightness(0.7); pointer-events: none; }
.card.dragging { transition: none !important; cursor: grabbing; }
.card.settle { transition: transform 0.25s cubic-bezier(.2,.8,.3,1.2); }
.card.fly { transition: transform 0.32s ease-in, opacity 0.32s ease-in; }

.card .shot { position: relative; aspect-ratio: 460 / 215; background: var(--surface-2); flex: 0 1 auto; min-height: 72px; overflow: hidden; cursor: pointer; }
.card .shot img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.card .shot .more-pics {
  position: absolute; right: 8px; bottom: 8px; font-size: 12px; padding: 3px 8px; border-radius: var(--radius);
  background: #000a; color: #fff; display: flex; gap: 5px; align-items: center;
}
.card .shot .more-pics svg { width: 14px; height: 14px; }

.card .body { padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 10px; flex: 1 0 auto; }
.card .title { font-size: 24px; }
[data-theme="werkstatt"] .card .title { font-size: 27px; }
/* Schriftzug wie im Logo: kräftig, „Swipe“ orange und schräg */
[data-theme="werkstatt"] .brand { font-family: 'Exo 2', var(--font-head, sans-serif); font-weight: 800; letter-spacing: -0.02em; text-transform: none; }
[data-theme="werkstatt"] .brand b { font-weight: 800; font-style: normal; display: inline-block; transform: skewX(-10deg); }
.card .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.review { display: inline-flex; gap: 6px; align-items: baseline; font-weight: 600; }
.review.good { color: var(--like); }
.review.mid { color: var(--sale); }
[data-theme="papier"] .review.mid, [data-theme="klar"] .review.mid { color: #a16207; }
.review.bad { color: var(--nope); }
.review .pct { font-variant-numeric: tabular-nums; }

.players { display: flex; flex-wrap: wrap; gap: 6px; }
.pl {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  padding: 3px 8px 3px 6px; border-radius: var(--radius); background: var(--surface-2); border: var(--border-w) solid var(--line);
}
.pl svg { width: 15px; height: 15px; }
.pl.hot { border-color: var(--like); color: var(--like); }

.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 12px; color: var(--muted); }
.tag + .tag::before { content: "·"; margin-right: 5px; }

.desc {
  font-size: 14px; color: var(--text); opacity: 0.88; margin: 0; flex: none;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.desc.loading { color: var(--muted); }

.pricebar {
  margin-top: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-top: 10px; border-top: var(--border-w) dashed var(--line);
}
.price { display: flex; align-items: baseline; gap: 8px; }
.price .now { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; font-family: var(--font-head); }
.price .was { color: var(--muted); text-decoration: line-through; font-size: 14px; font-variant-numeric: tabular-nums; }
.sale {
  font-weight: 800; font-size: 13px; padding: 2px 7px; border-radius: var(--radius);
  background: var(--sale); color: var(--sale-ink); font-variant-numeric: tabular-nums;
}
[data-theme="werkstatt"] .sale { transform: rotate(-3deg); }
.deals { font-size: 12px; color: var(--muted); width: 100%; display: flex; gap: 4px 12px; flex-wrap: wrap; }
.deals b { color: var(--text); font-variant-numeric: tabular-nums; }

.stamp {
  position: absolute; top: 22px; padding: 4px 12px; font: 900 30px/1 var(--font-head); letter-spacing: 0.06em;
  text-transform: uppercase; border: 4px solid currentColor; border-radius: var(--radius); opacity: 0; pointer-events: none; z-index: 2;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.stamp.like { left: 50%; top: auto; bottom: 34%; color: var(--like); transform: translateX(-50%) rotate(-8deg); }
.stamp.nope { left: 50%; top: 14%; right: auto; color: var(--nope); transform: translateX(-50%) rotate(8deg); }
.stamp.skip { right: 18px; color: var(--text); transform: rotate(12deg); }
.stamp.back { left: 18px; color: var(--muted); transform: rotate(-12deg); }

.actions { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 34px; }
.act {
  display: grid; place-items: center; cursor: pointer; border-radius: 50%;
  background: var(--surface); border: var(--border-w) solid var(--line); color: var(--muted);
  width: 48px; height: 48px; transition: transform 0.1s;
}
[data-theme="arcade"] .act, [data-theme="papier"] .act { border-radius: var(--radius); }
.act svg { width: 22px; height: 22px; }
.act.big { width: 64px; height: 64px; border-width: 2px; }
.act.big svg { width: 30px; height: 30px; }
.act.nope { color: var(--nope); border-color: var(--nope); }
.act.like { color: var(--like); border-color: var(--like); }
.act:active { transform: scale(0.92); }
.act:disabled { opacity: 0.35; cursor: default; }
.act-label { display: block; text-align: center; font-size: 11px; color: var(--muted); margin-top: 4px; }
.act-wrap { display: flex; flex-direction: column; align-items: center; }
.keys { margin-top: 14px; font-size: 12px; color: var(--muted); text-align: center; }
.keys kbd {
  font-family: var(--mono); font-size: 11px; padding: 1px 5px; border: var(--border-w) solid var(--line);
  border-bottom-width: 2px; border-radius: 4px; background: var(--surface);
}
@media (hover: none) { .keys { display: none; } }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); max-width: 360px; margin: 0 auto; }
.empty h2 { color: var(--text); font-size: 22px; margin-bottom: 8px; }
.empty .btn { margin-top: 16px; }

.skeleton { position: absolute; inset: 0; border-radius: var(--radius-lg); background: var(--surface); border: var(--border-w) solid var(--line); overflow: hidden; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--text) 6%, transparent) 50%, transparent 70%);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ---------- Listen: Matches & Likes ---------- */
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-size: 30px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

.list { display: grid; gap: 10px; }
.row {
  display: grid; grid-template-columns: 184px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 10px; background: var(--surface); border: var(--border-w) solid var(--line); border-radius: var(--radius-lg);
}
.row img { width: 184px; aspect-ratio: 460/215; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); }
.row h3 { font-size: 18px; margin-bottom: 4px; }
.row .sub { font-size: 13px; color: var(--muted); display: flex; gap: 4px 12px; flex-wrap: wrap; }
.row .side { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
@media (max-width: 720px) {
  .row { grid-template-columns: 112px minmax(0, 1fr); gap: 10px; }
  .row img { width: 112px; }
  .row .side { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; flex-wrap: wrap; }
  .row h3 { font-size: 16px; }
}

.votes { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.meter { display: flex; gap: 3px; }
.meter i { width: 14px; height: 8px; background: var(--surface-2); border: var(--border-w) solid var(--line); border-radius: 2px; }
.meter i.on { background: var(--like); border-color: var(--like); }
.votes .who { font-size: 13px; }
.votes .against { color: var(--muted); font-size: 12px; }
.rank { font: 800 28px/1 var(--font-head); color: var(--muted); width: 36px; text-align: center; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: var(--border-w) solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.tile img { width: 100%; aspect-ratio: 460/215; object-fit: cover; background: var(--surface-2); cursor: pointer; }
.tile .t-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tile h3 { font-size: 16px; }
.tile .t-foot { margin-top: auto; display: flex; gap: 6px; align-items: center; justify-content: space-between; }

/* ---------- Seitenblatt (Details, Filter, Konto) ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: #000a; z-index: 50; display: flex; justify-content: center; align-items: flex-end; }
@media (min-width: 721px) { .sheet-backdrop { align-items: center; padding: 24px; } }
.sheet {
  width: 100%; max-width: 640px; max-height: 92svh; overflow: auto; background: var(--bg);
  border: var(--border-w) solid var(--line); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 0 0 max(20px, env(safe-area-inset-bottom)); overscroll-behavior: contain;
  animation: up 0.22s ease-out;
}
@media (min-width: 721px) { .sheet { border-radius: var(--radius-lg); animation: none; } }
@keyframes up { from { transform: translateY(40px); opacity: 0.4; } }
.sheet-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; justify-content: space-between;
  padding: 14px 18px; background: var(--bg); border-bottom: var(--border-w) solid var(--line);
}
.sheet-head h2 { font-size: 20px; }
.sheet-body { padding: 18px; }
.icon-btn { background: none; border: 0; padding: 6px; cursor: pointer; color: var(--muted); border-radius: var(--radius); display: grid; place-items: center; }
.icon-btn svg { width: 22px; height: 22px; }

.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.gallery img, .gallery video { height: 200px; width: auto; aspect-ratio: 16/9; object-fit: cover; scroll-snap-align: start; border-radius: var(--radius); background: var(--surface-2); flex: none; }
@media (max-width: 720px) { .gallery img, .gallery video { height: 180px; } }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; margin: 16px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.section { margin-bottom: 26px; }
.section h3 { font-size: 15px; margin-bottom: 10px; }
.themes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.theme-opt {
  border: 2px solid var(--line); border-radius: var(--radius); padding: 0; cursor: pointer; overflow: hidden; background: none; text-align: left;
}
.theme-opt[aria-pressed="true"] { border-color: var(--accent); }
.theme-opt .sw { display: flex; height: 44px; }
.theme-opt .sw span { flex: 1; }
.theme-opt .nm { padding: 6px 10px; font-size: 13px; font-weight: 600; display: block; }

.users { display: grid; gap: 6px; }
.user-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--surface); border: var(--border-w) solid var(--line); border-radius: var(--radius); }
.user-row .nm { flex: 1; }
.codebox { font-family: var(--mono); font-size: 12px; word-break: break-all; padding: 10px; background: var(--surface-2); border-radius: var(--radius); margin: 8px 0; }
.log { font-family: var(--mono); font-size: 11px; max-height: 220px; overflow: auto; background: var(--surface); border: var(--border-w) solid var(--line); border-radius: var(--radius); padding: 8px; }
.log div { padding: 2px 0; border-bottom: 1px solid var(--line); }

/* ---------- Hinweis-Leiste ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 80; max-width: calc(100% - 24px);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: var(--radius); font-weight: 600; font-size: 14px;
  box-shadow: 0 8px 30px #0006;
}
.toast.match { background: var(--like); color: #031008; }
@media (max-width: 720px) { .toast { bottom: calc(80px + env(safe-area-inset-bottom)); } }

.install-hint { font-size: 13px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.tag-gap { height: 10px; }
.owned-badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--accent);
  align-self: flex-start;
}
.owned-badge svg { width: 14px; height: 14px; }
.list + .tabs, .tabs + .list { margin-top: 0; }

/* Handy-Anpassungen zuletzt, damit sie die Grundregeln überschreiben */
@media (max-width: 720px) {
  .deck { height: calc(100dvh - 330px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); min-height: 300px; }
  .card .title, [data-theme="werkstatt"] .card .title { font-size: 21px; }
  .card .body { padding: 12px 14px 10px; gap: 8px; }
  .desc { -webkit-line-clamp: 2; line-clamp: 2; }
  .actions { margin-top: 26px; gap: 18px; }
  .act-label { display: none; }
  .act { width: 46px; height: 46px; }
  .act.big { width: 58px; height: 58px; }
  .filter-bar { margin-bottom: 10px; }
}
@media (max-width: 720px) and (max-height: 760px) {
  .desc { display: none; }
  .card .meta .num { display: none; }
  .filter-bar { margin-bottom: 6px; }
  .actions { margin-top: 22px; }
}
@media (max-width: 720px) and (max-height: 600px) {
  .card .tags { display: none; }
  .act { width: 42px; height: 42px; }
  .act.big { width: 52px; height: 52px; }
}

/* ---------- Heute ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--surface); border: var(--border-w) solid var(--line); border-radius: var(--radius-lg); padding: 12px 14px; display: flex; flex-direction: column; }
.stat b { font: 800 26px/1.1 var(--font-head); }
.stat span { font-size: 13px; color: var(--muted); }
.tonight-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .tonight-layout { grid-template-columns: 1fr; } }
.tonight-controls { padding: 18px; }
.chip:disabled { opacity: 0.45; cursor: not-allowed; }
.big-roll { width: 100%; padding: 14px; font-size: 16px; }
.big-roll svg { width: 20px; height: 20px; }
.tonight-skel { position: relative; height: 380px; }
.pick { overflow: hidden; }
.pick img { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; background: var(--surface-2); }
.pick-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.pick-kicker { margin: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.pick .title { font-size: 28px; }
.pick .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.pick .desc { -webkit-line-clamp: 4; line-clamp: 4; }
@media (max-width: 720px) {
  .nav button { padding: 6px 4px; font-size: 10px; }
  .stat b { font-size: 21px; }
  .pick .title { font-size: 22px; }
}

/* ---------- Trailer & Screenshots ---------- */
.media { margin-bottom: 14px; }
.player { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.play-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; border: 0; cursor: pointer;
  background: linear-gradient(transparent 40%, #0008); color: #fff;
}
.play-overlay svg { width: 64px; height: 64px; padding: 16px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); fill: currentColor; }
.trailer-list { margin-top: 8px; }
.gallery-hint { margin: 12px 0 6px; }
.shot-btn { padding: 0; border: 0; background: none; cursor: zoom-in; flex: none; scroll-snap-align: start; }
.shot-btn img { height: 120px; width: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); }
.shot-btn:focus-visible img { outline: 2px solid var(--accent); outline-offset: 2px; }
.trailer-pill {
  position: absolute; left: 8px; bottom: 8px; font-size: 12px; padding: 3px 9px 3px 7px; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink); border: 0; cursor: pointer; display: flex; gap: 5px; align-items: center; font-weight: 700;
}
.trailer-pill svg { width: 13px; height: 13px; fill: currentColor; }

.lightbox { position: fixed; inset: 0; z-index: 90; background: #000e; display: flex; flex-direction: column; touch-action: pan-y; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: max(10px, env(safe-area-inset-top)) 12px 10px; color: #fff; }
.lb-top .icon-btn { color: #fff; }
.lb-count { font-size: 14px; opacity: 0.85; }
.lb-stage { flex: 1; display: grid; place-items: center; padding: 0 12px max(16px, env(safe-area-inset-bottom)); min-height: 0; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: #0009; color: #fff; display: grid; place-items: center; cursor: pointer;
}
.lb-nav svg { width: 26px; height: 26px; }
.lb-nav.prev { left: 12px; }
.lb-nav.next { right: 12px; }
@media (hover: none) { .lb-nav { display: none; } }
.trailer-list { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.trailer-list::-webkit-scrollbar { display: none; }
.trailer-list .chip { font-size: 12px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; flex: none; }

/* ---------- Rückmeldung beim Bewerten ---------- */
.act.hit { transform: scale(0.9); }
.act.like.hit { background: var(--like); color: var(--bg); }
.act.nope.hit { background: var(--nope); color: var(--bg); }
.act.skip.hit, .act.undo.hit { background: var(--text); color: var(--bg); border-color: var(--text); }
.act { transition: transform 0.12s, background-color 0.15s, color 0.15s; }
.act.idle { opacity: 0.45; }
.card.decided { filter: brightness(0.75); }

.decision {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 5; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 20px; min-width: 150px; max-width: 80%;
  border-radius: var(--radius-lg); background: var(--surface); border: 2px solid currentColor; box-shadow: 0 12px 30px #0007;
  font: 800 20px/1.1 var(--font-head); text-transform: var(--head-transform); letter-spacing: var(--head-spacing);
  animation: decision 1.3s ease-out forwards;
}
.decision svg { width: 30px; height: 30px; }
.decision small { font: 500 12px/1.3 var(--font); text-transform: none; letter-spacing: 0; color: var(--muted); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.decision.like { color: var(--like); }
.decision.nope { color: var(--nope); }
.decision.skip, .decision.undo { color: var(--text); }
@keyframes decision {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  75% { opacity: 1; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  /* ohne Bewegung trotzdem sichtbar, nur ein-/ausblenden über die Zeit */
  .decision { animation: none !important; opacity: 1; }
}
.tally { margin-top: 10px; font-size: 12px; color: var(--muted); text-align: center; min-height: 1.2em; }
.tile-img { padding: 0; border: 0; background: none; cursor: pointer; display: block; width: 100%; }
.tile-img:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.player video:focus-visible, .play-overlay:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.shot:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

/* ---------- Animationen ---------- */
/* Bereichswechsel */
.view-enter { animation: view-in 0.28s ease-out; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }

/* Listen erscheinen gestaffelt */
.list > .row, .grid > .tile, .users > .user-row { animation: item-in 0.35s ease-out backwards; }
.list > :nth-child(2), .grid > :nth-child(2), .users > :nth-child(2) { animation-delay: 40ms; }
.list > :nth-child(3), .grid > :nth-child(3), .users > :nth-child(3) { animation-delay: 80ms; }
.list > :nth-child(4), .grid > :nth-child(4), .users > :nth-child(4) { animation-delay: 120ms; }
.list > :nth-child(5), .grid > :nth-child(5), .users > :nth-child(5) { animation-delay: 160ms; }
.list > :nth-child(n+6), .grid > :nth-child(n+6), .users > :nth-child(n+6) { animation-delay: 200ms; }
@keyframes item-in { from { opacity: 0; transform: translateY(10px); } }

/* Karte rückt nach vorne */
.card.promote { animation: promote 0.3s cubic-bezier(.2, .8, .3, 1.1); }
@keyframes promote { from { transform: translateY(10px) scale(0.965); filter: brightness(0.85); } }

/* Zurückgeholt: kommt aus der Richtung, in die sie weggeflogen ist */
.card.return-like { animation: return-like 0.38s cubic-bezier(.2, .8, .3, 1.15); }
.card.return-dislike { animation: return-dislike 0.38s cubic-bezier(.2, .8, .3, 1.15); }
.card.return-skip { animation: return-skip 0.38s cubic-bezier(.2, .8, .3, 1.15); }
@keyframes return-like { from { transform: translateY(-110vh) rotate(-6deg); } }
@keyframes return-dislike { from { transform: translateY(110vh) rotate(6deg); } }
@keyframes return-skip { from { transform: translate(-110vw, -20px) rotate(-16deg); } }

/* Knöpfe federn */
.btn:active, .chip:active, .seg button:active { transform: scale(0.96); }
.btn, .chip, .seg button { transition: transform 0.1s, background-color 0.15s, border-color 0.15s, color 0.15s; }
.act.hit { animation: hit 0.35s ease-out; }
@keyframes hit { 30% { transform: scale(0.82); } 70% { transform: scale(1.08); } }

/* Herzchen beim Like und beim Match */
.particle { position: fixed; z-index: 95; pointer-events: none; width: 22px; height: 22px; margin: -11px 0 0 -11px; color: var(--like); animation: particle 0.9s ease-out forwards; }
.particle svg { width: 100%; height: 100%; fill: currentColor; }
@keyframes particle {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(var(--rot)); }
}

/* Hinweis unten springt rein, Match etwas kräftiger */
.toast { animation: toast-in 0.25s ease-out; }
.toast.match { animation: toast-pop 0.45s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }
@keyframes toast-pop { 0% { opacity: 0; transform: translate(-50%, 16px) scale(0.8); } 100% { transform: translate(-50%, 0) scale(1); } }

/* Dialoge und Galerie */
.sheet-backdrop { animation: fade-in 0.2s ease-out; }
.lightbox { animation: fade-in 0.2s ease-out; }
.lb-stage img { animation: fade-in 0.2s ease-out; }
@keyframes fade-in { from { opacity: 0; } }
@media (min-width: 721px) { .sheet { animation: sheet-pop 0.22s ease-out; } }
@keyframes sheet-pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } }

/* Heute: Würfel rollt, Vorschlag klappt auf */
.big-roll.rolling svg { animation: roll 0.6s cubic-bezier(.3, .7, .4, 1); }
@keyframes roll { 0% { transform: rotate(0); } 60% { transform: rotate(400deg) scale(1.2); } 100% { transform: rotate(360deg); } }
.pick-enter { animation: pick-in 0.45s cubic-bezier(.2, .8, .3, 1.1); transform-origin: top center; }
@keyframes pick-in { from { opacity: 0; transform: perspective(800px) rotateX(-12deg) translateY(16px); } }

/* Stempel beim Ziehen leicht pulsierend einblenden */
.card.fly .stamp { animation: stamp 0.25s ease-out; }
@keyframes stamp { from { transform: scale(1.4) rotate(var(--stamp-rot, -12deg)); } }
.stamp.nope { --stamp-rot: 12deg; }
/* Zurück: Stempel kurz aufdrücken und wieder verblassen */
.stamp.back.flash { color: var(--text); animation: stamp-flash 0.9s ease-out forwards; }
@keyframes stamp-flash {
  0% { opacity: 0; transform: rotate(-12deg) scale(1.5); }
  18% { opacity: 1; transform: rotate(-12deg) scale(1); }
  65% { opacity: 1; }
  100% { opacity: 0; transform: rotate(-12deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .view-enter, .list > *, .grid > *, .users > *, .card.promote, .card[class*="return-"], .particle, .toast, .pick-enter { animation: none !important; }
}

.revisit-badge { margin: 0; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: var(--radius); align-self: flex-start; border: var(--border-w) solid currentColor; }
.revisit-badge.like { color: var(--like); }
.revisit-badge.dislike { color: var(--nope); }
.revisit-badge.skip { color: var(--muted); }


/* ---------- Karte: großes Bild mit Screenshot-Galerie ---------- */
.card .shot { aspect-ratio: 16 / 9; flex: none; min-height: 0; overflow: hidden; }
.card .shot .shot-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(14px) brightness(0.55); transform: scale(1.15); }
.card .shot .shot-main { position: relative; width: 100%; height: 100%; object-fit: cover; }
.card .shot.is-header .shot-main { object-fit: contain; }
.shot-bars { position: absolute; top: 6px; left: 8px; right: 8px; display: flex; gap: 4px; z-index: 3; pointer-events: none; }
.shot-bars i { flex: 1; height: 3px; border-radius: 2px; background: #ffffff66; box-shadow: 0 0 2px #0006; }
.shot-bars i.on { background: #fff; }
.card .body { overflow: hidden; flex: 1 1 auto; min-height: 0; }
.card .body > * { flex-shrink: 0; }
.card .body > .pricebar { flex-shrink: 0; }
.card { touch-action: none; }

@media (max-width: 720px) {
  .card .desc { display: none; }
  .card .tags, .card .players { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; mask-image: linear-gradient(to right, #000 85%, transparent); -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); }
  .card .body { gap: 7px; }
  .deck { height: calc(100dvh - 310px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
}
@media (max-width: 720px) and (max-height: 700px) {
  .card .shot { aspect-ratio: 2 / 1; }
}

/* ---------- Handy: Wisch-Bereich füllt den Bildschirm zwischen Kopf und Navigation ---------- */
@media (max-width: 720px) {
  .app { height: 100dvh; }
  main.view-swipe {
    flex: 1; min-height: 0; display: flex; flex-direction: column;
    padding-top: 8px; padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
  main.view-swipe .swipe-layout { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: stretch; }
  main.view-swipe .stage { width: 100%; }
  main.view-swipe .deck { max-width: none; width: 100%; }
  main.view-swipe .stage { flex: 1; min-height: 0; }
  main.view-swipe .deck { flex: 1; height: auto; min-height: 260px; }
  main.view-swipe .filter-bar { margin-bottom: 8px; flex: none; }
  main.view-swipe .actions { margin-top: 18px; flex: none; }
  main.view-swipe .tally { margin-top: 6px; flex: none; }
  /* Bild bekommt Vorrang, gibt aber nach, bevor Preis oder Titel abgeschnitten werden */
  .card .shot { flex: 0 1 auto; min-height: 120px; }
  .card .body { flex: 0 0 auto; }
}
@media (max-width: 720px) and (max-height: 640px) {
  main.view-swipe .tally { display: none; }
  .card .tags { display: none; }
}

/* Bild nimmt den ganzen freien Platz der Karte (Text und Preis behalten ihre Höhe) */
.card .shot { flex: 1 1 0; aspect-ratio: auto; min-height: 140px; }
.card .body { flex: 0 0 auto; }
@media (max-width: 720px) {
  .card .shot { min-height: 120px; }
}

/* ---------- Suche ---------- */
.search-btn { color: var(--text); }
.search-btn svg { width: 22px; height: 22px; }
.search-input { font-size: 16px; }
.search-results { margin-top: 4px; }
.search-row { grid-template-columns: 140px minmax(0, 1fr) auto; }
.search-row .tile-img img { width: 140px; aspect-ratio: 460 / 215; object-fit: cover; border-radius: var(--radius); }
.search-row h3 { font-size: 16px; }
.search-row .side { flex-direction: row; align-items: center; gap: 8px; }
.search-row .act { width: 44px; height: 44px; }
.search-row .act svg { width: 20px; height: 20px; }
.search-status { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.search-status:empty { display: none; }
@media (max-width: 720px) {
  .search-row { grid-template-columns: 96px minmax(0, 1fr); }
  .search-row .tile-img img { width: 96px; }
  .search-row .side { grid-column: 1 / -1; justify-content: flex-end; }
  .topbar .search-btn { padding: 8px; }
}

/* ---------- iPhone: Statusleiste und unterer Rand ---------- */
/* Ältere Browser ohne dvh: kleine Höhe als Rückfall */
@supports not (height: 100dvh) {
  @media (max-width: 720px) { .app { height: 100vh; } }
}
@media (max-width: 720px) {
  /* Navigation reicht optisch immer bis ganz nach unten, auch wenn iOS darunter Platz lässt */
  .nav::after {
    content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 120px;
    background: inherit; pointer-events: none;
  }
  .nav { overflow: visible; }
  /* Unter der Navigation dieselbe Farbe wie die Leiste */
  html { background-color: var(--bg); }
}

/* ---------- Likes: Suche & Filter ---------- */
.likes-filter { padding: 14px; display: grid; gap: 10px; margin-bottom: 10px; }
.likes-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.likes-row .flabel { margin: 0; min-width: 88px; }
.likes-row .select { max-width: 280px; }
.likes-count { margin: 4px 2px 10px; font-size: 13px; }
.tile .players { margin-top: 2px; }
@media (max-width: 720px) {
  .likes-row { gap: 6px; }
  .likes-row .flabel { min-width: 100%; }
}
.sale { white-space: nowrap; }
.tile .t-foot { flex-wrap: wrap; row-gap: 6px; }
.likes-filter > .btn { justify-self: start; }

/* Likes: aufklappbarer Filter */
.likes-top { display: flex; gap: 8px; align-items: stretch; }
.likes-top .input { flex: 1; min-width: 0; }
.likes-toggle { flex: none; position: relative; }
.likes-toggle .count {
  font-size: 11px; font-weight: 700; min-width: 18px; padding: 1px 5px; border-radius: 99px;
  background: var(--accent); color: var(--accent-ink); text-align: center;
}
.likes-toggle .chev svg { width: 14px; height: 14px; transition: transform 0.2s; }
.likes-toggle .chev.open svg { transform: rotate(90deg); }
.likes-options { display: grid; gap: 10px; padding-top: 4px; animation: fade-in 0.2s ease-out; }
.likes-options[hidden] { display: none; }
.likes-options > .btn { justify-self: start; }

/* Filter-Knopf mit Zähler */
.filter-toggle .count {
  font-size: 11px; font-weight: 700; min-width: 18px; padding: 1px 5px; border-radius: 99px;
  background: var(--accent); color: var(--accent-ink); text-align: center;
}
.filter-bar { justify-content: center; }
.filter-bar .summary { overflow: hidden; text-overflow: ellipsis; }

/* PC: größere Karte, wenn die Filter zu sind */
@media (min-width: 901px) {
  .swipe-layout:not(.filters-open) .deck { max-width: 520px; height: min(760px, calc(100dvh - 230px)); }
  .swipe-layout:not(.filters-open) .card .title { font-size: 28px; }
}

/* ---------- Handy: kein Zoom, nur Hochformat ---------- */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* iPhone zoomt bei Eingabefeldern unter 16px automatisch hinein */
@media (max-width: 900px) {
  .input, .select, input, textarea, select { font-size: 16px; }
}
/* Querformat auf dem Handy: Hinweis statt verschobener Oberfläche (iOS kann nicht sperren) */
.rotate-hint { display: none; }
@media (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  .rotate-hint {
    display: grid; place-items: center; position: fixed; inset: 0; z-index: 200; padding: 24px; text-align: center;
    background: var(--bg); color: var(--text); font: 700 18px/1.4 var(--font-head);
  }
  .rotate-hint span::before { content: "⟳"; display: block; font-size: 44px; margin-bottom: 8px; color: var(--accent); }
}

/* ---------- Weiche Übergänge ---------- */
/* Zurückholen nach "Weiter": kommt von der Seite, zu der die Karte verschwunden ist */
.card.return-skip-right { animation: return-skip-right 0.38s cubic-bezier(.2, .8, .3, 1.15); }
.card.return-skip-left { animation: return-skip-left 0.38s cubic-bezier(.2, .8, .3, 1.15); }
@keyframes return-skip-right { from { transform: translate(110vw, -20px) rotate(16deg); } }
@keyframes return-skip-left { from { transform: translate(-110vw, -20px) rotate(-16deg); } }

/* Bereichswechsel: Inhalt blendet über, Kopf und Navigation bleiben stehen,
   die Markierung des aktiven Menüpunkts gleitet zum neuen Punkt */
.topbar { view-transition-name: topbar; }
.nav button[aria-current="page"] { view-transition-name: nav-active; }
.filters-side { view-transition-name: filters-side; }
#deck { view-transition-name: deck; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.22s; animation-timing-function: ease-out; }
::view-transition-group(nav-active),
::view-transition-group(deck),
::view-transition-group(filters-side) { animation-duration: 0.3s; animation-timing-function: cubic-bezier(.2, .8, .3, 1); }
::view-transition-old(nav-active),
::view-transition-new(nav-active) { animation: none; mix-blend-mode: normal; height: 100%; }
/* Die alte Einblend-Animation entfällt, wenn der Browser View Transitions kann */
@supports (view-transition-name: none) { .view-enter { animation: none; } }
@media (max-width: 720px) { .nav { view-transition-name: navbar; } }

/* Aufklappen mit weicher Höhe (Likes-Filter) */
.collapse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.28s cubic-bezier(.2, .8, .3, 1), opacity 0.2s; opacity: 0; }
.collapse.open { grid-template-rows: 1fr; opacity: 1; }
.collapse > * { overflow: hidden; min-height: 0; }
.likes-options { padding-top: 0; animation: none; }
.collapse.open > .likes-options { padding-top: 4px; }

/* Dialoge blenden beim Schließen aus */
.sheet-ghost { position: fixed; inset: 0; z-index: 49; display: flex; justify-content: center; align-items: flex-end; background: #000a; pointer-events: none; animation: ghost-bg 0.2s ease-in forwards; }
.sheet-ghost .sheet { animation: ghost-sheet 0.2s ease-in forwards; }
@media (min-width: 721px) { .sheet-ghost { align-items: center; padding: 24px; } }
@keyframes ghost-bg { to { background: #0000; } }
@keyframes ghost-sheet { to { opacity: 0; transform: translateY(24px); } }
@media (prefers-reduced-motion: reduce) {
  .collapse { transition: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- Keine Scrollbalken durch wegfliegende Karten ---------- */
/* Waagerecht wird die Seite nie breiter als das Fenster */
html, body { overflow-x: clip; }
/* Leere Zustände und Ladehinweise in Rastern über die volle Breite (mittig) */
.grid > .empty, .grid > p, .list > .empty { grid-column: 1 / -1; justify-self: center; }

/* Trailer im Vollbild (Shift) – fensterfüllend, falls echtes Vollbild nicht geht */
.player.big { position: fixed; inset: 0; z-index: 120; border-radius: 0; aspect-ratio: auto; background: #000; border: 0; }
.player.big video { width: 100%; height: 100%; object-fit: contain; }
.player:fullscreen { background: #000; }
.player:fullscreen video { width: 100%; height: 100%; object-fit: contain; }

/* VR-Hinweis auf der Karte */
.vr-badge { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius); border: var(--border-w) solid currentColor; color: var(--muted); }
.vr-badge.required { color: var(--accent); }
.year-row { display: flex; align-items: center; gap: 8px; }
.year-row .select { flex: 1; min-width: 0; }
.fgroup > .btn.small.ghost { margin-top: 6px; }

/* Slideshow-Balken: aktueller Balken füllt sich in 3 s, erledigte sind voll */
.shot-bars i { position: relative; overflow: hidden; background: #ffffff55; }
.shot-bars i.on, .shot-bars i.done { background: #ffffff55; }
.shot-bars i b { position: absolute; inset: 0; width: 0; background: #fff; border-radius: inherit; }
.shot-bars i.done b { width: 100%; }
.shot-bars i.on b { width: 100%; }
.shot.slideshow .shot-bars i.on b { width: 0; animation: slide-fill var(--slide-ms, 3000ms) linear forwards; }
.shot.slideshow.slide-paused .shot-bars i.on b { animation-play-state: paused; }
@keyframes slide-fill { to { width: 100%; } }
/* Weicher Bildwechsel */
.card .shot .shot-main.fade { animation: shot-fade 0.4s ease-out; }
@keyframes shot-fade { from { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .shot.slideshow .shot-bars i.on b { animation: none; width: 100%; } .card .shot .shot-main.fade { animation: none; } }

/* Slideshow an/aus direkt auf dem Bild */
.slide-toggle {
  position: absolute; top: 14px; right: 8px; z-index: 4; width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: #0008; color: #fff; cursor: pointer; padding: 0;
}
.slide-toggle svg { width: 14px; height: 14px; }
/* Fortschrittsring: füllt sich bis zum nächsten Bild */
.slide-toggle .slide-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.slide-toggle .slide-ring circle { fill: none; stroke-width: 2.5; }
.slide-toggle .slide-ring .track { stroke: #fff3; }
.slide-toggle .slide-ring .fill { stroke: #fff; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; opacity: 0; }
.shot.slideshow .slide-toggle .slide-ring .fill.run { opacity: 1; animation: ring-fill var(--slide-ms, 3000ms) linear forwards; }
.shot.slideshow.slide-paused .slide-toggle .slide-ring .fill.run { animation-play-state: paused; }
@keyframes ring-fill { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .shot.slideshow .slide-toggle .slide-ring .fill.run { animation: none; stroke-dashoffset: 0; } }
.slide-toggle[aria-pressed="false"] svg:not(.slide-ring) { fill: currentColor; }
.slide-toggle:hover { background: #000b; }
.shot-bars { right: 46px; }

/* Logo-Symbol vor dem Schriftzug */
.brand { align-items: center; }
.brand-mark { width: 40px; height: 40px; margin: -4px 6px -4px -4px; flex: none; }
@media (max-width: 720px) { .brand-mark { width: 34px; height: 34px; margin-right: 4px; } }

/* ---------- Team-Runde ---------- */
.team-start svg, .team-tag svg { width: 15px; height: 15px; }
@media (max-width: 420px) { .team-start { font-size: 0; gap: 0; padding-inline: 9px; } .team-start svg { width: 17px; height: 17px; } }
.team-tag { display: inline-flex; align-items: center; gap: 6px; font: 800 13px/1 var(--font-head); text-transform: var(--head-transform); letter-spacing: var(--head-spacing); color: var(--accent); white-space: nowrap; }
.filter-bar .spacer { flex: 1; min-width: 4px; }
.icon-btn.small { padding: 4px; }
.icon-btn.small svg { width: 18px; height: 18px; }
.swipe-layout.team-mode .filter-bar { justify-content: flex-start; }
.team-join { max-width: 420px; margin: 0 auto; padding: 28px 22px; display: grid; gap: 10px; align-content: center; height: 100%; }
.team-join h2 { font-size: 24px; }
.team-join p { margin: 0; }
.team-join .field { margin: 6px 0 0; }
.share-link .input { width: 100%; font-family: ui-monospace, monospace; font-size: 13px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 18px; }
.team-people { display: grid; gap: 6px; margin-bottom: 12px; }
.team-person { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.team-person .avatar { width: 28px; height: 28px; font-size: 13px; }
.team-recent { margin-top: 22px; display: grid; gap: 6px; justify-items: start; }
.team-recent h3, .sheet-body h3 { margin: 18px 0 8px; font-size: 16px; }
.team-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: 14px; }
.team-table th, .team-table td { text-align: right; padding: 7px 8px; border-bottom: var(--border-w) solid var(--line); }
.team-table th:first-child, .team-table td:first-child { text-align: left; }
.team-table th { font-size: 12px; color: var(--muted); font-weight: 600; }
.team-table td.like { color: var(--like); font-weight: 700; }
.team-table td.nope { color: var(--nope); font-weight: 700; }
@media (max-width: 480px) { .team-tag { font-size: 0; gap: 0; } .team-tag svg { width: 18px; height: 18px; } }
/* Feste Knopfleiste unten im Fenster (z. B. „Runde starten“ unter dem Filter) */
.sheet-actions { position: sticky; bottom: calc(-1 * max(20px, env(safe-area-inset-bottom))); z-index: 2; padding: 12px 18px max(20px, env(safe-area-inset-bottom)); margin-bottom: calc(-1 * max(20px, env(safe-area-inset-bottom))); background: var(--bg); border-top: var(--border-w) solid var(--line); }
.sheet-actions .btn { width: 100%; }
.team-filter-sum { margin: 0 0 10px; }
