/* Shared menu/control skin: no browser-default buttons on secondary screens. */
:where(.modal) button{appearance:none;font:inherit;cursor:pointer;min-height:44px;padding:12px 16px;border:1px solid var(--gr-border);border-radius:12px;background:var(--gr-surface);color:var(--gr-ink)}
.modal button:disabled{cursor:default}
.modal .text-button,.modal .back-link{appearance:none;border:0;border-radius:12px;padding:12px 16px;min-height:48px;background:var(--gr-soft);color:var(--gr-ink);font-size:14px;font-weight:600;box-shadow:none;line-height:1.5}
.modal .text-button{width:100%;margin:8px 0;display:flex;align-items:center;justify-content:center;gap:10px;text-wrap:balance}
.modal .back-link{display:inline-flex;align-items:center;gap:8px;width:auto;align-self:flex-start;margin:0 0 20px;background:#f4f6fa;color:var(--gr-muted);font-size:13px}
.modal .back-link:hover,.modal .text-button:hover{background:#e2eaff}
.modal .back-link:active,.modal .text-button:active{transform:translateY(1px)}
.modal .secondary{appearance:none;border-radius:16px;padding:14px 16px;font-size:15px;font-weight:600;line-height:1.45}
.modal .primary{border-radius:16px;min-height:52px;line-height:1.4}
.solo-screen{text-align:left}
.solo-screen>h2{font-size:26px;color:var(--gr-ink);margin:0 0 24px}
.solo-screen>.eyebrow{display:none}
.solo-screen .resume-card{text-align:left;padding:20px;font-size:23px}
.solo-screen .resume-card small{margin-top:8px;font-size:13px;font-weight:500}
.solo-screen #newSolo{font-size:16px}
.solo-screen .learn-game{min-height:72px;padding:14px 16px}
.solo-screen .learn-icon{background:transparent;box-shadow:none;border:0;border-radius:0;padding:0}
.gr-menu-row{display:flex!important;align-items:center;gap:14px;text-align:left!important;width:100%}
.gr-menu-row img{width:42px;height:42px;object-fit:contain;flex:none}
.gr-menu-row .gr-menu-copy{flex:1;min-width:0;display:grid;gap:4px;color:var(--gr-ink)!important}
.gr-menu-row .gr-menu-copy strong{font-size:15px;line-height:1.45;font-weight:650}
.gr-menu-row .gr-menu-copy small{font-size:12px;line-height:1.5;color:var(--gr-muted)!important;font-weight:400}
.gr-menu-row .gr-menu-chevron{color:var(--gr-muted)!important;font-size:24px;font-weight:400}
.modal .home-settings{border:0;border-top:1px solid var(--gr-border);margin:16px 0 8px;padding:4px 0}
.modal .home-settings>summary{justify-content:space-between;text-align:left;font-size:14px;font-weight:600;padding:10px 4px;min-height:48px;list-style:none;color:var(--gr-ink)}
.modal .home-settings>summary:after{content:'＋';font-size:20px;font-weight:400}
.modal .home-settings[open]>summary:after{content:'−'}
.modal .home-settings>summary::-webkit-details-marker{display:none}
.modal .device-options{flex-wrap:wrap;padding:8px 0;gap:8px}
.modal .device-options button{border-radius:12px;min-height:44px;padding:8px 18px}
.modal:has(>.solo-screen),.modal:has(>.gr-account-screen),.modal:has(>.gr-medals-screen){padding:24px;max-width:500px}
.gr-screen-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
.gr-screen-heading h2{margin:0;font-size:26px;color:var(--gr-ink)}
.gr-screen-heading>img{width:60px;height:60px;object-fit:contain}
.gr-medal-count{font-size:14px;font-weight:500;color:var(--gr-muted);display:block;margin-top:8px}
.gr-medals-screen .medal-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px;margin-top:24px}
.gr-medals-screen .medal-grid>div{border-radius:16px;background:#f5f7fb;padding:16px 8px;text-align:center}
.gr-medals-screen .medal-grid strong{font-size:13px;line-height:1.5;margin-top:8px;color:var(--gr-ink)}
.gr-medals-screen .medal-grid small{font-size:12px;margin-top:4px}
.gr-account-screen .intro{text-align:left;font-size:14px;line-height:1.8;margin:16px 0 24px}
.gr-account-screen .social-login{width:100%;border:0;border-radius:16px;min-height:52px;font-weight:650}
.gr-account-screen .social-login:disabled{opacity:1;background:#f4f1dc;color:#716b48}
.gr-account-screen .account-connected{padding:16px;border-radius:14px;background:var(--gr-soft);color:var(--gr-ink)}
.gr-account-screen .rank-note{font-size:13px;line-height:1.7;margin:16px 0;text-align:left}
.gr-account-screen .online-error{color:var(--gr-danger)}
.gr-account-screen .intro,.gr-account-screen .rank-note{word-break:keep-all;overflow-wrap:break-word;text-wrap:pretty}
@media(max-width:639px){body:not(.mobile-playing) #overlay{bottom:0}}
.gr-menu-loading{background:#f4f6fa;min-height:60px;padding:18px;border-radius:14px;font-size:13px;color:var(--gr-muted)}
@media(min-width:768px){.gr-medals-screen .medal-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.modal:has(>.gr-medals-screen){max-width:600px}}
@media(min-width:651px){
 body:has(#overlay:not([hidden]) :is(.solo-screen,.gr-account-screen,.gr-medals-screen)) .sidebar{display:none}
 body:has(#overlay:not([hidden]) :is(.solo-screen,.gr-account-screen,.gr-medals-screen)) .layout{grid-template-columns:1fr}
 body:has(#overlay:not([hidden]) :is(.solo-screen,.gr-account-screen,.gr-medals-screen)) .map-top{visibility:hidden}
 body:has(#overlay:not([hidden]) :is(.solo-screen,.gr-account-screen,.gr-medals-screen)) .game-area{border:0;box-shadow:none;background:var(--gr-canvas)}
}
@media(max-width:639px){.modal:has(>.solo-screen),.modal:has(>.gr-account-screen),.modal:has(>.gr-medals-screen){padding:20px}.solo-screen>h2,.gr-screen-heading h2{font-size:24px}.modal .back-link{margin-bottom:16px}.gr-menu-row{gap:10px}}
@media(prefers-reduced-motion:reduce){.modal .back-link:active,.modal .text-button:active{transform:none}}
