/* Scope: five, flash and nine pages only. Existing four games are untouched. */
.compact-game-active>header,.compact-game-active>footer,.compact-game-active main>.breadcrumb,.compact-game-active main>.note{display:none}
.compact-game-active main{padding:6px 12px max(12px,env(safe-area-inset-bottom,0px))}
.compact-game-result>header,.compact-game-result main>.breadcrumb,.compact-game-result main>.note{display:none}
.compact-game-result main{padding-top:12px;padding-bottom:max(24px,env(safe-area-inset-bottom,0px))}
.new-game[data-phase]:not([data-phase=idle]):not([data-phase=result]){padding:8px 10px}
.new-game[data-phase]:not([data-phase=idle]):not([data-phase=result]) h1,.flash-game[data-phase]:not([data-phase=idle]):not([data-phase=result]):not([data-phase=aborted]) h1{font-size:18px;line-height:1.4;margin:0 0 6px;text-align:left}
.new-game[data-phase]:not([data-phase=idle]) .game-tagline,.flash-game[data-phase=result] .flash-catch{display:none}
.new-game .new-info{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:5px 0;font-size:12px;line-height:1.3}
#five-game .new-info{grid-template-columns:repeat(2,minmax(0,1fr))}
.new-game .new-info strong{display:block;font-size:clamp(17px,4.7vw,23px);font-weight:900;line-height:1.35;white-space:nowrap}
.new-game .new-status{min-height:24px;line-height:24px;margin:2px 0 4px!important;font-size:14px}
.new-game #five-quit,.new-game #nine-quit{margin:4px auto 0;min-height:44px}
.new-game .five-stage{height:126px;gap:16px}.new-game .five-stage img{width:96px;height:96px}.five-reveal{gap:20px}.five-reveal span{font-size:12px}
.new-game .choices{margin-bottom:6px}.new-game .choice{min-height:clamp(88px,17svh,110px)}
.new-game .nine-clock-row{min-height:24px;line-height:24px;font-size:14px;margin:2px 0}
.new-game .nine-stage{width:min(100%,max(204px,min(300px,calc(min(var(--game-visible-height,100svh),100svh) - 220px))));max-width:300px;margin:6px auto;aspect-ratio:1}
.new-game .nine-grid{gap:8px}.new-game .nine-cell{padding:2px}.new-game .nine-cell img{width:clamp(36px,72%,64px);height:auto;max-height:72%;aspect-ratio:1;object-fit:contain}.new-game .nine-cell span{font-size:12px;line-height:1.25}
/* Match the old result frame, score rows and full-width replay button. */
.new-game[data-phase=result],.flash-game[data-phase=result]{max-width:640px;padding:16px;scroll-margin-top:12px}
.new-game[data-phase=result] h1,.flash-game[data-phase=result] h1{font-size:17px;line-height:1.4;margin:0 0 12px;text-align:left}
.new-game[data-phase=result] h2,.flash-game[data-phase=result] h2{font-size:22px;line-height:1.35;margin:0 0 14px}
.new-game[data-phase=result] .result-score{font-size:26px;line-height:1.35;margin:0 0 14px}
.new-game[data-phase=result] dl,.flash-game[data-phase=result] dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 10px}
.new-game[data-phase=result] dl>div,.flash-game[data-phase=result] dl>div{background:transparent;padding:0;min-width:0}
.new-game[data-phase=result] dt,.flash-game[data-phase=result] dt{font-size:13px;line-height:1.5}.new-game[data-phase=result] dd,.flash-game[data-phase=result] dd{font-size:24px;font-weight:900;line-height:1.3;margin:3px 0 0}
.new-game[data-phase=result] .five-history{font-size:clamp(11px,3.2vw,13px);line-height:1.5;margin:0 0 14px;padding:0;list-style:none}
.new-game[data-phase=result] .five-history li{white-space:nowrap;padding:5px 0;margin:0;border-bottom:1px solid #ded5bc}
.new-game[data-phase=result] #five-retry,.new-game[data-phase=result] #nine-retry,.flash-game[data-phase=result] #flash-retry{display:block;width:100%;min-height:48px;padding:11px 12px;margin:16px 0 0}
.flash-game[data-phase=result] #flash-select{min-height:44px;font-size:13px;margin:0 auto 4px}
.new-game #nine-breakdown,.new-game #nine-save,.flash-game #flash-save{font-size:13px;line-height:1.6;margin:8px 0}
.new-game #nine-save:empty{display:none}
.final-links{margin:4px 0 0}.final-links .result-home{margin:2px 0;min-height:44px;font-size:14px}
.new-game .result-reading,.flash-game .result-reading{margin:14px 0 0;padding:12px;text-align:left}
.new-game .result-reading h2,.flash-game .result-reading h2{font-size:13px;margin:0 0 7px}
.new-game .result-article,.flash-game .result-article{padding:0;min-height:44px}
.new-game .result-article strong,.flash-game .result-article strong{font-size:16px;line-height:1.6}
.new-game .result-article>span,.flash-game .result-article>span{font-size:13px;line-height:1.6;margin-top:7px}
/* Review details stay available beneath the immediately accessible next button. */
.flash-game #flash-review{margin-top:12px}.flash-game #flash-next{min-height:48px;margin:0 0 16px}.flash-game #flash-verdict{margin-bottom:10px}
@media(max-width:360px){.new-game .nine-grid{gap:6px}.new-game .nine-cell{border-width:2px}.new-game[data-phase=result],.flash-game[data-phase=result]{padding:14px}}
#nine-best{white-space:normal;overflow-wrap:anywhere}
.new-game[data-phase=result] dd,.flash-game[data-phase=result] dd{overflow-wrap:anywhere}
@media(max-height:600px){.new-game .five-stage{height:112px}.new-game .five-stage img{width:84px;height:84px}}
