html, body { width: 100%; height: 100%; margin: 0; touch-action: none; overscroll-behavior: none; overflow: hidden; }
body.theme-dark { background: #05070d; } body.theme-light { background: #eceef2; }
@supports (-moz-appearance: none) { * { scrollbar-width: thin; } body.theme-light { scrollbar-color: rgba(0,0,0,0.15) transparent; } body.theme-dark { scrollbar-color: rgba(255,255,255,0.15) transparent; } }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-track { background: transparent; margin: 10px 0; }
.panel::-webkit-scrollbar-track { margin: 15px 0; } ::-webkit-scrollbar-thumb { border-radius: 4px; }
::-webkit-scrollbar-button, *::-webkit-scrollbar-button { display: none; height: 0; width: 0; }
body.theme-light ::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,0.15); } body.theme-light ::-webkit-scrollbar-thumb:hover { background-color: rgba(0,0,0,0.30); }
body.theme-dark ::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,0.15); } body.theme-dark ::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,0.30); }
html::-webkit-scrollbar-thumb { background-color: rgba(127,127,160,0.35); }

/* Leuchttisch: Licht von hinten, feines Raster, Lichtfleck folgt dem Strahl */
#tisch { position: fixed; inset: 0; z-index: 0; --sx: 50%; }
body.theme-dark #tisch { background: radial-gradient(ellipse 62% 56% at var(--sx) 46%, color-mix(in srgb, var(--pal-medium) 34%, #0d1324) 0%, color-mix(in srgb, var(--pal-medium) 10%, #090d19) 52%, #04060b 100%); }
body.theme-light #tisch { background: radial-gradient(ellipse 62% 60% at var(--sx) 46%, #ffffff 0%, #f4f5f8 55%, #e3e6ec 100%); }
#tisch::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--raster) 1px, transparent 1px), linear-gradient(90deg, var(--raster) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 46%, #000 0%, transparent 100%); mask-image: radial-gradient(ellipse 70% 70% at 50% 46%, #000 0%, transparent 100%); }
body.theme-dark #tisch { --raster: rgba(255,255,255,.035); } body.theme-light #tisch { --raster: rgba(20,26,44,.05); }
#strahl { position: fixed; top: 0; bottom: 0; left: 0; width: 0; z-index: 1; pointer-events: none; will-change: transform; }
#strahl i { position: absolute; top: 0; bottom: 0; left: -170px; width: 340px; display: block; opacity: var(--a, 0); background: linear-gradient(90deg, transparent 0, color-mix(in srgb, var(--pal-soft) 16%, transparent) 30%, color-mix(in srgb, var(--pal-soft) 46%, transparent) 49%, var(--strahl-kern) 50%, color-mix(in srgb, var(--pal-soft) 46%, transparent) 51%, color-mix(in srgb, var(--pal-soft) 16%, transparent) 70%, transparent 100%); }
body.theme-dark #strahl { --strahl-kern: rgba(235,240,255,.9); } body.theme-light #strahl { --strahl-kern: var(--pal-accent); }
#tafel { position: fixed; inset: 0; z-index: 2; touch-action: none; }

#modi { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 15; display: flex; gap: 3px; padding: 4px; border-radius: 14px; max-width: calc(100vw - 16px); box-sizing: border-box; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: var(--vk-panel-bg, rgba(10,13,26,.8)); }
#modi button { border: 0; padding: 7px 13px; border-radius: 10px; font: inherit; font-size: 12.5px; font-weight: 650; line-height: 1.15; cursor: pointer; color: inherit; background: transparent; min-width: 0; }
body.theme-dark #modi { color: #e6e8f2; } body.theme-light #modi { color: #1e293b; }
body.theme-dark #modi button:hover { background: rgba(255,255,255,.1); } body.theme-light #modi button:hover { background: rgba(15,23,42,.08); }
body.theme-dark #modi button.on, body.theme-light #modi button.on { background: var(--vk-ui-active-bg); color: var(--vk-ui-active-ink); }

#zeile { position: fixed; z-index: 3; left: 0; top: 0; box-sizing: border-box; padding: 0 18px; text-align: center; pointer-events: none; transition: opacity .35s; }
#z-lab { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .62; margin-bottom: 3px; }
#z-text { display: block; font-size: 16.5px; line-height: 1.35; font-weight: 550; }
#z-quelle { display: block; font-size: 11.5px; opacity: .62; margin-top: 3px; }
body.theme-dark #zeile { color: #e6e8f2; } body.theme-light #zeile { color: #1e293b; }
#zeile.falsch #z-text { opacity: .72; font-style: italic; }

