.math-support-actions{display:flex;justify-content:center;gap:10px;flex-shrink:0}.math-support-actions .chip{min-height:36px;padding:7px 16px}.player-name-dialog{width:min(92vw,400px);padding:23px;background:#fff8e9;border:2px solid #dfc29c;border-radius:24px}.player-name-dialog h2{font-size:24px;margin:0 0 10px}.player-name-dialog label{display:block;font-size:14px;margin:18px 0 8px}.player-name-dialog input{box-sizing:border-box;width:100%;border:2px solid #c6d7c1;border-radius:14px;background:#fffdf6;padding:12px;font:inherit;color:#456650}.player-name-dialog .primary{width:100%;margin-top:8px}.player-sharing-note{font-size:12px;line-height:1.4;color:#947d62}.name-error{font-size:12px;color:#ba5257}.results-dialog{padding:18px;box-sizing:border-box;width:min(calc(100vw - 16px),720px);max-width:calc(100vw - 16px);max-height:calc(100dvh - 24px);height:calc(100dvh - 24px);overflow:hidden;background:#fff8e9;border:2px solid #dabe97;border-radius:25px}.results-dialog[open]{display:flex;flex-direction:column;gap:10px}.results-dialog .avatar-dialog-header{margin:0;flex-shrink:0}.results-dialog h2{font-size:25px}.results-dialog .avatar-dialog-header p{font-size:13px;margin:5px 0}.results-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;background:#eee5d5;padding:4px;border-radius:14px;flex-shrink:0}.results-tabs button{padding:9px 5px;background:transparent;color:#8a775e;font-size:15px;border-radius:11px}.results-tabs button[aria-selected=true]{background:#dce9dc;color:#3c6857;box-shadow:inset 0 1px #f8fff3}.results-stats{display:grid;grid-template-columns:1fr 1fr;gap:9px;flex-shrink:0}.results-stats>div{padding:12px;background:#f5efdc;border:1px solid #e4d6ba;border-radius:16px}.results-stats b{display:block;color:#4b7964;font-size:27px}.results-stats span{font-size:11px;display:block;color:#8d7b60;line-height:1.3}.results-explanation{font-size:11px!important;line-height:1.4;color:#9b8569;margin:0!important;flex-shrink:0}.results-scroll{overflow:auto;overscroll-behavior:contain;min-height:100px;flex:1;border:1px solid #eadac0;border-radius:15px;background:#fffdf5}.results-scroll table{width:100%;border-collapse:collapse;text-align:left;font-size:14px}.results-scroll th{position:sticky;top:0;background:#eee8d6;font-size:11px;color:#8d775c;z-index:1}.results-scroll td,.results-scroll th{padding:12px 9px;border-bottom:1px solid #eee4ce}.results-scroll td{white-space:nowrap;color:#596c54}.results-scroll .result-wrong{color:#c34e58;background:#fcebea;font-weight:600}.results-sync{font-size:10px!important;color:#9a876e;margin:0!important;flex-shrink:0}.results-empty{padding:20px;text-align:center;font-size:14px!important;line-height:1.5}.results-more{display:block;margin:12px auto;font-size:13px}.results-dialog [hidden]{display:none!important}@media(max-height:650px){.results-dialog{padding:13px;gap:7px}.results-stats>div{padding:8px}.results-stats b{font-size:23px}.math-support-actions .chip{min-height:32px;padding:5px 14px}}

.player-header-actions{display:flex;align-items:center;gap:8px;margin-left:auto;flex-shrink:0;order:2}.header-report{display:grid;place-items:center;box-sizing:border-box;width:40px;height:40px;padding:8px;background:linear-gradient(#f8fff3,#dfead8);color:#52775f;border:1.5px solid #bdceb1;border-radius:13px;box-shadow:inset 0 2px #fff,0 2px #acbc9d;cursor:pointer;flex-shrink:0}.header-report svg{width:23px;height:23px}.header-report:focus-visible{outline:3px solid #1b817e;outline-offset:3px}.header-report:active{box-shadow:inset 0 1px #fff,0 1px #acbc9d}@media(max-width:360px){.player-header-actions{gap:6px}.header-report{width:36px;height:36px;padding:6px}header:has(.player-header-actions) #screen-title{font-size:19px}}

/* Persistent utility controls; footer is reserved for the three destinations. */
header:has(.player-header-actions)>div:first-child{flex:1;min-width:0}header:has(.player-header-actions) #screen-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.player-header-actions{gap:5px}.player-header-actions .header-report,.player-header-actions .refresh-game,.player-header-actions .game-menu summary{box-sizing:border-box;display:grid;place-items:center;width:34px;height:36px;min-width:34px;padding:6px;border:1px solid #d8c6a7;border-radius:11px;background:linear-gradient(#fffaf0,#f3e4ce);box-shadow:inset 0 2px white,0 2px #d1b694;color:#806445;cursor:pointer}.player-header-actions .header-report{order:1;background:linear-gradient(#f8fff3,#dfead8);border-color:#bdceb1;color:#52775f}.player-header-actions .coins{order:0;white-space:nowrap}.player-header-actions .refresh-game{order:2}.player-header-actions .game-menu{order:3}.player-header-actions svg{width:21px;height:21px}.player-header-actions .menu-dropdown{top:calc(100% + 10px);bottom:auto;right:0;z-index:100}.player-header-actions .refresh-game:focus-visible{outline:3px solid #1b817e;outline-offset:3px}@media(max-width:420px){header:has(.player-header-actions) #screen-title{font-size:18px}.player-header-actions .coins{font-size:14px;padding:6px}.player-header-actions{gap:4px}.player-header-actions .header-report,.player-header-actions .refresh-game,.player-header-actions .game-menu summary{width:32px;min-width:32px;height:34px}}

/* One header treatment across Room, Earn and Shop. */
.app>header{flex-shrink:0;display:flex;flex-wrap:nowrap;align-items:center;gap:6px;min-height:36px;margin:0 0 10px;padding:0 0 8px;border:0}
.app>header #screen-title{font-size:22px;line-height:1.2;font-weight:600;margin:0;color:var(--ink);text-shadow:none}
.app>header .coins{font-size:17px;padding:8px 12px;margin-left:0}
@media(max-height:650px){.app>header{margin-bottom:7px;padding-bottom:3px}.app>header #screen-title{font-size:20px}}
@media(max-width:420px){.app>header #screen-title{font-size:18px}.app>header .coins{font-size:15px;padding:7px 8px}}
@media(orientation:landscape) and (max-height:500px){.app>header{margin-bottom:4px;padding-bottom:0}.app>header #screen-title{font-size:18px}}
