/* Shared surfaces sit after the original styles; game rules and cosmetic IDs stay unchanged. */
:root {
    color-scheme: dark;
    --background: #0c1019;
    --background-soft: #121926;
    --panel: #171f2e;
    --panel-solid: #171f2e;
    --border: #2b374b;
    --border-strong: #485874;
    --text: #f1f5fc;
    --muted: #a8b6cb;
    --yellow: #f6cc63;
    --yellow-light: #ffe4a1;
    --green: #64dca3;
    --red: #ff939d;
    --orange: #f6b56d;
    --studio-header: #101723f5;
    --studio-shadow: 0 12px 32px #00000024;
    --studio-accent-soft: #f6cc6312;
    --studio-radius: 14px;
    --button-text: #0c1019;
}

:root[data-theme="light"] {
    color-scheme: light;
    --background: #f1f4f9;
    --background-soft: #e8edf5;
    --panel: #ffffff;
    --panel-solid: #ffffff;
    --border: #d1dbe8;
    --border-strong: #8597b2;
    --text: #17253c;
    --muted: #52627b;
    --yellow: #856000;
    --yellow-light: #674800;
    --green: #136e49;
    --red: #b52e42;
    --orange: #925400;
    --studio-header: #fffffff5;
    --studio-shadow: 0 12px 32px #21395a0c;
    --studio-accent-soft: #b9870010;
    --button-text: #ffffff;
}

html { scroll-padding-top: 100px; }
body, body.dashboard-body {
    background: radial-gradient(ellipse at 10% 0, var(--studio-accent-soft), transparent 45%), var(--background) !important;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, select, input, a { -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; }
button, a, select { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 4px;
}
.history-table-wrapper:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }
button:disabled { cursor: not-allowed; }
input, select { accent-color: var(--yellow); }
input:not([type="range"]), select {
    background: var(--background-soft);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
}
input::placeholder { color: var(--muted); opacity: 1; }
a { text-underline-offset: 4px; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }

.topbar, .game-topbar {
    background: var(--studio-header);
    border-color: var(--border);
    padding: 8px clamp(14px, 3vw, 32px);
    height: auto;
    min-height: 60px;
    gap: 10px;
}
/* Non-game headers take their natural height, so long translations never cover the page. */
body.page-body .topbar { position: relative; }
body.page-body { padding-top: 0; }
.main-nav, .game-locked-nav { height: auto; gap: 12px; }
.main-nav { justify-content: space-between; }
.main-nav .nav-brand-container { margin: 0; }
.nav-menu { min-width: 0; }
.nav-menu > summary { display: none; }
.main-nav .nav-links-container { display: flex; gap: 2px; flex-wrap: nowrap; width: auto; }
.main-nav .nav-links-container a { padding: 10px; border-radius: 8px; white-space: nowrap; color: var(--muted); font-size: 13px; font-weight: 650; }
.nav-links-container a.active, .nav-links-container a[aria-current="page"] { color: var(--yellow); background: var(--studio-accent-soft); }
.nav-links-container a:hover { color: var(--text); background: var(--background-soft); }
.nav-logo-brand { color: var(--text) !important; letter-spacing: -.035em; }
.nav-user, .game-status-user { color: var(--muted); max-width: 180px; overflow-wrap: anywhere; }
.main-nav .nav-user-container { gap: 8px; flex-wrap: wrap; margin-left: auto; }
.main-nav .nav-user { display: none; }
.main-nav .nav-logout { border-color: transparent; color: var(--muted); padding: 8px; font-size: 12px; }
.nav-logout, .give-up-button {
    min-height: 42px; padding: 10px 14px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--panel-solid); color: var(--text);
}
.give-up-button { color: var(--red); }
.game-status-brand { color: var(--yellow); }
.game-status-brand span { color: var(--muted); }
.primary-button, #guessBtn, .hero-button.solo-mode {
    background: var(--yellow); color: var(--background); border: 1px solid var(--yellow);
    min-height: 46px; border-radius: 12px; font-weight: 750;
}
.secondary-button, .equip-btn {
    background: var(--background-soft); border: 1px solid var(--border-strong); color: var(--text);
    min-height: 44px; border-radius: 12px;
}
.primary-button:hover, #guessBtn:not(:disabled):hover { filter: brightness(1.08); }
.primary-button:disabled, #guessBtn:disabled { opacity: .5; }
.page-content { width: min(1200px, 100%); margin: 0 auto; padding: 20px 24px 36px; }
.page-content.profile-page, .page-content.leaderboard-page { padding-top: 20px !important; }
.page-content h1 { letter-spacing: -.04em; font-size: clamp(1.6rem, 4vw, 2.2rem); color: var(--text); }
.page-subtitle, .eyebrow, .section-desc { color: var(--muted); }

