/* Shared game presentation. Engines, board geometry and tile art stay independent. */
body.game-page.morning-theme{--mp-game-accent:#2f715c;--mp-game-wash:#eaf3eb;--mp-game-line:#b3cabb;}
body.game-page.morning-theme:has(#sudokuPage:not([hidden])){--mp-game-accent:#28658a;--mp-game-wash:#eaf3fb;--mp-game-line:#abc8dc;}
body.game-page.morning-theme main{max-width:1240px;padding:30px 28px 24px;}
body.morning-theme :is(#sudokuPage .sudoku-game,#msPage .ms-game){font-family:inherit;color:var(--mp-ink);}
body.morning-theme :is(#sudokuPage,#msPage) :is(button,select,input){font-family:inherit;}
body.morning-theme :is(#sudokuPage,#msPage) :is(button,select,input):focus-visible{outline:3px solid var(--mp-game-accent);outline-offset:3px;}
body.morning-theme :is(#sudokuPage,#msPage) button:disabled{cursor:default;}
body.morning-theme :is(#sudokuPage .sudoku-settings,#sudokuPage .sudoku-board-column,#sudokuPage .sudoku-pad,#sudokuPage .sudoku-controls,#sudokuPage .sudoku-game>.help,#msPage .morning-ms-main,#msPage .ms-toolbar,#msPage .block-help){box-sizing:border-box;background:var(--mp-glass-bg);border:1px solid var(--mp-glass-stroke);border-radius:var(--mp-radius-card);box-shadow:var(--mp-glass-shadow),inset 0 1px 0 #fff;}
body.morning-theme :is(#sudokuPage .sudoku-settings,#sudokuPage .sudoku-controls,#sudokuPage .sudoku-pad,#msPage .ms-toolbar){-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);}
body.morning-theme :is(#sudokuPage .sudoku-settings,#sudokuPage .sudoku-controls,#sudokuPage .sudoku-pad,#msPage .ms-puzzle-actions,#msPage .ms-controls) :is(button,select){min-width:44px;min-height:46px;border:1px solid var(--mp-game-line);border-radius:var(--mp-radius-control);background:linear-gradient(150deg,#fff,var(--mp-game-wash));box-shadow:inset 0 1px 0 #fff,0 3px 7px #224a3b09;color:var(--mp-ink);font-size:15px;font-weight:600;}
body.morning-theme :is(#sudokuPage,#msPage) :is(input[readonly],.sudoku-hint-panel){border-color:var(--mp-game-line);border-radius:14px;background:var(--mp-glass-bg-strong);color:var(--mp-ink);}
body.morning-theme :is(#sudokuPage,#msPage) :is(.personal-progress,.block-status,.ws-daily-info){color:var(--mp-muted);line-height:1.65;}
body.morning-theme #sudokuPage .sudoku-game{max-width:816px;margin-inline:auto;}
body.morning-theme #sudokuPage .sudoku-surface{width:100%;margin:0;padding:0;background:transparent;box-shadow:none;border-radius:0;}
body.morning-theme #sudokuPage .sudoku-settings{width:526px;max-width:100%;margin:0;padding:12px;}
body.morning-theme #sudokuPage .sudoku-settings #sudokuDaily[aria-pressed=true]{background:var(--mp-game-accent);border-color:var(--mp-game-accent);color:#fff;}
body.morning-theme #sudokuPage .sudoku-share-box{box-sizing:border-box;max-width:526px;width:100%;margin:12px 0 0;padding:12px;border-radius:16px;background:var(--mp-glass-bg-strong);}
body.morning-theme #sudokuPage .sudoku-play-area{grid-template-columns:minmax(0,526px) minmax(0,266px);gap:24px;margin-top:16px;}
body.morning-theme #sudokuPage .sudoku-board-column{display:block;min-width:0;padding:12px;}
body.morning-theme #sudokuPage .sudoku-grid{max-width:500px;background:#68899c;border-color:#68899c;border-radius:5px;overflow:hidden;}
body.morning-theme #sudokuPage .sudoku-cell{background:#fffefb;border-right-color:#d5e0e7;border-bottom-color:#d5e0e7;color:#205c8d;}
body.morning-theme #sudokuPage .sudoku-cell.given{color:#233e4d;font-weight:750;}
body.morning-theme #sudokuPage .sudoku-cell.block-right{border-right-color:#68899c;}
body.morning-theme #sudokuPage .sudoku-cell.block-bottom{border-bottom-color:#68899c;}
body.morning-theme #sudokuPage .sudoku-cell.peer{background:#edf5fa;}
body.morning-theme #sudokuPage .sudoku-cell.matching{background:#e8edcf;}
body.morning-theme #sudokuPage .sudoku-cell.selected{background:#cee5f6;box-shadow:inset 0 0 0 2px #3b7ba4;}
body.morning-theme #sudokuPage .sudoku-cell.hovered{box-shadow:inset 0 0 0 2px #6b9bb8;}
body.morning-theme #sudokuPage .sudoku-cell.conflict{background:#fce0db;color:#ad302b;}
body.morning-theme #sudokuPage .sudoku-cell:focus-visible{outline-offset:-3px;}
body.morning-theme #sudokuPage .sudoku-notes{color:#4a697c;}
body.morning-theme #sudokuPage .sudoku-side{display:flex;flex-direction:column;gap:16px;min-width:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;}
body.morning-theme #sudokuPage .sudoku-side .sudoku-controls{order:0;padding:12px;gap:8px;margin:0;}
body.morning-theme #sudokuPage .sudoku-side .sudoku-controls button{min-height:60px;font-size:14px;padding:8px 5px;border-radius:17px;}
body.morning-theme #sudokuPage #sudokuNotes[aria-pressed=true]{color:#fff;background:var(--mp-game-accent);border-color:var(--mp-game-accent);}
body.morning-theme #sudokuPage .sudoku-side .sudoku-pad{box-sizing:border-box;order:1;width:100%;padding:12px;margin:0;gap:8px;}
body.morning-theme #sudokuPage .sudoku-pad button{min-height:64px;aspect-ratio:1;font-size:32px;font-weight:600;border-radius:50%;}
body.morning-theme #sudokuPage .sudoku-pad button.digit-complete{color:#66766c;background:#edf1e9;text-decoration:line-through;text-decoration-thickness:2px;}
body.morning-theme #sudokuPage .sudoku-pad #sudokuErase{grid-column:1/-1;min-height:44px;aspect-ratio:auto;font-size:15px;border-radius:999px;}
body.morning-theme #sudokuPage .sudoku-hint-panel{order:2;max-width:none;width:100%;margin:0;padding:16px;}
body.morning-theme #sudokuPage #sudokuStatus{color:var(--mp-ink);font-size:15px;line-height:1.65;margin:14px 0 8px;}
body.morning-theme #sudokuPage .sudoku-game>.help{width:100%;margin:18px 0 0;padding:18px 22px;}
body.morning-theme #sudokuPage .sudoku-game>.help p{color:var(--mp-muted);}
body.morning-theme :is(#sudokuPage .sudoku-completion,#msPage .ms-completion){background:#edf6e9;border:1px solid #b8cfae;border-radius:17px;}
body.morning-theme :is(#sudokuPage .sudoku-completion,#msPage .ms-completion) button{border-radius:999px;box-shadow:inset 0 1px 1px #ffffff55;color:#fff;background:#347152;border-color:#347152;}
body.morning-theme #msPage .ms-game{max-width:816px;margin-inline:auto;}
body.morning-theme #msPage .morning-ms-layout{display:grid;grid-template-columns:minmax(0,502px) minmax(0,290px);gap:24px;align-items:start;}
body.morning-theme #msPage .morning-ms-main{min-width:0;padding:20px;}
body.morning-theme #msPage .ms-puzzle-actions{grid-template-columns:auto auto minmax(0,1fr) auto;gap:8px;margin:0;}
body.morning-theme #msPage .ms-puzzle-actions :is(button,select){font-size:13px;min-height:44px;padding:8px 10px;}
body.morning-theme #msPage .ms-puzzle-actions #msDaily[aria-pressed=true]{background:var(--mp-game-accent);border-color:var(--mp-game-accent);color:#fff;}
body.morning-theme #msPage .morning-ms-side{min-width:0;display:flex;flex-direction:column;gap:18px;}
body.morning-theme #msPage .ms-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:12px;margin:0;padding:18px;}
body.morning-theme #msPage .ms-toolbar>div:not(.ms-controls){padding:14px 12px;border:1px solid #d5e1d7;border-radius:17px;background:var(--mp-glass-bg-strong);}
body.morning-theme #msPage .ms-toolbar>div:not(.ms-controls) span{color:var(--mp-muted);font-size:13px;line-height:1.4;}
body.morning-theme #msPage .ms-toolbar strong{font-size:30px;font-weight:700;color:#2b634e;line-height:1.5;}
body.morning-theme #msPage .ms-toolbar>.ms-controls{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%;margin:0;}
body.morning-theme #msPage .ms-toolbar .ms-controls button{min-height:60px;padding:8px 4px;font-size:13px;border-radius:17px;}
body.morning-theme #msPage .ms-board{width:min(100%,460px);margin:18px auto 0;background:#285542;border-color:#214a38;box-shadow:inset 0 1px 0 #ffffff24,0 5px 12px #21473516;}
/* Tile geometry, faces, brightness states and hit targets use the existing stylesheet unchanged. */
body.morning-theme #msPage .block-help{padding:16px 18px;margin:0;color:var(--mp-muted);}
body.morning-theme #msPage .block-help>summary{font-size:16px;color:var(--mp-ink);font-weight:700;}
body.morning-theme #msPage .block-help p{font-size:14px;line-height:1.75;}
body.morning-theme #msPage .ws-share-fallback{padding:14px;border-radius:16px;background:var(--mp-glass-bg-strong);}
body.morning-theme #msPage .ws-share-fallback input{width:100%;box-sizing:border-box;min-height:44px;font-size:14px;}
body.morning-theme :is(#msConfirm,#progressDialog,#feedbackDialog){background:#f9fcf7;border:1px solid #b9cec0;border-radius:22px;box-shadow:0 18px 60px #183e2d29;color:var(--mp-ink);}
/* Match the primary playing column, keeping secondary controls/word lists outside the help bar. */
body.morning-theme:has(#sudokuPage:not([hidden])){--mp-help-width:526px;}
body.morning-theme:has(#msPage:not([hidden])){--mp-help-width:502px;}
body.morning-theme:has(:is(#ngPage,#wsPage,#m3Page):not([hidden])){--mp-help-width:508px;}
body.morning-theme:has(:is(#twentyPage,#blocksPage):not([hidden])){--mp-help-width:498px;}
body.morning-theme:has(#mahjongPage:not([hidden])){--mp-help-width:720px;}
body.morning-theme:has(#solPage:not([hidden])){--mp-help-width:850px;}
body.morning-theme:has(#cardsPage:not([hidden])){--mp-help-width:680px;}
body.morning-theme:has(#speedsortPage:not([hidden])){--mp-help-width:1100px;}
body.morning-theme:has(#speedsortPage:not([hidden])):has(#gameWorkspace:not([hidden])){--mp-help-width:100%;}
body.morning-theme .game-description{width:100%;max-width:var(--mp-help-width,816px);margin:24px auto 20px;padding:0;border:1px solid var(--mp-glass-stroke);border-radius:14px;background:var(--mp-glass-bg-strong);font-family:inherit;font-size:15px;color:var(--mp-muted);box-sizing:border-box;}
body.morning-theme .game-description h1{font-family:inherit;color:var(--mp-ink);}
body.morning-theme .game-description #gameHelp>summary{display:flex;align-items:center;gap:10px;box-sizing:border-box;cursor:pointer;min-height:48px;padding:4px 14px;list-style:none;line-height:20px;color:var(--mp-ink);}
body.morning-theme .game-description #gameHelp>summary::-webkit-details-marker{display:none;}
body.morning-theme .game-description #gameHelp>summary::marker{content:"";}
body.morning-theme .game-description #gameHelp>summary::before{content:"";flex:none;width:6px;height:6px;border-right:1.5px solid var(--mp-muted);border-bottom:1.5px solid var(--mp-muted);transform:rotate(-45deg);}
body.morning-theme .game-description #gameHelp[open]>summary::before{transform:rotate(45deg);}
body.morning-theme .game-description #gameHelp>summary h1{font-size:16px;font-weight:600;line-height:20px;letter-spacing:0;margin:0;min-width:0;}
body.morning-theme .game-description :is(.game-about,.game-instructions){padding:18px;}
body.morning-theme .game-description .game-about{padding-bottom:12px;}
body.morning-theme .game-description #gameHelp:has(.game-instructions:not([hidden]):not(:empty)) .game-about{border-bottom:1px solid var(--mp-game-line);}
body.morning-theme .game-description .game-instructions:empty{display:none;}
body.morning-theme .game-description h2{font-family:inherit;font-size:18px;font-weight:700;line-height:1.5;letter-spacing:0;margin:0 0 12px;}
body.morning-theme .game-description h3{font-size:16px;letter-spacing:0;}
body.morning-theme footer{max-width:816px;margin:24px auto 0;color:var(--mp-muted);font-size:12px;line-height:2;}
body.morning-theme footer :is(a,button){color:#2c624d;}
@media(min-width:901px){body.morning-theme #sudokuPage .sudoku-settings :is(button,select){font-size:15px;}}
@media(max-width:900px){
 body.morning-theme:has(#sudokuPage:not([hidden])){--mp-help-width:532px;}
 body.morning-theme:has(:is(#ngPage,#wsPage,#m3Page):not([hidden])){--mp-help-width:492px;}
 body.morning-theme:has(:is(#twentyPage,#blocksPage):not([hidden])){--mp-help-width:482px;}
 body.game-page.morning-theme main{padding:24px 18px;}
 body.morning-theme #sudokuPage .sudoku-game{max-width:532px;}
 body.morning-theme #sudokuPage .sudoku-play-area{grid-template-columns:minmax(0,1fr);gap:14px;}
 body.morning-theme #sudokuPage .sudoku-board-column{display:block;}
 body.morning-theme #sudokuPage .sudoku-side{margin:0;gap:12px;}
 body.morning-theme #sudokuPage .sudoku-side .sudoku-controls{order:0;grid-template-columns:repeat(3,minmax(0,1fr));padding:12px;}
 body.morning-theme #sudokuPage .sudoku-side .sudoku-controls button{min-height:48px;}
 body.morning-theme #sudokuPage .sudoku-side .sudoku-pad{order:1;grid-template-columns:repeat(5,minmax(0,1fr));padding:12px;}
 body.morning-theme #sudokuPage .sudoku-pad button{aspect-ratio:1;min-height:44px;font-size:26px;}
 body.morning-theme #sudokuPage .sudoku-pad #sudokuErase{grid-column:auto;font-size:12px;}
 body.morning-theme #msPage .ms-game{max-width:502px;}
 body.morning-theme #msPage .morning-ms-layout{grid-template-columns:minmax(0,1fr);gap:16px;}
 body.morning-theme #msPage .ms-toolbar{padding:16px;gap:12px;}
 body.morning-theme #msPage .ms-toolbar>.ms-controls{grid-column:1/-1;}
}
@media(max-width:600px){
 body.game-page.morning-theme main{padding:22px 14px;}
 body.morning-theme #sudokuPage .sudoku-surface{box-sizing:border-box;width:calc(100% + 22px);margin-inline:-11px;padding:10px;border:1px solid var(--mp-glass-stroke);border-radius:22px;background:var(--mp-glass-bg);box-shadow:var(--mp-glass-shadow);}
 body.morning-theme #sudokuPage .sudoku-settings{width:100%;padding:0;border:0;background:transparent;box-shadow:none;}
 body.morning-theme #sudokuPage .sudoku-board-column{display:contents;}
 body.morning-theme #sudokuPage .sudoku-side{margin-top:14px;}
 body.morning-theme #sudokuPage .sudoku-puzzle-controls{gap:5px;}
 body.morning-theme #sudokuPage .sudoku-puzzle-controls :is(select,button){font-size:12px;padding:8px 5px;}
 body.morning-theme #sudokuPage .sudoku-game>.help{padding:16px;margin-inline:0;}
 body.morning-theme #sudokuPage .sudoku-pad button{font-size:24px;}
 body.morning-theme #sudokuPage .sudoku-side .sudoku-pad{padding:10px;gap:6px;}
 body.morning-theme #msPage .morning-ms-layout{display:flex;flex-direction:column;align-items:stretch;gap:12px;}
 body.morning-theme #msPage :is(.morning-ms-main,.morning-ms-side){display:contents;}
 body.morning-theme #msPage .ms-puzzle-actions{order:0;padding:12px;border:1px solid var(--mp-glass-stroke);border-radius:20px;background:var(--mp-glass-bg);box-shadow:var(--mp-glass-shadow);}
 body.morning-theme #msPage :is(#msDailyInfo,#msShareFallback){order:1;margin:0;}
 body.morning-theme #msPage .ms-toolbar{order:2;padding:12px;gap:8px;}
 body.morning-theme #msPage .ms-toolbar>div:not(.ms-controls){display:flex;align-items:center;justify-content:space-between;padding:6px 10px;}
 body.morning-theme #msPage .ms-toolbar strong{font-size:24px;}
 body.morning-theme #msPage .ms-toolbar .ms-controls button{min-height:44px;}
 body.morning-theme #msPage .ms-board{order:3;}
 body.morning-theme #msPage #msWin{order:4;}
 body.morning-theme #msPage :is(#msStatus,#msProgress,#msStorage){order:5;margin:0;}
 body.morning-theme #msPage .block-help{order:6;margin-top:4px;}
 body.morning-theme #msPage .ms-puzzle-actions{grid-template-columns:repeat(2,minmax(0,1fr));}
 body.morning-theme #msPage .ms-puzzle-actions :is(button,select){font-size:14px;}
 body.morning-theme #msPage .ms-board{margin-top:16px;}
 body.morning-theme .game-description{max-width:100%;margin-inline:0;}
 body.morning-theme .game-description #gameHelp>summary h1{font-size:15px;}
}
/* Routine headers retain their compact controls; no visual theme can reveal routine-hidden controls. */
body.routine-active.morning-theme .topbar.playroom-header .topbar-inner{grid-template-columns:auto minmax(0,1fr) auto;}
body.routine-active.morning-theme .topbar.playroom-header .brand{width:auto;gap:8px;}
body.routine-active.morning-theme .topbar.playroom-header .brand .home-wordmark{display:inline!important;}
body.routine-active.morning-theme #sudokuPage .sudoku-settings{display:none;}
body.routine-active.morning-theme #msPage .morning-ms-layout{grid-template-columns:minmax(0,502px) minmax(0,290px);}
body.routine-active.morning-theme #sudokuPage .sudoku-side .sudoku-controls{grid-template-columns:repeat(2,minmax(0,1fr));}
@media(max-width:900px){body.routine-active.morning-theme #msPage .morning-ms-layout{grid-template-columns:1fr;}}
@media(max-width:650px){body.routine-active.morning-theme .topbar.playroom-header .brand{font-size:16px;letter-spacing:.3px;}}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more){
 body.morning-theme :is(#sudokuPage .sudoku-settings,#sudokuPage .sudoku-controls,#sudokuPage .sudoku-pad,#msPage .ms-toolbar){-webkit-backdrop-filter:none;backdrop-filter:none;}
}
@media(forced-colors:active){body.morning-theme :is(#sudokuPage .sudoku-board-column,#sudokuPage .sudoku-controls,#sudokuPage .sudoku-pad,#msPage .morning-ms-main,#msPage .ms-toolbar){border:1px solid CanvasText;}body.morning-theme #sudokuPage .sudoku-cell.selected{outline:2px solid Highlight;outline-offset:-3px;}}

/* One desktop starting edge across games of different natural widths. */
@media(min-width:901px){
 body.game-page.morning-theme:not(.routine-active) :is(#sudokuPage .sudoku-game,#msPage .ms-game,#ngPage .ng-game,#wsPage .ws-game,#m3Page .m3-game,#solPage .sol-game,#twentyPage .framed-game,#blocksPage .framed-game,#cardsPage .cards-game,#speedsortPage .mode-picker,#speedsortPage .workspace-layout){margin-inline:0;}
 body.game-page.morning-theme:not(.routine-active) #mahjongPage .mahjong-layout{margin-inline:0;justify-content:start;}
 body.game-page.morning-theme:not(.routine-active) :is(.game-description,footer){margin-inline:0;}
}

/* Final editorial pass: supporting text only; puzzle glyphs keep their own rules. */
body.morning-theme .personal-progress{font-size:14px;line-height:1.65;}
body.morning-theme :is(#msPage #msStatus,#solPage #solStatus,#cardsPage #cardsStatus){font-size:14px;line-height:1.65;}
body.morning-theme .game-description .notes p{font-size:15px;line-height:1.75;}
body.morning-theme .game-description .keyboard-guide div{font-size:14px;line-height:1.65;}
body.morning-theme #msPage :is(.ms-puzzle-actions,.ms-controls) :is(button,select){font-size:14px;}
body.morning-theme #sudokuPage .sudoku-meta{font-size:12px;line-height:1.6;}
@media(max-width:900px){
 body.morning-theme :is(#wsPage #wsStatus,#ngPage #ngStatus,#m3Page #m3Status,#blocksPage #blocksStatus,#twentyPage #twentyStatus){font-size:14px;line-height:1.65;}
 body.morning-theme #sudokuPage .sudoku-pad #sudokuErase{font-size:13px;}
}
@media(max-width:600px){
 body.morning-theme #sudokuPage .sudoku-puzzle-controls :is(select,button){font-size:14px;}
}
@media(max-width:370px){
 body.morning-theme #sudokuPage .sudoku-puzzle-controls{grid-template-columns:repeat(2,minmax(0,1fr));}
}
body.morning-theme #msPage .ms-toolbar .ms-controls button{font-size:14px;}
