/* The phone office, from Claude Design's TZ 5 (research/tz5-delivery, assets/spec/tokens-phone.json).
   body.phone is set by main.js on narrow screens. The screens are the same as on the desktop, laid out in one column. */
.phead,.pnav{display:none}
body.phone{background:#1a0e0a}
body.phone #app{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) auto;grid-template-areas:"phead" "head" "view" "pnav";height:100vh;height:100dvh;max-width:600px;margin:0 auto;background:var(--felt);box-shadow:0 0 40px rgba(0,0,0,.6)}
body.phone #app[hidden]{display:none}
body.phone #app .top,body.phone #app .nav,body.phone .dside,body.phone .ticker{display:none}
.wood{background:linear-gradient(90deg,rgba(0,0,0,.18),transparent 25%,transparent 75%,rgba(0,0,0,.25)),repeating-linear-gradient(90deg,var(--mah7) 0 5px,#43231a 5px 7px,var(--mah7) 7px 13px,#371c13 13px 14px),var(--mah7)}

/* the top: your portrait and the three purses */
body.phone .phead{display:flex;grid-area:phead;align-items:center;justify-content:space-between;gap:8px;padding:max(8px,env(safe-area-inset-top)) 12px 20px;background:url(../assets/ui/phone/navbar-rail.png) left bottom/16px 12px repeat-x,linear-gradient(90deg,rgba(0,0,0,.18),transparent 25%,transparent 75%,rgba(0,0,0,.25)),repeating-linear-gradient(90deg,var(--mah7) 0 5px,#43231a 5px 7px,var(--mah7) 7px 13px,#371c13 13px 14px);image-rendering:pixelated}
.pav{width:44px;height:44px;padding:0;display:grid;place-items:center;background:linear-gradient(180deg,var(--br3),var(--br5));border:2px solid var(--br7);border-radius:2px;cursor:pointer;flex:none}
.pav canvas{width:38px;height:38px;image-rendering:pixelated;display:block}
.pwal{display:flex;gap:5px;min-width:0}
.pw{display:flex;align-items:center;gap:4px;height:34px;padding:0 10px 0 4px;border-radius:17px;background:rgba(18,10,7,.6);border:1px solid var(--br7)}
.pw .px{width:26px;height:26px}
.pw b{font:600 14px var(--mono);color:var(--d-paperhi)}

/* the title of the screen */
body.phone .dhead{display:flex;grid-area:head;align-items:flex-end;justify-content:space-between;gap:10px;padding:14px 16px 10px;background:var(--felt);background-image:repeating-linear-gradient(90deg,rgba(0,0,0,.08) 0 2px,transparent 2px 7px);border-bottom:1px solid rgba(226,194,122,.18)}
body.phone .dhead .eyebrow{font-size:9.5px}
body.phone .dhead h1{font-size:26px;line-height:1.1}
body.phone .dhead .purses{display:none}
.pback{display:none}
body.phone .pback{display:inline-flex}

/* the bottom: five floors of the building on a brass rail */
body.phone .pnav{display:grid;grid-area:pnav;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;padding:12px 6px max(10px,env(safe-area-inset-bottom));background:url(../assets/ui/phone/navbar-rail.png) left top/16px 12px repeat-x,linear-gradient(90deg,rgba(0,0,0,.18),transparent 25%,transparent 75%,rgba(0,0,0,.25)),repeating-linear-gradient(90deg,var(--mah7) 0 5px,#43231a 5px 7px,var(--mah7) 7px 13px,#371c13 13px 14px);image-rendering:pixelated}
.pnav button{position:relative;min-height:60px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:none;border:0 8px solid transparent;color:var(--br1);font:600 9px var(--mono);letter-spacing:.02em;text-transform:uppercase;white-space:nowrap;cursor:pointer;padding:4px 0}
.pnav .ico{width:34px;height:34px;display:grid;place-items:center;background:var(--d-paper);border:2px solid var(--mah9)}
.pnav .ico .px{width:26px;height:26px}
.pnav button.on{border-image:url(../assets/ui/plate-3slice.png) 0 4 0 4 fill / 0 8px stretch;color:#2a1610}
.pnav .wax{position:absolute;top:2px;right:12px;width:12px;height:12px;background:url(../assets/ui/phone/badge-wax.png) 0 0/12px;image-rendering:pixelated}

/* the screens in one column */
body.phone #view{grid-area:view;overflow:auto;padding:14px 16px 24px;background:var(--felt);background-image:repeating-linear-gradient(90deg,rgba(0,0,0,.08) 0 2px,transparent 2px 7px);height:auto}
body.phone .dl-grid,body.phone .dd-grid,body.phone .dr-grid,body.phone .dpn-grid,body.phone .dm-grid,body.phone .dw-grid,body.phone .ds-grid{grid-template-columns:minmax(0,1fr);gap:14px}
body.phone .dl-grid>div,body.phone .dd-grid>div,body.phone .dm-grid>div,body.phone .dw-grid>div,body.phone .ds-grid>div{gap:14px!important}
body.phone .dp{padding:12px 14px 16px}
body.phone .dp-h{margin-bottom:10px;padding:2px 4px 8px}
body.phone .dp-h h2{font-size:19px}
body.phone .dbtn{font-size:15px}
body.phone .lead{font-size:14px}

/* lobby */
body.phone .dstage .droom{height:300px}
body.phone .dstage .blinds{width:92px;height:72px;left:6%}
body.phone .dstage .pf{padding:5px}
body.phone .dstage .pf canvas{width:60px;height:60px}
body.phone .dstage .nplate{left:10px;bottom:10px;font-size:9px;padding:4px 8px;letter-spacing:.1em;max-width:calc(100% - 120px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.phone .dstage .fplate{right:10px;bottom:12px;font-size:9px;padding:4px 6px}
body.phone .dstage .bar2{flex-direction:column;align-items:stretch;gap:10px;padding:12px}
body.phone .dstage .bar2 h3{font-size:22px}
body.phone .dstage .go{width:100%;min-height:64px;font-size:30px;padding:10px}
body.phone .modes2{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
body.phone .mode2{grid-template-columns:1fr;justify-items:center;text-align:center;padding:8px 4px;gap:5px}
body.phone .mode2 p,body.phone .mode2 .side2 .tagr,body.phone .mode2 .side2 .tagg,body.phone .mode2 .side2 .tago{display:none}
body.phone .mode2 .mi{width:56px;height:56px}
body.phone .mode2 .mi .px{width:36px;height:36px}
body.phone .mode2 .cal b{font-size:22px;line-height:34px}
body.phone .mode2 h3{font-size:15px;line-height:1.1}
body.phone .mode2 .side2{align-items:center}
body.phone .mode2 .side2 .dl{font-size:9px}
body.phone .biz button{grid-template-columns:40px 1fr;gap:8px;padding:8px}
body.phone .biz .bi{width:40px;height:40px}
body.phone .biz .bi .px{width:28px;height:28px}
body.phone .biz b{font-size:15px}
body.phone .biz small{font-size:9px}

/* directory and the floor sheet */
body.phone .lift{padding:14px 10px 18px}
body.phone .floors{gap:10px 4px}
body.phone .chrow{gap:4px;padding:8px}
body.phone .chrow canvas{height:44px}
body.phone .chrow span{font-size:9px;padding:1px 3px}
.psheet{position:fixed;inset:0;z-index:40;background:rgba(18,10,7,.62);display:flex;align-items:flex-end;justify-content:center;opacity:0;transition:opacity .2s}
.psheet.on{opacity:1}
.psheet[hidden]{display:none}
.psheet-in{width:100%;max-width:600px;max-height:86vh;overflow:auto;padding:10px 16px max(16px,env(safe-area-inset-bottom));border-radius:10px 10px 0 0;background:url(../assets/ui/paper.png) 0 0/128px,var(--d-paper);image-rendering:pixelated;color:var(--d-ink);transform:translateY(100%);transition:transform .22s ease-out;box-shadow:0 -10px 30px rgba(0,0,0,.5)}
.psheet.on .psheet-in{transform:none}
.psheet-in .grip{display:block;width:40px;height:6px;margin:0 auto 10px;background:url(../assets/ui/phone/sheet-grip.png) 0 0/40px 6px}
.psheet-in .dp{box-shadow:none;background:none;padding:0}
.psheet-in .dp:after{display:none}
.pprof{display:grid;grid-template-columns:64px 1fr;gap:12px;align-items:center;padding:4px 0 12px;border-bottom:2px solid var(--d-ink)}
.pprof canvas{width:64px;height:64px;image-rendering:pixelated;border:3px solid var(--br5)}
.pprof h2{margin:2px 0 6px;font:700 22px var(--disp)}
.prow{width:100%;display:grid;grid-template-columns:40px 1fr auto;gap:12px;align-items:center;padding:12px 4px;background:none;border:0;border-bottom:1px solid rgba(74,59,44,.22);text-align:left;color:var(--d-ink);font:700 22px var(--disp);cursor:pointer}
.prow .px{width:36px;height:36px}
.prow b{display:block;font:700 18px var(--disp)}
.prow small{font:500 10px var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--d-ink3)}
.psheet-in .dfoot{color:var(--d-ink3);opacity:1;margin:14px 0 0}

/* the annual report in rows */
body.phone .cover h2{font-size:30px}
body.phone .cover .bl{font-size:20px}
body.phone .cover .bigp{font-size:60px}
body.phone .foilbox{grid-template-columns:48px 1fr;padding:12px}
body.phone .foilbox img.seal{width:48px;height:48px}
body.phone .foilbox h3{font-size:20px}
body.phone .stmt-tabs .stab{font-size:14px;height:38px;padding:0}
body.phone .dr-grid .dp-h,body.phone .dpn-grid .dp-h{flex-wrap:wrap;row-gap:8px}
body.phone .dpn-grid .stab{font-size:13px;height:36px;padding:0}
.srows{display:flex;flex-direction:column}
.srow2{display:grid;grid-template-columns:54px minmax(0,1fr) 84px;gap:8px;align-items:center;min-height:78px;padding:6px 2px;border-bottom:1px solid rgba(74,59,44,.22)}
.srow2 .pg b{display:block;font:700 20px/1 var(--disp)}.srow2 .pg small{font:400 9px var(--mono);color:var(--d-ink3)}
.srow2 .rw2{display:flex;flex-direction:column;gap:4px;min-width:0}
.srow2 .rw2>div{display:flex;align-items:center;gap:6px;padding:3px 4px}
.srow2 .rw2>.g{background:rgba(226,194,122,.35)}
.srow2 .rwc{display:flex;align-items:center;gap:6px;font:400 12px/1.2 var(--body);min-width:0}
.srow2 .rwc .px,.srow2 .rwc canvas{width:24px;height:24px;flex:none;image-rendering:pixelated}
.srow2 .rwc b{font:600 12px var(--mono);display:block}
.srow2 .lk{width:14px;height:14px;opacity:.6;margin-left:auto}
.srow2 .st2{text-align:center}
.srow2 .stamp-img{height:30px}
.srow2 .stat-c{font-size:9px}
.srow2.now{background:rgba(251,244,226,.85);box-shadow:inset 3px 0 0 var(--bur6)}

/* personnel: who you picked, then the grid, then the frames */
body.phone .dpn-grid>div:last-child{display:contents}
body.phone .dpn-grid .pdetp{order:-1}
body.phone .dpn-grid .framesp{order:2}
body.phone .sgrid{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
body.phone .sg small{font-size:8px}
body.phone .pdet{grid-template-columns:84px 1fr;gap:10px}
body.phone .pdet>canvas{width:84px;height:84px}
body.phone .pdet h2{font-size:22px}
body.phone .fr2>img{width:100%;height:auto}
body.phone .fr2 b{font-size:12px}

/* mailroom */
body.phone .tcg{gap:4px}
body.phone .tcd{aspect-ratio:auto;height:58px}
body.phone .tcd .px{width:22px;height:22px}

/* wardrobe and settings */
body.phone .wstage{height:280px;margin:-4px -6px 10px}
body.phone .witems{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body.phone .wi{min-height:0;padding:8px}
body.phone .wi>.px{width:32px;height:32px}
body.phone .gitems{grid-template-columns:minmax(0,1fr);gap:8px}
body.phone .gitems .wi{display:grid;grid-template-columns:40px 1fr auto;gap:4px 10px;align-items:center}
body.phone .gitems .wi p{grid-column:2}
body.phone .gitems .wi .dbtn{grid-column:3;grid-row:1 / span 2}
body.phone .srow{grid-template-columns:1fr}

/* the room: HUD on top, Hold and the drawer at the bottom (both screens) */
#hud.hud2{position:fixed;left:0;right:0;top:0;z-index:6;display:flex;justify-content:space-between;align-items:flex-start;gap:10px;padding:max(10px,env(safe-area-inset-top)) 12px 0;pointer-events:none;font-family:var(--mono)}
#hud.hud2[hidden]{display:none}
.hrow{display:flex;gap:6px;align-items:stretch}
.hchip{background:rgba(26,14,10,.84);border:1px solid var(--br7);box-shadow:inset 0 0 0 1px rgba(226,194,122,.14);border-radius:3px;padding:6px 10px;color:var(--d-paper);min-width:0}
.hchip small{display:block;font:500 9px var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--br3)}
.hchip b{font:600 18px var(--mono);color:var(--d-paperhi);white-space:nowrap}
.hroom b{font:700 18px var(--disp)}
.hroom span{font:500 10px var(--mono);color:#c9a98a;margin-left:6px;white-space:nowrap}
#hRisk{color:#8fd8a6}
.hmusic{display:flex;align-items:center;gap:8px}
.hmusic .px{width:22px;height:22px}
.hmusic b{font-size:14px}
.hmusic.silence{background:rgba(110,34,36,.92);border-color:var(--bur5)}
.hmusic.silence .px{opacity:.5}
body.phone #hud.hud2{flex-direction:column;align-items:stretch;gap:6px;padding:max(8px,env(safe-area-inset-top)) 10px 0}
body.phone .hrow.top{padding-left:54px}
body.phone .hrow.top .hchip{flex:1}
body.phone .hrow.money{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.holdb{display:none}
body.phone .holdb{display:grid;place-items:center;position:fixed;right:14px;bottom:calc(max(14px,env(safe-area-inset-bottom)) + 4px);width:120px;height:120px;border:0;padding:0;background:url(../assets/ui/phone/hold-button-idle.png) 0 0/120px;image-rendering:pixelated;font:700 26px var(--disp);color:var(--d-ink);pointer-events:auto;touch-action:none;z-index:7}
body.phone .holdb.down{background-image:url(../assets/ui/phone/hold-button-pressed.png);padding-top:4px}
body.phone #quit{position:fixed;left:10px;top:max(8px,env(safe-area-inset-top));width:44px;height:44px;border:0;padding:0;background:url(../assets/ui/phone/exit-button.png) 0 0/44px;image-rendering:pixelated;color:transparent;font-size:0;z-index:8}
body.phone #gadget{position:fixed;left:14px;bottom:calc(max(14px,env(safe-area-inset-bottom)) + 26px);width:64px;height:64px;border:0;border-radius:0;padding:0;display:grid;place-items:center;background:url(../assets/ui/phone/gadget-button.png) 0 0/64px;image-rendering:pixelated;box-shadow:none;z-index:7}
body.phone #gadget:disabled{background-image:url(../assets/ui/phone/gadget-button-empty.png)}
body.phone #gadget .px{width:36px;height:36px}
body.phone #gadget:disabled .px{opacity:.45}
body.phone #gadget.ready{filter:drop-shadow(0 0 8px rgba(240,212,138,.9))}
#gadget .gname{position:absolute;left:50%;bottom:-14px;transform:translateX(-50%);padding:1px 6px;font:600 9px var(--mono);letter-spacing:.1em;text-transform:uppercase;white-space:nowrap;color:var(--br1);background:rgba(26,14,10,.85);border:1px solid var(--br7);border-radius:2px}
body.phone #hint:not(:empty){position:fixed;left:50%;transform:translateX(-50%);bottom:calc(max(14px,env(safe-area-inset-bottom)) + 132px);width:calc(100% - 32px);max-width:420px;background:url(../assets/ui/paper.png) 0 0/128px,var(--d-paper);color:var(--d-ink);font:400 13px/1.4 var(--body);text-align:center;padding:8px 12px;border:1px solid var(--d-edge);box-shadow:0 4px 12px rgba(0,0,0,.5)}
body.phone #loiter{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(max(14px,env(safe-area-inset-bottom)) + 124px)}

/* the newspaper, the vote and the end on a phone */
body.phone .paper.news2{width:calc(100% - 12px);padding:14px 12px;transform:rotate(-.8deg)}
body.phone .news2 .nm{grid-template-columns:1fr}
body.phone .news2 .nm span{display:none}
body.phone .news2 .nm b{font-size:38px}
body.phone .news2 h2{font-size:25px}
body.phone .news2 .cols{grid-template-columns:1fr;gap:10px}
body.phone .news2 .ft2{flex-direction:column;gap:8px;align-items:stretch}
body.phone .sheet.vote3{width:calc(100% - 32px);padding:16px 12px 14px}
body.phone .vote3 h2{font-size:21px;line-height:1.15}
body.phone .vote3 .two{grid-template-columns:1fr 1fr;gap:8px;margin:12px 0 2px}
body.phone .vote3 .two button{min-height:0;padding:10px;gap:4px;border-width:2px;box-shadow:0 3px 0 var(--d-ink)}
body.phone .vote3 .two .px{width:26px;height:26px}
body.phone .vote3 .two b{font-size:20px}
body.phone .vote3 .two p{font-size:12px;line-height:1.3}
body.phone .vote3 .two small{display:none}
body.phone .sheet.end{padding:14px}
