/* Sudoku i hallen. Kun præsentation; app.js, sudoku.mjs og focus.js er uændrede. */
body.spil-tema.sudoku .tabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 22px;border:0;overflow:visible}
body.spil-tema.sudoku .tabs button{min-height:44px;padding:9px 13px;border:1px solid var(--spil-line-strong);border-radius:999px;background:#0e1b25cc;font-size:13px;white-space:normal}
body.spil-tema.sudoku .tabs button.active{background:#243d56;border-color:var(--spil-color);color:var(--spil-ink)}
body.spil-tema.sudoku .tabs button.active::after{display:none}
body.spil-tema.sudoku .playLayout{display:grid;grid-template-columns:minmax(0,1fr);gap:28px;align-items:start}
body.spil-tema.sudoku .boardColumn{width:100%;max-width:620px;min-width:0;margin:auto}
body.spil-tema.sudoku #fullscreen{font-size:12px;min-height:44px;padding:8px 10px;white-space:nowrap}
body.spil-tema.sudoku .boardMeta{gap:8px;padding:0 0 12px;min-height:56px}
body.spil-tema.sudoku .boardMeta>div{gap:8px;min-width:0}
body.spil-tema.sudoku .clockWrap{flex-shrink:0}
body.spil-tema.sudoku #clock{font-size:22px;color:var(--spil-ink)}
/* app.js sætter advarslen inline. Bevar signalet med læsbar rød på temabaggrunden. */
body.spil-tema.sudoku #clock[style*="color:"]{color:#f1b7b5!important}
body.spil-tema.sudoku .clockWrap button{min-width:44px;min-height:44px;padding:8px}
body.spil-tema.sudoku .boardFrame{overflow:hidden}
body.spil-tema.sudoku #board{background:#0c1822;isolation:isolate}
body.spil-tema.sudoku #board .cell{
  min-height:0;min-width:0;border:0;border-right:1px solid #304357;border-bottom:1px solid #304357;
  border-radius:0;padding:0;background:#101f2d;color:#a6ceff;box-shadow:none;
  font:500 clamp(22px,6vw,32px)/1 var(--spil-head);transition:background .12s;
}
body.spil-tema.sudoku #board .cell:nth-child(3n){border-right:2px solid #7893ac}
body.spil-tema.sudoku #board .cell:nth-child(9n){border-right:0}
body.spil-tema.sudoku #board .cell:nth-child(n+19):nth-child(-n+27),
body.spil-tema.sudoku #board .cell:nth-child(n+46):nth-child(-n+54){border-bottom:2px solid #7893ac}
body.spil-tema.sudoku #board .cell:nth-child(n+73){border-bottom:0}
body.spil-tema.sudoku #board .cell.fixed{background:#142434;color:var(--spil-ink);font-weight:700}
body.spil-tema.sudoku #board .cell.peer{background:#1a2e43}
body.spil-tema.sudoku #board .cell.same{background:#284968;color:#d1e7ff}
body.spil-tema.sudoku #board .cell.selected{background:#325c83;color:#fff;box-shadow:inset 0 0 0 2px #b5d8ff;z-index:1}
body.spil-tema.sudoku #board .cell.conflict{color:#f3c2b8;background:#392c38;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}
body.spil-tema.sudoku #board .cell.conflict .cellValue{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}
body.spil-tema.sudoku #board .cell.wrong{color:#ffd1c9;background:#49303b;box-shadow:inset 0 -3px 0 #dd9994}
body.spil-tema.sudoku #board .cell.selected:is(.wrong,.conflict){background:#533e52;box-shadow:inset 0 0 0 2px #b5d8ff,inset 0 -4px 0 #dd9994}
body.spil-tema.sudoku #board .cell:focus-visible{outline:3px solid var(--spil-accent);outline-offset:-4px;z-index:2}
@media(hover:hover){body.spil-tema.sudoku #board .cell:hover:not(.selected):not(.wrong):not(.conflict){background:#274158}}
body.spil-tema.sudoku .cellNotes{font-size:clamp(10px,2.8vw,13px);color:#c0cedc}
body.spil-tema.sudoku .cell.selected .cellNotes{color:#dfebf5}
body.spil-tema.sudoku .cellNotes span.noteMatch{background:#b5d8ff;color:#102235;box-shadow:none;border-radius:3px;font-weight:700}
body.spil-tema.sudoku .cell.hasValue .cellNotes{font-size:clamp(7px,1.8vw,10px);color:#c0cedc;gap:2px}
body.spil-tema.sudoku .cell.selected.hasValue .cellNotes{color:#dfebf5}
body.spil-tema.sudoku .boardFooter{flex-wrap:wrap;gap:4px 12px;margin:12px 0 16px;font-size:12px}
body.spil-tema.sudoku #saveStatus{margin-left:auto;text-align:right}
body.spil-tema.sudoku .digits{gap:4px}
body.spil-tema.sudoku .digits button{min-width:0;min-height:60px;padding:8px 0;border-radius:8px;color:#d4e6ff;background:#132638;font:600 27px/1.2 var(--spil-head);border-color:#59738a;box-shadow:0 3px 10px #0003}
body.spil-tema.sudoku .digits button:hover:enabled{background:#203d56;border-color:#b5d8ff}
body.spil-tema.sudoku .digits button.numberSelected{background:#325c83;border-color:#b5d8ff;color:#fff;box-shadow:inset 0 -3px 0 #b5d8ff,0 0 16px var(--spil-glow)}
body.spil-tema.sudoku .digits small{color:#b8c9d8;font:400 11px/1.5 var(--spil-font)}
body.spil-tema.sudoku .digits button.numberSelected small{color:#dfebf5}
/* Også startvisningens inaktive taster er læselige. Opbrugt har egen, tydelig tilstand. */
body.spil-tema.sudoku .digits button:disabled{opacity:1;background:#0f1e2b;color:#a6b7c7;border-color:#3b5063;box-shadow:none;cursor:default}
body.spil-tema.sudoku .digits button:disabled small{color:#9baebf}
body.spil-tema.sudoku .digits button.opbrugt{background:#0c1822;color:#8195a7;border-style:dashed;border-color:#526273;text-decoration:line-through;text-decoration-thickness:2px}
body.spil-tema.sudoku .digits button.opbrugt small{text-decoration:none;color:#9baebf}
@media(max-width:599px){
  body.spil-tema.sudoku:not(.game-focus) .digits{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  body.spil-tema.sudoku:not(.game-focus) .digits small{display:block}
}
body.spil-tema.sudoku .tools{gap:6px;margin-top:12px}
body.spil-tema.sudoku .tools button{min-height:64px;border:1px solid var(--spil-line-strong);border-radius:12px;background:#0e1b25cc;padding:8px 2px;font-size:12px}
body.spil-tema.sudoku .tools button span{font-size:22px;line-height:1;margin-bottom:5px;color:var(--spil-color)}
body.spil-tema.sudoku .tools button[aria-pressed="true"]{background:#243d56;border-color:var(--spil-color)}
body.spil-tema.sudoku .noteActions{margin-top:8px}
body.spil-tema.sudoku .noteActions button{min-height:44px;font-size:12px}
body.spil-tema.sudoku #cover{background:#0c1822ed;backdrop-filter:blur(8px);color:var(--spil-ink)}
body.spil-tema.sudoku .coverIcon{color:var(--spil-color);text-shadow:0 0 32px var(--spil-glow);font-weight:500}
body.spil-tema.sudoku aside{min-width:0}
body.spil-tema.sudoku .sideCard{padding:22px;margin-bottom:16px}
body.spil-tema.sudoku .currentCard{background:linear-gradient(145deg,#1a3044e8,#0e1b25f2);border-top-color:var(--spil-color)}
body.spil-tema.sudoku .currentCard h2{font-size:24px}
body.spil-tema.sudoku .currentCard #progressBar{background:var(--spil-color);box-shadow:0 0 12px var(--spil-glow)}
body.spil-tema.sudoku .helpAction{border:0;border-top:1px solid var(--spil-line);border-radius:0;background:none;padding:13px 0;min-height:48px}
body.spil-tema.sudoku .helpAction span{color:var(--spil-color)}
body.spil-tema.sudoku .rules summary{min-height:44px;display:flex;align-items:center;gap:10px;list-style:none}
body.spil-tema.sudoku .rules summary::before{content:"＋";color:var(--spil-color)}
body.spil-tema.sudoku .rules[open] summary::before{content:"−"}
body.spil-tema.sudoku .filters{flex-wrap:wrap}
body.spil-tema.sudoku .filters label{min-width:0;flex:1}
body.spil-tema.sudoku .historyTop{flex-wrap:wrap}
body.spil-tema.sudoku .journeyHero{background:linear-gradient(145deg,#172a3be6,#0c1822f5)}
body.spil-tema.sudoku .spil-sejr{display:none}
body.spil-tema.sudoku.sudoku-loest #info[open]{border-color:var(--spil-color);animation:sudoku-sejrslys 1.5s ease-out both}
body.spil-tema.sudoku.sudoku-loest #info .spil-sejr{display:flex;justify-content:center;gap:28px;color:var(--spil-color);font-size:36px;text-shadow:0 0 24px var(--spil-glow);margin:0 0 18px}
body.spil-tema.sudoku.sudoku-loest .spil-sejr span{animation:sudoku-stjerne 1.2s ease-out both}
body.spil-tema.sudoku.sudoku-loest .spil-sejr span:nth-child(2){animation-delay:.12s}
body.spil-tema.sudoku.sudoku-loest .spil-sejr span:nth-child(3){animation-delay:.24s}
@keyframes sudoku-sejrslys{0%{box-shadow:0 0 0 transparent}40%{box-shadow:0 0 80px var(--spil-glow),inset 0 0 32px var(--spil-glow)}100%{box-shadow:0 0 36px var(--spil-glow)}}
@keyframes sudoku-stjerne{0%{opacity:0;transform:translateY(12px) scale(.7)}65%{opacity:1;transform:translateY(-3px) scale(1.1)}100%{opacity:1;transform:none}}
@media(min-width:860px){
  body.spil-tema.sudoku .spil-main{padding-top:32px}
  body.spil-tema.sudoku .playLayout{grid-template-columns:minmax(0,620px) minmax(260px,300px);justify-content:center;gap:24px}
  body.spil-tema.sudoku aside{padding-top:56px}
}
@media(max-width:359px){
  body.spil-tema.sudoku .spil-main{padding-left:10px;padding-right:10px}
  body.spil-tema.sudoku .digits{gap:2px}
  body.spil-tema.sudoku .boardMeta .gameLabels{flex-direction:column;align-items:flex-start;gap:2px}
  body.spil-tema.sudoku .boardMeta .clockWrap{gap:5px}
}
/* Fokusvisning følger fortsat focus.js; de højere tema-selektorer må ikke ændre geometrien. */
body.spil-tema.sudoku.game-focus :is(.spil-heading,.tabs){display:none}
body.spil-tema.sudoku.game-focus main{height:100dvh;max-width:none;padding:max(8px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}
body.spil-tema.sudoku.game-focus .playLayout{height:100%;display:block}
body.spil-tema.sudoku.game-focus .boardColumn{max-width:none;height:100%;gap:5px}
body.spil-tema.sudoku.game-focus .boardMeta{padding:0}
body.spil-tema.sudoku.game-focus:has(#board) .boardFrame{width:min(100cqw,calc(100cqh - 216px))}
body.spil-tema.sudoku.game-focus #board .cell{font-size:clamp(13px,4cqh,30px)}
body.spil-tema.sudoku.game-focus .cellNotes{font-size:clamp(6px,1.5cqh,12px)}
body.spil-tema.sudoku.game-focus .cell.hasValue .cellNotes{font-size:clamp(6px,1.3cqh,10px)}
body.spil-tema.sudoku.game-focus .boardFooter{margin:0;min-height:18px;font-size:11px}
body.spil-tema.sudoku.game-focus .digits button{min-height:44px;padding:5px 0;font-size:22px}
body.spil-tema.sudoku.game-focus .tools{margin:0}
body.spil-tema.sudoku.game-focus .tools button{min-height:36px;padding:4px;font-size:12px}
body.spil-tema.sudoku.game-focus .tools button span{display:inline;font-size:18px;margin:0 5px 0 0}
body.spil-tema.sudoku.game-focus .noteActions{margin:0}
body.spil-tema.sudoku.game-focus .noteActions button{min-height:32px;padding:5px 10px}
@media(max-height:500px){
  body.spil-tema.sudoku.game-focus:has(#board) .boardColumn{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,300px);grid-template-rows:auto minmax(0,1fr) 44px 32px;max-width:940px;column-gap:16px}
  body.spil-tema.sudoku.game-focus .boardMeta{flex-wrap:wrap;justify-content:center}
  body.spil-tema.sudoku.game-focus:has(#board) .boardFrame{grid-row:1/5;width:min(100%,calc(100dvh - 20px))}
  body.spil-tema.sudoku.game-focus .boardFooter{display:none}
  body.spil-tema.sudoku.game-focus .digits{grid-row:2;grid-template-columns:repeat(3,minmax(0,1fr))}
  body.spil-tema.sudoku.game-focus .tools{grid-row:3}
  body.spil-tema.sudoku.game-focus .noteActions{grid-row:4}
}
