/* ==========================================================================
   PVP Arena — Sitestyles
   Baut auf game.css auf (gleiche Tokens, gleiche Kantenlogik: dicke Tinte,
   harte Versatzschatten, keine Verlaeufe, keine Rundungen).
   game.css liefert Tokens + Bausteine (.btn, .seg, .field, .panel, .crt ...),
   hier kommt das Seiten-Geruest fuer scrollende Seiten dazu.
   ========================================================================== */

/* Die App-Shell aus game.css ist auf 100dvh fixiert. Die Website scrollt. */
body.site {
    overflow: auto;
    overscroll-behavior: auto;
}

body.site .app {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

html { scroll-behavior: smooth; }

/* Sprungziele (Konto-Dropdown "Deposit"/"Withdraw") nicht unter dem Sticky-Header verstecken. */
.panel[id] { scroll-margin-top: 84px; }

/* ------------------------------------------------------------------ Wrap */

.wrap {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 18px;
}

.wrap--narrow { max-width: 720px; }
.wrap--mid    { max-width: 880px; }

.stack   { display: flex; flex-direction: column; gap: 18px; }
.stack--s{ display: flex; flex-direction: column; gap: 10px; }
.row     { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.grow    { flex: 1; min-width: 0; }
.center  { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 34px; }
.mb-0 { margin-bottom: 0; }

/* ---------------------------------------------------------------- Header */

.site-head {
    position: sticky;
    top: 0;
    z-index: 60;
    background: var(--cream);
    border-bottom: var(--line) solid var(--ink);
}

.site-head__bar {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 62px;
    padding: 8px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: var(--ink);
    flex-shrink: 0;
}

.logo__mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: var(--green);
    border: var(--line) solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    font-family: var(--display);
    font-size: 10px;
    line-height: 1;
    color: var(--ink);
}

.logo__text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.logo__title {
    font-family: var(--display);
    font-size: 12px;
    line-height: 1.2;
    letter-spacing: .02em;
}

.logo__sub {
    font-family: var(--display);
    font-size: 8px;
    line-height: 1.4;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    flex: 1;
    min-width: 0;
}

.site-nav a {
    font-family: var(--display);
    font-size: 8px;
    line-height: 1.6;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink-2);
    padding: 9px 10px;
    border: 2px solid transparent;
}

@media (hover: hover) {
    .site-nav a:hover { border-color: var(--ink); color: var(--ink); }
}

.site-nav a.is-active { background: var(--ink); color: var(--cream); }

.site-head__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Buendelt die vom Login-Status abhaengigen Header-Elemente (per JS austauschbar). */
.head-auth {
    display: flex;
    align-items: center;
    gap: 10px;
}

.head-toggle {
    display: none;
    width: 44px;
    height: 44px;
    place-items: center;
    background: var(--cream);
    border: var(--line) solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    font-family: var(--display);
    font-size: 10px;
    color: var(--ink);
}

.head-toggle:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }

/* Guthaben-Anzeige im Header */
.chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    background: var(--cream);
    border: var(--line) solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    font-family: var(--display);
    font-size: 9px;
    line-height: 1.4;
    text-decoration: none;
    color: var(--ink);
}

.chip__k {
    font-size: 8px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.chip__v { color: var(--green-t); }
.chip--gold .chip__v { color: var(--gold-t); }

/* Konto-Menue im Header */
.head-account { position: relative; }

.head-account__btn { display: inline-flex; align-items: center; gap: 7px; }

.head-account__caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
}

.head-account__menu {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 70;
    min-width: 190px;
    display: flex;
    flex-direction: column;
    background: var(--cream);
    border: var(--line) solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
}

.head-account__name {
    margin: 0;
    padding: 9px 12px;
    border-bottom: 2px solid var(--cream-2);
    font-family: var(--display);
    font-size: 10px;
    line-height: 1.6;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink-3);
    word-break: break-word;
}

.head-account__form { margin: 0; }

.head-account__item {
    display: block;
    width: 100%;
    padding: 12px;
    border: 0;
    border-bottom: 2px solid var(--cream-2);
    background: transparent;
    text-align: left;
    font-family: var(--display);
    font-size: 10px;
    line-height: 1.7;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
}

.head-account__form:last-child .head-account__item { border-bottom: 0; }
.head-account__item--out { color: #b23b30; }

@media (hover: hover) {
    .head-account__item:hover { background: var(--ink); color: var(--cream); }
}

/* Guthaben direkt unter dem Header - nur auf schmalen Screens sichtbar. */
.head-balance { display: none; border-top: 2px solid var(--cream-2); }
.head-balance[hidden] { display: none !important; }

.head-balance__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    text-decoration: none;
    color: var(--ink);
    font-family: var(--display);
    font-size: 10px;
    line-height: 1.6;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.head-balance__k { color: var(--ink-3); }
.head-balance__v { color: var(--green-t); }

.btn--earn { background: var(--gold); font-size: 9px; }
.btn--sm { min-height: 40px; padding: 9px 13px; font-size: 8px; box-shadow: 3px 3px 0 var(--ink); }
.btn--sm:active { transform: translate(3px, 3px); }

/* "Create game" gibt es nur in der Handyansicht (oben im Header). */
.head-create { display: none; }

/* Mobile Navigation */
@media (max-width: 860px) {
    .head-toggle { display: grid; }
    /* Handy: nur die Marke bleibt - Titel und Untertitel weichen (Platz). */
    .logo__text { display: none; }
    .head-earn { display: none; }
    .chip--head { display: none; }
    .head-balance { display: block; }
    .head-create { display: inline-flex; }
    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 8px 18px 14px;
        background: var(--cream);
        border-bottom: var(--line) solid var(--ink);
        display: none;
    }
    .site-nav.is-open { display: flex; }
    .site-nav a { padding: 14px 6px; border-bottom: 2px solid var(--cream-2); font-size: 9px; }
    .site-head { position: relative; }
    .site-head__bar { flex-wrap: nowrap; min-height: 54px; padding: 6px 0; gap: 8px; }
    .site-head__actions { margin-left: auto; gap: 8px; }
    .head-auth { gap: 8px; }
    body.site:not(.admin-body) .site-head__actions .btn--sm { padding: 9px 8px; font-size: 9px; }
    .head-toggle { width: auto; min-width: 44px; height: 40px; padding: 0 8px; font-size: 9px; }
    .wrap { padding: 0 14px; }
    /* Handy: der Header scrollt mit (nicht sticky) -> nur kleiner Abstand. */
    .panel[id] { scroll-margin-top: 8px; }
}

@media (max-width: 420px) {
    .head-account__item { padding: 11px 12px; }
    body.site:not(.admin-body) .site-head__actions .btn--sm { padding: 8px 6px; font-size: 8px; }
    .head-toggle { min-width: 40px; height: 38px; padding: 0 6px; font-size: 8px; }
}

/* --------------------------------------------------------------- Sections */

.section { padding: 40px 0; }
.section--tight { padding: 24px 0; }
.section--ink { background: var(--ink); color: var(--cream); border-top: var(--line) solid var(--ink); border-bottom: var(--line) solid var(--ink); }
.section--ink .prose, .section--ink .prose p, .section--ink .kicker { color: var(--cream-2); }
.section--ink .h2 { color: var(--cream); text-shadow: 4px 4px 0 var(--green-t); }
.section--ink .panel { background: var(--ink); border-color: var(--cream); box-shadow: 4px 4px 0 var(--cream); }

/* Tabellen auf dunklem Grund: helle Schrift braucht auch einen dunklen Grund.
   Ohne diese Regeln steht Creme-Text auf der cremefarbenen .tbl-Flaeche. */
.section--ink .tbl-wrap { border-color: var(--cream); box-shadow: 4px 4px 0 var(--cream); }
.section--ink .tbl { background: var(--ink); }
.section--ink .tbl th {
    background: #2b2a26;
    color: var(--cream);
    border-bottom: var(--line) solid var(--cream);
}
.section--ink .tbl td {
    color: var(--cream);
    border-bottom: 2px solid rgba(246, 241, 228, .18);
}
.section--ink .tbl tr:last-child td { border-bottom: 0; }
.section--ink .tbl tr.is-alt td { background: rgba(246, 241, 228, .07); }
.section--ink .tbl td.is-mono { color: var(--cream); }
.section--ink .tbl .pos { color: #86dc86; }
.section--ink .tbl .neg { color: #ff9b93; }
.section--ink .field__help { color: var(--cream-2); }
.section--ink .panel__head { border-bottom-color: rgba(246, 241, 228, .22); }

.kicker {
    font-family: var(--display);
    font-size: 8px;
    line-height: 1.8;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin: 0 0 10px;
}

.h1 {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(20px, 6vw, 40px);
    font-weight: 400;
    line-height: 1.5;
    text-shadow: 5px 5px 0 var(--gold);
}

.h2 {
    margin: 0 0 14px;
    font-family: var(--display);
    font-size: clamp(13px, 3.4vw, 20px);
    font-weight: 400;
    line-height: 1.6;
    text-shadow: 4px 4px 0 var(--gold);
}

.h3 {
    margin: 0 0 8px;
    font-family: var(--display);
    font-size: 10px;
    font-weight: 400;
    line-height: 1.7;
    text-transform: uppercase;
}

.lead {
    margin: 0;
    font-size: 20px;
    line-height: 1.35;
    color: var(--ink-2);
    max-width: 640px;
}

.prose { max-width: 680px; }
.prose p { margin: 0 0 14px; font-size: 18px; line-height: 1.4; color: var(--ink-2); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); }
.prose a { color: var(--blue-t); }

/* ------------------------------------------------------------------ Hero */

.hero { padding: 28px 0 22px; }

.hero__grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 34px;
    align-items: start;
}

