/* A quiet white grid on the portal's warm paper. */
.sudoku-mobile-nav { display:none }
.game-sudoku .sudoku-dock { width:min(100%,var(--board-content-width,100%)); margin-inline:auto }
.game-sudoku .sudoku { border-color:#303b59; background:white }
.game-sudoku .sudoku .cell {
  background:white; color:#202c49; font-weight:600; box-shadow:inset -1px -1px #cdd2dd;
}
.game-sudoku .sudoku .thick-r { border-right-color:#535e77 }
.game-sudoku .sudoku .thick-b { border-bottom-color:#535e77 }
.game-sudoku .sudoku .band { background:#f1f4fa }
.game-sudoku .sudoku .same { background:#d9e4ff }
.game-sudoku .sudoku .user { color:#244aac }
.game-sudoku .sudoku .selected { background:#ffe3a0; outline:2px solid #334778; outline-offset:-2px }
.game-sudoku .sudoku .err { color:#9f1641; text-decoration:underline wavy; text-underline-offset:.12em }
.game-sudoku .sudoku .cell:focus-visible { outline:3px solid #264bbe; outline-offset:-3px }
.game-sudoku .bar > span { display:inline-flex; align-items:center; gap:8px; flex-wrap:wrap }
.sudoku-level { min-height:44px; padding:4px 5px; font-weight:700; font-size:.88rem; border:0; color:#334782; background:#eef2fc }
.game-sudoku .sudoku-dock .keypad { gap:3px; margin-top:7px }
.game-sudoku .keypad button {
  font:600 clamp(1.45rem,5.8vw,1.87rem)/1 Portal,system-ui,sans-serif; color:#24489d;
  border:1px solid #d7deee; background:#f3f6ff; border-radius:7px; min-height:46px;
}
.game-sudoku .sudoku-dock .controls { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:3px; margin-top:3px }
.sudoku-dock .controls button {
  display:flex; align-items:center; justify-content:center; gap:5px; border:0; border-radius:7px;
  padding:4px 2px; color:#38466a; background:transparent; min-width:0;
}
.sudoku-dock .controls svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round }
.sudoku-dock .controls button[aria-pressed="true"] { color:#193c92; background:#e0e9ff; box-shadow:inset 0 -3px #3b5aaa }
.sudoku-dock .controls button:disabled { opacity:.55 }
@media (max-width:700px) {
  body.game-sudoku { --page-gutter:clamp(7px,2.6vw,14px); background:#fcfaf3 }
  .game-sudoku::before,.game-sudoku::after { display:none }
  body.game-sudoku header .head { min-height:51px; justify-content:space-between; gap:8px }
  body.game-sudoku header .head .brand-logo { width:clamp(106px,31vw,136px) }
  .game-sudoku .head > nav,.game-sudoku .head .brand-sub { display:none }
  .sudoku-mobile-nav { display:flex; align-items:center; gap:5px }
  .sudoku-mobile-nav > button {
    background:#294ca8; color:white; border:0; border-radius:10px; padding:6px 13px; font-size:.93rem;
  }
  .sudoku-menu { position:relative; z-index:5 }
  .sudoku-menu summary { display:grid; place-items:center; min-width:44px; min-height:44px; list-style:none; color:#273554 }
  .sudoku-menu summary::-webkit-details-marker { display:none }
  .sudoku-menu[open] summary { background:#eff2fa; border-radius:9px }
  .game-sudoku .head .sudoku-menu nav {
    position:absolute; top:calc(100% + 3px); right:0; display:grid; gap:2px; width:max-content; max-width:90vw;
    padding:6px; border:1px solid #d4d8e2; border-radius:12px; background:#fff; box-shadow:0 8px 24px #26345126;
  }
  .sudoku-menu nav :is(a,button) {
    display:flex; flex-direction:row; justify-content:flex-start; gap:10px; align-items:center;
    padding:6px 12px; min-height:44px; font:600 .93rem/1.2 Portal,system-ui,sans-serif;
    text-decoration:none; border:0; background:transparent; color:#253553;
  }
  .game-sudoku .game-spread>.trail,.game-sudoku .game-spread>.game-mast .mast-links { display:none }
  body.game-sudoku .game-spread>.game-mast {
    display:flex; align-items:center; justify-content:space-between; min-height:44px; margin:3px 0;
  }
  body.game-sudoku .game-spread>.game-mast h1 { font-size:clamp(1.4rem,5.8vw,1.85rem) }
  .game-sudoku .game-mast-actions button.room-toggle {
    min-height:44px; color:#38528a; background:transparent; border:0; box-shadow:none; font-size:.85rem; padding:4px;
  }
  .game-sudoku .play-room:not(.is-expanded) .game-layout>.puzzle-starts { display:none }
  .game-sudoku .playbox { border:0; padding:0; background:transparent; box-shadow:none }
  .game-sudoku .bar {
    min-height:44px; margin:0 0 3px; gap:4px; flex-wrap:nowrap; font-size:.9rem; line-height:1.15;
  }
  .game-sudoku .bar>span { gap:5px }
  .game-sudoku .utilities { gap:3px }
  .game-sudoku .utilities button { border:0; background:transparent; color:#304d85 }
  .sudoku-level { font-size:.85rem; padding-inline:3px; background:transparent; color:#3c538b }
  .game-sudoku .boardwrap { border-radius:5px }
  .game-sudoku .sudoku { border-radius:5px }
  .game-sudoku .sudoku .cell { font-size:clamp(1.22rem,6.45vw,2.2rem) }
  .game-sudoku .sudoku .notes { font-size:clamp(.54rem,2.22vw,.8rem); font-weight:600 }
  .sudoku-dock { background:#fcfaf3; padding-bottom:max(3px,env(safe-area-inset-bottom)) }
  .sudoku-dock .controls button { flex-direction:column; gap:2px; min-height:46px; font-size:.81rem; line-height:1.18 }
  .game-sudoku .settings-toggle { background:#f5f3ec }
  .game-sudoku .notice { margin-top:3px }
}
/* On short portrait screens allow space for both rows of input and browser chrome. */
@media (max-width:700px) and (orientation:portrait) {
  .game-sudoku .boardwrap,.game-sudoku .playbox > .sudoku-dock {
    width:min(100%,max(285px,calc(100svh - 257px - env(safe-area-inset-bottom)))); margin-inline:auto;
  }
  .game-sudoku .sudoku-dock { position:sticky; z-index:3; bottom:0; display:flow-root }
}
@media (min-width:600px) and (orientation:landscape) and (max-height:520px) {
  .game-sudoku .is-expanded .sudoku-dock .controls { grid-template-columns:1fr 1fr }
  .game-sudoku .is-expanded .sudoku-dock .controls button { flex-wrap:wrap }
}
