/* Wikirennen – Oberfläche im Stil einer Wikipedia-Seite (Vector 2022 am Rechner, Minerva-artig am Handy).
   Komplett selbst geschrieben – made by Oskar */

/* Serifenschrift lokal: Libertinus Serif (SIL OFL 1.1, Nachfolger von Linux Libertine), siehe fonts/OFL.txt */
@font-face { font-family: 'WR Libertinus'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/libertinus-serif-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'WR Libertinus'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/libertinus-serif-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'WR Libertinus'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/libertinus-serif-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'WR Libertinus'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/libertinus-serif-latin-ext-700-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'WR Libertinus'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/libertinus-serif-latin-400-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --text: #202122; --subtle: #54595d; --placeholder: #72777d;
  --link: #36c; --link-hover: #3056a9; --link-active: #233566; --red: #d73333; --visited: #6b4ba1;
  --border: #a2a9b1; --border-subtle: #c8ccd1; --border-muted: #eaecf0;
  --bg: #fff; --bg-subtle: #f8f9fa; --bg-muted: #eaecf0;
  --success: #14866d; --success-bg: #dff2eb; --warn: #a66200; --warn-bg: #fef6e7; --error: #bf3c2c; --error-bg: #fee7e6; --notice-bg: #eaecf0;
  --serif: 'Linux Libertine', 'WR Libertinus', 'Georgia', 'Times', serif;
  --sans: sans-serif;
  --hud-h: 0px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hud-h) + 10px); }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.6;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); min-height: 100dvh; }
a { color: var(--link); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
a:active { color: var(--link-active); }
a.new { color: var(--red); }
button { font-family: inherit; }
.hidden { display: none !important; }
body.solo .multi-only { display: none !important; }
body:not(.solo) .solo-only { display: none !important; }
.muted { color: var(--subtle); }
.small { font-size: 87.5%; }
.nowrap { white-space: nowrap; }
::selection { background: #c8d8f8; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ------------------------------------------------------------------ Kopfzeile (Vector 2022) */
.vh { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 24px 0 12px; max-width: 1596px; margin: 6px auto 0; position: relative; z-index: 50; }
.vh-burger, .vh-iconbtn { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 2px; background: transparent; color: var(--text); cursor: pointer; padding: 0; }
.vh-burger:hover, .vh-iconbtn:hover { background: rgba(0,24,73,.03); border-color: transparent; }
.vh-burger:active, .vh-iconbtn:active { background: rgba(0,24,73,.08); }
.vh-burger svg, .vh-iconbtn svg { width: 20px; height: 20px; }
.vh-logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; flex: none; }
.vh-logo img { width: 50px; height: 50px; display: block; }
.vh-wm { display: flex; flex-direction: column; line-height: 1; }
.vh-wm b { font-family: var(--serif); font-weight: 400; font-size: 24px; letter-spacing: .02em; font-variant: small-caps; color: #000; }
.vh-wm small { font-family: var(--serif); font-size: 12.5px; color: var(--text); margin-top: 3px; letter-spacing: .02em; }
.vh-search { display: flex; flex: 1; max-width: 500px; margin-left: 24px; }
.vh-search .cdx-input-wrap { flex: 1; position: relative; }
.vh-search .cdx-input-wrap svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--placeholder); pointer-events: none; }
.vh-search input[type=text] { width: 100%; padding-left: 34px; border-radius: 2px 0 0 2px; text-transform: uppercase; }
.vh-search input::placeholder { text-transform: none; }
.vh-search .cdx-btn { border-radius: 0 2px 2px 0; margin-left: -1px; }
.vh-user { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 14px; }
.vh-userbtn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--link); font-size: 14px; cursor: pointer; padding: 4px; max-width: 220px; }
.vh-userbtn span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vh-userbtn:hover span:last-child { text-decoration: underline; }
.vh-searchtoggle { display: none; }
.vh-menu { position: absolute; z-index: 60; top: 58px; left: max(12px, calc((100vw - 1596px) / 2 + 12px)); background: #fff; border: 1px solid var(--border); border-radius: 2px;
  box-shadow: 0 2px 2px rgba(0,0,0,.2); padding: 12px 16px; min-width: 220px; font-size: 14px; }
.vh-menu .menu-h { font-weight: 700; color: var(--subtle); border-bottom: 1px solid var(--border-subtle); padding-bottom: 4px; margin-bottom: 6px; display: flex; justify-content: space-between; }
.vh-menu ul { list-style: none; margin: 0 0 8px; padding: 0; }
.vh-menu li { padding: 4px 0; }

