:root { color-scheme: dark; font-family: system-ui, sans-serif; background: #0c1d38; color: #fff9e9; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background: radial-gradient(ellipse at 50% 0%, #4a3224, #0c1d38 70%); }
main { max-width: 1200px; margin: auto; padding: clamp(16px, 3vw, 36px); }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin: 0; overflow-wrap: anywhere; }
p { line-height: 1.5; }
.kopf { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 16px; margin-block: 24px; }
button.knopf { position: relative; min-width: 120px; min-height: 100px; padding: 18px; border: 2px solid #e0a84a; border-radius: 18px; background: #0c1d38; color: #fff9e9; font: inherit; font-weight: 700; font-size: 1.25rem; cursor: pointer; }
button.knopf:disabled { opacity: .55; cursor: default; }
button.knopf:hover, button.knopf:focus-visible { outline: 4px solid #fff4dc; outline-offset: 3px; }
.link-knopf { position: relative; display: grid; place-items: center; min-height: 100px; padding: 18px; border: 2px solid #e0a84a; border-radius: 18px; background: #0c1d38; color: #fff9e9; font-weight: 700; font-size: 1.25rem; text-align: center; text-decoration: none; }
.link-knopf:focus-visible { outline: 4px solid #fff4dc; outline-offset: 3px; }
button.knopf[aria-pressed="true"] { background: #2f6b4a; border-color: #e0a84a; }
.spiel { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(250px, 1.2fr); align-items: center; gap: 20px; }
.baum { display: block; width: min(100%, 340px); max-height: 48vh; margin: auto; }
.auswahl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fuss { display: flex; gap: 12px; flex-wrap: wrap; margin-block-start: 20px; }
/* Der gemeinsame Dwell-Fortschritt braucht auch bei vorhandenen Spans
   einen runden, zentrierten Grundkörper. */
[data-verweilen] { position: relative; }
.dwell-dot { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; z-index: 3; }
/* Kamera-Handzeiger folgt im CVI-Modus der gewählten Kontrastfarbe. */
body.bf-cvi .hand-dwell-cursor { width:40px !important; height:40px !important; margin-left:-20px !important; margin-top:-20px !important; border:4px solid var(--bf-cvi-farbe,#ffd400) !important; background:transparent !important; transition:none !important; }
.geschenk-bild { display: grid; place-items: center; height: min(38vh, 280px); color: #ffdd83; font-size: clamp(7rem, 20vw, 15rem); }
/* Startseite: ruhiges, warmes Weihnachtszimmer und eigenständige Spielkarten. */
.weihnachtskopf { position: relative; overflow: hidden; isolation: isolate; min-height: 205px; padding: 30px 38px; border: 1px solid #e0a84a70; border-radius: 26px; background: #18302c; box-shadow: 0 18px 52px #080f1c55; }
.kopf-text { position: relative; z-index: 1; max-width: 58%; text-shadow: 0 2px 12px #07131e; }
.kopf-marke { color: #f8d593; font-size: .8rem; font-weight: 800; letter-spacing: .24em; }
.weihnachtskopf h1 { font-family: Georgia, serif; font-size: clamp(2.7rem, 5vw, 4.5rem); line-height: 1.05; letter-spacing: -.025em; }
.weihnachtskopf p { font-size: clamp(1rem, 1.5vw, 1.25rem); margin-block: .55rem 0; }
.kopf-bild { position: absolute; z-index: 0; inset: 0; background: linear-gradient(90deg, #132c29 0%, #132c29ee 30%, #132c2970 63%, #132c2915 100%), url('bilder/weihnachtsstube.webp') center 56% / cover; }
.start-kacheln { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-block: 18px 12px; }
button.start-kachel { display: flex; align-items: flex-start; flex-direction: column; justify-content: center; text-align: start; gap: 10px; min-height: 166px; padding: 16px 20px; background: linear-gradient(145deg, #264a43, #183936); border: 1px solid #e0a84a99; box-shadow: inset 0 1px #ffffff20, 0 9px 22px #060c1880; }
button.start-kachel:nth-child(2) { background: linear-gradient(145deg, #633b3b, #3b2730); }
button.start-kachel:nth-child(3) { background: linear-gradient(145deg, #514934, #393729); }
button.start-kachel:nth-child(4) { background: linear-gradient(145deg, #304b5a, #203746); }
.start-zeichen { flex: 0 0 auto; width: 58px; height: 58px; display: grid; place-items: center; color: #ffdc91; border-radius: 14px; background: #101d2b68; }
.start-zeichen svg { width: 46px; height: 50px; }
.start-text { flex: 0 1 auto; line-height: 1.2; overflow-wrap: normal; hyphens: auto; }
.start-pfeil { position: absolute; right: 20px; top: 25px; color: #f2d69e; font-size: 1.2em; }
body.bf-cvi .kopf-bild { display: none; }
body.christmas-ruhig .kopf-bild { display: none; }
body.bf-cvi .weihnachtskopf { background: #000; box-shadow: none; }
body.bf-cvi .start-zeichen { background: none; color: var(--bf-cvi-farbe, #ffd400); }
@media (max-width: 950px) { .start-kacheln { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 600px) { .weihnachtskopf { min-height: 160px; padding: 20px; } .kopf-text { max-width: 70%; } button.start-kachel { min-height: 130px; padding: 10px; gap: 8px; } .start-zeichen { width: 46px; height: 46px; } .start-zeichen svg { width: 37px; height: 40px; } .start-pfeil { display:none; } }
@media (max-height: 650px) { .weihnachtskopf { min-height: 120px; padding: 12px 24px; } .weihnachtskopf h1 { font-size: 2.4rem; } button.start-kachel { min-height: 110px; } }
.musik.musik-grosse-schrift .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 850px) and (max-height: 650px) {
  .musik.musik-grosse-schrift { display: grid; grid-template-columns: 1fr 1fr; column-gap: 8px; }
  .musik.musik-grosse-schrift > h1, .musik.musik-grosse-schrift > p, .musik.musik-grosse-schrift > .kacheln { grid-column: 1 / -1; }
  .musik.musik-grosse-schrift > .fuss:has([data-musik-seite]) { grid-column: 1; grid-row: 4; align-items: center; }
  .musik.musik-grosse-schrift > .fuss:has([data-musik-pause]) { grid-column: 2; grid-row: 4; align-items: center; }
  .musik.musik-grosse-schrift .fuss .knopf { padding-inline: 8px; }
  .musik.musik-grosse-schrift > [data-musik-status] { grid-row: 5; }
}
@media (max-width: 600px) { .spiel { grid-template-columns: 1fr; } .baum { max-height: 30vh; } }
@media (max-width: 700px) {
  main { padding: 12px; }
  .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-block: 12px; }
  button.knopf { padding: 10px; font-size: 1rem; overflow-wrap: anywhere; }
  .fuss { gap: 8px; margin-block-start: 10px; }
  .musik .fuss .knopf { flex: 1 1 120px; }
  .musik .fuss { gap: 3px; margin-block-start: 5px; }
  .musik .fuss:has([data-musik-seite]) { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .musik [data-musik-seite] { grid-row: 2; grid-column: 1 / -1; text-align: center; }
  .musik p { margin-block: 5px; }
}
@media (max-height: 650px) {
  main { padding-block: 3px; }
  h1 { font-size: 1.8rem; }
  p { margin-block: 3px; }
  .kacheln { gap: 8px; margin-block: 10px; }
  .fuss { gap: 8px; margin-block-start: 4px; }
  .musik .kacheln { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-height: 450px) and (min-width: 701px) {
  .weihnachtskopf { min-height: 76px; padding: 6px 18px; }
  .weihnachtskopf h1 { font-size: 2rem; }
  .weihnachtskopf p { margin-block: 0; }
  .start-kacheln { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-block: 5px; }
  button.start-kachel { min-height: 85px; padding: 7px 12px; flex-direction: row; align-items: center; gap: 8px; }
  .start-zeichen { width: 42px; height: 42px; }
  .start-zeichen svg { width: 34px; height: 37px; }
  .start-pfeil { display: none; }
  #app:has(.weihnachtskopf) .fuss .knopf { min-width: 120px; min-height: 96px; padding: 8px; font-size: 1rem; }
  .musik { display: grid; position: relative; grid-template-columns: 1fr 1fr; column-gap: 8px; }
  .musik > h1, .musik > p, .musik > .kacheln { grid-column: 1 / -1; }
  .musik > .fuss:has([data-musik-seite]) { grid-column: 1; grid-row: 4; }
  .musik > .fuss:has([data-musik-pause]) { grid-column: 2; grid-row: 4; }
  .musik [data-musik-seite] { position: absolute; inset-inline-end: 0; top: 0; }
  .musik .fuss { align-items: start; }
  .musik > [data-musik-status] { grid-row: 5; }
  .musik .kacheln { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .musik .knopf { min-height: 96px; min-width: 120px; padding: 8px; font-size: 1rem; }
  .musik .kacheln { margin-block: 3px; }
  .musik .fuss { margin-block-start: 3px; }
  .musik p { margin-block: 2px; }
  .spiel { gap: 8px; }
  .spiel .knopf, .spiel + .fuss .knopf { min-width: 120px; min-height: 96px; padding: 6px; }
  .spiel .baum { max-height: 29vh; }
  .spiel .auswahl { gap: 4px; }
}

/* Klassische Aktivitätsliste: Nachtstimmung wie das Dorf; Info/Unterstützen bleiben hell lesbar. */
body:has(.weihnachtskopf):not(.bf-cvi) { background:radial-gradient(ellipse at 50% 0%,#4a3224,#0c1d38 70%); color:#fff9e9; }
/* Info/Unterstützen: hell und ohne Scrollen, siehe unterstuetzen.css (.blatt-seite). */
#app:has(.weihnachtskopf) { max-width:1380px; padding:18px 24px; }
.weihnachtskopf { min-height:200px; padding:28px 34px; border:1px solid #e0a84a88; border-radius:24px; background:#0c1d38e8; box-shadow:0 18px 42px #050d1f88; }
.kopf-text { max-width:52%; text-shadow:0 2px 12px #050d1f; }
.kopf-marke { color:#f8d593; font-size:.8rem; font-weight:800; letter-spacing:.22em; }
.weihnachtskopf h1 { color:#fff9eb; font-size:clamp(2.8rem,5vw,4.5rem); }
.weihnachtskopf p { color:#e8d9b8; max-width:28em; }
.kopf-bild { background:linear-gradient(90deg,#0c1d38 0%,#0c1d38ee 28%,#0c1d3888 48%,#0c1d3800 68%),url('bilder/weihnachtsstube.webp') right 59% / cover; }
.weihnachtskopf::after { content:''; position:absolute; inset:0 0 auto; height:6px; background:repeating-linear-gradient(110deg,#37705b 0 26px,#e0a84a 26px 30px,#c83a42 30px 56px,#e0a84a 56px 60px); }
.start-kacheln { grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-block:18px 12px; }
button.start-kachel, button.start-kachel:nth-child(n) {
  display:flex; flex-direction:column; align-items:stretch; justify-content:flex-start; gap:0;
  min-height:230px; padding:0; border:2px solid #e0a84a; border-radius:22px;
  background:linear-gradient(180deg,#1a2838,#0a121c); color:#fff7e3;
  box-shadow:0 8px 0 #07101c, 0 16px 32px #050d1f66, inset 0 1px #ffffff18;
  text-align:center; overflow:hidden; transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.start-zeichen { width:100%; height:158px; flex:0 0 auto; border-radius:20px 20px 0 0; overflow:hidden; background:#152848; color:#ffdc91; }
.start-zeichen .start-szene { object-fit:contain; display:block; width:100%; height:100%; }
.start-zeichen svg.start-symbol { display:none; }
.start-text { display:grid; place-items:center; flex:1; min-height:68px; padding:12px 14px; font-size:1.18rem; font-weight:800; line-height:1.2; overflow-wrap:anywhere; hyphens:auto; background:linear-gradient(180deg,#1a2838f2,#0a121cf8); }
.start-pfeil { display:none; }
button.start-kachel:hover,button.start-kachel:focus-visible {
  outline:4px solid #fff2b2; outline-offset:3px; border-color:#e0a84a;
  transform:translateY(-3px); box-shadow:0 12px 0 #07101c, 0 22px 36px #050d1f88, inset 0 1px #ffffff22;
}
#app:has(.weihnachtskopf) .fuss { gap:10px; align-items:center; }
.start-blaettern { justify-content:flex-end; }
.start-blaettern > span { margin-inline-end:auto; font-weight:700; color:#e8d9b8; }
#app .start-blaettern .knopf { min-height:60px; padding:10px 22px; background:#0c1d38e8; border-color:#e0a84a; color:#fff9e9; font-size:1rem; }
.start-werkzeuge { border-top:1px solid #e0a84a55; padding-top:12px; margin-top:12px; }
#app .start-werkzeuge .knopf { flex:1 1 170px; min-height:64px; padding:10px 14px; background:#0c1d38; color:#fff8e8; border-color:#e0a84a; font-size:1rem; }
#app:has(.weihnachtskopf) .fuss .knopf:focus-visible { outline-color:#fff2b2; }
body.bf-cvi .weihnachtskopf { background:#000; border-color:var(--bf-cvi-farbe,#ffd400); }
body.bf-cvi .weihnachtskopf::after,body.bf-cvi .start-szene { display:none; }
body.bf-cvi .kopf-text,body.bf-cvi .weihnachtskopf h1,body.bf-cvi .weihnachtskopf p,body.bf-cvi .kopf-marke { color:var(--bf-cvi-text,#fff); }
body.bf-cvi .start-zeichen { background:transparent; }
body.bf-cvi .start-zeichen svg.start-symbol { display:block; width:80px; height:88px; margin:auto; color:var(--bf-cvi-farbe,#ffd400); }
body.bf-cvi .start-text { background:#000; }
@media (max-height:650px) and (min-width:701px) {
 #app:has(.weihnachtskopf) { padding:10px 18px; }
 .weihnachtskopf { min-height:168px; padding:18px 28px; }
 .weihnachtskopf h1 { font-size:3rem; }
 .start-kacheln { margin-block:12px; gap:12px; }
 button.start-kachel, button.start-kachel:nth-child(n) { min-height:198px; }
 .start-zeichen { height:130px; }
 .start-werkzeuge { margin-top:10px; padding-top:10px; }
}
@media (max-width:700px) {
 #app:has(.weihnachtskopf) { padding:12px; }
 .weihnachtskopf { min-height:158px; padding:22px 18px; }
 .weihnachtskopf h1 { font-size:2.5rem; }
 .kopf-text { max-width:75%; }
 .kopf-bild { background:linear-gradient(90deg,#0c1d38 0%,#0c1d38e8 38%,#0c1d3866 70%,#0c1d3811),url('bilder/weihnachtsstube.webp') 65% center / cover; }
 .start-kacheln { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-block:14px; }
 button.start-kachel, button.start-kachel:nth-child(n) { min-height:170px; }
 .start-zeichen { height:108px; }
 .start-text { font-size:1rem; min-height:60px; padding:8px; }
 #app .start-werkzeuge .knopf { flex-basis:140px; }
 #app .start-blaettern .knopf { padding:10px 12px; }
}
@media (max-height:450px) and (min-width:701px) {
 .weihnachtskopf { min-height:105px; padding:10px 24px; }
 .weihnachtskopf h1 { font-size:2.2rem; }
 .start-zeichen { height:75px; }
 button.start-kachel, button.start-kachel:nth-child(n) { min-height:125px; }
 .start-text { min-height:50px; padding:6px; font-size:1rem; }
 #app .start-blaettern .knopf,#app .start-werkzeuge .knopf { min-height:52px; padding:8px 12px; }
 .start-kacheln { margin-block:8px; }
 .start-werkzeuge { margin-top:6px; padding-top:6px; }
}

/* The wordmark stays whole; activity labels reflow into fewer wide columns. */
.weihnachtskopf h1 { font-size:clamp(32px,5vw,64px); overflow-wrap:normal; }
.start-kacheln { grid-template-columns:repeat(auto-fit,minmax(min(100%,13em),1fr)); }
@media (max-width:700px) { .weihnachtskopf h1 { font-size:clamp(30px,10vw,40px); } }

@media (max-width:700px) { .start-kacheln { grid-template-columns:repeat(auto-fit,minmax(min(100%,9em),1fr)); } }

@media (max-height:450px) and (min-width:701px) { .start-kacheln { grid-template-columns:repeat(4,minmax(0,1fr)); } }

/* Musikraum 3D-Kulisse; Liedkacheln bleiben große DOM-Ziele. */
#app:has(> .musik.musik-3d) { max-width: none; padding: 0 !important; }
.musik.musik-3d, .musik.musik-laedt {
  position: fixed; inset: 0; overflow: auto; box-sizing: border-box;
  padding: 12px 16px 10px; background: #152848; color: #fff8e8;
}
.musik-3d-scene {
  position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
}
.musik-3d-scene > canvas { width: 100%; height: 100%; display: block; opacity: .5; }
.musik-3d > * { position: relative; z-index: 2; }
.musik-3d .kacheln, .musik-3d .fuss { background: #0b162288; border-radius: 14px; padding: 8px; }
.musik-3d .fuss .knopf[data-musik-zurueck] {
  min-width: var(--zurueck-b, 220px); min-height: var(--zurueck-h, 112px);
}
.musik-3d .knopf { min-width: var(--knopf-b, 120px); min-height: var(--knopf-min-h, 96px); }
