@font-face{font-family:ChronicleSans;src:url('./assets/carlito-regular.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:ChronicleSans;src:url('./assets/carlito-bold.woff2') format('woff2');font-weight:600 900;font-display:swap}
@font-face{font-family:ChronicleSerif;src:url('./assets/gentium-regular.woff2') format('woff2');font-weight:400 700;font-display:swap}
:root{--font-body:'ChronicleSans',system-ui,sans-serif;--font-display:'ChronicleSerif',Georgia,serif;--text-xs:clamp(.75rem,.72rem + .12vw,.82rem);--text-sm:clamp(.875rem,.83rem + .12vw,.95rem);--text-base:clamp(1rem,.96rem + .12vw,1.06rem);--text-lg:clamp(1.125rem,1.02rem + .4vw,1.35rem);--text-xl:clamp(1.55rem,1.3rem + .5vw,1.95rem);--text-hero:clamp(4rem,5vw + 1rem,6.6rem);--paper:#f5efd9;--panel:#f8f3e3;--surface:#ede6ce;--ink:#244b40;--muted:#617261;--teal:#256d5c;--gold:#e2bf70;--border:#335f3d30;--warning:#934f32;--focus:#a97419;--shadow:0 8px 32px #2a4f3926;--radius-sm:4px;--radius-md:8px;--radius-lg:14px;--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:20px;--space-6:24px;--space-8:32px;--space-10:40px}
[data-theme=dark]{--paper:#263f38;--panel:#29483f;--surface:#345348;--ink:#f1e6c7;--muted:#c1ceb7;--teal:#b2d1b9;--gold:#d1b476;--border:#ddd0a52b;--warning:#edb18c;--focus:#eed69c}
body{overflow:hidden}
button{font-size:var(--text-sm)}
.button{display:flex;align-items:center;justify-content:center;gap:var(--space-2);min-height:44px;padding:var(--space-2) var(--space-4);border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);font-weight:700;text-align:center}
.button:hover:not(:disabled){background:var(--paper);border-color:var(--teal)}
.button.primary{color:#fff3d4;background:#285f4f;border-color:#285f4f;box-shadow:0 3px 0 #183e34}
.button.primary:hover:not(:disabled){background:#34735e}
.button:disabled{opacity:.47;box-shadow:none}
.button.wide{width:100%}
.text-button{color:var(--teal);font-size:var(--text-sm);text-decoration:underline;text-underline-offset:3px;min-height:44px;text-align:left}
.small-button{min-height:44px;padding:var(--space-2);font-size:var(--text-xs);white-space:nowrap}
.small-button:hover{background:var(--surface)}
.eyebrow{font-size:var(--text-xs);font-weight:700;letter-spacing:.14em;color:var(--muted)}
.brand{display:flex;align-items:center;gap:var(--space-3);white-space:nowrap;line-height:1.2;font-size:var(--text-sm);letter-spacing:.055em;font-weight:700}
.brand svg{width:36px;height:36px;flex-shrink:0;color:var(--teal)}
.brand small{display:block;letter-spacing:0;font-weight:400;font-size:var(--text-xs);margin-top:var(--space-1);color:var(--muted)}
.title-screen{height:100dvh;position:relative;display:grid;grid-template-columns:minmax(0,1fr) 422px;align-items:center;gap:var(--space-10);padding:clamp(24px,4.5vw,72px);overflow-y:auto;color:#f7ebc8;background:#265b50}
.title-map,.title-shade{position:absolute;inset:0;width:100%;height:100%}
.title-map{pointer-events:none;display:block}
.title-shade{background:linear-gradient(90deg,#123e36df 0%,#1b4a3670 45%,#1a463628 70%,#214a4c32),linear-gradient(0deg,#153e37b3,transparent 50%)}
.title-copy,.setup-panel{position:relative;z-index:1}
.brand-title{letter-spacing:.16em;font-size:var(--text-xs);white-space:normal;max-width:330px;margin-bottom:var(--space-8)}
.brand-title svg{color:#f2d89c;width:42px;height:42px}
.title-copy h1{font-family:var(--font-display);font-size:var(--text-hero);font-weight:400;letter-spacing:-.045em;line-height:.84;text-shadow:0 2px 16px #193f3559}
.title-copy h1 em{font-style:normal;margin-left:var(--space-10)}
.title-line{font-family:var(--font-display);font-size:clamp(1.65rem,2vw,2.3rem);line-height:1.12;margin-top:var(--space-8)}
.title-intro{font-size:var(--text-base);max-width:34ch;margin-top:var(--space-4);color:#f5ebcd}
.title-caption{font-size:var(--text-xs);letter-spacing:.045em;margin-top:var(--space-8);color:#d8e5ca}
.setup-panel{padding:var(--space-6);border-radius:var(--radius-md);background:#faf3dedf;color:#294e40;box-shadow:0 16px 60px #173f3640;backdrop-filter:blur(12px);border:1px solid #fffae282}
.setup-panel h2{font-family:var(--font-display);font-weight:400;font-size:var(--text-xl);margin:var(--space-1) 0 var(--space-4)}
.region-choices{display:grid;gap:var(--space-2)}
.region-choice{display:grid;grid-template-columns:48px 1fr 14px;gap:var(--space-3);align-items:center;text-align:left;padding:var(--space-2);border:1px solid #426d5130;border-radius:var(--radius-sm);background:#f7efd785;min-height:62px}
.region-choice[aria-pressed=true]{background:#dce6c9;border-color:#367456;box-shadow:inset 0 0 0 1px #367456}
.region-choice strong{display:block;font-size:var(--text-base)}
.region-choice small{font-size:var(--text-xs);display:block;color:#62725a}
.region-choice:hover{background:#e6eace}
.region-mark{height:41px;width:46px;position:relative;overflow:hidden;border-radius:50%;border:1px solid #386c5052;background:#bac77d}
.region-mark.delta{background:linear-gradient(110deg,#b0bf79 35%,#70aa89 36%,#2e8c82 55%,#ddc37a 56%)}
.region-mark.upland{background:conic-gradient(from 210deg at 53% 20%,#d6ba79,#7e9471,#b5b483,#ddbc7f,#d6ba79)}
.region-mark.coast{background:radial-gradient(ellipse at 74% 36%,#c5c184 0 20%,transparent 21%),radial-gradient(ellipse at 10% 87%,#c4bb78 0 38%,transparent 39%),#468e8e}
.region-check{width:12px;height:12px;border:1px solid #6c8161;border-radius:50%}
[aria-pressed=true]>.region-check{background:#3e7155;box-shadow:inset 0 0 0 3px #dde7ca}
.goal-heading{display:flex;align-items:center;justify-content:space-between;margin:var(--space-5) 0 var(--space-2);gap:var(--space-2)}
.goal-heading h3{font-size:var(--text-base)}
.goal-heading span{font-size:var(--text-xs);color:#637159}
.goal-choices{display:flex;gap:var(--space-1)}
.goal-choice{flex:1;min-height:44px;border:1px solid #416e4a35;border-radius:var(--radius-sm)}
.goal-choice[aria-pressed=true]{color:#fff3d4;background:#326c54;border-color:#326c54}
.goal-description{font-size:var(--text-sm);line-height:1.35;margin-top:var(--space-2);min-height:55px;color:#49624d}
.seed-row{display:flex;align-items:center;gap:var(--space-2);font-size:var(--text-xs);margin:var(--space-3) 0}
.seed-row input{width:86px;padding:var(--space-2);border:1px solid #436a493d;border-radius:var(--radius-sm);background:#fbf5df;font-size:var(--text-sm)}
.seed-row span{color:#68775f}
.start-button{width:100%;justify-content:space-between;font-size:var(--text-base)}
.setup-note{font-size:var(--text-xs);line-height:1.35;margin-top:var(--space-3);color:#5b6c51}
.setup-panel .text-button{font-size:var(--text-xs);color:#3b6753}
.game-screen{height:100dvh;display:grid;grid-template-rows:68px 48px minmax(0,1fr) 76px}
.game-header{display:flex;align-items:center;justify-content:space-between;padding:0 var(--space-5);gap:var(--space-6);border-bottom:1px solid var(--border);z-index:4;background:var(--panel)}
.resources{display:flex;gap:clamp(20px,3.3vw,50px);align-items:center}
.resource{display:grid;grid-template-columns:auto auto;align-items:baseline;gap:0 var(--space-2);font-variant-numeric:tabular-nums}
.resource .resource-label{font-size:var(--text-xs);color:var(--muted);grid-column:1/-1}
.resource strong{font-size:var(--text-lg);font-weight:700;line-height:1.2}
.resource small{font-size:var(--text-xs);color:var(--teal)}
.resource small.negative{color:var(--warning)}
.header-tools{display:flex;gap:var(--space-1)}
.chapter-bar{display:flex;align-items:center;gap:var(--space-6);padding:0 var(--space-5);background:var(--paper);border-bottom:1px solid var(--border);z-index:3}
.chapter-date{display:flex;align-items:center;gap:var(--space-3);white-space:nowrap}
.chapter-date strong{font-family:var(--font-display);font-size:var(--text-xl);font-weight:400;line-height:1}
.chapter-date span{font-size:var(--text-xs);letter-spacing:.065em;color:var(--muted)}
.ambition{font-size:var(--text-sm);display:flex;align-items:center;gap:var(--space-3);margin-left:auto;min-height:44px}
.ambition span{display:block;width:80px;height:4px;background:var(--border);border-radius:2px}
.ambition i{display:block;height:100%;background:var(--teal)}
.model-link{font-size:var(--text-xs);text-decoration:underline;text-underline-offset:3px;color:var(--muted);min-height:44px}
.world-stage{display:grid;grid-template-columns:minmax(0,1fr) 308px;min-height:0;position:relative}
.map-area{position:relative;min-height:0;overflow:hidden;background:#a9c2ae}
#map-canvas{width:100%;height:100%;touch-action:none;cursor:grab;display:block}
#map-canvas:active{cursor:grabbing}
.map-heading{pointer-events:none;position:absolute;top:var(--space-4);left:var(--space-5);color:#285847;text-shadow:0 1px 2px #e7e9cc}
.map-heading span{display:block;font-family:var(--font-display);font-size:var(--text-xl)}
.map-heading small{font-size:var(--text-xs);display:block;letter-spacing:.03em}
.map-hint{position:absolute;bottom:var(--space-10);left:50%;transform:translateX(-50%);max-width:calc(100% - 120px);border:1px solid #f8efd798;background:#fbf0d6ed;box-shadow:0 3px 15px #3e63431f;color:#315b49;border-radius:var(--radius-sm);padding:var(--space-2) var(--space-3);font-size:var(--text-sm);pointer-events:none;text-align:center}
.map-hint:empty{display:none}
.map-tools{position:absolute;top:var(--space-4);right:var(--space-4);display:flex;flex-direction:column;gap:var(--space-1);padding-top:var(--space-10)}
.map-tools button{min-width:44px;min-height:44px;background:#f6edd9ec;color:#315e4e;border:1px solid #faffd666;border-radius:var(--radius-sm);box-shadow:0 2px 8px #466e4020;font-size:var(--text-xs);font-weight:700;padding:var(--space-1)}
.map-tools button:first-child,.map-tools button:nth-child(2){font-size:var(--text-lg)}
.map-tools button:hover{background:#fff6d9}
.tile-list-panel{position:absolute;right:var(--space-4);top:var(--space-4);width:min(280px,calc(100% - 32px));z-index:5;background:var(--panel);padding:var(--space-4);border-radius:var(--radius-md);box-shadow:var(--shadow)}
.tile-list-panel select{margin:var(--space-2) 0;width:100%;font-size:var(--text-base);padding:var(--space-2);background:var(--paper);border:1px solid var(--border)}
.inspector{background:var(--panel);border-left:1px solid var(--border);overflow-y:auto;padding:var(--space-5);scrollbar-width:thin;scrollbar-color:#7a9675 transparent;position:relative}
.sheet-toggle{display:none}
.inspector h2{font-family:var(--font-display);font-weight:400;font-size:var(--text-xl);margin:var(--space-1) 0 var(--space-3)}
.inspector h3{font-size:var(--text-base);margin:var(--space-4) 0 var(--space-2)}
.inspector p{font-size:var(--text-sm);line-height:1.4}
.inspector p+p{margin-top:var(--space-2)}
.inspector .lead{font-size:var(--text-base);color:var(--muted)}
.panel-topline{display:flex;justify-content:space-between;align-items:center;gap:var(--space-2)}
.panel-back{font-size:var(--text-sm);color:var(--teal);min-height:36px}
.panel-note{font-size:var(--text-xs)!important;color:var(--muted);margin:var(--space-2) 0}
.context-cost{font-size:var(--text-sm);color:var(--teal);font-weight:700;margin:var(--space-3) 0}
.terrain-tag{display:inline-block;font-size:var(--text-xs);padding:var(--space-1) var(--space-2);background:var(--surface);border-radius:var(--radius-sm)}
.yield-row{display:flex;flex-wrap:wrap;gap:var(--space-1) var(--space-3);padding:var(--space-3) 0;color:var(--teal);font-size:var(--text-sm);font-weight:700}
.inspector .button{margin-top:var(--space-2)}
.feedback{padding:var(--space-3);background:var(--surface);margin-bottom:var(--space-4);font-size:var(--text-sm);border-radius:var(--radius-sm);animation:feedback-in .3s ease both}
.feedback strong{display:block;font-size:var(--text-xs);letter-spacing:.07em;margin-bottom:var(--space-1)}
.error{color:var(--warning);font-size:var(--text-sm);margin:var(--space-2) 0}
.vignette{font-family:var(--font-display);font-size:var(--text-lg)!important;line-height:1.28!important;padding:var(--space-4) 0;border-top:1px solid var(--border);margin-top:var(--space-5)!important}
.construction-preview{display:flex;align-items:center;gap:var(--space-3);margin:var(--space-3) 0;background:var(--surface);padding:var(--space-3);border-radius:var(--radius-sm)}
.building-mini{width:72px;height:72px;flex-shrink:0}
.construction-preview strong{font-size:var(--text-base)}
.construction-preview small{display:block;font-size:var(--text-xs);color:var(--muted)}
.build-list{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-2);margin-top:var(--space-4)}
.build-choice{padding:var(--space-2);text-align:left;border:1px solid var(--border);border-radius:var(--radius-sm);min-height:126px;background:var(--paper);position:relative}
.build-choice:hover{border-color:var(--teal);background:var(--surface)}
.build-choice canvas{width:62px;height:50px;margin-bottom:var(--space-1)}
.build-choice strong{display:block;font-size:var(--text-sm);line-height:1.1}
.build-choice small{display:block;font-size:var(--text-xs);color:var(--muted);margin-top:var(--space-1)}
.build-choice.locked{opacity:.62}
.tech-branch{font-size:var(--text-xs);font-weight:700;letter-spacing:.13em;color:var(--muted);padding-top:var(--space-5);margin-bottom:var(--space-2)}
.tech-item{padding:var(--space-3) 0;border-bottom:1px solid var(--border)}
.tech-item strong{font-size:var(--text-base)}
.tech-item .tech-title{display:flex;align-items:baseline;justify-content:space-between;gap:var(--space-2)}
.tech-item .tech-title span{font-size:var(--text-xs);white-space:nowrap}
.tech-item p{color:var(--muted);margin-top:var(--space-1)}
.tech-item.adopted{background:var(--surface);padding:var(--space-3);border-radius:var(--radius-sm);margin:var(--space-2) 0}
.prereq{font-size:var(--text-xs)!important;color:var(--warning)!important}
.neighbor{padding:var(--space-4) 0;border-bottom:1px solid var(--border)}
.neighbor-title{display:flex;align-items:center;gap:var(--space-2)}
.neighbor-title canvas{width:62px;height:52px;flex-shrink:0}
.neighbor h3{margin:0}
.neighbor .quote{font-family:var(--font-display);font-size:var(--text-lg);color:var(--muted);margin:var(--space-2) 0}
.offer{font-size:var(--text-sm);background:var(--surface);padding:var(--space-3);border-radius:var(--radius-sm);margin:var(--space-3) 0}
.offer .exchange-arrow{color:var(--muted);display:block;font-size:var(--text-xs);margin:var(--space-1) 0}
.trust{font-size:var(--text-xs);letter-spacing:.03em;margin:var(--space-2) 0;color:var(--teal)}
.goal-section{padding:var(--space-4) 0;border-bottom:1px solid var(--border)}
.goal-section h3{margin:0 0 var(--space-2)}
.goal-section.selected{padding:var(--space-3);background:var(--surface);border-radius:var(--radius-sm)}
.goal-row{display:flex;justify-content:space-between;gap:var(--space-3);font-size:var(--text-sm);margin-top:var(--space-2);align-items:center}
.goal-row span{max-width:75%}
.goal-row b{font-size:var(--text-xs);white-space:nowrap}
.goal-meter{height:4px;background:var(--border);margin-top:var(--space-1)}
.goal-meter i{display:block;height:100%;background:var(--teal)}
.notebook-tabs{display:flex;border-bottom:1px solid var(--border);margin-bottom:var(--space-4)}
.notebook-tabs button{flex:1;min-height:44px;border-bottom:2px solid transparent}
.notebook-tabs button.active{border-bottom-color:var(--teal);font-weight:700}
.notebook-illustration{width:100%;height:112px;object-fit:cover;border-radius:var(--radius-sm);margin-bottom:var(--space-4)}
.notebook-entry{margin-bottom:var(--space-5)}
.notebook-entry h3{margin-top:0}
.notebook-entry p{font-size:var(--text-base)}
.notebook-entry .citation{font-size:var(--text-sm);margin-top:var(--space-2)}
.notebook-entry a{display:inline-block;min-height:30px}
.chronicle-entry{margin:var(--space-3) 0;padding:var(--space-3) 0;border-bottom:1px solid var(--border)}
.chronicle-entry small{font-size:var(--text-xs);color:var(--muted)}
.chronicle-entry h3{margin:var(--space-1) 0 var(--space-2)}
.menu-group{margin-top:var(--space-5)}
.menu-group .button{justify-content:space-between}
.forecast-table{width:100%;border-collapse:collapse;margin:var(--space-3) 0;font-size:var(--text-sm)}
.forecast-table td{padding:var(--space-2) 0;border-bottom:1px solid var(--border)}
.forecast-table td:last-child{text-align:right;font-weight:700}
label{font-size:var(--text-sm);display:block}
textarea{width:100%;resize:vertical;min-height:72px;padding:var(--space-2);font-family:var(--font-body);font-size:var(--text-sm);background:var(--paper);border:1px solid var(--border);border-radius:var(--radius-sm);margin-top:var(--space-2);overflow-wrap:anywhere}
.event-banner{font-size:var(--text-xs);letter-spacing:.1em;font-weight:700;color:var(--warning)}
.event-choice{padding:var(--space-4) 0;border-bottom:1px solid var(--border)}
.event-choice .button{width:100%;text-align:left;justify-content:flex-start}
.event-choice small{font-size:var(--text-xs);color:var(--muted);display:block;margin-top:var(--space-2)}
.ending-title{font-family:var(--font-display);font-size:var(--text-xl)}
.ending-stats{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-3);padding:var(--space-4) 0}
.ending-stats strong{font-size:var(--text-xl);font-family:var(--font-display);font-weight:400;display:block}
.ending-stats span{font-size:var(--text-xs);color:var(--muted)}
.game-footer{display:flex;align-items:center;justify-content:space-between;gap:var(--space-4);padding:var(--space-2) var(--space-5);border-top:1px solid var(--border);background:var(--panel);z-index:4}
.game-nav{display:flex;gap:var(--space-1);height:100%;align-items:center}
.game-nav button{min-height:48px;min-width:64px;padding:var(--space-2) var(--space-3);border-radius:var(--radius-sm);color:var(--muted);border:1px solid transparent}
.game-nav button:hover{background:var(--surface)}
.game-nav button.active{background:var(--surface);color:var(--ink);border-color:var(--border);font-weight:700}
.turn-controls{display:flex;align-items:center;gap:var(--space-6)}
.action-count{font-size:var(--text-xs);color:var(--muted);line-height:1.2;white-space:nowrap}
.action-count .action-dots{display:flex;gap:var(--space-1);margin-bottom:var(--space-1)}
.action-dot{display:block;width:9px;height:9px;border:1px solid var(--teal);border-radius:50%}
.action-dot.used{opacity:.28}
.action-dot.ready{background:var(--teal)}
#next-turn{min-width:190px;height:46px;justify-content:space-between}
.no-script{position:fixed;inset:0;background:var(--panel);padding:var(--space-10);z-index:99}
@keyframes feedback-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:1600px){.world-stage{grid-template-columns:minmax(0,1fr) 340px}.inspector{padding:var(--space-6)}}
@media(max-width:1000px) and (min-width:761px){.brand>span{max-width:145px;white-space:normal}.game-header{gap:var(--space-3);padding:0 var(--space-3)}.resources{gap:var(--space-4)}.world-stage{grid-template-columns:minmax(0,1fr) 285px}.header-tools{display:none}.game-nav button{min-width:50px;padding:var(--space-2)}.turn-controls{gap:var(--space-3)}.title-screen{gap:var(--space-6);padding:var(--space-6);grid-template-columns:minmax(0,1fr) 380px}.title-copy h1{font-size:4.5rem}.title-copy h1 em{margin-left:0}.ambition span{display:none}}
@media(max-width:760px){
  .title-screen{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:var(--space-6);padding:var(--space-6) var(--space-4);height:100dvh}
  .title-map{position:fixed;height:100dvh}
  .title-shade{position:fixed;background:linear-gradient(0deg,#204f47 37%,#173f3699 75%,#21473950);height:100dvh}
  .title-copy{padding:0 var(--space-2)}
  .brand-title{margin-bottom:var(--space-5);font-size:var(--text-xs);max-width:310px}
  .brand-title svg{width:32px;height:32px}
  .title-copy h1{font-size:clamp(3.8rem,14vw,5rem);line-height:.85}
  .title-copy h1 br{display:none}
  .title-copy h1 em{margin-left:var(--space-3)}
  .title-line{font-size:var(--text-xl);margin-top:var(--space-4)}
  .title-line br{display:none}
  .title-intro{display:none}
  .title-caption{margin-top:var(--space-3)}
  .setup-panel{padding:var(--space-4);background:#faf2def5;backdrop-filter:none}
  .setup-panel h2{font-size:var(--text-xl);margin-bottom:var(--space-3)}
  .region-choice{min-height:55px;grid-template-columns:40px 1fr 14px;padding:var(--space-1) var(--space-2)}
  .region-mark{width:37px;height:37px}
  .goal-heading{margin-top:var(--space-4)}
  .goal-heading span{display:none}
  .goal-description{min-height:unset;font-size:var(--text-sm)}
  .seed-row{margin:var(--space-2) 0}
  .setup-note{margin-top:var(--space-2)}
  .game-screen{grid-template-rows:100px 49px minmax(0,1fr) 112px}
  .game-header{display:grid;grid-template-columns:1fr auto;grid-template-rows:44px 54px;padding:0 var(--space-3);gap:0}
  .game-header .brand{font-size:var(--text-xs);gap:var(--space-2)}
  .game-header .brand svg{width:25px;height:29px}
  .game-header .brand small{display:none}
  .resources{grid-row:2;grid-column:1/-1;justify-content:space-between;gap:var(--space-2);border-top:1px solid var(--border);padding:var(--space-2) 0}
  .resource{gap:0 var(--space-1)}
  .resource strong{font-size:var(--text-lg)}
  .resource small{font-size:var(--text-xs)}
  .header-tools{grid-row:1;grid-column:2}
  .header-tools button{min-height:44px;padding:var(--space-1) var(--space-2)}
  #theme-button{display:none}
  .chapter-bar{padding:0 var(--space-3);gap:var(--space-2)}
  .chapter-date{gap:var(--space-2)}
  .chapter-date strong{font-size:var(--text-lg);font-family:var(--font-body);font-weight:700}
  .chapter-date span{font-size:var(--text-xs);letter-spacing:0}
  .ambition{font-size:var(--text-xs);line-height:1.1;max-width:150px;text-align:right;justify-content:flex-end}
  .ambition span{display:none}
  .model-link{display:none}
  .world-stage{display:grid;grid-template-columns:1fr;grid-template-rows:minmax(180px,1fr) 184px;min-height:0}
  .world-stage.expanded{grid-template-rows:minmax(180px,1fr) minmax(210px,38dvh)}
  .world-stage.map-expanded{grid-template-rows:minmax(180px,1fr) 90px}
  .inspector{border-left:0;border-top:1px solid var(--border);padding:var(--space-3) var(--space-4);box-shadow:0 -5px 20px #315b4317}
  .sheet-toggle{display:block;position:sticky;top:0;float:right;background:var(--panel);color:var(--teal);font-size:var(--text-xs);min-height:44px;padding:var(--space-1) var(--space-2);margin-top:-8px;margin-right:-8px;z-index:3;border:1px solid var(--border);border-radius:var(--radius-sm)}
  .panel-back{min-height:44px}
  .inspector h2{font-size:var(--text-lg);font-family:var(--font-body);font-weight:700;margin:var(--space-1) 0 var(--space-2)}
  .panel-topline .eyebrow{font-size:var(--text-xs)}
  .feedback{padding:var(--space-2);margin-bottom:var(--space-2)}
  .feedback strong{display:none}
  .map-heading{top:var(--space-3);left:var(--space-3)}
  .map-heading span{font-size:var(--text-lg);font-family:var(--font-body);font-weight:700}
  .map-heading small{font-size:var(--text-xs)}
  .map-tools{top:var(--space-3);right:var(--space-2);padding-top:var(--space-10);gap:var(--space-1)}
  .map-tools button{min-height:44px;min-width:44px}
  .map-hint{max-width:calc(100% - 76px);bottom:var(--space-8);font-size:var(--text-xs);padding:var(--space-2);width:max-content}
  .game-footer{display:grid;grid-template-rows:48px 52px;gap:0;padding:0 var(--space-2) var(--space-2)}
  .game-nav{display:flex;justify-content:space-between;border-bottom:1px solid var(--border)}
  .game-nav button{padding:var(--space-1);min-width:0;flex:1;font-size:var(--text-xs);height:44px;min-height:44px;border-radius:0}
  .game-nav button.active{border-color:transparent;border-bottom-color:var(--teal);background:var(--surface)}
  .turn-controls{justify-content:space-between;gap:var(--space-4);padding:var(--space-2) var(--space-2) 0}
  #next-turn{min-width:196px;max-width:240px;width:auto;height:44px;min-height:44px;font-size:var(--text-sm)}
  .action-count{font-size:var(--text-xs);min-width:96px}
  .build-list{grid-template-columns:repeat(3,1fr);gap:var(--space-2);margin-top:var(--space-3)}
  .build-choice{min-height:118px;padding:var(--space-2)}
  .build-choice canvas{height:43px}
  .construction-preview{margin:var(--space-2) 0;padding:var(--space-2)}
  .construction-preview .building-mini{width:54px;height:54px}
  .vignette{font-size:var(--text-base)!important;margin-top:var(--space-3)!important;padding:var(--space-3) 0}
  .notebook-illustration{height:84px}
  .tile-list-panel{max-height:calc(100% - 24px);overflow-y:auto;top:var(--space-3)}
  .mobile-row{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3)}
}
@media(max-height:650px) and (min-width:761px){.title-screen{align-items:start;padding:var(--space-5) var(--space-10)}.title-copy{padding-top:var(--space-8)}.setup-panel{padding:var(--space-4)}.region-choice{min-height:52px}.region-mark{height:36px}.goal-heading{margin-top:var(--space-3)}.game-screen{grid-template-rows:60px 44px minmax(0,1fr) 68px}}

/* Release-preparation additions: truthful title, sourced record cards */
.wip-badge{display:inline-block;white-space:nowrap;margin-left:var(--space-3);padding:2px 8px;border-radius:999px;border:1px solid #f7ebc8aa;font-size:var(--text-xs);letter-spacing:.08em;font-weight:700;color:#fff6d8;background:#123e3666}
.title-credit{font-size:var(--text-sm);line-height:1.45;margin-top:var(--space-4);max-width:520px;color:#e6ecd6}
.title-credit a{color:#fff3c4;text-decoration:underline;text-underline-offset:2px}
#title-continue .button{display:block;text-align:left;margin-bottom:var(--space-2)}
#title-continue .button span{display:block;font-size:var(--text-xs);font-weight:500;opacity:.85;margin-top:2px}
#title-continue .setup-note{margin:0 0 var(--space-3)}
.record{padding:var(--space-4);margin-bottom:var(--space-4);border-radius:var(--radius-sm);background:#fbf3df;color:#2c4a3f;border-left:4px solid #b98a3a;animation:feedback-in .35s ease both}
[data-theme="dark"] .record{background:#2b3c34;color:#f1e9d2;border-left-color:#e2b866}
.record .eyebrow{color:#8a6a2c;margin-bottom:var(--space-1)}
[data-theme="dark"] .record .eyebrow{color:#e2b866}
.record h3{font-family:var(--font-display);font-weight:400;font-size:var(--text-lg);margin:0 0 var(--space-2);line-height:1.15}
.record p{font-size:var(--text-sm);line-height:1.45;margin:0 0 var(--space-2)}
.record .record-fact{font-style:normal}
.record .record-question{font-weight:700}
.record-actions{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-4);align-items:center;margin-top:var(--space-2)}
.record-source{font-size:var(--text-xs);font-weight:700;letter-spacing:.03em;color:#6a4f18;text-decoration:underline;text-underline-offset:2px}
[data-theme="dark"] .record-source{color:#f2d391}
@media(max-width:760px){.record{padding:var(--space-3);margin-bottom:var(--space-2)}.record h3{font-size:var(--text-base)}.title-credit{font-size:var(--text-xs);margin-top:var(--space-3)}.wip-badge{margin-left:var(--space-2)}}