/* Rechte Hero-Spalte: Spielwahl direkt im ersten Bildschirm, damit sofort
   sichtbar ist, dass hier ein Spiel erstellt werden kann. */
.hero__create {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    background: var(--cream);
    border: var(--line) solid var(--ink);
    box-shadow: 6px 6px 0 var(--ink);
}

.hero__create .h2 { margin: 0; }

/* Klick auf "Games" (Header) oder "Create a match" setzt kurz diese Klasse:
   die Spielauswahl leuchtet hart auf (Pixel-Blink, kein Verlauf). */
.hero__create.is-flash {
    outline: 3px solid var(--green-t);
    outline-offset: 4px;
    animation: games-flash .96s steps(1, end) 1;
}

@keyframes games-flash {
    0%, 58% { border-color: var(--green-t); box-shadow: 6px 6px 0 var(--green-t); }
    100%    { border-color: var(--ink);     box-shadow: 6px 6px 0 var(--ink); }
}

@media (max-width: 900px) {
    .hero__grid { grid-template-columns: 1fr; gap: 20px; }
    .hero { padding: 20px 0 18px; }
}

.hero__hands {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.hero__hand {
    width: 42px;
    height: 42px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(3px 3px 0 rgba(28,28,28,.75));
}

.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.trust {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 18px;
    list-style: none;
    padding: 0;
}

.trust li {
    font-family: var(--display);
    font-size: 8px;
    line-height: 1.5;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 5px 8px;
    border: 2px solid var(--ink);
    background: var(--cream-2);
    color: var(--ink-2);
}

.trust li.is-key { background: var(--green); color: var(--ink); }

/* Terminal-Kasten rechts im Hero: zeigt einen echten Invite-Link */
.term {
    background: var(--cream);
    border: var(--line) solid var(--ink);
    box-shadow: 6px 6px 0 var(--ink);
    overflow: hidden;
}

.term__bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 11px;
    background: var(--cream-2);
    border-bottom: var(--line) solid var(--ink);
}

.term__dot { width: 11px; height: 11px; border: 2px solid var(--ink); }
.term__dot--r { background: var(--red); }
.term__dot--y { background: var(--gold); }
.term__dot--g { background: var(--green); }

.term__name {
    font-family: var(--display);
    font-size: 8px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-left: 4px;
}

.term__body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }

.term__line {
    font-family: var(--display);
    font-size: 8px;
    line-height: 2;
    letter-spacing: .02em;
    color: var(--ink-2);
    word-break: break-all;
}

.term__line b { color: var(--green-t); font-weight: 400; }
.term__line i { color: var(--gold-t); font-style: normal; }

/* --------------------------------------------------------------- Games */

.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }

/* Einspaltige Variante (Hero-Spalte): Karten untereinander, kompakter Abstand */
.games--stack { grid-template-columns: 1fr; gap: 14px; }
.games--stack .game-card { padding: 14px; box-shadow: var(--pop) var(--pop) 0 var(--ink); }

.game-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    background: var(--cream);
    border: var(--line) solid var(--ink);
    box-shadow: 6px 6px 0 var(--ink);
    text-decoration: none;
    color: var(--ink);
    transition: transform .1s var(--ease), box-shadow .1s var(--ease);
}

@media (hover: hover) {
    .game-card:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); }
}

.game-card:active { transform: translate(6px, 6px); box-shadow: 0 0 0 var(--ink); }

.game-card__top { display: flex; align-items: center; gap: 14px; }

.game-card__art {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    padding: 4px;
    background: var(--ink);
}

.game-card__art .mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    width: 100%;
    height: 100%;
}

.game-card__art .mini i { background: var(--cream); }
.game-card__art .mini i.is-on { background: var(--green); }
.game-card__art .mini i.is-line { background: var(--gold); }

.game-card__hands {
    display: flex;
    gap: 3px;
    width: 100%;
    height: 100%;
}

.game-card__hands img { width: 33.33%; height: 100%; object-fit: contain; image-rendering: pixelated; }

.game-card__coins {
    display: flex;
    gap: 3px;
    width: 100%;
    height: 100%;
}

.game-card__coins img { width: 50%; height: 100%; object-fit: contain; }

/* Number Clash: Pixel-Schieber als Kartenmotiv. */
.game-card__slider {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
}

.game-card__slider::before {
    content: '';
    width: 100%;
    height: 8px;
    background: var(--cream-2);
    border: 2px solid var(--cream);
}

.game-card__slider i {
    position: absolute;
    top: 50%;
    left: 64%;
    width: 10px;
    height: 22px;
    background: var(--green);
    border: 2px solid var(--cream);
    transform: translate(-50%, -50%);
}

.game-card__title {
    font-family: var(--display);
    font-size: 11px;
    line-height: 1.5;
    margin: 0;
}

.game-card__blurb { margin: 0; font-size: 17px; line-height: 1.3; color: var(--ink-2); }

.game-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 2px solid var(--cream-2); }

.game-card__tags { display: flex; gap: 6px; flex-wrap: wrap; }

.tag {
    font-family: var(--display);
    font-size: 8px;
    line-height: 1.6;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 4px 7px;
    border: 2px solid var(--ink);
    background: var(--cream-2);
    color: var(--ink-2);
}

.tag--green { background: var(--green-wash); color: var(--green-t); border-color: var(--green-t); }
.tag--blue  { background: var(--blue-wash);  color: var(--blue-t);  border-color: var(--blue-t); }
.tag--gold  { background: var(--gold-wash);  color: var(--gold-t);  border-color: var(--gold-t); }
.tag--red   { background: var(--red-wash);   color: var(--red-t);   border-color: var(--red-t); }
.tag--ink   { background: var(--ink); color: var(--cream); border-color: var(--ink); }

.game-card__go {
    font-family: var(--display);
    font-size: 9px;
    line-height: 1.5;
    color: var(--ink-3);
    white-space: nowrap;
}

/* ---------------------------------------------------------------- Steps */

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.steps--one { grid-template-columns: 1fr; }

.step { display: flex; gap: 14px; }

.step__n {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    font-family: var(--display);
    font-size: 10px;
    background: var(--green);
    border: var(--line) solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
}

.step p { margin: 8px 0 0; font-size: 17px; line-height: 1.35; color: var(--ink-2); }

/* -------------------------------------------------------------- Panels */

.panel--form { gap: 16px; }

.panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--cream-2);
}

.panel__head h2, .panel__head h3 { margin: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

@media (max-width: 620px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------- Forms */

.input,
.select,
.textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    font-family: var(--body);
    font-size: 19px;
    line-height: 1.25;
    color: var(--ink);
    background: var(--cream);
    border: var(--line) solid var(--ink);
    border-radius: 0;
    appearance: none;
}

.textarea { min-height: 96px; resize: vertical; }

.input:focus, .select:focus, .textarea:focus { outline: 3px solid var(--blue); outline-offset: 2px; }

.input--mono {
    font-family: var(--display);
    font-size: 9px;
    line-height: 1.9;
    letter-spacing: .02em;
    word-break: break-all;
}

.select {
    background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
                      linear-gradient(135deg, var(--ink) 50%, transparent 50%);
    background-position: calc(100% - 20px) 20px, calc(100% - 14px) 20px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 40px;
}

.field__help { margin: 0; font-size: 15px; line-height: 1.3; color: var(--ink-3); }

.input-group { display: flex; gap: 0; }
.input-group .input { border-right: 0; }
.input-group .btn { box-shadow: none; border-left: 0; flex-shrink: 0; }

.err {
    margin: 0;
    padding: 10px 12px;
    font-size: 17px;
    line-height: 1.3;
    background: var(--red-wash);
    border: var(--line) solid var(--red-t);
    color: var(--red-t);
}

.ok {
    margin: 0;
    padding: 10px 12px;
    font-size: 17px;
    line-height: 1.3;
    background: var(--green-wash);
    border: var(--line) solid var(--green-t);
    color: var(--green-t);
}

.note {
    margin: 0;
    padding: 10px 12px;
    font-size: 16px;
    line-height: 1.3;
    background: var(--gold-wash);
    border: var(--line) solid var(--gold-t);
    color: var(--gold-t);
}

/* ----------------------------------------------------- Credential-Anzeige */

.creds { display: flex; flex-direction: column; gap: 10px; }

.cred {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--cream-2);
    border: var(--line) solid var(--ink);
}

