/* Klangmauer und Klangbubble – Pixel-Arcade mit Glockenspiel-Tönen. Schriften liegen auf dieser Seite (keine Google-Server). */
@font-face { font-family: "Jersey 10"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/jersey-10-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jersey 10"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/jersey-10-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Pixelify Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/pixelify-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Pixelify Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/pixelify-sans-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Pixelify Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/pixelify-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Pixelify Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/pixelify-sans-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Pixelify Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/pixelify-sans-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Pixelify Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/pixelify-sans-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Silkscreen"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/silkscreen-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Silkscreen"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/silkscreen-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Silkscreen"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/silkscreen-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Silkscreen"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/silkscreen-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

  /* Layout: eine Spalte – Pixel-Logo und Knöpfe, Arcade-Punkteleiste, Spielfeld als Röhrenbildschirm, darunter die Extras-Leiste.
     Pixel-Art: harte Kanten, keine Rundungen, Fasen aus zwei Tönen, Schatten ohne Unschärfe. Bewusst nur ein dunkles Erscheinungsbild. */
  :root {
    --ink-0: #0d0b1a;
    --ink-1: #17142b;
    --ink-2: #252142;
    --ink-3: #3b3561;
    --ink-4: #6c6699;
    --ink-5: #aaa6cc;
    --paper: #f4f1e8;
    --wood: #e8c9a0;
    --wood-hi: #fff0d6;
    --wood-lo: #a8805a;
    --world: #9b5de5;

    /* Glockenspiel-Stäbe: Reihe 1 (oben, hoch) bis Reihe 8 (unten, tief), je Licht, Grundton, Schatten */
    --bar-1: #9b5de5; --bar-1-hi: #d4b2ff; --bar-1-lo: #5b2f8f;
    --bar-2: #5b7cfa; --bar-2-hi: #b3c4ff; --bar-2-lo: #2e3fa3;
    --bar-3: #2ec4f0; --bar-3-hi: #a6efff; --bar-3-lo: #1673a3;
    --bar-4: #2ed8a0; --bar-4-hi: #a3f7d6; --bar-4-lo: #157a5c;
    --bar-5: #9ee34a; --bar-5-hi: #e0ffb0; --bar-5-lo: #4f7d1a;
    --bar-6: #ffcd3c; --bar-6-hi: #fff2b3; --bar-6-lo: #a86a10;
    --bar-7: #ff8a3d; --bar-7-hi: #ffd0a8; --bar-7-lo: #a13d16;
    --bar-8: #ff4f7b; --bar-8-hi: #ffb3c6; --bar-8-lo: #9c1f45;

    --gold: #ffcd3c; --gold-hi: #fff2b3; --gold-lo: #a86a10;
    --steel: #8d92ad; --steel-hi: #dfe3f2; --steel-lo: #4a4e66;
    --tnt: #ff5a36; --tnt-dark: #4a0e1a;
    --crystal: #9fe8ff; --crystal-lo: #3d8fb8;
    --trap: #ff3d5e;
    --found: #2ed8a0;

    /* Extras */
    --cap-b: #ffcd3c;  --cap-m: #2ec4f0;  --cap-l: #2ed8a0;  --cap-f: #ff7a5c;
    --cap-p: #c48bff;  --cap-k: #9ee34a;  --cap-s: #ff63d8;  --cap-n: #8c9cff;
    --cap-x: #ff8a3d;  --cap-z: #fff07a;  --cap-r: #ff8fae;  --cap-d: #7ff0e0;
    --cap-v: #9ad7ff;  --cap-mg: #e3a8ff; --cap-h: #ffb3c7;  --cap-zw: #a8b4ff;
    --cap-o: #ffe6bf;  --cap-a: #d6f58a;  --cap-pt: #ffd45c; --cap-q: #f4f1e8;
    --cap-w: #7cf5a4;  --cap-sw: #6ff7ff; --cap-ra: #ff9f43; --cap-su: #b0ff6b;
    --cap-ka: #d0d4e8; --cap-rb: #ff8fe0; --cap-sl: #9d7bff; --cap-br: #8fd3ff;
    --cap-fr: #bfefff; --cap-sh: #7dffcf; --cap-x5: #ffd166; --cap-kl: #5ee67a;
    --cap-be: #ff7ad9;

    --display: "Jersey 10", "Silkscreen", ui-monospace, Menlo, Consolas, monospace;
    --ui: "Pixelify Sans", ui-monospace, Menlo, Consolas, monospace;
    --label: "Silkscreen", ui-monospace, Menlo, Consolas, monospace;
    --notch: polygon(4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px), 0 4px, 4px 4px);
    --notch-s: polygon(2px 0, calc(100% - 2px) 0, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 0 calc(100% - 2px), 0 2px);
    color-scheme: dark;
  }

  html { height: 100%; box-sizing: border-box; background: var(--ink-1); }
  [hidden] { display: none !important; }
  *, *::before, *::after { box-sizing: inherit; }

  body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    color: var(--paper);
    background-color: var(--ink-1);
    background-image: radial-gradient(var(--ink-2) 1px, transparent 1.5px);
    background-size: 6px 6px;
    font-family: var(--ui);
    font-size: 15px;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    padding-block: 12px;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: none;
  }

  .app {
    height: 100%;
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  /* Kopfzeile */
  header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px 12px;
    flex-wrap: wrap;
  }
  .brand { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
  .logo {
    margin: 0;
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(38px, 9vw, 52px);
    line-height: 0.8;
    letter-spacing: 1px;
    display: flex;
  }
  .logo span { color: var(--c); text-shadow: 3px 3px 0 var(--ink-0); }
  .logo span:nth-child(odd) { transform: translateY(-2px); }
  .tagline {
    margin: 0;
    font-family: var(--label);
    font-size: 10px;
    letter-spacing: 0.06em;
    color: var(--ink-5);
    text-transform: uppercase;
  }

  .controls { display: flex; gap: 6px; flex-wrap: wrap; }
  button {
    font-family: var(--label);
    font-weight: 400;
    font-size: 11px;
    line-height: 1;
    text-transform: uppercase;
    color: var(--paper);
    background: var(--ink-2);
    border: 2px solid var(--ink-0);
    border-radius: 0;
    box-shadow: inset 2px 2px 0 var(--ink-3), inset -2px -2px 0 var(--ink-1), 0 3px 0 var(--ink-0);
    padding: 7px 10px 6px;
    cursor: pointer;
    position: relative;
  }
  button:hover { background: var(--ink-3); box-shadow: inset 2px 2px 0 var(--ink-4), inset -2px -2px 0 var(--ink-2), 0 3px 0 var(--ink-0); }
  button:active { transform: translateY(2px); box-shadow: inset 2px 2px 0 var(--ink-3), inset -2px -2px 0 var(--ink-1), 0 1px 0 var(--ink-0); }
  button:focus-visible { outline: 2px dashed var(--bar-3); outline-offset: 3px; }
  button:disabled { opacity: 0.4; cursor: default; transform: none; }
  button[aria-pressed]::before {
    content: "";
    display: inline-block;
    width: 6px; height: 6px;
    margin-right: 6px;
    vertical-align: 1px;
    background: var(--bar-4);
    box-shadow: 0 0 0 1px var(--ink-0);
  }
  button[aria-pressed="false"]::before { background: var(--ink-0); box-shadow: 0 0 0 1px var(--ink-4); }
  button[aria-pressed="false"] { color: var(--ink-5); }

  /* Punkteleiste */
  .hud {
    display: grid;
    grid-template-columns: 1.3fr 1.3fr 0.8fr 1fr 0.8fr;
    background: var(--ink-0);
    border: 2px solid var(--ink-0);
    box-shadow: inset 0 0 0 2px var(--ink-3);
    clip-path: var(--notch-s);
  }
  .stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 9px 5px;
    min-width: 0;
  }
  .stat + .stat { border-left: 2px dotted var(--ink-3); }
  .stat .k {
    font-family: var(--label);
    font-size: 9px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-4);
  }
  .stat .v {
    font-family: var(--display);
    font-size: clamp(19px, 5.4vw, 30px);
    line-height: 0.85;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    color: var(--paper);
  }
  #hud-score { color: var(--bar-6); }
  #hud-combo[data-hot="1"] { color: var(--bar-8); }
  .lives { display: flex; align-items: center; gap: 2px; height: 0.85em; }
  .lives svg { flex: none; display: block; }
  .lives span { font-size: 0.8em; }

  /* Spielfeld als Röhrenbildschirm */
  .stage {
    flex: 1;
    min-height: 0;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }
  .board {
    position: relative;
    max-width: 100%;
    background: var(--ink-0);
    box-shadow: 0 0 0 3px var(--ink-0), 0 0 0 5px var(--world), 0 0 0 8px var(--ink-0);
    border-radius: 3px;
    overflow: hidden;
    cursor: none;
  }
  .board.show-cursor { cursor: default; }
  .board::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px);
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.55);
  }
  canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; }

  .window {
    background: var(--ink-0);
    border: 3px solid var(--paper);
    box-shadow: inset 0 0 0 3px var(--ink-3);
    clip-path: var(--notch);
  }
  .overlay {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 15%;
    transform: translateX(-50%);
    width: min(88%, 360px);
    padding: 18px 20px 22px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: default;
  }
  .overlay h2 {
    margin: 0;
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(32px, 8vw, 44px);
    line-height: 0.85;
    color: var(--gold);
    text-shadow: 3px 3px 0 var(--bar-8-lo);
    text-wrap: balance;
  }
  .overlay p {
    margin: 0;
    color: var(--ink-5);
    font-size: 15px;
    line-height: 1.4;
    max-width: 32ch;
  }
  .overlay p strong { color: var(--paper); font-weight: 600; }
  .ov-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 12px; margin-top: 6px; }
  .overlay .primary {
    margin-top: 0;
    font-size: 13px;
    padding: 10px 16px 9px;
    color: var(--ink-0);
    background: var(--gold);
    box-shadow: inset 2px 2px 0 var(--gold-hi), inset -2px -2px 0 var(--gold-lo), 0 4px 0 var(--ink-0);
  }
  .overlay .primary:hover { background: var(--gold-hi); }
  .overlay .primary:active { box-shadow: inset 2px 2px 0 var(--gold-hi), inset -2px -2px 0 var(--gold-lo), 0 1px 0 var(--ink-0); }
  .overlay .primary::after { content: " ▸"; }

  /* Erfolgsmeldung */
  .toast {
    position: absolute;
    z-index: 4;
    top: 8px;
    left: 50%;
    width: min(86%, 330px);
    transform: translate(-50%, -180%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 14px 11px;
    border-color: var(--gold);
    text-align: center;
    pointer-events: none;
    transition: transform 0.3s steps(6, end);
  }
  .toast.show { transform: translate(-50%, 0); }
  .toast-k { font-family: var(--label); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
  .toast-name { font-family: var(--display); font-size: 26px; line-height: 0.85; }
  .toast-desc { font-size: 13px; color: var(--ink-5); line-height: 1.3; }

  /* Übersicht */
  .panel {
    position: absolute;
    inset: 4px;
    z-index: 5;
    overflow: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: default;
    user-select: text;
    -webkit-user-select: text;
    border-color: var(--ink-4);
    box-shadow: inset 0 0 0 3px var(--ink-2);
  }
  .panel-head {
    position: sticky;
    top: 0;
    z-index: 1;
    margin: 0 -16px;
    padding: 16px 16px 12px;
    background: var(--ink-0);
    border-bottom: 2px dotted var(--ink-3);
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .panel-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
  .panel-top h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 0.85; color: var(--gold); text-shadow: 2px 2px 0 var(--bar-8-lo); }
  .panel-top p { margin: 6px 0 0; color: var(--ink-5); font-size: 14px; }
  .panel-top p strong { color: var(--found); font-weight: 700; }
  .tabs { display: flex; gap: 6px; flex-wrap: wrap; }
  .tabs button { padding: 6px 9px 5px; font-size: 10px; }
  .tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink-0); box-shadow: inset 2px 2px 0 #ffffff, inset -2px -2px 0 var(--ink-5), 0 3px 0 var(--ink-0); }
  .tabpanel { display: flex; flex-direction: column; gap: 12px; }
  .panel h3 {
    margin: 6px 0 0;
    font-family: var(--label);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--paper);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    align-items: baseline;
  }
  .panel h3 span { font-family: var(--ui); letter-spacing: 0; text-transform: none; color: var(--ink-4); font-size: 13px; }
  .note { margin: 0; color: var(--ink-5); font-size: 14px; line-height: 1.4; }
  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
    gap: 8px;
  }
  .item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 11px 10px;
    background: var(--ink-1);
    border: 2px solid var(--ink-2);
    min-width: 0;
  }
  .item .cap, .item .swatch { margin-top: 2px; }
  .item-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .item .name { font-weight: 600; font-size: 15px; line-height: 1.2; }
  .item .desc { color: var(--ink-5); font-size: 13px; line-height: 1.35; }
  .item.found { border-color: var(--ink-3); }
  .item.found .name::after { content: " ✓"; color: var(--found); }
  .item.locked { opacity: 0.55; }

  .swatch {
    flex: none;
    width: 34px;
    height: 14px;
    display: grid;
    place-items: center;
    font-family: var(--label);
    font-size: 9px;
    color: var(--ink-0);
    box-shadow: inset 0 2px 0 var(--hi, transparent), inset 0 -2px 0 var(--lo, transparent);
  }
  .sw-normal { background: var(--bar-4); --hi: var(--bar-4-hi); --lo: var(--bar-4-lo); }
  .sw-hart { background: var(--bar-3-lo); --hi: var(--bar-3); --lo: var(--ink-0); }
  .sw-kristall { background: repeating-linear-gradient(135deg, var(--crystal) 0 4px, #ffffff 4px 6px); --lo: var(--crystal-lo); }
  .sw-stahl { background: var(--steel); --hi: var(--steel-hi); --lo: var(--steel-lo); }
  .sw-tnt { background: repeating-linear-gradient(135deg, var(--tnt) 0 4px, var(--tnt-dark) 4px 8px); }
  .sw-gold { background: var(--gold); --hi: var(--gold-hi); --lo: var(--gold-lo); }
  .sw-move { background: var(--bar-2); --hi: var(--bar-2-hi); --lo: var(--bar-2-lo); }
  .sw-geist { background: transparent; box-shadow: none; outline: 2px dotted var(--bar-1-hi); outline-offset: -2px; }

  /* Weltauswahl */
  .world-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
    gap: 10px;
  }
  .world-card { display: flex; flex-direction: column; min-width: 0; background: var(--ink-1); border: 2px solid var(--ink-2); }
  .world-card.open { border-color: var(--wc); }
  .world-head { all: unset; box-sizing: border-box; display: flex; flex-direction: column; cursor: pointer; }
  .world-head:focus-visible { outline: 2px dashed var(--bar-3); outline-offset: 2px; }
  .world-head:hover .world-name { color: var(--wc); }
  .world-thumb { display: block; width: 100%; height: auto; aspect-ratio: 200 / 110; image-rendering: pixelated; border-bottom: 2px solid var(--ink-2); }
  .world-meta { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px 10px; }
  .world-no { font-family: var(--label); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--wc); }
  .world-name { font-family: var(--display); font-size: 30px; line-height: 0.85; color: var(--paper); }
  .world-status { font-size: 13px; line-height: 1.3; color: var(--ink-5); }
  .world-status.done { color: var(--found); }
  .world-card.locked .world-head { cursor: not-allowed; }
  .world-card.locked .world-thumb { filter: grayscale(1) brightness(0.45); }
  .world-card.locked .world-name, .world-card.locked .world-no { color: var(--ink-4); }
  .world-choice { display: flex; flex-direction: column; gap: 9px; padding: 0 10px 12px; }
  .world-choice button { width: 100%; text-align: left; }
  .world-choice .go { color: var(--ink-0); background: var(--gold); box-shadow: inset 2px 2px 0 var(--gold-hi), inset -2px -2px 0 var(--gold-lo), 0 3px 0 var(--ink-0); }
  .world-choice .go:hover { background: var(--gold-hi); }
  .world-choice .boss { background: var(--bar-8-lo); box-shadow: inset 2px 2px 0 var(--bar-8), inset -2px -2px 0 var(--ink-0), 0 3px 0 var(--ink-0); }
  .world-choice .boss:hover { background: var(--bar-8); }

  .world-head.static { cursor: default; }
  .game-card .world-name { font-size: 38px; }
  .game-card .world-status { font-size: 14px; }

  /* Blasen in der Übersicht */
  .bub {
    flex: none;
    width: 18px; height: 18px;
    margin: 1px 8px 0 6px;
    border-radius: 50%;
    background: var(--c, var(--bar-8));
    box-shadow: inset -3px -3px 0 rgba(13, 11, 26, 0.35), inset 3px 3px 0 rgba(255, 255, 255, 0.35), 0 0 0 2px var(--ink-0);
  }
  .bub.gold { box-shadow: inset -3px -3px 0 rgba(13, 11, 26, 0.35), inset 3px 3px 0 rgba(255, 255, 255, 0.35), 0 0 0 2px var(--gold); }
  .bub.ice { background: repeating-linear-gradient(135deg, var(--crystal) 0 3px, var(--c) 3px 6px); box-shadow: 0 0 0 2px var(--crystal); }
  .bub.steel { background: var(--steel); }
  .bub.bomb { background: var(--ink-3); box-shadow: inset -3px -3px 0 var(--ink-1), inset 0 0 0 5px var(--ink-3), inset 0 0 0 9px var(--tnt), 0 0 0 2px var(--ink-0); }
  .bub.rainbow { background: conic-gradient(var(--bar-8), var(--bar-6), var(--bar-4), var(--bar-3), var(--bar-1), var(--bar-8)); }
  .bub.blitz { background: var(--gold); box-shadow: inset -3px -3px 0 var(--gold-lo), inset 3px 3px 0 var(--gold-hi), 0 0 0 2px var(--ink-0); }

  /* Kapseln */
  .caps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px 8px;
  }
  .cap {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 30px; height: 15px;
    background: var(--c);
    color: var(--ink-0);
    font-family: var(--label);
    font-weight: 700;
    font-size: 9px;
    line-height: 1;
    clip-path: var(--notch-s);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), inset 0 -2px 0 rgba(13, 11, 26, 0.3);
  }
  .cap.bad { background: var(--ink-0); color: var(--c); box-shadow: inset 0 0 0 2px var(--c); }
  .cap.rainbow { background: linear-gradient(90deg, var(--bar-8) 0 20%, var(--bar-6) 20% 40%, var(--bar-4) 40% 60%, var(--bar-3) 60% 80%, var(--bar-1) 80%); }

  footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    color: var(--ink-5);
    font-size: 13px;
  }
  .link {
    font-family: var(--label);
    font-size: 10px;
    padding: 5px 8px 4px;
  }
  .keys { margin: 0; text-align: center; font-size: 13px; }
  kbd {
    font-family: var(--label);
    font-size: 9px;
    color: var(--paper);
    background: var(--ink-2);
    border: 2px solid var(--ink-0);
    box-shadow: 0 2px 0 var(--ink-0);
    padding: 1px 4px 0;
    margin: 0 1px;
  }

  @media (max-width: 480px) {
    .keys { display: none; }
    .controls button { padding: 6px 8px 5px; font-size: 10px; }
    .tagline { font-size: 9px; }
  }
  @media (max-height: 640px) {
    footer .caps, footer .keys { display: none; }
    .tagline { display: none; }
  }
  /* Handy quer: links Logo, Knöpfe und Punkte, rechts das Spielfeld in voller Höhe */
  @media (orientation: landscape) and (max-height: 500px) {
    .app {
      max-width: none;
      display: grid; grid-template-columns: minmax(250px, 36%) minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; column-gap: 14px;
    }
    header { grid-column: 1; grid-row: 1; }
    .hud { grid-column: 1; grid-row: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    footer { grid-column: 1; grid-row: 4; align-items: flex-start; }
    .stage { grid-column: 2; grid-row: 1 / span 4; }
    .logo { font-size: 34px; }
    .controls button { padding: 6px 8px 5px; font-size: 10px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .toast { transition: none; }
  }

  /* ---------- hostwebhub: Impressum, Datenschutz, Home-Knopf ---------- */
  .legal { margin: 0; display: flex; gap: 14px; justify-content: center; }
  .legal-link {
    font: inherit; font-family: var(--label); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--ink-5); background: none; border: 0; padding: 4px 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
  }
  .legal-link:hover { color: var(--paper); }
  .legal-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
  .noscript { position: fixed; inset: auto 0 40% 0; text-align: center; font-family: var(--display); font-size: 28px; color: var(--gold); }
  dialog.doc {
    width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 48px); overflow: auto; padding: 22px 22px 26px;
    color: var(--paper); background: var(--ink-1); border: 0;
    clip-path: var(--notch); box-shadow: inset 0 0 0 3px var(--ink-3);
  }
  dialog.doc::backdrop { background: rgba(13, 11, 26, 0.78); }
  dialog.doc h2 { margin: 0 0 8px; font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 0.9; color: var(--gold); }
  dialog.doc h3 { margin: 18px 0 4px; font-family: var(--label); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-5); font-weight: 400; }
  dialog.doc p { margin: 0 0 8px; line-height: 1.45; }
  dialog.doc a { color: var(--gold); }
  .doc-close {
    position: sticky; top: 0; float: right; margin: -8px -8px 0 0; width: 40px; height: 40px;
    font: inherit; font-size: 26px; line-height: 1; color: var(--paper); background: var(--ink-2); border: 0; cursor: pointer;
    clip-path: var(--notch-s);
  }
  .doc-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
  /* Home-Knopf: am Handy oben rechts neben dem Logo, damit er nichts im Spielfeld verdeckt */
  @media (max-width: 760px) {
    :root { --hwh-top: calc(8px + env(safe-area-inset-top, 0px)); --hwh-bottom-edge: auto; --hwh-left: calc(100vw - 52px - env(safe-area-inset-right, 0px)); --hwh-size: 40px; --hwh-away: calc(-100% - 28px); }
  }
  @media (orientation: landscape) and (max-height: 500px) {
    :root { --hwh-top: auto; --hwh-bottom-edge: calc(10px + env(safe-area-inset-bottom, 0px)); --hwh-left: calc(100vw - 52px - env(safe-area-inset-right, 0px)); --hwh-size: 40px; }
  }
