/* Local system fallback fonts cover Japanese and Guarani; no network font dependency. */
html{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans","Hiragino Kaku Gothic ProN","Yu Gothic",Arial,sans-serif}
button,select,input{font-family:inherit}button{overflow-wrap:anywhere}html[lang=ja] .eyebrow{letter-spacing:.08em}
.header-actions{flex-wrap:wrap;gap:8px 14px}.header{height:auto;min-height:91px;padding-block:12px}.header-identity{min-width:0}
.resource-label,.resource-state,.slider-label,.trait-card,.trait-section h3,.status-panel h2,.header-actions{overflow-wrap:anywhere;hyphens:auto}
.trait-section h3{flex-wrap:wrap;gap:8px}.trait-section h3 small{max-width:none}.decision-footer .primary{flex-shrink:1}.restart-button{white-space:normal}
.time-info{min-width:0}.time-info small{white-space:normal}.status-panel{min-width:0}.resource-body{min-width:0}.resource-name{flex-wrap:wrap}.resource-state{white-space:normal}
.booting> :not(#welcome){visibility:hidden}.boot-error{position:fixed;inset:25% 10%;background:#f7f8f2;border:1px solid #82926b;padding:32px;z-index:100;font-size:18px}
#welcome{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;overflow:auto;background:#e7ecda;color:#2d4231;box-shadow:none;opacity:1;transition:opacity .26s ease;isolation:isolate}
#welcome.leaving{opacity:0}#welcome::backdrop{background:#e7ecda}
#welcome-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:-3;pointer-events:none}
.welcome-shade{position:absolute;inset:0;z-index:-2;background:linear-gradient(90deg,transparent 24%,#eef0df30 45%,#edf0dfdf 75%,#edf0dff2)}
.welcome-signature{position:absolute;left:4.8%;top:4.5%;display:flex;align-items:center;gap:12px;font-size:12px;letter-spacing:.13em;color:#526346}.welcome-signature>span:first-child{font:40px Georgia}
.welcome-panel{width:min(440px,39vw);margin:clamp(92px,15vh,160px) 7.5% 110px auto;animation:arrive .65s ease both}
.welcome-kicker{font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:#6d7b5d}
#welcome h1{font:400 clamp(44px,4.6vw,72px)/1.04 Georgia,"Yu Mincho",serif;letter-spacing:-.04em;margin:18px 0 24px;overflow-wrap:anywhere}
.welcome-description{font-size:16px;line-height:1.8;max-width:360px;color:#637056;margin:0 0 36px}
#welcome h2{font-family:inherit;font-size:19px;font-weight:400;line-height:1.5;margin:0 0 16px} .language-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.language-choice{display:flex;align-items:center;gap:12px;min-height:51px;padding:12px 14px;border:1px solid #a3b08b66;border-radius:8px;background:#f8f9ef70;text-align:left;font-size:15px;line-height:1.4;transition:background .2s,border-color .2s,box-shadow .2s}
.language-choice>span{font-size:inherit;line-height:inherit}.language-choice:hover{background:#f8faef!important;border-color:#7c9063}
.language-choice[aria-pressed=true]{border-color:#71845c;background:#e2eacfc9;box-shadow:inset 0 0 0 1px #71845c}
.welcome-note{font-size:12px;line-height:1.7;color:#718061;margin:20px 0 0}
.welcome-footer{position:absolute;bottom:38px;left:5%;right:5%;display:flex;align-items:center;gap:14px;color:#546947;font-size:12px}.welcome-footer>span:first-child{font:28px Georgia}.welcome-footer-line{height:1px;background:#81936e55;flex:1;margin-left:10px}.welcome-footer button{padding:10px 4px;max-width:65%;text-align:left}
.menu-buttons{display:grid;gap:12px;max-width:360px}.menu-buttons button{min-height:54px;border-radius:8px;font-size:16px}.menu-buttons .secondary{background:#f6f8ee66;border:1px solid #9dac8766}.menu-buttons .primary:hover{background:#476b43}
.welcome-volume{display:grid;gap:8px;font-size:14px;margin:23px 0 16px}.welcome-volume input{accent-color:#6e8255;width:100%}.welcome-checkbox{display:flex;align-items:center;gap:10px;font-size:14px;margin:12px 0 20px}.welcome-checkbox input{accent-color:#6e8255;width:18px;height:18px}
#welcome-back,#welcome-language-back{padding:10px 18px;border:1px solid #9dac87;border-radius:6px}
#language-settings{width:min(600px,94vw)}#language-settings h2{font-size:26px}#language-settings p{font-size:14px;line-height:1.7}#language-storage-warning{font-size:13px;color:#845a38}
@keyframes arrive{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:750px){
 #welcome-canvas{position:fixed;opacity:.56}.welcome-shade{position:fixed;background:linear-gradient(#edf0df33,#edf0dfe6 30%,#edf0dff2 75%)}
 .welcome-panel{width:auto;margin:115px 24px 115px;max-width:470px}.welcome-signature{left:24px;top:25px;font-size:11px}.welcome-footer{position:relative;bottom:auto;left:auto;right:auto;margin:0 24px 25px}.welcome-kicker{font-size:10px}#welcome h1{font-size:52px;max-width:380px}.welcome-description{margin-bottom:28px}.language-choice{font-size:15px;padding:12px;gap:8px}.header-actions .quiet{font-size:12px;min-height:36px}.header-side{min-width:0}.header{align-items:flex-start;gap:12px}.header-actions{justify-content:flex-end}.decision-footer{position:static}.trait-section h3 small{text-align:left}.welcome-panel:has(#welcome-settings:not([hidden])){margin-top:95px}
}
@media(max-width:360px){.welcome-panel{margin-inline:18px}#welcome h1{font-size:44px}.language-choice{font-size:14px;padding:10px}}
@media(prefers-reduced-motion:reduce){#welcome,.welcome-panel{transition:none;animation:none}}

#welcome .menu-buttons .primary{background:#3b5b3d;color:#fff;border:1px solid #3b5b3d;text-align:center}

.modal-top{flex-wrap:wrap;gap:8px}.modal-top .round{order:2}

#welcome .welcome-panel>section:not([hidden]){animation:arrive .3s ease both}@media(prefers-reduced-motion:reduce){#welcome .welcome-panel>section{animation:none!important}}

dialog{overflow-wrap:anywhere}dialog p,dialog section,dialog small{min-width:0}dialog select{max-width:100%}

#welcome-language-back{margin-top:16px}

/* The gateway speaks only through autonyms until the player chooses a language. */
#welcome[data-view=language] .welcome-signature>span:last-child,
#welcome[data-view=language] .welcome-kicker,
#welcome[data-view=language] #welcome-title,
#welcome[data-view=language] .welcome-description,
#welcome[data-view=language] .welcome-footer{display:none}
#welcome[data-view=language] .welcome-panel{margin-top:clamp(130px,24vh,260px)}
.language-symbol{display:block;width:48px;height:48px;color:#586e4e;margin-bottom:28px}
#choose-language-title:focus{outline:none}
.language-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.language-choice{justify-content:center;min-height:58px;font-size:17px}
#welcome-language-back{min-width:52px;min-height:44px;font-size:24px;line-height:1}
@media(max-width:750px){#welcome[data-view=language] .welcome-panel{margin-top:135px}.language-symbol{width:42px;height:42px;margin-bottom:24px}.language-choice{font-size:17px}}

/* One vertical column of large autonyms. */
#welcome[data-view=language] .welcome-signature,
#welcome[data-view=language] .language-symbol{display:none}
#welcome[data-view=language] .welcome-panel{width:min(440px,39vw);max-width:none;margin:clamp(80px,12vh,140px) 7.5% 80px auto}
#welcome[data-view=language] #welcome-languages{display:flex;flex-direction:column;gap:12px;overflow:visible}
#welcome[data-view=language] .language-choice{flex:none;width:100%;font-size:28px;min-height:64px;padding:12px 20px;white-space:nowrap;background:#f8f9efe6}
#welcome[data-view=language] #choose-language-title{margin:0}
@media(max-width:750px){#welcome[data-view=language] .welcome-panel{width:auto;margin:60px 24px 60px;max-width:470px}#welcome[data-view=language] .language-choice{font-size:26px;min-height:60px}}

/* Full season names remain readable in every language. */
.world-toolbar{height:auto;flex-wrap:wrap}
.world-toolbar .seasons{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;flex:1 1 320px;max-width:720px}
.world-toolbar .seasons span{min-width:0;padding:6px 8px;font-size:14px;line-height:1.4;letter-spacing:0;text-align:center;white-space:normal;overflow-wrap:anywhere;hyphens:auto}
@media(max-width:1050px){.world-toolbar .seasons{order:3;flex-basis:100%;max-width:none}}