/* ------------------------------------------------------------------ Seitenraster */
.vp { display: grid; grid-template-columns: 15.5em minmax(0, 1fr); column-gap: 28px; max-width: 1596px; margin: 0 auto; padding: 0 24px; }
.vp.no-toc { grid-template-columns: minmax(0, 1fr); }
.vtoc { position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; padding: 22px 0 20px; font-size: 14px; }
.vtoc-h { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; border-bottom: 1px solid var(--border-subtle); padding-bottom: 6px; margin-bottom: 8px; }
.vtoc-h button, .linkbtn { background: none; border: 0; color: var(--link); font-size: 13px; cursor: pointer; padding: 0; font-weight: 400; }
.linkbtn:hover, .vtoc-h button:hover { text-decoration: underline; }
.vtoc ul { list-style: none; margin: 0; padding: 0; }
.vtoc li { padding: 4px 0; line-height: 1.3; }
.vtoc li a { color: var(--link); }
.vtoc li.top a { color: var(--text); font-weight: 700; }
.vtoc li.on a { color: var(--text); font-weight: 700; }
.vmain { min-width: 0; padding-bottom: 30px; }

/* Titel, Reiter, Unterzeile */
.vtitlebar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); margin-top: 18px; }
.vtitlebar h1 { font-family: var(--serif); font-weight: 400; font-size: 1.8em; line-height: 1.375; margin: 0 0 3px; color: #000; overflow-wrap: anywhere; }
.vtitlebar .vlang svg { width: 18px; height: 18px; }
.vtitlebar .vlang { flex: none; font-size: 14px; font-weight: 700; color: var(--link); padding: 0 0 8px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.vtabs { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border-muted); font-size: 14px; margin-bottom: 6px; overflow-x: auto; scrollbar-width: none; }
.vtabs::-webkit-scrollbar { display: none; }
.vtabs > div { display: flex; gap: 18px; }
.vtabs a, .vtabs button { display: inline-block; padding: 7px 0 6px; color: var(--link); background: none; border: 0; border-bottom: 2px solid transparent; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.vtabs a:hover, .vtabs button:hover { border-bottom-color: var(--link); }
.vtabs .sel, .vtabs .sel:hover { color: var(--text); border-bottom-color: var(--text); }
.vtagline { font-size: 12.8px; color: var(--subtle); margin: 4px 0 14px; }
.vbody { font-size: 16px; }
.vbody h2 { font-family: var(--serif); font-weight: 400; font-size: 1.5em; line-height: 1.375; margin: 1.1em 0 .4em; padding: 0 0 2px; border-bottom: 1px solid var(--border); color: #000; display: flex; align-items: baseline; gap: 10px; }
.vbody h2 .editlink { font-family: var(--sans); font-size: 14px; color: var(--subtle); margin-left: auto; white-space: nowrap; }
.vbody h3 { font-size: 1.15em; font-weight: 700; margin: .9em 0 .3em; }
.vbody p { margin: .4em 0 .6em; }
.vbody ul, .vbody ol { margin: .3em 0 .6em 1.6em; padding: 0; }
.vbody li { margin-bottom: .1em; }
.hatnote { font-style: italic; padding-left: 1.6em; margin: 0 0 .7em; color: var(--text); }
.clear { clear: both; }

/* ------------------------------------------------------------------ Codex-artige Bedienelemente */
.cdx-btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; min-width: 32px; padding: 4px 12px; border: 1px solid var(--border); border-radius: 2px;
  background: var(--bg-subtle); color: var(--text); font: 700 14px/1.43 var(--sans); cursor: pointer; text-decoration: none !important; white-space: nowrap; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.cdx-btn:hover { background: #fff; color: #404244; border-color: #72777d; }
.cdx-btn:active { background: var(--bg-muted); border-color: #72777d; color: #000; }
.cdx-btn:disabled { background: var(--bg-muted); color: #a2a9b1; border-color: var(--border-subtle); cursor: default; }
.cdx-btn.primary { background: var(--link); border-color: var(--link); color: #fff; }
.cdx-btn.primary:hover { background: var(--link-hover); border-color: var(--link-hover); color: #fff; }
.cdx-btn.primary:active { background: var(--link-active); border-color: var(--link-active); }
.cdx-btn.primary:disabled { background: #c8ccd1; border-color: #c8ccd1; color: #fff; }
.cdx-btn.progressive { color: var(--link); }
.cdx-btn.destructive { color: var(--error); }
.cdx-btn.destructive.primary { background: var(--error); border-color: var(--error); color: #fff; }
.cdx-btn.destructive.primary:hover { background: #9f3526; border-color: #9f3526; }
.cdx-btn.quiet { background: transparent; border-color: transparent; }
.cdx-btn.quiet:hover { background: rgba(0,24,73,.03); border-color: transparent; }
.cdx-btn.quiet:active { background: rgba(0,24,73,.08); }
.cdx-btn.big { min-height: 44px; padding: 8px 18px; font-size: 16px; }
.cdx-btn.success { background: var(--success); border-color: var(--success); color: #fff; }
.cdx-btn.success:hover { background: #0e6b56; border-color: #0e6b56; color: #fff; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }

input[type=text], input[type=url], select, textarea {
  font: 400 16px/1.375 var(--sans); color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 2px;
  min-height: 32px; padding: 4px 8px; width: 100%; outline: none; -webkit-appearance: none; appearance: none; }
input[type=text]:hover, select:hover { border-color: #72777d; }
input[type=text]:focus, select:focus, textarea:focus { border-color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
input::placeholder { color: var(--placeholder); }
select { padding-right: 30px; cursor: pointer; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%23202122' d='m17.5 4.75-7.5 7.5-7.5-7.5L1 6.25l9 9 9-9z'/%3E%3C/svg%3E") no-repeat right 9px center / 12px; }
select:disabled, input:disabled { background-color: var(--bg-muted); color: #72777d; border-color: var(--border-subtle); cursor: default; }
label.fld { display: block; font-size: 14px; font-weight: 700; margin: 0 0 12px; }
label.fld > select, label.fld > input, label.fld > .ac { margin-top: 4px; font-weight: 400; }
label.fld .help { display: block; font-weight: 400; color: var(--subtle); font-size: 13px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; max-width: 760px; }
.fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inline-field { display: flex; gap: 0; }
.inline-field input { border-radius: 2px 0 0 2px; }
.inline-field .cdx-btn { border-radius: 0 2px 2px 0; margin-left: -1px; }

/* Nachrichtenboxen */
.cdx-msg { border: 1px solid var(--border); background: var(--notice-bg); border-radius: 2px; padding: 12px 16px; margin: 10px 0 14px; display: flex; gap: 12px; align-items: flex-start; }
.cdx-msg .ico { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--sans); color: #fff; background: #54595d; margin-top: 2px; }
.cdx-msg.success { background: var(--success-bg); border-color: var(--success); }
.cdx-msg.success .ico { background: var(--success); }
.cdx-msg.warning { background: var(--warn-bg); border-color: #a66200; }
.cdx-msg.warning .ico { background: #a66200; }
.cdx-msg.error { background: var(--error-bg); border-color: var(--error); }
.cdx-msg.error .ico { background: var(--error); }
.cdx-msg > div { flex: 1; min-width: 0; }

/* Infobox */
.infobox { float: right; clear: right; width: 22em; max-width: 100%; margin: 0 0 1em 1.4em; background: var(--bg-subtle); border: 1px solid var(--border); border-spacing: 3px; padding: 3px; font-size: 88%; line-height: 1.5; color: var(--text); }
.infobox caption { font-size: 125%; font-weight: 700; padding: .2em; }
.infobox th, .infobox td { vertical-align: top; text-align: left; padding: 2px 4px; }
.infobox th { font-weight: 700; padding-right: 10px; }
.infobox .ib-head { background: #cedff2; text-align: center; font-weight: 700; }
.infobox .ib-center { text-align: center; }
.infobox .ib-code { font-family: var(--serif); font-size: 46px; letter-spacing: 6px; line-height: 1.1; padding: 8px 0 2px; color: #000; text-align: center; }
.infobox .ib-btns { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 6px 0; }

/* Tabellen */
.wikitable { background: var(--bg-subtle); color: var(--text); border: 1px solid var(--border); border-collapse: collapse; margin: .8em 0 1em; font-size: 15px; }
.wikitable > * > tr > th, .wikitable > * > tr > td { border: 1px solid var(--border); padding: .25em .5em; vertical-align: top; }
.wikitable > * > tr > th { background: var(--bg-muted); text-align: center; }
.wikitable .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wikitable .c { text-align: center; }
.wikitable tr.me > td { background: #eaf3ff; }
.wikitable tr.locked > td { color: #72777d; }
.wikitable .g1 { background: #f7f6a8 !important; } .wikitable .g2 { background: #dce5e5 !important; } .wikitable .g3 { background: #ffdab9 !important; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.table-scroll > .wikitable { margin-top: .4em; }

/* Hauptseiten-Kästen */
.mp-welcome { border: 1px solid var(--border); background: var(--bg-subtle); text-align: center; padding: 14px 10px 10px; margin: 6px 0 14px; }
.mp-welcome .w1 { font-family: var(--serif); font-size: 28px; line-height: 1.2; }
.mp-welcome .w2 { font-size: 15px; color: var(--text); margin-top: 4px; }
.mp-welcome .w3 { font-size: 13px; color: var(--subtle); margin-top: 6px; }
.mp-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.mp-col { display: grid; gap: 14px; }
.mp-box { border: 1px solid #cedff2; background: #f5faff; padding: 0 12px 10px; }
.mp-box > h2 { margin: 0 -12px 10px !important; padding: 3px 10px !important; background: #cedff2; border: 1px solid #a3b0bf !important; font-size: 1.2em !important; font-family: var(--serif); }
.mp-box.green { border-color: #c6e9d6; background: #f5fffa; }
.mp-box.green > h2 { background: #cef2e0; border-color: #a3bfb1 !important; }
.mp-box.amber { border-color: #f0dfb5; background: #fffbf2; }
.mp-box.amber > h2 { background: #faecc8; border-color: #d9c38f !important; }
.mp-box.violet { border-color: #ddcef2; background: #faf5ff; }
.mp-box.violet > h2 { background: #ddcef2; border-color: #afa3bf !important; }
.mp-box.full { grid-column: 1 / -1; }
.mp-route { font-family: var(--serif); font-size: 21px; line-height: 1.3; margin: 2px 0 6px; }
.mp-route .arr { font-family: var(--sans); color: var(--subtle); font-size: 16px; padding: 0 6px; }
.profile-row { display: flex; gap: 10px; align-items: center; }
.profile-row input { flex: 1; min-width: 0; }
.avatar-btn { flex: none; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 2px; background: #fff; font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; overflow: hidden; }
.avatar-btn:hover { border-color: #72777d; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 4px; margin-top: 8px; padding: 8px; background: #fff; border: 1px solid var(--border-subtle); }
.avatar-grid button { height: 38px; font-size: 22px; border: 1px solid transparent; background: none; border-radius: 2px; cursor: pointer; padding: 0; }
.avatar-grid button[aria-pressed=true] { border-color: var(--link); background: #eaf3ff; }
.av { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; font-size: 1em; line-height: 1; vertical-align: -0.3em; border-radius: 2px; overflow: hidden; flex: none; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.lg { font-size: 34px; width: 1.3em; height: 1.3em; }
.mp-actions { display: grid; gap: 8px; }
.mp-actions .cdx-btn { justify-content: flex-start; }
.join-row { display: flex; margin-top: 10px; }
.join-row input[type=text] { text-transform: uppercase; letter-spacing: 4px; font-family: var(--serif); font-size: 20px; text-align: center; border-radius: 2px 0 0 2px; }
.join-row input::placeholder { letter-spacing: 1px; font-size: 16px; font-family: var(--sans); text-transform: none; }
.join-row .cdx-btn { border-radius: 0 2px 2px 0; margin-left: -1px; }
.browse-list { list-style: none; margin: 0 !important; padding: 0; }
.browse-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border-muted); }
.browse-list li:last-child { border-bottom: 0; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--error); margin-right: 5px; vertical-align: 1px; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* Lobby */
.player-list { list-style: none; margin: .4em 0 .6em !important; padding: 0; columns: 2 220px; column-gap: 24px; }
.player-list li { break-inside: avoid; padding: 3px 0; display: flex; align-items: center; gap: 6px; }
.player-list .nm { color: var(--link); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-list li.me .nm { font-weight: 700; }
.player-list .tag { color: var(--subtle); font-size: 13px; }
.player-list .kick { font-size: 13px; color: var(--subtle); background: none; border: 0; cursor: pointer; padding: 0 2px; }
.player-list .kick:hover { color: var(--error); text-decoration: underline; }
.custom-targets { display: grid; gap: 0; }
.ac { position: relative; display: flex; }
.ac input { flex: 1; min-width: 0; border-radius: 2px 0 0 2px; }
.ac .dice { flex: none; border-radius: 0 2px 2px 0; margin-left: -1px; font-weight: 400; font-size: 16px; padding: 0 10px; }
.ac-list { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; background: #fff; border: 1px solid var(--border); border-top: 0; box-shadow: 0 2px 2px rgba(0,0,0,.2); max-height: 260px; overflow-y: auto; font-weight: 400; }
.ac-list div { padding: 7px 10px; cursor: pointer; font-size: 15px; }
.ac-list div:hover, .ac-list div.on { background: #eaf3ff; }
.sugg-list { list-style: none; margin: 4px 0 8px !important; padding: 0; }
.sugg-list li { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--border-muted); flex-wrap: wrap; }
.sugg-list .t { font-family: var(--serif); font-size: 18px; }
.start-row { margin: 18px 0 8px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Chat als Diskussionsseite */
.talk { border: 1px solid var(--border-muted); background: #fff; }
.talk .chat-log { height: 190px; overflow-y: auto; padding: 8px 12px; font-size: 15px; overflow-wrap: anywhere; }
.talk .chat-log p { margin: 0 0 6px; padding-left: 0; line-height: 1.45; }
.talk .chat-log p.sys { color: var(--subtle); font-style: italic; font-size: 14px; }
.talk .chat-log .sig { color: var(--subtle); white-space: nowrap; }
.talk .chat-log .sig a { color: var(--link); }
.talk .chat-log .ts { color: var(--placeholder); font-size: 12px; }
.chat-form { display: flex; border-top: 1px solid var(--border-muted); padding: 8px; gap: 0; background: var(--bg-subtle); }
.chat-form input { border-radius: 2px 0 0 2px; }
.chat-form .cdx-btn { border-radius: 0 2px 2px 0; margin-left: -1px; }

/* Countdown */
.preview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 10px 0 16px; }
.pcard { border: 1px solid var(--border-subtle); background: #fff; box-shadow: 0 30px 90px -20px rgba(0,0,0,.2), 0 0 1px rgba(0,0,0,.25); border-radius: 2px; overflow: hidden; display: flex; flex-direction: column; }
.pcard .lbl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--subtle); padding: 10px 16px 0; }
.pcard .pimg { width: 100%; height: 150px; object-fit: cover; background: var(--bg-subtle); display: block; border-bottom: 1px solid var(--border-muted); }
.pcard .ptitle { font-family: var(--serif); font-size: 26px; line-height: 1.2; padding: 4px 16px 0; color: #000; overflow-wrap: anywhere; }
.pcard .pdesc { color: var(--subtle); font-size: 14px; padding: 2px 16px 0; }
.pcard .pext { font-size: 15px; line-height: 1.5; padding: 8px 16px 14px; margin: 0; }
.pcard.target { border-top: 3px solid var(--link); }
.cd-banner { display: flex; align-items: center; gap: 18px; }
.cd-num { font-family: var(--serif); font-size: 64px; line-height: 1; min-width: 60px; text-align: center; color: #000; }
.cd-num.pop { animation: cdpop .35s ease-out; }
@keyframes cdpop { from { transform: scale(1.4); opacity: .3; } }
.spinner { width: 28px; height: 28px; border: 3px solid var(--border-muted); border-top-color: var(--link); border-radius: 50%; animation: spin .9s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ Rennen: klebende Leiste (wie Vectors Sticky-Header) */
body.racing .vtoc { display: none; }
body.racing .vp { grid-template-columns: minmax(0, 1fr); padding: 0 16px; }
.hud { position: sticky; top: 0; z-index: 40; background: #fff; margin: 0 -16px; padding: 6px 16px 0; box-shadow: 0 1px 0 var(--border-subtle), 0 2px 4px rgba(0,0,0,.08); }
.hud-row { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.hud-logo { width: 32px; height: 32px; flex: none; }
.target-chip { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 2px 4px; cursor: pointer; text-align: left; color: var(--text); border-radius: 2px; }
.target-chip:hover { background: rgba(0,24,73,.03); }
.target-chip .lbl { font-size: 12px; font-weight: 700; color: var(--subtle); text-transform: uppercase; letter-spacing: .05em; flex: none; }
.target-chip .tn { font-family: var(--serif); font-size: 22px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #000; }
.target-chip .tn .done { color: var(--success); text-decoration: line-through; }
.target-chip .tn .sep { color: var(--border); font-family: var(--sans); font-size: 15px; padding: 0 4px; }
.hud-stats { display: flex; gap: 14px; align-items: center; flex: none; font-size: 14px; }
.stat { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.stat .k { font-size: 11px; color: var(--subtle); text-transform: uppercase; letter-spacing: .05em; }
.stat .v { font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.stat .v.low { color: var(--error); animation: blink 1s infinite; }
.hud-btns { display: flex; gap: 4px; flex: none; align-items: center; }
.hud-btns .cdx-btn { padding: 4px 9px; }
.crumbs { display: flex; gap: 2px; align-items: center; overflow-x: auto; white-space: nowrap; padding: 2px 0 6px; font-size: 13px; color: var(--subtle); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.crumbs::-webkit-scrollbar { display: none; }
.crumbs .st { color: var(--link); }
.crumbs .st.cur { color: var(--text); font-weight: 700; }
.crumbs .st.back { color: var(--subtle); text-decoration: line-through; }
.crumbs .st.goal { color: var(--success); font-weight: 700; }
.crumbs .st.restart { color: var(--warn); }
.crumbs .ar { color: var(--border); padding: 0 3px; }
.found-bar { margin: 8px 0 0; }
.race-grid { display: grid; grid-template-columns: minmax(0, 1fr) 15.5em; column-gap: 24px; align-items: start; margin-top: 6px; }
.wiki-host { min-width: 0; min-height: 60vh; position: relative; transition: filter .4s; }
.wiki-host.fog { filter: blur(6px) grayscale(.5); }
.tools { position: sticky; top: calc(var(--hud-h) + 8px); max-height: calc(100dvh - var(--hud-h) - 16px); overflow-y: auto; font-size: 14px; padding: 14px 0 10px; }
.tools-h { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; border-bottom: 1px solid var(--border-subtle); padding-bottom: 6px; margin-bottom: 6px; }
.tools-sub { font-size: 12px; color: var(--subtle); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin: 14px 0 4px; }
.panel-backdrop { display: none; }
.live-list { list-style: none; margin: 0; padding: 0; }
.live { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 6px; padding: 5px 4px; border-radius: 2px; border-bottom: 1px solid var(--border-muted); align-items: center; }
.live.can { cursor: pointer; }
.live.can:hover { background: var(--bg-subtle); }
.live.sel { background: #eaf3ff; }
.live .av { grid-row: span 2; }
.live .nm { color: var(--link); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live.me .nm { color: var(--text); }
.live .cl { font-variant-numeric: tabular-nums; color: var(--subtle); white-space: nowrap; font-size: 13px; }
.live .where { grid-column: 2 / 4; font-size: 12.5px; color: var(--subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live.done .where { color: var(--success); font-weight: 700; }
.live.out .where { color: var(--error); }
.spec-path { margin: 4px 0 0 1.4em !important; padding: 0; font-family: var(--serif); font-size: 15px; }
.spec-path li.b { color: var(--subtle); }
.spec-path li.x::after { content: ' ⚠'; color: var(--error); }
.spec-path li.f { color: var(--success); font-weight: 700; }
.spec-path li.r { color: var(--warn); }
.rules-list { margin: 0 0 0 1.2em !important; padding: 0; font-size: 13px; }
.tools .talk .chat-log { height: 150px; font-size: 13.5px; padding: 6px 8px; }
.tools .chat-form { padding: 6px; }
.tools .chat-form input { font-size: 15px; }
.panel-close { display: none; }

/* Power-ups */
.power-menu { position: absolute; z-index: 45; right: 16px; top: 100%; background: #fff; border: 1px solid var(--border); border-radius: 2px; box-shadow: 0 2px 2px rgba(0,0,0,.2); padding: 10px 12px; width: 300px; max-width: calc(100vw - 24px); font-size: 14px; }
.power-menu h4 { margin: 0 0 6px; font-size: 14px; }
.power-menu .pw { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border-muted); }
.power-menu .pw:last-of-type { border-bottom: 0; }
.power-menu .pw .d { flex: 1; color: var(--subtle); font-size: 13px; line-height: 1.3; }
.power-menu .pw .d b { color: var(--text); display: block; font-size: 14px; }
.power-menu select { font-size: 14px; margin: 4px 0 8px; }
.fx-ink { position: fixed; inset: 0; z-index: 38; pointer-events: none; }
.fx-ink span { position: absolute; background: #101418; border-radius: 50% 45% 55% 40%; opacity: .93; animation: inkin .3s ease-out; }
@keyframes inkin { from { transform: scale(.2); } }
.fx-badge { position: fixed; left: 50%; top: calc(var(--hud-h) + 14px); transform: translateX(-50%); z-index: 46; background: #fff; border: 1px solid var(--error); color: var(--error); font-weight: 700; padding: 6px 14px; border-radius: 2px; font-size: 14px; box-shadow: 0 2px 2px rgba(0,0,0,.2); white-space: nowrap; }

/* Ergebnisse */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin: 10px 0 20px; }
.pod { text-align: center; width: 130px; }
.pod .who { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--link); }
.pod .bar { border: 1px solid var(--border); font-family: var(--serif); font-size: 34px; display: grid; place-items: center; color: #000; }
.pod.g .bar { background: #f7f6a8; height: 130px; }
.pod.s .bar { background: #dce5e5; height: 95px; }
.pod.b .bar { background: #ffdab9; height: 70px; }
.pod .pts { font-size: 14px; color: var(--subtle); margin-top: 4px; }
.res-path { font-size: 13.5px; line-height: 1.7; margin-top: 2px; }
.res-path a { white-space: nowrap; }
.res-path a.b { color: var(--subtle); text-decoration: line-through; }
.res-path a.x { color: var(--red); }
.res-path a.goal { color: var(--success); font-weight: 700; }
.res-path a.r { color: var(--warn); }
.res-path .ar { color: var(--border); padding: 0 2px; }
.cmp td { font-family: var(--serif); font-size: 15px; min-width: 120px; }
.cmp td.goal { color: var(--success); font-weight: 700; }
.cmp td.b { color: var(--subtle); text-decoration: line-through; }
.cmp td.x { color: var(--red); }
.cmp td.r { color: var(--warn); }
.cmp td.same { background: #eaf3ff; }
.cmp th.step { font-family: var(--sans); font-weight: 400; color: var(--subtle); font-size: 13px; }
.stars { color: #b8860b; letter-spacing: 1px; white-space: nowrap; }
.stars .off { color: #c8ccd1; }
.share-box textarea { font-size: 14px; height: 74px; resize: vertical; margin-top: 6px; font-family: var(--sans); }

/* Dialog: Seitenvorschau-Karte */
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(255,255,255,.6); display: grid; place-items: center; padding: 16px; }
.modal-card { position: relative; width: min(480px, 100%); max-height: 88dvh; overflow-y: auto; background: #fff; border: 1px solid var(--border); border-radius: 2px; box-shadow: 0 30px 90px -20px rgba(0,0,0,.3), 0 0 1px 1px rgba(0,0,0,.05); }
.modal-card .pcard { border: 0; box-shadow: none; }
.modal-card .modal-foot { border-top: 1px solid var(--border-muted); padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.modal-x { position: absolute; right: 6px; top: 6px; z-index: 2; background: rgba(255,255,255,.85); }
.modal-card ul { font-size: 14px; margin: 0 16px 10px 34px; padding: 0; }

/* Benachrichtigung (wie mw.notify) */
.toast { position: fixed; right: 16px; top: calc(var(--hud-h) + 16px); z-index: 99; background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: 2px; box-shadow: 0 2px 2px rgba(0,0,0,.25);
  padding: 10px 18px; max-width: min(360px, calc(100vw - 32px)); font-size: 14px; animation: toastin .2s ease-out; }
@keyframes toastin { from { transform: translateX(20px); opacity: 0; } }

/* Fußzeile */
.vfoot { max-width: 1596px; margin: 20px auto 0; padding: 0 24px 26px; font-size: 12.8px; color: var(--text); }
.vfoot-in { border-top: 1px solid var(--border); padding-top: 14px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.vfoot p { margin: 0 0 8px; }
.vfoot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.vfoot .sig { font-family: var(--serif); font-size: 17px; font-style: italic; }
.vfoot-mark { display: flex; align-items: center; gap: 8px; }
.vfoot-mark img { width: 40px; height: 40px; }

/* ------------------------------------------------------------------ Tablet */
@media (max-width: 1119px) {
  .vp { grid-template-columns: minmax(0, 1fr); }
  .vtoc { display: none; }
  .race-grid { grid-template-columns: minmax(0, 1fr); }
  .tools { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 70; max-height: 78dvh; background: #fff; border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(0,0,0,.18); padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .22s ease-out; }
  .tools.open { transform: translateY(0); }
  .panel-close { display: inline-block; }
  .panel-backdrop.open { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(255,255,255,.55); }
}
@media (min-width: 1120px) { #playersBtn { display: none; } }

/* ------------------------------------------------------------------ Handy (Minerva-artig) */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .vh { height: 54px; margin: 0; padding: 0 6px; gap: 4px; background: var(--bg-muted); box-shadow: inset 0 -1px 3px rgba(0,0,0,.08); max-width: none; }
  .vh-logo img { width: 34px; height: 34px; }
  .vh-wm b { font-size: 21px; }
  .vh-wm small { display: none; }
  .vh-search { display: none; position: absolute; left: 0; right: 0; top: 54px; margin: 0; max-width: none; padding: 8px; background: var(--bg-muted); border-bottom: 1px solid var(--border-subtle); }
  .vh-search.open { display: flex; }
  .vh-user { gap: 2px; }
  .vh-user .vh-link { display: none; }
  .vh-userbtn span:last-child { display: none; }
  .vh-userbtn { font-size: 22px; padding: 4px 6px; }
  .vh-searchtoggle { display: grid; }
  .vh-menu { top: 54px; left: 0; right: 0; border-left: 0; border-right: 0; min-width: 0; font-size: 16px; }
  .vh-menu li { padding: 8px 0; }
  .vp { padding: 0 16px; }
  .vtitlebar { border-bottom: 0; margin-top: 14px; }
  .vtitlebar h1 { font-size: 1.7em; line-height: 1.25; margin-bottom: 6px; }
  .vtitlebar .vlang { display: none; }
  .vtabs { border-top: 1px solid var(--border-muted); border-bottom: 1px solid var(--border-muted); margin-bottom: 10px; }
  .vtabs > div { gap: 16px; }
  .vtabs a, .vtabs button { padding: 9px 0 8px; }
  .vtagline { display: none; }
  .vbody h2 { font-size: 1.35em; border-bottom-color: var(--border-muted); margin-top: .8em; cursor: pointer; }
  .vbody h2.coll::before { content: ''; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--subtle); border-bottom: 2px solid var(--subtle); transform: translateY(-3px) rotate(45deg); margin: 0 4px 0 2px; transition: transform .15s; }
  .vbody h2.coll.closed::before { transform: rotate(-45deg); }
  .infobox { float: none; width: 100%; margin: 6px 0 14px; font-size: 92%; }
  .fields, .fields.three { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 12px; }
  .mp-grid { grid-template-columns: minmax(0, 1fr); }
  .mp-box { padding: 0 10px 10px; }
  .mp-box > h2 { margin: 0 -10px 10px !important; }
  .mp-welcome .w1 { font-size: 23px; }
  .player-list { columns: 1; }
  body.racing .vp { padding: 0 8px; }
  .hud { margin: 0 -8px; padding: 4px 8px 0; }
  .hud-row { flex-wrap: wrap; gap: 4px 8px; min-height: 0; }
  .hud-logo { display: none; }
  .target-chip { order: 3; flex-basis: 100%; padding: 0; }
  .target-chip .tn { font-size: 19px; }
  .hud-stats { gap: 10px; flex: 1; }
  .stat .v { font-size: 15px; }
  .hud-btns .cdx-btn { padding: 4px 7px; min-width: 34px; }
  .hide-xs { display: none; }
  .wikitable { font-size: 14px; }
  .pod { width: 30%; }
  .toast { right: 12px; left: 12px; top: auto; bottom: calc(16px + env(safe-area-inset-bottom)); max-width: none; background: #202122; color: #fff; border-color: #202122; text-align: center; }
  .vfoot { padding: 0 0 20px; margin-top: 10px; }
  .vfoot-in { background: var(--bg-muted); border-top: 0; padding: 16px; }
  .cd-num { font-size: 52px; }
  .pcard .ptitle { font-size: 23px; }
  .power-menu { right: 8px; }
}
@media (max-width: 380px) {
  .fields, .fields.three { grid-template-columns: minmax(0, 1fr); }
  .hud-stats { gap: 7px; }
}
