
:root{--night:#091629;--navy:#15273e;--navy2:#243d56;--gold:#dcb66d;--goldlight:#f0dba7;--paper:#f7ebcf;--paper2:#f2dfb6;--ink:#493c31;--muted:#74644c;--border:#d8b679;--teal:#446d6b;--shadow:0 12px 42px #0008}
*{box-sizing:border-box}html{height:100%;scroll-behavior:smooth}body{min-height:100%;margin:0;background:radial-gradient(ellipse at 30% 10%,#1c3555 0%,transparent 55%),radial-gradient(ellipse at 90% 96%,#3b2c46 0%,transparent 55%),var(--night);color:var(--ink);font-family:Georgia,'Times New Roman',serif;overflow-x:hidden}body:before{content:'✦   ·   ✧   ·   ✦   ·   ✧   ·   ✦';display:block;position:fixed;top:5px;left:0;right:0;text-align:center;color:#b7a77b50;letter-spacing:1.6em;pointer-events:none;font-size:16px}
button,input,select,textarea{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #6d83a5;outline-offset:2px}
#root{max-width:600px;margin:auto;padding:12px 12px max(14px,env(safe-area-inset-bottom))}.shell{border:2px solid #ba965a;border-radius:23px;overflow:hidden;box-shadow:0 0 0 3px #12283c,0 0 0 4px #755f41,var(--shadow);background:var(--paper);height:calc(100svh - 28px);min-height:480px;display:flex;flex-direction:column;position:relative}
.brand{color:var(--goldlight);background:linear-gradient(140deg,#101f33 0%,#182d49 55%,#0d192d 100%);padding:17px 15px 13px;flex-shrink:0;position:relative;border-bottom:1px solid #b58b4e}.brand:after{content:'✦     ✧     ✦';position:absolute;top:6px;right:11px;color:#f9deb24f;font-size:11px;letter-spacing:5px}.brand h1{font-size:27px;font-weight:400;margin:0;letter-spacing:.02em;line-height:1.05;text-shadow:0 1px 12px #daba5b44}.brand small{font-size:12px;color:#d4c29c;letter-spacing:.06em}.brand .meta{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:10px;color:#f1d9a3;font-size:12px}.meta .separator{color:#9c8458}.brand .toprow{display:flex;justify-content:space-between;align-items:center;gap:8px}.iconbtn{border:1px solid #be9b65;border-radius:99px;min-height:35px;min-width:35px;background:#263a4e;color:#f5db9f;display:grid;place-items:center}.playarea{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0;background:linear-gradient(170deg,#f7edce,#f3dfb7);position:relative}.inset{padding:16px}.paper-title{font-size:29px;color:#3d3640;font-weight:400;text-align:center;margin:3px 0 7px}.flourish{text-align:center;color:#aa8751;letter-spacing:9px;font-size:16px;margin:5px 0 10px}.eyebrow{font:700 10px/1.5 system-ui,sans-serif;text-transform:uppercase;letter-spacing:.15em;color:#927246;margin:0 0 7px}.bodycopy{line-height:1.55;font-size:16px;margin:9px 0 15px}.muted{color:var(--muted)}.caption{font-size:12px;line-height:1.4;color:#796346}.tip{font-size:13px;background:#ebd8af;border-left:3px solid #ac8652;padding:10px 11px;border-radius:2px 8px 8px 2px;line-height:1.45;margin:10px 0}.divider{border:0;border-top:1px solid #d7b988;margin:16px 0}.hero{height:205px;background:linear-gradient(0deg,#132a48 0%,#0c1b2700 68%),none center 50%/cover;position:relative;border-bottom:2px solid #b58f53}.hero .stamp{position:absolute;bottom:12px;left:12px;background:#18263cd9;padding:7px 10px;border:1px solid #d8b46b;color:#f8e1ac;border-radius:8px;font-size:12px}.hero-short{height:172px}.portrait-strip{height:176px;background:linear-gradient(0deg,#101c2b55,#101c2b00),none center 27%/cover;border:1px solid #be985f;border-radius:11px;margin-bottom:14px}.card{background:#fff8e9a6;border:1px solid #dfc391;border-radius:11px;padding:13px;box-shadow:0 1px 3px #5741220c}.card+.card{margin-top:10px}.section-title{font-size:19px;line-height:1.3;display:flex;align-items:center;gap:9px;margin:0 0 11px;color:#514025}.section-title small{margin-left:auto;font-size:12px;font-weight:400}.actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:13px 0}.action{background:linear-gradient(140deg,#fff9e9,#e9d2a7);border:1px solid #d6b580;color:#514028;min-height:68px;border-radius:12px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;padding:9px 4px;font-size:13px;box-shadow:0 2px 1px #ac8a5330}.action .ico{font-size:23px;line-height:1}.action.wide{grid-column:span 2}.action:active,.smallbtn:active{transform:scale(.985)}.smallbtn{display:inline-flex;gap:6px;align-items:center;justify-content:center;background:#223c55;color:#f8e1a8;border:1px solid #b7995c;border-radius:999px;padding:10px 15px;font-size:13px}.smallbtn.ghost{background:#f4e5c5;color:#584228}.btnrow{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.listrow{width:100%;text-align:left;display:flex;align-items:center;justify-content:space-between;padding:12px 2px;border:0;border-bottom:1px solid #ddc698;background:transparent;color:var(--ink);gap:7px}.listrow:last-child{border-bottom:0}.listrow strong{font-size:15px;font-weight:500}.listrow .sub{display:block;font-size:12px;margin-top:3px;color:var(--muted);line-height:1.4}.listrow .arrow{font-size:22px;color:#987243}.avatar{height:37px;width:37px;flex:0 0 37px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(130deg,#d6b989,#f7e7c7);border:1px solid #af8d53;font-size:20px}.nav{position:sticky;bottom:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:linear-gradient(155deg,#102039,#182d45);border-top:2px solid #b58d52;padding:9px 0 max(9px,env(safe-area-inset-bottom));flex-shrink:0;z-index:5}.nav button{border:none;background:transparent;color:#ceb786;display:flex;align-items:center;flex-direction:column;font-size:11px;gap:3px;min-height:48px}.nav button.active{color:#ffe6ac;text-shadow:0 0 10px #ffce68a3}.nav .ico{font-size:23px}.pill{font-family:system-ui,sans-serif;letter-spacing:.03em;font-size:10px;color:#685532;background:#ecd7ac;border:1px solid #d4b67c;padding:3px 7px;border-radius:999px;white-space:nowrap}.status{display:inline-flex;align-items:center;gap:6px;font:11px system-ui,sans-serif;color:#927646}.form-grid{display:grid;gap:11px}.form-grid label{display:block;font-size:13px;color:#665139;font-weight:600}.form-grid input,.form-grid select,.form-grid textarea,.editor{display:block;width:100%;border-radius:8px;border:1px solid #bc9d6a;background:#fff9e9;padding:11px 10px;margin-top:5px;color:#423529;font-size:15px}.form-grid textarea,.editor{min-height:86px;resize:vertical;line-height:1.45}.form-grid input::placeholder,.form-grid textarea::placeholder{color:#9b8d76}.cta{width:100%;padding:14px 10px;border:1px solid #d9b46a;border-radius:10px;color:#ffe6af;background:linear-gradient(150deg,#304f68,#152a42);font-size:16px;box-shadow:0 3px 0 #896738}.cta:active{box-shadow:none;transform:translateY(2px)}.tagline{color:#f7dda7;letter-spacing:.12em;font-size:11px;text-transform:uppercase}.sheet-backdrop{position:fixed;inset:0;background:#06101bcc;z-index:10;display:flex;align-items:flex-end;justify-content:center;padding:14px 12px max(15px,env(safe-area-inset-bottom))}.sheet{width:100%;max-width:550px;max-height:86svh;overflow:auto;background:linear-gradient(#fff0ce,#f2dfb7);border:2px solid #bc9554;outline:2px solid #152943;border-radius:19px 19px 13px 13px;padding:18px;box-shadow:0 15px 60px #000a}.sheet h2{font-weight:400;margin:0 0 9px;font-size:25px}.sheet p{font-size:15px;line-height:1.55}.sheet .close{float:right;background:#21364b;color:#ffe0a4;border:1px solid #bd9756;border-radius:50%;width:32px;height:32px;font-size:19px}.map{position:relative;margin:12px 0 16px;height:395px;border-radius:12px;overflow:hidden;border:2px solid #b99453;background: radial-gradient(ellipse at 20% 18%,#a2ba8c 0%,#dce0b3 22%,transparent 40%),radial-gradient(ellipse at 90% 77%,#a3bd93 0%,#dbe5bd 20%,transparent 44%),linear-gradient(150deg,#f0dfab,#ddd6a3 60%,#e9e0b8)}.map:before{content:'';position:absolute;left:-30px;top:155px;width:120%;height:66px;background:#8dbece9c;border:10px solid #c4e1d2a8;transform:rotate(-20deg);border-radius:48% 45%;filter:blur(1px)}.map:after{content:'✦   ✧    ✦    ✧   ✦';position:absolute;left:7%;top:4%;right:0;color:#647e5680;letter-spacing:30px;pointer-events:none}.map .road{position:absolute;height:3px;background:#ac8b5a;border-top:1px dashed #fbeac0;transform-origin:left;opacity:.82}.map-loc{position:absolute;transform:translate(-50%,-50%);z-index:2;background:#fff7e9f0;border:1px solid #9a805c;border-radius:11px;color:#483921;padding:7px 8px;font-size:12px;max-width:110px;min-width:78px;box-shadow:0 2px 5px #54341f30}.map-loc strong{display:block;font-weight:500}.map-loc.unknown{border-style:dashed;filter:saturate(.45);background:#f7edddde}.map-loc .mi{font-size:22px}.map-compass{position:absolute;bottom:12px;left:12px;color:#654d2b;font-size:28px;z-index:2}.twocol{display:grid;grid-template-columns:1fr 1fr;gap:8px}.tile{background:#fff8e9a8;border:1px solid #d8b57f;border-radius:9px;padding:12px}.tile strong{font-size:15px}.tile .sub{font-size:12px;color:#7b6650;margin-top:4px}.meter{height:8px;border-radius:99px;background:#ddc9a6;overflow:hidden;margin:5px 0}.meter>div{height:100%;background:linear-gradient(90deg,#568284,#8da5a0)}.log{border-left:2px solid #bc9154;padding:2px 0 10px 12px;margin-left:7px;line-height:1.4}.log strong{font-size:13px}.log small{display:block;color:#97754f;margin:4px 0;font-size:11px}.log p{font-size:13px;margin:5px 0}.empty{color:#827054;font-style:italic;font-size:14px}.sectionhead{margin:16px 0 6px;font-size:21px;font-weight:400}.locked{opacity:.55}.formnote{font-size:12px;line-height:1.4;color:#745c41}.saveindicator{color:#ccaf7c}.notice{margin-top:11px;font-size:13px;line-height:1.4;padding:11px;border-radius:8px;border:1px dashed #b99453;background:#f6e8c6}.ending{margin:22px 0 12px;text-align:center;color:#ad8955;font-size:15px;letter-spacing:.2em}.news{background:#fcf1d3;border:1px solid #b59761;padding:14px;border-radius:7px;margin-bottom:10px}.news .name{font-variant:small-caps;letter-spacing:.1em;color:#7d6037}.news h3{margin:8px 0 7px;font-size:19px;font-weight:400}.news p{font-size:14px;line-height:1.5;margin:0}.kbd{display:inline-block;background:#fff6e3;border:1px solid #d6bb8b;padding:2px 5px;border-radius:3px;font:11px system-ui}
@media(min-width:700px){#root{padding:24px 0}.shell{height:calc(100svh - 48px);min-height:690px;max-height:960px}.nav{position:sticky}.inset{padding:20px 21px}.hero{height:240px}.brand{padding:20px}.map{height:440px}}@media(max-width:380px){.brand h1{font-size:23px}.map{height:350px}.actions{gap:5px}.inset{padding:14px}.action{font-size:12px}}
.nav{grid-template-columns:repeat(5,minmax(0,1fr))}.nav button{min-width:0}.map-loc{min-width:65px;max-width:92px;font-size:11px}.quest-status{line-height:1.5;margin:8px 0}.skill-list{scroll-margin-top:15px}
@media(min-width:1000px){#root{max-width:960px}.shell{min-height:0}.playarea>.hero{height:290px}.actions{grid-template-columns:repeat(4,minmax(0,1fr))}.map{height:510px}.sheet-backdrop{align-items:center}}
@media(max-width:380px){.map-loc{max-width:76px;padding:6px 3px;font-size:10px}.nav button{font-size:10px}}
.playarea{overflow:hidden;display:flex;min-height:0}.scene-body{flex:1;min-width:0;overflow-y:auto;overscroll-behavior:contain}.scene-travel{display:flex;gap:7px;overflow-x:auto;padding:4px 0 12px;margin:0 0 6px;scrollbar-width:thin}.scene-travel button{flex-shrink:0;min-height:44px;font-size:12px;padding:8px 12px}.interaction{margin:8px 0 16px;border-color:#b99453}.interaction p{font-size:15px;line-height:1.55;margin-top:8px}.interaction .smallbtn{min-height:44px}.bag-toggle{margin-left:auto;white-space:nowrap;padding:8px 10px;min-height:38px}.brand .toprow{flex-wrap:wrap}.brand .toprow>div{flex:1;min-width:0}.inventory-panel{position:absolute;inset:0;background:linear-gradient(155deg,#f7ebcf,#f2dfb6);border-top:2px solid #b99453;z-index:6;overflow-y:auto;padding:14px;overscroll-behavior:contain;box-shadow:0 -5px 20px #1a223333}.bag-heading{display:flex;align-items:start;justify-content:space-between;gap:8px}.bag-heading h2{font-size:21px;font-weight:400;margin:3px 0 8px}.bag-heading .smallbtn{min-width:44px;min-height:44px;padding:8px}.bag-coins{margin:0 0 12px;color:#6d512c}.bag-filters{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:12px}.bag-filters button{border:1px solid #bca073;background:#f8edcf;color:#59462b;border-radius:99px;padding:7px 10px;min-height:44px;font-size:12px}.bag-filters button[aria-pressed="true"]{background:#223c55;color:#ffe6af}.item-detail{padding:12px;border:1px solid #c2a06b;background:#fff8e5;border-radius:10px;margin-bottom:12px}.item-detail h3{font-size:18px;line-height:1.4;margin:0 0 7px}.item-detail p{font-size:14px;line-height:1.5;margin:7px 0}.item-detail .btnrow{margin-top:12px}.item-detail .smallbtn{min-height:44px}.item-tags{display:flex;gap:4px;flex-wrap:wrap}.document-text{white-space:pre-line;font-size:14px;line-height:1.65;border-top:1px solid #d4b67c;margin-top:12px;padding-top:12px}.item-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.item-tile{border:1px solid #c5a570;border-radius:10px;background:#fff7e3;color:#493c31;padding:10px;display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;min-height:105px;overflow-wrap:anywhere;font-size:13px}.item-tile.selected{outline:2px solid #446d6b;outline-offset:-2px;background:#e9ead4}.item-icon{font-size:28px}.item-tile strong{font:12px system-ui}.flow-feedback{position:absolute;bottom:84px;left:12px;right:12px;z-index:8;pointer-events:none;background:#20394ff2;color:#fff0c7;border:1px solid #c5a365;border-radius:10px;padding:10px 13px;font-size:13px;line-height:1.45;box-shadow:0 4px 15px #0003;max-height:130px;overflow:hidden}.inventory-panel~.flow-feedback{z-index:8}
@media(min-width:1100px){#root{max-width:1260px;padding-left:16px;padding-right:16px}.inventory-panel{position:static;inset:auto;flex:0 0 325px;border-top:0;border-left:1px solid #b99453;box-shadow:none}.playarea.with-inventory>.scene-body{flex:1}.flow-feedback{right:350px}.brand h1{font-size:29px}}
@media(max-width:380px){.brand h1{font-size:21px}.bag-toggle{font-size:12px;padding:8px}.bag-toggle span{display:none}.inventory-panel{inset:0}.item-detail h3{font-size:17px}}

.inventory-panel>.bag-heading{position:sticky;top:-14px;background:#f7ebcf;z-index:2;padding:4px 0}

/* Responsive navigation and a single focused section; game and map data unchanged. */
.map[hidden],.quick-travel-list[hidden]{display:none}
.map-view-switch{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:14px 0}.map-view-switch button{min-height:44px}
.inventory-panel{width:100%}.playarea.with-inventory>.scene-body{overflow-y:hidden}.scene-body>.inset{max-width:900px;margin-inline:auto}.scene-body>.hero{height:230px}
@media(min-width:900px){
 #root{max-width:1080px;padding:20px 16px}.shell{height:calc(100svh - 40px);min-height:0;max-height:none}
 .brand{order:0;padding:17px 22px}.nav{order:1;position:static;border-top:0;border-bottom:1px solid #b58d52;display:flex;justify-content:center;gap:18px;padding:4px 14px}
 .nav button{flex:0 1 140px;flex-direction:row;justify-content:center;font-size:14px;gap:8px;min-height:47px;border-bottom:2px solid transparent}.nav button.active{border-bottom-color:#dcb66d}.nav .ico{font-size:18px}
 .playarea{order:2}.inventory-panel{position:absolute;inset:0 0 0 auto;width:min(420px,100%);flex:none;border-top:0;border-left:1px solid #b99453;box-shadow:-12px 0 30px #18283b38}
 .flow-feedback{bottom:14px;right:12px}.map{max-width:850px;height:clamp(360px,60svh,570px);margin-inline:auto}.scene-body>.hero{height:250px}.inset{padding:20px 26px}
}
@media(max-width:600px){.bag-toggle span{display:none}.brand h1{font-size:24px}}
.flow-feedback{position:relative;inset:auto;flex:none;z-index:7;pointer-events:none;margin:0;border:0;border-bottom:1px solid #b99453;border-radius:0;padding:9px 16px;background:linear-gradient(120deg,#f7ebcf,#ecd8b0);color:#514025;font-size:13px;line-height:1.45;box-shadow:none;max-height:none;overflow:visible;overflow-wrap:anywhere}@media(min-width:900px){.flow-feedback{order:2}.playarea{order:3}}
/* Compact controls retain readable type, icons and touch targets. */
.flow-feedback{text-align:center;font-size:14px;font-weight:600;border-bottom:2px solid #b99453;background:linear-gradient(110deg,#f7ebcf,#f0dba7,#f7ebcf)}
.actions{gap:6px}.action{min-height:52px;padding:6px 7px;gap:4px;font-size:13px}.action .ico{font-size:20px}
.smallbtn{padding:7px 11px;font-size:13px}.listrow{padding:9px 2px}.tile{padding:9px}.item-tile{min-height:88px;padding:8px;gap:4px}.item-icon{font-size:25px}.cta{padding:11px 10px}
@media(min-width:900px){.actions{grid-template-columns:repeat(auto-fit,minmax(130px,170px));justify-content:center}.action{min-height:50px}.nav button{min-height:44px}.map-view-switch button,.interaction .smallbtn,.item-detail .smallbtn{min-height:38px}.bag-filters button{min-height:36px;padding:6px 9px}}
@media(pointer:coarse){.smallbtn,.action,.bag-filters button,.item-detail .smallbtn,.interaction .smallbtn,.map-view-switch button{min-height:44px}}
/* Fit more scene actions per row without squeezing labels or touch targets. */
.actions{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}.action{flex:0 1 104px;width:104px;min-width:82px;padding:6px 5px;overflow-wrap:anywhere}.action.wide{flex-basis:118px;width:118px}
@media(min-width:900px){.actions{justify-content:center}.action{flex-basis:108px;width:108px;min-height:50px}}
@media(max-width:380px){.action{flex-basis:82px;width:82px;font-size:12px}}
/* Display the whole authored world map without cropping or decorative overlays. */
.map.world-map{height:auto;min-height:0;background:#13243b}.world-map:before,.world-map:after{display:none}.world-map>img{display:block;width:100%;height:auto}
.map-view-switch{gap:6px;margin:10px 0}.map-view-switch .smallbtn{min-height:32px;padding:5px 10px;font-size:12px}
.map-hint{text-align:center;font-size:12px;color:var(--muted);margin:4px 0}
.country-hit{position:absolute;transform:translate(-50%,-50%);height:5%;min-height:24px;min-width:24px;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;z-index:3;padding:0}
.country-hit:hover,.country-hit:focus-visible,.country-hit[aria-pressed="true"]{border-color:#ffe4a0;background:#f7dda32b;outline:2px solid #182d4599;outline-offset:1px}
.world-map .map-loc{width:16px;height:16px;min-width:16px;max-width:16px;min-height:16px;padding:0;border-radius:50%;border:2px solid #fff0b8;background:#263f55;z-index:4;box-shadow:0 1px 4px #0008}
.map-marker-label{display:none;position:absolute;left:50%;bottom:100%;transform:translateX(-50%);padding:4px 7px;border-radius:5px;background:#182d45;color:#ffe4a0;white-space:nowrap;font-size:11px;pointer-events:none}
.map-loc:hover .map-marker-label,.map-loc:focus-visible .map-marker-label{display:block}.country-panel h3{margin:0 0 5px;font-size:17px;font-weight:400}.country-panel p{margin:0;font-size:13px}
@media(pointer:coarse){.world-map .map-loc{width:24px;height:24px;min-width:24px;max-width:24px}.map-view-switch .smallbtn{min-height:36px}}
.history-changes{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}.book-chapter{margin:12px 0}details>summary{cursor:pointer;min-height:44px;padding:8px 0}button:disabled{cursor:default;opacity:.55}

.hero{background:#13243b}.map:before,.map:after{display:none}details>summary{cursor:pointer;min-height:44px;padding:8px 0}.document-text{white-space:pre-wrap}.empty{padding-block:18px}.flow-feedback{overflow-wrap:anywhere}
/* Keep the established responsive navigation positions. */
@media(max-width:899px){.brand{order:0}.flow-feedback{order:1}.playarea{order:2}.nav{order:3;position:relative}}
.npc-portrait{display:block;width:120px;max-width:100%;height:auto;border:1px solid #b99453;border-radius:10px;margin:10px auto}
/* Compact illustrated controls: labels stay visible beside their icons. */
.actions{gap:5px;justify-content:flex-start}
.actions .action{flex:0 1 auto;width:auto;min-width:0;min-height:34px;max-width:100%;padding:6px 9px;border-radius:8px;flex-direction:row;gap:6px;font-size:12px;line-height:1.3;text-align:left}
.actions .action .ico{font-size:16px;flex:none;line-height:1}.actions .action>span:last-child{overflow-wrap:anywhere}
.smallbtn{font-size:12px;padding:6px 10px}.listrow{justify-content:flex-start;gap:7px;font-size:13px}.listrow .ico{font-size:16px;flex:none}
@media(pointer:coarse){.actions .action{min-height:44px}.smallbtn{min-height:44px}}
.activity-panel{margin:18px 0}.activity-panel h3{font-weight:400;margin:0 0 8px;font-size:21px}.activity-panel h4{margin:0 0 10px;font-weight:400;font-size:17px}.garden-beds,.market-forms{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:12px;margin-top:12px}.garden-bed,.recipe{background:#fff9e7;border:1px solid var(--border);border-radius:8px;padding:12px;min-width:0}.garden-bed p,.recipe p{font-size:13px;line-height:1.5}.activity-panel select,.activity-panel input{width:100%;min-width:0;max-width:100%;min-height:44px}.activity-panel .smallbtn{min-height:44px}.activity-panel .form-grid{min-width:0}.quest-objectives{padding-left:20px;font-size:14px;line-height:1.7}.recipe+.recipe{margin-top:12px}.quest-state{display:inline-block;padding:3px 8px;border-radius:15px;background:#e5d5b2;font-size:12px}.activity-panel button{max-width:100%;white-space:normal}
/* Location above, reading/conversation in the roomy middle, choices and exits below. */
.explore-scene{display:flex;flex-direction:column;width:100%;min-height:100%;gap:16px}
.scene-location,.scene-controls{flex:none;min-width:0}
.scene-location .bodycopy{margin-bottom:0}
.scene-content{flex:1 0 auto;min-height:190px;min-width:0;padding:22px;background:#fff8e980;border:1px solid #d8b679;border-radius:10px;overflow-wrap:anywhere}
.scene-content:empty{background:transparent;border-color:transparent}
.scene-content .interaction{padding:0;margin:0;background:none;border:0;border-radius:0;box-shadow:none}
.scene-content .interaction .bodycopy,.scene-content .document-text,.scene-content .scene-feedback .bodycopy{font-size:17px;line-height:1.75;white-space:pre-wrap;max-width:72ch}
.scene-content .section-title{font-size:22px;font-weight:400;margin-bottom:16px}
.scene-content .actions{margin-top:24px}
.scene-controls{border-top:1px solid var(--border);padding-top:18px}
.scene-controls>.section-title{margin-top:10px}
.scene-feedback{position:static;padding:18px;margin:12px 16px;background:#fff8e980;border:1px solid var(--border);border-radius:10px;overflow-wrap:anywhere}
.scene-content .scene-feedback{padding:0;margin:0;background:none;border:0;border-radius:0}
.scene-content .interaction+.scene-feedback{margin-top:20px}
.document-reader .document-text{font-size:17px;line-height:1.75;overflow-wrap:anywhere;border-top:0;margin:0 0 24px;padding:0}
.document-reader>[data-ui="close-reading"]{min-height:44px}
@media(min-width:900px){.scene-content{min-height:240px;padding:26px 30px}}
@media(max-width:380px){.scene-content{padding:16px}.scene-content .section-title{font-size:21px}}
/* Inventory is a permanent Character section, sharing the page with profile and skills. */
.scene-body>.character-sheet{max-width:none;min-height:100%;display:flex;flex-direction:column}
.character-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;flex:1;align-items:start;margin-top:14px}
.character-profile{display:grid;gap:18px;min-width:0}
.character-profile>.card+.card{margin-top:0}
.character-profile .section-title,.character-inventory>.section-title{font-size:22px;font-weight:400}
.character-skill+.character-skill{margin-top:16px}
.character-skill{font-size:15px;overflow-wrap:anywhere}
.character-info h4{font-size:13px;color:var(--muted);margin:16px 0 5px}
.character-info p{font-size:17px;line-height:1.6;overflow-wrap:anywhere;margin:0 0 18px}
.character-info .character-bio{white-space:pre-wrap}
.character-info .smallbtn{min-height:44px}
.character-inventory{min-width:0;padding:20px;scroll-margin-top:16px}
.character-inventory .item-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,120px),1fr));gap:10px;margin:18px 0}
.character-inventory .item-tile{min-height:110px;font-size:14px;padding:12px;gap:8px}
.character-inventory .item-icon{font-size:30px}
.character-inventory .item-tile[aria-pressed="true"]{outline:2px solid var(--teal);outline-offset:-2px;background:#e9ead4}
.character-inventory .item-detail{margin:18px 0 0;padding:16px;overflow-wrap:anywhere}
.character-inventory .item-detail h4{font-size:19px;font-weight:400;margin:0 0 8px}
.character-inventory .item-detail p{font-size:15px}
.character-inventory .bag-filters button,.character-inventory .smallbtn{min-height:44px}
@media(min-width:900px){.character-layout{grid-template-columns:minmax(240px,.7fr) minmax(0,1.3fr)}.character-inventory{min-height:100%;padding:24px}}
@media(max-width:899px){.character-inventory{grid-row:1}.character-inventory .item-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,110px),1fr))}}

/* Approved open-book layout. Each page has its own purpose; the ticker stays above both. */
:root{--navy:#18364f;--navy2:#244b64;--gold:#c3994a;--goldlight:#efd08c;--paper:#f8e8c9;--paper2:#efdab0;--border:#d5b477;--teal:#417d80}
#root{max-width:1540px;padding:20px 22px 30px}
.book-shell{height:auto;min-height:calc(100svh - 50px);max-height:none;overflow:visible;border:1px solid var(--gold);border-radius:14px;outline:0;box-shadow:0 14px 35px #08142666;background:radial-gradient(ellipse at 10% 0%,#335e7455,transparent 60%),var(--navy);padding:18px 16px 22px;display:block}
.book-shell .brand{padding:0 12px 18px;border:0;background:none}
.book-shell .brand:after{display:none}
.book-shell .brand h1{font-size:30px;line-height:1.2;text-shadow:none}
.book-shell .brand .toprow{flex-wrap:nowrap;gap:18px}
.book-shell .brand .meta{margin:0 0 0 auto;justify-content:flex-end;text-align:right;flex:0 1 380px;font:12px/1.6 system-ui,sans-serif;color:var(--goldlight)}
.book-shell .brand .toprow>div:first-child{flex:1}
.book-shell .tagline{font:11px/1.5 system-ui,sans-serif;letter-spacing:.15em;margin-bottom:3px}
.book-shell .iconbtn{flex:none;min-width:40px;min-height:40px;background:var(--navy2);color:var(--goldlight)}
.book-shell .flow-feedback{position:static;inset:auto;display:block;margin:0 12px 18px;padding:9px 0;border:0;border-block:1px solid var(--gold);border-radius:0;background:none;color:var(--goldlight);font:12px/1.5 system-ui,sans-serif;text-align:left;box-shadow:none;overflow-wrap:anywhere}
.book-spread{position:relative;display:block;padding:0 0 0 94px;overflow:visible;background:none;min-height:0}
.book-ribbons{position:absolute;inset:34px auto auto 0;width:106px;display:grid;grid-template-columns:1fr;gap:13px;border:0;padding:0;background:none;z-index:3}
.book-ribbons button{min-width:0;width:100%;min-height:46px;display:flex;flex-direction:row;justify-content:flex-start;gap:7px;padding:10px 17px 10px 10px;background:linear-gradient(110deg,#d4a54855,transparent 65%),var(--goldlight);color:var(--navy);border:0;clip-path:polygon(0 0,100% 0,91% 50%,100% 100%,0 100%,5% 50%);font:13px system-ui,sans-serif;text-shadow:none;overflow-wrap:anywhere}
.book-ribbons button.active{background:var(--paper);color:var(--ink);transform:translateX(5px);border:0;text-shadow:none}
.book-ribbons .ico{font-size:17px}
.book-pages{display:grid;grid-template-columns:minmax(0,46%) minmax(0,1fr);min-height:740px;background:radial-gradient(ellipse at 12% 4%,#e5c27b40,transparent 42%),radial-gradient(ellipse at 96% 100%,#66a7a020,transparent 42%),var(--paper);border-radius:3px 10px 10px 3px;box-shadow:4px 4px 0 var(--border),7px 7px 0 var(--paper),9px 9px 0 var(--gold)}
.book-page{min-width:0;padding:26px;display:flex;flex-direction:column;overflow:visible}
.book-left{border-right:1px solid var(--border);background:linear-gradient(90deg,transparent 92%,#0a152b33)}
.book-right.scene-content{margin:0;border:0;border-radius:0;padding:26px 26px 26px 30px;background:linear-gradient(90deg,#0a152b33,transparent 7%);min-height:600px;flex:initial}
.book-page>.inset{padding:0;margin:0;max-width:none;width:100%}
.book-page .paper-title{text-align:left;font-size:26px;line-height:1.25;margin:3px 0 16px;color:var(--ink)}
.book-page .flourish{display:none}
.book-page .eyebrow{font:11px/1.5 system-ui,sans-serif;letter-spacing:.12em;color:#866733}
.book-page .caption{font:12px/1.6 system-ui,sans-serif;color:var(--muted)}
.book-page-foot{margin-top:auto;padding-top:24px;display:flex;justify-content:flex-end;font:11px system-ui,sans-serif;color:var(--muted)}
.book-page .smallbtn{border-radius:5px;min-height:38px;font:12px/1.4 system-ui,sans-serif;background:var(--navy);color:var(--goldlight);border-color:var(--gold);padding:8px 10px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.book-page .smallbtn.ghost{background:#fff4dc;color:var(--ink);border-color:var(--border)}
.book-page button:disabled{opacity:.5;cursor:default}
.book-page .actions{justify-content:flex-start;gap:7px}
.book-page .action{flex:0 1 auto;min-width:0;width:auto;max-width:100%;min-height:38px;padding:8px 10px;flex-direction:row;border-radius:5px;font:12px/1.4 system-ui,sans-serif;gap:6px;background:#fff4dc;box-shadow:0 1px 2px #493c3122}
.book-page .action .ico{font-size:17px}
.book-page .section-title{font-size:20px;font-weight:400}
.book-page .bodycopy{font-size:16px;line-height:1.65;overflow-wrap:anywhere}
.book-page .card{padding:15px;background:#fff4dc99;border:1px solid var(--border);border-radius:5px;box-shadow:none}
.book-page .explore-scene{min-height:0;gap:22px}
.book-page .scene-location .bodycopy{margin-bottom:0}
.book-page .scene-controls{margin-top:12px;padding-top:18px}
.book-page .scene-controls .section-title{font-size:20px}
.book-page .scene-controls .tip{font:13px/1.6 Georgia,serif;background:none;border:0;padding:0;margin:15px 0}
.book-page .scene-controls>.actions{margin-bottom:22px}
.book-page .market-forms,.book-page .garden-beds{grid-template-columns:1fr}
.book-page .character-layout{grid-template-columns:1fr;gap:22px}
.book-page .character-inventory{grid-row:auto;padding:16px;min-height:0}
.character-portrait-heading{display:flex;gap:14px;align-items:center;margin-bottom:20px}
.character-portrait-heading .section-title{margin:0}
.portrait-frame{width:62px;height:78px;flex:0 0 62px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:radial-gradient(ellipse at 10% 15%,#477b8f77,transparent 85%),var(--navy);color:var(--goldlight);border:1px solid var(--gold);border-radius:18px 18px 4px 4px;box-shadow:inset 0 0 0 4px var(--navy),inset 0 0 0 5px var(--gold);overflow:hidden}
.portrait-symbol{font-size:26px;line-height:1.2}
.portrait-caption{font:11px system-ui,sans-serif}
.portrait-frame img{display:block;width:100%;height:100%;object-fit:cover}
.chat-heading{padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid var(--border)}
.chat-heading .paper-title{font-size:26px;margin-bottom:14px}
.chat-channels{gap:8px}
.conversation-thread{flex:1;display:flex;flex-direction:column;gap:22px;min-width:0;padding:4px 0 26px}
.chat-message{display:flex;align-items:flex-start;gap:12px;max-width:95%;min-width:0}
.chat-message-body{min-width:0;flex:1}
.chat-author{font:12px/1.5 system-ui,sans-serif;color:var(--muted);margin:0 0 5px}
.chat-bubble{padding:14px 16px;border:1px solid var(--border);border-radius:2px 11px 11px 11px;background:linear-gradient(125deg,#e8cd9740,transparent 75%),#fff4dc;overflow-wrap:anywhere}
.book-right .chat-bubble .bodycopy{font-size:16px;line-height:1.65;margin:0;white-space:pre-wrap;max-width:none}
.book-right .interaction{padding:0;margin:0;background:none;border:0;box-shadow:none}
.book-right .interaction .notice{font-size:13px;margin-bottom:0}
.player-message{flex-direction:row-reverse;align-self:flex-end}
.player-message .chat-author{text-align:right}
.player-message .chat-bubble{background:radial-gradient(ellipse at 10% 15%,#477b8f77,transparent 85%),var(--navy);color:var(--goldlight);border-color:var(--navy);border-radius:11px 2px 11px 11px}
.book-right .scene-feedback{position:static;margin:0;padding:18px;border:1px solid var(--border);border-radius:5px;background:#fff4dc}
.book-right .scene-feedback .bodycopy{font-size:16px;line-height:1.7;white-space:pre-wrap;margin:0}
.book-right .scene-feedback .section-title{margin-bottom:12px}
.chat-reply-area{border-top:1px solid var(--border);padding-top:18px}
.chat-reply-area .actions{margin:12px 0 0}
.chat-empty{padding:18px 0;max-width:42ch}
.chat-unavailable{padding:18px 0}
.chat-compose-label{display:block;font:12px/1.5 system-ui,sans-serif;margin:22px 0 12px}
.chat-compose-label textarea{display:block;width:100%;margin-top:7px;min-height:90px;padding:12px;border:1px solid var(--border);border-radius:5px;background:#fff4dc;font:16px/1.5 Georgia,serif;resize:vertical}
.book-right .document-reader{padding:5px 0}
.book-right .document-reader .document-text{font-size:17px;line-height:1.8;white-space:pre-wrap;padding:0;margin:0 0 24px;border:0;max-width:none}
.atlas-section{container-type:inline-size}
.book-page .map-view-switch{justify-content:flex-start;margin:0 0 16px}
.atlas-crumbs{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-bottom:12px;font:12px/1.5 system-ui,sans-serif}
.atlas-crumbs button{padding:5px 0;border:0;border-bottom:1px solid var(--gold);background:none;color:var(--ink)}
.atlas-crumbs [aria-current="location"]{font-weight:600}
.atlas-zoom{margin-bottom:15px}
.atlas-map.world-map{position:relative;isolation:isolate;width:100%;max-width:none;height:auto;min-height:440px;aspect-ratio:1/1.35;overflow:hidden;border:1px solid var(--border);border-radius:5px;background:#afc9bc;margin:0 0 15px}
.atlas-map:before,.atlas-map:after{display:none}
.atlas-map.world-map>.atlas-art{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:fill;display:block;pointer-events:none}
.atlas-map[data-map-level-view="country"] .atlas-art{width:210%;height:210%;left:calc(var(--region-x)*-1.1);top:calc(var(--region-y)*-1.1)}
.atlas-map[data-map-level-view="town"] .atlas-art{width:240%;height:240%;left:-11.2%;top:-16.8%}
.atlas-roads{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.atlas-roads path{stroke:#bb8c36;stroke-width:.6;fill:none;opacity:.85}
.atlas-roads .narrow-path{display:none}
.atlas-pin{position:absolute;left:var(--pin-x);top:var(--pin-y);transform:translate(-50%,-50%);display:grid;justify-items:center;gap:2px;width:92px;max-width:27%;min-height:38px;border:0;border-radius:4px;padding:4px 3px;background:#fff4dc;box-shadow:0 1px 5px #493c3144;color:var(--ink);font:11px/1.3 system-ui,sans-serif;overflow-wrap:anywhere;z-index:1}
.atlas-pin>span:first-child{font-size:15px}
.atlas-pin[aria-current="location"]{background:var(--navy);color:var(--goldlight);outline:2px solid var(--goldlight);outline-offset:2px}
.country-pin{width:76px;min-height:30px;font-size:11px}
.atlas-sea{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#343b38;font:italic 16px Georgia,serif;text-shadow:0 1px 2px #fff4dc99;pointer-events:none}
.atlas-map[data-map-level-view="country"] .atlas-sea{top:94%}
.atlas-map[data-map-level-view="town"] .atlas-sea{top:97%;left:67%;font-size:12px}
.atlas-detail{padding-top:15px;border-top:1px solid var(--border)}
.atlas-detail h3{font-size:21px;font-weight:400;margin:0 0 7px}
.atlas-detail .smallbtn{margin-top:7px}
@container(max-width:380px){.atlas-map.world-map{aspect-ratio:1/1.75;min-height:560px}.atlas-pin{left:var(--small-x);top:var(--small-y);width:83px}.atlas-roads .wide-path{display:none}.atlas-roads .narrow-path{display:block}}
@media(max-width:1100px) and (min-width:761px){#root{padding-inline:16px}.book-page{padding:22px 18px}.book-right.scene-content{padding:22px 18px 22px 24px}.portrait-frame{width:50px;height:64px;flex-basis:50px}.chat-message{max-width:100%;gap:9px}.chat-bubble{padding:12px}.book-right .chat-bubble .bodycopy{font-size:15px}.book-page .paper-title,.chat-heading .paper-title{font-size:24px}}
@media(max-width:760px){#root{padding:12px 10px 22px}.book-shell{padding:16px 10px 20px;min-height:0}.book-shell .brand{padding:0 5px 16px}.book-shell .brand .toprow{flex-wrap:wrap;gap:12px}.book-shell .brand .toprow>div:first-child{flex:1}.book-shell .brand h1{font-size:26px}.book-shell .brand .meta{flex:1 1 100%;order:3;justify-content:flex-start;text-align:left;font-size:11px;gap:5px 10px}.book-shell .iconbtn{min-width:38px;min-height:38px}.book-shell .flow-feedback{margin:0 5px 16px}.book-spread{padding-left:0}.book-ribbons{position:static;display:flex;flex-wrap:wrap;width:auto;gap:7px;margin-bottom:12px}.book-ribbons button{width:auto;min-height:44px;font-size:12px;padding:9px 15px 9px 9px;flex:none}.book-ribbons button.active{transform:none}.book-ribbons .ico{font-size:15px}.book-pages{grid-template-columns:1fr;min-height:0}.book-page{padding:22px 18px}.book-left{border:0;border-bottom:2px solid var(--border);background:none}.book-right.scene-content{padding:22px 18px;background:none;min-height:500px}.book-page .paper-title,.chat-heading .paper-title{font-size:25px}.portrait-frame{width:48px;height:62px;flex-basis:48px}.chat-message{max-width:100%;gap:9px}.chat-bubble{padding:12px}.book-right .chat-bubble .bodycopy{font-size:15px}.book-page .character-inventory{grid-row:1}.book-page .smallbtn,.book-page .action,.atlas-crumbs button{min-height:44px}.book-page .bodycopy{font-size:16px}.book-page-foot{padding-top:20px}}
@media(pointer:coarse){.book-page .smallbtn,.book-page .action,.atlas-pin,.atlas-crumbs button{min-height:44px}}
@media(prefers-reduced-motion:no-preference){.book-ribbons button,.atlas-pin{transition:background .16s,transform .16s}}

/* Keep the book steady while each page scrolls through its own content. */
.book-shell{height:calc(100svh - 50px);min-height:0;display:flex;flex-direction:column;overflow:hidden}
.book-shell .brand .meta{height:40px;align-content:center}
.ticker-slot{height:42px;flex:none;margin:0 12px 16px;overflow:hidden}
.ticker-slot .flow-feedback{height:100%;margin:0;padding:8px 0;overflow:auto;overscroll-behavior:contain}
.book-spread{flex:1;min-height:0;overflow:visible}
.book-ribbons{order:0}
.book-pages{height:100%;min-height:0;grid-template-rows:minmax(0,1fr)}
.book-page{min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--border) transparent;scrollbar-gutter:stable}
.book-page>*{flex-shrink:0}
.book-right.scene-content{min-height:0;max-height:100%}
.conversation-thread{flex:1 0 auto}
.conversation-thread>*{flex-shrink:0}
.travel-notice{font:13px/1.5 system-ui,sans-serif;border-style:solid;margin:0 0 16px}
@media(max-width:760px){
 #root{padding-bottom:12px}
 .book-shell{height:calc(100svh - 24px);min-height:580px}
 .book-shell .brand .meta{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:repeat(2,20px);gap:0 10px}
 .book-shell .brand .meta>span:first-child{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .book-shell .world-clock{grid-column:1/-1;white-space:nowrap}
 .ticker-slot{height:42px;margin:0 5px 12px}
 .book-spread{display:flex;flex-direction:column}
 .book-ribbons{flex:none}
 .book-pages{height:auto;flex:1;min-height:0;grid-template-rows:repeat(2,minmax(0,1fr))}
 .book-page{padding:18px 14px}
 .book-right.scene-content{min-height:0;padding:18px 14px}
}
@media(max-width:380px){
 .book-ribbons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .book-ribbons button{width:100%;padding:8px 7px 8px 5px;font-size:11px;gap:4px}
 .book-ribbons .ico{font-size:13px}
}
