:root{--night:#172924;--night-deep:#101e1b;--ink:#f3e8d2;--muted:#c3b6a0;--paper:#22362f;--line:#40554a;--green:#edbe72;--accent:#edbe72}
body{background:radial-gradient(ellipse at 80% 0,#294c40,transparent 62%),#15251f;color:var(--ink)}
header{background:#12221e;border-bottom:1px solid #3a5649}.top{min-height:62px}.brand{letter-spacing:.036em}.stamp{background:#e9b56c;color:#382c20;box-shadow:inset 0 0 0 2px #aa7049,0 3px 0 #111b17}
.meters button,.meters div{background:#263c33;border:1px solid #435a4a}.meters span{color:#e6d8c2}.meters b{color:#ffd391}
.banner{min-height:160px;margin-top:16px;border:1px solid #5b6550;background-position:center 47%;box-shadow:0 6px 22px #0d201c75}
.banner h1{font-size:clamp(29px,4vw,44px)}.chapter{color:#f7d39b}.chapter progress::-webkit-progress-value{background:#efba67}
button{color:var(--ink);background:#34473c;border-color:#546053}
button:focus-visible{outline-color:#ffd889;outline-offset:2px}
nav{gap:7px;margin:13px 0}nav button{min-height:39px;background:#2a3e33;border-color:#425748;color:#f3e8d2}
nav button small{color:#ffcc84;background:#192e25;border-radius:5px;padding:1px 4px}
nav button[data-open=service],.nav-chapter{background:#e8b873;border-color:#bea16e;color:#2e261c}
.layout{grid-template-columns:minmax(0,1.55fr) minmax(310px,1fr);gap:14px}
.panel{border:1px solid #455b4b;border-radius:16px;background:#20342c;box-shadow:0 5px 0 #0e251e71}
.heading{margin-bottom:9px}.heading h2{color:#fff0ce}.heading b,small{color:var(--muted)}
#guide{background:#162a23;color:#e8dcc3;border-left:3px solid #cd995c;padding-block:7px;margin-bottom:6px}
#guide span{color:#ffcb80}
#inspector{height:52px;min-height:52px;flex-wrap:nowrap;gap:6px;background:#273e32;border:1px solid #435749;margin:0 0 8px;padding:4px 8px}
#inspector p{min-width:0;color:#e0d4ba;line-height:1.35}
#inspector p b{color:#fff0ce}
#inspector button{min-height:31px;padding:4px 8px;flex-shrink:0}
.inspect-art{width:42px;height:42px;flex-shrink:0;border:1px solid #655f43;border-radius:9px;background:radial-gradient(#577149,#314438)}
#board{border:3px solid #6a5540;outline:1px solid #1a2219;background:linear-gradient(155deg,#5a4434,#3f3529);padding:7px;border-radius:12px;gap:4px;box-shadow:inset 0 0 12px #241e19}
.cell,.cell:nth-child(2n){border-radius:5px;background:linear-gradient(145deg,#344a3c,#263e34);box-shadow:inset 0 1px 0 #6581716d,inset 0 -2px 0 #192e26}
.cell:nth-child(2n){background:linear-gradient(145deg,#3a4c40,#2b4439)}
.cell.item{background:radial-gradient(ellipse at 50% 36%,#6b7860,#3b5345 78%);box-shadow:inset 0 0 0 1px #8b9b7780,inset 0 -2px #29392e}
.cell.item.chain-0,.cell.item.chain-2{background:radial-gradient(ellipse at 50% 35%,#7d7050,#514838 80%)}
.cell.item.chain-3,.cell.item.chain-6{background:radial-gradient(ellipse at 50% 35%,#855a51,#583e3f 80%)}
.cell.item.chain-4{background:radial-gradient(ellipse at 50% 35%,#8e714b,#554637 80%)}
.cell.item.chain-5{background:radial-gradient(ellipse at 50% 35%,#5c747a,#384c54 80%)}
.cell.item.kind-chest,.cell.item.kind-part{background:radial-gradient(#826942,#453c32)}
.cell.item.kind-clock,.cell.item.kind-stamp{background:radial-gradient(#7b5869,#483641)}
.cell.machine{background:radial-gradient(ellipse at 50% 40%,#6d8481,#31515a 80%);box-shadow:inset 0 0 0 1px #87a5a6,inset 0 -2px 0 #24404b}
.cell.cool{background:radial-gradient(#696659,#433f38);box-shadow:inset 0 0 0 1px #857968}
.cell.lock{background:repeating-linear-gradient(145deg,#242b23 0 9px,#2b342a 9px 12px);box-shadow:inset 0 0 0 1px #6257425e}
.tile-lock{display:block;position:relative;width:12px;height:9px;border:1px solid #b9a381;border-radius:2px;background:#796c556b;margin-top:4px}
.tile-lock::before{content:'';position:absolute;bottom:7px;left:2px;width:6px;height:6px;border:1px solid #b9a381;border-bottom:0;border-radius:5px 5px 0 0}
.cell.sealed{background:repeating-linear-gradient(135deg,#57483b 0 5px,#6b5847 5px 10px);box-shadow:inset 0 0 0 1px #937557}
.cell.hint,.cell.hint:nth-child(2n){background:radial-gradient(#8b7750,#594a33);box-shadow:inset 0 0 0 2px #f3c377}
.cell.sel{outline:2px solid #ffe097;outline-offset:0;box-shadow:0 0 11px #f5bf593b,inset 0 0 0 1px #ffe7a6}
.cell.tool-active{outline-color:#aed9fe}
.cell.contract-item::after{content:'';position:absolute;left:4px;top:4px;width:6px;height:6px;border-radius:2px;background:#86dade;transform:rotate(45deg);box-shadow:0 0 4px #112c30}
.cell em,.machine-rank{position:absolute;z-index:1;bottom:2px;right:2px;padding:0 3px;border-radius:4px;color:#f4e8c8;background:#14251fd9;font-size:.62rem;line-height:1.4}
.machine-rank{top:2px;bottom:auto;left:2px;right:auto;background:#18343e;color:#c1eef4}
.cell>.token-art{max-width:70px;max-height:61px;width:94%;height:96%;filter:drop-shadow(0 3px 1px #101b16a8)}
.cell.just-merged>.token-art{animation:merge-pop .36s ease-out both}
@keyframes merge-pop{0%{transform:scale(.62);opacity:.5}55%{transform:scale(1.19);opacity:1}100%{transform:scale(1)}}
.order{background:#293e32;border:1px solid #4a5e4d;border-left:3px solid #718767}
.order.festival{background:#433b31;border-color:#a08150}.ticket-head h3{color:#fff1d5}.ticket-head small{color:#cfbb96}
.req{background:#192e26;border:1px solid #576650;color:#f6e9ce}.req b{color:#ddd0b2}
.req.have{background:#3c634d;border-color:#739779}
.req.have b{color:#e7ffc7}
.primary,.delivery button.primary,#quick-delivery:not([hidden]){background:#ebbd75;border-color:#cba260;color:#2d271c}
.delivery button:disabled{background:#25372f;border-color:#506251;color:#c2bbab}
.event{background:#26382e}.event p,.row p,.trial-title p,.chapter-note{color:#d7ccb3}
.counter-note{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:9px;padding:9px;border-radius:10px;background:#344638;border:1px solid #927b51}.counter-note p{font-size:.81rem;color:#e2c79d}.counter-note button{min-height:34px;font-size:.8rem}
dialog{background:#20342c;color:#f5e9d3;border-color:#657762}dialog::backdrop{background:#091610bb;backdrop-filter:blur(3px)}
.row,.character,.menu-option,.menu-selected,.service-stat{background:#293e32;border:1px solid #536351}.character blockquote{color:#e7dcc3}
.recipe-grid>div{background:#314334}.recipe-grid small{color:#ede1c7}
.lantern{background:#42564c;color:#fff1d4}.lantern.sealed{background:#685e49}.trial-board{background:#101f1a}
.service-stat,.menu-selected,.menu-option{padding:11px;border-radius:12px}
.service-stat{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.service-stat b{color:#ffd388;font-size:1.25rem}.service-help{color:#deceb1;margin:10px 0;font-size:.9rem}
.menu-list{display:grid;gap:8px;margin-top:8px}.menu-option dl{display:grid;grid-template-columns:max-content 1fr;gap:3px 12px;font-size:.84rem;margin:8px 0}.menu-option dt{color:#e4be84}.menu-option dd{margin:0}
.menu-selected h4{margin:9px 0 0}.menu-bonus{margin-top:11px;padding:5px 9px 9px;border:1px dashed #b18b54;border-radius:8px}.menu-change{padding:10px 0;color:#e8ca92}.menu-change summary{cursor:pointer}
.device-hero{display:flex;gap:12px;align-items:center;margin-bottom:10px}.device-hero .token-art{width:63px;height:63px}.device-hero p{font-size:.87rem;color:#d4caad}
body[data-skin=jade] #board{background:#547151;border-color:#8caf79}
body[data-skin=plum] #board{border-color:#bb8073}
body[data-skin=moon] #board{border-color:#a69dbb}
body[data-skin=river] #board{border-color:#7cbeb4}
body[data-skin=gold] #board{border-color:#dcab5b}
#toast{background:#172c24;color:#ffe1ad;border:1px solid #a78658;box-shadow:0 6px 20px #09171359}
footer{color:#c8baa0}
@media(max-width:760px){
 .layout{grid-template-columns:1fr}.top{min-height:54px}.banner{min-height:116px;margin-top:8px;padding:11px 12px}.banner .headline{max-width:235px}.banner h1{font-size:30px}.chapter{margin-top:4px}
 nav{display:flex;flex-wrap:nowrap;overflow-x:auto;margin:7px 0;gap:5px;padding:2px 0 5px;scrollbar-width:thin;scrollbar-color:#728574 transparent}
 nav button{flex:none;font-size:.8rem;min-height:36px;padding:4px 8px}.panel{padding:9px}
 .heading h2{font-size:1.08rem}.work-meta button{min-height:34px;font-size:.8rem;padding:4px 7px}
 #inspector{height:63px;min-height:63px;flex-wrap:wrap;gap:3px 4px;align-content:center}#inspector p{flex:1 1 75%;font-size:.76rem}#inspector button{min-height:25px;font-size:.72rem;padding:1px 5px}
 .inspect-art{width:28px;height:28px}.cell>.token-art{max-height:47px}.cell em,.machine-rank{font-size:.56rem}
 #board{padding:4px;gap:3px}.cell{aspect-ratio:1.15}
 .menu-selected .delivery{gap:5px}.menu-selected .delivery small{font-size:.76rem}
}
@media(prefers-reduced-motion:reduce){.cell.just-merged>.token-art{animation:none}}
.hero-hosts{position:absolute;right:12%;bottom:7px;display:flex;gap:7px;align-items:flex-end;border:none;background:transparent;padding:0;z-index:2;filter:drop-shadow(0 5px 6px #0b1c1bd4)}
.hero-hosts span{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;position:relative}
.hero-hosts img{height:147px;width:108px;object-fit:contain;object-position:center bottom}
.hero-hosts b{font-size:.75rem;color:#ffdfa2;background:#203e34;border:1px solid #c1955b;border-radius:6px;padding:0 7px}
.hosts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.host-card{background:linear-gradient(155deg,#344c3d,#22342d);border:1px solid #5d745d;padding:10px;border-radius:12px}
.host-card-head{display:flex;gap:9px;align-items:center}.host-card-head img{width:86px;height:113px;object-fit:contain;filter:drop-shadow(0 3px 4px #102019)}.host-card h3{font-size:1.36rem;color:#ffe2a6}.host-card p{font-size:.83rem;color:#e4d6bb}.host-quest{border-top:1px solid #607050;margin-top:6px;padding-top:7px}.host-quest h4{margin:4px 0;color:#ffecd1}
@media(max-width:760px){
 .banner .headline{max-width:60%}.banner p{font-size:.78rem}
 .hero-hosts{right:8px;bottom:5px;gap:0}.hero-hosts img{height:94px;width:60px}.hero-hosts b{font-size:.64rem;padding:0 5px}
 .hosts-grid{grid-template-columns:1fr}.host-card-head img{height:90px;width:72px}
}
