/* Shared game-page additions to the homepage table layout. */
.shared-play-page .home-game-layout a:any-link {color:inherit;text-decoration:none;}
.shared-play-page .home-game-layout a.brand {font-weight:750;}
.shared-play-page .home-play {overflow:visible;}
.shared-play-page .home-game-header {background:transparent!important;line-height:1.3;}
.shared-game-title {position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
.home-game-options {display:flex;align-items:center;gap:7px;flex:none;}
.home-game-options:empty {display:none;}
.home-game-options label {font-size:12px;display:flex;align-items:center;gap:5px;}
.home-game-options select {font:650 12px system-ui;min-height:32px;padding:0 7px;border:1px solid #ffffff30;border-radius:6px;background:#54803b;color:#fffdf4;max-width:145px;}
.home-game-options option {background:#3c702e;color:#fff;}
.shared-play-page .home-game-menu nav {max-height:min(65dvh,560px);overflow-y:auto;overscroll-behavior:contain;}
.shared-play-page .home-more-panel {max-height:min(65dvh,580px);overflow-y:auto;overscroll-behavior:contain;}
.shared-play-page .home-more-panel .scroll-hint {display:flex;position:static;transform:none;opacity:1;}
.shared-play-page .home-more-panel .language-menu {display:block;margin:5px 10px;color:#284622;}
.shared-play-page .home-more-panel .language-menu ul {position:static;background:#e7efd9;border:0;box-shadow:none;margin-top:5px;}
.shared-play-page .home-more-panel .language-menu a {color:#284622!important;}
.shared-play-page .home-more-panel .language-menu summary {color:#284622;}
.shared-play-page .home-game-menu a[aria-current] {background:#e8efd9;color:#284622;}
.shared-play-page .home-game-layout .card-face {border-radius:7px;}
.shared-play-page .shared-game-content {max-width:1100px;margin:0 auto;padding:0 24px;}
.shared-play-page .rating-wrap {margin:20px auto;}
.shared-play-page .home-play .home-toolbar .ctl-btn {line-height:1.2;}
.shared-play-page .home-toolbar svg {width:16px;height:16px;flex:none;}
.shared-play-page .home-toolbar .ctl-btn svg use {pointer-events:none;}
.shared-play-page .home-toolbar .ctl-btn:disabled {opacity:.5;cursor:default;}
.shared-hud {margin-left:auto;}
.home-game-layout .game-cat {display:none;}
.shared-play-page .home-game-options .menu-button {min-height:32px;padding:3px 9px;border-radius:6px;min-width:0;background:#ffffff20;box-shadow:none;font-size:12px;}
.home-game-options .menu-copy small,.home-game-options .menu-button>.control-icon {display:none;}
.home-game-options .menu-copy strong {font-size:12px;}
/* Mahjong keeps its existing tile-size and full-screen controls. */
.mahjong-live.shared-play-page #game {max-width:none;width:auto;margin:0;padding:0;}
.mahjong-live.shared-play-page .table {display:flex;flex-direction:column;flex:1;min-height:0;border:0;border-radius:0;box-shadow:none;background:transparent;overflow:visible;}
.mahjong-live.shared-play-page .board-scroll {flex:1;min-height:0;width:100%;padding:8px 12px;}
.mahjong-live.shared-play-page .home-game-layout #board {flex:none;max-width:none;min-height:0;margin:auto;}
.mahjong-live.shared-play-page .shared-board-message {flex:none;margin:0;padding:4px 16px;font-size:11px;min-height:25px;}
.mahjong-live.shared-play-page .shared-hud {display:flex;gap:12px;}
.mahjong-live.shared-play-page .shared-hud>div {display:flex;flex-direction:row;align-items:center;gap:4px;}
.mahjong-live.shared-play-page .shared-hud span {font-size:10px;letter-spacing:0;}
.mahjong-live.shared-play-page .shared-hud strong {font-size:12px;}
.mahjong-live.shared-play-page .heading {display:none;}
.mahjong-live.shared-play-page .home-toolbar button {width:auto;}
/* Sudoku's number pad stays next to the board on desktop and under it on phones. */
.sudoku-page.shared-play-page main.home-play {max-width:none;width:auto;margin:0;padding:0;}
.sudoku-page.shared-play-page #sudoku-game {display:grid;grid-template-columns:minmax(0,1fr) 130px;align-items:center;justify-content:center;gap:18px;flex:1;min-height:0;max-width:760px;width:100%;margin:0 auto;padding:12px 20px;}
.sudoku-page.shared-play-page .board-panel {width:min(100%,calc(100dvh - var(--home-consent-space,0px) - 160px));min-width:0;margin:auto;}
.sudoku-page.shared-play-page .home-game-layout #board {width:100%;height:auto;max-width:none;aspect-ratio:1;margin:0;flex:none;}
.sudoku-page.shared-play-page .number-pad {grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:0;}
.sudoku-page.shared-play-page .number-pad button {height:48px;min-height:44px;font-size:24px;padding:0;gap:0;}
.sudoku-page.shared-play-page .number-pad small {display:none;}
.sudoku-page.shared-play-page .board-bottom {font-size:10px;margin:7px 0;}
.sudoku-page.shared-play-page .game-status {grid-column:1/-1;font-size:11px;margin:0;min-height:18px;}
.sudoku-page.shared-play-page .clock {display:flex;align-items:center;gap:6px;font-size:13px;}
.sudoku-page.shared-play-page .clock button {min-height:28px;padding:3px;}
.sudoku-page.shared-play-page .home-game-options .difficulty {min-height:32px;padding:4px 8px;font-size:12px;}
.sudoku-page.shared-play-page .home-toolbar #notes[aria-pressed=true] {background:#dcebbf;border-color:#b1c592;color:#284622;}
.shared-play-page .home-toolbar .home-more-panel button {min-height:38px;width:100%;background:transparent;border:0;box-shadow:none;color:#284622;padding:10px 11px;justify-content:flex-start;}
@media(max-width:1300px){.shared-play-page .home-game-header .brand-accent{display:none;}.shared-play-page .home-game-header{gap:9px;}.shared-play-page .home-game-header .brand{font-size:17px;}}
@media(max-width:700px){
 .shared-play-page .home-game-header{grid-template-columns:auto auto auto;}
 .shared-play-page .home-game-options{gap:4px;}
 .shared-play-page .home-game-options select{max-width:120px;font-size:11px;}
 .shared-play-page .shared-hud{grid-column:1/-1;justify-content:center;margin:0;}
 .shared-play-page .home-game-options:empty+details{grid-column:3;}
 .shared-play-page .home-toolbar .controls .ctl-btn{font-size:11px;}
 .mahjong-live.shared-play-page .home-game-options .menu-button{padding-inline:6px;}
 .mahjong-live.shared-play-page .home-game-options .menu-copy strong{font-size:10px;max-width:64px;overflow:hidden;text-overflow:ellipsis;display:block;}
 .mahjong-live.shared-play-page .home-game-header .brand{font-size:15px;}
 .mahjong-live.shared-play-page .home-game-header .brand-logo{display:none;}
 .sudoku-page.shared-play-page #sudoku-game{display:flex;flex-direction:column;justify-content:center;gap:10px;padding:8px 12px;}
 .sudoku-page.shared-play-page .board-panel{width:min(100%,calc(100dvh - var(--home-consent-space,0px) - 290px));}
 .sudoku-page.shared-play-page .number-pad{display:grid;width:100%;max-width:450px;grid-template-columns:repeat(9,minmax(0,1fr));gap:4px;}
 .sudoku-page.shared-play-page .number-pad button{height:38px;min-height:38px;font-size:21px;}
 .sudoku-page.shared-play-page .home-toolbar .controls .ctl-btn{font-size:10px;gap:3px;}
 .sudoku-page.shared-play-page .home-toolbar .controls .ctl-btn svg{display:none;}
}
@media(max-height:480px) and (orientation:landscape){
 .sudoku-page.shared-play-page #sudoku-game{display:grid;grid-template-columns:auto 120px;gap:14px;padding:4px 12px;}
 .sudoku-page.shared-play-page .board-panel{width:calc(100dvh - var(--home-consent-space,0px) - 132px);}
 .sudoku-page.shared-play-page .number-pad{grid-template-columns:repeat(3,minmax(0,1fr));width:120px;}
 .sudoku-page.shared-play-page .number-pad button{height:34px;min-height:34px;}
 .sudoku-page.shared-play-page .board-bottom{display:none;}
 .sudoku-page.shared-play-page .game-status{display:none;}
}
/* Puzzle pages do not load the card engine's base flex layout. */
.shared-play-page .home-game-layout .home-play {display:flex;flex-direction:column;}
.shared-play-page .home-game-layout .home-game-header {display:flex;align-items:center;flex:0 0 auto;}
.shared-play-page .home-daily-slot .daily-entry {display:flex;align-items:center;justify-content:center;}
.sudoku-page.shared-play-page #sudoku-game>.board-panel {grid-column:1;grid-row:1;}
.sudoku-page.shared-play-page #sudoku-game>.number-pad {grid-column:2;grid-row:1;}
.sudoku-page.shared-play-page #sudoku-game>.game-status {grid-column:1/-1;grid-row:2;}
@media(max-width:700px) and (min-height:481px){
 .shared-play-page .home-game-layout .home-game-header {display:grid;grid-template-columns:1fr auto;min-height:68px;}
 .shared-play-page .home-game-header .brand {grid-column:1;grid-row:1;}
 .shared-play-page .home-game-menu {grid-column:2!important;grid-row:1;}
 .shared-play-page .home-game-options {grid-column:1/-1;grid-row:2;justify-content:center;}
 .shared-play-page .shared-hud {grid-column:1/-1;grid-row:2;}
 .shared-play-page .home-game-header:has(.home-game-options) .shared-hud {grid-row:3;}
 .sudoku-page.shared-play-page .home-toolbar .controls .ctl-btn {padding:0 4px;font-size:10px;}
 .sudoku-page.shared-play-page .home-game-layout .board-panel {width:min(100%,calc(100dvh - var(--home-consent-space,0px) - 320px));}
}
.shared-play-page .home-toolbar .ctl-btn {margin:0;}
@media(max-width:700px){
 .shared-play-page .game-content table {width:100%;table-layout:fixed;}
 .shared-play-page .game-content th,.shared-play-page .game-content td {white-space:normal;overflow-wrap:anywhere;}
}
