/* Shared reading and navigation geometry. Existing theme surfaces remain authoritative. */
/* Route titles receive/restore focus for navigation and screen readers. They
   are not controls; keep their UA focus ring from looking like an empty input.
   Links, buttons, form fields and rulebook jump targets retain their focus rings. */
main h1[tabindex="-1"]:focus{outline:none}
.account-menu .account-welcome{font-size:16px;line-height:1.65;font-weight:600}
.account-icon{display:grid;place-items:center}
.account-icon svg{display:block;stroke-linecap:round;stroke-linejoin:round}
.game-actions,.game-footer,.profile-actions,.rule-nav,.mode-nav{flex-wrap:wrap}
.game-footer>span{white-space:nowrap}
.result-copy,.game-card>div,.profile-heading,.rule-header>div{min-width:0}
.result-copy strong,.game-card h3,.rule-header h1,.rule-header h2{word-break:keep-all;overflow-wrap:anywhere;line-height:1.35}
.community-body{word-break:keep-all}
.rule-time-note{margin:12px 0 0;font-size:13px;line-height:1.65;color:var(--muted)}
.community-inner>.community-nav{margin:0 0 32px;gap:12px 20px}
.community-inner>h1{font-size:clamp(32px,6vw,52px);line-height:1.25;margin:0 0 24px}
.community-tabs{margin:24px 0}
[data-legacy-auth]{display:none!important}
#menuButton{touch-action:manipulation}
@media(max-width:620px){
 .community-inner>.community-nav{margin-bottom:24px}
 .account-menu{padding:18px}
 .side-menu .menu-close{width:44px;height:44px}
 .menu-head{margin-bottom:20px}
 .search-box:focus-within{transform:none}
}
@supports(-webkit-touch-callout:none){
 html[data-iphone] body :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:max(16px,1em)}
}
@media(prefers-reduced-motion:reduce){.side-menu{transition:none}}

/* Fit each navigation row as a unit. Keep full labels and readable text;
   longer translations can scroll after reaching the minimum font size.
   The category roller has its own fixed-size tabs and is deliberately separate. */
:where(#policyReadPage>nav,.store-nav,.profile-nav,.rule-nav,.mode-nav,.community-nav,.community-tabs,.admin-tabs,.quest-tabs,.filter-row,.quick-links){
 --nav-font-min:12;--nav-font-max:14;--nav-gap:clamp(8px,2vw,20px);
 padding-block:6px;padding-inline:4px;
}
:is(#policyReadPage>nav,.store-nav,.profile-nav,.rule-nav,.mode-nav,.community-nav,.community-tabs,.admin-tabs,.quest-tabs,.filter-row,.quick-links){
 min-width:0;max-width:100%;flex-wrap:nowrap;align-items:center;
 column-gap:var(--nav-gap);overflow-x:auto;overscroll-behavior-x:contain;
 white-space:nowrap;overflow-wrap:normal;word-break:normal;
 font-size:var(--nav-fitted-size,clamp(12px,3.8vw,calc(var(--nav-font-max)*1px)));
 scroll-padding-inline:4px;scrollbar-width:thin;
}
:is(#policyReadPage>nav,.store-nav,.profile-nav,.rule-nav,.mode-nav,.community-nav,.community-tabs,.admin-tabs,.quest-tabs,.filter-row,.quick-links)[hidden],
:is(#policyReadPage>nav,.store-nav,.profile-nav,.rule-nav,.mode-nav,.community-nav,.community-tabs,.admin-tabs,.quest-tabs,.filter-row,.quick-links)>[hidden]{display:none!important}
:is(#policyReadPage>nav,.store-nav,.profile-nav,.rule-nav,.mode-nav,.community-nav,.community-tabs,.admin-tabs,.quest-tabs,.filter-row,.quick-links)>:is(a,button,span){
 flex:0 0 auto;min-width:0;max-width:none;white-space:nowrap;overflow-wrap:normal;word-break:normal;font-size:inherit;
}
:is(#policyReadPage>nav,.store-nav,.profile-nav,.rule-nav,.mode-nav,.community-nav,.community-tabs,.admin-tabs,.quest-tabs,.filter-row,.quick-links)>:is(a,button):not([hidden]){
 display:inline-flex;align-items:center;justify-content:center;text-align:center;min-height:44px;
}
#policyReadPage>nav{--nav-font-max:16;--nav-gap:clamp(3px,.8vw,8px)}
:is(.community-nav,.community-tabs,.admin-tabs,.quest-tabs){--nav-font-max:16;--nav-gap:8px}
#adminPage .admin-tabs>a{flex:0 0 auto}
.store-nav{--nav-gap:clamp(16px,3vw,24px);padding-bottom:22px}.store-nav.catalog-menu{padding-bottom:18px}
/* Shared by game browsing and STORE. Middle dots occupy only the gap;
   reserve the underline on every item so active/inactive labels stay level. */
.store-nav>a{position:relative;border-bottom:2px solid transparent}
.store-nav>a:not([hidden])~a:not([hidden])::before{
 content:"";position:absolute;inset-inline-start:calc(var(--nav-gap) / -2 - 1.5px);
 top:50%;transform:translateY(-50%);width:3px;height:3px;border-radius:50%;
 background:var(--muted,#75757a);opacity:.45;pointer-events:none;
}
.filter-row{--nav-font-max:13;--nav-gap:9px;justify-content:flex-start}
/* Auto margins centre a short filter row without hiding its first item when it overflows. */
:is(.filter-row,.quick-links)>:first-child{margin-inline-start:auto}:is(.filter-row,.quick-links)>:last-child{margin-inline-end:auto}
.quick-links{--nav-font-max:15;--nav-gap:9px;justify-content:flex-start}
:root[data-skin-theme] .quick-links{--nav-font-max:16}
.topbar :is(.top-left,.top-right){flex-wrap:nowrap}
.topbar .top-right{gap:clamp(4px,2.2vw,14px)}
.topbar :is(.quest-trigger,.language-button){display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;font-size:clamp(12px,3.5vw,14px)}
.topbar :is(.icon-btn,.account-icon,.language-chevron){flex-shrink:0}
