/* ------------------------------------------------------------------ *
 * Sheep Chase – Retro-Look ohne externe Fonts oder Frameworks.
 * ------------------------------------------------------------------ */

:root {
  --ink: #1b1424;
  --ink-soft: #2e2340;
  --parchment: #f4e9d8;
  --gold: #f0c05a;
  --green: #5cb457;
  --pink: #f4a7c3;
  --shadow: rgba(12, 8, 18, 0.55);
  --font: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #0d0a12;
  color: var(--parchment);
  font-family: var(--font);
  /* Doppeltipp-Zoom und Textauswahl stören beim Spielen. */
  touch-action: none;
  user-select: none;
}

/* --------------------------------- Canvas -------------------------- */

#stage {
  display: block;
  width: 100vw;
  height: 100vh;
  /* Der Kern des Retro-Looks: keine Glättung beim Hochskalieren.
     Reihenfolge zählt – der modernere Wert muss zuletzt stehen, sonst gewinnt
     der Fallback (Chromium meldet sonst "crisp-edges"). */
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  background: #26542f;
}

/* ------------------------------ Namensschilder --------------------- */

.nameplates {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.nameplate {
  position: absolute;
  transform: translate(-50%, -100%);
  padding: 2px 6px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: rgba(27, 20, 36, 0.82);
  color: var(--parchment);
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-shadow: 0 1px 0 #000;
}

.nameplate--self {
  border-color: var(--gold);
  color: var(--gold);
}

.nameplate--target::before {
  content: "★ ";
  color: var(--pink);
}

/* ---------------------------------- HUD ---------------------------- */

.hud {
  position: fixed;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  pointer-events: none;
}

.hud__row {
  display: flex;
  gap: 8px;
}

.hud__chip {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 5px 9px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: rgba(27, 20, 36, 0.85);
  box-shadow: 0 2px 0 var(--shadow);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.hud__chip--muted {
  color: #b6a6c9;
}

.hud__row.hidden {
  display: none;
}

/* Ton-Schalter im HUD – einziges anklickbares Element dort. */
.hud__chip--button {
  padding: 4px 9px;
  color: var(--parchment);
  font-family: var(--font);
  font-size: 14px;
  cursor: pointer;
  pointer-events: auto;
}

.hud__chip--button:hover {
  border-color: var(--gold);
}

/* Sprungbereitschaft: Balken füllt sich während der Abklingzeit. */
.jump__bar {
  display: inline-block;
  width: 34px;
  height: 6px;
  border: 1px solid var(--ink);
  background: #17111f;
}

.jump__fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
  transition: width 0.08s linear;
}

.hud__chip--ready .jump__fill {
  background: var(--green);
}

.hud__chip--ready {
  border-color: var(--green);
}

.hud__label {
  color: var(--gold);
  font-size: 10px;
  text-transform: uppercase;
}

/* ------------------------- Funkspruch & Timer ---------------------- */

.radio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: rgba(27, 20, 36, 0.85);
  box-shadow: 0 2px 0 var(--shadow);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.radio__dot {
  width: 12px;
  height: 12px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: #555;
  /* Sanftes Pulsieren: der Funkspruch soll auffallen, ohne zu nerven. */
  animation: radio-pulse 1.8s ease-in-out infinite;
}

@keyframes radio-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.timer {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 18px;
  border: 3px solid var(--ink);
  border-radius: 4px;
  background: rgba(27, 20, 36, 0.9);
  box-shadow: 0 3px 0 var(--shadow);
  color: var(--parchment);
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.timer--urgent {
  border-color: #c8453c;
  color: #ff9a8b;
}

/* Uhr ruht, solange das Schaf im Startkreis steht. */
.timer--waiting {
  border-color: var(--gold);
  color: var(--gold);
  opacity: 0.75;
}

.timer-hint {
  position: fixed;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: rgba(27, 20, 36, 0.85);
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
  animation: radio-pulse 2.2s ease-in-out infinite;
}

.timer-hint.hidden {
  display: none;
}

/* -------------------------------- Overlay -------------------------- */

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(9, 6, 14, 0.78);
  backdrop-filter: blur(2px);
}

/*
 * Ziehende Wolken hinter den Tafeln – dieselbe Textur wie der Nebel im Spiel.
 * Zwei Ebenen mit unterschiedlichem Tempo geben dem Menü Tiefe, ohne von
 * den Bedienelementen abzulenken.
 */
.overlay::before,
.overlay::after {
  content: "";
  position: absolute;
  /* Bewusst genau der Viewport: ein überstehendes Element würde im
     scrollbaren Overlay Rollbalken auslösen. Bewegt wird deshalb die
     Hintergrundposition, nicht das Element. */
  inset: 0;
  background-image: url("assets/fog.png");
  background-repeat: repeat;
  pointer-events: none;
}

.overlay::before {
  background-size: 384px 384px;
  opacity: 0.08;
  animation: drift-far 90s linear infinite;
}

.overlay::after {
  background-size: 220px 220px;
  opacity: 0.05;
  animation: drift-near 55s linear infinite;
}

@keyframes drift-far {
  from { background-position: 0 0; }
  to { background-position: 384px 192px; }
}

@keyframes drift-near {
  from { background-position: 0 0; }
  to { background-position: -220px 110px; }
}

@media (prefers-reduced-motion: reduce) {
  .overlay::before,
  .overlay::after { animation: none; }
}

.overlay.hidden,
.hud.hidden,
.timer.hidden,
.radio.hidden,
.toast.hidden {
  display: none;
}

/* Das Ergebnis liegt über der bereits zurückgesetzten Lobby. */
.overlay--top {
  z-index: 10;
}

.panel--result {
  text-align: center;
}

.result__badge {
  margin-bottom: 6px;
  font-size: 42px;
  line-height: 1;
}

.result__meta {
  margin: 0 0 18px;
  color: #8f81a4;
  font-size: 11px;
  letter-spacing: 0.08em;
}

/*
 * Tafeln mit echtem Pixelrahmen: `border-image` schneidet ui-frame.png in
 * neun Felder, sodass Ecken scharf bleiben und die Kanten mitwachsen.
 * Deshalb hier bewusst kein CSS-Radius und kein weicher Schatten.
 */
.panel {
  position: relative;
  /* 440 statt 380: im Warteraum stehen bis zu drei Knöpfe nebeneinander,
     bei 380 rutschte der letzte aus dem Rahmen. */
  width: min(440px, 100%);
  padding: 24px;
  /* 8px-Slice exakt verdoppelt – krumme Faktoren zerfransen die Pixelkante. */
  border: 16px solid transparent;
  border-image-source: url("assets/ui-frame.png");
  border-image-slice: 8 fill;
  border-image-width: 16px;
  border-image-repeat: repeat;
  background: linear-gradient(180deg, #3a2c4e 0%, #2a2039 100%);
  background-clip: padding-box;
  image-rendering: pixelated;
  animation: panel-in 0.28s ease-out;
}

.panel--wide {
  width: min(520px, 100%);
}

@keyframes panel-in {
  from { transform: translateY(8px) scale(0.985); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* Zierleiste als Trenner zwischen den Abschnitten – die 48x8-Ranke doppelt
   skaliert, die Höhe muss die volle Kachel zeigen (16px). */
.ornament {
  height: 16px;
  margin: 14px 0;
  background-image: url("assets/ui-divider.png");
  background-repeat: repeat-x;
  background-position: center;
  background-size: 96px 16px;
  image-rendering: pixelated;
  opacity: 0.9;
}

.ornament--small {
  margin: 12px 0 10px;
  opacity: 0.5;
}

.panel__title {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 26px;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 0 var(--ink);
}

.panel__title--small {
  font-size: 20px;
}

/* Titel mit leichtem Atmen – belebt das Menü, ohne zu zappeln. */
.panel__title--hero {
  font-size: 32px;
  text-align: center;
  text-shadow: 0 2px 0 var(--ink), 0 0 12px rgba(240, 192, 90, 0.35);
  animation: title-breathe 4.5s ease-in-out infinite;
}

@keyframes title-breathe {
  0%, 100% { transform: translateY(0); text-shadow: 0 2px 0 var(--ink), 0 0 10px rgba(240, 192, 90, 0.28); }
  50% { transform: translateY(-2px); text-shadow: 0 3px 0 var(--ink), 0 0 18px rgba(240, 192, 90, 0.5); }
}

/* ----------------------------- Kleine Bühne ------------------------------ */

/*
 * Über dem Titel läuft ein Schaf von rechts nach links, zwei Wölfe hinterher.
 * Die Figuren stammen direkt aus dem Spiel-Sprite-Sheet: 24 Spalten
 * (8 Richtungen x 3 Phasen), 5 Zeilen (Schaf, dann vier Wolfsfarben).
 * Richtung 2 = "links" liegt in den Spalten 6–8.
 */
.stage {
  position: relative;
  /* Läuft bis an die Rahmeninnenkante, damit die Figuren dort verschwinden. */
  height: 68px;
  margin: -18px -18px 0;
  overflow: hidden;
  --run-distance: 600px;
}

.stage__runner {
  position: absolute;
  top: 2px;
  left: 100%;
  width: 64px;
  height: 64px;
  background-image: url("assets/characters.png");
  /* Sheet ist 384x80 – vierfach vergrößert: 1536x320, Zelle 64px. */
  background-size: 1536px 320px;
  image-rendering: pixelated;
  /* Laufzyklus: die drei Phasen der Richtung "links" (Spalten 6–8). */
  animation:
    run-cycle 0.4s steps(3) infinite,
    run-across 7s linear infinite;
}

.stage__runner--sheep {
  background-position-y: 0;
  animation-delay: 0s, 0s;
}

.stage__runner--wolf1 {
  /* Zweite Sheet-Zeile: grauer Wolf. Der Versatz muss größer sein als eine
     Figur breit ist, sonst kleben die Verfolger aneinander. */
  background-position-y: -64px;
  animation-delay: -0.13s, 1.4s;
}

.stage__runner--wolf2 {
  /* Vierte Sheet-Zeile: dunkler Wolf. */
  background-position-y: -192px;
  animation-delay: -0.26s, 2.3s;
}

@keyframes run-cycle {
  from { background-position-x: -384px; }
  to { background-position-x: -576px; }
}

@keyframes run-across {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-1 * var(--run-distance))); }
}

@media (max-width: 560px) {
  .stage { --run-distance: 430px; }
}

/*
 * Flache Fenster (Laptop mit 720p): dieselben Inhalte, engere Abstände.
 * Notfalls scrollt das Overlay – die Einleitung wird nicht gekürzt.
 */
@media (max-height: 820px) {
  .overlay { padding: 8px; }
  .panel--wide { padding: 14px; }
  .panel__title--hero { font-size: 26px; }
  .panel--wide .ornament { margin: 7px 0; }
  .panel--wide .ornament--small { margin: 6px 0 5px; }
  .intro__row { margin-bottom: 6px; }
  .intro__text { line-height: 1.45; }
}

@media (prefers-reduced-motion: reduce) {
  .panel { animation: none; }
  .panel__title--hero { animation: none; }
  /* Ohne Laufzyklus würden die Figuren steif über den Schirm gleiten –
     dann lieber ganz weglassen. */
  .stage { display: none; }
}

/* ------------------------------- Einleitung ------------------------------ */

.intro__heading,
.section__heading {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section__heading {
  margin-top: 14px;
  color: #a992c4;
  font-size: 10px;
}

.intro__row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.intro__icon {
  flex: 0 0 auto;
  width: 24px;
  font-size: 18px;
  line-height: 1.3;
  text-align: center;
}

.intro__text {
  margin: 0;
  color: #cdbfe0;
  font-size: 12px;
  line-height: 1.55;
}

.intro__text strong {
  color: var(--parchment);
}

.intro__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: #8f81a4;
  font-size: 11px;
}

.intro__touch {
  display: none;
}

@media (pointer: coarse) {
  .intro__touch { display: inline; }
}

.panel__subtitle {
  margin: 0 0 18px;
  color: #b6a6c9;
  font-size: 12px;
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field__label {
  display: block;
  margin-bottom: 5px;
  color: var(--gold);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.field__input {
  width: 100%;
  padding: 9px 10px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: #17111f;
  color: var(--parchment);
  font-family: var(--font);
  font-size: 14px;
}

.field__input:focus {
  outline: none;
  border-color: var(--gold);
}

.field__input--code {
  flex: 1;
  min-width: 0;
  text-transform: uppercase;
  letter-spacing: 0.3em;
}

.row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  /* Lieber umbrechen als über den Rahmen hinauslaufen: im Ergebnisfenster
     stehen drei Knöpfe nebeneinander, die nicht immer nebeneinander passen. */
  flex-wrap: wrap;
}

.row--split .button {
  flex: 0 0 auto;
}

.row.hidden {
  display: none;
}

/* Code aus dem Einladungslink: sichtbar, aber nicht mehr zu ändern. */
.field__input--locked {
  opacity: 0.7;
  cursor: default;
}

.button {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: #4b3a63;
  box-shadow: 0 3px 0 var(--shadow);
  color: var(--parchment);
  font-family: var(--font);
  font-size: 13px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.05s ease;
}

.button:hover:not(:disabled) {
  background: #5b4778;
}

.button:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--shadow);
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.button--primary {
  background: var(--green);
  color: #10230f;
}

.button--primary:hover:not(:disabled) {
  background: #6cc766;
}

.button--ghost {
  flex: 0 0 auto;
  background: transparent;
}

/* ------------------------------ Spielerliste ----------------------- */

.players {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: #17111f;
}

.players__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #2e2340;
  font-size: 13px;
}