.cred__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }

.cred__k {
    font-family: var(--display);
    font-size: 8px;
    line-height: 1.6;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.cred__v {
    font-family: var(--display);
    font-size: 10px;
    line-height: 1.7;
    word-break: break-all;
    color: var(--ink);
}

.cred__v--pw { color: var(--green-t); }

/* --------------------------------------------------------------- Tables */

.tbl-wrap { overflow-x: auto; border: var(--line) solid var(--ink); box-shadow: var(--pop) var(--pop) 0 var(--ink); }

.tbl { width: 100%; border-collapse: collapse; background: var(--cream); }

.tbl th, .tbl td {
    padding: 10px 12px;
    text-align: left;
    font-size: 17px;
    line-height: 1.25;
    border-bottom: 2px solid var(--cream-2);
    white-space: nowrap;
}

.tbl th {
    font-family: var(--display);
    font-size: 8px;
    line-height: 1.7;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-3);
    background: var(--cream-2);
    border-bottom: var(--line) solid var(--ink);
    position: sticky;
    top: 0;
}

.tbl tr:last-child td { border-bottom: 0; }
.tbl td.is-mono { font-family: var(--display); font-size: 9px; line-height: 1.8; }
.tbl tr.is-alt td { background: rgba(233, 225, 205, .45); }

.pos { color: var(--green-t); }
.neg { color: var(--red-t); }
.mute { color: var(--ink-3); }

/* ------------------------------------------------------------ Stat row */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: var(--cream);
    border: var(--line) solid var(--ink);
    box-shadow: var(--pop) var(--pop) 0 var(--ink);
}

.stat-card__k {
    font-family: var(--display);
    font-size: 8px;
    line-height: 1.7;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.stat-card__v {
    font-family: var(--display);
    font-size: 15px;
    line-height: 1.5;
    word-break: break-all;
}

.stat-card--green .stat-card__v { color: var(--green-t); }
.stat-card--gold  .stat-card__v { color: var(--gold-t); }
.stat-card--red   .stat-card__v { color: var(--red-t); }
.stat-card--blue  .stat-card__v { color: var(--blue-t); }

/* ---------------------------------------------------------------- Match */

.match-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }

@media (max-width: 900px) { .match-grid { grid-template-columns: 1fr; } }

.match-head {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
}

.player {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    padding: 12px;
    border: var(--line) solid var(--ink);
    background: var(--cream-2);
}

.player--you { background: var(--green-wash); border-color: var(--green-t); }
.player--foe { background: var(--blue-wash); border-color: var(--blue-t); }
.player--waiting { background: var(--gold-wash); border-color: var(--gold-t); }

.player__role {
    font-family: var(--display);
    font-size: 8px;
    line-height: 1.6;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.player__name {
    font-family: var(--display);
    font-size: 10px;
    line-height: 1.6;
    word-break: break-word;
}

.player__score { font-family: var(--display); font-size: 22px; line-height: 1.2; }
.player__state { font-size: 16px; line-height: 1.2; color: var(--ink-2); }

.score-sep {
    display: grid;
    place-items: center;
    padding: 0 6px;
    font-family: var(--display);
    font-size: 11px;
    color: var(--ink-3);
}

.roundbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    background: var(--ink);
    color: var(--cream);
    font-family: var(--display);
    font-size: 8px;
    line-height: 1.8;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.roundbar b { color: var(--gold); font-weight: 400; }

.arena-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 26px 18px;
    min-height: 300px;
    background: var(--cream);
    border: var(--line) solid var(--ink);
    box-shadow: 6px 6px 0 var(--ink);
}

.arena-box__turn {
    font-family: var(--display);
    font-size: 9px;
    line-height: 1.8;
    text-align: center;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink-2);
    min-height: 32px;
}

.arena-box__turn.is-you { color: var(--green-t); }

/* RPS Wahlknopf */
.picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; max-width: 460px; }

.pick-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding: 14px 8px;
    background: var(--cream);
    border: var(--line) solid var(--ink);
    box-shadow: var(--pop) var(--pop) 0 var(--ink);
    transition: transform .1s var(--ease), box-shadow .1s var(--ease), background .14s var(--ease);
}

.pick-card img { width: 46px; height: 46px; object-fit: contain; image-rendering: pixelated; }

.pick-card__label {
    font-family: var(--display);
    font-size: 10px;
    line-height: 1.6;
    text-transform: uppercase;
}

@media (hover: hover) { .pick-card:not(:disabled):hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); } }
.pick-card:not(:disabled):active { transform: translate(var(--pop), var(--pop)); box-shadow: 0 0 0 var(--ink); }
.pick-card.is-picked { background: var(--green); transform: translate(var(--pop), var(--pop)); box-shadow: 0 0 0 var(--ink); }
.pick-card:disabled { opacity: .5; }

/* TTT Brett im Match */
.board-ttt {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 5px;
    width: min(100%, 330px);
    aspect-ratio: 1;
    padding: 6px;
    background: var(--cream-2);
    border: var(--line) solid var(--ink);
    box-shadow: var(--pop) var(--pop) 0 var(--ink);
}

.board-ttt__cell {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    background: var(--cream);
    border: 2px solid var(--ink);
    font-family: var(--display);
    font-size: clamp(22px, 8vw, 38px);
    line-height: 1;
    color: var(--ink);
}

.board-ttt__cell.is-x { color: var(--green-t); }
.board-ttt__cell.is-o { color: var(--blue-t); }
.board-ttt__cell.is-win { background: var(--gold-wash); }
.board-ttt__cell:disabled { cursor: default; }
@media (hover: hover) { .board-ttt__cell:not(:disabled):hover { background: var(--cream-2); } }

/* -------------------------------------------------------------- Chat */

.chat {
    display: flex;
    flex-direction: column;
    border: var(--line) solid var(--ink);
    box-shadow: var(--pop) var(--pop) 0 var(--ink);
    background: var(--cream);
    overflow: hidden;
}

.chat__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: var(--cream-2);
    border-bottom: var(--line) solid var(--ink);
    font-family: var(--display);
    font-size: 8px;
    line-height: 1.7;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.chat__log {
    display: flex;
    flex-direction: column;
    gap: 9px;
    height: 230px;
    overflow-y: auto;
    padding: 12px;
    background: var(--cream);
}

.chat__msg { display: flex; flex-direction: column; gap: 3px; max-width: 92%; }
.chat__msg--you { align-self: flex-end; text-align: right; }

.chat__who {
    font-family: var(--display);
    font-size: 8px;
    line-height: 1.6;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.chat__msg--you .chat__who { color: var(--green-t); }
.chat__msg--foe .chat__who { color: var(--blue-t); }

.chat__body {
    padding: 8px 10px;
    font-size: 17px;
    line-height: 1.3;
    background: var(--cream-2);
    border: 2px solid var(--ink);
    word-break: break-word;
    text-align: left;
}

.chat__msg--you .chat__body { background: var(--green-wash); border-color: var(--green-t); }
.chat__msg--foe .chat__body { background: var(--blue-wash); border-color: var(--blue-t); }

.chat__sys { align-self: center; font-size: 15px; line-height: 1.3; color: var(--ink-3); text-align: center; }

.chat__form { display: flex; gap: 0; border-top: var(--line) solid var(--ink); }
.chat__form .input { border: 0; box-shadow: none; min-height: 48px; }
.chat__form .btn { box-shadow: none; border: 0; border-left: var(--line) solid var(--ink); }

/* --------------------------------------------------------------- Toast */

.toast-host {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(92vw, 460px);
    pointer-events: none;
}

.toast {
    padding: 12px 14px;
    font-size: 17px;
    line-height: 1.3;
    background: var(--cream);
    border: var(--line) solid var(--ink);
    box-shadow: var(--pop) var(--pop) 0 var(--ink);
    animation: fade-up .18s var(--ease);
}

.toast--ok { border-color: var(--green-t); }
.toast--err { border-color: var(--red-t); }

/* --------------------------------------------------------------- FAQ */

.faq { display: flex; flex-direction: column; gap: 12px; }

.faq details {
    background: var(--cream);
    border: var(--line) solid var(--ink);
    box-shadow: var(--pop) var(--pop) 0 var(--ink);
}

.faq summary {
    cursor: pointer;
    padding: 14px 16px;
    font-family: var(--display);
    font-size: 9px;
    line-height: 1.7;
    list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+ "; color: var(--green-t); }
.faq details[open] summary::before { content: "- "; }

.faq .faq__body { padding: 0 16px 16px; font-size: 17px; line-height: 1.4; color: var(--ink-2); }
.faq .faq__body p { margin: 0 0 10px; }
.faq .faq__body p:last-child { margin-bottom: 0; }

/* -------------------------------------------------------------- Footer */

.site-foot {
    margin-top: auto;
    background: var(--ink);
    color: var(--cream-2);
    border-top: var(--line) solid var(--ink);
    padding: 34px 0 26px;
}

.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 26px; }

@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; gap: 20px; } }

