/* Solargrove – schlichtes Schwarz/Weiß-Design, angelehnt an Codecademy (Monospace-Akzente, Punktraster, flache Karten). */

:root {
  --mono: "JetBrains Mono", "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", ui-monospace, monospace;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 8px;
  --r-s: 4px;
  --panel-w: 340px;
  --detail-w: 380px;
  --side-w: 320px;
  --gap: 16px;
}
:root, [data-theme="dark"] {
  --bg: #000;
  --dots: rgba(255, 255, 255, 0.075);
  --surface: #0a0a0a;
  --surface-2: #161616;
  --surface-3: #222;
  --line: #262626;
  --line-2: #3d3d3d;
  --card-line: #2b2b2b;
  --card-shadow: none;
  --text: #fff;
  --muted: #a3a3a3;
  --faint: #6b6b6b;
  --inv-bg: #fff;
  --inv-text: #000;
  --overlay: rgba(0, 0, 0, 0.82);
  /* Karte */
  --map-dim: rgba(255, 255, 255, 0.10);
  --map-label: 255, 255, 255;
  --map-halo: rgba(0, 0, 0, 0.85);
  --map-line: 255, 255, 255;
  color-scheme: dark;
}
[data-theme="light"] {
  /* Gedämpft: helles Steingrau statt Weiß, Text und Kanten in Anthrazit */
  --bg: #cbcbc6;
  --dots: rgba(0, 0, 0, 0.09);
  --surface: #dadad5;
  --surface-2: #d1d1cc;
  --surface-3: #c3c3bd;
  --line: #b5b5af;
  --line-2: #2b2b2b;
  --card-line: #2b2b2b;
  --card-shadow: 4px 4px 0 #2b2b2b;
  --shadow-strong: #2b2b2b;
  --text: #1c1c1c;
  --muted: #45453f;
  --faint: #6c6c66;
  --inv-bg: #262626;
  --inv-text: #dadad5;
  --overlay: rgba(203, 203, 198, 0.92);
  --map-dim: rgba(0, 0, 0, 0.1);
  --map-label: 28, 28, 28;
  --map-halo: rgba(203, 203, 198, 0.9);
  --map-line: 28, 28, 28;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background-color: var(--bg);
  background-image: radial-gradient(var(--dots) 1px, transparent 1.3px);
  background-size: 22px 22px;
  color: var(--text);
  font: 14px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input { font: inherit; color: inherit; }
svg { stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
svg .fill { fill: currentColor; stroke: none; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.label { font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.row.gap { gap: 14px; }
.link { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-thickness: 2px; }
kbd { font: 11px/1 var(--mono); padding: 3px 6px; border: 1px solid var(--line-2); border-radius: var(--r-s); color: var(--muted); background: var(--surface); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

#map { position: fixed; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#map.dragging { cursor: grabbing; }
#map.pointing { cursor: pointer; }

.card { background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r); box-shadow: var(--card-shadow); }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r-s); color: var(--muted); }
.lang-wrap { position: relative; }
.lang-menu { position: fixed; z-index: 30; min-width: 160px; margin: 0; padding: 4px; list-style: none; }
.lang-menu li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--r-s); cursor: pointer; font-size: 13.5px; }
.lang-menu li:hover { background: var(--surface-2); }
.lang-menu li.on { font-weight: 600; }
.lang-menu .ck { width: 12px; font-size: 12px; }
.lang-menu small { margin-left: auto; color: var(--faint); font: 10.5px var(--mono); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.tag { display: inline-block; margin: 0 0 10px; font: 600 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid var(--line-2); border-radius: 99px; padding: 4px 9px; color: var(--muted); }

/* Blinkender Terminal-Cursor */
.cursor { display: inline-block; width: .55em; height: 1.05em; margin-left: 3px; vertical-align: -0.15em; background: var(--text); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* ---------- Panel ---------- */
/* Fenster-Verhalten (Desktop): Kopfzeile zum Verschieben, Ränder und Ecken zum Vergrößern */
.rz { position: absolute; z-index: 3; }
.rz-n, .rz-s { left: 10px; right: 10px; height: 7px; cursor: ns-resize; }
.rz-n { top: 0; } .rz-s { bottom: 0; }
.rz-e, .rz-w { top: 10px; bottom: 10px; width: 7px; cursor: ew-resize; }
.rz-e { right: 0; } .rz-w { left: 0; }
.rz-ne, .rz-nw, .rz-se, .rz-sw { width: 14px; height: 14px; }
.rz-ne { top: 0; right: 0; cursor: nesw-resize; } .rz-sw { bottom: 0; left: 0; cursor: nesw-resize; }
.rz-nw { top: 0; left: 0; cursor: nwse-resize; } .rz-se { bottom: 0; right: 0; cursor: nwse-resize; }
.rz-se::after { content: ""; position: absolute; right: 3px; bottom: 3px; width: 8px; height: 8px; opacity: .55;
  background: linear-gradient(135deg, transparent 0 45%, var(--muted) 45% 52%, transparent 52% 68%, var(--muted) 68% 75%, transparent 75%); }
#panel.collapsed .rz-n, #panel.collapsed .rz-s, #panel.collapsed .rz-ne, #panel.collapsed .rz-nw,
#panel.collapsed .rz-se, #panel.collapsed .rz-sw { display: none; }
#panel.collapsed { height: auto !important; }
#panel.fclosed .rz-n, #panel.fclosed .rz-s, #panel.fclosed .rz-ne, #panel.fclosed .rz-nw,
#panel.fclosed .rz-se, #panel.fclosed .rz-sw { display: none; }
#panel.fclosed { height: auto !important; }
#panel.sized { max-height: none; }
#panel.sized .panel-body { flex: 1 1 auto; display: flex; flex-direction: column; }
#panel.sized .filters:not(.closed) { flex: 1 1 auto; min-height: 0; }
#panel.sized .filters:not(.closed) .facet-list { max-height: none; flex: 1 1 auto; min-height: 80px; }
@media (min-width: 1024px) {
  .brand { cursor: move; user-select: none; }
  .brand button { cursor: pointer; }
}
body.win-dragging, body.win-dragging * { user-select: none !important; }
body.win-dragging #panel { box-shadow: 0 18px 50px rgba(0,0,0,.45); }
[data-theme="light"] body.win-dragging #panel { box-shadow: 7px 7px 0 var(--shadow-strong); }
#panel { position: fixed; top: var(--gap); left: var(--gap); width: var(--panel-w); max-height: calc(100% - 2 * var(--gap) - 40px);
  display: flex; flex-direction: column; z-index: 5; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 12px; padding: 14px 12px 12px 14px; border-bottom: 1px solid var(--line); }
.logo { width: 34px; height: 34px; flex: none; display: flex; align-items: center; justify-content: center; white-space: nowrap; border: 1.5px solid var(--text);
  border-radius: var(--r-s); font: 700 15px/1 var(--mono); letter-spacing: -.02em; }
.logo svg { width: 24px; height: 24px; fill: var(--text); stroke: var(--text); stroke-linecap: round; }
.logo .lg-line, .logo .lg-trunk { fill: none; stroke-width: 1.15; }
.logo circle { stroke: none; }
.logo circle.lg-front { stroke: var(--surface); stroke-width: 1; }
.brand-text { min-width: 0; }
.brand h1 { margin: 0; font: 700 17px/1.1 var(--mono); letter-spacing: -.01em; white-space: nowrap; }
.brand-actions { margin-left: auto; display: flex; gap: 2px; }
#collapse svg { transition: transform .2s; }
#panel.collapsed #collapse svg { transform: rotate(180deg); }
#panel.collapsed .tabs, #panel.collapsed .panel-body { display: none; }
#panel.collapsed .brand { border-bottom: 0; }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tab { flex: none; padding: 6px 10px; border-radius: var(--r-s); color: var(--muted); font: 500 12.5px/1.2 var(--mono);
  border: 1px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--text); border-color: var(--line-2); }
