/* Native safe-area sizing is supplied by the Unity host. */
html,body{overscroll-behavior:none;scrollbar-width:none}
*{scrollbar-width:none}
*::-webkit-scrollbar{display:none}
body{padding-top:0;--game-header-height:0px;-webkit-tap-highlight-color:transparent}
html:not([data-app-keyboard-focus=true]) :is(button,a,summary,canvas,.selection-title):focus{outline:none}
main{padding-top:16px}
/* Settings live below the mode buttons so the title stays centered. */
.app-selection-heading{display:grid;grid-template-columns:48px minmax(0,1fr) 48px;align-items:baseline;margin-bottom:26px}
.app-version{grid-column:3;grid-row:1;justify-self:end;font-size:10px;line-height:1.3;font-weight:400;color:#718093;text-align:right;white-space:nowrap}
.app-selection-heading .selection-title{grid-column:2;grid-row:1;margin:0;min-width:0;font-size:clamp(20px,6vw,48px)}
.vibration-button .haptic-muted{display:none}
.vibration-button.is-muted .haptic-muted{display:block}
.arena-section .scoreboard{top:16px}
.game-footer{display:none}
@media(max-width:650px){.app-selection-heading{margin-bottom:20px}.arena-section .scoreboard{top:10px}}
@media(max-width:340px){.app-selection-heading .selection-title{font-size:16px}}
/* Shared six-mode menu, in the same visual and keyboard order on both hosts. */
.start-actions>.primary{font-size:clamp(10px,2.8vw,12px)}
.start-actions>#challenge-start{grid-column:1;grid-row:1}
.start-actions>#free-start{grid-column:2;grid-row:1}
.start-actions>#prepare{grid-column:3;grid-row:1}
.start-actions>#scout-start{grid-column:1;grid-row:2}
.start-actions>#room-start{grid-column:2;grid-row:2}
.start-actions>#local-start{grid-column:3;grid-row:2}
.start-actions>:is(#ranked-start,#event-start){display:none!important}
.start-actions>.maintenance-mode:disabled{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;background:#c6cbd1;border-color:#b6bdc6;color:#273546;box-shadow:none;opacity:1;transform:none}
.start-actions>.maintenance-mode small{font-size:clamp(8px,2.5vw,9px);line-height:1.2;font-weight:500;color:inherit;opacity:1}
.start-actions>#local-start small{font-size:clamp(8px,2.5vw,10px)}
/* Add a little vertical breathing room to both character previews. */
.contestant .character-preview{min-height:190px}
@media(max-width:650px){.contestant .character-preview{min-height:165px}}
/* Online-related setup controls are temporarily hidden in the offline app. */
.ranking-entry,#ranking-note,#ranked-eligibility-note,#event-eligibility-note{display:none!important}
#result-ranking-status:empty{display:none}
/* The local mode subtitle stays centered under VS 2P. */
.start-actions>#local-start{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding-block:7px;text-align:center}
.start-actions>#local-start small{font-size:10px;line-height:1.2;font-weight:500}
/* Keep the 1P character input at its existing height. */
#character{resize:none}

/* The same fly animation as character copying, anchored above the result action. */
#result-actions{position:relative}
.app-result-feedback{z-index:2}

/* One tiny pre-rendered glyph: no font download, WebGL or physics work. */
#app-loading{display:none;position:fixed;right:20px;bottom:20px;width:48px;height:48px;z-index:1000;pointer-events:none}
body[data-phase=loading] #app-loading,body[data-phase=generating] #app-loading,html[data-app-preparing=true] #app-loading,html[data-render-recovering=true] #app-loading{display:block}
#app-loading img{display:block;width:48px;height:48px;animation:app-loading-spin 1.8s linear infinite;will-change:transform}
.loading-status>.loader{display:none}
body[data-phase=generating] #loading>p{display:none}
html[data-render-recovering=true] #loading>p,html[data-render-failed=true] #loading>p{display:block}
@keyframes app-loading-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){#app-loading img{animation:none;will-change:auto}}

/* Explain room/connection failures so players can choose the next action. */
.ranked-overlay.is-failed #ranked-detail{display:block;grid-column:1/-1;max-width:320px;margin:0;padding-inline:12px;font-size:13px;line-height:1.6;background:#ffffffd9;border-radius:8px}

/* Blue opening letter and red closing letter echo the two competing tops. */
#paused.is-ad-break{font:700 clamp(36px,10vw,52px)/1.2 system-ui,sans-serif;letter-spacing:.04em;color:#273546;animation:ad-break-backdrop .2s ease-out both}
#paused.is-ad-break .ad-break-word{white-space:nowrap;animation:ad-break-enter .22s cubic-bezier(.16,1,.3,1) both}
#paused.is-ad-break .ad-break-a{color:#2869dc}
#paused.is-ad-break .ad-break-k{color:#cc4735}
@keyframes ad-break-enter{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}
@keyframes ad-break-backdrop{from{background-color:#edf0f200}to{background-color:#edf0f2ed}}
@media(prefers-reduced-motion:reduce){#paused.is-ad-break,#paused.is-ad-break .ad-break-word{animation:none}}

/* Privacy choices share the existing HOME controls, without shifting game UI. */
#app-privacy-options[hidden],.app-privacy-feedback[hidden]{display:none!important}
.app-privacy-feedback{display:block;text-align:center;font-size:12px;line-height:1.5;color:#555;margin:6px 12px}

/* Unsupported online glyphs are blocked only in the app UI. Offline play stays available. */
.online-eligibility-note{display:grid;place-items:center;box-sizing:border-box;min-height:48px;margin:0;padding:6px 0;color:#c73535;font-size:clamp(10px,2.8vw,12px);font-weight:700;line-height:1.45;text-align:center}
.online-eligibility-note[hidden]{display:grid!important;visibility:hidden}
#setup-fields:has(>.online-eligibility-note)>#input-error:empty{display:none}
.start-actions>.is-character-ineligible:disabled{background:#c6cbd1;border-color:#b6bdc6;color:#555e68;box-shadow:none;opacity:1;transform:none}

/* Ticket remains recognizable; the small cross sits over its lower right corner. */
#font-choice [data-font]{isolation:isolate}
.online-font-unavailable{position:absolute;right:2px;bottom:1px;width:18px;height:13px;pointer-events:none;line-height:0}
.online-font-unavailable>img{display:block;width:16px;height:12px;object-fit:contain}
.online-font-unavailable>svg{position:absolute;right:-1px;bottom:-1px;width:9px;height:9px;overflow:visible;fill:none;stroke:#d52e37;stroke-width:2.8;stroke-linecap:round;paint-order:stroke;filter:drop-shadow(0 0 1px #fff)}