.site-foot h4 {
    margin: 0 0 12px;
    font-family: var(--display);
    font-size: 8px;
    line-height: 1.8;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--gold);
}

.site-foot p { margin: 0 0 10px; font-size: 16px; line-height: 1.4; color: var(--cream-2); }

.site-foot a { color: var(--cream); text-decoration: none; display: block; padding: 4px 0; font-size: 16px; }
@media (hover: hover) { .site-foot a:hover { color: var(--gold); } }

.foot-legal {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 2px solid rgba(246, 241, 228, .22);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    justify-content: space-between;
    font-size: 15px;
    line-height: 1.4;
    color: var(--ink-3);
}

.foot-legal span { color: rgba(246, 241, 228, .6); }

/* ---------------------------------------------------------------- Blog */

.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }

.post-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    background: var(--cream);
    border: var(--line) solid var(--ink);
    box-shadow: var(--pop) var(--pop) 0 var(--ink);
    text-decoration: none;
    color: var(--ink);
    transition: transform .1s var(--ease), box-shadow .1s var(--ease);
}

@media (hover: hover) { .post-card:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--ink); } }
.post-card:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }

.post-card__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.post-card__title { margin: 0; font-family: var(--display); font-size: 11px; font-weight: 400; line-height: 1.7; }
.post-card__ex { margin: 0; font-size: 17px; line-height: 1.35; color: var(--ink-2); }