.players__item:last-child {
  border-bottom: none;
}

.players__dot {
  width: 10px;
  height: 10px;
  border: 1px solid var(--ink);
  border-radius: 1px;
}

.players__host {
  margin-left: auto;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.1em;
}

/* Platz ist reserviert, der Spieler gerade offline. */
.players__item--offline {
  opacity: 0.55;
}

/* Noch freier Platz – zurückhaltend, aber sichtbar als Einladung. */
.players__item--empty {
  color: #6b5c81;
  font-size: 12px;
  font-style: italic;
}

.players__item--empty::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 1px dashed #574569;
  border-radius: 1px;
}

.players__badge {
  margin-left: auto;
  color: #ff9a8b;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.players__host + .players__badge {
  margin-left: 8px;
}

/* -------------------------------- Replay --------------------------- */

/* Liegt über dem Ergebnis; deshalb dunkler als die übrigen Overlays. */
.overlay--replay {
  z-index: 30;
  background: rgba(7, 5, 11, 0.9);
}

.panel--replay {
  width: auto;
  max-width: min(96vw, 900px);
  max-height: 96vh;
  display: flex;
  flex-direction: column;
}

.replay__stage {
  display: flex;
  justify-content: center;
  min-height: 0;
  margin: 8px 0;
}

/*
 * Die Übersichtskarte wird in voller Kartengröße gezeichnet und hier nur noch
 * eingepasst. Die Höhe ist der knappe Platz: Titel, Legende und Zeitleiste
 * brauchen darüber und darunter Raum, sonst rutscht die Steuerung aus dem Bild.
 * Nie größer als die Eigengröße – hochskaliert würde die Karte unscharf.
 */