.tab.on { color: var(--inv-text); background: var(--inv-bg); border-color: var(--inv-bg); }
.tab.off { opacity: .5; }
.tab.on.off { opacity: .85; }
.tab small { opacity: .65; margin-left: 5px; font-size: 10.5px; }

.panel-body { padding: 12px; overflow-y: auto; min-height: 0; }
.search { position: relative; display: flex; align-items: center; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-s); padding: 0 10px; }
.search:focus-within { border-color: var(--text); }
.search svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; padding: 10px 8px; background: none; border: 0; outline: 0; font-size: 14px; }
.search input::placeholder, .facet-q::placeholder { color: var(--faint); }
.suggest { position: absolute; left: -1px; right: -1px; top: calc(100% + 6px); margin: 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r-s); box-shadow: var(--card-shadow);
  z-index: 9; max-height: 360px; overflow-y: auto; }
[data-theme="dark"] .suggest { box-shadow: 0 16px 40px rgba(0,0,0,.6); }
.suggest li { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: var(--r-s); cursor: pointer; }
.suggest li.on, .suggest li:hover { background: var(--surface-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.suggest .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest .m { color: var(--faint); font: 11.5px var(--mono); flex: none; }
.suggest .tag { margin: 0; flex: none; padding: 2px 7px; font-size: 10px; }

.filters { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.filter-toggle { display: flex; justify-content: space-between; align-items: center; padding: 2px 0;
  font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.filter-toggle b { margin-left: 6px; color: var(--inv-text); background: var(--inv-bg); padding: 2px 5px; border-radius: 3px; font-weight: 600; }
.filter-toggle b:empty { display: none; }
.filter-toggle .chev svg { width: 16px; height: 16px; transition: transform .2s; }
.filters.closed .filter-toggle .chev svg { transform: rotate(-90deg); }
.filters.closed > :not(.filter-toggle):not(.chips) { display: none; }
.facet-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.facet-tabs button { padding: 5px 9px; border-radius: var(--r-s); color: var(--muted); border: 1px solid var(--line); font: 12px/1.2 var(--mono); }
.facet-tabs button:hover { color: var(--text); border-color: var(--line-2); }
.facet-tabs button.on { color: var(--inv-text); background: var(--inv-bg); border-color: var(--inv-bg); }
.facet-tabs button b { margin-left: 5px; font-weight: 700; }
.facet-q { width: 100%; padding: 8px 10px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface-2); outline: 0; font-size: 13px; }
.facet-q:focus { border-color: var(--text); }
.facet-list { list-style: none; margin: 0; padding: 0; max-height: 196px; overflow-y: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facet-list li { display: flex; align-items: center; gap: 9px; padding: 6px 4px; cursor: pointer; border-radius: var(--r-s); }
.facet-list li:hover { background: var(--surface-2); }
.facet-list .box { width: 15px; height: 15px; border-radius: 3px; border: 1.5px solid var(--line-2); flex: none; display: grid; place-items: center;
  font-size: 10px; line-height: 1; }
[data-theme="dark"] .facet-list .box { border-color: #5a5a5a; }
.facet-list li.on .box { background: var(--inv-bg); border-color: var(--inv-bg); color: var(--inv-text); }
.facet-list .v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facet-list .n { color: var(--faint); font: 11.5px var(--mono); }
.facet-list .bar { position: relative; width: 38px; height: 3px; background: var(--surface-3); flex: none; }
.facet-list .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 3px 3px 10px; border-radius: 99px; border: 1px solid var(--line-2); font-size: 12.5px; }
[data-theme="dark"] .chip { border-color: #555; }
.chip small { color: var(--faint); font: 10.5px var(--mono); }
.chip button { width: 20px; height: 20px; border-radius: 50%; line-height: 1; color: var(--muted); }
.chip button:hover { background: var(--surface-2); color: var(--text); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-s); overflow: hidden; }
[data-theme="dark"] .seg { border-color: #555; }
.seg button { padding: 4px 9px; color: var(--muted); font: 12px var(--mono); }
.seg button.on { background: var(--inv-bg); color: var(--inv-text); }
#modeRow { font-size: 12.5px; flex-wrap: wrap; }
.years { display: flex; flex-direction: column; gap: 8px; }
#yearLabel { font-size: 12.5px; }
.dual { position: relative; height: 22px; }
.dual input { position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.dual input::-webkit-slider-runnable-track { height: 2px; background: var(--line-2); }
[data-theme="dark"] .dual input::-webkit-slider-runnable-track { background: #444; }
.dual input:last-child::-webkit-slider-runnable-track { background: none; }
.dual input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: all; width: 16px; height: 16px; margin-top: -7px;
  border-radius: 3px; background: var(--inv-bg); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--inv-bg); cursor: pointer; }
.dual input::-moz-range-track { height: 2px; background: var(--line-2); }
.dual input::-moz-range-thumb { pointer-events: all; width: 14px; height: 14px; border-radius: 3px; background: var(--inv-bg); border: 2px solid var(--surface); cursor: pointer; }
.status { font-size: 12.5px; padding-top: 2px; flex-wrap: wrap; gap: 6px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; }
.toggle input { accent-color: var(--text); margin: 0; width: 15px; height: 15px; }

/* ---------- Detail ---------- */
#detail { position: fixed; top: var(--gap); right: var(--gap); bottom: var(--gap); width: var(--detail-w); z-index: 6; display: flex; flex-direction: column; overflow: hidden; }
#detail[hidden] { display: none; }
/* Einfahren nur beim ersten Öffnen; danach wechselt nur der Inhalt */
#detail.anim-in { animation: slideInRight .38s cubic-bezier(.16, 1, .3, 1); }
#detail.anim-out { animation: slideOutRight .24s cubic-bezier(.7, 0, .84, 0) forwards; }
@keyframes slideInRight { from { transform: translateX(calc(100% + 2 * var(--gap))); } to { transform: none; } }
@keyframes slideOutRight { from { transform: none; } to { transform: translateX(calc(100% + 2 * var(--gap))); } }
@keyframes slideInUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes slideOutDown { from { transform: none; } to { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { #detail.anim-in, #detail.anim-out { animation: none; } }
.handle { display: none; }
.close { position: absolute; top: 10px; right: 10px; z-index: 2; }
/* Im Spiel lässt sich die Infobox nicht schließen: kein X anzeigen */
body.game-on #detail #close { display: none; }
body.game-on #detail .d-titles { padding-right: 0; }
.d-scroll { overflow-y: auto; padding: 18px 18px 24px; overscroll-behavior: contain; }
.d-head { display: flex; gap: 14px; }
.cover { width: 128px; flex: none; aspect-ratio: 2 / 3; border-radius: var(--r-s); overflow: hidden; border: 1px solid var(--line);
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--surface-3) 6px 7px); }
.cover.wide { aspect-ratio: 1 / 1; }
.cover.card { width: 172px; aspect-ratio: 63 / 88; border-radius: 8px; border: 0; background: none; }
.cover.card img { object-fit: contain; background: none; }
/* Mana-Symbole im Kartentext */
.d-text .ms, .d-info .ms, #dSub .ms { font-size: .95em; margin: 0 .06em; vertical-align: -.08em; }
.d-text .ms-cost, .d-info .ms-cost, #dSub .ms-cost { box-shadow: 0 0 0 .04em rgba(0,0,0,.25); }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.cover.contain img { object-fit: contain; background: var(--surface); }
.d-titles { min-width: 0; padding-right: 26px; }
.d-kicker { font: 600 10.5px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
#dKicker, .tc-kicker { display: flex; align-items: baseline; white-space: nowrap; min-width: 0; }
/* Punktmitte auf halbe Versalhöhe über der Grundlinie, unabhängig von der Schrift */
#dKicker .dot, .tc-kicker .dot { margin-right: 6px; margin-bottom: 0; margin-bottom: calc((1cap - 8px) / 2); }
#dKicker .kt, .tc-kicker .kt { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#dTitle { margin: 6px 0 4px; font: 700 22px/1.15 var(--sans); letter-spacing: -.015em; overflow-wrap: anywhere; }
#dSub { margin: 0 0 12px; font-size: 13px; }
.d-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--r-s); background: var(--inv-bg); color: var(--inv-text);
  border: 1px solid var(--inv-bg); font: 600 12.5px/1 var(--mono); text-decoration: none; transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 2px 2px 0 var(--muted); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
[data-theme="dark"] .btn.ghost { border-color: #555; }
.d-info { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); font-size: 13px; }
.d-info dt { color: var(--muted); font: 12px/1.5 var(--mono); }
.d-info dd { margin: 0; overflow-wrap: anywhere; }
.d-info dd.pchips { display: flex; flex-wrap: wrap; gap: 5px; }
.d-info dt.pdt { padding-top: 3px; }
.d-info .pchip { padding: 2px 9px; font-size: 13px; line-height: 1.45; }
.d-info .pname { padding: 2px 4px; font-size: 13px; line-height: 1.45; border: 1px solid transparent; }
.d-back { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; margin: 0 0 8px -6px; padding: 4px 9px 4px 4px;
  border-radius: var(--r-s); color: var(--muted); font: 12px/1.3 var(--mono); }
.d-back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-back svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.d-back:hover, .d-back:focus-visible { color: var(--text); background: var(--surface-2); outline: 0; }
.d-people { margin-top: 4px; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 9px; border-radius: 99px; border: 1px solid var(--line-2);
  font-size: 12.5px; text-align: left; }
[data-theme="dark"] .pchip { border-color: #444; }
.pchip small { color: var(--faint); font: 10.5px var(--mono); }
.pchip:hover { border-color: var(--text); }
.pchip.on { background: var(--inv-bg); color: var(--inv-text); border-color: var(--inv-bg); }
.pchip.on small { color: inherit; opacity: .7; }
.d-person { margin-top: 12px; padding: 10px 12px 4px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-2); }
.d-person .similar { border-top: 0; max-height: 260px; overflow-y: auto; margin-top: 6px; }
.d-person .similar li { padding: 7px 2px; }
.d-person .similar li.cur .t { font-weight: 700; }
.d-person .link { font-size: 12px; }
/* Spiel: Person als eigener Schritt, die Infobox zeigt nur deren Titel */
.d-person-big { display: none; }
#detail.person-step .d-person-big { display: block; margin: 2px 0 10px; }
.d-person-big h2 { margin: 2px 0 0; font-size: 22px; }
#detail.person-step .d-head, #detail.person-step #dInfo, #detail.person-step #dText, #detail.person-step .gm-more,
#detail.person-step .d-scroll > h3.d-h, #detail.person-step #dSimilar { display: none !important; }
#detail.person-step .d-person { margin: 0; padding: 0; border: 0; background: none; }
#detail.person-step .d-person .similar { max-height: none; border-top: 1px solid var(--line); }
#detail.person-step .d-person-big .d-kicker { margin-top: 4px; }
.d-text { white-space: pre-line; margin: 16px 0 0; font-size: 14px; line-height: 1.6; }
.d-text:empty { display: none; }
.d-h { margin: 22px 0 8px; font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.similar { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.similar li { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.similar li:hover { background: var(--surface-2); }
.similar .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.similar .m { color: var(--faint); font: 11.5px var(--mono); }

/* ---------- Kleinteile ---------- */
.tip { position: fixed; z-index: 8; pointer-events: none; padding: 7px 10px; border-radius: var(--r-s); background: var(--inv-bg); color: var(--inv-text);
  max-width: 280px; font-size: 13px; }
.tip b { font-weight: 600; }
.tip span { display: block; opacity: .7; font: 11px var(--mono); margin-top: 2px; }
.toast { position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%); z-index: 12; pointer-events: none; padding: 8px 14px;
  border-radius: var(--r-s); background: var(--inv-bg); color: var(--inv-text); font: 12.5px var(--mono); }
.toast[hidden] { display: none; }
.game-hud button { touch-action: manipulation; }   /* Doppeltippen zoomt nicht die Seite */
@media (max-width: 1023px) { .toast { text-align: center; width: max-content; max-width: calc(100vw - 32px); } }   /* Hinweise (z. B. Tipp) mittig, auch wenn sie umbrechen */
.lightbox { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px; background: var(--overlay); cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; max-height: 100%; }
.lightbox img { max-width: min(92vw, 680px); max-height: calc(100dvh - 100px); object-fit: contain; border-radius: 12px; }
.lightbox figcaption { color: var(--muted); font: 12.5px var(--mono); }

/* Legende */
.legend { position: fixed; left: var(--gap); bottom: 44px; z-index: 4; width: 260px; max-height: min(52vh, 480px);
  display: flex; flex-direction: column; padding: 10px 6px 6px 12px; }
.legend-head { display: flex; align-items: center; justify-content: space-between; padding-right: 2px; margin-bottom: 4px; }
.legend-head .icon-btn { width: 26px; height: 26px; }
.legend-head .icon-btn svg { width: 14px; height: 14px; }
.legend-list, .legend-sub { list-style: none; margin: 0; padding: 0; }
.legend-list { overflow-y: auto; padding-right: 6px; }
.lg-row, .legend-sub li { display: flex; align-items: center; gap: 8px; padding: 4px 4px; border-radius: var(--r-s); cursor: pointer; font-size: 13px; }
.lg-row:hover, .legend-sub li:hover { background: var(--surface-2); }
.lg-row .t, .legend-sub .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-row .n, .legend-sub .n { color: var(--faint); font: 11px var(--mono); }
.legend .dots { display: inline-flex; width: 30px; flex: none; }
.legend .dots .dot + .dot { margin-left: -3px; }
.legend .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1.5px var(--surface); }
.legend-sub { margin: 0 0 4px 16px; }
.legend-sub li { font-size: 12.5px; padding: 3px 4px; }
.lg-more { width: 20px; height: 20px; display: grid; place-items: center; color: var(--muted); border-radius: 4px; flex: none; }
.lg-more svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .15s; }
.lg-more.open svg { transform: rotate(90deg); }
.lg-more:hover { color: var(--text); background: var(--surface-3); }
.game-hud .icon-btn svg circle { fill: currentColor; stroke: none; }
.zoom { position: fixed; right: var(--gap); bottom: 48px; display: flex; flex-direction: column; z-index: 4; padding: 3px;
  transition: right .38s cubic-bezier(.16, 1, .3, 1); }
.zoom button { width: 34px; height: 32px; display: grid; place-items: center; border-radius: var(--r-s); font: 17px/1 var(--mono); color: var(--muted); }
.zoom button svg { width: 16px; height: 16px; }
.zoom button:hover { background: var(--surface-2); color: var(--text); }
body.detail-open .zoom { right: calc(var(--detail-w) + 2 * var(--gap)); }

.foot { position: fixed; left: var(--gap); right: var(--gap); bottom: 12px; display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; pointer-events: none; z-index: 3; font-size: 12px; color: var(--faint); }
.foot > * { pointer-events: auto; }
.hints { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--mono); font-size: 11.5px; }
.hints kbd { margin-right: 4px; }
.hint { display: inline-flex; align-items: center; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.hint kbd { transition: color .15s, border-color .15s, background .15s; }
.hint:hover, .hint:focus-visible { color: var(--text); outline: 0; }
.hint:hover kbd, .hint:focus-visible kbd { color: var(--inv-text); background: var(--inv-bg); border-color: var(--inv-bg); }
.hints.touch { align-items: center; flex-wrap: nowrap; flex: none; }
.hint-txt { white-space: nowrap; }
.hints.touch .hint kbd { margin: 0; padding: 6px 10px; font-size: 12px; }
.hints.touch { display: none; }
.attr { text-align: right; max-width: 560px; }
.attr a { color: var(--muted); }
body.detail-open .attr { margin-right: calc(var(--detail-w) + var(--gap)); }

.loading { position: fixed; inset: 0; display: grid; place-content: center; z-index: 20; background: var(--bg); transition: opacity .3s; color: var(--muted); font-size: 13px; }
.loading.hide { opacity: 0; pointer-events: none; }
.empty { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, 90vw); padding: 24px 26px; z-index: 4; }
.empty h2 { margin: 0 0 8px; font: 700 21px/1.2 var(--sans); }
.empty pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px 14px; overflow-x: auto; font: 13px/1.6 var(--mono); }

dialog { color: var(--text); width: min(560px, 92vw); padding: 24px 26px; }
dialog::backdrop { background: var(--overlay); }
dialog .close { top: 21px; right: 12px; }   /* auf Höhe der Überschrift */
dialog h2 { margin: 0 0 10px; font: 700 21px/1.2 var(--sans); }
dialog h3 { margin: 20px 0 8px; font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
dialog p { line-height: 1.6; }
dialog h2 { padding-right: 36px; }
dialog a { color: var(--text); }
.src-logo { height: 22px; width: auto; vertical-align: middle; }
.about-legal { display: flex; gap: 16px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
dialog.legal { max-height: min(86dvh, 760px); overflow-y: auto; }
dialog.legal h3 { margin-top: 18px; }
dialog.legal p { margin: 0 0 8px; font-size: 14px; }
dialog.legal .sources { margin-bottom: 10px; }
.ph { padding: 0 3px; border-radius: 3px; background: var(--surface-3); font-family: var(--mono); font-size: .92em; }
.attr { display: flex; gap: 14px; justify-content: flex-end; }
.sources { padding-left: 18px; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.src-logos { display: flex; align-items: center; gap: 22px; margin-top: 14px; flex-wrap: wrap; }
.src-logos a { display: inline-flex; font-size: 12px; }
.tmdb-logo { height: 18px; display: block; }
.bgg-logo { height: 24px; display: block; }

/* ---------- Touch-Geräte ---------- */
@media (hover: none) and (pointer: coarse) {
  /* größere Tippflächen auf Touch-Geräten */
  .foot .attr .link { padding: 8px 4px; margin: -8px -4px; }
  .seg button { padding: 8px 11px; }
  .game-hud .icon-btn { flex: none; min-width: 34px; height: 36px; }
  .gm-more { padding: 8px 0; margin-top: 4px; }
  .lg-more { width: 30px; height: 30px; }
  .lg-row, .legend-sub li { padding: 7px 4px; }
  .about-legal .link, .d-back { padding-top: 8px; padding-bottom: 8px; }
  .desk { display: none !important; }
  .hints.touch { display: flex; }
  .btn:hover { transform: none; box-shadow: none; }
}

/* ---------- Tablet und Handy: Detail als Fläche von unten ---------- */
@media (max-width: 1023px) {
  .handle { display: block; flex: none; height: 26px; cursor: grab; touch-action: none; }
  .handle i { display: block; width: 44px; height: 4px; margin: 10px auto 0; border-radius: 99px; background: var(--line-2); }
  [data-theme="dark"] .handle i { background: #555; }
  #detail { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 50dvh; max-height: calc(100dvh - 64px);
    border-radius: 14px 14px 0 0; border-bottom: 0; box-shadow: 0 -10px 40px rgba(0,0,0,.35); transition: height .25s ease; }
  [data-theme="light"] #detail { box-shadow: 0 -4px 0 var(--shadow-strong); }
  #detail[data-state="peek"] { height: 132px; }
  #detail.anim-in { animation-name: slideInUp; }
  #detail.anim-out { animation-name: slideOutDown; }
  .rz { display: none; }
  #detail[data-state="peek"] .d-scroll { overflow: hidden; }
  #detail[data-state="peek"] .cover { width: 52px; }
  #detail[data-state="peek"] .d-actions { display: none; }   /* eingeklappt: nur Bild, Kopfzeile und Titel */
  #detail[data-state="full"] { height: calc(100dvh - 64px); }
  /* Im Spiel endet die Fläche unter der Spielleiste, damit der Griff zum Herunterziehen erreichbar bleibt */
  body.game-on #detail { max-height: calc(100dvh - var(--hud-bottom, 64px) - 8px); }
  body.game-on #detail[data-state="full"] { height: calc(100dvh - var(--hud-bottom, 64px) - 8px); }
  /* Handy/Tablet: geschlossen wird per Griff (nach unten ziehen) oder Tippen auf die Karte, das X entfällt */
  #detail #close { display: none; }
  #detail .d-titles { padding-right: 0; }
  .d-scroll { padding-top: 4px; }
  body.detail-open #panel .tabs, body.detail-open #panel .panel-body { display: none; }
  body.detail-open #panel .brand { border-bottom: 0; }
  body.detail-open .zoom, body.detail-open .foot { display: none; }
  .zoom { bottom: 52px; }
}

/* ---------- Handy ---------- */
@media (max-width: 600px) {
  :root { --gap: 8px; }
  #panel { left: var(--gap); right: var(--gap); width: auto; max-height: calc(100dvh - 90px); }
  .brand { padding: 10px 8px 10px 10px; }
  .logo { width: 30px; height: 30px; }
  .logo svg { width: 21px; height: 21px; }
  .brand h1 { font-size: 16px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 8px 10px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: 7px 10px; }
  .panel-body { padding: 10px; }
  .search input { font-size: 16px; } /* verhindert Auto-Zoom auf iOS */
  .facet-q { font-size: 16px; }
  .facet-list { max-height: 30dvh; }
  .zoom { display: none; }
  .foot { left: var(--gap); right: var(--gap); bottom: 8px; }
  .hints.touch .hint-txt { display: none; }
  .hints { flex: none; }
  .attr { max-width: none; text-align: left; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #dTitle { font-size: 19px; }
  .cover { width: 112px; }
  .cover.card { width: 140px; }
  .legend { left: 8px; right: 8px; width: auto; bottom: 40px; max-height: 42vh; }
  dialog { padding: 20px; }
}

/* ---------- Ähnlichkeits-Spiel ---------- */
:root { --game: #FFD400; }
[data-theme="light"] { --game: #E0AE00; }
body.game-on #panel, body.game-on .foot .hints { display: none !important; }
.game-wrap { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; padding: 16px; background: var(--overlay); }
.game-wrap[hidden] { display: none; }
.game-modal { position: relative; width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 22px 24px; }
.game-modal.game-small { width: min(380px, 100%); }
.game-modal h2 { margin: 0 0 8px; font: 700 21px/1.25 var(--sans); }
.game-modal .close { position: absolute; top: 19px; right: 12px; }   /* Mitte auf Höhe der ersten Überschriftenzeile */
#gameSetup h2 { padding-right: 76px; }
.game-modal h2 { padding-right: 36px; }
.game-modal .gm-help-btn { right: 48px; font: 700 15px/1 var(--mono); }
.gm-foot-end { justify-content: flex-end; }
.gm-lead { margin: 0 0 16px; }
.gm-tabs { margin-bottom: 14px; }
.gm-media-row { flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.gm-media { display: flex; flex-wrap: wrap; gap: 4px; }
.gm-media button { padding: 5px 9px; border-radius: var(--r-s); border: 1px solid var(--line); color: var(--muted); font: 12px/1.2 var(--mono); }
.gm-media button:hover { color: var(--text); border-color: var(--line-2); }
.gm-media button.on { background: var(--inv-bg); color: var(--inv-text); border-color: var(--inv-bg); }
.gm-levels { flex-wrap: wrap; gap: 10px; }
.gm-roll-ic { display: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.gm-roll-ic circle { fill: currentColor; stroke: none; }
.gm-field { position: relative; display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.gm-field input { padding: 10px 12px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface-2); outline: 0; font-size: 14px; }
.gm-field input:focus { border-color: var(--text); }
.gm-field .suggest { top: 100%; }
.gm-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 16px 0 8px; padding: 14px;
  border: 1px dashed var(--line-2); border-radius: var(--r-s); }
[data-theme="dark"] .gm-pair { border-color: #444; }
.gm-end { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gm-end b { font-size: 15px; overflow-wrap: anywhere; }
.gm-arrow { font: 700 18px var(--mono); color: var(--game); }
.gm-check { min-height: 1.5em; margin: 6px 0 0; font: 12.5px/1.5 var(--mono); color: var(--muted); }
.gm-check.good::before, .gm-check.warn::before, .gm-check.bad::before { content: "● "; }
.gm-check.good::before { color: var(--game); }
.gm-check.warn::before { color: var(--muted); }
.gm-check.bad { color: var(--text); }
.gm-check.bad::before { color: #e5484d; }
.gm-foot { margin-top: 18px; flex-wrap: wrap; gap: 10px; }
.gm-foot .row { gap: 8px; }
.game-help ol { padding-left: 20px; line-height: 1.6; margin: 6px 0 14px; }
.game-help li { margin-bottom: 4px; }
.gm-keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 13px; }
.gm-keys dd { margin: 0; color: var(--muted); }
.gm-result { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 14px 0 0; }
.gm-result dt { color: var(--muted); font: 12.5px/1.6 var(--mono); }
.gm-result dd { margin: 0; font-weight: 600; }

.game-hud { position: fixed; top: var(--gap); left: 50%; transform: translateX(-50%); z-index: 7; display: flex; align-items: center;
  gap: 6px; padding: 6px 8px 6px 12px; width: max-content; max-width: calc(100vw - 2 * var(--gap)); border-top: 3px solid var(--game); }
.game-hud[hidden] { display: none; }
.gh-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 2px 6px; border-radius: var(--r-s); max-width: 210px; text-align: left; }
.gh-chip:hover { background: var(--surface-2); }
.gh-chip b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.gh-target b { box-shadow: inset 0 -3px 0 var(--game); }
.gh-arrow { font: 700 15px/1 var(--mono); color: var(--game); align-self: flex-end; margin-bottom: 4px; }   /* auf Höhe der Titel, nicht der Beschriftung */
.gh-sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; }
.gh-stat { font: 12px var(--mono); white-space: nowrap; }
.gh-stat b { font-size: 15px; }
.game-hud .icon-btn:disabled { opacity: .3; cursor: default; background: none; }
.gh-txt { width: auto; padding: 0 8px; font: 600 12px var(--mono); }
.game-hud .icon-btn { flex: none; }

/* Inhaltsangabe im Spiel eingeklappt */
.gm-more { display: none; margin-top: 12px; font: 600 12px var(--mono); }
body.game-on .gm-more { display: inline-block; }
body.game-on #dText:not(.gm-open) { display: none; }
body.game-on #dText:empty + .gm-more { display: none; }
.gm-more::after { content: " ▾"; }
.gm-more[aria-expanded="true"]::after { content: " ▴"; }

/* Personen im Spiel: gesperrte Chips (Klassik-Modus oder vielbeschäftigt ohne Joker) */
.pchip.locked { opacity: .45; text-decoration: line-through; text-decoration-thickness: 1px; }
.pchip.locked:hover { border-color: var(--line-2); }

/* Ähnlich-Liste im Spiel: Ziel hervorheben, besuchte Titel markieren */
.similar li.gm-goal { box-shadow: inset 3px 0 0 var(--game); background: var(--surface-2); }
.similar li.gm-seen .t { color: var(--faint); text-decoration: line-through; text-decoration-thickness: 1px; }
.gm-badge { font: 700 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 3px 6px; border-radius: 3px;
  background: var(--game); color: #000; }

/* pulsierender Ring am Ziel */
.game-target { position: fixed; left: 0; top: 0; z-index: 2; pointer-events: none; width: 0; height: 0; }
.game-target[hidden] { display: none; }
.game-target::before, .game-target::after { content: ""; position: absolute; left: -14px; top: -14px; width: 28px; height: 28px;
  border-radius: 50%; border: 2px solid var(--game); animation: gamePulse 1.8s ease-out infinite; }
.game-target::after { animation-delay: .9s; }
@keyframes gamePulse { from { transform: scale(1); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .game-target::before, .game-target::after { animation: none; opacity: .6; } }

@media (max-width: 760px) {
  .game-hud { left: var(--gap); right: var(--gap); width: auto; transform: none; flex-wrap: wrap; gap: 4px; padding: 6px 8px; }
  .gh-chip { max-width: 40vw; }
  .gh-sep { display: none; }
  /* Handy: Ziele in der ersten Zeile, darunter links der Schrittzähler, rechts die Knöpfe */
  .gh-break { display: block; flex-basis: 100%; width: auto; height: 1px; margin: 2px 0; background: var(--line); }
  .gh-steps { margin: 0 auto 0 6px; display: inline-flex; align-items: baseline; gap: 5px; }
  .gh-steps b { font-size: 17px; }
  .game-hud [data-act="legend"] { display: none; }
  /* Einrichten: Würfel-Symbol statt "Neu würfeln", in einer Zeile mit der Schwierigkeit */
  .gm-levels { flex-wrap: nowrap; gap: 8px; }
  .gm-levels .label { flex: none; }
  .gm-levels .seg { flex: 0 1 auto; min-width: 0; }
  .gm-levels .seg button { padding-left: 8px; padding-right: 8px; }
  .gm-roll { flex: none; width: 40px; height: 36px; padding: 0; display: grid; place-items: center; margin-left: auto; }
  .gm-roll-ic { display: block; }
  .gm-roll-tx { display: none; }
  .gm-people { margin-top: 4px; }
  .gh-stat#ghInfo { display: none; }
  .gm-pair { grid-template-columns: 1fr; }
  .gm-arrow { transform: rotate(90deg); justify-self: start; }
}
@media (min-width: 1024px) {
  body.detail-open .game-hud { left: calc((100vw - var(--detail-w) - 2 * var(--gap)) / 2); max-width: calc(100vw - var(--detail-w) - 4 * var(--gap)); }
}

/* sehr schmale Handys (320 px): Beschriftung "Schwierigkeit" weglassen, damit alle drei Stufen Platz haben */
@media (max-width: 350px) {
  .gm-levels .label { display: none; }
}

/* ---------- Spiel am Desktop: Auswahl links, Infos rechts mit großem Bild ---------- */
/* Beide Fenster enden auf derselben Höhe, oberhalb des Info-Links unten links */
.game-side { position: fixed; top: var(--gap); left: var(--gap); bottom: 44px; width: var(--side-w);
  z-index: 6; display: flex; flex-direction: column; overflow: hidden; animation: slideInLeft .32s cubic-bezier(.16, 1, .3, 1); }
.game-side[hidden] { display: none; }
.game-side .d-scroll { padding: 16px 14px 14px; }
.game-side .d-h { margin-top: 0; }
@keyframes slideInLeft { from { transform: translateX(calc(-100% - 2 * var(--gap))); } to { transform: none; } }
body.game-split #detail { bottom: 44px; }
body.game-split #detail .d-head { flex-direction: column; align-items: center; gap: 16px; }
body.game-split #detail .d-titles { width: 100%; }
/* Bild höchstens volle Breite; game.js verkleinert es so weit, dass rechts nichts gescrollt werden muss */
body.game-split #detail .cover, body.game-split #detail .cover.card, body.game-split #detail .cover.wide { width: 100%; }
body.game-side-on .legend, body.game-tleft .legend { left: calc(var(--side-w) + 2 * var(--gap)); }
@media (min-width: 1200px) {
  body.game-split.game-tleft.detail-open .game-hud, body.game-side-on.detail-open .game-hud { left: calc((100vw + var(--side-w) - var(--detail-w)) / 2);
    max-width: calc(100vw - var(--side-w) - var(--detail-w) - 4 * var(--gap)); }
}
.game-hud.gh-two { flex-wrap: wrap; row-gap: 4px; }
.game-hud.gh-two .gh-break { display: block; flex-basis: 100%; width: auto; height: 1px; margin: 2px 0; background: var(--line); }
.game-hud.gh-two .gh-steps { margin-right: 0; }
.game-hud.gh-two #ghInfo { margin-right: auto; }   /* Klicks direkt neben den Schritten, Knöpfe rechts */

/* ---------- Spiel: Tipp mit aufgefächerten Jokern ---------- */
.gh-aids { position: relative; display: flex; flex: none; }
.gh-txt.off { opacity: .4; }
.gh-fan { position: absolute; top: 100%; right: -4px; padding-top: 10px; display: flex; flex-direction: column; gap: 6px;
  width: 236px; pointer-events: none; z-index: 2; }
.gh-aid { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 9px 12px; text-align: left;
  background: var(--surface); border: 1px solid var(--line-2); border-left: 3px solid var(--game); border-radius: var(--r-s);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .35); opacity: 0; visibility: hidden;
  transform: translateY(calc(-100% * var(--k, 0) - 10px)) rotate(calc(-3deg * var(--k, 0))); transform-origin: 90% 0;
  transition: opacity .14s, transform .26s cubic-bezier(.2, .9, .3, 1.15), visibility 0s .26s; }
.gh-aid[hidden] { display: none; }
.gh-aid { position: relative; padding-right: 52px; }
.gh-cost { position: absolute; top: 9px; right: 10px; font: 600 11px/1.2 var(--mono); font-style: normal; color: var(--muted); }
.gh-aid b { font: 700 10.5px/1.2 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--game); }
.gh-aid span { font-size: 13px; line-height: 1.3; color: var(--text); }
.gh-aid:hover:not(:disabled) { background: var(--surface-2); }
.gh-aid:disabled { cursor: default; }
.gh-aid:disabled span, .gh-aid:disabled b { opacity: .45; }
.gh-aids.open .gh-fan { pointer-events: auto; }
.gh-aids.open .gh-aid { opacity: 1; visibility: visible; transform: none; transition-delay: calc(.045s * var(--k, 0)), calc(.045s * var(--k, 0)), 0s; }
@media (hover: hover) {
  .gh-aid-hint { display: none; }                 /* am Rechner ist der Tipp der Knopf selbst */
  .gh-aids.no-jokers .gh-fan { display: none; }     /* beide Joker eingesetzt: kein Fächer mehr */
  .gh-aids:not(.shut):hover .gh-fan, .gh-aids:not(.shut):focus-within .gh-fan { pointer-events: auto; }
  .gh-aids:not(.shut):hover .gh-aid, .gh-aids:not(.shut):focus-within .gh-aid { opacity: 1; visibility: visible; transform: none;
    transition-delay: calc(.045s * var(--k, 0)), calc(.045s * var(--k, 0)), 0s; }
}
@media (prefers-reduced-motion: reduce) { .gh-aid { transition: none; } }
@media (max-width: 760px) {   /* Handy: Fächer am rechten Rand der Spielleiste, damit er nicht aus dem Bild ragt */
  .gh-aids { position: static; }
  .gh-fan { right: 6px; width: min(260px, calc(100vw - 32px)); }
}

/* Joker 1: Möglichkeiten auf einem kürzesten Weg */
.similar li.gm-path { background: color-mix(in srgb, var(--game) 13%, transparent); }
.gm-pbadge { font: 700 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 2px 5px; border-radius: 3px;
  border: 1.5px solid var(--game); color: var(--game); margin-left: 6px; flex: none; }
.pchip.gm-path { border-color: var(--game); box-shadow: inset 0 0 0 1px var(--game); }

/* Joker 2: Infos zum Ziel */
.game-tcard { position: fixed; z-index: 8; display: flex; flex-direction: column; overflow: hidden; border-top: 3px solid var(--game); }
.game-tcard[hidden] { display: none; }
.game-tcard.at-right { top: var(--gap); right: var(--gap); bottom: var(--gap); width: var(--detail-w); }
body.game-split .game-tcard.at-right { bottom: 44px; }
.game-tcard.at-left { top: calc(var(--hud-bottom, 72px) + 8px); left: var(--gap); bottom: var(--gap); width: var(--side-w); }
body.game-split .game-tcard.at-left { top: var(--gap); bottom: 44px; }
.game-tcard.at-sheet { top: calc(var(--hud-bottom, 64px) + 8px); left: 8px; right: 8px; max-height: calc(100dvh - var(--hud-bottom, 64px) - 16px);
  width: auto; max-width: 480px; margin: 0 auto; z-index: 11; box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
.tc-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 0 18px; flex: none; }
.tc-label { font: 700 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--game); }
.tc-head .close { position: static; }
.tc-body { padding: 10px 18px 20px; }
.tc-body .cover { width: min(100%, 190px); margin: 0 auto 14px; }
.tc-body .cover.card { width: min(100%, 210px); }
.tc-body .cover.wide { width: min(100%, 220px); }
.tc-body h2 { margin: 6px 0 2px; }
.tc-body .d-info { margin-top: 14px; }
.tc-body .pchip { pointer-events: none; }
.tc-body .d-text { margin-top: 14px; }
.game-tcard.at-sheet .tc-body .cover { width: min(100%, 150px); }
.game-hud.gh-tight [data-act="legend"] { display: none; }
.game-hud.gh-tighter #ghInfo { display: none; }
.game-hud.gh-tighter .gh-steps { margin-right: auto; }

/* ---------- Spiel: Punkte im Ergebnis ---------- */
.ge-score { margin: 14px 0 4px; padding: 14px 16px; border-radius: var(--r-s); background: var(--surface-2); border-left: 3px solid var(--game); }
.ge-pts { display: flex; align-items: baseline; gap: 8px; }
.ge-pts b { font: 700 40px/1 var(--mono); color: var(--game); letter-spacing: -.02em; }
.ge-pts span { font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ge-best { margin: 6px 0 0; font: 12px var(--mono); color: var(--muted); }
.ge-best:empty { display: none; }
.ge-best.rec { color: var(--game); font-weight: 700; }
.ge-calc { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.ge-calc dt { font: 12.5px/1.5 var(--mono); color: var(--muted); }
.ge-calc dd { margin: 0; font: 600 12.5px/1.5 var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.ge-calc dd.neg { color: var(--muted); }
@media (max-width: 600px) { .ge-pts b { font-size: 34px; } .ge-score { padding: 12px 14px; } }
