:root{--ink:#49302b;--shadow:#322934;--wood:#ad6c4b;--gold:#f6b94f;--sun:#fff0c8;--paper:#fff8e5;--leaf:#318467;--rain:#87b8dd;--danger:#c65d4d}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{background:#302936;color:var(--ink);font:700 14px/1.25 'Trebuchet MS',Verdana,sans-serif;overscroll-behavior:none}button{font:inherit;cursor:pointer;touch-action:manipulation;user-select:none}button:focus-visible{outline:3px solid #58b1f0;outline-offset:3px}button:disabled{opacity:.48;cursor:not-allowed}.game-shell{width:min(1220px,100%);height:100dvh;max-height:950px;margin:auto;background:var(--paper);display:flex;flex-direction:column;position:relative;overflow:hidden;box-shadow:0 0 0 5px #34252b,0 0 70px #15121a}
.topbar{min-height:72px;background:#583b39;color:#fff2d1;display:flex;align-items:center;padding:7px 18px;gap:10px;border-bottom:5px solid #eeb463;box-shadow:inset 0 -2px #9b5e42;z-index:3}.brand{display:flex;align-items:center;gap:7px;flex:1;min-width:145px}.brand img{width:47px;height:54px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(2px 3px 0 #352329)}.brand b{font-size:clamp(18px,2.7vw,27px);letter-spacing:-1.3px;color:#fff4c6;text-shadow:3px 3px #3a2c35;white-space:nowrap}.brand em{color:#ffc354;font-style:normal}.brand span{display:block;font-size:9px;color:#e9d19f;letter-spacing:1.2px;margin-top:2px}.topstats{display:flex;gap:7px}.stat{border:2px solid #875c4e;background:#f9e9be;color:#513b32;min-width:126px;padding:5px 12px;border-radius:8px;box-shadow:inset 0 -3px #d6ac78,3px 3px #30262f}.stat.tiny{min-width:74px}.stat.reput{min-width:95px}.stat small{font-size:9px;display:block;letter-spacing:1.5px}.stat strong{font-size:19px;white-space:nowrap}.star{color:#d59528;font-size:20px;padding-left:4px}.top-actions{display:flex;gap:6px}.small-button{border:2px solid #e4ab72;background:#78534c;color:#fff3ce;box-shadow:3px 3px #30252a,inset 0 -2px #4b343c;border-radius:7px;min-width:42px;height:42px;font-size:16px;font-weight:900}.small-button:active,.number-stepper button:active{transform:translateY(2px);box-shadow:none}.market-bar{height:37px;min-height:37px;padding:0 20px;display:flex;align-items:center;gap:9px;background:#fce6b2;border-bottom:3px solid #bd8356;white-space:nowrap;overflow:hidden;font-size:13px}.market-label{font-size:10px;font-weight:1000;background:#a35e40;color:white;border-radius:3px;padding:4px 8px;letter-spacing:.8px}.weather-icon{font-size:19px;line-height:1}.market-dot{color:#c49268}.crowd{margin-left:auto;color:#815645;font-size:11px;background:#fff7d8;padding:4px 8px;border-radius:4px;box-shadow:inset 0 -2px #e5c7a1}
.stage{position:relative;min-height:155px;flex:1;overflow:hidden;background:#73b6b4}.stage canvas{width:100%;height:100%;display:block;image-rendering:auto}.stage-shade{pointer-events:none;position:absolute;inset:0;background:linear-gradient(0deg,rgba(47,35,39,.38),transparent 28%)}.scene-caption{position:absolute;left:15px;bottom:12px;background:rgba(59,45,45,.90);color:#fff0cf;border:2px solid #d7ad71;border-radius:7px;padding:7px 14px;box-shadow:3px 3px #3d3133;max-width:calc(100% - 30px);font-size:12px;z-index:1}.live-dot{display:inline-block;background:#6ee8a4;width:8px;height:8px;border-radius:50%;margin-right:6px;box-shadow:0 0 0 2px #315e55}.live-hud{position:absolute;top:9px;right:10px;display:flex;gap:5px;z-index:2}.live-hud[hidden]{display:none}.live-hud>div{background:#fff3d4;border:2px solid #6b4543;border-bottom-width:5px;border-radius:5px;min-width:70px;padding:4px 8px}.live-hud small{display:block;font-size:9px;letter-spacing:1px}.live-hud strong{display:block;font-size:16px}.event-toast{position:absolute;left:50%;top:35%;transform:translateX(-50%);font-weight:1000;font-size:23px;color:#fff8cf;text-shadow:2px 3px 0 #573a32,0 0 5px #38272c;pointer-events:none;opacity:0}.event-toast.show{animation:toast 660ms ease-out forwards}@keyframes toast{0%{opacity:0;transform:translate(-50%,20px) scale(.8)}30%{opacity:1;transform:translate(-50%,0) scale(1.07)}100%{opacity:0;transform:translate(-50%,-20px)}}
.control-deck{background:#fff6e4;border-top:7px solid #ad674c;padding:11px 15px 9px;box-shadow:inset 0 6px #eac18b;z-index:2}.deck-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:9px}.eyebrow{font-size:16px;font-weight:1000;color:#674034;letter-spacing:1.4px;text-shadow:1px 1px #fff}.deck-heading p{font-size:11px;font-weight:600;margin:2px 0 0;color:#92715b}.hint-pill{border:2px solid #e6bf77;background:#fff2c6;border-radius:5px;padding:5px 10px;color:#8a6035;font-size:10px;letter-spacing:1px;white-space:nowrap}.choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.choice-card{background:#fffef5;border:2px solid #dbba90;border-radius:9px;box-shadow:inset 0 3px #ffffff,3px 4px #d9b38a;padding:10px 11px 9px;min-width:0;display:flex;flex-direction:column;justify-content:space-between}.choice-label{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:1000;letter-spacing:.5px;color:#69483a;white-space:nowrap}.chip-num{width:24px;height:24px;border-radius:7px;display:grid;place-items:center;font-size:11px;background:#c1774f;color:white;border:2px solid #9b5940;box-shadow:inset 0 -2px #844a39}.number-stepper{display:flex;justify-content:space-between;align-items:center;gap:4px;padding:7px 0 4px}.number-stepper button{width:37px;height:39px;border-radius:7px;border:2px solid #915a43;background:#f0b263;color:#563529;font-size:25px;font-weight:1000;box-shadow:inset 0 -4px #d78b47,2px 3px #b27b56;line-height:1}.number-stepper strong{font-size:clamp(17px,1.9vw,23px);white-space:nowrap;letter-spacing:-.7px;text-align:center}.number-stepper strong small{font-size:9px;letter-spacing:0}.card-foot{font-size:10px;display:flex;justify-content:space-between;align-items:center;gap:5px;color:#997d67;line-height:1.2}.card-foot b{color:#28745a;white-space:nowrap}.quality-row{display:flex;gap:4px;margin:6px 0}.quality-btn{flex:1;min-width:0;border-radius:6px;padding:5px 1px 4px;background:#f4e5c9;color:#7b5a4a;border:2px solid #d8baa0;font-size:11px;box-shadow:inset 0 -3px #e2cba7}.quality-btn .quality-doodle{display:block;font-size:12px;color:#cf9b49}.quality-btn.selected{border-color:#37875c;background:#d7edc2;color:#245d40;box-shadow:inset 0 -3px #9bc98d}.quality-btn.selected .quality-doodle{color:#54a65f}.invest-select{background:#fcf0d4;border:2px solid #d0ae8e;width:100%;display:flex;align-items:center;text-align:left;gap:10px;padding:7px;border-radius:7px;color:#5f4035;margin:5px 0}.invest-badge{font-size:23px;color:#cd9558}.invest-select b{font-size:12px;display:block}.invest-select small{font-size:9px;display:block;opacity:.7;margin-top:2px}.invest-select .arrow{margin-left:auto;font-size:26px}.deck-bottom{display:flex;gap:16px;align-items:center;justify-content:flex-end;margin-top:11px;border-top:2px dashed #e0c69e;padding-top:10px}.budget{display:flex;align-items:center;gap:11px;flex:1;font-size:11px;color:#a07459}.budget strong{color:#583d30;font-size:17px;white-space:nowrap}.budget-bar{width:90px;height:9px;background:#ebdbcc;border-radius:6px;border:1px solid #cfab87;overflow:hidden}.budget-bar span{display:block;background:#66a977;height:100%;width:60%}.budget-remaining{color:#568567;white-space:nowrap}.budget-warning{color:#b44135;font-size:10px;font-weight:1000;max-width:160px}.primary-button{border:3px solid #3b7145;box-shadow:inset 0 -6px #2b8748,0 5px #304637;background:#52bd67;border-radius:10px;color:#fffde6;text-shadow:2px 2px #256c42;padding:13px 31px;font-size:18px;font-weight:1000;letter-spacing:.8px;display:flex;align-items:center;gap:10px;white-space:nowrap;position:relative;overflow:hidden}.primary-button:not(:disabled):hover{background:#61cb75}.primary-button:active{transform:translateY(3px);box-shadow:inset 0 -2px #2b8748,0 2px #304637}.play-triangle{display:inline-block;border-top:10px solid transparent;border-bottom:10px solid transparent;border-left:14px solid #fff6cf;filter:drop-shadow(2px 2px #357248)}.footbar{background:#6d4a3f;color:#e7caab;font-size:10px;padding:6px 17px;display:flex;align-items:center;gap:8px;letter-spacing:1px;border-top:3px solid #bc8055;min-height:29px}.footbar .divider-dot{color:#d7a05c}.foot-link{margin-left:auto;border:0;color:#fff0cf;background:transparent;font-size:10px;letter-spacing:1px;text-decoration:underline;text-underline-offset:3px}.screen-overlay[hidden]{display:none}.screen-overlay{position:absolute;inset:0;background:rgba(37,29,37,.71);z-index:10;display:flex;align-items:center;justify-content:center;padding:15px;backdrop-filter:blur(3px)}.modal-content{width:min(575px,100%);max-height:min(90dvh,890px);overflow:auto;background:#fff7dd;color:#553e34;border:5px solid #8c5747;border-radius:14px;box-shadow:0 0 0 4px #f6d596,0 12px 0 #362c32,0 25px 80px #1d1b28;padding:21px 24px 20px;text-align:center;scrollbar-width:thin}.modal-content h1,.modal-content h2{margin:0;color:#693d31;text-shadow:2px 2px #eed0a6;font-size:clamp(26px,5vw,36px)}.modal-content p{color:#876857;font-size:13px;line-height:1.5;margin:9px 0 15px}.modal-logo{width:min(300px,80%);margin:0 auto 3px;display:block}.modal-art{width:110px;height:130px;image-rendering:pixelated;object-fit:contain;margin:-10px auto -8px;display:block}.modal-kicker{display:inline-block;background:#d39d55;color:#fff9e3;padding:5px 14px;font-size:11px;border-radius:5px;letter-spacing:2px;box-shadow:inset 0 -2px #a66a44;margin-bottom:9px}.modal-actions{display:flex;gap:10px;justify-content:center;margin-top:14px;flex-wrap:wrap}.modal-actions button,.action-btn{border:2px solid #6c834e;border-bottom:5px solid #466545;background:#62bb72;color:white;text-shadow:1px 2px #3b8051;padding:12px 22px;border-radius:7px;font-size:15px;min-width:135px;box-shadow:2px 3px #caa47f}.modal-actions button.secondary,.action-btn.secondary{background:#e9d3aa;border-color:#a47a57;border-bottom-color:#936649;color:#604535;text-shadow:none}.ledger{width:100%;border-collapse:collapse;text-align:left;background:#fffdf3;border:2px solid #dabd90;border-radius:7px;overflow:hidden;margin:10px 0;font-size:13px}.ledger td{padding:7px 10px;border-bottom:1px dashed #e1caaa}.ledger td:last-child{text-align:right;font-weight:1000;white-space:nowrap}.ledger tr:last-child{background:#e2edcb;font-weight:1000;font-size:16px;color:#31764b}.ledger .negative{color:#b85d48}.results-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:12px 0}.results-grid>div{background:#f4e3ba;border:2px solid #e1c092;border-bottom-width:4px;padding:9px 3px;border-radius:6px}.results-grid strong{display:block;font-size:23px;color:#6b4839}.results-grid small{font-size:9px;color:#9b785a;display:block;margin-top:4px}.cause-list{text-align:left;margin:10px 0;padding:12px 16px;background:#f8edd1;border:2px solid #ddc29b;border-radius:8px;font-size:12px;line-height:1.45}.cause-list b{display:block;margin-bottom:6px}.cause-list ul{padding-left:18px;margin:0}.cause-list li+li{margin-top:6px}.investment-option{width:100%;display:flex;gap:12px;align-items:center;text-align:left;background:#fffdf0;border:2px solid #dec398;border-bottom-width:4px;border-radius:8px;padding:11px 12px;color:#674535;margin:8px 0}.investment-option .option-icon{font-size:25px;min-width:42px;height:42px;display:grid;place-items:center;background:#f6dba1;border-radius:7px;border:2px solid #dcac75}.investment-option b{display:block}.investment-option small{display:block;color:#977963;font-weight:600;font-size:11px;margin-top:3px}.investment-option .option-price{margin-left:auto;color:#298451;font-weight:1000;white-space:nowrap}.investment-option.picked{border-color:#4e9f68;background:#ecf7da}.investment-option:disabled{opacity:.55}.record-list{text-align:left;background:#f8e6c9;padding:10px 15px;border-radius:8px}.record-list p{display:flex;justify-content:space-between;border-bottom:1px dotted #cda781}.bottom-note{font-size:11px!important;color:#916f55!important}.speed-control{display:flex;justify-content:center;gap:5px;margin:8px 0}.speed-control button{border:2px solid #b38a64;background:#f8dfb3;color:#684b36;border-radius:5px;padding:7px 10px}.speed-control button.active{background:#4f9475;color:white;border-color:#2c6e58}.playback-controls{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:9px 0}.playback-controls .action-btn{min-width:0;font-size:12px;padding:7px 10px}
@media (min-width:1000px){.game-shell{height:min(96dvh,920px);margin-top:max(0px,calc((100dvh - 920px)/2))}.stage{min-height:290px}.control-deck{padding:14px 22px}.choice-card{min-height:143px}}
@media (max-width:700px){.topbar{min-height:58px;padding:5px 9px;border-bottom-width:3px;gap:5px}.brand{min-width:100px;gap:3px}.brand img{width:29px;height:38px}.brand b{font-size:16px;letter-spacing:-1.1px}.brand span{font-size:6px;letter-spacing:.3px;max-width:130px}.topstats{gap:3px}.stat{min-width:70px;padding:3px 5px;border-width:1px;border-radius:4px;box-shadow:inset 0 -2px #d6ac78,1px 2px #30262f}.stat.tiny{min-width:47px}.stat.reput{min-width:47px}.stat small{font-size:7px;letter-spacing:.4px}.stat strong{font-size:13px}.star{font-size:11px;padding-left:1px}.top-actions{gap:2px}.small-button{min-width:24px;width:25px;height:29px;font-size:10px;border-width:1px;border-radius:4px;box-shadow:1px 2px #30252a}.market-bar{height:28px;min-height:28px;padding:0 8px;gap:5px;font-size:10px;border-bottom-width:2px}.market-label{font-size:8px;letter-spacing:0;padding:4px}.weather-icon{font-size:14px}.crowd{font-size:8px;white-space:nowrap;max-width:94px;overflow:hidden;text-overflow:ellipsis}.stage{min-height:125px}.scene-caption{font-size:10px;padding:6px 8px;left:7px;bottom:7px}.live-hud{top:5px;right:5px;gap:2px}.live-hud>div{min-width:43px;padding:3px 5px;border-width:1px;border-bottom-width:3px}.live-hud small{font-size:7px}.live-hud strong{font-size:12px}.control-deck{padding:7px 8px 6px;border-top-width:5px}.deck-heading{margin-bottom:6px}.eyebrow{font-size:12px;letter-spacing:.7px}.deck-heading p{font-size:9px;margin:0}.hint-pill{display:none}.choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.choice-card{padding:6px 7px 6px;box-shadow:1px 2px #d9b38a;border-width:1.5px;min-height:108px}.choice-label{gap:5px;font-size:10px}.chip-num{width:18px;height:18px;font-size:8px;border-width:1px;border-radius:5px}.number-stepper{padding:3px 0 1px}.number-stepper button{width:28px;height:29px;border-width:1.5px;font-size:19px;border-radius:5px;box-shadow:inset 0 -3px #d78b47,1px 2px #b27b56}.number-stepper strong{font-size:18px}.card-foot{font-size:9px}.quality-row{gap:3px;margin:3px 0 2px}.quality-btn{padding:2px 0;font-size:9px;border-width:1px}.quality-btn .quality-doodle{font-size:9px}.invest-select{padding:3px 5px;margin:3px 0}.invest-select b{font-size:10px}.invest-select small{font-size:8px}.invest-badge{font-size:17px}.invest-select .arrow{font-size:19px}.deck-bottom{margin-top:6px;padding-top:6px;gap:5px}.budget{flex-wrap:wrap;column-gap:5px;row-gap:2px;font-size:8px}.budget strong{font-size:13px}.budget-bar{width:55px;height:7px}.budget-remaining{font-size:8px;width:100%}.budget-warning{font-size:9px;max-width:95px}.primary-button{padding:9px 10px;font-size:12px;letter-spacing:.1px;border-width:2px;border-radius:6px;box-shadow:inset 0 -3px #2b8748,0 3px #304637;gap:5px}.play-triangle{border-top-width:7px;border-bottom-width:7px;border-left-width:9px}.footbar{min-height:24px;font-size:8px;padding:4px 8px;letter-spacing:.5px}.foot-link{font-size:8px}.modal-content{padding:13px 15px 15px;border-width:3px}.modal-content p{font-size:11px;margin:7px 0 10px}.modal-content h1{font-size:27px}.modal-content h2{font-size:23px}.results-grid strong{font-size:19px}.results-grid small{font-size:8px}.ledger{font-size:11px}.ledger td{padding:5px 8px}.cause-list{font-size:11px;padding:9px 10px}.modal-actions button{font-size:12px;padding:9px 13px}.modal-logo{max-width:205px}.modal-art{width:90px;height:107px}}
@media (max-height:680px) and (max-width:700px){.topbar{min-height:51px}.stage{min-height:110px}.choice-card{min-height:99px}.deck-heading p{display:none}.control-deck{padding-top:4px}.footbar{min-height:20px;padding:2px 8px}.deck-bottom{margin-top:4px}.quality-row{margin:1px 0}}
@media (prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

.weather-icon svg{width:22px;height:22px;display:block}@media(max-width:700px){.weather-icon svg{width:17px;height:17px}}

.option-icon img{height:39px;width:39px;object-fit:contain;image-rendering:pixelated}

@media(max-width:700px){.brand b{font-size:15px;line-height:.93;max-width:85px;white-space:normal;display:block;letter-spacing:-.6px}.brand em{display:block}.brand span{display:none}}

/* v1.1: compact progress and visible economic skill challenges. */
.shift-challenge{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:-3px 0 10px;padding:8px 12px;border-radius:8px;background:#e9f1da;border:2px solid #a9ba78;color:#45624b;font-size:12px;line-height:1.25}
.shift-challenge .challenge-star{color:#b27629;font-size:20px;line-height:1}
.shift-challenge b{letter-spacing:.4px;white-space:nowrap;font-weight:1000}
.shift-challenge #challenge-text{font-weight:700}
.campaign-trail{display:grid;grid-template-columns:repeat(14,minmax(0,1fr));gap:3px;margin:10px 0 12px}
.trail-day{height:19px;display:grid;place-items:center;border-radius:4px;font-size:9px;font-weight:900;border:1px solid #b7a18e;background:#f3e1c7;color:#816654}
.trail-day.good{color:#fff7dc;background:#3d8965;border-color:#246b4d}.trail-day.done{color:#705e52;background:#f4d597}.trail-day.upcoming{color:#aa9e8b;background:#ede6da}
.challenge-result{display:flex;flex-wrap:wrap;justify-content:space-between;gap:3px 10px;align-items:center;text-align:left;border-radius:8px;padding:8px 12px;margin:6px 0;background:#fcead1;border:2px solid #d4b58c;color:#754a2e}
.challenge-result.met{background:#e9f5df;border-color:#7bb986;color:#326e4d}.challenge-result span{font-size:10px;font-weight:1000;letter-spacing:.5px}.challenge-result strong{flex:1 1 65%;font-size:12px}.challenge-result small{width:100%;font-size:11px}
.recovery-tip{color:#615244!important;border-top:1px solid #d4b993;margin:9px 0 0!important;padding-top:7px;font-weight:800}
.tomorrow-card{border:2px solid #abc7bd;border-radius:8px;background:#e8f4ec;display:flex;gap:6px;flex-wrap:wrap;align-items:baseline;padding:9px 12px;margin:10px 0;text-align:left;font-size:11px;color:#3b5e53}
.tomorrow-card b{font-size:11px}.grade-note{font-size:11px!important;background:#fff0cd;border-radius:7px;padding:8px 10px}
.final-challenges{padding:8px;text-align:center;border-top:1px dotted #d5b995;color:#645047}
@media(max-width:700px){.shift-challenge{padding:5px 7px;gap:3px 6px;margin:-2px 0 7px;font-size:9px}.shift-challenge .challenge-star{font-size:14px}.campaign-trail{gap:2px;margin:7px 0 8px}.trail-day{height:16px;font-size:8px}.challenge-result{padding:6px 8px;margin:6px 0}.challenge-result strong{font-size:10px}.challenge-result small{font-size:9px}.tomorrow-card{padding:7px 9px;margin:7px 0;font-size:9px}}
@media(max-height:680px) and (max-width:700px){.shift-challenge{margin:0 0 4px;padding:3px 6px;gap:3px;font-size:8px}.shift-challenge .challenge-star{display:none}}

.challenge-result .near-miss{font-weight:1000;color:#865c29}

/* v1.2: friendly async challenges and original exportable score cards. */
.social-cta,.share-controls{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:13px 0}
.social-cta button,.share-controls button,.social-actions button,.social-feature button{min-height:37px}
.social-cta button{flex:1 1 145px}
.social-feature{display:grid;gap:8px;text-align:left;padding:13px;background:#eaf1d8;border:2px solid #96b384;border-radius:10px;color:#325a44;margin:12px 0}
.social-feature>b{font-size:15px;letter-spacing:.5px}.social-feature span{font-size:12px;line-height:1.5}
.social-feature button{justify-self:start}
.social-actions{display:grid;gap:8px;margin-top:13px;text-align:left}
.social-input-label{display:block;text-align:left;font-size:11px;letter-spacing:.6px;color:#765440;font-weight:900}
.social-actions input,.modal-content textarea{box-sizing:border-box;display:block;width:100%;border:2px solid #a77753;background:#fff9e9;color:#48372a;border-radius:7px;padding:10px 11px;font:600 13px system-ui,sans-serif;user-select:text;-webkit-user-select:text}
.social-actions button{justify-self:stretch}
.rival-result{display:grid;gap:6px;background:#fff0d1;border:2px solid #ca995e;border-radius:10px;text-align:left;padding:11px 13px;margin:12px 0;color:#664b33}
.rival-result b{font-size:13px;color:#824d29}.rival-result span{font-size:12px;line-height:1.4}.rival-result small{font-size:10px}
.rival-result.ahead{background:#e6f3e1;border-color:#77a67e}.rival-result.ahead b{color:#2c694d}
.rival-result.behind{background:#fbe9dc;border-color:#c58c70}
.rival-invite-score{display:grid;gap:8px;background:#fbf1d9;border:2px solid #bd9366;border-radius:12px;padding:15px;color:#27543a}
.rival-invite-score small{font-weight:900;letter-spacing:.6px}.rival-invite-score strong{font-weight:1000;font-size:35px;line-height:1.1}
.rival-invite-score span{font-size:12px;color:#6c523b}
.share-canvas{display:block;width:100%;max-width:300px;height:auto;max-height:390px;object-fit:contain;margin:8px auto;border:3px solid #8b6548;border-radius:7px;box-shadow:3px 4px #caad85;background:#fff0d6}
.share-controls button{flex:1 1 130px}.share-controls button:disabled{opacity:.5;cursor:wait}
.social-caution{font-size:11px!important;color:#776352!important;line-height:1.4}
#social-feedback{font-size:11px;color:#38684d;font-weight:800;min-height:1em;margin:5px 0!important}
@media(max-width:700px){.social-feature{padding:9px;gap:5px}.social-feature>b{font-size:12px}.social-feature span{font-size:10px}.social-cta{gap:5px;margin:8px 0}.social-cta button{font-size:10px;padding:7px 6px;min-height:32px}.rival-invite-score strong{font-size:27px}.share-canvas{max-width:205px;max-height:255px}.social-feature button{font-size:10px}.share-controls{gap:5px;margin:6px 0}.share-controls button{font-size:10px;padding:6px;min-height:30px}}

/* v1.3 — publisher viewport pass. The economy/scene is unchanged; the play controls
   are redesigned to fit embedded 16:9 canvases rather than relying on scrolling. */
@media (min-width:560px) and (max-height:650px) and (orientation:landscape){
 .game-shell{height:100dvh;max-height:none;margin:0 auto}
 .topbar{min-height:44px;height:44px;flex:0 0 44px;padding:3px 9px;gap:6px;border-bottom-width:2px}
 .brand{min-width:0;gap:4px}
 .brand img{width:28px;height:34px}
 .brand b{font-size:17px;letter-spacing:-.5px}
 .brand em{display:inline}
 .brand span{display:none}
 .topstats{gap:4px}
 .stat,.stat.tiny,.stat.reput{min-width:0;padding:2px 7px;border-width:1px;border-radius:4px;box-shadow:inset 0 -2px #d6ac78}
 .stat small{font-size:8px;letter-spacing:.3px}
 .stat strong{font-size:14px}
 .star{font-size:12px}
 .small-button{min-width:29px;width:29px;height:30px;font-size:11px;border-width:1px;box-shadow:1px 2px #30252a}
 .market-bar{height:24px;min-height:24px;flex:0 0 24px;padding:0 9px;gap:5px;font-size:10px;border-bottom-width:2px}
 .market-label{font-size:8px;padding:3px 5px;letter-spacing:0}
 .weather-icon svg{width:17px;height:17px}
 .crowd{font-size:9px;max-width:125px;overflow:hidden;text-overflow:ellipsis}
 .stage{flex:1 1 75px;min-height:62px}
 .scene-caption{bottom:5px;left:7px;font-size:9px;padding:4px 8px;border-width:1px}
 .live-hud{top:3px;right:5px;gap:3px}
 .live-hud>div{min-width:47px;padding:2px 5px;border-width:1px;border-bottom-width:2px}
 .live-hud small{font-size:7px}
 .live-hud strong{font-size:11px}
 .control-deck{flex:0 0 auto;padding:4px 8px 5px;border-top-width:3px}
 .deck-heading{margin:0 0 3px}
 .deck-heading p{display:none}
 .eyebrow{font-size:11px;letter-spacing:.4px}
 .hint-pill{display:none}
 .shift-challenge{flex-wrap:nowrap;min-height:20px;margin:0 0 4px;padding:2px 7px;gap:6px;font-size:9px;line-height:1.1;overflow:hidden}
 .shift-challenge .challenge-star{font-size:12px;display:inline}
 .shift-challenge #challenge-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .choices{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
 .choice-card{min-height:76px;padding:4px 6px;border-width:1px;border-radius:6px;box-shadow:1px 2px #d9b38a}
 .choice-label{font-size:9px;letter-spacing:0;gap:4px;white-space:normal;line-height:1.15}
 .chip-num{width:16px;height:16px;min-width:16px;font-size:8px;border-width:1px;border-radius:4px}
 .number-stepper{padding:2px 0 0;gap:3px}
 .number-stepper button{width:25px;height:25px;min-width:25px;font-size:17px;border-width:1px;border-radius:4px;box-shadow:inset 0 -2px #d78b47}
 .number-stepper strong{font-size:clamp(12px,1.7vw,17px);letter-spacing:-.3px}
 .number-stepper strong small{font-size:8px}
 .quality-row{gap:2px;margin:2px 0 1px}
 .quality-btn{font-size:9px;padding:2px 0;border-width:1px;white-space:nowrap}
 .quality-btn .quality-doodle{font-size:9px}
 .card-foot{font-size:8px;gap:3px;line-height:1.1;min-height:10px}
 .card-foot span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .invest-select{padding:2px 3px;margin:2px 0;gap:4px;min-height:31px;border-width:1px}
 .invest-select b{font-size:9px}
 .invest-select small{font-size:8px;margin-top:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:125px}
 .invest-select .arrow{font-size:16px}
 .invest-badge{font-size:14px}
 .deck-bottom{margin-top:4px;padding-top:4px;gap:6px;border-top-width:1px}
 .budget{font-size:9px;gap:6px;flex-wrap:nowrap;min-width:0}
 .budget strong{font-size:13px}
 .budget-bar{width:45px;flex-shrink:0;height:7px}
 .budget-remaining{font-size:9px;width:auto}
 .budget-warning{max-width:230px;font-size:9px}
 .primary-button{padding:5px 15px;font-size:13px;gap:6px;border-width:2px;border-radius:6px;box-shadow:inset 0 -3px #2b8748,0 2px #304637;min-height:33px}
 .play-triangle{border-top-width:7px;border-bottom-width:7px;border-left-width:9px}
 .footbar{min-height:17px;height:17px;flex:0 0 17px;padding:0 9px;font-size:8px;border-top-width:1px;line-height:1}
 .foot-link{font-size:8px}
 .screen-overlay{padding:7px}
 .modal-content{max-height:calc(100dvh - 20px);width:min(535px,100%);padding:9px 13px 10px;border-width:3px}
 .modal-content h1,.modal-content h2{font-size:19px}
 .modal-content p{margin:4px 0 6px;font-size:10px;line-height:1.3}
 .modal-actions{margin-top:5px;gap:6px}
 .modal-actions button{min-width:106px;padding:6px 12px;font-size:11px}
 .modal-logo{max-width:170px;max-height:46px;margin:0 auto}
 .modal-art{width:53px;height:54px;margin:-4px auto}
 .modal-kicker{font-size:9px;padding:3px 9px;margin-bottom:3px}
 .bottom-note{font-size:9px!important}
 .screen-overlay[data-mode="intro"] .modal-art{display:none}
 .screen-overlay[data-mode="intro"] .bottom-note{display:none}
 .screen-overlay[data-mode="intro"] .modal-content{width:min(475px,100%)}
 .screen-overlay[data-mode="result"] .modal-content,.screen-overlay[data-mode="finish"] .modal-content{max-width:620px}
 .ledger{font-size:10px;margin:5px 0}
 .ledger td{padding:3px 7px}
 .results-grid{margin:4px 0;gap:3px}
 .results-grid>div{padding:4px 2px;border-width:1px}
 .results-grid strong{font-size:16px}
 .cause-list{font-size:10px;padding:6px 9px;margin:5px 0}
 .campaign-trail{margin:5px 0;gap:2px}
 .trail-day{height:13px;font-size:7px}
 .challenge-result{padding:4px 8px;margin:4px 0}
 .tomorrow-card{padding:4px 8px;margin:4px 0}
}
/* Portrait phones: move the sound/language/social controls to a dedicated header row.
   This fixes a clipped mute button without shrinking its touch target. */
@media (max-width:440px) and (orientation:portrait){
 .topbar{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:'brand actions' 'stats stats';min-height:0;height:auto;gap:2px 5px;padding:3px 8px 4px}
 .brand{grid-area:brand;min-width:0;gap:5px}
 .brand img{width:25px;height:26px}
 .brand b{font-size:15px;letter-spacing:-.55px;white-space:nowrap;max-width:none;line-height:1}
 .brand em{display:inline}
 .brand span{display:none}
 .topstats{grid-area:stats;display:grid;grid-template-columns:1fr 1.35fr .8fr;gap:4px;width:100%}
 .stat,.stat.tiny,.stat.reput{min-width:0;padding:2px 6px;border-width:1px}
 .stat small{font-size:8px}
 .stat strong{font-size:14px}
 .top-actions{grid-area:actions;justify-self:end;gap:4px}
 .small-button{width:30px;min-width:30px;height:29px;font-size:11px}
 .market-bar{padding:0 7px}
 .market-bar #trend{overflow:hidden;text-overflow:ellipsis;min-width:0}
 .market-bar .crowd{flex-shrink:0;max-width:83px}
}
@media (max-width:350px) and (orientation:portrait){
 .brand b{font-size:13px}
 .stat strong{font-size:12px}
 .deck-heading p{display:none}
 .budget-bar{display:none}
}

/* Result action dock: prevents "next day" from disappearing below a scrollable ledger. */
.screen-overlay[data-mode="result"] .modal-content{padding-bottom:66px}
#modal-action-dock{position:absolute;left:50%;bottom:11px;transform:translateX(-50%);z-index:11;width:min(550px,calc(100% - 34px));margin:0;padding:7px;background:#fff1cd;border:2px solid #caa276;border-radius:9px;box-shadow:0 -2px 10px #5b423733}
#modal-action-dock button{min-width:175px}
@media (min-width:560px) and (max-height:650px) and (orientation:landscape){
 .screen-overlay[data-mode="result"] .modal-content{padding-bottom:45px}
 #modal-action-dock{bottom:8px;width:min(500px,calc(100% - 25px));padding:2px}
 #modal-action-dock button{padding:5px 13px;font-size:11px;min-height:28px}
}
@media(max-width:440px) and (orientation:portrait){
 #modal-action-dock{bottom:11px}
 #modal-action-dock button{min-height:39px}
}

/* The scene should feel alive during a shift. Planning is locked and replaced by
   a larger stall view; the economy's live counters remain visible. */
.game-shell[data-phase="playing"] .control-deck,
.game-shell[data-phase="playing"] .footbar{display:none}
.game-shell[data-phase="playing"] .stage{flex:1 1 auto;min-height:0}
#playback-ui{box-shadow:2px 3px #4e3930}
#playback-ui .speed-control button{min-width:38px;min-height:31px;padding:3px 7px}
#skip{min-width:39px;min-height:31px;padding:3px 9px!important;font-size:18px!important}
@media(max-width:700px){
 #playback-ui{top:39px!important;right:5px!important}
 #playback-ui .speed-control button{min-width:34px;min-height:30px;padding:3px 5px}
 #skip{min-width:36px;min-height:30px}
}

/* v1.4 — portrait and foldable continuity. Never lock orientation: the layout
   responds to the *current CSS viewport*, not a device-model user-agent. */
.game-shell{padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
#modal-action-dock{bottom:calc(11px + env(safe-area-inset-bottom,0px))}
.screen-overlay{padding-top:max(7px,env(safe-area-inset-top,0px));padding-bottom:max(7px,env(safe-area-inset-bottom,0px))}

/* Folding a phone or opening a split window sometimes leaves only 400px of
   viewport height. Keep the selling action pinned while allowing the decision
   area (not the whole game) to scroll when four readable cards cannot fit. */
@media (max-width:559px) and (max-height:540px) and (orientation:portrait){
 .topbar{flex:0 0 auto;min-height:68px;height:auto;overflow:visible;padding:3px 7px 4px}
 .brand{align-self:center}
 .market-bar{flex:0 0 25px;min-height:25px;height:25px;padding:0 6px;gap:3px}
 .market-bar .crowd{max-width:70px}
 .stage{flex:0 0 clamp(60px,16dvh,78px);height:clamp(60px,16dvh,78px);min-height:0}
 .scene-caption{bottom:3px;left:5px;font-size:9px;padding:3px 6px;max-width:calc(100% - 10px)}
 .control-deck{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:5px 7px 0}
 .deck-heading{margin-bottom:3px}
 .shift-challenge{margin:0 0 5px;min-height:20px;padding:3px 5px}
 .choices{gap:5px}
 .choice-card{min-height:87px;padding:4px 6px 5px}
 .number-stepper{padding:1px 0 0}
 .quality-row{margin:1px 0}
 .invest-select{margin:1px 0;padding:3px 4px}
 .deck-bottom{position:sticky;bottom:0;z-index:3;margin:0 -7px;padding:6px 7px 7px;min-height:46px;border-top:2px solid #d8b78b;background:#fff6e4;box-shadow:0 -5px 10px rgba(68,45,33,.12)}
 .primary-button{min-height:36px}
 .budget-remaining{display:none}
 .footbar{flex:0 0 18px;min-height:18px;padding:0 6px;border-top-width:1px}
 .modal-content{max-height:calc(100dvh - 28px)}
}
/* On the open inner display of a book-style foldable, use the additional
   portrait space for comfortably sized decisions instead of scaling a tiny UI. */
@media (min-width:560px) and (max-width:700px) and (orientation:portrait) and (min-height:750px){
 .choice-card{min-height:121px;padding:9px 11px}
 .choice-label{font-size:12px}
 .number-stepper strong{font-size:22px}
 .number-stepper button{min-height:36px;min-width:36px}
 .quality-row{margin:7px 0}
 .quality-btn{font-size:12px;padding:5px 2px}
 .card-foot{font-size:10px}
 .invest-select{padding:7px 9px}
 .invest-select b{font-size:12px}
 .control-deck{padding:9px 13px 10px}
}


/* v1.5: medium-height desktop iframe mode. v1.4 only compressed below 650px,
   causing the main shift button to be clipped at CrazyGames 1216x684 / 1280x720.
   Keep a 4-column decision area and legible 10px+ secondary labels rather than
   scaling the entire game to fit. Larger portrait and desktop layouts unchanged. */
@media (min-width:1000px) and (min-height:651px) and (max-height:750px) and (orientation:landscape){
 .topbar{min-height:58px;height:58px;flex:0 0 58px;padding:4px 13px;border-bottom-width:3px}
 .brand img{width:38px;height:43px}
 .brand b{font-size:21px}
 .brand span{font-size:8px;letter-spacing:.5px}
 .stat{padding:3px 9px}
 .stat strong{font-size:16px}
 .small-button{width:35px;min-width:35px;height:35px;font-size:13px}
 .market-bar{height:29px;min-height:29px;flex:0 0 29px;padding:0 14px;font-size:11px;border-bottom-width:2px}
 .stage{min-height:120px;flex:1 1 auto}
 .control-deck{flex:0 0 auto;padding:6px 12px 7px;border-top-width:4px}
 .deck-heading{margin-bottom:5px}
 .deck-heading p{font-size:10px;margin:1px 0 0}
 .eyebrow{font-size:14px}
 .hint-pill{font-size:10px;padding:3px 7px}
 .shift-challenge{min-height:28px;margin:0 0 5px;padding:4px 9px;gap:6px;font-size:11px;flex-wrap:nowrap}
 .shift-challenge .challenge-star{font-size:15px}
 .choices{gap:7px}
 .choice-card{min-height:99px;padding:6px 8px 6px;border-width:1.5px}
 .choice-label{font-size:11px;letter-spacing:0;gap:5px}
 .chip-num{width:21px;height:21px;font-size:10px;border-width:1px}
 .number-stepper{padding:3px 0 1px}
 .number-stepper button{width:31px;height:32px;font-size:21px;border-width:1.5px}
 .number-stepper strong{font-size:18px}
 .card-foot{font-size:10px}
 .quality-row{margin:3px 0 2px;gap:3px}
 .quality-btn{font-size:10px;padding:2px 0}
 .quality-btn .quality-doodle{font-size:10px}
 .invest-select{padding:3px 6px;margin:3px 0;gap:6px;min-height:36px}
 .invest-select b{font-size:11px}
 .invest-select small{font-size:9px}
 .invest-badge{font-size:18px}
 .deck-bottom{margin-top:6px;padding-top:6px;gap:10px}
 .budget{font-size:10px;gap:7px}
 .budget strong{font-size:15px}
 .budget-bar{width:65px}
 .primary-button{font-size:15px;min-height:40px;padding:8px 20px;border-width:2px;box-shadow:inset 0 -4px #2b8748,0 3px #304637}
 .play-triangle{border-top-width:8px;border-bottom-width:8px;border-left-width:11px}
 .footbar{height:24px;min-height:24px;flex:0 0 24px;padding:3px 11px;font-size:9px}
}
/* Slightly increase legibility on the minimum Poki iframe without changing its
   layout geometry enough to lose the pinned primary decision control. */
@media (min-width:560px) and (max-width:700px) and (max-height:390px) and (orientation:landscape){
 .choice-label{font-size:10px}
 .card-foot{font-size:10px}
 .quality-btn{font-size:10px}
 .choice-card{min-height:92px;padding:5px 6px}
 .invest-select small{font-size:9px}
 .invest-select b{font-size:10px}
 .market-label{font-size:9px}
}
