:root{--ink:#273c34;--muted:#626d60;--edge:#34473a;--paper:#fffdf3;--green:#d9edbb;--orange:#ffc14e;color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;font-size:16px}*{box-sizing:border-box}body{margin:0;background-color:#f8f7eb;background-image:radial-gradient(#d6d7c5 .8px,transparent .9px);background-size:8px 8px}header{background:var(--paper);border-bottom:3px solid var(--edge)}.bar,main{max-width:1200px;margin:auto;padding-inline:32px}.bar{height:74px;display:flex;align-items:center;gap:56px}.brand{display:flex;align-items:center;gap:12px;font-weight:950;font-size:23px;letter-spacing:-1px}.brand img{width:35px;height:35px;image-rendering:pixelated}a{color:inherit;text-decoration:none}nav{display:flex;gap:10px}nav a{font-size:15px;font-weight:700;padding:8px 15px;border:2px solid transparent}nav a.active{background:var(--green);border-color:var(--edge);box-shadow:2px 2px var(--edge)}button{font:inherit;color:inherit;cursor:pointer}.help{display:flex;align-items:center;gap:8px;background:none;border:0;margin-left:auto;font-weight:650}.help b,.hint{border:2px solid var(--edge);font:bold 14px monospace;padding:0 4px;background:#ffdc83}.intro{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:36px 0 24px}.intro h1{font-size:clamp(30px,3.1vw,42px);letter-spacing:-2px;margin:0;font-weight:950;line-height:1.3}.intro p,.muted{color:var(--muted);margin:7px 0 0}.intro time,.age{font-family:ui-monospace,monospace;font-weight:700;font-size:14px}.intro time{background:#fffdf3;border:2px solid #8a9786;padding:7px 12px;white-space:nowrap}.grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(310px,1fr);gap:24px;align-items:start}main{padding-bottom:60px}.panel{background:var(--paper);border:3px solid var(--edge);box-shadow:4px 4px 0 #9fa993}.left{display:grid;gap:22px}.scene{position:relative;background:#68c3ef;border-bottom:3px solid var(--edge);overflow:hidden}.scene img{width:100%;height:clamp(235px,24vw,330px);display:block;object-fit:cover;object-position:center 62%;image-rendering:auto}.stage{position:absolute;top:14px;left:15px;border:2px solid var(--edge);background:var(--paper);box-shadow:2px 2px var(--edge);padding:4px 9px;font:700 14px/1.3 monospace}.worldfoot{padding:15px 22px;display:flex;align-items:center;justify-content:space-between;gap:12px}.kicker,.local{font-size:13px;color:var(--muted)}h2{font-size:22px;margin:0;font-weight:850;letter-spacing:-.6px}.worldfoot h2{margin-top:2px}.age{background:#e5edce;border:1px solid #b3bf97;padding:5px 9px;white-space:nowrap}.profile,.budget,.ledger{padding:23px}.sectitle{display:flex;align-items:center;gap:11px}.sectitle i{width:28px;height:28px}.hint{margin-left:auto;line-height:17px;background:transparent;color:var(--muted);border-color:#8a9786}.profile>.sectitle{padding-bottom:17px;border-bottom:2px dashed #cdd1bb}.profile form>label,legend{display:block;font-size:15px;font-weight:750;margin-bottom:8px}.profile form>label,fieldset{margin-top:19px}fieldset{border:none;padding:0;margin-inline:0}legend{padding:0}input{font:inherit;color:var(--ink)}input:not([type=radio]){width:100%;min-width:0;background:#faf9ef;border:2px solid #9da58f;border-radius:0;padding:10px 12px;height:44px}input::placeholder{color:#747c6e}.moneyinput{display:flex;align-items:center;border:2px solid #9da58f;background:#faf9ef;padding:0 12px;gap:6px}.moneyinput span:last-child{font-size:14px;color:var(--muted);white-space:nowrap}.moneyinput input{border:0;height:40px;padding:0 3px;font:700 19px monospace}.choices{display:flex;gap:9px}.choices label{flex:1;position:relative;cursor:pointer}.choices input{position:absolute;opacity:0;width:1px;height:1px}.choices span{display:flex;align-items:center;justify-content:center;gap:8px;border:2px solid #a4ab97;min-height:40px;font-weight:650;background:#fbfaf2}.genders span:before{content:'';width:9px;height:9px;border:2px solid #889784}.choices input:checked+span{background:#e4efcf;border-color:#455b41}.genders input:checked+span:before{background:#496140;box-shadow:inset 0 0 0 1px #e4efcf}.tiers span{flex-direction:column;padding:7px;gap:3px}.tiers i{height:24px;width:24px}i svg{width:100%;height:100%;display:block}.note,.local,.muted{font-size:14px;line-height:1.55}.note{margin:9px 0 19px;color:var(--muted)}.primary,.secondary{display:block;border:2px solid var(--edge);box-shadow:3px 3px var(--edge);font-weight:800;padding:11px 15px;background:var(--orange);width:100%}.primary:hover{filter:brightness(1.04)}.primary:active,.secondary:active{transform:translate(2px,2px);box-shadow:1px 1px var(--edge)}.local{text-align:center;margin:12px 0 0;font-size:12px}.amount{font:bold clamp(32px,4vw,48px)/1.1 ui-monospace,monospace;letter-spacing:-2px;margin-top:15px}.amount small{font-size:.55em;margin-right:4px}.items{display:grid;grid-template-columns:1fr 1fr;gap:0 24px;border-top:2px dashed #cdd1bb;margin-top:18px}.item,.row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 0;border-bottom:1px solid #daddcc}.item{font-size:14px}.item b,.row strong{font-family:ui-monospace,monospace}.row span{overflow-wrap:anywhere}.green,.secondary{background:var(--green)}.secondary{margin-top:18px}.profile dl{margin:5px 0}.profile dt{color:var(--muted)}.profile dd{margin:0;font-weight:700}.profile select,.ledger select{font:inherit}.profile .note{margin-top:16px}progress{display:block;width:100%;accent-color:#628646;height:16px;margin:8px 0 14px}#progressBox{margin-top:18px}.ledger{max-width:820px}.ledger h3{font-size:17px;margin:25px 0 4px}.ledger small{color:var(--muted)}dialog{width:min(440px,calc(100% - 36px));max-height:85dvh;border:3px solid var(--edge);box-shadow:4px 4px var(--edge);background:var(--paper);color:inherit;padding:24px}dialog::backdrop{background:#17291fad}dialog p{line-height:1.7}dialog form label{display:block;margin-bottom:7px}dialog .primary{margin-top:14px}button:focus-visible,a:focus-visible,input:focus-visible,.choices input:focus-visible+span{outline:3px solid #267ea4;outline-offset:3px}#message:not(:empty){position:fixed;bottom:16px;left:50%;transform:translateX(-50%);background:var(--ink);color:white;padding:10px 16px;text-align:center;z-index:9}body:has(dialog[open]){overflow:hidden}[hidden]{display:none!important}@media(max-width:800px){.bar,main{padding-inline:20px}.bar{gap:16px}.grid{gap:17px;grid-template-columns:minmax(0,1.2fr) minmax(280px,1fr)}.profile,.budget{padding:17px}}@media(max-width:650px){.bar{height:auto;min-height:60px;flex-wrap:wrap;gap:4px 10px;padding-block:10px}.brand{font-size:19px;gap:7px}.brand img{width:28px;height:28px}nav{order:3;width:100%;gap:6px;margin-top:6px}nav a{padding:5px 10px;font-size:14px}.help{font-size:14px}.bar,main{padding-inline:16px}.intro{margin:22px 0 16px;align-items:flex-start}.intro p{font-size:14px}.intro time{display:none}.grid{display:flex;flex-direction:column;align-items:stretch;gap:18px}.left{display:contents}.world{order:0}.profile{order:1}.budget{order:2}.scene img{height:auto;aspect-ratio:1.95;object-fit:cover}.worldfoot{padding:12px 16px}.worldfoot h2{font-size:20px}.items{gap:0 14px}}@media(prefers-reduced-motion:no-preference){button{transition:background-color .12s}}
.sceneActions{display:flex;gap:10px;align-items:center}.atlas{border:0;border-bottom:1px solid currentColor;padding:3px 0;background:none;font-size:14px;font-weight:700}.scene .actor{position:absolute;left:26%;bottom:12%;width:17%;height:auto;object-fit:contain;image-rendering:pixelated}.atlasGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}.atlasGrid button{padding:4px;background:#fbfaee;border:2px solid #8d9c83;font-size:14px}.atlasGrid button[aria-pressed=true]{background:var(--green);border-color:var(--ink)}.atlasGrid img{display:block;width:100%;aspect-ratio:1.8;object-fit:cover;image-rendering:auto;margin-bottom:3px}#atlasArt{width:100%;display:block;margin:12px 0 8px;aspect-ratio:1.85;object-fit:cover;image-rendering:auto}dialog:has(.atlasGrid){width:min(540px,calc(100% - 28px))}.recordsBtn{background:#f3f3e3;border:1px solid #a3ae95;font-weight:650;padding:4px 8px}.row small{display:block;margin-top:3px}#savedProfile dt,#savedProfile dd{font-size:15px}.profileIntro{display:flex;align-items:center;gap:14px;margin:21px 0}.profileIntro img{width:54px;image-rendering:auto}.profileIntro b{font-size:22px;overflow-wrap:anywhere}.profileIntro small{display:block;margin-top:4px;color:var(--muted)}@media(max-width:410px){.sceneActions{flex-direction:column;gap:3px}.worldfoot{padding:10px 14px}}
.scene img{height:auto;aspect-ratio:auto;object-fit:contain}.atlasGrid img{aspect-ratio:1.5;object-fit:contain}#atlasArt{aspect-ratio:auto;object-fit:contain}.profileIntro img{width:84px;border:2px solid var(--edge)}.accountBtn{border:2px solid var(--edge);background:#f9df92;box-shadow:2px 2px var(--edge);font-size:14px;font-weight:750;padding:6px 10px;max-width:180px;overflow:hidden;text-overflow:ellipsis}.bar{column-gap:24px}.authTabs{display:flex;margin:16px 0;gap:8px}.authTabs button{flex:1}.authTabs button,.linkBtn{border:1px solid #8c9a83;background:#faf9ed;padding:6px 9px}.authTabs .selected{background:var(--green);font-weight:bold}.authField{margin:12px 0}.authField label{font-size:14px;font-weight:700}.authField select{font:inherit;padding:8px;width:100%;color:var(--ink);background:var(--paper);border:2px solid #9da58f}.formError{color:#953b2c;margin:8px 0}.linkBtn{margin-top:10px;font-size:14px}.minor{font-size:14px;color:var(--muted)}.help{padding:4px}.authBusy{cursor:wait}.panel .primary:disabled,button:disabled{opacity:.65;cursor:default}#dialog p:empty{display:none}@media(max-width:650px){.bar{column-gap:10px}.help span{display:none}.accountBtn{max-width:145px}.brand{margin-right:auto}.help{margin-left:0}}

#atlasAgeField{display:flex;align-items:center;gap:8px;margin-top:10px;font-size:14px}#atlasAge{font:inherit;color:var(--ink);border:2px solid var(--edge);background:var(--paper);padding:4px 8px}

.sceneStory{margin:0;padding:0 22px 20px;font-size:16px;line-height:1.85;color:var(--ink);overflow-wrap:anywhere}#atlasStory{padding:0;margin:10px 0 18px}.atlasGrid small{display:block;font-size:12px;margin-top:3px}.atlasGrid button:disabled{opacity:.65}.profile select,#nextPayday{width:100%;height:42px;padding:5px 10px;background:var(--paper);color:var(--ink);border:2px solid #9da58f;font:inherit}#adjustForm label[for=nextPayday]{margin-top:12px}

#familyForm>label{margin-top:12px}#familyForm>h3{margin:20px 0 4px;border-top:2px dashed #cdd1bb;padding-top:15px}#familyForm>h3+p{margin:0 0 10px}

.items:has(.expense){grid-template-columns:1fr}
.expense{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid #daddcc;font-size:15px;line-height:1.45;cursor:pointer}
.expense input[type=checkbox]{width:18px;height:18px;min-width:18px;margin:0;padding:0;accent-color:#547447}
.expense small{font-size:12px;font-weight:600;color:#596747;margin-left:7px}
.expense b{margin-left:auto;white-space:nowrap;font-family:ui-monospace,monospace}
.expense:has(input:disabled){cursor:default}
#previewExpenses .expense{margin:0}

.expense em{display:block;font-size:13px;font-style:normal;color:var(--muted);margin-top:3px}.optionalCosts summary{padding:12px 0;font-weight:650;cursor:pointer}#basketNote{margin:5px 0}#localPrices{margin-top:4px}.priceField{margin:12px 0}#dialogBody a{text-decoration:underline}

.healthNotice{position:relative;margin:18px 0 12px;padding:11px 14px;background:#fff0c1;border:2px solid #665334;box-shadow:2px 2px #b4a484;color:#573b24;font-weight:650;line-height:1.55;overflow-wrap:anywhere}
.healthNotice::after{content:"";position:absolute;bottom:-7px;left:24px;width:10px;height:10px;background:#fff0c1;border-right:2px solid #665334;border-bottom:2px solid #665334;transform:rotate(45deg)}
.healthNotice:not([hidden])+#nextBill{margin-top:0}