.replay__canvas {
  max-width: 100%;
  max-height: calc(96vh - 190px);
  width: auto;
  height: auto;
  object-fit: contain;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: #1b1424;
}

.replay__legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  font-size: 11px;
  color: #cdbfe0;
}

.replay__legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.replay__swatch {
  width: 12px;
  height: 4px;
  border-radius: 2px;
}

.replay__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.replay__play {
  flex: 0 0 auto;
  min-width: 104px;
}

/* Der Zeitbalken nimmt den verbleibenden Platz ein. */
.replay__seek {
  flex: 1 1 160px;
  min-width: 120px;
  height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
}

.replay__time {
  flex: 0 0 auto;
  min-width: 44px;
  color: var(--gold);
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
  .replay__bar { justify-content: center; }
  .replay__play { flex: 1 1 100%; }
}

/* ---------------------------- Kartenauswahl ------------------------ */

.maps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.maps__preview {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 8px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: rgba(23, 17, 31, 0.6);
}

/* Die Minimap ist 64x64 – ganzzahlig verdoppelt bleibt sie gestochen scharf. */
.maps__image {
  flex: 0 0 auto;
  width: 128px;
  height: 128px;
  border: 2px solid #4b3a63;
  border-radius: 2px;
  image-rendering: pixelated;
  background: #17111f;
}

