/* Ton-Fenster, Radio-Fenster und Radio-Anzeige (Paket E). Nutzt die Farben aus insel.css. */

/* ---------- Lautsprecher-Knopf: Zustand ---------- */
.tonknopf[data-stumm="1"] { color: var(--leise); }
.tonknopf[data-stumm="1"] .wellen { display: none; }
.tonknopf[data-stumm="1"] .strich { display: inline; color: var(--aus); }
.kopf { position: relative; }

/* ---------- Gemeinsames Fenster-Aussehen ---------- */
.ton-fenster, .radio-fenster { position: absolute; z-index: 30; right: 0; top: calc(100% + 10px); width: min(380px, 100%); max-height: calc(100vh - 110px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--brett); border: 3px solid var(--kante); box-shadow: inset 0 0 0 2px var(--brett2), 6px 6px 0 rgba(0,0,0,.4); padding: 14px 16px 12px; }
.ton-hinten { position: fixed; inset: 0; z-index: 29; background: transparent; }
.ton-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.ton-kopf h2 { font: 700 24px/1 var(--pixel); margin: 0; }
.ton-zu { width: 44px; height: 44px; font: 700 26px/1 var(--pixel); color: var(--text); background: var(--kante); border: 2px solid var(--brett2); cursor: pointer; padding: 0; }
.ton-zu:hover { border-color: var(--sonne); }
.ton-gruppe { padding: 10px 0; border-top: 2px solid var(--kante); }
.ton-gruppe:first-of-type { border-top: 0; }
.ton-fenster :is(button, input):focus-visible, .radio-fenster :is(button, input):focus-visible { outline: 3px solid var(--sonne); outline-offset: 2px; }

/* ---------- Regler ---------- */
.ton-zeile { display: grid; grid-template-columns: 96px 1fr 48px; align-items: center; gap: 10px; }
.ton-titel { font: 600 17px var(--pixel); }
.ton-prozent { font: 600 15px var(--pixel); color: var(--sonne); text-align: right; font-variant-numeric: tabular-nums; }
.ton-regler { -webkit-appearance: none; appearance: none; width: 100%; height: 40px; margin: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.ton-regler::-webkit-slider-runnable-track { height: 10px; background: var(--kante); border: 2px solid var(--brett2); }
.ton-regler::-moz-range-track { height: 6px; background: var(--kante); border: 2px solid var(--brett2); }
.ton-regler::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 28px; margin-top: -11px; background: var(--sonne); border: 3px solid var(--kante); box-shadow: 2px 2px 0 rgba(0,0,0,.4); }
.ton-regler::-moz-range-thumb { width: 16px; height: 22px; background: var(--sonne); border: 3px solid var(--kante); border-radius: 0; box-shadow: 2px 2px 0 rgba(0,0,0,.4); }
.ton-regler:hover::-webkit-slider-thumb { background: #ffe07a; }
.ton-fenster.ton-aus .ton-regler { opacity: .55; }

/* ---------- Häkchen ---------- */
.ton-hakenliste { display: flex; flex-direction: column; gap: 0; margin: 2px 0 0 0; padding-left: 106px; }
.ton-haken { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; font-size: 14.5px; line-height: 1.25; }
.ton-haken input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--sonne); cursor: pointer; }
.ton-haken small { color: var(--leise); font-size: 12.5px; }

/* ---------- sonstiges im Ton-Fenster ---------- */
.ton-stumm { display: block; width: 100%; margin-top: 4px; min-height: 40px; font-size: 15px; color: var(--text); background: var(--kante); box-shadow: inset 0 0 0 2px var(--brett2); }
.ton-fenster.ton-aus .ton-stumm { color: var(--kante); background: var(--sonne); box-shadow: 2px 2px 0 rgba(0,0,0,.35); }
.ton-radio { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; padding-left: 106px; }
.ton-radio-info { flex: 1 1 100%; font-size: 14px; color: var(--leise); }
.knopf.klein { min-height: 36px; }
.knopf.ton-leise { color: var(--text); background: var(--kante); box-shadow: inset 0 0 0 2px var(--brett2); }
.ton-fuss { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 2px solid var(--kante); padding-top: 8px; }
.ton-tipp { margin: 0; font-size: 12.5px; color: var(--leise); }
.ton-reset { font: 14px var(--body); color: var(--leise); background: none; border: 0; text-decoration: underline; cursor: pointer; min-height: 36px; padding: 0 4px; }
.ton-reset:hover { color: var(--text); }
.ton-schild { position: absolute; right: 56px; top: 8px; z-index: 31; font: 15px var(--pixel); background: var(--brett); border: 2px solid var(--sonne); padding: 4px 10px; white-space: nowrap; pointer-events: none; }

/* ---------- Handy: Leiste von unten ---------- */
@media (max-width: 600px) {
  .ton-hinten { background: rgba(8, 18, 30, .55); }
  .ton-fenster, .radio-fenster { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 88vh; max-height: 88dvh; padding-bottom: calc(14px + env(safe-area-inset-bottom));
    border-width: 3px 0 0 0; box-shadow: inset 0 2px 0 var(--brett2), 0 -6px 0 rgba(0,0,0,.35); }
  .ton-zeile { grid-template-columns: 94px 1fr 44px; gap: 6px; }
  .ton-hakenliste, .ton-radio { padding-left: 0; }
  .ton-gruppe { padding: 6px 0; }
  .ton-haken { min-height: 38px; }
  .ton-tipp { display: none; }
  .ton-fuss { justify-content: flex-end; }
}

/* ---------- Radio-Fenster ---------- */
.radio-fenster { position: fixed; right: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 40px); z-index: 40; }
.radio-hinten { position: fixed; inset: 0; z-index: 39; background: rgba(8, 18, 30, .55); }
/* Handy: Radio als Bottom-Sheet (steht nach der Desktop-Regel, damit sie nicht überstimmt wird) */
@media (max-width: 600px) {
  .radio-fenster { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: auto; max-height: 88vh; max-height: 88dvh; }
}
.radio-anzeige { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; padding: 8px 10px; background: #0f1d12; border: 2px solid var(--kante); font: 17px var(--pixel); color: #8be58f; min-height: 44px; }
.radio-anzeige.aus { color: #4f6b52; }
.radio-anzeige .rnoten { margin-left: auto; letter-spacing: 3px; }
.radio-sender { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.radio-karte { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 8px 10px; min-height: 60px; color: var(--text); background: var(--brett2); border: 3px solid var(--kante); cursor: pointer; font: inherit; }
.radio-karte:hover { border-color: #7a5a3f; }
.radio-karte[aria-pressed="true"] { border-color: var(--sonne); background: #5a4130; }
.radio-karte canvas { width: 44px; height: 44px; image-rendering: pixelated; background: var(--kante); display: block; }
.radio-karte b { display: block; font: 600 18px/1.1 var(--pixel); }
.radio-karte span { display: block; font-size: 13.5px; color: var(--leise); line-height: 1.3; margin-top: 2px; }
.radio-steuer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.radio-steuer .knopf { min-height: 44px; font-size: 16px; padding-inline: 16px; }
.radio-steuer .ton-zeile { flex: 1 1 100%; grid-template-columns: 104px 1fr 48px; margin-top: 4px; }

/* ---------- Radio-Sprite: Tooltip bei Figuren ---------- */
@media (prefers-reduced-motion: reduce) { .ton-regler { scroll-behavior: auto; } }
