:root {
    --ink: #172724;
    --muted: #50615c;
    --link: #075ca8;
    --gold: #ffcf28;
    --gold-edge: #dca812;
    --red: #e83427;
    --green: #176d45;
    --line: #d9e2df;
    --body-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --heading-font: 'GROBOLD', var(--body-font);
}

html, body { margin: 0; background: #fff; color: var(--ink); font-family: var(--body-font); font-size: 16px; letter-spacing: 0; }
body { min-height: 100vh; display: flex; flex-direction: column; }
* { box-sizing: border-box; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: #03457e; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
:focus-visible { outline: 3px solid #1681d1; outline-offset: 4px; }
.site-main { flex: 1; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: -80px; left: 16px; padding: 12px; background: white; }
.skip-link:focus { top: 8px; }
.site-header { position: relative; z-index: 10; background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1440px; min-height: 88px; margin: auto; padding: 0 40px; display: flex; align-items: center; gap: 48px; }
.site-brand { width: 160px; flex: 0 0 160px; display: flex; align-items: center; }
.site-brand img { width: 100%; height: 72px; object-fit: contain; animation: logo-breathe 3s ease-in-out infinite; }
.site-navigation { display: flex; align-items: center; justify-content: space-between; flex: 1; gap: 32px; }
.primary-links, .account-links { display: flex; gap: 28px; align-items: center; }
.primary-links { margin-inline: auto; }
.site-navigation a { font-family: 'Riffic', var(--body-font); font-size: 18px; font-weight: 700; white-space: nowrap; color: var(--ink); position: relative; }
.primary-links a { padding: 30px 0; }
.primary-links a[aria-current]::after { content: ''; position: absolute; bottom: 18px; left: 0; width: 100%; height: 4px; border-radius: 2px; background: var(--gold); }
.account-links { gap: 24px; }
.account-links > a:not(.button) { max-width: 160px; white-space: normal; overflow-wrap: anywhere; }
.account-links i { margin-right: 5px; }
.button { font-family: var(--body-font); font-size: 16px; font-weight: 700; min-height: 44px; height: auto; padding: 10px 22px; border-radius: 8px; box-shadow: none; transition: background-color .15s; gap: 12px; white-space: normal; text-align: center; }
.button-gold, .button.is-primary, input.button { background: var(--gold); border: 1px solid var(--gold-edge); color: var(--ink); box-shadow: inset 0 -3px 0 rgb(132 91 0 / 12%); }
.button-gold:hover, .button.is-primary:hover, input.button:hover { background: #ffdc5a; border-color: var(--gold-edge); color: var(--ink); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font-size: 20px; cursor: pointer; }
.town-hero { position: relative; height: min(600px, calc(100svh - 180px)); min-height: 460px; border-bottom: 6px solid var(--gold); overflow: hidden; }
.town-scene { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center 75%; }
.hero-content { position: relative; z-index: 1; margin: auto; text-align: center; padding: 26px 20px 0; max-width: 700px; }
.hero-content h1 { margin: 0 auto; width: 400px; max-width: 80%; }
.hero-logo { display: block; width: 100%; height: auto; animation: logo-breathe 3s ease-in-out infinite; transform-origin: center center; }
.hero-tagline { margin: 12px 0 22px; font: 24px/1.35 var(--heading-font); color: #fff; text-shadow: 0 2px 3px #173c5c, 1px 0 2px #173c5c, -1px 0 2px #173c5c; }
.launcher-play { --play-scale: .84; position: relative; display: block; flex: 0 0 auto; width: calc(187px * var(--play-scale)); height: calc(110px * var(--play-scale)); animation: arrow-glow 2.8s ease-in-out infinite; }
/* Keep the original arrow face, but exclude the launcher's wooden post. */
.launcher-play::before { content: ''; position: absolute; inset: 0; background: url('/static/img/launcher-controls.png') calc(-790px * var(--play-scale)) calc(-492px * var(--play-scale)) / calc(1026px * var(--play-scale)) calc(770px * var(--play-scale)) no-repeat; clip-path: polygon(0 0, 100% 0, 100% 100%, 65% 100%, 65% 80%, 40% 76%, 0 84%); }
.launcher-play:hover, .launcher-play:focus-visible { filter: drop-shadow(0 0 12px #ffcf28); }
@keyframes arrow-glow { 0%, 100% { filter: drop-shadow(0 0 3px rgb(255 181 0 / 55%)); } 50% { filter: drop-shadow(0 0 10px rgb(255 181 0 / 95%)); } }
@keyframes logo-breathe { 0%, 100% { transform: scale(.96); } 50% { transform: scale(1.02); } }
.tagline-punctuation { font-family: var(--body-font); font-weight: 900; margin-inline-start: -2px; }
.hero-account { margin-top: 14px; font-size: 14px; font-weight: 600; color: #fff; text-shadow: 0 1px 3px #17392c, 0 0 5px #17392c; }
.hero-account a, .hero-account a:hover { color: inherit; text-decoration: underline; font-weight: 700; }
.home-news { max-width: 1280px; margin: auto; padding: 32px 40px 38px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.section-heading h2 { margin: 0; font: 32px/1.3 var(--heading-font); color: var(--ink); }
.section-heading > a, .news-empty a { font-weight: 700; }
.section-heading i, .news-empty a i { margin-left: 8px; }
.news-empty { padding: 24px 0 0; text-align: center; }
.news-empty > i { font-size: 42px; color: #98aba4; }
.news-empty p { margin: 12px 0 8px; font-size: 18px; font-weight: 650; }
.news-feature { display: flex; align-items: center; gap: 32px; padding-top: 28px; }
.news-feature > a { flex: 0 1 400px; }
.news-feature img { display: block; aspect-ratio: 16 / 9; width: 100%; object-fit: cover; border-radius: 8px; }
.news-feature > div { flex: 1; min-width: 0; }
.news-feature h3 { font: 24px/1.3 var(--heading-font); margin: 8px 0 16px; }
.news-feature p { margin-bottom: 16px; }
.post-meta { color: var(--muted); font-size: 14px; }
.site-footer { position: relative; isolation: isolate; background: var(--green); color: white; }
.footer-trees { position: absolute; bottom: 0; width: 190px; height: 190px; object-fit: contain; object-position: bottom; pointer-events: none; }
.footer-trees-left { left: 0; }
.footer-trees-right { right: 0; transform: scaleX(-1); }
.footer-inner { position: relative; z-index: 1; max-width: 1280px; margin: auto; min-height: 100px; padding: 16px 140px; display: flex; align-items: center; justify-content: center; gap: 32px; }
.footer-brand { flex: 0 0 120px; }
.footer-brand img { display: block; width: 120px; height: 65px; object-fit: contain; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer a { color: white; font-size: 14px; font-weight: 600; }
.site-inner .site-main { background: #98b444 url('/static/img/town-square.png') 65% 62% / 145% auto no-repeat; }
.site-inner .page { margin: 0; padding: 40px 24px; min-height: calc(100vh - 188px); }
.page > .container { max-width: 1120px; padding: 0; }
.page > .container > .columns { margin: 0; gap: 24px; flex-wrap: wrap; }
.page > .container > .columns > .card { width: 560px; flex: 0 1 560px; max-width: 100%; border-radius: 8px; border-top: 6px solid var(--gold) !important; background: white; box-shadow: 0 4px 12px rgb(18 45 32 / 16%); padding: 28px 32px; }
.page > .container > .columns > .card.is-10 { width: 960px; flex-basis: 960px; }
.page > .container > .columns > .card.faq-panel { width: 860px; flex-basis: 860px; }
.faq-panel .column .news-title { font-size: 20px; margin: 24px 0 12px; }
.page .card .columns { margin-left: 0; margin-right: 0; }
.page .card .columns > .column { width: 100%; padding-left: 0; padding-right: 0; }
.page .news-title { font: 28px/1.35 var(--heading-font); color: var(--ink); text-shadow: none; margin-bottom: 24px; overflow-wrap: anywhere; }
.page .card > br, .page .card > center > br { display: none; }
.page p, .page label { line-height: 1.5; }
.page .input, .page select, .page textarea { font-family: var(--body-font); font-size: 16px; background: white; border: 1px solid #c3d1ca; border-radius: 6px; color: var(--ink); min-height: 44px; height: auto; padding: 10px 12px; box-shadow: none; }
.page .input:focus { border-color: #1681d1; box-shadow: 0 0 0 2px rgb(22 129 209 / 18%); }
.page .help { font-family: var(--body-font); font-size: 13px; color: var(--muted); margin-top: 6px; }
.page .invalid-feedback { display: block; padding: 12px 0; color: #a6211b; }
.account-form .field { margin-bottom: 16px; }
.account-form label { display: block; font-size: 14px; font-weight: 650; margin-bottom: 6px; }
.account-form .checkbox { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.account-form input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--green); }
.account-form .button { width: 100%; margin-top: 4px; }
.form-links { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; text-align: center; font-size: 14px; }
.form-links a { text-decoration: underline; }
.form-links p + p { margin-top: 12px; }
.account-form [hidden] { display: none !important; }
.registration .news-title { text-align: center; }
.news-list { width: 100%; padding: 24px; background: white; border-top: 6px solid var(--gold); border-radius: 8px; }
.news-list h1 { font: 28px/1.3 var(--heading-font); margin: 0 0 24px; }
.news-list .news-entry { border-top: 1px solid var(--line); padding: 20px 0; display: flex; gap: 24px; align-items: center; }
.news-entry img { width: 240px; max-width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; }
.news-entry h2 { font: 22px/1.4 var(--heading-font); }
@media (min-width: 1600px) { .town-hero { height: min(680px, calc(100svh - 180px)); } .hero-content { padding-top: 48px; } }
@media (max-width: 1100px) {
    .header-inner { padding: 0 24px; gap: 24px; }
    .primary-links, .account-links { gap: 18px; }
    .site-navigation { gap: 20px; }
    .site-brand { width: 140px; flex-basis: 140px; }
    .site-navigation a { font-size: 14px; }
    .account-links .button { padding: 10px 14px; }
}
@media (max-width: 900px) {
    .header-inner { min-height: 80px; justify-content: space-between; }
    .site-brand img { height: 72px; }
    .nav-toggle { display: block; flex: 0 0 44px; }
    .site-navigation { display: none; position: absolute; top: 100%; left: 0; width: 100%; padding: 20px 24px; background: white; border-bottom: 3px solid var(--gold); box-shadow: 0 6px 8px rgb(18 45 32 / 12%); }
    .site-navigation.is-open { display: flex; flex-wrap: wrap; }
    .primary-links, .account-links { flex-wrap: wrap; }
    .primary-links { margin-inline: 0; }
    .primary-links a { padding: 10px 0; }
    .primary-links a[aria-current]::after { bottom: 1px; }
}
@media (max-width: 600px) {
    .header-inner { min-height: 74px; padding: 0 20px; }
    .header-inner { padding: 0 16px; gap: 8px; }
    .site-brand { width: 86px; flex-basis: 86px; }
    .site-brand img { height: 50px; }
    .launcher-play { --play-scale: .64; }
    .site-navigation.is-open, .primary-links, .account-links { align-items: stretch; flex-direction: column; gap: 10px; }
    .site-navigation a { font-size: 16px; padding: 10px 0; }
    .primary-links a[aria-current]::after { width: 30px; }
    .account-links { border-top: 1px solid var(--line); padding-top: 10px; }
    .town-hero { height: auto; min-height: 0; overflow: visible; }
    .town-scene { display: block; position: relative; height: auto; width: 100%; object-fit: contain; }
    .hero-content { position: static; padding: 20px 20px 24px; background: var(--green); }
    .hero-content h1 { position: absolute; z-index: 2; width: min(180px, 50%); max-width: none; left: 50%; top: 20px; bottom: auto; transform: translateX(-50%); }
    .hero-tagline { font-size: 18px; color: #fff; text-shadow: none; margin: 0 0 18px; }
    .hero-account { margin-top: 16px; font-size: 13px; }
    .home-news { padding: 28px 20px; }
    .section-heading { gap: 16px; }
    .section-heading h2 { font-size: 23px; }
    .section-heading > a { font-size: 13px; white-space: nowrap; }
    .news-empty p { font-size: 16px; }
    .news-feature { flex-direction: column; align-items: stretch; gap: 16px; }
    .news-feature > a { flex-basis: auto; }
    .footer-inner { padding: 20px 64px; flex-direction: column; align-items: flex-start; gap: 16px; }
    .footer-trees { width: 64px; height: 90px; }
    .footer-trees-left { left: 0; }
    .footer-trees-right { right: 0; }
    .footer-brand { flex-basis: auto; }
    .site-footer nav { gap: 16px; }
    .site-inner .site-main { background-position: 38% top; background-size: auto 100%; }
    .site-inner .page { padding: 24px 16px; }
    .page > .container > .columns > .card { padding: 24px 20px; }
    .page .news-title { font-size: 24px; margin-bottom: 22px; }
    .news-list { padding: 20px; }
    .news-list .news-entry { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
