/* housing + ward office panels, contract sheet, sleep fade, phone ladder */
#hzPanel{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(360px,94vw);max-height:88vh;overflow-y:auto;background:#160f22f4;border:3px solid #c9a86a;outline:3px solid #1a0c08;padding:10px;z-index:11;box-sizing:border-box;display:flex;flex-direction:column;gap:8px}
#hzPanel[hidden]{display:none}
#hzPanel .ihead{margin:0}#hzPanel .ihead span{flex:1}
#hzPanel .hico{width:36px;height:36px;image-rendering:pixelated}
#hzPanel .row{gap:6px}#hzPanel .row button{font-size:13px;padding:6px 9px}
#hzPanel .row button.big{font-size:15px;padding:8px 14px}
#hzPanel button:disabled{opacity:.4}
.hnote{font-size:12px;line-height:1.5;color:#d8c8b0;background:#0b0712;border:2px solid #3a2e40;padding:6px 8px}
.hnote b{font-weight:normal;color:#ffe9a8}
.hlist{display:flex;flex-direction:column;gap:5px}
.hrow{display:flex;align-items:center;gap:8px;text-align:left;font-size:13px;padding:5px 7px;background:#2a1a24;border-width:2px}
.hrow.cur{border-color:#8ad0a0;background:#1c2a24}
.hrow div{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.hrow span{color:#fff0d0;line-height:1.25}
.hrow i{font-style:normal;font-size:10px;color:#b8a898}
.hrow b{font-weight:normal;font-size:14px;color:#ffe9a8;white-space:nowrap;display:flex;flex-direction:column;align-items:flex-end}
.hrow b small{font-size:9px;color:#b8a898}
.hrow em,.hrung em{font-style:normal;font-size:9px;padding:0 3px;margin-top:2px;background:#2e6a44;color:#e8ffe8}
.hrow em.ng{background:#7a2a24;color:#ffe0d8}
.hplan{width:72px;height:54px;flex:none;image-rendering:pixelated;background:#f4efe2;border:2px solid #1a0c08}
.hplan.sm{width:36px;height:36px;background:none;border:0}

/* lease contract sheet (paper) */
.contract{position:relative;background:#f6f0de;color:#2a2230;border:2px solid #1a0c08;box-shadow:inset 0 0 0 3px #e4d8bc;padding:8px 10px;font-size:12px}
.chead{display:flex;gap:8px;padding-bottom:6px;margin-bottom:4px;border-bottom:2px dashed #b8a888}
.cplan{width:96px;height:72px;flex:none;image-rendering:pixelated;border:2px solid #2a2230;background:#fff}
.chead div{display:flex;flex-direction:column;gap:1px;min-width:0}
.chead b{font-weight:normal;font-size:14px}
.chead span{font-size:10px;color:#6a6070}
.chead span.rent{font-size:13px;color:#a8281e;margin-top:2px}
/* scoped: .crow is also the creator row, .screen the full-screen panels (style.css) */
.contract .crow{display:flex;align-items:baseline;gap:6px;padding:2px 0;background:linear-gradient(90deg,#c8bca0 50%,transparent 50%) bottom/4px 1px repeat-x}
.contract .crow span{flex:none}
.contract .crow i{flex:1;font-style:normal;font-size:9px;color:#8a8090}
.contract .crow b{font-weight:normal;white-space:nowrap}
.contract .crow.tot{font-size:15px;margin-top:3px;padding-top:4px;border-top:2px solid #2a2230;background:none}
.contract .crow.tot b{color:#a8281e}
.hscreen{margin-top:6px;padding:4px 6px;border:2px solid;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px}
.hscreen b{font-weight:normal;font-size:14px}
.hscreen small{flex-basis:100%;font-size:9px;opacity:.8}
.hscreen.ok{border-color:#2e7a4a;color:#1e5a34;background:#e2f2e0}
.hscreen.ng{border-color:#a8281e;color:#8a1e16;background:#f8e0da}
.pay{margin-top:5px;font-size:10px;color:#6a6070}
.seal{position:absolute;right:8px;bottom:6px;width:44px;height:44px;opacity:0;transform:scale(2.2) rotate(-20deg);pointer-events:none}
.seal .hanko{width:44px;height:44px;image-rendering:pixelated}
.seal.on{animation:hzseal .35s steps(4) forwards}
@keyframes hzseal{to{opacity:.92;transform:scale(1) rotate(-8deg)}}

/* storage chest, locker */
.bgrid{display:grid;grid-template-columns:repeat(6,1fr);gap:4px;justify-items:center;padding:6px;background:#0b0712;border:2px solid #5a4a3a}
.bgrid.lk{grid-template-columns:repeat(6,1fr);border-color:#4a6a8a}
.bgrid.inv{border-color:#3a2e40}
.bgrid .slot{width:44px;height:44px}

/* sleep fade */
#hzFade{position:fixed;inset:0;background:#05030a;opacity:0;pointer-events:none;z-index:8;transition:opacity 1.2s ease}

/* phone: housing ladder + bills */
.plist.ladder li{position:relative}
.plist.ladder li.hrung+li.hrung::before{content:'';position:absolute;left:calc(var(--px)*7);top:calc(var(--px)*-2);width:var(--px);height:calc(var(--px)*3);background:#b8b0a0}
.plist li img.pplan{width:calc(var(--px)*18);height:calc(var(--px)*14);image-rendering:pixelated;background:#f4efe2;outline:var(--px) solid #2a2433}
.plist li.hrung b{position:absolute;right:var(--px);bottom:calc(var(--px)*2)}
.plist.ladder li i{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.plist li.hrung em{background:#d8a868;color:#2a1a10}
.plist li.cur{background-color:#e4f2e0}
.plist li.warn{background-color:#fbe4dc}
.plist li.warn span{color:#a8281e}
#hzPanel.lease .row button.big{flex:1 1 100%}

@media (max-width:600px){body.hz-shw #needs{opacity:0;pointer-events:none;transition:opacity .25s}}