.post-card__meta {
    margin-top: auto;
    padding-top: 12px;
    border-top: 2px solid var(--cream-2);
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-family: var(--display);
    font-size: 8px;
    line-height: 1.8;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-family: var(--display);
    font-size: 8px;
    line-height: 1.8;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.crumbs a { color: var(--blue-t); text-decoration: none; }
@media (hover: hover) { .crumbs a:hover { text-decoration: underline; } }

.article__head { max-width: 680px; }

.article__body h2 {
    margin: 30px 0 12px;
    font-family: var(--display);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.7;
    text-transform: uppercase;
    color: var(--ink);
}
.article__body h2:first-child { margin-top: 0; }
.article__body h3 {
    margin: 24px 0 10px;
    font-family: var(--display);
    font-size: 10px;
    font-weight: 400;
    line-height: 1.7;
    text-transform: uppercase;
    color: var(--ink);
}
.article__body ul, .article__body ol { margin: 0 0 16px; padding-left: 22px; }
.article__body li { margin-bottom: 6px; font-size: 18px; line-height: 1.45; color: var(--ink-2); }
.article__body li::marker { color: var(--green-t); }
.article__body a { color: var(--blue-t); }

/* ------------------------------------------------------------ Utilities */

.hide { display: none !important; }

.sr {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.divider { height: var(--line); background: var(--ink); margin: 4px 0; }

.overline { border-top: var(--line) solid var(--ink); }

.scroll-x { overflow-x: auto; }

.mono { font-family: var(--display); font-size: 9px; line-height: 1.8; word-break: break-all; }

.big-num { font-family: var(--display); font-size: clamp(18px, 5vw, 30px); line-height: 1.4; }

/* Fortschrittsbalken im Retro-Stil */
.meter { height: 16px; border: 2px solid var(--ink); background: var(--cream-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--green); transition: width .4s steps(6, end); }

/* Blinkender Cursor für Terminal-Optik */
.cursor::after {
    content: "_";
    animation: blink 1.05s steps(2, end) infinite;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(28,28,28,.74);
    animation: overlay-in .16s var(--ease);
}

.modal[hidden] { display: none; }

.modal__card {
    width: 100%;
    max-width: 460px;
    max-height: 88vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 18px;
    background: var(--cream);
    border: 5px solid var(--ink);
    box-shadow: 8px 8px 0 rgba(28,28,28,.5);
}

.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal__title { margin: 0; font-family: var(--display); font-size: 11px; line-height: 1.7; text-transform: uppercase; }

/* Ladebalken für Retro-Fortschritt */
.loading { display: flex; flex-direction: column; gap: 12px; align-items: center; padding: 26px 0; }
.loading__text { font-family: var(--display); font-size: 9px; line-height: 1.8; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.loading__bar { width: min(100%, 260px); }

/* --------------------------------------------------- Mobile Feinjustierung */

@media (max-width: 620px) {
    .h1 { text-shadow: 4px 4px 0 var(--gold); }
    .h2 { text-shadow: 3px 3px 0 var(--gold); }
    .lead { font-size: 18px; }
    .prose p { font-size: 17px; }
    .section { padding: 30px 0; }
    .hero__hand { width: 34px; height: 34px; }
    .arena-box { padding: 20px 14px; min-height: 260px; }
    .match-head { padding: 12px; gap: 8px; }
    .player { padding: 10px; }
    .player__score { font-size: 18px; }
    .term__line { font-size: 8px; }
    .tbl th, .tbl td { padding: 9px 10px; font-size: 16px; }
}

@media (max-width: 420px) {
    .picks { gap: 8px; }
    .pick-card img { width: 38px; height: 38px; }
    .match-head { grid-template-columns: 1fr; }
    .score-sep { padding: 4px 0; }
}

/* ==========================================================================
   Backend-Theme: ruhiger Dark-Mode
   Das Backend ist ein Arbeitswerkzeug. Deshalb hier bewusst KEIN Retro-Look:
   keine CRT-/Scanline-Effekte, keine dicken Pixelkanten, keine harten
   Versatzschatten und keine uebergrossen Kacheln - nur feine Hairlines auf
   dunklem Grund. Die Bausteine (panel, tbl, btn, input ...) nutzen
   durchgaengig die Tokens, daher genuegt es, die Tokens umzudrehen und
   Flaechen/Kanten nachzuziehen.
   ========================================================================== */

.admin-body,
.admin {
    --display: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --body:    "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

    /* Grundflaeche dunkel, Text hell */
    --cream:   #14161a;   /* Seite + eingesenkte Felder */
    --cream-2: #1b1e24;   /* Karten, Tabellenkoepfe */
    --ink:     #e6e9ee;   /* Haupttext */
    --ink-2:   #b2b8c2;
    --ink-3:   #838a96;

    /* Akzentfuellungen + hellere Textvarianten fuer den dunklen Grund */
    --green:   #35a35f;
    --red:     #d9534f;
    --blue:    #4c8fd8;
    --gold:    #cfa142;

    --green-t: #63cd8c;
    --red-t:   #ef8b87;
    --blue-t:  #7db4f0;
    --gold-t:  #e3c069;

    --green-wash: #17251c;
    --red-wash:   #2a1a1b;
    --gold-wash:  #26200f;
    --blue-wash:  #161f2b;

    /* Hairlines statt dicker Pixelkanten */
    --edge:   rgba(230, 233, 238, .13);
    --edge-2: rgba(230, 233, 238, .07);

    --line: 1px;
    --pop:  0px;
}

.admin-body { background: var(--cream); }
.admin {
    font-size: 14px;
    line-height: 1.45;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

/* Keine Hintergrund-Effekte im Backend */
.admin-body .crt { display: none; }

/* Flaechen und Kanten */
.admin-body .panel,
.admin-body .stat-card,
.admin-body .cred,
.admin-body .tbl,
.admin-body .modal__card { background: var(--cream-2); }

.admin-body .panel,
.admin-body .stat-card,
.admin-body .tbl-wrap,
.admin-body .cred,
.admin-body .seg,
.admin-body .modal__card { border-color: var(--edge); }

.admin-body .modal__card { border-width: 1px; }

.admin-body .site-head { background: var(--cream-2); border-bottom-color: var(--edge); }
.admin-body .admin-nav { border-top: 1px solid var(--edge); }

/* Tabellen: feine Zeilentrenner statt heller Wash-Zeilen */
.admin-body .tbl th, .admin-body .tbl td { border-bottom-color: var(--edge-2); }
.admin-body .tbl th { background: var(--cream-2); color: var(--ink-3); border-bottom-color: var(--edge); }
.admin-body .tbl td { color: var(--ink); }
.admin-body .tbl tr.is-alt td { background: rgba(230, 233, 238, .025); }

/* Formulare */
.admin-body .input,
.admin-body .select,
.admin-body .textarea {
    background: var(--cream);
    border-color: var(--edge);
}
.admin-body .input,
.admin-body .select {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 13px;
    line-height: 1.35;
}
.admin-body .input-group .input { border-right: 0; }

/* Buttons: ruhige Flaeche, Gruen nur als Primaeraktion */
.admin-body .btn {
    background: var(--cream-2);
    border-color: var(--edge);
    color: var(--ink);
    min-height: 30px;
    padding: 6px 12px;
}
.admin-body .btn--xl { min-height: 42px; padding: 10px 16px; font-size: 14px; }
.admin-body .btn--ghost { background: transparent; }
.admin-body .btn--primary { background: var(--green); border-color: var(--green); color: #0c0f12; }
.admin-body .btn--danger { background: var(--cream-2); border-color: var(--edge); color: var(--red-t); }

/* Links im Inhalt */
.admin-body a { color: var(--blue-t); }
.admin-body .logo { color: var(--ink); }

/* Kopfzeile und Navigation */
.admin-body .logo__mark { color: #0c0f12; }
.admin-body .admin-nav a { color: var(--ink-3); }
.admin-body .admin-nav a.is-active { background: var(--green); color: #0c0f12; border-color: var(--green); }

/* Fusszeile */
.admin-body .site-foot { background: var(--cream-2); color: var(--ink-3); border-top: 1px solid var(--edge); }

/* Kompaktere Kacheln und Panels */
.admin-body .stat-card { padding: 12px 14px; gap: 6px; }
.admin-body .panel { padding: 12px 14px; }
.admin-body .panel__head { border-bottom-color: var(--edge); }
.admin-body .panel__title { color: var(--ink); }

/* Balken und Schalter */
.admin-body .bar-row__track,
.admin-body .meter,
.admin-body .readout__bar { border-color: var(--edge); background: var(--cream); }
.admin-body .toggle { background: var(--cream-2); border-color: var(--edge); }
.admin-body .toggle__switch { background: var(--cream); border-color: var(--edge); }

.admin .logo__title { font-size: 15px; font-weight: 700; }
.admin .h2 { font-size: 19px; text-shadow: none; }
.admin .h3 { font-size: 14px; font-weight: 700; text-transform: none; letter-spacing: 0; }

/* Kleine Leitschilder: kompakt und halbfett */
.admin .logo__sub,
.admin .kicker,
.admin .stat-card__k,
.admin .field__label,
.admin .kv__k,
.admin .cred__k,
.admin .tbl th,
.admin .panel__title,
.admin .overline {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
}
.admin .admin-nav a { font-size: 12px; }
.admin-nav a.is-active { font-weight: 700; }
.admin .tag { font-size: 10px; }

/* Werte/Zahlen: groesser und fett, damit sie sofort ins Auge fallen */
.admin .stat-card__v { font-size: 18px; font-weight: 700; }
.admin .stat-card__v--long { font-size: 16px; line-height: 1.45; letter-spacing: 0; }
.admin .kv__v { font-size: 14px; line-height: 1.45; font-weight: 600; }
.admin .mono,
.admin .tbl td.is-mono,
.admin .cred__v { font-size: 12px; line-height: 1.55; letter-spacing: 0; }
.admin .tbl td.is-mono { font-weight: 500; }
.admin .btn { font-size: 12px; }
.admin .btn--sm { font-size: 11px; }
.admin .btn--primary { font-weight: 600; }
.admin .chip { font-size: 12px; }
.admin .tbl th, .admin .tbl td { font-size: 13px; padding: 7px 10px; }

/* --------------------------------------------------------- Backend-Nav */

.admin-nav {
    display: flex;
    gap: 3px;
    padding: 5px 0 8px;
    border-top: 2px solid var(--ink);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-nav a {
    flex-shrink: 0;
    font-family: var(--display);
    font-size: 8px;
    line-height: 1.7;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink-2);
    padding: 8px 10px;
    border: 2px solid transparent;
    white-space: nowrap;
}

@media (hover: hover) { .admin-nav a:hover { border-color: var(--ink); color: var(--ink); } }
.admin-nav a.is-active { background: var(--ink); color: var(--cream); }

.admin-main { padding: 22px 18px 46px; display: flex; flex-direction: column; gap: 20px; }

.admin-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.admin-head h1 { margin: 0; }

.admin-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.admin-toolbar .field { min-width: 148px; }
.admin-toolbar .field--grow { flex: 1; min-width: 200px; }

.admin-split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
@media (max-width: 980px) { .admin-split { grid-template-columns: 1fr; } }

.admin-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px 14px; }

.admin .field { gap: 5px; }
/* Feldkopf: Label links, Info-Symbol direkt daneben */
.admin .field__row { display: flex; align-items: center; gap: 6px; }
.admin .field__row .field__label { margin: 0; }

.admin .kv { display: flex; flex-direction: column; gap: 3px; }
.admin .kv__k { font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.admin .kv__v { font-family: var(--display); font-size: 14px; font-weight: 600; line-height: 1.45; word-break: break-all; }

.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.admin .pager { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin .check { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.admin .check input { width: 16px; height: 16px; accent-color: var(--green); }
.admin .mini-form { display: flex; gap: 6px; align-items: center; }
.admin .mini-form .input { min-height: 30px; font-size: 13px; }
.admin .hint { margin: 0; font-size: 12px; line-height: 1.4; color: var(--ink-3); }

/* Info-Symbol + Tooltip: alle Feld-Infos auf einen Blick statt Textbloecke darunter */
.admin .info {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    border: 1px solid var(--edge);
    border-radius: 50%;
    font-family: var(--body);
    font-size: 10px;
    font-weight: 700;
    font-style: normal;
    line-height: 1;
    color: var(--ink-3);
    cursor: help;
    user-select: none;
}
.admin .info:hover,
.admin .info:focus { color: var(--ink); border-color: var(--ink-3); }

.admin .info::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 7px);
    transform: translateX(-50%);
    z-index: 60;
    width: max-content;
    max-width: 280px;
    padding: 6px 9px;
    background: #0f1114;
    border: 1px solid var(--edge);
    color: var(--ink);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: 0;
    text-align: left;
    text-transform: none;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s linear;
}
.admin .info:hover::after,
.admin .info:focus::after { opacity: 1; }

/* ==========================================================================
   Lesbarkeit: Kleintext (oeffentliche Seite)
   Ueberschriften bleiben in der Pixel-Display-Schrift. Alles, was vorher
   unleserlich klein war (8-9px Pixel-Labels) bzw. zu duenn wirkte (VT323),
   wird angehoben. Bewusst OHNE Farbaenderungen: dunkle Sections
   (.section--ink) setzen ihre Textfarben selbst.
   Betrifft nur die Website, das Admin-Backend hat eigene Regeln.
   ========================================================================== */

body.site:not(.admin-body) { font-size: 19px; }

/* Buttons */
body.site:not(.admin-body) .btn { font-size: 11px; }

/* 8-9px Pixel-Labels -> 10px */
body.site:not(.admin-body) .logo__sub,
body.site:not(.admin-body) .site-nav a,
body.site:not(.admin-body) .site-nav a.is-active,
body.site:not(.admin-body) .chip,
body.site:not(.admin-body) .chip__k,
body.site:not(.admin-body) .btn--sm,
body.site:not(.admin-body) .btn--earn,
body.site:not(.admin-body) .term__name,
body.site:not(.admin-body) .term__line,
body.site:not(.admin-body) .tag,
body.site:not(.admin-body) .game-card__go,
body.site:not(.admin-body) .cred__k,
body.site:not(.admin-body) .tbl th,
body.site:not(.admin-body) .stat-card__k,
body.site:not(.admin-body) .player__role,
body.site:not(.admin-body) .home__badge,
body.site:not(.admin-body) .field__label,
body.site:not(.admin-body) .seg__opt,
body.site:not(.admin-body) .daily__title,
body.site:not(.admin-body) .hud__mode,
body.site:not(.admin-body) .hud__round,
body.site:not(.admin-body) .side__name,
body.site:not(.admin-body) .card__label,
body.site:not(.admin-body) .stat__k,
body.site:not(.admin-body) .panel__title,
body.site:not(.admin-body) .bar-row__k,
body.site:not(.admin-body) .board__rank,
body.site:not(.admin-body) .toggle__text b,
body.site:not(.admin-body) .banner,
body.site:not(.admin-body) .next-btn,
body.site:not(.admin-body) .streak,
body.site:not(.admin-body) .streak__flame,
body.site:not(.admin-body) .loading__text {
    font-size: 10px;
    line-height: 1.7;
    letter-spacing: .04em;
}

/* Hero-Badges: bewusst klein und kompakt gehalten */
body.site:not(.admin-body) .trust li { font-size: 9px; letter-spacing: .03em; }

/* Leitschilder und kleine Zwischenueberschriften etwas groesser */
body.site:not(.admin-body) .kicker { font-size: 11px; letter-spacing: .09em; }
body.site:not(.admin-body) .h3 { font-size: 11px; }

/* Monospace-Werte (Hashes, Betraege, Codes) */
body.site:not(.admin-body) .mono,
body.site:not(.admin-body) .tbl td.is-mono,
body.site:not(.admin-body) .input--mono,
body.site:not(.admin-body) .cred__v { font-size: 11px; line-height: 1.9; }

/* Fliess- und Hilfstexte (VT323) */
body.site:not(.admin-body) .lead { font-size: 21px; }
body.site:not(.admin-body) .prose p { font-size: 19px; }
body.site:not(.admin-body) .tbl td { font-size: 18px; }
body.site:not(.admin-body) .game-card__blurb,
body.site:not(.admin-body) .step p { font-size: 18px; }
body.site:not(.admin-body) .err,
body.site:not(.admin-body) .ok { font-size: 18px; }
body.site:not(.admin-body) .field__help,
body.site:not(.admin-body) .note,
body.site:not(.admin-body) .daily__goal { font-size: 17px; }
body.site:not(.admin-body) .site-foot p,
body.site:not(.admin-body) .site-foot a { font-size: 17px; }
body.site:not(.admin-body) .foot-legal { font-size: 16px; }

/* ==========================================================================
   Match-Seite: Fokus auf das Spiel
   Die Arena ist das Wichtigste - sie wird gross dargestellt und laesst sich
   leicht bedienen. Kopfzeile und Spielerkarten bleiben kompakt. Spieler-
   karten, Rundenleiste und Arena bilden eine buendige, fokussierte Spalte
   statt ueber die volle Seitenbreite gezogen zu werden. Der Provably-Fair-
   Nachweis ist ein Dropdown.
   ========================================================================== */

/* Kopfzeile: Code, Namen und Modus in moeglichst wenigen Zeilen */
body.site:not(.admin-body) .match-page { padding: 12px 0 28px; }
body.site:not(.admin-body) .match-page .kicker { margin: 0 0 3px; font-size: 10px; line-height: 1.6; }
body.site:not(.admin-body) .match-page .h2 {
    font-size: clamp(12px, 2.6vw, 16px);
    line-height: 1.3;
    margin: 0 0 2px;
    text-shadow: 2px 2px 0 var(--gold);
}
body.site:not(.admin-body) .match-page .lead { font-size: 17px; line-height: 1.3; }
body.site:not(.admin-body) .match-page #matchApp { margin-top: 12px; }

/* Fokussierte Spielspalte */
body.site:not(.admin-body) .match-page .match-head,
body.site:not(.admin-body) .match-page .roundbar,
body.site:not(.admin-body) .match-page .arena-box {
    max-width: 660px;
    margin-left: auto;
    margin-right: auto;
}

/* Spielerkarten: flach und klein, der Fokus liegt auf der Arena.
   Name links, Punktestand rechts - so bleibt die Karte nur zwei Zeilen hoch. */
body.site:not(.admin-body) .match-page .match-head { padding: 8px; gap: 8px; }
body.site:not(.admin-body) .match-page .player {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 1px;
    padding: 6px 9px;
}
body.site:not(.admin-body) .match-page .player__role { grid-column: 1; grid-row: 1; font-size: 10px; line-height: 1.3; }
body.site:not(.admin-body) .match-page .player__name { grid-column: 1; grid-row: 2; font-size: 10px; line-height: 1.3; }
body.site:not(.admin-body) .match-page .player__score { grid-column: 2; grid-row: 1 / span 2; font-size: 18px; }
body.site:not(.admin-body) .match-page .player__state { grid-column: 1 / -1; grid-row: 3; font-size: 14px; line-height: 1.25; }
body.site:not(.admin-body) .match-page .score-sep { font-size: 10px; }

/* Rundenleiste: traegt Runde, Format und Punktestand - darf nicht winzig sein. */
body.site:not(.admin-body) .match-page .roundbar { margin-top: 8px; padding: 7px 12px; font-size: 9px; line-height: 1.7; }

/* Arena: das Spiel bekommt den meisten Platz und gut treffbare Felder */
body.site:not(.admin-body) .match-page .arena-box { margin-top: 8px; gap: 14px; padding: 22px 16px; }
body.site:not(.admin-body) .match-page .arena-box__turn { min-height: 22px; font-size: 11px; }
body.site:not(.admin-body) .match-page .board-ttt { width: min(100%, 560px); gap: 6px; padding: 8px; }
body.site:not(.admin-body) .match-page .board-ttt__cell { font-size: clamp(32px, 15vw, 76px); }

/* Provably Fair: standardmaessig eingeklappt */
body.site:not(.admin-body) .match-page .fair-details { display: block; }
body.site:not(.admin-body) .match-page .fair-details__sum {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}
body.site:not(.admin-body) .match-page .fair-details__sum::-webkit-details-marker { display: none; }
body.site:not(.admin-body) .match-page .fair-details__sum:hover .h3 { color: var(--green-t); }
body.site:not(.admin-body) .match-page .fair-details__hint {
    font-family: var(--display);
    font-size: 10px;
    line-height: 1.7;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink-3);
}
body.site:not(.admin-body) .match-page .fair-details__hint::before { content: '[+]'; }
body.site:not(.admin-body) .match-page .fair-details[open] .fair-details__hint::before { content: '[-]'; }
body.site:not(.admin-body) .match-page .fair-details[open] .fair-details__sum { margin-bottom: 14px; }

/* ==========================================================================
   Match-Feld: Duell, Aufdeck-Sequenz, Konfetti
   Aufbau nach dem Retro-Raster: dicke Tinte, harte Kanten, harte
   Versatzschatten. Alles haengt an .match-page bzw. an neuen Klassen, das
   Admin-Backend bleibt unberuehrt.
   ========================================================================== */

/* Konfettibuehne: liegt ueber der Seite, faengt aber keine Klicks. */
.match-fx {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 70;
}

/* Kurzes Aufblitzen beim Aufprall. */
.match-flash {
    position: fixed;
    inset: 0;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    z-index: 69;
}

.match-flash.is-on { animation: match-flash-out .4s var(--ease) both; }

@keyframes match-flash-out {
    0%   { opacity: 0; }
    12%  { opacity: .75; }
    100% { opacity: 0; }
}

/* Buehne: traegt Spielfeld und Countdown uebereinander. */
.match-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 250px;
}

.match-page .arena-box.is-shake { animation: match-quake .44s var(--ease); }

@keyframes match-quake {
    0%, 100% { transform: translate3d(0, 0, 0); }
    18%      { transform: translate3d(-6px, 2px, 0); }
    38%      { transform: translate3d(6px, -3px, 0); }
    58%      { transform: translate3d(-4px, -1px, 0); }
    78%      { transform: translate3d(2px, 1px, 0); }
}

/* Countdown liegt ueber dem Spielfeld, nicht daneben. */
.match-stage .countdown {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: clamp(52px, 17vw, 104px);
    line-height: 1;
    color: var(--ink);
    text-shadow: 6px 6px 0 var(--gold);
    opacity: 0;
    transform: scale(.6);
    pointer-events: none;
}

.match-stage .countdown.is-show { animation: match-count .42s steps(4, end) both; }

@keyframes match-count {
    0%   { opacity: 0; transform: scale(1.8) rotate(-5deg); }
    30%  { opacity: 1; transform: scale(1) rotate(0deg); }
    100% { opacity: 0; transform: scale(.72); }
}

/* Ergebnis-Overlay: kurze, grosse Meldung ueber dem Spielfeld. Traegt eine
   leichte Zustands-Toenung (gruen = Sieg, rot = Niederlage, gold = Remis),
   blendet sich nach rund zwei Sekunden selbst aus und faengt keine Klicks. */
.match-stage .stage-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 12px;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
}

.match-stage .stage-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--gold-wash);
    opacity: .42;
}

.match-stage .stage-overlay.is-win::before  { background: var(--green-wash); }
.match-stage .stage-overlay.is-lose::before { background: var(--red-wash); }

.match-stage .stage-overlay.is-show { animation: overlay-life 1.7s var(--ease) both; }

@keyframes overlay-life {
    0%   { opacity: 0; }
    12%  { opacity: 1; }
    66%  { opacity: 1; }
    100% { opacity: 0; }
}

.stage-overlay__card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: 88%;
    padding: 15px 22px;
    text-align: center;
    background: rgba(20, 22, 26, .92);
    border: var(--line) solid var(--ink);
    box-shadow: 5px 5px 0 rgba(20, 22, 26, .85);
    transform: scale(.7);
}

.match-stage .stage-overlay.is-show .stage-overlay__card { animation: overlay-pop .5s var(--ease) both; }

@keyframes overlay-pop {
    0%   { transform: scale(.6) rotate(-3deg); }
    62%  { transform: scale(1.05) rotate(1deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.stage-overlay__title {
    font-family: var(--display);
    font-size: clamp(16px, 4.6vw, 26px);
    line-height: 1.35;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--cream);
    text-shadow: 3px 3px 0 rgba(0, 0, 0, .55);
}

.stage-overlay__sub {
    font-family: var(--body);
    font-size: 18px;
    line-height: 1.2;
    color: rgba(246, 241, 228, .78);
}

.stage-overlay.is-win  .stage-overlay__card  { border-color: var(--green); box-shadow: 5px 5px 0 var(--green-t); }
.stage-overlay.is-win  .stage-overlay__title { color: #9ff09f; }
.stage-overlay.is-lose .stage-overlay__card  { border-color: var(--red); box-shadow: 5px 5px 0 var(--red-t); }
.stage-overlay.is-lose .stage-overlay__title { color: #ff9d95; }
.stage-overlay.is-draw .stage-overlay__card  { border-color: var(--gold); box-shadow: 5px 5px 0 var(--gold-t); }
.stage-overlay.is-draw .stage-overlay__title { color: #ffd873; }

/* Spielfeld-Stack: traegt Duell oder Brett und haelt beides mittig. */
.arena-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
}

/* ----------------------------------------------------------- Duell (RPS) */

.duel {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 460px;
}

.duel__side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.duel__tag {
    font-family: var(--display);
    font-size: 10px;
    line-height: 1.6;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.duel__disc {
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 132px;
    aspect-ratio: 1;
    background: var(--cream-2);
    border: var(--line) solid var(--ink);
    box-shadow: var(--pop) var(--pop) 0 var(--ink);
}

.duel__side--you .duel__disc { background: var(--green-wash); }
.duel__side--foe .duel__disc { background: var(--blue-wash); }

.duel__mid { display: grid; place-items: center; }

.duel__vs {
    font-family: var(--display);
    font-size: 12px;
    line-height: 1;
    color: var(--ink-3);
}

/* Hand im Rahmen: game.css blendet .hand__art aus, hier gilt die Karte. */
.duel__disc .hand__art {
    display: block;
    width: 78%;
    height: 78%;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(3px 3px 0 rgba(28, 28, 28, .5));
}

.duel__disc .hand__mark {
    font-family: var(--display);
    font-size: 26px;
    line-height: 1;
    color: var(--ink-3);
}

/* Zittern, solange der Gegner noch nicht gezogen hat. */
.duel__disc.is-shaking .hand__art,
.duel__disc.is-shaking .hand__mark { animation: duel-shake .34s steps(2, end) infinite; }

@keyframes duel-shake {
    0%, 100% { transform: rotate(-6deg) translateY(1px); }
    50%      { transform: rotate(6deg) translateY(-3px); }
}

.duel__disc.is-pop { animation: duel-pop .42s steps(4, end); }

@keyframes duel-pop {
    0%   { transform: scale(.72); }
    60%  { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Ergebnis: Zustandsfarbe des Rahmens, kein Leuchten. */
.duel__disc.is-win { background: var(--green-wash); border-color: var(--green-t); animation: duel-win .5s var(--ease); }
.duel__disc.is-lose { border-color: var(--ink-3); opacity: .55; }
.duel__disc.is-lose .hand__art { filter: drop-shadow(3px 3px 0 rgba(28, 28, 28, .4)) grayscale(1); }
.duel__disc.is-draw { background: var(--gold-wash); border-color: var(--gold-t); }

@keyframes duel-win {
    0%, 100% { transform: translate(0, 0); }
    22%      { transform: translate(-4px, -4px); }
    48%      { transform: translate(0, 0); }
    74%      { transform: translate(4px, -2px); }
}

/* ------------------------------------------------------- Coinflip (1v1) */

.coinfield {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 460px;
    --spin-t: 1.44s;
}

/* Die Perspektive sitzt auf dem direkten Elternknoten der Muenze - sonst
   bleibt die Drehung flach. Der Schatten liegt daneben, nicht im 3D-Raum. */
.coinstage {
    position: relative;
    display: grid;
    place-items: center;
    width: min(46vw, 132px);
    perspective: 900px;
}

/* Vertikaler Wurf liegt auf dem Rahmen, die Drehung auf der Muenze selbst -
   so ueberschreiben sich die beiden Animationen nicht. */
.coinlift {
    width: 100%;
    aspect-ratio: 1;
    transform-style: preserve-3d;
}

.coin {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform: rotateY(0deg);
}

.coin__face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.coin__face--tails { transform: rotateY(180deg); }

.coinfield__shadow {
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 74%;
    height: 11px;
    background: rgba(28, 28, 28, .2);
    border-radius: 50%;
    transform: translateX(-50%);
}

.coinfield.is-up .coinlift { animation: coin-bob var(--spin-t) cubic-bezier(.28, .12, .24, 1) both; }
.coinfield.is-up .coinfield__shadow { animation: coin-shadow var(--spin-t) cubic-bezier(.28, .12, .24, 1) both; }

@keyframes coin-bob {
    0%   { transform: translateY(0); }
    20%  { transform: translateY(-30px); }
    50%  { transform: translateY(-34px); }
    78%  { transform: translateY(-12px); }
    100% { transform: translateY(0); }
}

@keyframes coin-shadow {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: .55; }
    50%      { transform: translateX(-50%) scale(.58); opacity: .22; }
}

/* Aufprall: harte, gestufte Stauchung. */
.coinfield.is-land .coinlift { animation: coin-land .34s steps(4, end); }

@keyframes coin-land {
    0%   { transform: scale(1, 1); }
    40%  { transform: scale(1.16, .84); }
    72%  { transform: scale(.95, 1.05); }
    100% { transform: scale(1, 1); }
}

.coinfield__hint {
    margin: 0;
    min-height: 30px;
    font-family: var(--display);
    font-size: 9px;
    line-height: 1.8;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-align: center;
    color: var(--ink-2);
}

/* Zwei statt drei Knoepfe: breiter, damit die Muenze gut erkennbar bleibt. */
.picks--coin { grid-template-columns: repeat(2, 1fr); max-width: 320px; }
.pick-card--coin img { width: 52px; height: 52px; }

.pick-card__sub {
    font-family: var(--body);
    font-size: 16px;
    line-height: 1;
    color: var(--ink-3);
}

.pick-card--coin.is-picked .pick-card__sub { color: var(--ink); }

/* Wer was gerufen hat - nach der Aufdeckung. */
.calls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 460px;
}

.calls__item {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 12px;
    background: var(--cream-2);
    border: 2px solid var(--ink);
    font-size: 17px;
    line-height: 1.2;
    color: var(--ink-2);
}

.calls__item b { font-family: var(--display); font-size: 9px; font-weight: 400; }

.calls__item.is-win  { background: var(--green-wash); border-color: var(--green-t); color: var(--green-t); }
.calls__item.is-lose { background: var(--red-wash); border-color: var(--red-t); color: var(--red-t); }
.calls__item.is-draw { background: var(--gold-wash); border-color: var(--gold-t); color: var(--gold-t); }

/* --------------------------------------------------- Number Clash (1v1) */

.nclash {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 460px;
}

/* Grosses Ziffernfeld: dunkle Tinte, helle Ziffern, harte Kante. */
.nclash__dial {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    padding: 16px 24px 13px;
    background: var(--ink);
    border: var(--line) solid var(--ink);
    box-shadow: var(--pop) var(--pop) 0 var(--cream-2);
}

.nclash__val {
    font-family: var(--display);
    font-size: 42px;
    line-height: 1;
    letter-spacing: .04em;
    color: var(--green);
    text-shadow: 0 3px 0 rgba(0, 0, 0, .55);
}

.nclash__lbl {
    font-family: var(--display);
    font-size: 8px;
    line-height: 1;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--cream-2);
}

/* Waehrend des Rollens zittert das Feld in harten Stufen. */
.nclash__dial.is-rolling .nclash__val { animation: nc-roll .12s steps(2, end) infinite; }

@keyframes nc-roll {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(0, -3px); }
}

/* Landung: gestufte Stauchung wie bei der Muenze. */
.nclash__dial.is-land { animation: nc-land .34s steps(4, end); }

@keyframes nc-land {
    0%   { transform: scale(1, 1); }
    40%  { transform: scale(1.12, .88); }
    72%  { transform: scale(.96, 1.04); }
    100% { transform: scale(1, 1); }
}

.nclash__ctrl {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
}

/* Retro-Schieber: Schiene in Karton, Griff als gruener Pixelblock. */
.nclash__range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 26px;
    margin: 0;
    background: transparent;
    cursor: pointer;
}

.nclash__range::-webkit-slider-runnable-track {
    box-sizing: border-box;
    height: 16px;
    background: var(--cream-2);
    border: 2px solid var(--ink);
}

.nclash__range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    width: 22px;
    height: 26px;
    margin-top: -5px;
    background: var(--green);
    border: 2px solid var(--ink);
}

.nclash__range::-moz-range-track {
    box-sizing: border-box;
    height: 16px;
    background: var(--cream-2);
    border: 2px solid var(--ink);
}

.nclash__range::-moz-range-thumb {
    box-sizing: border-box;
    width: 22px;
    height: 26px;
    border-radius: 0;
    background: var(--green);
    border: 2px solid var(--ink);
}

.nclash__range:disabled { opacity: .5; cursor: default; }

.nclash__hint {
    margin: 0;
    min-height: 30px;
    font-family: var(--display);
    font-size: 9px;
    line-height: 1.8;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-align: center;
    color: var(--ink-2);
}

@media (max-width: 420px) {
    .nclash__dial { min-width: 168px; padding: 13px 18px 11px; }
    .nclash__val  { font-size: 34px; }
}

/* ------------------------------------------------ Tic Tac Toe im Match */

body.site:not(.admin-body) .match-page .board-ttt__cell.is-set { animation: ttt-pop .3s steps(4, end); }

@keyframes ttt-pop {
    0%   { transform: scale(.5); }
    60%  { transform: scale(1.14); }
    100% { transform: scale(1); }
}

body.site:not(.admin-body) .match-page .board-ttt__cell.is-win,
body.site:not(.admin-body) .match-page .board-ttt__cell.is-lose {
    animation: ttt-win .5s var(--ease), ttt-line-glow 1s ease-in-out .5s infinite alternate;
}

body.site:not(.admin-body) .match-page .board-ttt__cell.is-win {
    background: var(--green-wash);
    border-color: var(--green-t);
    color: var(--green-t);
}

body.site:not(.admin-body) .match-page .board-ttt__cell.is-lose {
    background: var(--red-wash);
    border-color: var(--red-t);
    color: var(--red-t);
}

/* Gewinnreihe atmet kurz nach (Licht in der eigenen Farbe). */
@keyframes ttt-line-glow {
    from { box-shadow: inset 0 0 0 0 transparent; }
    to   { box-shadow: inset 0 0 20px -6px currentColor; }
}

@keyframes ttt-win {
    0%, 100% { transform: translate(0, 0); }
    25%      { transform: translate(-3px, -3px); }
    50%      { transform: translate(0, 0); }
    75%      { transform: translate(3px, -2px); }
}

body.site:not(.admin-body) .match-page .board-ttt__cell.is-fade { opacity: .45; }

/* Ergebniszeile unter dem Feld */
body.site:not(.admin-body) .match-page .banner {
    min-height: 22px;
    font-size: 12px;
    line-height: 1.5;
    padding: 0 4px;
}

body.site:not(.admin-body) .match-page .banner small {
    margin-top: 3px;
    font-size: 19px;
    color: var(--ink-2);
}

/* Punktestand waechst kurz, wenn die Runde faellt. */
body.site:not(.admin-body) .match-page .player__score.is-bump { animation: match-bump .5s var(--ease); }

@keyframes match-bump {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* ==========================================================================
   Feinschliff (nur Website)
   ========================================================================== */

/* VT323 hat kaum Oberlaenge - etwas mehr Durchschuss fuer Fliess- und
   Hilfstexte, damit mehrzeilige Absaetze nicht zusammenkleben. */
body.site:not(.admin-body) { line-height: 1.32; }

body.site:not(.admin-body) .field__help {
    font-size: 17px;
    line-height: 1.45;
    color: var(--ink-2);
}

body.site:not(.admin-body) .prose p { line-height: 1.5; }
body.site:not(.admin-body) .lead { line-height: 1.4; }
body.site:not(.admin-body) .tbl td { line-height: 1.5; }

/* Tastaturbedienung sichtbar machen. */
body.site:not(.admin-body) a:focus-visible,
body.site:not(.admin-body) button:focus-visible,
body.site:not(.admin-body) input:focus-visible,
body.site:not(.admin-body) textarea:focus-visible,
body.site:not(.admin-body) select:focus-visible,
body.site:not(.admin-body) summary:focus-visible {
    outline: 3px solid var(--blue-t);
    outline-offset: 2px;
}

/* Der Spielbereich darf nicht springen, waehrend Countdown und Hupfer laufen. */
body.site:not(.admin-body) .match-page .arena-box { min-height: 340px; }

@media (max-width: 520px) {
    body.site:not(.admin-body) .match-page .duel { gap: 6px; }
    body.site:not(.admin-body) .match-page .duel__tag { font-size: 10px; }
    body.site:not(.admin-body) .match-page .pick-card { padding: 12px 4px; gap: 7px; }
    body.site:not(.admin-body) .match-page .pick-card img { width: 42px; height: 42px; }
    body.site:not(.admin-body) .match-page .pick-card--coin img { width: 46px; height: 46px; }
    body.site:not(.admin-body) .match-page .pick-card__label { font-size: 9px; }
    body.site:not(.admin-body) .match-page .pick-card__sub { font-size: 15px; }
    body.site:not(.admin-body) .match-page .calls__item { padding: 5px 9px; font-size: 16px; }
    body.site:not(.admin-body) .match-page .arena-box { min-height: 310px; }
}

/* ==========================================================================
   Match auf dem Handy: das Spiel passt ohne Scrollen in den Bildschirm
   Punktestand, Rundenleiste und Arena bilden eine kompakte Hoehe, das
   Spielfeld skaliert mit der Viewport-Hoehe (svh) und bleibt quadratisch.
   Alles darunter (Status, Einzahlung, Aktionen, Fair-Nachweis, Chat) bleibt
   scrollbar - der Kopfbereich wird dafuer stark verkuerzt.
   ========================================================================== */

@media (max-width: 620px) {
    /* Kopfzeile verdichten */
    body.site:not(.admin-body) .match-page { padding: 8px 0 18px; }
    body.site:not(.admin-body) .match-page .kicker { margin: 0 0 2px; }
    body.site:not(.admin-body) .match-page .h2 { font-size: 13px; margin: 0 0 2px; }
    body.site:not(.admin-body) .match-page .lead { font-size: 17px; line-height: 1.3; margin: 0; }
    body.site:not(.admin-body) .match-page #matchApp { margin-top: 10px; }

    /* Spielerkarten bleiben nebeneinander (auch unter 420px) und flacher */
    body.site:not(.admin-body) .match-page .match-head { grid-template-columns: 1fr auto 1fr; padding: 8px; gap: 8px; }
    body.site:not(.admin-body) .match-page .player { padding: 6px 8px; }
    body.site:not(.admin-body) .match-page .player__state { font-size: 14px; }
    body.site:not(.admin-body) .match-page .score-sep { padding: 0; }

    /* Rundenleiste naeher an die Karten */
    body.site:not(.admin-body) .match-page .roundbar { margin-top: 8px; }

    /* Arena: keine feste Mindesthoehe mehr, Spielfeld gibt die Hoehe vor */
    body.site:not(.admin-body) .match-page .arena-box {
        margin-top: 8px;
        gap: 10px;
        padding: 14px;
        min-height: 0;
    }
    body.site:not(.admin-body) .match-page .arena-box__turn { min-height: 20px; }
    body.site:not(.admin-body) .match-page .match-stage { min-height: 0; }

    /* Spielfeld skaliert mit der Hoehe, bleibt quadratisch und passt immer */
    body.site:not(.admin-body) .match-page .board-ttt { width: min(100%, 42svh); }
    body.site:not(.admin-body) .match-page .duel__disc { max-width: min(132px, 24svh); }
    body.site:not(.admin-body) .match-page .coinstage { width: min(42vw, 26svh); }
}

/* Sehr flache Displays: Untertitel weicht, Feld bekommt noch etwas weniger. */
@media (max-width: 620px) and (max-height: 700px) {
    body.site:not(.admin-body) .match-page .lead { display: none; }
    body.site:not(.admin-body) .match-page .board-ttt { width: min(100%, 40svh); }
}
