*{box-sizing:border-box}body{margin:0;background:#101724;color:#efece4;font:15px/1.5 system-ui,-apple-system,sans-serif;--panel:#182232;--line:#344252;--muted:#acb9c9;--accent:#67ddd0;--ink:#efece4}body.light{background:#f3f0e8;color:#152937;--panel:#fffdf7;--line:#c4ccc8;--muted:#536773;--accent:#14776f;--ink:#152937}button,input,select{font:inherit}button,select{cursor:pointer}button{min-height:44px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:inherit;padding:9px 13px;font-weight:650}button:hover{border-color:var(--accent)}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible,#stage:focus-visible{outline:3px solid #efa85f;outline-offset:3px}button:disabled{opacity:.5;cursor:not-allowed}a{color:inherit}header,main,footer{max-width:1280px;margin:auto;padding:24px 36px}header{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{font-size:25px;font-weight:850;letter-spacing:-1.3px;text-decoration:none}.brand span{font-weight:450}.brand i{font-style:normal;color:var(--accent);margin-left:7px}.topright{display:flex;align-items:center;gap:18px}.testpill{font-size:9px;letter-spacing:1.5px;color:var(--muted)}.intro{display:flex;justify-content:space-between;align-items:center;padding:32px 0 29px}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:750;color:var(--accent)}h1{font-size:clamp(40px,5.2vw,68px);line-height:1.02;letter-spacing:-3px;margin:18px 0 19px;font-weight:750}h1 em{font-family:Georgia,serif;font-weight:400;color:#efb87b}body.light h1 em{color:#a25a27}.intro p{color:var(--muted);line-height:1.7}.chapter{width:230px;border-left:1px solid var(--line);padding-left:28px}.chapter span{display:block;font-size:9px;letter-spacing:1.5px;color:var(--muted)}.chapter strong{display:block;font:italic 29px/1.2 Georgia,serif;margin:18px 0}.layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:24px;align-items:start}.playcard{border:1px solid var(--line);border-radius:18px;overflow:hidden;background:var(--panel)}.gamebar{display:flex;justify-content:space-between;padding:16px 20px;font-size:12px;font-weight:700;gap:12px}.gamebar span:last-child{color:var(--accent)}#stage{position:relative;aspect-ratio:1.3;background:#18223a;isolation:isolate;overflow:hidden;touch-action:none}#world{display:block;width:100%;height:100%;--paper:#1a2036}.pp{fill:var(--paper)}#world path,#world line,#world circle,#world rect{vector-effect:non-scaling-stroke}#world text{font-family:system-ui,sans-serif;letter-spacing:1.3px}#world [data-landmark]{cursor:pointer}.storystrip{display:flex;align-items:center;gap:14px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:9px 20px;min-height:72px}.storystrip p{font-size:13px;margin:0;line-height:1.5}.spark{color:#efb87b;font-size:24px}.controlrow{display:flex;justify-content:space-between;gap:12px;padding:17px 18px 6px}.movecontrols,.actions,.utility,.weather{display:flex;gap:6px;flex-wrap:wrap}.movecontrols button{width:44px;padding:8px;touch-action:none}.movecontrols .held{background:#387d78}.actions button{font-size:12px;padding:7px 11px}.utility{padding:10px 18px;align-items:center}.utility button{font-size:11px;min-height:38px}.motion{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:5px}.playhint{font-size:10px;color:var(--muted);padding:0 18px 16px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:22px;margin-bottom:20px}.paneltitle{display:flex;gap:12px;align-items:center}.number{font-size:11px;color:var(--accent);border:1px solid var(--line);border-radius:50%;width:29px;height:29px;display:grid;place-items:center}h2{font-size:19px;letter-spacing:-.5px;margin:0}.muted{color:var(--muted);font-size:12px}.field{display:flex;flex-direction:column;gap:7px;margin:20px 0;font-size:12px;font-weight:650}.field select{background:var(--panel);color:inherit;border:1px solid var(--line);border-radius:8px;padding:10px;width:100%}.field input[type=range]{width:100%;accent-color:#68d9cc}.field input[type=color]{width:100%;height:36px;background:none;border:1px solid var(--line);border-radius:6px}.consent{display:flex;align-items:flex-start;gap:8px;font-size:11px;color:var(--muted);line-height:1.55;margin:17px 0}.consent input{flex:none;margin-top:4px;accent-color:#68d9cc;width:17px;height:17px}.uploadbox{display:flex;flex-direction:column;align-items:center;gap:5px;border:1px dashed #657a88;border-radius:10px;padding:15px;cursor:pointer}.uploadbox>span{font-size:26px;color:var(--accent)}.uploadbox strong{font-size:13px}.uploadbox small{font-size:10px;color:var(--muted)}.uploadbox input{width:100%;font-size:10px;margin-top:8px}.wide{width:100%;margin-top:9px;background:#66d9cc;color:#102c33;border-color:#66d9cc;font-size:12px}.secondary{background:transparent;color:inherit;border-color:var(--line)}.status{font-size:11px;line-height:1.6;color:var(--muted);margin-bottom:0}#preview{margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}#preview svg{width:100%;height:130px;color:var(--ink);background:#ffffff08;border-radius:10px}#preview p{font-size:11px;color:var(--muted)}.weather button{flex:1;font-size:11px;padding:8px}.weather button[aria-pressed=true]{border-color:var(--accent);color:var(--accent)}#win{position:absolute;inset:0;background:#101b2aeF;z-index:4;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:28px;color:#f8f1e4}#win[hidden]{display:none}#win>span{font-size:65px;color:#efb87b}#win h2{font:italic 36px/1.15 Georgia,serif;max-width:360px}#win p{max-width:360px;font-size:14px;color:#cad3df}#win button{background:#68d9cc;color:#12333a;margin-top:10px}.engine{display:grid;grid-template-columns:1fr 1fr;gap:70px;margin:55px 0 15px;border-top:1px solid var(--line);padding-top:35px}.engine h2{font:32px/1.15 Georgia,serif;margin-top:15px}.engine p{font-size:13px;color:var(--muted);margin-top:0}.engine a{font-size:12px;color:var(--accent)}footer{display:flex;justify-content:space-between;gap:20px;color:var(--muted);font-size:10px;letter-spacing:1px;border-top:1px solid var(--line)}[hidden]{display:none!important}
@media(max-width:900px){.layout{grid-template-columns:1fr 260px;gap:14px}header,main,footer{padding:20px}.panel{padding:16px}.controlrow{flex-wrap:wrap}.chapter{width:190px}.intro{padding-top:25px}}
@media(max-width:700px){header,main,footer{padding:17px}.brand{font-size:22px}.topright{gap:5px}.topright button{font-size:11px;padding:8px}.testpill{display:none}.intro{padding:24px 0 15px}.chapter{display:none}h1{font-size:45px;letter-spacing:-2px}.intro p{font-size:13px}.eyebrow{font-size:9px}.layout{grid-template-columns:1fr}.playcard{border-radius:13px}#stage{aspect-ratio:.93}.gamebar{padding:14px;font-size:11px}.storystrip{padding:11px 14px}.controlrow{padding:14px 12px 3px;gap:10px}.movecontrols{gap:5px}.movecontrols button{width:43px}.actions{gap:5px}.actions button{font-size:11px;min-height:44px;padding:7px 10px}.utility{padding:10px 12px}.playhint{padding-left:12px}aside{display:grid;grid-template-columns:1fr;gap:0}.panel{padding:20px}.engine{grid-template-columns:1fr;gap:20px;margin:30px 0 10px}.engine h2{font-size:27px}footer{font-size:8px;letter-spacing:.5px}.engine p{font-size:12px}}
@media print{body{background:white!important;color:black!important}header,.intro,aside,.gamebar,.storystrip,.controlrow,.utility,.playhint,.engine,footer,#win{display:none!important}main{padding:0;max-width:none}.layout{display:block}.playcard{border:0;background:white}#stage{width:100%;height:90vh;aspect-ratio:auto;background:white}#world{color:black!important;--paper:white!important}#world .colourfill{fill:white!important}#world .skyfill{fill:white!important}#world .nightstar,#world .raindrop{display:none}.printtitle{display:block!important}}
.streetstory{margin-top:28px;display:grid;grid-template-columns:1fr 1fr;gap:45px;padding:28px}.streetstory h2{font:30px/1.2 Georgia,serif;margin:15px 0}.streetstory p{font-size:12px;color:var(--muted)}.streetstory h3{font-size:17px;font-weight:600}.streetstory ol{font-size:12px;color:var(--muted);padding-left:20px;min-height:110px}.streetstory li{margin-bottom:8px}#streetStatus{color:var(--accent);font-size:13px;font-weight:650}#streetChoices{display:grid;gap:7px}#streetChoices button{text-align:left;font-size:12px;display:flex;justify-content:space-between;gap:12px}#streetChoices button small{color:var(--muted);font-weight:400;white-space:nowrap}@media(max-width:700px){.streetstory{grid-template-columns:1fr;gap:18px;padding:20px}.streetstory h2{font-size:26px}}@media print{.streetstory{display:none!important}}
@media(max-width:700px){#win{padding:16px;gap:5px}#win>span{font-size:36px;line-height:1}#win h2{font-size:27px;max-width:250px;margin:0}#win p{font-size:12px;line-height:1.4;margin:5px 0;max-width:245px}#win button{font-size:12px;margin-top:5px;min-height:44px;padding:9px 12px}}
@media print{#world path,#world line{stroke:#222!important;stroke-width:.9px!important}#world path:not([fill="none"]),#world rect,#world circle,#world ellipse{fill:white!important;stroke:#222!important;stroke-width:.9px!important}#world .skyfill{stroke:none!important}#world text{fill:#111!important}#world [data-light] circle{display:none!important}}
/* v0.2.1: prevent the street grid's intrinsic button/file widths escaping320px. */
.streetstory{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.streetstory>div,#streetChoices,#streetChoices button,#streetChoices button span{min-width:0}.streetstory input[type=file]{max-width:100%;min-width:0;width:100%}#streetChoices button span{overflow-wrap:anywhere}#streetChoices button small{white-space:normal;flex-shrink:0;max-width:76px}.streetstory h2,.streetstory h3{overflow-wrap:anywhere}@media(max-width:700px){.streetstory{grid-template-columns:minmax(0,1fr)}}
#questChoice{position:absolute;inset:0;z-index:3;background:#101b2af5;color:#f8f1e4;padding:25px;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;gap:10px}#questChoice h2{font:italic 31px Georgia,serif;margin:4px 0}#questChoice p{font-size:12px;max-width:310px;margin:0;color:#bdcbd7}#questOptions{display:grid;gap:9px;width:min(100%,330px)}#questOptions button{background:#1d3442;color:#f8f1e4;border-color:#4d6f7a;font-size:12px;text-align:left}#questChoice .eyebrow{font-size:9px}@media(max-width:700px){#questChoice{padding:14px;gap:7px}#questChoice h2{font-size:24px}#questChoice p{font-size:11px;line-height:1.35}#questOptions{gap:6px}#questOptions button{font-size:11px;padding:7px 9px;min-height:44px}}@media print{#questChoice{display:none!important}}

.travelpanel{margin:28px 0}.travelpanel form{display:flex;align-items:end;flex-wrap:wrap;gap:12px}.travelpanel .field{flex:1 1 210px;min-width:0}.travelpanel input{max-width:100%;box-sizing:border-box}.travelpanel button{min-height:44px;max-width:100%;white-space:normal}.travelpanel details{margin-top:16px;font-size:13px;line-height:1.6}.travelpanel a{color:var(--teal,#61ddd1)}#visitChoices button{margin:4px}#travelStatus,#visitOutcome{overflow-wrap:anywhere}

#visitChoices,#visitOutcome{margin:12px 18px}#visitChoices p{font-size:13px;line-height:1.6}#visitChoices button{min-height:44px;max-width:100%;white-space:normal}#visitChoices[hidden]{display:none}#travelReturnTop[hidden]{display:none}

#visitCredit{font-size:13px;line-height:1.65;padding:12px 18px;margin:0;overflow-wrap:anywhere;border-top:1px solid var(--line,#334155)}#visitCredit a{color:inherit;text-decoration:underline;text-underline-offset:2px}#visitCredit[hidden]{display:none}

#nameAudioPanel{margin-top:18px;border:1px solid var(--line,#334155);padding:12px;min-width:0;border-radius:12px}#nameAudioPanel p{font-size:12px;line-height:1.6;overflow-wrap:anywhere}#nameAudioPanel button{display:block;width:100%;min-height:44px;margin:8px 0;white-space:normal}#nameAudioPanel select{max-width:100%}
