*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;font-family:Arial,sans-serif;color:#faf5ff;background:#201734}body{background:radial-gradient(ellipse at top,#49336a,#201734 75%)}button,select{font:inherit;border:1px solid #8b76a8;border-radius:10px;background:#38274e;color:#fff;cursor:pointer;min-height:40px;padding:8px 12px}button:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #fff;outline-offset:2px}button:disabled{opacity:.45}button.primary{background:#99f6e4;color:#163d38;font-weight:800;min-width:160px}.app{height:100%;padding:12px}h1{margin:0;font-size:clamp(20px,4vmin,34px)}em{font-style:normal;color:#99f6e4}.eyebrow{font-size:10px;letter-spacing:2px;color:#c4b5fd}#menu{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center}#menu p{margin:0;font-size:14px;line-height:1.4}.menu-art{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;transform:rotate(-7deg);padding:10px;background:#130d21;border-radius:16px;margin:8px}.menu-art>span{width:43px;height:43px;border-radius:8px;display:grid;place-items:center}#menu select{min-width:160px}details{max-width:370px;font-size:12px}summary{cursor:pointer;color:#d8cced}details[open]{position:absolute;inset:8px;max-width:none;background:#201734;z-index:2;padding:20px;display:flex}details p{padding-top:16px}#playScreen{height:100%;display:flex;flex-direction:column;gap:8px}header{display:flex;justify-content:space-between;align-items:center}header h1{font-size:22px}.hud{display:flex;justify-content:center;gap:22px;font-size:11px;color:#d6c9e8}.hud>span{display:flex;align-items:center;gap:5px}.hud b{background:#d8cced;border-radius:4px;--digit-width:14px;--digit-height:17px;display:inline-flex;padding:2px}.digit-number{display:inline-flex;align-items:center;justify-content:center;pointer-events:none}.digit-sprite{display:block;width:var(--digit-width,24px);height:var(--digit-height,27px);background-repeat:no-repeat}.workspace{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}#sudokuBoard{display:grid;grid-template-columns:repeat(9,1fr);grid-template-rows:repeat(9,1fr);width:min(100%,440px,calc(100dvh - 210px));aspect-ratio:1;border:3px solid #c4b5fd;gap:2px;background:#60477d;padding:2px;flex:none}.sudoku-cell{position:relative;min-width:0;min-height:0;padding:0;border:0;border-radius:4px;background:#302344;display:grid;place-items:center;--digit-width:clamp(14px,3.7vmin,27px);--digit-height:clamp(17px,4.3vmin,31px)}.sudoku-cell:nth-child(3n):not(:nth-child(9n)){border-right:3px solid #201734}.sudoku-cell:nth-child(n+19):nth-child(-n+27),.sudoku-cell:nth-child(n+46):nth-child(-n+54){border-bottom:3px solid #201734}.sudoku-cell.is-given:after{content:'';position:absolute;width:4px;height:4px;border-radius:50%;background:#38274e;bottom:2px;right:2px}.sudoku-cell.is-selected{outline:3px solid #fff;outline-offset:-3px;z-index:1;box-shadow:0 0 0 2px #201734}.sudoku-cell.is-related:not(.is-filled){background:#594471}.sudoku-cell.is-same-value{box-shadow:inset 0 0 0 2px #fff}.tools{width:min(100%,440px)}.keypad{display:grid;grid-template-columns:repeat(9,1fr);gap:4px}.sudoku-key{min-width:0;min-height:44px;padding:0;display:grid;place-items:center;border:0}.actions{display:flex;justify-content:center;gap:8px;margin-top:8px}.actions button{flex:1}.actions .is-active{background:#99f6e4;color:#163d38}.sudoku-notes{position:absolute;inset:1px;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr)}.sudoku-notes>span{display:grid;place-items:center;--digit-width:8px;--digit-height:9px}.sudoku-notes .digit-sprite{filter:invert(1)}#sudokuStatus{margin:0;min-height:28px;text-align:center;font-size:12px;color:#e1d5f1;display:grid;place-items:center}[hidden]{display:none!important}.is-error-bounce{outline:3px dashed #fb7185!important}
@media(max-height:520px) and (min-width:480px){.app{padding:6px 12px}#playScreen{gap:4px}header h1{font-size:18px}header button{min-height:30px;padding:3px 12px}.workspace{flex-direction:row;gap:20px}#sudokuBoard{width:min(calc(100dvh - 100px),55vw)}.tools{width:min(200px,36vw)}.keypad{grid-template-columns:repeat(3,1fr)}.sudoku-key{min-height:38px}.actions{gap:4px;flex-wrap:wrap}.actions button{padding:6px;font-size:12px;min-height:32px}.menu-art{gap:3px;padding:6px;margin:0}.menu-art>span{width:27px;height:27px;--digit-width:19px;--digit-height:21px}#menu{gap:5px}#menu h1{font-size:25px}#menu p{display:none}#menu select,#play{min-height:32px;padding:4px}#sudokuStatus{min-height:22px;font-size:11px}}
[data-value="1"]{background:#99f6e4}
[data-value="2"]{background:#5eead4}
[data-value="3"]{background:#93c5fd}
[data-value="4"]{background:#c4b5fd}
[data-value="5"]{background:#f0abfc}
[data-value="6"]{background:#fda4af}
[data-value="7"]{background:#fdba74}
[data-value="8"]{background:#fde68a}
[data-value="9"]{background:#bef264}

/* Each box has one hue, with stronger tiles for placed numbers. */
html,body{background:#fff;color:#302344}
body{isolation:isolate;overflow:hidden}
.app{position:relative;z-index:1;pointer-events:none}
.app button,.app select,.app summary,.app details{pointer-events:auto}
em{color:#0f766e}.eyebrow{color:#725390}
.hud,summary,#sudokuStatus{color:#594471}
.hud b{background:#f3eef8}
details[open]{background:#fff;z-index:5}
.menu-art{background:#ede6f5;box-shadow:0 5px 20px #38274e15}
button:focus-visible,select:focus-visible,summary:focus-visible{outline-color:#6d28d9}
#sudokuBoard{background:#38274e;border-color:#38274e;gap:1px;padding:1px;position:relative;z-index:1}
.sudoku-cell{background:var(--box-light);border-radius:2px}
.sudoku-cell.is-filled{background:var(--box-color)}
.sudoku-cell.is-related:not(.is-filled){background:var(--box-light);box-shadow:inset 0 0 0 1px var(--box-color)}
.sudoku-cell:nth-child(3n):not(:nth-child(9n)){border-right:3px solid #38274e}
.sudoku-cell:nth-child(n+19):nth-child(-n+27),.sudoku-cell:nth-child(n+46):nth-child(-n+54){border-bottom:3px solid #38274e}
.sudoku-cell.is-selected{outline:3px solid #6d28d9;outline-offset:-3px;box-shadow:inset 0 0 0 5px #fff;z-index:2}
.sudoku-cell.is-same-value{box-shadow:inset 0 0 0 2px #38274e}
.sudoku-notes .digit-sprite{filter:none}
.keypad,.actions{position:relative;z-index:1}
.avatar-background{position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:0}
.passing-avatar{position:absolute;left:0;bottom:5%;height:calc(100dvh / 3);width:calc(100dvh / 3);animation:avatar-pass 9s linear both;filter:drop-shadow(0 5px 3px #38274e15)}
.passing-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
@keyframes avatar-pass{from{transform:translateX(calc(-100% - 20px))}to{transform:translateX(calc(100vw + 20px))}}
@media(prefers-reduced-motion:reduce){.passing-avatar{display:none}}
.sudoku-cell[data-box="0"]{--box-light:#ccfbf1;--box-color:#99f6e4}
.sudoku-cell[data-box="1"]{--box-light:#dbeafe;--box-color:#93c5fd}
.sudoku-cell[data-box="2"]{--box-light:#ede9fe;--box-color:#c4b5fd}
.sudoku-cell[data-box="3"]{--box-light:#fae8ff;--box-color:#f0abfc}
.sudoku-cell[data-box="4"]{--box-light:#ffe4e6;--box-color:#fda4af}
.sudoku-cell[data-box="5"]{--box-light:#ffedd5;--box-color:#fdba74}
.sudoku-cell[data-box="6"]{--box-light:#fef9c3;--box-color:#fde68a}
.sudoku-cell[data-box="7"]{--box-light:#ecfccb;--box-color:#bef264}
.sudoku-cell[data-box="8"]{--box-light:#cffafe;--box-color:#67e8f9}
