/* Persistent navigation and dedicated destinations over the living town. */
#app-wrapper > .hub-masthead { width: 100%; margin: 0; pointer-events: auto; background: linear-gradient(180deg,#0d2342 0%,#091a34 100%); border: 0; border-bottom: 1px solid #2f5a88; border-radius: 0; }
.hub-nav a[aria-current="page"] { color: #fff; background: #173e67; box-shadow: inset 0 -3px #63d8ff; }
body:not(:has(#start-screen.active)) .skip-link { display: block; }
.destination-screen { width: min(1060px, calc(100% - 48px)); margin: 0 auto 48px; padding: 32px !important; color: #f5f8ff; text-align: left; }
.destination-screen > h1 { font-size: clamp(23px, 4vw, 38px); text-align: left; line-height: 1.6; }
.destination-intro, .destination-note { font: 16px/1.7 system-ui, sans-serif; color: #d5e3f5; max-width: 70ch; margin: 12px 0 24px; }
#games-screen .popular-section { width: 100%; }
#games-screen .hero-games { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
#games-screen .hero-card { min-width: 0; min-height: 270px; padding: 24px 18px; border: 1px solid #647fa2; border-radius: 12px; background: #112c4b; display: flex; align-items: center; flex-direction: column; box-shadow: none; }
#games-screen .hero-card:hover { background: #1b3e63; border-color: #92caff; }
#games-screen .hero-title { font: 750 18px/1.5 system-ui, sans-serif; color: #f5f8ff; text-shadow: none; }
#games-screen .hero-desc { font: 15px/1.6 system-ui, sans-serif; color: #d5e3f5; text-shadow: none; margin: 8px 0 20px; }
#games-screen .hero-screen, #games-screen .hero-trivia-icons, #games-screen .game-art { height: 110px; display: flex; align-items: center; justify-content: center; background: none; border: 0; box-shadow: none; }
#games-screen .hero-screen img { width: 110px; height: 110px; object-fit: contain; }
#games-screen .hero-trivia-icons img { width: 56px; }
#games-screen .hero-duel-icon { animation: none; color: #89ceff; }
#leaderboards-screen .lb-block { margin: 24px 0; width: 100%; }
#leaderboards-screen .lb-panel { max-height: none; overflow: visible; font: 15px/1.6 system-ui, sans-serif; }
#leaderboards-screen .lb-row { flex-wrap: wrap; gap: 10px; font-size: 15px; }
#leaderboards-screen .lb-name { overflow-wrap: anywhere; }
#leaderboards-screen .lb-score { white-space: normal; }
#leaderboards-screen .lb-rank.gold { color: #ffdc73; }
#leaderboards-screen .lb-rank.silver { color: #d5e3f5; }
#leaderboards-screen .lb-rank.bronze { color: #ffc191; }
.info-screen { max-width: 820px; overflow-wrap: anywhere; font: 16px/1.75 system-ui, sans-serif; }
.info-screen h2 { font: 750 23px/1.5 system-ui, sans-serif; color: #f5f8ff; margin: 28px 0 12px; }
.info-screen p, .info-screen li { font: 16px/1.75 system-ui, sans-serif; margin-bottom: 12px; }
.info-screen a { color: #a5d9ff; text-decoration: underline; }
.info-screen ul { padding-left: 24px; }
.info-screen table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.info-screen th, .info-screen td { padding: 12px; text-align: left; vertical-align: top; border: 1px solid #647fa2; font: 15px/1.6 system-ui, sans-serif; }
.info-screen code { overflow-wrap: anywhere; }
@media (min-width: 1280px) { .destination-screen { width: min(1060px, calc(100% - 360px)); } }
@media (max-width: 760px) { #games-screen .hero-games { grid-template-columns: repeat(2, minmax(0, 1fr)); } .destination-screen { padding: 24px 16px !important; } }
@media (max-width: 480px) { #games-screen .hero-games { grid-template-columns: 1fr; } #app-wrapper > .hub-masthead { width: calc(100% - 16px); } .destination-screen { width: calc(100% - 24px); } #leaderboards-screen .lb-score { flex-basis: 100%; } }
#app-wrapper > .hub-masthead { flex-direction: row; justify-content: space-between; gap: 20px; padding: 18px 24px; }
#app-wrapper > .hub-masthead .home-tools { position: static; flex: none; }
#app-wrapper > .hub-masthead .snd-btn { color: #e0eafb; background: #142f50; border: 1px solid #6989af; min-height: 44px; font: 600 14px/1.5 system-ui, sans-serif; }
.hub-nav a { display: inline-flex; align-items: center; gap: 8px; }
.hub-nav a .ico { width: 19px; height: 19px; stroke: currentColor; }
.hub-nav a[aria-current="page"] { color: #fff; background: #12345d; box-shadow: inset 0 -3px #43c8ff, 0 0 14px #1478b833; }
.hub-brand { letter-spacing: .02em; text-shadow: 2px 2px #020b19; }
.destination-screen { align-items: stretch; }
@media (max-width: 1100px) { #app-wrapper > .hub-masthead { flex-wrap: wrap; gap: 12px; } #app-wrapper > .hub-masthead .hub-nav { order: 3; width: 100%; justify-content: center; flex-wrap: wrap; } }
@media (max-width: 480px) { #app-wrapper > .hub-masthead { padding: 12px 10px; } .hub-brand { font-size: 20px; gap: 10px; } .hub-nav a { padding: 9px 8px; gap: 5px; } .hub-nav a .ico { width: 17px; height: 17px; } .hub-nav a span { font-size: 13px; } }
.screen.destination-screen:not(#start-screen):not(#game-screen):not(#duel-countdown-screen):not(#duel-lobby-screen)::before { inset: 0; transform: none; width: 100%; }
#leaderboards-screen .lb-tab { min-height: 44px; font: 600 14px/1.5 system-ui, sans-serif; border: 1px solid #7998bc; color: #d5e3f5; background: #102847; }
#leaderboards-screen .lb-tab.selected { background: #deedff; color: #123b72; }
#leaderboards-screen .lb-game { background: #243e61; color: #e0eafb; border-color: #7998bc; font-size: 12px; }
#leaderboards-screen .lb-name { white-space: normal; }

/* The reference footer is a quiet utility rail. Keep the ad above it and give
   the legal links enough room to remain readable at 320px. */
.hub-footer { min-height: 64px; padding: 12px max(24px, calc((100% - 1200px) / 2)); justify-content: space-between; gap: 16px; background: #08172d; border-top: 1px solid #315a83; color: #d5e3f5; }
.hub-footer::before { content: "MonHub"; color: #f5f8ff; font: 700 18px/1.2 'Press Start 2P', monospace; margin-right: auto; }
.hub-footer a { color: #b7dcff; text-underline-offset: 3px; }
.hub-footer .motion-toggle { order: 4; }
@media (max-width: 600px) { .hub-footer { justify-content: center; padding: 12px 10px; } .hub-footer::before { flex-basis: 100%; text-align: center; } .hub-footer .motion-toggle { order: 0; } }
