@font-face{font-family:Cabinet;src:url(./assets/studio-pixel.ttf) format("truetype");font-display:swap}
:root{color-scheme:dark;--ink:#11231d;--wall:#162b24;--paper:#fff0ce;--muted:#d6d8bc;--mint:#a4edc5;--gold:#ffd38b;--edge:#716747;--pad:clamp(8px,3vw,23px);--pixel:Cabinet,"Courier New",monospace;--mono:"Courier New",monospace;--body:system-ui,sans-serif}
*{box-sizing:border-box}
html{min-width:280px;background:#0d1a18}
body{margin:0;background:radial-gradient(ellipse at 55% 0%,#253a2c,transparent 58%),#0d1a18;color:var(--paper);font:500 14px/1.38 var(--body)}
body.curating{overflow:hidden}
body.curating .posters,body.curating footer{display:none}
h1,h2,h3,p,figure{margin:0}
h1,h2{font-family:var(--pixel);line-height:1.12;font-weight:400}
h2{font-size:clamp(1.25rem,5.3vw,1.95rem)}
h3{font-size:1rem;line-height:1.17}
a{color:inherit;text-decoration:none}
img{display:block;image-rendering:pixelated}
button{appearance:none;min-width:44px;min-height:44px;padding:5px 9px;border:1px solid #81734f;border-radius:0;background:#2c4436;color:var(--paper);font:750 .85rem/1.14 var(--body);cursor:pointer;touch-action:manipulation}
button:disabled{color:#c2bb9d;background:#28392f;cursor:default;box-shadow:none}
button:active{filter:brightness(1.19)}
button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid #bcf6d6;outline-offset:-2px}
svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:square}
[hidden]{display:none!important}
.marquee,main,footer{width:min(100%,1040px);margin-inline:auto;padding-inline:max(var(--pad),env(safe-area-inset-left)) max(var(--pad),env(safe-area-inset-right))}
.marquee{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:calc(46px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top);font:400 clamp(.66rem,2.4vw,.84rem)/1.1 var(--pixel)}
.marquee a{display:flex;align-items:center;gap:6px;min-height:44px;color:#fff1d0}
.marquee img{width:24px;height:24px;flex:none}
.site-tag{display:none;color:var(--muted)}
.museum-sign{color:var(--gold);white-space:nowrap;font-size:.67rem}
#cabinet{--height:calc(100dvh - 52px - env(safe-area-inset-top) - env(safe-area-inset-bottom));display:grid;grid-template-rows:44px minmax(0,1fr) 46px;position:relative;isolation:isolate;min-width:0;min-height:280px;height:min(var(--height),735px);border:2px solid #8a7550;background:var(--wall);box-shadow:0 6px #08140f,0 19px 45px #070f0db0}
#cabinet[data-page=title]{height:auto;min-height:0}
.chrome{display:flex;justify-content:space-between;align-items:center;padding-left:10px;border-bottom:1px solid #796b48;background:#25382e;font:800 .74rem/1 var(--mono);letter-spacing:.095em;text-transform:uppercase}
.chrome span{display:flex;align-items:center;gap:8px}
.chrome b{display:block;width:7px;height:7px;background:var(--gold);box-shadow:0 0 9px #ffd07e9d}
#expand{height:44px;display:grid;place-items:center;background:#2d4034;border:0;border-left:1px solid #75674a}
.screen{min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-color:#85724c #1a2e25;background:var(--wall)}
.tools{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:#253b30}
.tools button{padding-inline:3px;min-width:0;border:0;border-top:1px solid #796b48;border-right:1px solid #4d5640;background:none}
.tools button:last-child{border-right:0}
.lobby{height:clamp(182px,70vw,min(465px,52dvh));overflow:hidden;position:relative;isolation:isolate;background:#1e231d}
.lobby>img,.lobby canvas,.lobby::after{position:absolute;inset:0;width:100%;height:100%}
.lobby>img{object-fit:cover;object-position:55% 53%}
.lobby canvas{image-rendering:pixelated;pointer-events:none}
.lobby::after{content:"";background:linear-gradient(90deg,#0d171de9,#10191c9b 35%,transparent 76%),linear-gradient(0deg,#091817e8,transparent 46%);pointer-events:none}
.lobby-copy{position:absolute;left:clamp(10px,3.9vw,32px);bottom:clamp(10px,4vw,28px);z-index:1}
.label{color:var(--mint);font:800 .68rem/1.1 var(--mono);text-transform:uppercase;letter-spacing:.05em}
.lobby-copy .label{display:inline-block;color:#ffdc9b;border:1px solid #947a52;background:#182821;padding:4px 5px}
h1{font-size:clamp(1.51rem,6.4vw,4.8rem);letter-spacing:-.038em;color:#fff0d0;margin:7px 0 5px;text-shadow:3px 3px #122620}
h1 span{color:#ffd990}
.lobby-copy p{color:#fff2d6;font-size:clamp(.8rem,2.4vw,1.09rem);font-weight:680}
.title-actions{display:grid;gap:5px;padding:7px;border-top:3px solid #a18a58;background:#243b31}
.main-actions,.side-actions,.actions{display:flex;gap:5px}
.main-actions button,.side-actions button,.actions button{flex:1}
.primary{background:#ffd38b;color:#282117;border-color:#ffdf9c;box-shadow:inset 0 -3px #b68449;font-weight:850}
.secondary{background:#2d4939}
.side-actions span{margin-left:3px;color:var(--mint);font-family:var(--mono)}
.posters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:14px 0 7px}
.posters figure{border:1px solid #595b43;background:#1f3228}
.posters img{width:100%;height:auto;aspect-ratio:2.06;object-fit:cover}
.posters figcaption{padding:6px 3px;text-align:center;font-size:.74rem}
footer{display:flex;justify-content:space-between;gap:8px;padding-top:7px;padding-bottom:max(12px,env(safe-area-inset-bottom));font:700 .73rem/1.25 var(--mono);color:var(--muted)}
.page{display:grid;align-content:start;gap:10px;padding:clamp(9px,3vw,22px);width:min(100%,860px);margin:auto}
.page-head,.final-copy,.final-record,.report-info{display:grid;align-content:start;gap:6px}
.mode-list{display:grid;gap:7px}
.mode-card{display:grid;grid-template-columns:54px minmax(0,1fr) auto;align-items:center;gap:7px;padding:6px;border:1px solid #7d7051;background:#263f32}
.mode-card img{width:54px;height:57px;object-fit:cover}
.mode-card p,.mode-card small{font-size:.76rem;color:#e7dfc3}
.mode-card .locked{max-width:84px}
.back{justify-self:start}
.poster,.desk-head{background:linear-gradient(90deg,#17281fee,#12261c51),var(--art) center/cover no-repeat;image-rendering:pixelated;border:1px solid #776b4f;border-left:4px solid #b09a63;color:#ffedcb}
.poster{display:grid;align-content:end;gap:5px;min-height:clamp(91px,24dvh,195px);padding:9px}
.workspace{display:grid;height:100%;min-height:0;grid-template-areas:"info" "tabs" "room" "action";grid-template-rows:auto 44px minmax(0,1fr) auto;overflow:hidden}
.ledger{grid-area:info;display:flex;justify-content:space-between;align-items:center;gap:8px;padding:6px 9px;background:#1d342a;border-bottom:1px solid #6e6147}
.ledger>span{display:grid;gap:2px;line-height:1.12}
.ledger>strong{color:var(--gold);font:800 .92rem/1.14 var(--mono);white-space:nowrap}
.tabs{grid-area:tabs;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));min-width:0}
.tab{min-width:0;padding-inline:4px;border-color:#6f6548;background:#293f32}
.tab[aria-pressed=true]{background:#c9aa69;color:#211c15;border-color:#f1d299}
.work-view{grid-area:room;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;scrollbar-color:#88774d #172c24}
.work-action{grid-area:action;padding:4px 7px;border-top:1px solid #77694b;background:#22392e}
.work-action button{width:100%}
.desk{display:grid;gap:6px;padding:7px}
.desk-head{display:grid;gap:2px;min-height:53px;padding:6px 7px;align-content:center}
.desk-head h2{font-size:1.03rem}
.desk-head p{font-size:.77rem}
.cards,.placement-list{display:grid;gap:5px}
.tile-button{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:5px;text-align:left;min-height:53px;padding:2px 5px 2px 2px;background:#243d31;border-color:#657050}
.tile-button:active{background:#3d5845}
.brush{width:30px;height:45px;object-fit:contain}
.tile-copy{display:grid;gap:1px;line-height:1.13}
.tile-copy strong{font-size:.82rem}
.tile-copy small{font-size:.7rem;color:#e1dbc0}
.tile-side{color:var(--gold);font:800 .72rem/1 var(--mono);white-space:nowrap}
.jewel{display:inline-block;width:6px;height:6px;transform:rotate(45deg);background:var(--gem);margin-inline:1px 3px;vertical-align:1px}
.exhibit-layout{display:grid;gap:5px;padding:6px}
.cases-panel,.placing{min-width:0;min-height:0}
.case-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;background:var(--art) center 48%/cover;border:1px solid #8c7b54;image-rendering:pixelated}
.case{min-width:0;display:grid;align-content:start;justify-items:center;text-align:center;gap:2px;padding:3px 2px;background:#1a2b2beb;border:1px solid #968159;color:#f6e5bb}
.case[aria-pressed=true]{outline:2px solid #ffdc95;outline-offset:-2px;background:#263d34}
.case.match small{color:#aef3ce}
.case small{font-size:.68rem;font-weight:700}
.case strong{font-size:.72rem}
.case .brush{height:48px;width:32px}
.empty-case{display:grid;align-items:center;height:48px;color:#bfb89d;font:700 .67rem/1 var(--mono)}
.scoreline{color:#ebe4c4;font:700 .72rem/1.2 var(--mono);margin-top:3px}
.scoreline strong,.report-info strong,.page-head strong{color:var(--gold)}
.placing{display:grid;align-content:start;gap:4px}
.placement-head{display:flex;justify-content:space-between;align-items:center;gap:5px;color:#f4e7c8}
.placement-head p{font-size:.78rem}
#clear-case{font-size:.73rem;padding-inline:6px}
.archive-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.archive-card{display:flex;align-items:center;gap:4px;padding:4px;background:#293a31;border:1px solid #6f6448}
.archive-card .brush{filter:brightness(.4) saturate(.25)}
.archive-card.earned .brush{filter:none}
.archive-card.earned{border-color:#ab935c}
.archive-card strong,.archive-card small{display:block}
.archive-card small{font-size:.69rem;color:#e2ddbd}
.report-cases{display:grid;border:1px solid #7b6d50;gap:1px;background:#7b6d50}
.report-cases>div{display:flex;justify-content:space-between;align-items:center;gap:7px;padding:6px 8px;background:#273f32;font-size:.78rem}
.report-cases strong{text-align:right;color:#eed7a4}
.report-cases .done strong{color:var(--mint)}
.milestone{padding:5px 7px;border-left:3px solid var(--mint);background:#27483b;color:#ddf5df;font-weight:700}
dialog{position:fixed;inset:0;width:min(91%,445px);max-height:calc(100dvh - max(11px,env(safe-area-inset-top)) - max(11px,env(safe-area-inset-bottom)));padding:0;background:#223b2d;color:var(--paper);border:2px solid #aa9367;overscroll-behavior:contain}
dialog::backdrop{background:#0a1716c2}
#dialog-body{display:grid;gap:8px;padding:11px}
.detail-top{display:flex;align-items:center;gap:8px}
.detail-brush{width:48px;height:72px;border:1px solid #947d54;background:#14291f}
.detail-top p,.detail-rule{color:#e8dfbd;font-size:.81rem}
.dialog-help{display:grid;gap:7px;max-height:calc(100dvh - 143px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain}
.volume-row{display:flex;align-items:center;gap:8px;min-height:44px}
.volume-row input{width:100%;height:44px;accent-color:var(--gold)}
.storage-warning{padding:6px;color:var(--gold)}
body.expanded{overflow:hidden}
#cabinet.expanded,#cabinet:fullscreen{position:fixed;inset:0;margin:0;width:100%;height:100dvh;min-height:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);border:0;z-index:5}
#cabinet.expanded[data-page=title],#cabinet:fullscreen[data-page=title]{height:100dvh}
#cabinet.expanded .title-shell,#cabinet:fullscreen .title-shell{width:min(100%,960px);height:100%;margin:auto;display:grid;grid-template-rows:minmax(0,1fr) auto}
#cabinet.expanded .lobby,#cabinet:fullscreen .lobby{height:100%}
@media(min-width:490px){
 .site-tag{display:inline}.title-actions{grid-template-columns:1.25fr 1fr}.posters figcaption{font-size:.83rem}
 .archive-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(min-width:660px),(orientation:landscape) and (min-width:460px){
 .workspace{grid-template-areas:"info tabs action" "room room room";grid-template-columns:minmax(0,1fr) minmax(188px,1.27fr) auto;grid-template-rows:minmax(44px,auto) minmax(0,1fr)}
 .work-action{padding:0;min-width:95px;border:0}
 .work-action button{min-height:100%}
 .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
 .exhibit-layout{grid-template-columns:1fr 1fr;height:100%;overflow:hidden}
 .cases-panel,.placing{overflow:auto;overscroll-behavior:contain;scrollbar-color:#88774d #172c24}
 .mode-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(orientation:landscape) and (max-height:500px){
 :root{--pad:8px}
 .marquee{min-height:calc(44px + env(safe-area-inset-top))}
 #cabinet{--height:calc(100dvh - 44px - env(safe-area-inset-top) - env(safe-area-inset-bottom));min-height:0}
 #cabinet[data-page=title]{height:var(--height)}
 .title-shell{height:100%;display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr)}
 #cabinet.expanded .title-shell,#cabinet:fullscreen .title-shell{grid-template-rows:minmax(0,1fr)}
 .lobby{height:100%}.lobby-copy{left:9px;bottom:8px}.lobby-copy p{font-size:.74rem}
 h1{font-size:clamp(1.25rem,6.8dvh,2.48rem);margin:4px 0}
 h2{font-size:1.1rem}
 .title-actions{grid-template-columns:1fr;align-content:center;border-left:3px solid #9f885d;border-top:0;padding:4px}
 .title-actions button{font-size:.74rem;padding-inline:4px}
 .page{padding:5px 7px;gap:5px}
 .poster{min-height:57px;padding:5px 7px}
 .desk{padding:4px;gap:3px}
 .desk-head{min-height:34px;padding:3px 5px;grid-template-columns:auto 1fr;align-items:center;gap:6px}
 .desk-head p{font-size:.7rem}
 .ledger{padding:3px 5px;font-size:.76rem}
 .ledger .label{font-size:.61rem}
 .tabs button,.work-action button{font-size:.76rem}
 .case-row{padding:2px;gap:2px}
 .case .brush{height:28px;width:19px}
 .empty-case{height:28px}
 .case small,.case strong{font-size:.63rem}
 .placing{gap:2px}
 .placement-head p{font-size:.71rem}
 .tile-button{min-height:47px}
 .tile-button .brush{width:25px;height:36px}
 .tile-copy strong{font-size:.76rem}
 .tile-copy small{font-size:.65rem}
 .report-page,.final-page{grid-template-columns:minmax(0,39fr) minmax(0,61fr);align-items:start;gap:7px}
 .report-page .poster{min-height:92px}
 .report-info,.final-record{gap:4px}
 .report-info p,.milestone{font-size:.73rem}
 .report-cases>div{padding:3px 5px;font-size:.72rem}
}
@media(orientation:landscape) and (max-height:350px){
 .detail-brush{width:40px;height:57px}
 #dialog-body{padding:8px;gap:5px}
}

@media(orientation:landscape) and (max-height:500px) and (min-width:460px){
 .report-page{grid-template-areas:"poster info" "next info";grid-template-rows:auto auto;row-gap:4px}
 .report-page .poster{grid-area:poster;min-height:86px}
 .report-page .report-info{grid-area:info}
 .report-page #next{grid-area:next}
}
@media(min-width:660px),(orientation:landscape) and (min-width:460px){
 .placement-head{position:sticky;top:0;z-index:1;background:#1d342a;padding:3px}
}
@media(orientation:portrait) and (min-height:680px){
 .final-page::after{content:"";height:clamp(115px,23dvh,195px);border:1px solid #8e7751;background:url(./assets/archive.png) center 58%/cover;image-rendering:pixelated}
}
@media(orientation:landscape) and (max-height:350px) and (min-width:460px){
 .exhibit-layout{padding:4px}
 .case .brush,.empty-case{height:24px}
 .scoreline{font-size:.68rem;line-height:1.1;margin-top:2px}
 .placement-head{padding:0 3px}
}