/* Page layouts, scoped independently from business behavior. */
#admin-shell main>header {flex-wrap:wrap;align-items:center}
#admin-shell main>header>div:last-child {flex-wrap:wrap;gap:6px;min-width:0}
#admin-shell .environment-note {padding:5px 8px;line-height:1.4}
#admin-content[data-section=overview] {display:grid;grid-template-columns:minmax(0,1.6fr) minmax(260px,1fr);gap:10px;align-content:start}
#admin-content[data-section=overview]>.stats {grid-column:1/-1;margin:0}
#admin-content[data-section=overview]>.box {margin:0;min-width:0}
#admin-content[data-section=overview]>.box:last-child {grid-column:1/-1}
#admin-content[data-section=overview] .recent {display:grid;grid-template-columns:150px 130px minmax(0,1fr);gap:12px;padding:7px 0;font-size:12px}
#admin-content[data-section=overview] .recent>* {overflow-wrap:anywhere;min-width:0}
#admin-content[data-section=members] th:nth-child(3),#admin-content[data-section=members] td:nth-child(3) {display:none}
#admin-content[data-section=lottery] {display:flex;flex-direction:column;gap:10px;overflow:auto}
.lottery-intro {display:flex;align-items:center;gap:6px 16px;flex-wrap:wrap}
#admin-shell .lottery-intro h2 {margin:0}
.lottery-intro>p {flex-basis:100%;order:2;margin:0;color:var(--muted);font-size:11px}
.lottery-shortcuts {display:flex;gap:12px;margin-left:auto;font-size:11px;flex-wrap:wrap}
#admin-shell .lottery-credit-panel {display:grid;grid-template-columns:150px 180px minmax(180px,1fr) auto;gap:8px;align-items:end;padding:12px;background:#111;border:1px solid #2b2b2b;border-radius:8px}
#admin-shell .lottery-credit-panel label {margin:0;min-width:0;display:grid}
.lottery-credit-panel output {grid-column:1/-1;min-height:0}
.lottery-reports {min-height:240px;flex:1;display:flex;flex-direction:column;border:1px solid #2b2b2b;border-radius:8px;overflow:hidden}
.report-tabs {display:flex;gap:5px;padding:8px;background:#111;border-bottom:1px solid #2b2b2b;flex-wrap:wrap}
.report-tabs [aria-selected=true] {background:#30291c!important;border-color:#a88d4d!important;color:#ecd18a}
.lottery-report {min-height:0;overflow:auto;flex:1}
#admin-content .lottery-report table {table-layout:auto}
#admin-content .lottery-report th,#admin-content .lottery-report td {font-size:12px;padding:7px 10px;max-width:280px}
.lottery-report th {position:sticky;top:0;background:#191919;z-index:1}
.lottery-report td:nth-last-child(2) {font-variant-numeric:tabular-nums}
#admin-shell .game-switch-toolbar {position:sticky;top:0;z-index:2;background:#111;padding:10px;border:1px solid #333;border-radius:7px;margin:0 0 10px;align-items:center;gap:6px}
#admin-shell .game-switch-toolbar>input {flex:1 1 160px;min-width:120px}
#admin-shell .game-switch-toolbar .admin-choice-strip {flex:2 1 300px}
#admin-shell .game-switch-toolbar>button {margin-left:auto}
#admin-shell .game-switch-card {padding:10px;border-radius:7px}
#admin-shell .game-switch-card summary {font-size:13px}
#admin-shell .game-switch-list {grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:8px}
#admin-shell .game-switch-master,#admin-shell .game-switch-row {padding:6px 0;margin-top:0;gap:8px}
#admin-shell .game-switch-control input {width:18px;height:18px}
#admin-shell .game-switch-actions {gap:5px;margin:6px 0}
#admin-shell .game-category-switches {margin:8px 0}
#admin-shell .category-switch-grid {grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:0 12px}
/* Fishing retains its existing controls and section order. */
html:has(#fishing-admin-form) main {max-width:none;margin:0;padding:12px}
html:has(#fishing-admin-form) .admin-heading {margin:0 0 6px;gap:10px}
html:has(#fishing-admin-form) h1 {font-size:17px;margin:0 0 3px}
html:has(#fishing-admin-form) p {font-size:11px;line-height:1.4;margin:4px 0 7px}
#fishing-admin-form .admin-toolbar {gap:8px;margin:8px 0;align-items:center}
#fishing-admin-form .admin-toolbar label {flex:1;min-width:0;margin:0;gap:4px}
#fishing-admin-form .admin-choice-strip {gap:4px;margin:0}
#fishing-admin-form button {padding:4px 8px;font-size:11px;line-height:1.4;color:#ddd;min-height:26px}
#fishing-admin-form #save-config {position:sticky;bottom:0;background:#d8b976;color:#20201a;white-space:nowrap}
#fishing-admin-form section {padding:10px;margin:8px 0;border-radius:8px}
#fishing-admin-form section h2 {font-size:13px;margin:0 0 6px}
#fishing-admin-form .settings-grid {gap:6px 12px;grid-template-columns:repeat(4,minmax(0,1fr));align-items:start}
#fishing-admin-form .settings-grid label {font-size:11px;gap:4px;margin:0;min-width:0}
#fishing-admin-form input,#fishing-admin-form select {padding:4px 6px;min-height:27px;font-size:12px;line-height:1.4;width:100%}
#fishing-admin-form #daily-settings {grid-template-columns:repeat(2,minmax(0,1fr));max-width:680px}
#fishing-admin-form #daily-stats>.settings-grid {grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;padding:8px 0}
#fishing-admin-form #daily-stats strong {font-size:18px!important;line-height:1.3}
#fishing-admin-form #daily-stats span {font-size:11px;color:#aaa}
#fishing-admin-form #cannon-settings {grid-template-columns:repeat(6,minmax(0,1fr))}
#fishing-admin-form #test-boss-sound {margin-top:7px}
#fishing-admin-form #admin-status:empty {display:none}
#fishing-admin-form .table-scroll table {min-width:650px}
#fishing-admin-form td,#fishing-admin-form th {padding:5px;font-size:11px}
@media(max-width:1000px){#admin-content[data-section=overview]{grid-template-columns:1fr}#admin-content[data-section=overview]>.box{grid-column:1}#admin-shell .lottery-credit-panel{grid-template-columns:1fr 1fr}#fishing-admin-form .settings-grid{grid-template-columns:repeat(3,minmax(0,1fr))}#fishing-admin-form #cannon-settings{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){#admin-content[data-section=overview] .recent{grid-template-columns:1fr 1fr;gap:4px}#admin-content[data-section=overview] .recent>*:last-child{grid-column:1/-1}#admin-shell .lottery-credit-panel{grid-template-columns:1fr}#fishing-admin-form .settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#fishing-admin-form #daily-stats>.settings-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.lottery-shortcuts{margin-left:0}}