.maps__caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  color: #a08fb8;
  font-size: 11px;
  line-height: 1.45;
}

.maps__caption strong {
  color: var(--gold);
  font-size: 13px;
}

.maps__biomes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
}

/* Die Farben entsprechen den Vierteln im Spiel – dieselbe Zuordnung wie im Funk. */
.maps__biome {
  padding: 1px 5px;
  border-radius: 2px;
  background: #2e2340;
  color: #cdbfe0;
  font-size: 10px;
  white-space: nowrap;
}

.maps__biome--n { box-shadow: inset 2px 0 0 #2f7fd6; }
.maps__biome--e { box-shadow: inset 2px 0 0 #d94236; }
.maps__biome--s { box-shadow: inset 2px 0 0 #f2d024; }
.maps__biome--w { box-shadow: inset 2px 0 0 #4bbf3a; }

.maps__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.maps__choice {
  flex: 1 1 auto;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  border-bottom-width: 3px;
  border-radius: 3px;
  background: #3a2c4e;
  color: var(--parchment);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}

.maps__choice:hover:not(:disabled) {
  background: #483860;
}

.maps__choice--active {
  border-color: var(--gold);
  background: #5c4880;
  color: #fff;
}

.maps__choice:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Auf schmalen Schirmen die Vorschau unter die Beschreibung legen. */
@media (max-width: 420px) {
  .maps__preview { flex-direction: column; align-items: center; text-align: center; }
  .maps__biomes { justify-content: center; }
}

/* ------------------------------ Einladung -------------------------- */

.row--invite {
  gap: 6px;
  margin-bottom: 14px;
}

.field__input--invite {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: #b6a6c9;
}

.button--copied {
  background: var(--green);
  color: #10230f;
}

/* ------------------------- Gesichtet-Warnung ----------------------- */

.spotted {
  position: fixed;
  top: 92px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 18px;
  border: 3px solid #7a1d17;
  border-radius: 4px;
  background: rgba(200, 69, 60, 0.92);
  box-shadow: 0 3px 0 var(--shadow);
  color: #fff3ef;
  font-size: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
  animation: spotted-pulse 0.7s ease-in-out infinite;
}

.spotted.hidden {
  display: none;
}

@keyframes spotted-pulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.06); }
}

/* --------------------------- Touch-Steuerung ----------------------- */

.touch {
  position: fixed;
  inset: 0;
  z-index: 5;
  touch-action: none;
}

.touch.hidden {
  display: none;
}

.stick {
  position: absolute;
  width: 108px;
  height: 108px;
  margin: -54px 0 0 -54px;
  border: 3px solid rgba(27, 20, 36, 0.5);
  border-radius: 50%;
  background: rgba(244, 233, 216, 0.14);
  opacity: 0;
  transition: opacity 0.12s ease;
  pointer-events: none;
}

.stick--active {
  opacity: 1;
}

.stick__knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: rgba(244, 233, 216, 0.75);
}

/* --------------------------- Hinweise & A11y ----------------------- */

.hint {
  margin: 12px 0 0;
  color: #8f81a4;
  font-size: 11px;
  line-height: 1.6;
}

.hint kbd,
.intro__controls kbd {
  display: inline-block;
  min-width: 18px;
  margin: 0 1px;
  padding: 1px 4px;
  border: 1px solid #4b3a63;
  border-bottom-width: 2px;
  border-radius: 3px;
  background: #17111f;
  color: var(--parchment);
  font-family: inherit;
  font-size: 10px;
  text-align: center;
}

.hint__touch {
  display: none;
}

@media (pointer: coarse) {
  .hint__touch { display: inline; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Sichtbarer Fokus für Tastaturbedienung. */
.button:focus-visible,
.field__input:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* -------------------------------- Meldungen ------------------------ */

.message {
  min-height: 16px;
  margin: 4px 0 0;
  color: #ff9a8b;
  font-size: 12px;
}

.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 9px 16px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: rgba(27, 20, 36, 0.92);
  box-shadow: 0 3px 0 var(--shadow);
  font-size: 12px;
}
