:root{font-family:Inter,"Trebuchet MS",Arial,sans-serif;color:#17373c;background:#edf1e9;font-synthesis:none;--ink:#17373c;--muted:#798b84;--accent:#f1a97e;--panel:#fffdf7;--line:#e5eae0;--sea:#70b8c1}*{box-sizing:border-box}html,body{margin:0;min-height:100%;overflow-x:hidden}button{font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}button:focus-visible,canvas:focus-visible{outline:3px solid #f3aa70;outline-offset:2px}.app-shell{max-width:1580px;margin:0 auto;padding:0 28px}.topbar{height:88px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #d9e2d9}.brand{display:flex;align-items:center;gap:12px;min-width:200px}.brand-mark{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:#173c42;color:#ffbc8d;font-size:27px}.brand-stack{display:flex;flex-direction:column;letter-spacing:3.2px;line-height:1.05}.brand-stack strong{font-size:25px;font-weight:900}.brand-stack small{font-size:9px;color:#8b9b90;font-weight:800;letter-spacing:2.5px;margin-top:5px}.topbar-center{display:flex;gap:13px;align-items:center;color:#687f77;font-size:13px;font-weight:600}.topbar-center strong{color:#17373c}.separator{color:#c4d2c9}.live-dot{width:8px;height:8px;background:#77b995;border-radius:50%;box-shadow:0 0 0 4px #d8eadd}.season-chip{border-radius:999px;background:#dcebe3;padding:7px 11px;color:#47705d}.header-actions{display:flex;gap:7px;align-items:center}.control-btn{padding:11px 15px;border-radius:10px;border:1px solid #d9e3da;background:#f9fbf7;color:#305258;font-size:13px;font-weight:800;min-height:42px}.control-btn:hover{border-color:#aabeb5;background:#fff}.control-primary{background:#163b40;border-color:#163b40;color:#fff;padding-inline:18px}.control-primary:hover{background:#26565b;color:white}.main-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:24px;padding-top:28px;align-items:start}.world-panel{min-width:0}.world-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:6px 4px 20px}.eyebrow{font-size:10px;letter-spacing:2.1px;font-weight:900;color:#9a9d82}.world-heading h1{font-family:Georgia,"Times New Roman",serif;font-size:clamp(29px,2.6vw,44px);font-weight:600;letter-spacing:-1.7px;margin:7px 0 7px}.h1-dot{color:#e4a16e}.world-heading p{color:#87968a;font-size:13px;margin:0}.world-weather{display:flex;align-items:center;gap:10px;padding:9px 12px;background:#fffdf7;border:1px solid #e4e8dc;border-radius:14px;white-space:nowrap}.world-weather>span:first-child{font-size:31px;color:#eba764}.world-weather>span:last-child{display:flex;flex-direction:column;gap:3px}.world-weather strong{font-size:12px}.world-weather small{font-size:10px;color:#8fa299}.canvas-shell{position:relative;isolation:isolate;background:linear-gradient(#a6d7d5,#d8e9ce);border-radius:23px;overflow:hidden;border:7px solid #fffdf8;box-shadow:0 12px 36px #33594d18;aspect-ratio:1056/594}.canvas-shell canvas{width:100%;height:100%;display:block;cursor:crosshair;touch-action:manipulation}.map-corner{position:absolute;z-index:2;color:#2c6264;font-size:11px;font-weight:800;pointer-events:none}.top-left{top:15px;left:17px;display:flex;gap:8px;align-items:center;padding:9px 12px;background:#f9fff8cc;backdrop-filter:blur(5px);border:1px solid #ffffffa4;border-radius:20px}.map-pulse{height:7px;width:7px;border-radius:50%;background:#6cb998;box-shadow:0 0 0 3px #70b9982c}.bottom-left{bottom:17px;left:17px;max-width:65%;padding:10px 13px;border-radius:9px;background:#16383bc9;color:#fff;font-weight:600;backdrop-filter:blur(5px)}.bottom-right{right:15px;bottom:14px;pointer-events:auto}.bottom-right button{padding:9px 12px;background:#f9fff8db;border:1px solid #fff;border-radius:8px;font-size:11px;font-weight:800;color:#366365}.world-bottom{display:flex;justify-content:space-between;align-items:center;padding:17px 7px 19px;font-size:11px;color:#7a9085;gap:10px}.legend-dot{width:8px;height:8px;border-radius:50%;display:inline-block;margin:0 5px 0 12px}.legend-dot:first-child{margin-left:0}.meadow{background:#9fc99b}.forest{background:#4f987d}.mountain{background:#9ba7aa}.tip{font-size:11px}.tip kbd{font-family:inherit;background:#f8faf5;border:1px solid #dce5db;padding:3px 6px;border-radius:5px}.sidebar{display:flex;flex-direction:column;gap:16px}.tribe-card{background:#183a3e;color:white;border-radius:18px;padding:19px 19px 17px;box-shadow:0 9px 23px #16352f1d}.tribe-title{display:flex;align-items:center;gap:10px}.tribe-title .crest{width:36px;height:36px;border:1px solid #4e7674;border-radius:12px;display:grid;place-items:center;font-size:24px;color:#ffd19f}.tribe-title>div:nth-child(2){flex:1}.tribe-title .eyebrow{color:#8bacab}.tribe-title h2{font-size:18px;margin:4px 0 0;letter-spacing:-.5px}.mood-face{font-size:23px;color:#ffc79e}.tribe-numbers{display:grid;grid-template-columns:repeat(3,1fr);gap:3px;margin:18px 0 17px}.tribe-numbers div{border-right:1px solid #406063;padding-left:12px;display:flex;flex-direction:column;gap:3px}.tribe-numbers div:first-child{padding-left:0}.tribe-numbers div:last-child{border-right:0}.tribe-numbers strong{font-size:26px;line-height:1.1;font-weight:750}.tribe-numbers span{font-size:11px;color:#a6c0bd}.wellbeing>div:first-child{display:flex;justify-content:space-between;font-size:11px;color:#adc7c1;margin-bottom:8px}.wellbeing>div:first-child span:last-child{color:#f8d4aa}.wellbeing-track{height:7px;border-radius:8px;background:#456568;overflow:hidden}.wellbeing-track>div{height:100%;width:74%;background:linear-gradient(90deg,#74bc9c,#f8d29c);border-radius:8px;transition:width .3s}.resource-panel,.tools-panel,.quest-panel,.achievements-panel,.chronicle{background:#fffdf8;border:1px solid var(--line);border-radius:16px;padding:17px 18px}.section-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.section-heading h2{font-family:Georgia,serif;font-weight:600;font-size:23px;margin:4px 0 0}.section-heading.compact{margin-bottom:14px}.section-heading.compact h2{font-family:inherit;font-weight:850;font-size:15px;letter-spacing:-.3px;margin:0}.subtle{color:#a5afa4;font-size:10px}.resource-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.resource{background:#f3f6ee;border:1px solid #edf0e7;border-radius:11px;min-width:0;padding:10px 9px;display:flex;align-items:center;gap:8px}.resource .resource-icon{font-size:21px;width:25px;text-align:center;color:#648c7c}.resource>div{display:flex;flex-direction:column;gap:3px;min-width:0}.resource strong{font-size:17px;font-weight:850;line-height:1}.resource small{font-size:10px;color:#8f9f91}.tool-tabs{display:grid;grid-template-columns:repeat(3,1fr);padding:4px;border-radius:11px;background:#f0f4eb;gap:3px;margin-bottom:11px}.tool-tabs button{border:0;background:transparent;padding:10px 0;border-radius:8px;color:#879b91;font-size:11px;font-weight:800}.tool-tabs button.active{background:white;color:#1d4549;box-shadow:0 2px 8px #1d453b10}.tool-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:290px;overflow:auto}.tool{display:flex;align-items:center;text-align:left;gap:8px;padding:10px 9px;border-radius:10px;background:white;border:1px solid #e5ece1;min-width:0;color:#214b4c}.tool:hover{border-color:#8bad9c}.tool.selected{border:1.5px solid #4a9e86;background:#eaf6ed;box-shadow:inset 0 0 0 1px #95b9a5}.tool.locked{opacity:.46}.tool-symbol{display:grid;place-items:center;flex:0 0 30px;height:30px;border-radius:9px;background:#f3f2e8;color:#448474;font-size:23px}.tool div{min-width:0}.tool strong{display:block;font-size:11px;white-space:nowrap}.tool small{display:block;color:#90a299;font-size:10px;margin-top:4px}.selection-hint{font-size:11px;color:#89a092;margin-top:11px;min-height:15px}.quest-panel{background:#fff4e7;border-color:#f1e1d1}.quest-top{display:flex;align-items:center;gap:8px}.quest-icon{font-size:23px;color:#d58b67}.quest-panel .eyebrow{color:#c29a7b;font-size:9px;letter-spacing:1.4px}.quest-panel h2{font-family:Georgia,serif;font-size:21px;font-weight:600;margin:10px 0 7px}.quest-panel p{color:#977e6b;font-size:12px;line-height:1.55;margin:0 0 13px}.quest-progress>span{display:block;text-align:right;font-size:10px;color:#bc967d;font-weight:800;margin-bottom:6px}.quest-progress>div{background:#eadccc;border-radius:5px;height:6px;overflow:hidden}.quest-progress i{height:100%;background:#daac80;display:block;width:0;transition:width .25s}.quest-reward{display:block;font-size:11px;color:#b78765;margin-top:10px}#quest-claim{background:#bb795b;border:0;border-radius:8px;color:white;font-size:12px;font-weight:800;padding:10px 14px;margin-top:10px;width:100%}.achievement-list{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.achievement{border-radius:9px;background:#f3f5ec;padding:11px 4px;text-align:center;color:#a6b1a7;font-size:23px;filter:grayscale(1);opacity:.5}.achievement.unlocked{filter:none;opacity:1;background:#fcf0d9}.achievement small{display:block;color:#6f8a7e;font-size:9px;margin-top:4px}.chronicle{padding:18px 22px 14px;margin-top:10px}.chronicle .section-heading{margin-bottom:12px}.little-pill{border:1px solid #d9e8dc;background:#f0f5ed;color:#9db2a1;padding:7px 9px;border-radius:6px;font-size:9px;font-weight:900;letter-spacing:1px}.chronicle-entries{display:grid;gap:0;max-height:154px;overflow:auto}.entry{display:flex;gap:13px;padding:9px 0;border-top:1px solid #edf0e9;color:#6f8880;font-size:12px;line-height:1.4}.entry b{color:#c0a085;white-space:nowrap;font-size:10px;padding-top:1px;min-width:48px}.entry span{min-width:0}.footer{display:flex;justify-content:space-between;align-items:center;padding:25px 2px 35px;color:#9aa9a0;font-size:11px}.footer-dot{color:#d3a27c}.event-overlay{position:fixed;inset:0;display:grid;place-items:center;background:#142c31bc;z-index:10;padding:20px;backdrop-filter:blur(5px)}.event-overlay[hidden]{display:none}.event-dialog{background:#fffdf6;border-radius:24px;padding:33px;max-width:460px;width:100%;text-align:center;box-shadow:0 25px 85px #0b232380}.event-stars{font-size:30px;letter-spacing:11px;color:#dfa87f;margin-bottom:15px}.event-dialog .eyebrow{color:#b9a28e}.event-dialog h2{font:600 35px/1.15 Georgia,serif;margin:12px 0}.event-dialog p{color:#7d8b80;line-height:1.65;font-size:14px}.event-choices{display:grid;gap:9px;margin-top:24px}.event-choices button{border:1px solid #d9e6da;background:#f4f7ee;text-align:left;border-radius:12px;padding:14px 17px;color:#31534e}.event-choices button:first-child{background:#1b4649;color:#fff;border-color:#1b4649}.event-choices button strong{display:block;font-size:14px}.event-choices button small{display:block;margin-top:5px;opacity:.75;font-size:11px}.event-choices button:disabled{opacity:.4;cursor:not-allowed}.toast{position:fixed;z-index:20;left:50%;bottom:25px;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:#15383e;color:#fff;border-radius:12px;padding:13px 19px;font-size:13px;font-weight:750;box-shadow:0 10px 35px #132e2b40;transition:opacity .2s,transform .2s;max-width:85vw;text-align:center}.toast.show{opacity:1;transform:translate(-50%,0)}@media (max-width:1120px){.app-shell{padding:0 16px}.main-grid{grid-template-columns:minmax(0,1fr) 305px;gap:14px}.sidebar{gap:12px}.resource{padding:10px 6px;gap:4px}.resource .resource-icon{width:20px;font-size:18px}.resource strong{font-size:15px}.world-heading h1{font-size:32px}}@media (max-width:870px){.topbar{height:auto;min-height:75px;flex-wrap:wrap;padding:15px 0}.topbar-center{order:3;width:100%;justify-content:center;padding:6px 0}.main-grid{grid-template-columns:1fr;padding-top:16px}.sidebar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.tools-panel{grid-row:span 2}.world-heading{margin:5px 2px 16px}.world-weather{font-size:11px}.chronicle{margin-top:3px}.resource{gap:6px}.resource .resource-icon{width:23px}}@media (max-width:570px){.app-shell{padding:0 10px}.brand{min-width:0;gap:7px}.brand-mark{height:38px;width:38px}.brand-stack strong{font-size:22px}.header-actions{gap:4px}.control-btn{padding:9px 10px;min-height:37px;font-size:12px}.control-btn span{display:none}.control-primary span{display:inline}.topbar-center{font-size:12px}.world-heading{display:block}.world-heading h1{font-size:34px}.world-heading p{font-size:12px}.world-weather{display:none}.canvas-shell{border-width:4px;border-radius:15px;aspect-ratio:1.2}.canvas-shell canvas{object-fit:cover}.map-corner{font-size:9px}.top-left{top:8px;left:8px;padding:6px 7px}.bottom-left{bottom:8px;left:8px;max-width:73%;padding:7px;font-size:9px}.bottom-right{right:7px;bottom:7px}.bottom-right button{font-size:10px;padding:6px}.bottom-right button span{display:none}.world-bottom{flex-wrap:wrap;gap:6px;padding:12px 5px}.tip{font-size:10px}.sidebar{display:flex;gap:10px}.tools-panel{order:-1}.resource-grid{grid-template-columns:repeat(3,1fr)}.tool-list{max-height:none}.tribe-card{padding:16px}.chronicle{padding:16px}.footer{font-size:10px;gap:16px}.footer span:last-child{display:none}.event-dialog{padding:24px 18px}.event-dialog h2{font-size:29px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important}}
/* Prevent mobile long-press selection inside game portals. */
.canvas-shell, .tool-tabs, .tool-list{-webkit-user-select:none;user-select:none}


/* Village council: autonomous people, not static production multipliers. */
.council-panel,.discoveries-panel{background:#fffdf8;border:1px solid var(--line);border-radius:16px;padding:17px 18px}
.strategy-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.strategy-grid button{border:1px solid #e2e9df;border-radius:10px;background:#f7f8f2;padding:10px 8px;text-align:left;color:#536d64;font-size:11px;line-height:1.3;font-weight:750;min-height:42px}
.strategy-grid button span{font-size:16px;vertical-align:middle;margin-right:2px;color:#8aab8e}
.strategy-grid button:hover{border-color:#90b0a0}
.strategy-grid button.active{border-color:#4b9882;background:#e6f2e9;color:#1a5345;box-shadow:inset 0 0 0 1px #b4d6c1}
.strategy-grid button.active span{color:#2d876c}
.council-status{margin:11px 2px;color:#82978c;font-size:11px;line-height:1.4}
.council-separator{height:1px;background:#ecf0e8;margin:14px 0}
.mini-heading{display:flex;justify-content:space-between;align-items:baseline;gap:6px}
.mini-heading h3{font-size:11px;letter-spacing:.2px;color:#355c56;margin:0;font-weight:800}
.mini-heading>span{font-size:10px;color:#a2b2a6}
.job-breakdown{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 13px}
.job-pill{background:#f0f5ed;border:1px solid #e4ece1;border-radius:7px;padding:6px 8px;font-size:10px;color:#6d8d80}
.job-pill b{color:#31584d}
.roster-heading{margin:9px 0 8px}
.villager-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.villager-row{background:#f6f7f0;border:1px solid #e9eee4;border-radius:9px;display:flex;gap:7px;align-items:center;padding:7px 6px;min-width:0}
.villager-avatar{width:26px;height:26px;flex-shrink:0;background:#e8efe5;border-radius:8px;display:grid;place-items:center;color:#577a69;font-size:17px}
.villager-row>span:last-child{display:block;min-width:0}
.villager-row b{display:block;color:#31534b;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.villager-row small{display:block;font-size:9px;color:#96a59a;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.discoveries-summary{margin:0 0 11px;color:#8c9e91;font-size:11px}
.discovery-list{display:grid;gap:6px}
.discovery-item{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:9px;border:1px solid #e6ece3;border-radius:10px;background:#f9faf5;color:#33524b}
.discovery-item:not(:disabled):hover{border-color:#72ac92;background:#eff8ef}
.discovery-item:disabled{cursor:default;opacity:.66}
.discovery-item.unlocked{border-color:#d4e8d6;background:#eff6eb;opacity:1}
.discovery-symbol{display:grid;place-items:center;width:33px;height:33px;flex-shrink:0;border-radius:9px;background:#eaf0e2;font-size:21px;color:#64937c}
.discovery-label{display:block;flex:1;min-width:0}
.discovery-label strong{display:block;font-size:11px;white-space:nowrap}
.discovery-label small{display:block;font-size:10px;line-height:1.35;color:#93a499;margin-top:2px}
.discovery-price{font-size:11px;font-weight:850;white-space:nowrap;color:#6a9f80;padding-left:3px}
@media (max-width:870px){.council-panel{grid-column:auto}.discoveries-panel{grid-column:auto}}
@media (max-width:570px){.council-panel,.discoveries-panel{padding:16px}.villager-list{grid-template-columns:repeat(2,minmax(0,1fr))}.strategy-grid button{min-height:47px;font-size:12px}}


/* Living-world consequences. Low visual noise; persistent status stays readable. */
.world-pulse-panel{background:#fffdf8;border:1px solid var(--line);border-radius:16px;padding:17px 18px}
.world-meter{margin:12px 0}
.world-meter>div:first-child{display:flex;align-items:center;justify-content:space-between;color:#526b63;font-size:11px;font-weight:750;margin-bottom:7px}
.world-meter strong{font-size:11px;color:#385e55}
.pulse-symbol{font-size:16px;margin-right:5px;color:#7ba78c}
.pulse-track{height:7px;border-radius:8px;background:#eaf0e7;overflow:hidden}
.pulse-track>i{height:100%;width:0%;display:block;border-radius:8px;background:linear-gradient(90deg,#70a98c,#9dcc9a);transition:width .22s ease}
.world-meter:nth-of-type(3) .pulse-track>i{background:linear-gradient(90deg,#9db9ca,#83a4c4)}
.world-meter.risk .pulse-track>i{background:linear-gradient(90deg,#efc78b,#d78672)}
.crisis-status{margin:12px 0 14px;border-radius:9px;background:#eef5ec;padding:10px 11px;font-size:11px;line-height:1.5;color:#67907b}
.crisis-status.warning{background:#fff0dc;color:#a46c4c}
.legacy-heading{margin:12px 0 8px}
.legacy-list{display:flex;flex-wrap:wrap;gap:6px;min-height:23px}
.legacy-pill{border-radius:8px;border:1px solid #e6e8d8;background:#f8f4e6;color:#8b7a56;padding:7px 8px;font-size:10px;font-weight:750;max-width:100%}
.legacy-empty{font-size:11px;color:#a4b4a5;line-height:1.4}
.quick-tools{display:none}
@media (max-width:570px){
 .world-pulse-panel{padding:16px}
 .quick-tools{position:absolute;z-index:4;left:8px;right:8px;bottom:8px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;pointer-events:auto}
 .quick-tools button{min-width:0;min-height:44px;border-radius:10px;border:1px solid #f6f5e8bd;background:#fffff3ee;box-shadow:0 4px 10px #24443b26;color:#326054;font-size:16px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:4px;padding:5px}
 .quick-tools button span{font-size:11px;white-space:nowrap}
 .quick-tools button.active{background:#17474a;color:#fff;border-color:#17474a}
 .canvas-shell .bottom-left{bottom:auto;top:43px;left:8px;max-width:82%;font-size:10px}
 .canvas-shell .bottom-right{bottom:auto;top:8px;right:7px}
 .canvas-shell .bottom-right button{min-height:30px;min-width:30px}
 .canvas-shell .top-left{max-width:72%}
}
@media (max-width:365px){
 .quick-tools{gap:3px;left:5px;right:5px}
 .quick-tools button{font-size:14px;gap:2px}
 .quick-tools button span{font-size:10px}
}

.event-choices button small.longterm{font-size:10px;line-height:1.4;margin-top:8px;padding-top:7px;border-top:1px solid currentColor;opacity:.76}


/* A living social layer: compact, readable family and leadership summary. */
.generations-panel{background:#fffdf8;border:1px solid var(--line);border-radius:16px;padding:17px 18px}
.leader-profile{display:flex;align-items:center;gap:11px;padding:12px;border-radius:12px;background:#f2f6eb;border:1px solid #e8efe0}
.leader-medallion{width:43px;height:43px;flex:0 0 43px;border-radius:13px;background:#d9e9d3;display:grid;place-items:center;color:#4e8668;font-size:27px}
.leader-profile>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.leader-profile small{font-size:9px;color:#8da996;font-weight:900;letter-spacing:1.1px}
.leader-profile strong{font-size:14px;color:#31554c;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.leader-profile span:last-child{font-size:10px;color:#879c8e}
.family-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:12px 0 17px}
.family-stats div{padding:8px 2px;background:#f6f8f1;border:1px solid #eef1e9;border-radius:8px;text-align:center}
.family-stats strong{font-size:18px;display:block;line-height:1.25;color:#305750}
.family-stats small{font-size:9px;color:#91a699}
.social-tension{height:6px;border-radius:6px;background:#e9eee7;margin-top:7px;overflow:hidden}
.social-tension i{display:block;height:100%;border-radius:6px;width:12%;background:linear-gradient(90deg,#8cb6a0,#cf9075);transition:width .2s}
.social-story{color:#829a8d;font-size:11px;line-height:1.5;margin:12px 0}
.family-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.family-actions button{background:#f4f8f1;border:1px solid #dfe9dc;color:#486f5e;border-radius:9px;padding:9px 7px;font-size:11px;font-weight:800;min-height:48px;text-align:center}
.family-actions button small{display:block;color:#9dae9c;font-weight:650;margin-top:3px}
.family-actions button:disabled{opacity:.45;cursor:not-allowed}
.family-actions button:not(:disabled):hover{background:#e3f0e5;border-color:#8dbba3}
.council-cooldown{font-size:10px;color:#a1ad9e;display:block;margin-top:9px;line-height:1.4}
@media(max-width:570px){.generations-panel{padding:16px}.family-actions button{min-height:48px;font-size:12px}.leader-profile{padding:11px}}


/* Camera navigation: cropped mobile island remains fully reachable. */
.camera-nav{display:none}
@media(max-width:570px){
 .camera-nav{position:absolute;z-index:5;display:flex;gap:4px;top:8px;right:43px;pointer-events:auto}
 .camera-nav button{background:#fffff3ee;border:1px solid #fff;border-radius:9px;width:38px;height:35px;font-size:19px;font-weight:850;color:#3b6860;box-shadow:0 3px 10px #27514722}
 .camera-nav button:disabled{opacity:.4;cursor:not-allowed}
}


/* Guided first session: compact, non-modal, never covers the map. */
.tutorial-guide{display:flex;gap:16px;align-items:center;justify-content:space-between;padding:15px 17px;background:#e8f2e7;border:1px solid #b8d3ba;border-radius:14px;margin:0 2px 15px;color:#244e48;box-shadow:0 5px 18px #3c695e11}
.tutorial-guide[hidden]{display:none}
.tutorial-content{min-width:0;flex:1}
.tutorial-marker{font-weight:900;letter-spacing:1.4px;font-size:10px;color:#6a9881;display:block;margin-bottom:4px}
.tutorial-marker>span{margin-left:4px}
.tutorial-content strong{display:block;font-size:15px;letter-spacing:-.2px}
.tutorial-content p{font-size:12px;line-height:1.45;color:#608475;margin:5px 0 0}
.tutorial-actions{display:flex;align-items:center;gap:7px;flex-shrink:0}
.tutorial-actions button{border-radius:9px;border:1px solid #b4cdbc;background:#fffdf8;color:#2f6956;font-size:12px;font-weight:800;padding:11px 12px;min-height:44px}
.tutorial-actions button:first-child{background:#1b4d46;border-color:#1b4d46;color:#fff}
.tutorial-actions button:hover{filter:brightness(.96)}
@media (max-width:800px){.tutorial-guide{align-items:flex-start;flex-direction:column;gap:10px}}
@media (max-width:570px){.tutorial-guide{margin:0 0 10px;padding:12px;gap:10px}.tutorial-content strong{font-size:14px}.tutorial-content p{font-size:11px}.tutorial-actions{width:100%}.tutorial-actions button:first-child{flex:1}.tutorial-actions button{min-height:43px}}


/* Player-first interface: island and one meaningful choice, not a dashboard. */
.essential-strip{display:flex;align-items:center;gap:19px;flex-wrap:wrap;margin:-5px 3px 14px;padding:9px 13px;border:1px solid #dce6db;background:#fffdf8;border-radius:12px}
.essential-strip>span{display:inline-flex;align-items:baseline;gap:5px;color:#6d9a83;font-size:17px;font-weight:800;white-space:nowrap}
.essential-strip strong{font-size:19px;color:#254b45;font-variant-numeric:tabular-nums}
.essential-strip small{font-size:11px;color:#8b9f91;font-weight:650}
.essential-strip>span.low strong{color:#b56956}
.essential-strip button{margin-left:auto;display:inline-flex;align-items:center;gap:7px;border:1px solid #d6e3d8;background:#f5f8f2;color:#38695a;border-radius:9px;padding:9px 12px;min-height:40px;font-size:11px;font-weight:850}
.essential-strip button:hover,.details-side-link:hover{background:#e9f2e7}
.next-step-banner{display:flex;align-items:center;flex-wrap:wrap;gap:14px;padding:15px 17px;margin:0 2px 15px;background:#fffdf8;border:1px solid #dbe7d9;border-left:4px solid #7dbba0;border-radius:13px;box-shadow:0 4px 12px #28463b0d}
.next-step-banner[hidden],.insights-drawer[hidden],.insights-backdrop[hidden],.insights-page[hidden],.how-to-content[hidden]{display:none!important}
.next-step-text{flex:1;min-width:180px}
.step-eyebrow{font-size:9px;font-weight:900;letter-spacing:1.5px;color:#789a84;display:block;margin-bottom:5px}
.next-step-text strong{font-size:17px;letter-spacing:-.35px;color:#23483f}
.next-step-text p{color:#758f81;font-size:12px;line-height:1.5;margin:5px 0 0;max-width:620px}
.next-step-actions{display:flex;flex-shrink:0;align-items:center;gap:6px}
.next-step-actions button{min-height:42px;border-radius:9px;border:1px solid #d7e4d8;background:white;color:#557768;padding:10px 12px;font-size:11px;font-weight:850}
.next-step-actions button:first-child{background:#1b4845;color:#fff;border-color:#1b4845}
.next-step-actions button:disabled{opacity:.6;cursor:default}
.how-to-content{flex:1 0 100%;border-top:1px solid #e9efe6;padding-top:8px;color:#6b867a}
.how-to-content p{margin:6px 0;font-size:12px;line-height:1.6}
.story-details{margin-top:12px}
.story-details summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:center;gap:12px;border-radius:12px;border:1px solid #dfe6dc;padding:14px 17px;background:#fafbf7;color:#48695e;font-size:13px;font-weight:800}
.story-details summary::-webkit-details-marker{display:none}
.story-details summary>span{color:#8ca397;font-size:11px;font-weight:650}
.story-details[open] summary{border-radius:12px 12px 0 0;background:#f4f8f0}
.story-details .chronicle{margin-top:0;border-radius:0 0 12px 12px;box-shadow:none}
.sidebar{gap:14px}
.sidebar .tools-panel{box-shadow:0 8px 18px #173d3612}
.details-side-link{width:100%;min-height:46px;background:#fffdf8;border:1px solid #dfe6de;color:#416657;border-radius:12px;padding:11px 15px;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;font-weight:800}
.insights-backdrop{position:fixed;inset:0;z-index:8;background:#183a3e9e;backdrop-filter:blur(2px)}
.insights-drawer{position:fixed;inset:0 0 0 auto;z-index:9;display:flex;flex-direction:column;background:#edf2ea;width:min(454px,100%);height:100dvh;box-shadow:-15px 0 45px #182b2738;overflow:hidden}
.insights-header{padding:20px 19px 13px;display:flex;align-items:center;justify-content:space-between;background:#fffdf8;border-bottom:1px solid #e2e9dd}
.insights-header h2{font-family:Georgia,"Times New Roman",serif;font-size:25px;font-weight:600;letter-spacing:-.5px;color:#214741;margin:5px 0 0}
.insights-header button{border:1px solid #dce8df;border-radius:11px;display:grid;place-items:center;width:42px;height:42px;background:#f8faf5;color:#3d6259;font-size:19px}
.insights-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;background:#fffdf8;border-bottom:1px solid #dde6da;padding:11px 18px}
.insights-tabs button{padding:11px 8px;border:0;background:transparent;border-radius:9px;color:#8a9e91;font-size:12px;font-weight:800;min-height:42px}
.insights-tabs button.active{background:#e4f0e5;color:#225a4b}
.insights-page{display:flex;flex-direction:column;gap:13px;overflow:auto;overscroll-behavior:contain;padding:17px 18px 50px;scrollbar-width:thin;flex:1;min-height:0}
.insights-page>.tribe-card,.insights-page>.resource-panel,.insights-page>.council-panel,.insights-page>.generations-panel,.insights-page>.world-pulse-panel,.insights-page>.quest-panel,.insights-page>.discoveries-panel,.insights-page>.achievements-panel{flex-shrink:0}
.insights-page .tool-list{max-height:none}
body.insights-visible{overflow:hidden}
@media(max-width:1100px){
 .essential-strip{gap:12px}
 .next-step-banner{align-items:flex-start;flex-direction:column}
 .next-step-actions{width:100%}
}
@media(max-width:870px){
 .sidebar{display:flex;flex-direction:column;gap:10px}
 .sidebar .tools-panel{grid-row:auto}
 .main-grid{gap:14px}
 .next-step-banner{flex-direction:row;align-items:center}
 .next-step-actions{width:auto}
}
@media(max-width:570px){
 .world-heading{margin-bottom:16px}
 .essential-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:8px;margin:0 0 10px}
 .essential-strip>span{align-items:center;justify-content:center;flex-wrap:wrap;gap:3px;font-size:15px}
 .essential-strip strong{font-size:17px}
 .essential-strip small{font-size:10px}
 .essential-strip button{grid-column:1/-1;justify-content:center;margin-left:0;min-height:39px;padding:7px}
 .next-step-banner{padding:12px;margin:0 0 10px;gap:10px;flex-direction:column;align-items:stretch}
 .next-step-text strong{font-size:15px}
 .next-step-text p{font-size:11px}
 .next-step-actions{display:grid;grid-template-columns:2fr 1fr;width:100%}
 .next-step-actions button{font-size:11px;min-height:44px}
 .story-details{margin-top:10px}
 .story-details summary{padding:12px;font-size:12px}
 .insights-header{padding:14px 16px 11px}
 .insights-tabs{padding:9px 13px}
 .insights-page{padding:14px 13px 55px}
 .sidebar .tools-panel .tool-list{max-height:none}
}


/* Next layer: show where an action will work and why the island matters long-term. */
.journey-strip{display:flex;align-items:center;gap:10px;margin:0 3px 13px;padding:12px 14px;border:1px solid #e4e9dd;border-radius:12px;background:#f8f9f2;color:#46695c}
.journey-emblem{display:grid;place-items:center;flex-shrink:0;width:36px;height:36px;border-radius:11px;background:#edf2df;color:#64907b;font-size:24px}
.journey-strip>div{flex:1;min-width:0}
.journey-strip small{display:block;color:#869e8b;font-size:9px;font-weight:900;letter-spacing:1.5px}
.journey-strip strong{display:block;font-size:13px;line-height:1.4;color:#28564a}
.journey-strip>div span{display:block;font-size:11px;color:#849c8a;line-height:1.4;margin-top:2px}
.journey-strip button{min-height:40px;flex-shrink:0;border:1px solid #dae8d9;border-radius:9px;padding:8px 10px;color:#3c715b;background:white;font-size:11px;font-weight:850}
.journey-strip button:hover{background:#e6efe5}
.journey-strip.complete{border-color:#d4bc85;background:#fbf6e9}
.journey-strip.complete .journey-emblem{background:#f9eac3;color:#b38c36}
.map-guide{position:absolute;z-index:4;top:12px;left:50%;transform:translateX(-50%);max-width:66%;width:max-content;padding:9px 14px;border:1px solid #c3e7cb;border-radius:999px;background:#f4fff0ee;box-shadow:0 6px 18px #174c4233;color:#2a684e;font-size:12px;font-weight:850;text-align:center;pointer-events:none;line-height:1.4}
.map-guide[hidden]{display:none}
.map-guide>span:first-child{font-size:14px;margin-right:4px}
.journey-details{background:#fffdf8;border:1px solid var(--line);border-radius:14px;padding:17px}
.journey-details h3{font-family:Georgia,"Times New Roman",serif;font-size:23px;margin:7px 0 5px;color:#2e5950}
.journey-details>p{color:#7c9585;font-size:12px;line-height:1.55;margin:0 0 15px}
.journey-stages{display:grid;gap:8px}
.journey-stage{display:flex;gap:12px;align-items:flex-start;border:1px solid #e6e9df;border-radius:11px;padding:11px;background:#f9faf5;opacity:.72}
.journey-stage.current{opacity:1;border-color:#a7cbb0;background:#eff7ee}
.journey-stage.completed{opacity:1;border-color:#d7e7d5;background:#f5faf0}
.journey-stage-icon{width:34px;height:34px;flex:0 0 34px;border-radius:10px;display:grid;place-items:center;background:#e4efe2;color:#548773;font-size:21px}
.journey-stage>div{min-width:0;flex:1}
.journey-stage strong{font-size:12px;display:block;margin-top:2px;color:#34584e}
.journey-stage p{font-size:11px;line-height:1.45;margin:4px 0;color:#7f9588}
.journey-stage small{font-size:10px;font-weight:800;color:#649a7b}
@media(max-width:570px){
 .journey-strip{gap:8px;margin:0 0 10px;padding:10px}
 .journey-emblem{width:30px;height:30px;flex-basis:30px;font-size:19px}
 .journey-strip strong{font-size:12px}
 .journey-strip>div span{font-size:10px}
 .journey-strip button{min-height:42px;padding:7px;font-size:10px}
 .map-guide{top:auto;bottom:66px;left:50%;max-width:85%;font-size:11px;padding:8px 10px}
}


/* Moments happen on the island, not in another always-visible dashboard. */
.village-moment{position:absolute;z-index:5;top:45px;right:14px;display:flex;align-items:center;gap:10px;max-width:265px;padding:11px 13px;border:1px solid #f2e6b3;border-radius:13px;background:#fffaf0ee;color:#31594e;box-shadow:0 8px 24px #1b494026;pointer-events:none;animation:moment-arrive .26s ease-out both}
.village-moment[hidden]{display:none}
.moment-symbol{width:33px;height:33px;flex:0 0 33px;display:grid;place-items:center;background:#f4ebd1;border-radius:10px;font-size:21px;color:#9c8556}
.village-moment>span:last-child{display:block;min-width:0}
.village-moment strong{display:block;font-size:12px;line-height:1.3;font-weight:900;letter-spacing:-.1px;color:#245047}
.village-moment small{display:block;font-size:10px;line-height:1.35;color:#688576;margin-top:3px}
@keyframes moment-arrive{from{opacity:0;transform:translateY(-7px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
.moment-entries{display:grid;gap:7px}
.moment-entry{display:flex;gap:10px;align-items:center;border-radius:10px;border:1px solid #e7ebe0;background:#f8faf4;padding:8px 10px}
.moment-entry-icon{display:grid;place-items:center;flex-shrink:0;width:28px;height:28px;border-radius:9px;background:#ebf3e9;color:#699880;font-size:18px}
.moment-entry strong{font-size:11px;font-weight:850;color:#3b6254}
.moment-entry small{display:block;font-size:10px;line-height:1.45;color:#8a9d92;margin-top:2px}
.moment-entries:not(:empty){padding:0 0 13px;margin:0 0 12px;border-bottom:1px solid #e4eade}
@media(max-width:570px){
  .village-moment{top:51px;left:9px;right:9px;max-width:calc(100% - 18px);min-height:45px;padding:7px 9px;gap:8px;border-radius:10px}
  .moment-symbol{width:27px;height:27px;flex-basis:27px;font-size:17px}
  .village-moment strong{font-size:11px}
  .village-moment small{font-size:10px}
}
@media(prefers-reduced-motion:reduce){.village-moment{animation:none}}


/* Publisher-approved, opt-in ads: never overlap active gameplay. */
.ad-break-overlay{position:fixed;z-index:9900;inset:0;display:grid;place-items:center;padding:20px;background:#163c42d9;color:#f8f9ed;text-align:center;pointer-events:all}
.ad-break-overlay[hidden]{display:none}
.ad-break-overlay>div{width:min(340px,100%);padding:30px 22px;border:1px solid #cce1d333;border-radius:19px;background:#214b49;box-shadow:0 18px 65px #071c2280}
.ad-break-overlay span{display:block;color:#cfe4b2;font-size:30px;margin-bottom:9px}
.ad-break-overlay strong{font-size:20px}
.ad-break-overlay p{font-size:13px;line-height:1.5;color:#c5d9d0;margin:9px 0 0}
.reward-offer{padding:15px;border:1px solid #d7e9d1;background:#f4f9ee;border-radius:14px}
.reward-offer[hidden]{display:none}
.reward-heading{display:flex;align-items:flex-start;gap:10px}
.reward-heading>span{display:grid;place-items:center;width:35px;height:35px;flex:0 0 35px;border-radius:10px;background:#dceace;color:#62856e;font-size:23px}
.reward-heading h3{font-size:13px;color:#31594b;margin:0 0 3px}
.reward-heading p{font-size:11px;color:#668476;line-height:1.5;margin:0}
.reward-offer>small{display:block;font-size:10px;color:#829a89;margin-top:10px;line-height:1.4}
.reward-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:13px}
.reward-choices button{font:inherit;font-size:11px;font-weight:750;border-radius:10px;padding:11px 8px;min-height:46px;border:1px solid #a4c0ad;background:#ecf4e9;color:#30604e;cursor:pointer}
.reward-choices button:first-child{background:#dcebdc;border-color:#82ad94}
.reward-choices button:hover:not(:disabled){filter:brightness(.97)}
.reward-choices button:disabled{cursor:default;opacity:.5}
@media(max-width:400px){.reward-choices button{font-size:10px;padding:10px 6px}}


/* Release QA: keep story dialogs usable on short portrait screens. */
.event-overlay{overflow-y:auto;overscroll-behavior:contain}
.event-dialog{max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain}
@media(max-width:570px){
  /* Browser panning cancels pointerup gestures with touch-action:manipulation. */
  .canvas-shell canvas{touch-action:none}
  /* Keep camera arrows, world reset and map tooltip in separate lanes. */
  .camera-nav{top:8px;right:8px;left:auto}
  .canvas-shell .bottom-right{top:52px;right:8px;bottom:auto}
  .canvas-shell .bottom-left{top:52px;left:8px;right:auto;bottom:auto;max-width:calc(100% - 122px)}
}


/* Browser-reviewed mobile first fold: island before secondary progression. */
@media(max-width:570px){
  .world-panel{display:flex;flex-direction:column}
  .world-heading{order:0;margin:2px 2px 9px}
  .world-heading .eyebrow{display:none}
  .world-heading h1{font-size:30px;line-height:1.1;margin:0 0 5px;letter-spacing:-1.35px}
  .world-heading p{font-size:11px;line-height:1.25}
  .essential-strip{order:1;margin:0 0 8px;padding:6px 7px}
  .essential-strip button{min-height:36px}
  .tutorial-guide{order:2;margin:0 0 8px;padding:10px 11px}
  .tutorial-marker{margin-bottom:2px}
  .tutorial-content p{margin-top:3px}
  .tutorial-actions button{min-height:44px}
  .next-step-banner{order:2;margin:0 0 8px}
  .canvas-shell{order:3}
  .world-bottom{order:4;padding:10px 5px 12px}
  .journey-strip{order:5;margin:0 0 12px}
  .story-details{order:6}
}

/* 2026-11-06 portal fit: short landscape windows (640x360…1031x580) bring the island to the first screen. */
@media (orientation:landscape) and (max-height:620px){
 .world-heading,.next-step-banner{display:none}
 .topbar{padding-top:6px;padding-bottom:6px}
 .tutorial-guide{padding:8px 12px}
 .tutorial-guide p{margin:2px 0}
}

/* ===== ux-mobile-1106: phone game screen =====
   Direction «tabletop diorama in the hand»: the island is the screen. Top: one HUD
   row (day · season · villagers/food/faith). Middle: a tall island window edge to edge
   (canvas covers, camera arrows pan). Under it: the four miracles as a thumb dock,
   then the coach card. Title and secondary panels move below the fold. */
@media(max-width:570px){
 .app-shell{padding:0 12px}
 .topbar{min-height:60px;padding:8px 0;flex-wrap:nowrap;gap:8px}
 .brand-stack small{display:none}
 .brand-stack strong{font-size:19px;letter-spacing:2.5px}
 .brand-mark{width:36px;height:36px;font-size:22px}
 .topbar-center{display:none}
 .control-btn{min-height:44px;min-width:44px;font-size:13px}
 .main-grid{padding-top:8px}
 .world-heading{order:7!important;margin:22px 2px 6px!important}
 .world-heading h1{font-size:30px}
 .world-heading p{font-size:15px!important;color:#5f7369}
 .essential-strip{order:1!important;margin:0 0 10px!important;padding:6px!important;border-radius:16px;grid-template-columns:repeat(3,1fr) auto!important}
 .essential-strip>span{font-size:16px!important}
 .essential-strip strong{font-size:20px}
 .essential-strip small{font-size:12px}
 .essential-strip button{min-height:44px!important;grid-column:auto!important;margin:0!important;padding:0 10px;font-size:0}
 .essential-strip button:before{content:"⋯";font-size:22px;line-height:1}
 .canvas-shell{order:2!important;aspect-ratio:auto!important;height:min(58svh,470px);margin:0 -12px;border:0!important;border-radius:0!important;box-shadow:none}
 .canvas-shell canvas{object-fit:cover}
 .camera-nav button{width:44px!important;height:44px!important;font-size:20px}
 .canvas-shell .bottom-right button{min-width:44px!important;min-height:44px!important}
 .quick-tools{position:static!important;order:3;display:grid!important;grid-template-columns:repeat(4,1fr);gap:6px!important;margin:10px 0 0;padding:0}
 .quick-tools button{min-height:58px!important;flex-direction:column;border-radius:14px!important;border:1px solid #d9e3d9!important;background:#fffdf7!important;font-size:20px!important}
 .quick-tools button span{font-size:12px!important}
 .quick-tools button.active{background:#17474a!important;color:#fff!important;border-color:#17474a!important}
 .tutorial-guide{order:4!important;margin:12px 0 0!important;border-radius:16px}
 .tutorial-content strong{font-size:16px}
 .tutorial-content p{font-size:14px;line-height:1.45}
 .tutorial-actions button{min-height:48px!important;font-size:15px}
 .next-step-banner{order:5!important;margin:12px 0 0!important}
 .next-step-banner p,.next-step-text p{font-size:14px}
 .world-bottom{order:6!important;font-size:13px}
 .world-bottom .tip{display:none}
 .journey-strip{order:8!important}
 .story-details{order:9!important}
 .sidebar{width:100%}
 .tools-panel{width:100%}
 .tool strong{font-size:14px}.tool small{font-size:12px}
 .tool{min-height:56px}
 .tool-tabs button{min-height:44px;font-size:13px}
 .selection-hint{font-size:13px}
 .entry{font-size:14px}
 .footer{font-size:12px}
}
@media(max-width:570px){.story-details>summary{min-height:48px;display:flex;align-items:center}#journey-open{min-height:44px}}
