:root{font-family:"Source Sans 3",system-ui,sans-serif;color:#efe7d4;background:#171915;color-scheme:dark;--paper:#e9e1cb;--muted:#bcb4a3;--gold:#cead73;--edge:#4c493e;--panel:#20221c;--ink:#151711;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:320px}button,input,select{font:inherit}button{background:#2b2e26;border:1px solid #535044;border-radius:3px;color:var(--paper);cursor:pointer;padding:.55rem .8rem}button:hover:not(:disabled){background:#424035;border-color:var(--gold)}button:disabled{opacity:.48;cursor:default}:focus-visible{outline:2px solid #e8c582;outline-offset:3px}button.primary{background:#d2b47d;color:#211c14;border-color:#d8bc88;font-weight:700}button.primary:hover:not(:disabled){background:#edcc95}button.quiet{background:transparent}label{display:grid;gap:.32rem;color:var(--muted);font-size:.9rem}input,select{display:block;width:100%;min-width:0;background:#171914;border:1px solid #555143;border-radius:3px;color:var(--paper);padding:.56rem .65rem}input::placeholder{color:#8b8679}p{margin:.55rem 0;line-height:1.48}h1,h2,h3{font-family:Cormorant Garamond,Georgia,serif;font-weight:500;line-height:1.13;margin:0 0 .65rem}h1{font-size:clamp(1.85rem,4vw,2.65rem)}h2{font-size:1.55rem}h3{font-size:1.15rem;color:var(--gold);margin-top:1rem}small{color:var(--muted);font-size:.78rem}.eyebrow,.chapter-label{display:inline-block;color:var(--gold);font-size:.68rem;font-weight:700;letter-spacing:.18em;margin-bottom:.43rem}.form-actions{display:flex;gap:.55rem;flex-wrap:wrap;margin-top:1rem}.error,.global-error{background:#472b28;color:#ffe4ce;border:1px solid #9b5f51;border-radius:3px;padding:.65rem .75rem}.global-error{position:fixed;left:50%;top:1rem;transform:translate(-50%);z-index:10;max-width:94vw}.landing{min-height:100dvh;display:grid;place-items:center;padding:2rem;background:radial-gradient(ellipse at 18% 10%,#41483b,transparent 47%),radial-gradient(ellipse at 100% 100%,#4b3b28,transparent 53%),#171a17}.landing-frame{width:min(53rem,100%);border:1px solid #72634b;background:#20221deb;display:grid;grid-template-columns:1fr 1fr;box-shadow:0 22px 80px #0e100c99}.landing-frame header{padding:3rem 2.2rem;background:linear-gradient(150deg,#343b32,#222921);border-right:1px solid #655842;display:flex;flex-direction:column;justify-content:center}.landing-frame header span{color:var(--gold);letter-spacing:.23em;font-size:.72rem}.landing-frame header h1{font-size:clamp(2.2rem,5vw,4rem);margin:.6rem 0 0}.landing-frame header p{color:var(--gold)}.landing-frame main{padding:2.1rem 1.85rem}.landing-frame label{margin:.65rem 0}.landing-frame footer{border-top:1px solid var(--edge);padding:.72rem 1.15rem;grid-column:1/-1;color:var(--muted);font-size:.81rem}.slots{display:grid;gap:.35rem}.slots div{display:flex;gap:.35rem}.slots div button:first-child{flex:1;text-align:left}.editor-shell{min-height:100dvh;background:radial-gradient(ellipse at 12% 31%,#3c4438,transparent 42%),#171915}.editor-top{display:flex;align-items:center;justify-content:space-between;padding:.85rem clamp(1rem,5vw,4rem);border-bottom:1px solid var(--edge);font-size:.7rem;letter-spacing:.13em;color:var(--gold)}.editor-layout{display:grid;grid-template-columns:minmax(12rem,.85fr) minmax(22rem,1.15fr);align-items:start;gap:clamp(1rem,5vw,4rem);width:min(68rem,100%);margin:auto;padding:clamp(1rem,5vw,3.5rem) 1.25rem}.portrait{position:relative;background:radial-gradient(ellipse at 47% 42%,#66715b,#31382d 56%,#22271e);border:1px solid #726a50;min-width:0}.preview{height:clamp(15rem,42vh,26rem)}.preview canvas,.world canvas{width:100%;height:100%;display:block;touch-action:none}.portrait-caption{background:#20251e;padding:1.05rem 1.25rem;border-top:1px solid #605840}.portrait-caption span{font-size:.7rem;color:var(--gold);letter-spacing:.14em}.portrait-caption strong{display:block;font:1.65rem Georgia,serif;margin-top:.32rem}.portrait-caption p{color:var(--muted)}.editor-panel{background:#24261f;border:1px solid #575143;box-shadow:0 14px 45px #10120f5c}.editor-panel form{padding:clamp(1rem,4vw,2.05rem)}.steps,.tabs{display:flex;border-bottom:1px solid var(--edge);gap:0}.steps button,.tabs button{flex:1;background:transparent;border:0;border-radius:0;border-bottom:2px solid transparent;font-size:.82rem;white-space:nowrap;padding:.8rem .48rem}.steps button[aria-current],.tabs button[aria-pressed=true]{color:#f2cf92;border-bottom-color:var(--gold);background:#302e23}.columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}.editor-panel label{margin:.62rem 0}.family-preview{background:#2f3328;border-left:2px solid #ad9464;padding:.8rem;margin:.8rem 0;font-size:.9rem}.family-preview strong{color:#e3c89a}.attribute-list{border-top:1px solid var(--edge);margin:.7rem 0}.attribute-list div{display:grid;grid-template-columns:1fr 2rem 2.15rem 2rem;align-items:center;padding:.31rem 0;border-bottom:1px solid var(--edge)}.attribute-list output{text-align:center;font-variant-numeric:tabular-nums}.attribute-list button{padding:.22rem .36rem;font-size:1.05rem}.effect-preview{color:var(--gold);font-size:.9rem}.game-shell{height:100dvh;min-height:480px;display:flex;flex-direction:column;overflow:hidden}.game-top{display:flex;justify-content:space-between;align-items:center;gap:.5rem;background:#20221c;border-bottom:1px solid #615641;padding:.6rem 1rem}.game-top strong{font:1.16rem Georgia,serif}.game-top div:first-child{display:flex;flex-direction:column}.game-top .chapter-label{margin-bottom:.16rem}.game-top div:last-child{display:flex;align-items:center;gap:.5rem}.game-location{text-align:center;display:grid}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(16rem,22.5rem);min-height:0;flex:1}.viewport{position:relative;min-height:0;min-width:0;isolation:isolate;background:#747f83}.world{position:absolute;inset:0}.world-top,.world-bottom{position:absolute;left:0;right:0;display:flex;justify-content:space-between;gap:.65rem;padding:.75rem;pointer-events:none}.world-top{top:0}.world-bottom{bottom:0;align-items:stretch;flex-direction:column}.world-bottom button,.world-top button{pointer-events:auto}.vitals,.target{min-width:9rem;border:1px solid #8c8069a6;padding:.52rem .68rem;background:#1d211cee;align-self:start}.vitals div{display:grid;grid-template-columns:5rem 5.3rem;align-items:center;gap:.35rem}.vitals label{display:flex;align-items:center;justify-content:space-between;font-size:.78rem}.vitals meter{width:100%;height:.8rem}meter.hp::-webkit-meter-optimum-value{background:#b2675f}meter.mana::-webkit-meter-optimum-value{background:#7d9cab}meter.focus::-webkit-meter-optimum-value{background:#bd9e63}.target{display:grid;gap:.3rem;font-size:.8rem}.target strong{color:var(--gold)}.context{display:flex;justify-content:center;gap:.45rem;min-height:2.4rem}.context button{background:#20231df5}kbd{font:inherit;font-weight:700;border:1px solid #867655;border-radius:3px;padding:.07rem .32rem;color:#e5c888}.spellbar{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));max-width:44rem;width:100%;margin:auto;gap:.33rem}.spellbar button{display:grid;justify-items:center;align-content:start;gap:.2rem;text-align:center;padding:.35rem .15rem;background:#21241ef5;font-size:.76rem}.spellbar button:disabled{opacity:.78}.spellbar button span{overflow-wrap:anywhere}.spellbar small{font-size:.67rem}.game-side{min-width:0;display:flex;flex-direction:column;min-height:0;background:var(--panel);border-left:1px solid #63583f}.player-heading{padding:.83rem .9rem .45rem}.player-heading h1{font-size:1.65rem;margin:0}.player-heading p{font-size:.85rem;color:var(--muted);margin:.3rem 0}.game-side .tabs{flex-wrap:wrap}.panel-content{overflow:auto;flex:1;padding:.85rem .85rem 1.2rem}.panel-content p,.panel-content li{font-size:.88rem}.panel-content h2{font-size:1.25rem}.panel-content details{border-bottom:1px solid var(--edge);padding:.51rem 0}.panel-content summary{cursor:pointer;color:#e5c990}.panel-content details button{display:block;margin-top:.45rem}.notice{border-left:2px solid var(--gold);background:#302e25;padding:.65rem .7rem;color:#eee3cc}.quest-actions,.map-list{display:grid;gap:.38rem}.quest-actions button,.map-list button{text-align:left}.map-list button{display:flex;justify-content:space-between;align-items:center;gap:.4rem;font-size:.83rem}.memories{margin:0;padding-left:1.3rem;color:#d1c7b5}.memories li+li{margin-top:.45rem}.game-side footer{display:grid;gap:.28rem;padding:.65rem .75rem;border-top:1px solid var(--edge);font-size:.75rem}.dialog{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:3;width:min(28rem,90%);background:#23251ef5;border:1px solid #91815f;box-shadow:0 16px 80px #12130e9e;padding:1rem;display:grid;gap:.5rem}.dialog label{margin:.12rem 0}.dialog .close{position:absolute;right:.5rem;top:.45rem;padding:.18rem .5rem}.dialog h2{margin-right:1.8rem}.webgl-error{position:absolute;top:40%;left:5%;right:5%;padding:.7rem;background:#251a15}.dev-form fieldset{padding:0;border:0;min-width:0}.dev-form fieldset>div{display:grid;grid-template-columns:1fr auto;gap:.32rem;align-items:end;margin:.65rem 0}.dev-form fieldset>div:has(input):has(select){grid-template-columns:1fr 3rem auto}@media(max-width:920px){.game-layout{grid-template-columns:minmax(0,1fr) minmax(15rem,18rem)}}@media(max-width:680px){.landing{padding:1rem}.landing-frame,.editor-layout{grid-template-columns:1fr}.landing-frame header{border-right:0;border-bottom:1px solid var(--edge);padding:1.4rem}.landing-frame header h1 br{display:none}.editor-layout{padding:1rem}.preview{height:13rem}.portrait-caption{padding:.55rem .75rem}.game-top{padding:.48rem}.game-top strong{font-size:.82rem}.game-top div:last-child small{display:none}.game-shell{min-height:620px}.game-layout{grid-template-columns:1fr;grid-template-rows:minmax(16.5rem,56%) minmax(0,1fr)}.game-side{border-left:0;border-top:1px solid var(--edge)}.player-heading{padding:.35rem .75rem}.player-heading h1{font-size:1.13rem}.player-heading p{display:none}.tabs button{padding:.4rem .25rem}.game-side footer{display:none}.vitals div{grid-template-columns:3.2rem 3.4rem}.world-top,.world-bottom{padding:.42rem}.spellbar button{font-size:.66rem;gap:.08rem}.spellbar small{display:none}.dialog{gap:.2rem;padding:.68rem}.dialog p{margin:.2rem 0}}
