/* 0.17.0 – Lieferung „Menü, PvE und Tempo“ (21.10.2026), eingebunden in src/runerivals.html nach hd-ui.css.
 * 1. Bildkarten der Menüfenster Multiplayer und Bots & Schatten (assets/menue-pve-tempo-v1/modes, 3:2, ganzes Motiv)
 * 2. Schädelmotive der Story-Schwierigkeit (difficulty/ für die Auswahl, pve/ als Reihen 18 px hoch)
 * 3. Tempo-, Wiedergabe- und Kampflog-Knöpfe: gemalte Flächen (controls/) als 9-Slice plus Glyphen (glyphs/*.svg)
 *    und echte, übersetzbare Texte. Zustände: normal, hover, ausgewählt (aria-pressed/aria-expanded), gedrückt, gesperrt.
 * Reine Darstellung – Aktionen, Kontingente und Tempo-Regeln stehen im Spielcode. */

/* ---- 1. Menüfenster mit Bildkarten ---- */
.mc-sheet { display: flex; flex-direction: column; gap: 10px; }
.msh-head.mc-head { align-items: flex-start; }
.mc-titles { display: grid; gap: 2px; min-width: 0; }
.mc-kicker { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: #8a6a3a; }
.home-main .msheet .mc-head h3 { margin: 0; font-family: var(--display); font-size: 1.75rem; line-height: 1.15; }
.home-main .msheet .mc-head .mc-sub { margin: 0; }
/* Karten nebeneinander; Bild-, Text- und Hinweiszeile über alle Karten gleich hoch (subgrid) – gleich große Bilder */
.mcards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; gap: 6px 14px; align-items: start; }
/* nur die Übung (offline/ohne Konto): eine Karte in sinnvoller Größe statt über die ganze Breite */
.mcards:has(> .mcard:only-child) { grid-auto-columns: minmax(0, 26rem); justify-content: center; }
.mcard { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 6px; align-content: start; min-width: 0; text-align: center; }
.mc-art { display: grid; place-items: end center; min-width: 0; }
.mc-frame { position: relative; width: 100%; aspect-ratio: 3 / 2; border-radius: 10px; overflow: hidden; background: #1d2b3a; box-shadow: 0 3px 10px #0005; }
.mc-frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1.5px #c9ae7aa6; pointer-events: none; }
/* ganzes Motiv: Rahmen hat dasselbe Seitenverhältnis wie das Bild, contain verhindert jeden Zuschnitt */
.mc-frame > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; transition: filter 0.15s ease; }
/* 0.18.4: das ganze Bild ist Klickfläche des Knopfs (der Spielcode leitet den Klick weiter); Hover übers Bild hebt Bild und Knopf */
.mc-frame:has(.mc-go[data-act]:not(:disabled)) { cursor: pointer; }
.mc-frame:has(.mc-go[data-act]:not(:disabled)):hover > img { filter: brightness(1.07) saturate(1.05); }
.mcard:has(.mc-go:disabled, .mc-go.off) .mc-frame > img { filter: grayscale(0.55) brightness(0.92); }
/* Knopf unten im Bild (wie die Turmbeschriftungen der Hauptszene): dunkles Schild mit Goldrand */
.mc-go { position: absolute; left: 50%; bottom: 6%; translate: -50% 0; z-index: 1; width: max-content; max-width: calc(100% - 12px); min-height: 44px; display: inline-flex; align-items: center; justify-content: center; margin: 0; padding: 0.3em 1.1em; border: 0; border-radius: 999px; background: #0d1513e0; color: #f5ebcd; font-family: var(--display); font-size: clamp(0.95rem, 1.6vw, 1.3rem); line-height: 1.15; letter-spacing: 0.02em; text-align: center; box-shadow: inset 0 0 0 1.5px var(--gold, #c9962b), 0 2px 8px #000a; cursor: pointer; transition: translate 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
.mc-go:hover:not(:disabled):not(.off), .mc-frame:hover > .mc-go[data-act]:not(:disabled) { translate: -50% -2px; background: #0d1513f2; box-shadow: inset 0 0 0 2px var(--gold, #c9962b), 0 0 14px #f0c24b99; }
.mc-go:active:not(:disabled):not(.off) { translate: -50% 0; }
.mc-go:focus-visible { outline: 3px solid var(--sel); outline-offset: 2px; }
.mc-go:disabled { cursor: not-allowed; opacity: 0.72; }
.mc-go.off { cursor: default; background: #0d1513b8; color: #e8dcc0; box-shadow: inset 0 0 0 1.5px #c9ae7a80, 0 2px 8px #0008; }
.home-main .mode .mcard p { margin: 0; }
/* Das Fenster ist auf dem Desktop selbst Größenbezug (siehe unten). Die Regel „Beschreibungen bei wenig Höhe
   ausblenden“ (@container max-height 24rem) soll sich trotzdem auf die Spielfläche beziehen, nicht auf das Fenster. */
.appmain { container-name: rrapp; }
.home-main .mc-sheet p { display: block; }
@container rrapp (max-height: 24rem) {
  .home-main .mc-sheet p { display: none; }
}

.mcard .mc-text { font-size: 0.9rem; line-height: 1.35; }
.mcard .rbot-note { font-size: 0.8rem; line-height: 1.3; }
@media (prefers-reduced-motion: reduce) {
  .mc-go, .mc-frame > img { transition: none; }
  .mc-go:hover:not(:disabled):not(.off), .mc-frame:hover > .mc-go[data-act]:not(:disabled) { translate: -50% 0; }
}
/* Desktop: das Fenster hat wie Host/Join die Größe der (unsichtbaren) Turmszene. Die Bilder passen sich der freien
   Höhe an (immer 3:2, ganz sichtbar), Texte und Hinweise bleiben darunter. */
@media (min-width: 1000px) and (min-height: 560px) {
  /* Fenster = Größenbezug: Bildzeile höchstens so hoch, wie die Spaltenbreite bei 3:2 verlangt (Lücke 14 px) */
  .home-main .mstage.open > .mc-sheet { container: mcsheet / size; }
  /* breiter als die übrigen Fenster (60rem), damit die Motive auf großen Bildschirmen groß genug sind */
  .home.cards-open { grid-template-columns: minmax(0, 75rem); }
  .mc-sheet .mcards { --mc-n: 3; flex: 1 1 auto; min-height: 0; grid-template-rows: minmax(5.5rem, calc((100cqw - (var(--mc-n) - 1) * 14px) / var(--mc-n) / 1.5)) auto auto; align-content: center; }
  .mc-sheet .mcards:has(> .mcard:nth-child(2):last-child) { --mc-n: 2; }
  .mc-sheet .mcards:has(> .mcard:only-child) { grid-template-rows: minmax(5.5rem, calc(min(26rem, 100cqw) / 1.5)) auto auto; }
  .mc-sheet .mcard { min-height: 0; }
  .mc-sheet .mc-art { height: 100%; min-height: 0; container-type: size; }
  .mc-sheet .mc-frame { width: min(100cqw, 150cqh); }
  .mc-sheet .mc-go { font-size: clamp(0.85rem, 9cqh, 1.3rem); }
  .tight .home-main .msheet .mc-head h3 { font-size: 1.4rem; }
}
/* Telefon: Karten untereinander */
@media (max-width: 700px) {
  .mcards, .mcards:has(> .mcard:only-child) { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-columns: auto; justify-content: stretch; row-gap: 14px; }
  .mcard { display: flex; flex-direction: column; gap: 6px; grid-row: auto; }
  .home-main .msheet .mc-head h3 { font-size: 1.45rem; }
  .mc-go { font-size: 1.1rem; }
}

/* ---- 2. Story: Schädelmotive statt ☠-Zeichen (Text und aria-Labels bleiben) ---- */
.skulls { display: inline-flex; align-items: center; vertical-align: middle; letter-spacing: 0; }
img.skullrow { display: block; width: auto; height: 18px; filter: drop-shadow(0 1px 1px #0006); }
img.skullpick { display: block; width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 2px 2px #0005); }
.sdiff { display: inline-flex; align-items: center; gap: 0.35em; vertical-align: middle; }
.sdbtn b { gap: 8px; }
.tight img.skullpick { width: 36px; height: 36px; }
.vs .sdiff img.skullrow { height: 22px; }
/* Stationskarten: erreicht = grünes Schild in Farbe, offen = blass und entsättigt (gesperrte Karten sind ohnehin grau) */
.smark { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; }
.smark:not(.won) img.skullrow { filter: grayscale(1) contrast(0.85); }
.smark.won img.skullrow { filter: drop-shadow(0 1px 1px #0008); }

/* ---- 3. Tempo, Wiedergabe, Kampflog ---- */
.rr-control { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 48px; height: 48px; min-width: 44px; min-height: 44px; margin: 0; border: 0; padding: 0; border-radius: 12%; background: transparent; color: #fff3d6; font: 700 15px/1 Georgia, "Palatino Linotype", serif; text-shadow: 0 1px 2px #0009; cursor: pointer; --rr-press: 1px; --rr-glow: 5px; }
.rr-control::before { content: ""; position: absolute; inset: 0; z-index: -1; border: solid transparent; border-width: var(--rr-bt) var(--rr-br) var(--rr-bb) var(--rr-bl); border-image: var(--rr-face) var(--rr-slice) fill / var(--rr-bt) var(--rr-br) var(--rr-bb) var(--rr-bl) stretch; transition: filter 0.12s; }
.rr-control img { display: block; width: 36px; height: 36px; pointer-events: none; filter: drop-shadow(0 1px 1px #000a); }
.rr-control::after { content: ""; position: absolute; inset: 2px; border-radius: 13%; border: 2px solid transparent; pointer-events: none; }
.rr-control.rr-speed { width: 68px; }
.rr-control.rr-speed::after { border-radius: 20% / 29%; }
.rr-control:hover::before { filter: brightness(1.18); }
/* ausgewählt: aktives Tempo, offenes Kampflog */
.rr-control[aria-pressed="true"]::after, .rr-control[aria-expanded="true"]::after { border-color: #7de5ff; box-shadow: 0 0 var(--rr-glow) #44c8f9a0, inset 0 0 var(--rr-glow) #44c8f970; }
.rr-control:active::before { filter: brightness(0.78); }
.rr-control:active > * { transform: translateY(var(--rr-press)); }
.rr-control:focus-visible { outline: 2px solid #9aeaff; outline-offset: 3px; }
.rr-control:disabled { filter: grayscale(0.9); opacity: 0.42; cursor: default; }
.rr-control:disabled::before { filter: none; }
.rr-control.rr-log { width: auto; min-width: 123px; padding: 0 17px; gap: 6px; font-size: 13px; }
.rr-control.rr-log img { width: 29px; height: 29px; }
.rr-transport { --rr-face: url("../controls/transport-face.webp"); --rr-slice: 243 243 243 243; --rr-bt: 8px; --rr-br: 8px; --rr-bb: 8px; --rr-bl: 8px; }
.rr-speed { --rr-face: url("../controls/speed-face.webp"); --rr-slice: 134 279 134 279; --rr-bt: 8px; --rr-br: 16px; --rr-bb: 8px; --rr-bl: 16px; }
@media (prefers-reduced-motion: reduce) {
  .rr-control::before { transition: none; }
}
/* Anordnung: Tempo in einer Reihe, die fünf Wiedergabeknöpfe bleiben zusammen in fester Folge; Kampflog darf umbrechen */
.speed:not(.vote) { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.rp-transport { display: inline-flex; flex-wrap: nowrap; gap: 6px; }
.replaybar.live .rp-transport { display: none; }
@media (max-width: 400px) {
  .rp-transport { gap: 4px; }
  .rr-control.rr-transport { width: 46px; height: 46px; }
  .rr-control.rr-speed:not(.rr-log) { width: 64px; height: 46px; }
}
/* Bildkarten-Fenster offen: Untertitel, Version und Linkzeile unter dem Logo weichen (wie im Story-Fenster) */
.home.cards-open .home-logo .sub, .home.cards-open .home-logo .gamever, .home.cards-open .homelinks { display: none; }