@media (min-width: 769px) {
  #panel-werk { left: 16px; top: 16px; width: 272px; max-height: calc(100vh - 100px); }
  #panel-satz { right: 16px; top: 16px; width: 290px; max-height: calc(100vh - 100px); }
  #panel-wort { right: 16px; bottom: 78px; width: 272px; }
  #panel-info { left: 50%; right: auto; bottom: 78px; transform: translateX(-50%); width: 500px; }
}
.panel .hint { font-size: 12.5px; line-height: 1.42; margin: 0 0 8px; }
.lab2 { font-size: 11px; font-weight: 700; opacity: .62; margin: 10px 0 3px; }
.sum { display: flex; gap: 10px; margin: 2px 0 4px; } .sum div { flex: 1; min-width: 0; } .sum b { display: block; font-size: 19px; font-weight: 780; font-variant-numeric: tabular-nums; white-space: nowrap; } .sum span { display: block; font-size: 10.5px; line-height: 1.2; opacity: .72; }
#w-scan, #w-umstellen, #w-pruefen { display: none; } #panel-werk[data-m="scan"] #w-scan, #panel-werk[data-m="umstellen"] #w-umstellen, #panel-werk[data-m="pruefen"] #w-pruefen { display: block; }

.sch { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: transparent; color: inherit; font: inherit; font-size: 12.5px; font-weight: 600; text-align: left; padding: 6px 7px; border-radius: 9px; cursor: pointer; line-height: 1.2; min-width: 0; }
.sch i { flex: 0 0 18px; height: 18px; border-radius: 50%; font-style: normal; font-size: 10.5px; font-weight: 750; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
body.theme-dark .sch i { background: rgba(255,255,255,.1); } body.theme-light .sch i { background: rgba(15,23,42,.08); }
body.theme-dark .sch:hover { background: rgba(255,255,255,.08); } body.theme-light .sch:hover { background: rgba(15,23,42,.07); }
.sch.fertig i { background: var(--sch-c, var(--vk-ui-active-bg)) !important; color: var(--vk-ui-active-ink); }
body.theme-dark .sch.on { background: rgba(255,255,255,.1); } body.theme-light .sch.on { background: rgba(15,23,42,.08); }
#sch-text { margin-top: 9px; min-height: 52px; }

#werkzeuge { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 6px; }
.wz { display: flex; align-items: center; gap: 5px; border: 0; padding: 7px 6px; border-radius: 10px; font: inherit; font-size: 11px; font-weight: 650; line-height: 1.15; cursor: pointer; color: inherit; min-width: 0; text-align: left; overflow-wrap: anywhere; }
.wz u { flex: 0 0 9px; height: 9px; border-radius: 50%; background: var(--c); }
body.theme-dark .wz { background: rgba(255,255,255,.07); } body.theme-light .wz { background: rgba(15,23,42,.06); }
body.theme-dark .wz:hover { background: rgba(255,255,255,.15); } body.theme-light .wz:hover { background: rgba(15,23,42,.12); }
body.theme-dark .wz.on, body.theme-light .wz.on { background: var(--vk-ui-active-bg); color: var(--vk-ui-active-ink); }
#pr-ergebnis { margin-top: 10px; font-size: 12.5px; line-height: 1.4; }
#pr-ergebnis b.gross { display: block; font-size: 20px; font-weight: 780; font-variant-numeric: tabular-nums; margin-bottom: 3px; }
#pr-ergebnis p { margin: 0 0 7px; } #pr-ergebnis em { font-family: "Iowan Old Style", Palatino, Georgia, serif; font-style: italic; font-weight: 650; }
.panel button.ghost2 { margin-top: 8px; width: 100%; background: transparent; border: 0; padding: 7px; border-radius: 9px; font: inherit; font-size: 12px; font-weight: 650; color: inherit; opacity: .72; cursor: pointer; line-height: 1.15; }
.panel button.ghost2:hover { opacity: 1; } body.theme-dark .panel button.ghost2:hover { background: rgba(255,255,255,.08); } body.theme-light .panel button.ghost2:hover { background: rgba(15,23,42,.07); }

.sl-h { font-size: 11px; font-weight: 700; opacity: .62; margin: 8px 0 3px; } .sl-h:first-child { margin-top: 0; }
.sl { display: block; width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; padding: 6px 8px; border-radius: 9px; cursor: pointer; min-width: 0; }
.sl b { display: block; font-family: "Iowan Old Style", Palatino, Georgia, serif; font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.sl span { display: block; font-size: 11px; opacity: .66; margin-top: 1px; }
body.theme-dark .sl:hover { background: rgba(255,255,255,.08); } body.theme-light .sl:hover { background: rgba(15,23,42,.07); }
body.theme-dark .sl.on, body.theme-light .sl.on { background: var(--vk-ui-active-bg); color: var(--vk-ui-active-ink); }
#wf-wort { font-family: "Iowan Old Style", Palatino, Georgia, serif; font-size: 28px; font-weight: 600; line-height: 1.15; }
#wf-wort .e { color: var(--c); } #wf-wort .s { opacity: .55; font-weight: 400; margin: 0 1px; }

/* Film: nur Leuchttisch, Karten, Bögen. In der Pause erscheinen die Moduswahl und die freigegebenen Panels. */
body.buehne-film #modi, body.buehne-film #zeile { display: none; }
html.buehne-bedienbar body.buehne-film #modi { display: flex; zoom: 1.4; }
body.buehne-film #tisch { background: var(--film-grund, #000); } body.buehne-film #tisch::before { display: none; }
@media (max-width: 768px) { #panel-werk { max-height: 44vh; } #modi button { padding: 7px 9px; font-size: 12px; } #z-text { font-size: 14.5px; } #zeile { padding: 0 12px; } }
