/* PatchGuessr: shared site styles above, scoped game layout below. */
.game-page{background:var(--bg,#08090c);color:var(--ink,#f4f6f8)}
.game-page [hidden]{display:none!important}.game-page .search-submit{margin-right:8px;padding:5px 9px;min-height:30px;background:#161a21;color:var(--muted);border:1px solid var(--line);border-radius:7px;cursor:pointer}.game-back{font-size:9px;font-weight:800;letter-spacing:.08em;white-space:nowrap;color:var(--mint)}
.game-heading{display:flex;justify-content:space-between;gap:15px;align-items:center}.game-main .eyebrow{display:flex;align-items:center;gap:10px;color:var(--mint);font-size:10px;font-weight:800;letter-spacing:.18em}.game-heading .eyebrow:before{content:'';width:32px;height:1px;background:var(--mint)}.game-main .badge{font-size:9px;letter-spacing:.12em;color:var(--muted)}.game-main h1{font-weight:900;font-size:clamp(36px,6.6vw,88px);letter-spacing:-.07em;line-height:1;margin:25px 0 16px}.game-main h1 span{color:var(--mint)}.game-main .intro{font-size:15px;line-height:1.7;color:#9ba3ad;margin:0 0 30px}.game-main .columns{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(255px,.85fr);gap:32px;align-items:start}.game-main .play-panel{min-width:0;background:var(--panel);border:1px solid #242933;border-radius:14px;padding:24px}.game-main h2{font-weight:800;font-size:25px;letter-spacing:-.04em;line-height:1.2;margin:0 0 15px}.game-main p{font-size:13px;line-height:1.7;color:#9ba3ad}.setup-icon{height:64px;width:64px;display:grid;place-items:center;margin:0 0 24px;border:1px solid rgba(99,245,197,.3);border-radius:14px;color:var(--mint);background:rgba(99,245,197,.06);font-weight:800;font-size:36px}.game-main label{display:block;margin:24px 0 9px;color:#b5bdc8;font-size:10px;font-weight:800;letter-spacing:.12em}.game-main input{width:100%;padding:13px;border:1px solid #303641;border-radius:9px;background:#08090c;color:var(--ink);font:inherit}.game-main .hint{font-size:10px;margin:8px 0 20px}.game-main button{cursor:pointer;min-height:44px;padding:13px 16px;border:1px solid #303641;border-radius:9px;font:inherit;font-weight:800;font-size:12px;transition:background .12s,border-color .12s}.game-main button:disabled{cursor:default}.game-main .primary{display:block;width:100%;color:#08090c;background:var(--mint);border-color:var(--mint);letter-spacing:.04em}.game-main .primary:hover:not(:disabled){background:#8df9d7}.game-main .primary span{float:right}.game-main .secondary{width:100%;background:#11141a;color:#b5bdc8;margin-top:14px}.game-main .secondary:hover{border-color:var(--mint);color:var(--mint)}.game-main .rules{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;font-size:8px;letter-spacing:.06em;color:var(--muted);margin:15px 0}.game-main .stats{display:flex;justify-content:space-between;gap:15px;margin-bottom:16px}.game-main .stats small{display:block;font-size:9px;letter-spacing:.12em;font-weight:700;color:var(--muted);margin-bottom:5px}.game-main .stats strong{display:flex;align-items:center;gap:5px;font-size:23px;line-height:1.1;color:var(--ink);font-variant-numeric:tabular-nums}.streak-flame{width:17px;height:20px;flex:0 0 auto;vertical-align:middle;color:var(--mint)}#streak-stat:not(.on-fire) .streak-flame{color:#65707c}.on-fire strong{color:var(--mint)!important}
/* Same square, padding, corner radii and inset shadow as the live patch detail. */
.game-main .game-art-grid{display:block;width:min(100%,42vh,400px);margin:0 auto;gap:0}.game-main .detail-grid .detail-image{position:relative;width:100%;aspect-ratio:1 / 1;min-height:0;padding:8px;border:1px solid #1e232b;border-radius:14px;background:#0d0f14;overflow:hidden;display:grid;place-items:center}.game-main .detail-grid .detail-image::before{content:none}.game-main .detail-grid .detail-image img{position:absolute;inset:8px;width:calc(100% - 16px);height:calc(100% - 16px);max-width:none;max-height:none;object-fit:contain;border-radius:9px;filter:none;z-index:1}.game-main .detail-grid .detail-image::after{content:'';position:absolute;inset:8px;z-index:3;border-radius:9px;pointer-events:none;box-shadow:inset 0 0 16px 4px rgba(0,0,0,.55)}#loading{font-size:12px;color:var(--muted);text-align:center;line-height:1.5;padding:15px}.game-main #hints-wrap{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:14px 0 0}.hints-label{font-size:8px;letter-spacing:.1em;color:var(--muted);font-weight:800}.game-main #hints{display:flex;flex-wrap:wrap;gap:5px;margin:0}.game-main #hints .chip{font-size:9px;line-height:1.3;font-weight:800;letter-spacing:.035em;padding:4px 6px;border:1px solid #303641;border-radius:5px;background:#161a21;color:#b5bdc8}.timer-row{display:flex;justify-content:space-between;gap:8px;margin:15px 0 8px;color:var(--muted);font-size:9px;letter-spacing:.06em}progress{display:block;width:100%;height:4px;margin:0 0 14px;border:0;border-radius:4px;overflow:hidden;appearance:none;background:#272b34}progress::-webkit-progress-bar{background:#272b34}progress::-webkit-progress-value{background:var(--mint)}progress::-moz-progress-bar{background:var(--mint)}.game-main .choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.game-main .choices button{min-width:0;overflow-wrap:anywhere;text-align:left;background:#11141a;color:var(--ink);font-weight:700;line-height:1.25}.game-main .choices button:hover:not(:disabled){border-color:var(--mint);background:rgba(99,245,197,.06);color:var(--mint)}.game-main .choices button:disabled{color:#8a939e}.game-main .choices button.good{border-color:rgba(99,245,197,.5);background:rgba(99,245,197,.09);color:var(--mint)}.game-main .choices button.bad{border-color:rgba(255,135,147,.5);background:rgba(255,135,147,.09);color:var(--red)}#feedback{margin:14px 0 6px;font-size:13px;font-weight:700;line-height:1.5}#feedback:empty{display:none}#patch-link{display:inline-block;font-size:11px;color:var(--mint);margin-bottom:16px;text-decoration:underline;text-underline-offset:3px}.game-main #error{border:1px solid rgba(255,135,147,.4);border-radius:10px;background:rgba(255,135,147,.08);color:var(--red);padding:14px;margin-bottom:20px;font-size:13px}.game-main .ranking{border-top:1px solid #353a43;min-width:0}.ranking-head{padding:20px 0 14px}.ranking-head h2{margin:14px 0 8px}.game-main #ranking-day{font-size:10px;margin:0}.leader-columns{display:grid;grid-template-columns:1fr 86px 70px;align-items:center;gap:10px;padding:12px 0;color:var(--muted);font-size:8px;font-weight:800;letter-spacing:.08em}.leader-columns span:last-child{text-align:right}.leader-columns .streak-flame{height:13px;width:12px}.game-main #leaders{margin:0;padding:0;list-style:none;counter-reset:rank}.game-main #leaders li{padding:13px 0;border-top:1px solid var(--line);font-size:12px;line-height:1.4}.game-main #leaders li.entry{display:grid;grid-template-columns:18px minmax(0,1fr) 86px 70px;gap:10px;align-items:center}.game-main #leaders li.entry:before{counter-increment:rank;content:counter(rank,decimal-leading-zero);color:var(--muted);font-size:9px;font-weight:800}.game-main #leaders li>span{overflow-wrap:anywhere;min-width:0}.game-main #leaders li .leader-streak{display:flex;align-items:center;gap:4px;font-weight:700;color:#b5bdc8;font-variant-numeric:tabular-nums}.leader-streak .streak-flame{width:14px;height:17px}.game-main #leaders li strong{color:var(--mint);font-size:12px;text-align:right;white-space:nowrap}.game-main .ranking-note{border-top:1px solid var(--line);margin-top:0;padding-top:18px;font-size:10px;line-height:1.7;color:var(--muted)}#finish{padding:20px 0}#final-score{font-size:78px;font-weight:900;letter-spacing:-.06em;color:var(--mint);line-height:1.1;margin-top:24px}.game-main footer{font-size:10px;line-height:1.8;color:var(--muted);margin-top:30px}.game-main footer a{color:var(--mint)}.game-page .game-main :focus-visible{outline:2px solid var(--mint);outline-offset:4px}.game-page.is-playing .game-main>h1,.game-page.is-playing .game-main>.intro{display:none}.game-page.is-playing .game-heading{margin-bottom:20px}
@media(max-width:1050px){.game-main .columns{grid-template-columns:minmax(0,1fr) minmax(230px,.7fr);gap:22px}.game-main .play-panel{padding:18px}.game-main #leaders li.entry{gap:7px;grid-template-columns:16px minmax(0,1fr) 72px 60px}.leader-columns{grid-template-columns:1fr 72px 60px;gap:7px}.game-main h1{font-size:clamp(36px,6.4vw,68px)}}
@media(max-width:800px){.game-main .columns{grid-template-columns:1fr}.game-main .ranking{margin-top:12px}.ranking-head h2 br{display:none}.game-main .game-art-grid{width:min(100%,38vh,360px)}.game-page .game-back{display:none}.game-main h1{font-size:clamp(32px,8vw,60px)}}
@media(max-width:640px){.game-page .archive-rail{z-index:70}.game-main .play-panel{padding:15px}.game-main .eyebrow{font-size:8px;letter-spacing:.1em}.game-main .badge{font-size:8px}.game-main h1{font-size:clamp(30px,9.4vw,54px)}.game-main h2{font-size:23px}.game-main .stats{margin-bottom:10px}.game-main .stats strong{font-size:21px}.game-main .stats small{font-size:8px}.game-main .choices button{padding:11px 10px;font-size:12px;min-height:44px}.game-page.is-playing .game-heading{display:none}.game-page.is-playing .game-main .game-art-grid{width:min(100%,25svh,260px)}.game-main #hints-wrap{margin-top:10px;gap:5px 8px}.timer-row{font-size:8px;margin-top:12px}.game-main .rules{font-size:7px}.game-main footer{font-size:9px}.game-main .intro{font-size:13px}}

/* v3 shares .page/.archive-commandbar/.archive-rail dimensions with the site. */
.game-main{max-width:none;margin:0}.game-main h1{font-size:clamp(38px,6vw,86px)}
.game-main #hints-wrap,.game-main #hints{justify-content:center;text-align:center}
.game-main .choices .country-card{position:relative;min-height:80px;padding:12px;border:1px solid #242933;border-radius:10px;background:#0d0f14;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;overflow:hidden;gap:12px}
.game-main .choices .country-card::before{content:attr(data-code);position:absolute;right:-3px;bottom:-14px;color:#171b22;font-weight:900;font-size:76px;line-height:1;letter-spacing:-.08em}
.game-main .choices .country-card strong,.game-main .choices .country-card span{position:relative;z-index:1}.game-main .choices .country-card strong{font-size:12px;color:inherit}
.game-main .choices .country-card .answer-key{font-size:9px;font-weight:700;color:var(--muted);border:1px solid #303641;border-radius:4px;min-width:18px;text-align:center;padding:1px 4px}
.game-main .choices .country-card:hover:not(:disabled){transform:none;border-color:var(--mint);background:#12151b}.game-main .choices .country-card.good{border-color:rgba(99,245,197,.5);background:rgba(99,245,197,.09);color:var(--mint)}.game-main .choices .country-card.bad{border-color:rgba(255,135,147,.5);background:rgba(255,135,147,.09);color:var(--red)}
.game-main #leaders .own-result{background:rgba(99,245,197,.07);border-radius:7px;box-shadow:inset 2px 0 var(--mint)}.game-main .your-rank{font-weight:800;color:var(--mint);font-size:20px}.streak-flame{width:20px;height:24px}.leader-streak .streak-flame{width:18px;height:21px}
.game-main .game-art-grid{width:min(100%,34vh,400px)}
@media(max-width:640px){.game-main .game-art-grid{width:min(100%,25svh,260px)}.game-main .choices .country-card{min-height:66px;padding:10px;gap:5px}.game-main .choices .country-card::before{font-size:60px;bottom:-11px}.game-main #hints-wrap{margin-top:10px}.game-main .game-heading{flex-wrap:wrap}.game-main h1{font-size:clamp(30px,9.4vw,54px)}}

/* v3.1: country labels must be readable at a glance. */
.game-main .choices .country-card{min-height:88px;gap:8px}
.game-main .choices .country-card strong{font-size:24px;font-weight:800;line-height:1.2;letter-spacing:-.02em;max-width:100%;white-space:normal}
@media(max-width:1050px){.game-main .choices .country-card strong{font-size:20px}}
@media(max-width:640px){.game-main .choices .country-card{min-height:86px;gap:5px}.game-main .choices .country-card strong{font-size:18px}}

/* v3.2: face the answer labels toward the central image. */
.game-main .choices .country-card:nth-child(odd){align-items:flex-end;text-align:right}
.game-main .choices .country-card:nth-child(odd)::before{left:-3px;right:auto}
@media(max-width:640px){
 .game-page.is-playing .game-main .game-art-grid{width:var(--game-image-size,min(100%,35svh))}
 .game-page.is-playing .game-main .stats{margin-bottom:8px}
 .game-page.is-playing .game-main #hints-wrap{margin-top:8px}
 .game-page.is-playing .timer-row{margin-top:9px}
}

/* v3.3: matched panels, larger desktop images, reserved answer controls. */
.game-main .ranking{background:var(--panel);border:1px solid #242933;border-radius:14px;padding:24px}
.game-main .ranking-head{padding:0 0 14px}.game-main .ranking-note{margin-bottom:0}
.game-page.is-playing .game-main .game-art-grid{width:var(--game-image-size,min(100%,50vh))}
.game-main #answer-actions{min-height:124px;padding-top:10px;visibility:hidden}
.game-main #answer-actions.has-answer,.game-main #answer-actions.answer-error{visibility:visible}
.game-main #answer-actions #feedback{margin:0 0 6px}
.game-main #answer-actions #patch-link{margin:0 0 8px}
@media(max-width:1050px){.game-main .ranking{padding:18px}}
@media(max-width:640px){
 .game-main .ranking{padding:15px}
 .game-page.is-playing .play-panel{padding-bottom:calc(15px + 124px + env(safe-area-inset-bottom,0px))}
 .game-main #answer-actions{position:fixed;z-index:65;left:0;right:0;bottom:0;height:calc(124px + env(safe-area-inset-bottom,0px));min-height:0;padding:10px 14px calc(10px + env(safe-area-inset-bottom,0px));border-top:1px solid #303641;background:#0d0f14;box-shadow:0 -8px 24px rgba(0,0,0,.3)}
 .game-main #answer-actions #feedback{font-size:13px;line-height:18px;margin:0 0 5px;white-space:nowrap}
 .game-main #answer-actions .feedback-country{display:none}
 .game-main #answer-actions #patch-link{display:block;font-size:11px;line-height:16px;margin:0 0 7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .game-main #answer-actions #next,.game-main #answer-actions #retry{margin:0;min-height:44px}
}

/* v3.4: compact mobile play surface; desktop rules remain unchanged. */
@media(max-width:640px){
 .game-page.is-playing #app>.page.game-main{padding-top:10px;padding-left:10px;padding-right:10px}
 .game-page.is-playing .game-main .play-panel{padding:8px 8px calc(8px + 84px + env(safe-area-inset-bottom,0px))}
 .game-page.is-playing .game-main .stats{margin-bottom:6px}
 .game-page.is-playing .game-main .stats strong{font-size:20px}
 .game-page.is-playing .game-main .stats small{margin-bottom:3px}
 .game-page.is-playing .game-main #hints-wrap{margin-top:5px}
 .game-page.is-playing .game-main .timer-row{margin-top:6px;margin-bottom:5px}
 .game-page.is-playing .game-main progress{margin-bottom:8px}
 .game-page.is-playing .game-main .choices{gap:6px}
 .game-page.is-playing .game-main .choices .country-card{min-height:56px;padding:8px;gap:0;justify-content:center}
 .game-page.is-playing .game-main .choices .answer-key{display:none}
 .game-page.is-playing .game-main .choices .country-card::before{font-size:52px;bottom:-8px}
 .game-main #answer-actions{height:calc(84px + env(safe-area-inset-bottom,0px));padding:8px 10px calc(8px + env(safe-area-inset-bottom,0px));display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.45fr);grid-template-rows:18px 44px;gap:4px 8px;align-items:center}
 .game-main #answer-actions #feedback{font-size:11px;line-height:18px;margin:0;min-width:0}
 .game-main #answer-actions #patch-link{font-size:10px;line-height:18px;margin:0;min-width:0;text-align:right}
 .game-main #answer-actions #next,.game-main #answer-actions #retry{grid-column:1 / -1;grid-row:2;height:44px;padding:8px 12px}
 .game-main #answer-actions.answer-error #feedback{grid-column:1 / -1}
}

/* Completed-round date in the player column. */
.game-main #leaders .leader-date{display:block;margin-top:3px;color:var(--muted);font-size:10px;font-weight:400;line-height:1.3;letter-spacing:0}

/* Daily/share update v4 */
.board-tabs{display:flex;gap:8px;margin:16px 0}.board-tabs button{flex:1;background:#11141a;color:var(--ink);border-radius:8px}.board-tabs button[aria-pressed="true"]{border-color:var(--mint);color:var(--mint)}
#share-status{min-height:1.5em}#share-text{display:block;box-sizing:border-box;width:100%;background:#08090c;color:var(--ink);padding:12px;border:1px solid var(--mint);border-radius:8px}#save-result{margin-bottom:12px}#rename-result{margin:14px 0}#daily-info{line-height:1.6}

/* Mode selection and image sharing v4.1 */
.game-main .mode-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:28px}
.game-main .mode-option{min-width:0;text-align:center}
.game-main .mode-button{width:100%;margin:0;min-height:46px;padding:12px 6px;font-size:11px;letter-spacing:0;white-space:normal}
.game-main .mode-description{font-size:10px;line-height:1.5;margin:9px 0 0;color:var(--muted)}
.game-main #daily.is-complete{background:#11141a;border-color:#303641;color:#929ca9}
.game-main #daily.is-complete:hover:not(:disabled){background:#181d24;border-color:#65707c;color:var(--ink)}

@media(max-width:640px){.game-main .mode-options{grid-template-columns:1fr;gap:18px}.game-main .mode-button{font-size:12px}.game-main .mode-description{margin-top:6px}}