.movie-modern-dashboard {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .85fr);
    max-width: 1200px; gap: 18px; padding: 0 24px; padding-top: 0 !important; margin: 20px auto 36px;
    align-items: start;
}
.dash-panel-left, .dash-panel-right { min-width: 0; gap: 14px; }
.dash-panel-right { justify-content: flex-start; }
.game-modes-stack { gap: 10px; }
.cinema-welcome-card, .mode-card, .mini-stat-box, .cinema-center-piece,
.xp-tracker-card, .profile-hero, .career-timeline-section-modern,
.profile-xp-container-modern, .history-section, .stat-card, .stats-card, .stat-box,
.inventory-item-card, .public-profile-card-modern, .auth-card, .lobby-card,
.battlepass-hero, .reward-card, .daily-awards, .leaderboard-hero {
    background: var(--panel-solid);
    border: 1px solid var(--border);
    border-radius: var(--studio-radius);
    box-shadow: var(--studio-shadow);
    color: var(--text);
}
.cinema-welcome-card { padding: 16px; }
.cinema-welcome-card h2 { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.3; letter-spacing: -.03em; }
.cinema-welcome-card p { margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.mode-card { text-decoration: none; min-height: 80px; padding: 16px 18px; gap: 12px; }
.mode-info { min-width: 0; overflow-wrap: anywhere; }
.mode-card:hover { background: var(--background-soft); transform: translateY(-2px); border-color: var(--yellow); }
.mode-info h3 { color: var(--text); font-size: 1rem; }
.mode-info p, .mini-stat-box span { color: var(--muted); }
.mode-badge-neon { color: var(--green); background: var(--background-soft); box-shadow: none; }
.cinema-center-piece { height: auto; min-height: 96px; flex-direction: row; justify-content: flex-start; gap: 14px; padding: 16px; text-align: left; }
.cinema-clapper-wrapper { order: 0; flex-shrink: 0; }
.cinema-center-piece .profile-avatar { width: 52px; height: 52px; border-radius: 14px; font-size: 26px; }
.cinema-badge-tag { position: absolute; right: -6px; bottom: -6px; font-size: 16px; }
.cinema-user-meta { min-width: 0; align-items: flex-start; }
.cinema-user-meta h2 { color: var(--text); font-size: 1.15rem; overflow-wrap: anywhere; }
.cinema-user-meta .user-title-tag { min-height: 0; overflow-wrap: anywhere; }
.cinema-clapper-wrapper, .public-avatar-wrapper { animation: none; }
.cinema-glow-backdrop, .public-glow-backdrop { opacity: .35; animation: none; }
.xp-tracker-card { padding: 16px; gap: 10px; }
.xp-tracker-header, .xp-tracker-footer { min-width: 0; flex-wrap: wrap; gap: 8px; }
.xp-level-badge { flex-wrap: wrap; padding: 6px 10px; overflow-wrap: anywhere; }
.sidebar-shortcut-link { min-height: 44px; color: var(--text); background: var(--panel-solid); border: 1px solid var(--border); border-radius: 12px; }
.daily-cta {
    background: var(--studio-accent-soft);
    color: var(--text) !important; border-color: var(--yellow); box-shadow: var(--studio-shadow); padding: 16px 18px;
}
.daily-cta small, .daily-awards p { color: var(--muted); }
.daily-awards { margin: 16px 0; }
.daily-awards h2 { margin-bottom: 12px; }

.profile-page { gap: 14px; }
.profile-hero { flex-direction: row; text-align: left; padding: 16px; gap: 12px; margin-bottom: 0; }
.profile-avatar-zone, .public-avatar-wrapper { position: relative; flex: 0 0 48px; align-self: flex-start; }
.profile-hero .profile-avatar, .public-profile-card-modern .profile-avatar {
    width: 48px; height: 48px; border-radius: 14px; font-size: 24px; margin: 0;
}
#profileEquippedBadge {
    position: absolute; bottom: -4px; right: -4px; z-index: 2;
    width: 24px; height: 24px; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: 50%; background: var(--panel-solid); font-size: 12px;
}
.profile-hero #profileEquippedTitle, .public-info-zone .user-title-tag {
    margin: 0; color: var(--green); font-size: 12px; font-weight: 700; line-height: 1.5;
    overflow-wrap: anywhere;
}
.public-info-zone .user-title-tag:empty { display: none; }
.profile-hero #profileEquippedTitle:not([hidden]) { margin-bottom: 4px; }
.profile-hero-text { min-width: 0; }
.profile-hero-text h1 { margin: 2px 0 4px; font-size: clamp(1.25rem, 3vw, 1.5rem); line-height: 1.25; overflow-wrap: anywhere; }
.profile-hero-text p { overflow-wrap: anywhere; }
.profile-hero .page-subtitle { margin: 0; font-size: 14px; line-height: 1.45; }
.profile-page .daily-awards { margin: 0; padding: 14px; }
.profile-page .daily-awards h2 { margin: 0 0 8px; font-size: 1rem; }
.profile-two-column-layout { gap: 16px; grid-template-columns: 220px minmax(0, 1fr); margin-top: 0; }
.profile-layout-right { min-width: 0; gap: 16px; }
.profile-layout-left { min-width: 0; top: 16px; }
.career-timeline-section-modern { min-width: 0; padding: 12px; }
.section-heading-timeline { margin-bottom: 10px; padding-bottom: 10px; }
.section-heading-timeline h3 { font-size: 1rem; }
.ranks-timeline-container { min-width: 0; gap: 8px; padding-left: 0; margin-top: 0; }
/* Status copy needs its own row: Champion plus “🎯 Aktuális” cannot share 220px. */
.timeline-rank-item {
    display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 3px 10px;
    min-width: 0; padding: 10px 8px;
    background: var(--background-soft); border-color: var(--border); opacity: 1;
}
.timeline-rank-item.current-rank { background: var(--studio-accent-soft); box-shadow: none; }
.profile-page .timeline-rank-item.current-rank .timeline-rank-status { color: var(--text); }
.profile-page .timeline-rank-item.current-rank .timeline-rank-badge { box-shadow: none; }
.timeline-rank-badge { grid-row: span 2; width: 32px; height: 32px; font-size: 18px; background: var(--panel-solid); border-color: var(--border); }
.timeline-rank-info { min-width: 0; overflow-wrap: anywhere; }
.timeline-rank-info h3 { color: var(--text); font-size: 14px; line-height: 1.3; }
.rank-req { font-size: 12px; line-height: 1.4; }
.timeline-rank-status, .timeline-rank-item.current-rank .timeline-rank-status {
    grid-column: 2; min-width: 0; margin: 0; padding: 0;
    font-size: 12px; line-height: 1.4; letter-spacing: normal; text-transform: none;
    white-space: normal; overflow-wrap: anywhere; justify-self: start; animation: none;
}
.timeline-connecting-line { left: 25px; background: var(--border-strong); }
.profile-xp-container-modern { min-width: 0; margin-bottom: 0; padding: 16px; gap: 10px; }
.profile-xp-header-main { flex-direction: row; align-items: center; gap: 12px; min-width: 0; }
.profile-level-badge-zone { width: auto; min-width: 0; max-width: 130px; padding: 8px 10px; border-radius: 10px; background: var(--studio-accent-soft); }
.level-badge-label { font-size: 12px; letter-spacing: normal; overflow-wrap: anywhere; }
.level-badge-number { font-size: 24px; }
.profile-xp-text-zone { min-width: 0; overflow-wrap: anywhere; }
.xp-values-display { flex-wrap: wrap; gap: 4px 8px; }
.xp-current-num { color: var(--text); font-size: 24px; }
.profile-xp-footer-tip { flex-direction: row; flex-wrap: wrap; gap: 6px 12px; }
.profile-xp-footer-tip > span { min-width: 0; overflow-wrap: anywhere; }
.xp-footer-right { color: var(--text); }
.profile-page .xp-zone-title { letter-spacing: normal; text-transform: none; }
.profile-progress-track, .xp-progress-container { background: var(--background-soft); border-color: var(--border); }
.profile-progress-track { height: 8px; }
.profile-tabs-container { flex-wrap: wrap; gap: 8px; }
.profile-page .profile-tabs-container { justify-content: flex-start; margin: 0; padding-bottom: 8px; }
.profile-tab-btn { color: var(--muted); min-height: 44px; }
.profile-tab-btn:hover { color: var(--text); background: var(--background-soft); }
.profile-tab-btn.active { color: var(--yellow); background: var(--studio-accent-soft); border-color: var(--yellow); box-shadow: none; }
.stats-summary { grid-template-columns: repeat(auto-fit, minmax(min(145px, 100%), 1fr)); gap: 12px; }
.profile-page .stat-box { min-width: 0; padding: 12px; overflow-wrap: anywhere; }
.profile-page .stat-box strong { font-size: 24px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.profile-page .loading-card { padding: 20px 12px; }
.stat-card span, .stats-card span, .stat-box span { color: var(--muted); }
.stat-card strong, .stats-card strong, .stat-box strong, .inventory-item-card h4,
.public-stats-title, #publicName { color: var(--text) !important; }
.history-section { padding: 18px; min-width: 0; }
.profile-page .section-heading { margin-bottom: 0; }
.profile-page .section-heading h2 { margin: 0; font-size: 1.1rem; }
.profile-page #profileInventorySection { margin-top: 0 !important; }
.profile-page .inventory-group { margin-top: 16px; }
.profile-page .empty-state-text { padding: 12px; }
.history-table-wrapper { max-height: 440px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
.history-table { min-width: 560px; }
.history-table thead { position: sticky; top: 0; z-index: 1; background: var(--background-soft); }
.history-table th { background: var(--background-soft); color: var(--muted); }
.profile-page .history-table-wrapper .history-table thead th { background: var(--background-soft); color: var(--muted); }
.profile-page .history-table th, .profile-page .history-table td { padding: 10px 12px; font-size: 13px; }
.history-table td { color: var(--text); border-color: var(--border); }
.history-table tr:hover { background: var(--background-soft); }
.history-table a { color: var(--text); }
.inventory-item-type { color: var(--muted); }
.equip-btn.equipped { background: var(--green); color: var(--background); border-color: var(--green); }
.public-profile-page { max-width: 960px; }
.public-profile-card-modern {
    display: grid; grid-template-columns: 48px minmax(0, 1fr) minmax(160px, auto);
    align-items: center; gap: 12px; padding: 16px; margin: 0;
}
.public-info-zone { min-width: 0; }
.public-info-zone .eyebrow { margin: 0; }
.public-info-zone #publicName { margin: 0; font-size: clamp(1.25rem, 3vw, 1.5rem); line-height: 1.25; overflow-wrap: anywhere; }
.public-career-summary { position: relative; z-index: 2; display: grid; gap: 6px; min-width: 0; justify-items: start; }
.public-profile-card-modern .public-rank-badge { color: var(--text) !important; max-width: 100%; flex-wrap: wrap; letter-spacing: normal; text-transform: none; }
.public-rank-badge > span:last-child { opacity: 1 !important; }
.public-xp-sub { overflow-wrap: anywhere; line-height: 1.5; }
.public-stats-title { font-size: 1rem; }
.public-profile-page .modern-stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#publicBadgeIcon { background: var(--panel-solid) !important; border-color: var(--border) !important; }
.podium-user { color: var(--text); background: var(--panel-solid); border-color: var(--border); }
.podium-name { color: var(--text); overflow-wrap: anywhere; }
.podium-xp { color: var(--muted); }
:root[data-theme="light"] .row-rank-badge-inline { color: var(--text) !important; background: var(--background-soft) !important; }

.landing-hero-section { background: transparent; min-height: 90dvh; padding: 100px 24px 60px; }
.landing-grid-container { max-width: 1200px; gap: 64px; }
.landing-hero-text h1 { color: var(--text); text-shadow: none; letter-spacing: -.05em; }
.landing-lead, .rating-text { color: var(--muted); }
.auth-card { background: var(--panel-solid); text-align: left; }
.auth-card-header h2, .auth-card h2 { color: var(--text); }
.auth-card-header p { color: var(--muted); }
.auth-card input { background: var(--background-soft); color: var(--text); border-color: var(--border-strong); min-height: 48px; }
.auth-card-footer { border-color: var(--border); }
.hero-badge, .step-modern-card { background: var(--panel-solid); color: var(--text); border-color: var(--border); box-shadow: var(--studio-shadow); }
.step-modern-card p { color: var(--muted); }
.landing-info-content { background: var(--background); }
.stars { display: none; }
.lobby-card p { color: var(--muted); }
.queue-status-box { background: var(--background-soft); border-color: var(--border); }

/* All game modes share readable, stationary controls instead of hover-only map expansion. */
.game-topbar { box-shadow: 0 4px 20px #0001; }
.game-container { background: var(--background); }
.movie-quiz-sidebar {
    width: clamp(260px, 23vw, 340px); flex-shrink: 0;
    padding: 24px; background: var(--panel-solid); border-color: var(--border); animation: none;
}
.movie-quiz-sidebar h3 { color: var(--text); line-height: 1.5; }
.quiz-option-btn { background: var(--background-soft); border-color: var(--border); color: var(--text); padding: 16px; }
.quiz-option-btn:hover { background: var(--panel-solid); border-color: var(--border-strong); color: var(--text); }
.quiz-option-btn.selected { color: var(--yellow) !important; }
.image-section { min-width: 0; padding: 0; justify-content: flex-start; }
.image-section #streetViewContainer {
    height: 100% !important; width: 100%; border-radius: 0 !important;
    box-shadow: none !important; background: #101722; color: #f1f5fc;
}
.year-panel {
    position: absolute; top: auto; bottom: 20px; left: 20px;
    width: calc(100% - 396px); max-width: 760px;
    margin: 0; padding: 12px 16px; border-radius: var(--studio-radius);
    background: var(--studio-header); border-color: var(--border); box-shadow: var(--studio-shadow);
}
.daily-year-control { padding: 12px 16px; }
.year-panel label, .daily-year-control label { display: block; color: var(--muted); font-size: .8rem; text-transform: none; letter-spacing: normal; margin-bottom: 4px; }
.year-value, .year-readout {
    display: block; color: var(--yellow); font-size: 1.5rem !important; font-weight: 750;
    line-height: 1.2; font-variant-numeric: tabular-nums; font-family: inherit; text-shadow: none; margin: 0;
}
.year-panel input[type="range"], .daily-year-control input[type="range"] {
    appearance: none; -webkit-appearance: none; box-sizing: border-box; display: block;
    width: 100%; min-width: 0; height: 44px; min-height: 44px; padding: 0; margin: 0;
    background: transparent; border: 0; border-radius: 0; cursor: pointer;
}
.year-panel input[type="range"]:focus-visible, .daily-year-control input[type="range"]:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.year-panel input[type="range"]::-webkit-slider-runnable-track, .daily-year-control input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: var(--border-strong); border-radius: 4px; }
.year-panel input[type="range"]::-moz-range-track, .daily-year-control input[type="range"]::-moz-range-track { height: 4px; background: var(--border-strong); border-radius: 4px; }
.year-panel input[type="range"]::-webkit-slider-thumb, .daily-year-control input[type="range"]::-webkit-slider-thumb {
    appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px;
    border: 2px solid var(--panel-solid); border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 1px var(--yellow); transition: none;
}
.year-panel input[type="range"]::-moz-range-thumb, .daily-year-control input[type="range"]::-moz-range-thumb {
    box-sizing: border-box; width: 18px; height: 18px; border: 2px solid var(--panel-solid);
    border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 1px var(--yellow); transition: none;
}
.year-panel input[type="range"]::-webkit-slider-thumb:hover, .daily-year-control input[type="range"]::-webkit-slider-thumb:hover { transform: none; background: var(--yellow-light); }
.year-panel input[type="range"]::-moz-range-thumb:hover, .daily-year-control input[type="range"]::-moz-range-thumb:hover { transform: none; }
.map-section, .map-section:hover, .map-section:focus-within {
    width: 340px !important; height: 280px !important;
    bottom: 20px; right: 20px; opacity: 1;
    background: var(--panel-solid); border-color: var(--border);
    box-shadow: var(--studio-shadow); transition: none;
}
.map-section #map { min-height: 0; }
.game-container .map-section.map-results-active { width: min(48vw, 660px) !important; height: 45% !important; right: 20px !important; }
.result-banner, .game-over-panel { background: var(--panel-solid); border-color: var(--border); color: var(--text); box-shadow: var(--studio-shadow); }
.result-banner { border-radius: 0; }
.game-over-panel { border-radius: 0; }
.result-banner h2, .game-over-panel h2 { color: var(--text); }
.custom-modal-card { background: var(--panel-solid); color: var(--text); border-color: var(--border); }
.custom-modal-card p { color: var(--muted); }
.remaining-movies, .timer-display, .score-display { background: var(--background-soft); border-color: var(--border); color: var(--text); }
.arena-hp-bar { background: var(--background-soft); }
.arena-player-status span, .arena-hp-text { color: var(--text); }
.notify { background: var(--panel-solid); color: var(--text); border-color: var(--border); box-shadow: var(--studio-shadow); }
.notify p { color: var(--text); }

@media (max-width: 1100px) {
    .game-locked-nav .game-status-user { display: none; }
    .game-locked-nav .give-up-button { margin-left: auto; }
    .movie-modern-dashboard { grid-template-columns: minmax(0, 1fr) 300px; }
    .year-panel { width: calc(100% - 330px); }
    .map-section, .map-section:hover, .map-section:focus-within { width: 280px !important; height: 240px !important; }
}
@media (max-width: 900px) {
    .movie-modern-dashboard, .profile-two-column-layout { grid-template-columns: 1fr; }
    .profile-layout-left { position: static; }
    .ranks-timeline-container { max-height: 260px; overflow-y: auto; }
    .game-container .movie-quiz-sidebar { width: 100%; height: auto; padding: 16px; }
    .quiz-options-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .game-container .image-section { padding: 0 !important; height: auto; min-height: 420px; }
    .image-section #streetViewContainer { height: 55dvh !important; min-height: 300px; }
    .year-panel { position: relative; inset: auto; width: calc(100% - 24px); max-width: none; margin: 12px; }
    .game-container .map-section, .game-container .map-section.map-results-active { height: 340px !important; width: calc(100% - 24px) !important; }
    .game-container .map-section #map { height: 270px !important; }
    .landing-grid-container { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 600px) {
    .page-content { padding: 16px 14px 28px; }
    .movie-modern-dashboard { margin-top: 16px; padding: 0 14px; }
    .nav-user { display: none; }
    .profile-hero { flex-wrap: wrap; padding: 14px; }
    .profile-hero-text { flex: 1 1 140px; }
    .public-profile-card-modern { grid-template-columns: 48px minmax(0, 1fr); padding: 14px; }
    .public-career-summary { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--border); padding-top: 10px; }
    .public-profile-page .modern-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-xp-container-modern, .history-section, .daily-awards { padding: 16px; }
    .quiz-options-grid { grid-template-columns: 1fr; }
    .landing-hero-section { padding-top: 90px; }
    .steps-modern-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 24px; }
    .game-hud { gap: 6px; }
    .remaining-movies, .timer-display, .score-display { padding: 8px 10px; font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Keep the brand compact without replacing its text label. */
.brand-mark {
    display: inline-grid; place-items: center; width: 28px; height: 28px;
    background: var(--yellow); color: var(--button-text); border-radius: 8px;
    font-size: 16px; font-weight: 900; letter-spacing: -.08em; flex-shrink: 0;
}
.nav-logo-brand, .game-status-brand { display: flex; align-items: center; gap: 9px; width: auto; white-space: nowrap; }
.player-settings > summary { min-height: 44px; box-sizing: border-box; display: flex; align-items: center; border-radius: 10px; }
.game-locked-nav .game-status-brand span:not(.brand-mark) { font-size: 12px; font-weight: 500; }
.inventory-group { margin-top: 24px; }
.inventory-group-heading { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.inventory-group-heading h3 { font-size: 15px; color: var(--text); }
.inventory-group-heading span { color: var(--muted); font-size: 12px; }
.inventory-item-card { position: relative; padding: 16px; }
.inventory-item-card:has(.equip-btn.equipped) { border-color: var(--yellow); }
.inventory-item-preview {
    display: grid; place-items: center; width: 48px; height: 48px;
    background: var(--background-soft); border: 1px solid var(--border);
    border-radius: 14px; font-size: 25px; margin-bottom: 12px;
}
.inventory-item-card h4 { overflow-wrap: anywhere; line-height: 1.5; }
.inventory-summary { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 12px 0; }
.inventory-equipped-preview {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
    padding: 12px; margin-bottom: 14px; border-radius: 12px;
    background: var(--background-soft); color: var(--muted); font-size: 12px;
}
.inventory-equipped-preview > strong { color: var(--text); overflow-wrap: anywhere; }
.inventory-equipped-preview .inventory-item-preview { width: 32px; height: 32px; margin: 0; font-size: 18px; }
.inventory-group[aria-labelledby="inventory-heading-title"] .inventory-item-preview {
    width: 100%; height: auto; min-height: 48px; padding: 10px;
    font-size: 12px; white-space: normal; overflow-wrap: anywhere;
}
.equip-btn { margin-top: auto; }
.equip-btn.equipped { background: var(--studio-accent-soft); border-color: var(--yellow); color: var(--yellow); }

/* A stopped Google panorama is not an end screen: render only map and results. */
body.game-finished .image-section,
body.game-finished .movie-quiz-sidebar,
body.game-finished .game-hud,
body.game-finished .arena-hud-container { display: none !important; }
body.game-finished .game-container {
    width: calc(100% - 400px); display: block; padding: 20px;
    height: calc(100dvh - var(--game-header-height, 140px)) !important;
    overflow: hidden;
}
body.game-finished .game-container .map-section.map-results-active,
body.game-finished .game-container .map-section {
    position: relative !important; inset: auto !important; margin: 0;
    width: 100% !important; height: 100% !important; max-height: none;
    padding: 0; border-radius: 16px; box-shadow: none;
}
body.game-finished #guessBtn { display: none; }
body.game-finished .game-over-panel {
    width: 400px; padding: 30px; gap: 18px; border-radius: 0;
    top: var(--game-header-height, 140px);
    height: calc(100dvh - var(--game-header-height, 140px));
}
body.game-finished:has(.game-container.hidden) .game-over-panel { width: min(600px, 100%); }

@media (max-width: 1150px) {
    .main-nav { position: relative; gap: 8px; }
    .nav-menu { margin-left: auto; }
    .nav-menu > summary {
        display: list-item; list-style-position: inside; cursor: pointer;
        min-height: 44px; box-sizing: border-box; padding: 12px;
        border: 1px solid var(--border); border-radius: 10px;
        background: var(--panel-solid); color: var(--text); font-size: 13px;
    }
    .main-nav .nav-menu .nav-links-container {
        position: absolute; z-index: 1100; top: calc(100% + 8px); right: 0;
        display: grid; grid-template-columns: minmax(0, 1fr); width: min(240px, calc(100vw - 28px));
        max-height: min(420px, 65dvh); overflow-y: auto; padding: 6px;
        border: 1px solid var(--border); border-radius: 12px;
        background: var(--panel-solid); box-shadow: var(--studio-shadow);
    }
    .main-nav .nav-links-container a { min-height: 44px; box-sizing: border-box; white-space: normal; overflow-wrap: anywhere; }
    .main-nav .nav-user-container { margin-left: 0; }
}
@media (max-width: 900px) {
    body.game-finished .game-container {
        width: 100%; min-height: 0; height: 48dvh !important;
        padding: 12px; display: block;
    }
    body.game-finished .game-container .map-section #map { height: 100% !important; }
    body.game-finished .game-over-panel {
        position: relative; inset: auto; width: 100%; height: auto;
        max-height: none; margin: 0; border: 0; padding: 24px;
    }
    .game-locked-nav .game-status-brand > span:not(.brand-mark) { display: none; }
}
@media (max-width: 600px) {
    .topbar, .game-topbar { padding-inline: 12px; }
    .nav-logo-brand { font-size: 16px; }
    .main-nav .nav-logout { min-height: 44px; }
}
