/* [h5] The phone HUD held sideways (public/js/h5.js): four small corners and one notice lane, the middle of the screen left to the world.
   Every rule hangs off html.h5, which h5.js sets only on a touch screen held sideways and at most 500 px tall, so desktops and tablets
   look exactly as before. Linked last in index.html, after the earlier phone fixes (theme.css rot1, mob-a..d, h1..h3), which it overrides.
   Edges use max(Npx, env(safe-area-inset-*)) so nothing sits under the notch or the home bar. Only transform and opacity animate, and
   nothing uses backdrop blur over the game (slow on budget phones). */

/* ---------------- what leaves the screen (it lives in the phone, the lane or the action button now) ---------------- */
html.h5 #head,html.h5 #btns,html.h5 #abar,html.h5 #bBell,html.h5 #joy,html.h5 #prompt,html.h5 #prompt2,html.h5 .hx-prompt.hx-touch,
html.h5 #glBar,html.h5 #tkHud,html.h5 #gwNudge,html.h5 #quizPill,html.h5 #badgepop,html.h5 #banner,html.h5 #toasts,html.h5 #homeLifeBtn,
html.h5 #more,html.h5 #spacer{display:none!important}
html.h5 #office:not(.hud-open) #left{display:none!important}
html.h5 #hud{padding:0}

/* ---------------- top left: you (one mood ring), the low needs, the goal ---------------- */
html.h5 #h5Top{position:fixed;left:max(8px,env(safe-area-inset-left,0px));top:max(6px,env(safe-area-inset-top,0px));z-index:40;display:flex;flex-direction:column;align-items:flex-start;gap:0;pointer-events:none}
html.h5 #h5Top>*{pointer-events:auto}
html.h5 #h5Top .h5-row{display:flex;align-items:center;gap:6px;pointer-events:none}
html.h5 #h5Top .h5-row>*{pointer-events:auto}
html.h5 #h5You{height:44px;display:flex;align-items:center;gap:8px;padding:3px 14px 3px 3px;border-radius:22px;background:var(--raised);border:1px solid var(--line-strong);box-shadow:var(--shadow-sm);color:var(--fg);font:700 14px var(--body);max-width:190px;cursor:pointer}
html.h5 #h5You .h5-ring{--rc:var(--good);flex:none;width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--rc) var(--p,100%),var(--inset) 0)}
html.h5 #h5You .h5-ring[data-l=mid]{--rc:var(--warn)}
html.h5 #h5You .h5-ring[data-l=lo]{--rc:var(--bad)}
html.h5 #h5You .h5-av{width:30px;height:30px;border-radius:50%;background:var(--note);color:#fff;display:grid;place-items:center;font:700 15px/1 var(--display)}
html.h5 #h5You .h5-nm{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
html.h5 #h5Low{display:flex;gap:6px}
html.h5 #h5Low:empty{display:none}
html.h5 .h5-lo{height:44px;min-width:44px;padding:0 10px;border-radius:22px;background:#F9DAD4;color:var(--bad);border:1px solid var(--bad);display:flex;align-items:center;justify-content:center;gap:4px;font:700 14px var(--body);box-shadow:var(--shadow-sm);animation:h5pop .25s ease-out}
html.h5 .h5-lo svg{width:18px;height:18px;flex:none}
@keyframes h5pop{from{transform:scale(.6);opacity:0}to{transform:none;opacity:1}}
/* the goal: one line under the chip, never wider than the left fifth of the screen (the middle stays clear) */
html.h5 #h5Goal{min-height:44px;max-width:calc(20vw - 8px);display:flex;align-items:flex-start;background:none;border:0;padding:2px 0 0;cursor:pointer;color:var(--fg)}
html.h5 #h5Goal .h5-gt{display:block;max-width:100%;padding:4px 10px;border-radius:12px;background:var(--panel);border:1px solid var(--line);box-shadow:var(--shadow-sm);font:600 13px/1.2 var(--body);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.h5 #h5Goal b{color:var(--note-text)}
html.h5 #h5Goal[hidden]{display:none}

/* ---------------- top right: Phone, Chat, Map (44 px and more, 8 px apart) ---------------- */
html.h5 #h5Btns{position:fixed;right:max(8px,env(safe-area-inset-right,0px));top:max(6px,env(safe-area-inset-top,0px));z-index:960;display:flex;gap:8px}
html.h5 #h5Btns[hidden]{display:none}
/* [fix1] the food-place / KR Market pill fits between your badge (190 px at most) and Phone / Chat / Map (186 px): the name keeps its room,
   the stage line shrinks first (and steps aside when there are three buttons or more), and every button stays tappable */
html.h5 .bz-hud{left:calc(max(8px,env(safe-area-inset-left,0px)) + 198px);right:calc(max(8px,env(safe-area-inset-right,0px)) + 186px);top:max(6px,env(safe-area-inset-top,0px));transform:none;width:auto;max-width:max-content;min-width:0;margin:0 auto;gap:6px;padding:3px 4px 3px 12px}
html.h5 .bz-hud b{flex:0 1 auto;min-width:48px;max-width:150px}
html.h5 .bz-hud span{flex:0 100 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
html.h5 .bz-hud span.st{flex:none}
html.h5 .bz-hud:has(button:nth-of-type(3)) span:not(.st){display:none}
html.h5 .bz-hud button{flex:none;min-height:40px;min-width:40px;padding:4px 11px;display:inline-flex;align-items:center;justify-content:center}
html.h5 .h5-b{position:relative;width:54px;height:50px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;border-radius:14px;background:var(--raised);border:1px solid var(--line-strong);box-shadow:var(--shadow-sm);color:var(--fg);cursor:pointer;padding:0}
html.h5 .h5-b[hidden]{display:none}
html.h5 .h5-b .h5-i{display:grid;place-items:center;line-height:0;color:var(--note)}
html.h5 .h5-b .h5-l{font:700 13px/1.1 var(--body)}
html.h5 .h5-b:active{transform:translateY(1px)}
html.h5 .h5-badge{position:absolute;top:-6px;right:-6px;min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:var(--bad);color:#fff;font:700 13px/22px var(--body);text-align:center;box-shadow:0 0 0 2px var(--raised)}
html.h5 .h5-badge[hidden],html.h5 .h5-badge:empty{display:none}
html:not(.h5) #h5Btns,html:not(.h5) #h5Note,html:not(.h5) #h5Bub,html:not(.h5) #h5Top,html:not(.h5) #h5Act,html:not(.h5) #h5Joy,html:not(.h5) #h5Sh,html:not(.h5) #h5GoJob{display:none!important}
/* the newest chat line, for a moment, under the buttons */
html.h5 #h5Bub{position:fixed;right:max(8px,env(safe-area-inset-right,0px));top:calc(max(6px,env(safe-area-inset-top,0px)) + 58px);z-index:959;max-width:min(240px,34vw);padding:6px 12px;border-radius:14px 4px 14px 14px;background:var(--raised);border:1px solid var(--line-strong);box-shadow:var(--shadow-sm);color:var(--fg);font:500 13px/1.3 var(--body);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;animation:h5in .2s ease-out}
html.h5 #h5Bub[hidden]{display:none}
html.h5 #h5Bub b{color:var(--note-text)}
@keyframes h5in{from{transform:translateY(-6px);opacity:0}to{transform:none;opacity:1}}

/* ---------------- top centre: the notice lane, one line at a time ---------------- */
html.h5 #h5Note{position:fixed;top:max(6px,env(safe-area-inset-top,0px));left:var(--h5ll,50%);width:var(--h5lw,360px);z-index:965;min-height:44px;display:flex;align-items:center;gap:8px;padding:4px 6px 4px 12px;border-radius:14px;background:var(--raised);color:var(--fg);border:1px solid var(--line-strong);box-shadow:var(--shadow-sm);font:500 13.5px/1.25 var(--body);cursor:pointer;animation:h5in .2s ease-out;transition:opacity .2s,transform .2s;flex-wrap:wrap}
html.h5 #h5Note[hidden]{display:none}
html.h5 #h5Note.out{opacity:0;transform:translateY(-8px)}
html.h5 #h5Note.p2{border-color:var(--cool)}
html.h5 #h5Note.p3,html.h5 #h5Note.ok{border-color:var(--good);background:#EEF7F0}
html.h5 #h5Note.p4{border-color:var(--bad);background:#FBEDE9}
html.h5 #h5Note .h5-ni{flex:none;display:grid;place-items:center;line-height:0;color:var(--note)}
html.h5 #h5Note.p3 .h5-ni,html.h5 #h5Note.ok .h5-ni{color:var(--good)}
html.h5 #h5Note .h5-nt{flex:1 1 0;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.h5 #h5Note .h5-nt b{font-weight:700}
html.h5 #h5Note .h5-nn{flex:none;font:700 13px var(--body);color:var(--dim)}
html.h5 #h5Note .h5-nn:empty{display:none}
html.h5 #h5Note .h5-na{flex:none;min-height:44px;margin:-4px 0;min-width:44px;padding:0 12px;border-radius:10px;border:0;background:var(--note);color:#fff;font:700 13px var(--body);cursor:pointer}
html.h5 #h5Note .h5-na[hidden]{display:none}
html.h5 #h5Note .h5-nx{display:none;flex:1 0 100%;justify-content:flex-end;gap:8px;padding:2px 0 2px}
html.h5 #h5Note .h5-nall{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 12px;border-radius:10px;border:1px solid var(--line-strong);background:var(--btn-bg);color:var(--fg);font:700 13px var(--body);cursor:pointer}
/* tapped: the whole line, and the way to every notice */
html.h5 #h5Note.open .h5-nt{white-space:normal;max-height:9em;overflow:auto}
html.h5 #h5Note.open .h5-nx{display:flex}
html.h5 #h5Note.open{z-index:1300}
/* on the city map the lane sits just under the map's own buttons, and over the phone it sits over the phone's top */
html.h5.h5-city #h5Note{top:calc(max(6px,env(safe-area-inset-top,0px)) + 58px)}

/* ---------------- bottom right: the action button ---------------- */
html.h5 #h5Act{position:fixed;right:max(12px,env(safe-area-inset-right,0px));bottom:max(8px,env(safe-area-inset-bottom,0px));z-index:45;display:flex;align-items:flex-end;gap:8px;pointer-events:none}
html.h5 #h5Act[hidden],html.h5 #h5Act [hidden]{display:none!important}
html.h5 #h5Act>*{pointer-events:auto}
html.h5 #h5Do{min-width:64px;max-width:min(190px,24vw);height:56px;padding:4px 16px;border-radius:18px;border:0;background:var(--note);color:#fff;box-shadow:var(--accent-shadow),0 6px 16px -6px rgba(58,34,16,.6);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:manipulation}
html.h5 #h5Do b{font:800 17px/1.1 var(--body);white-space:nowrap}
html.h5 #h5Do span{font:600 13px/1.2 var(--body);max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:.92}
html.h5 #h5Do span:empty{display:none}
html.h5 #h5Do:active{transform:translateY(2px)}
html.h5 .h5-alt{min-width:48px;padding:0 4px;height:56px;border-radius:14px;border:1px solid var(--line-strong);background:var(--raised);color:var(--fg);display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;padding:0;box-shadow:var(--shadow-sm)}
html.h5 .h5-alt .h5-i{display:grid;place-items:center;line-height:0}
html.h5 .h5-alt .h5-l{font:700 13px/1.1 var(--body)}
html.h5 #h5Speak{height:56px;min-width:56px;padding:0 10px;border-radius:18px;border:1px solid var(--cool);background:var(--raised);color:var(--cool);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;cursor:pointer;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;box-shadow:var(--shadow-sm)}
html.h5 #h5Speak .h5-i{line-height:0}
html.h5 #h5Speak .h5-l{font:700 13px/1.1 var(--body);white-space:nowrap}
html.h5 #h5Speak.on{background:var(--cool);color:#fff}
/* the other choices (Talk and Use, Type to them): a short list above the button */
html.h5 #h5Choices{position:absolute;right:0;bottom:64px;display:flex;flex-direction:column;gap:6px;min-width:200px;max-width:min(300px,40vw);padding:6px;border-radius:14px;background:var(--raised);border:1px solid var(--line-strong);box-shadow:var(--shadow-lg)}
html.h5 .h5-ch{min-height:44px;display:flex;align-items:baseline;gap:6px;padding:6px 12px;border-radius:10px;border:1px solid var(--line);background:var(--btn-bg);color:var(--fg);font:500 13.5px var(--body);text-align:left;cursor:pointer}
html.h5 .h5-ch b{font-weight:800;color:var(--note-text)}
html.h5 .h5-ch span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ---------------- bottom left: the stick appears under the thumb ---------------- */
html.h5 #h5Joy{position:absolute;left:0;bottom:0;width:45%;top:calc(max(6px,env(safe-area-inset-top,0px)) + 100px);z-index:2;touch-action:none}
html.h5 #h5Joy .h5-jr{position:fixed;width:112px;height:112px;margin:-56px 0 0 -56px;border-radius:50%;background:rgba(255,253,248,.28);border:2px solid rgba(255,253,248,.75);box-shadow:0 4px 18px rgba(0,0,0,.25);pointer-events:none}
html.h5 #h5Joy .h5-jr[hidden]{display:none}
html.h5 #h5Joy .h5-jr i{position:absolute;left:50%;top:50%;width:48px;height:48px;margin:-24px 0 0 -24px;border-radius:50%;background:var(--note);box-shadow:0 2px 8px rgba(0,0,0,.35)}

/* ---------------- the sheets: needs and jobs, chat (the old Panels card) from the right ---------------- */
html.h5 #office.hud-open #left{align-self:stretch!important;justify-self:stretch!important;position:fixed!important;top:0!important;right:0!important;bottom:0!important;left:auto!important;width:max(300px,40vw)!important;max-width:none!important;max-height:none!important;height:auto!important;margin:0!important;z-index:950;display:flex!important;flex-direction:column;gap:6px;overflow-y:auto;overscroll-behavior:contain;padding:max(6px,env(safe-area-inset-top,0px)) max(10px,env(safe-area-inset-right,0px)) max(8px,env(safe-area-inset-bottom,0px)) 12px!important;border-radius:16px 0 0 16px!important;background:var(--raised)!important;border:0!important;border-left:1px solid var(--line-strong)!important;box-shadow:-10px 0 30px -12px rgba(58,34,16,.5)!important;animation:h5sheet .22s ease-out;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;transform:none!important}
@keyframes h5sheet{from{transform:translateX(30px);opacity:0}to{transform:none;opacity:1}}
html.h5 #office.hud-open #left>*{flex:none}
html.h5 #h5Sh{display:flex;align-items:center;gap:8px;order:-2;position:sticky;top:calc(-1 * max(6px,env(safe-area-inset-top,0px)));background:var(--raised);z-index:2;padding-top:2px}
html.h5 #h5Sh .h5-sht{flex:1;min-width:0;font:700 16px var(--display);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.h5 .h5-x{flex:none;width:44px;height:44px;border-radius:12px;border:1px solid var(--line-strong);background:var(--btn-bg);color:var(--fg);display:grid;place-items:center;cursor:pointer;padding:0}
html.h5 .h5-x .h5-l{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
html.h5 #office.hud-open #left .ltabs{order:-1;position:static!important;margin:0!important}
html.h5 #office.hud-open #left .ltabs button{min-height:44px}
html.h5 #h5GoJob{margin-top:8px;min-height:44px;display:inline-flex;align-items:center;gap:6px;padding:0 14px;border-radius:12px;border:0;background:var(--note);color:#fff;font:700 14px var(--body);cursor:pointer}
html.h5 #h5GoJob .h5-i{line-height:0}
html.h5 #office.hud-open #left #chatLog{max-height:none!important;min-height:120px}
html.h5 #office.hud-open #left[data-tab=chat] #chat{flex:1 1 auto!important;display:flex!important;flex-direction:column}
html.h5 #office.hud-open #left[data-tab=chat] #chatLog{flex:1 1 auto;overflow-y:auto}
html.h5 #office.hud-open #left #needs .nlb{font-size:13px}
/* the goals card, Today and Meera's "Before you go": side sheets too, the world still in view on the left */
html.h5 body:not(.phone-on) #mwrap[data-kind=goals],html.h5 body:not(.phone-on) #mwrap[data-kind=leave]{inset:0 0 0 auto!important;width:max(330px,44vw)!important;padding:0!important;background:transparent!important;align-items:stretch!important;justify-content:flex-end!important}
html.h5 body:not(.phone-on) #mwrap[data-kind=goals]>.card,html.h5 body:not(.phone-on) #mwrap[data-kind=leave]>.card{width:100%!important;max-width:none!important;max-height:none!important;height:100%;margin:0!important;border-radius:16px 0 0 16px!important;overflow-y:auto;padding-top:max(10px,env(safe-area-inset-top,0px))!important;padding-right:max(12px,env(safe-area-inset-right,0px))!important;animation:h5sheet .22s ease-out;box-shadow:-10px 0 30px -12px rgba(58,34,16,.5)}
html.h5 #mwrap .lv-x,html.h5 #mwrap .td-x{min-width:44px;min-height:44px}
html.h5 #tdCard{position:fixed!important;top:0!important;right:0!important;bottom:0!important;left:auto!important;height:auto!important;max-height:none!important;margin:0!important;width:max(320px,42vw)!important;max-width:none!important;transform:none!important;border-radius:16px 0 0 16px!important;overflow-y:auto;z-index:970;padding-top:max(10px,env(safe-area-inset-top,0px))!important;padding-right:max(12px,env(safe-area-inset-right,0px))!important;animation:h5sheet .22s ease-out}
html.h5 #tdCard .td-x{min-width:44px;min-height:44px}
html.h5 #ntCard{top:auto!important;bottom:max(8px,env(safe-area-inset-bottom,0px))!important}

/* ---------------- the phone: the hub, full screen ---------------- */
html.h5 body.phone-on #mwrap{inset:max(6px,env(safe-area-inset-top,0px)) max(8px,env(safe-area-inset-right,0px)) max(6px,env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left,0px))!important;width:auto!important;max-width:none!important}
html.h5 #mwrap .h5-ml{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px;margin-top:8px}
html.h5 #mwrap .h5-mi{min-height:44px;padding:8px 12px;border-radius:12px;border:1px solid var(--line-strong);background:var(--btn-bg);color:var(--fg);font:600 14px var(--body);text-align:left;cursor:pointer}

/* ---------------- Meera: one slim coach mark ---------------- */
html.h5 #gdDock.h5-coach{position:fixed;max-width:none;margin:0}
html.h5 #gdDock.h5-coach .gd-por{display:none}
html.h5 #gdDock.h5-coach.gd-compact .gd-box{padding:4px 4px 4px 12px;min-height:0;max-height:56px;box-sizing:border-box}
html.h5 #gdDock.h5-coach.gd-compact .gd-why,html.h5 #gdDock.h5-coach.gd-compact .gd-prog{display:none}
html.h5 #gdDock.h5-coach.gd-compact .gd-text{-webkit-line-clamp:2;font-size:13px;line-height:1.3}
html.h5 #gdDock.h5-coach.gd-compact .gd-skip,html.h5 #gdDock.h5-coach.gd-compact .gd-next,html.h5 #gdDock.h5-coach.gd-compact .gd-act,html.h5 #gdDock.h5-coach.gd-compact .gd-x:not(.gd-spk){grid-row:1}
html.h5 #gdDock.h5-coach .gd-row button{min-height:44px}
html.h5 #gdDock.h5-coach.gd-open{max-height:calc(100dvh - 16px);overflow:auto}

/* ---------------- the map: the three buttons stay; the filter chips stop short of them ---------------- */
html.h5.h5-city #city .leaflet-top.leaflet-right{right:calc(max(8px,env(safe-area-inset-right,0px)) + 186px)}
html.h5.h5-city #city .mapf{max-width:calc(100vw - max(8px,env(safe-area-inset-right,0px)) - 186px - 130px)!important}
html.h5.h5-city .h5-badge{display:none}

/* ---------------- calls: a slim bar at the bottom, clear of the middle and of the top lane ---------------- */
html.h5 .fcall-bar{top:auto!important;bottom:max(8px,env(safe-area-inset-bottom,0px))!important;left:50%!important;transform:translateX(-50%)!important;max-width:min(360px,calc(100vw - 360px))}

/* ---------------- typing: the keyboard takes most of the height, everything else steps aside ---------------- */
html.h5.typing #h5Top,html.h5.typing #h5Btns,html.h5.typing #h5Act,html.h5.typing #h5Note,html.h5.typing #h5Bub,html.h5.typing #h5Joy{display:none!important}

/* ---------------- Meera's tour: each button appears when she introduces it ---------------- */
html.h5.h5-no-you #h5You,html.h5.h5-no-you #h5Low,html.h5.h5-no-goal #h5Goal,html.h5.h5-no-phone #h5Phone,html.h5.h5-no-chat #h5Chat,html.h5.h5-no-map #h5Map{display:none!important}
/* typing in the floor chat: the log and the box fill what the keyboard leaves, from the top down (the log never runs off the top) */
html.h5.typing #left.deck>#chat:has(#chatIn:focus){top:max(4px,env(safe-area-inset-top,0px))!important;bottom:calc(var(--kb,0px) + 4px)!important;height:auto!important;max-height:none!important;display:flex!important;flex-direction:column}
html.h5.typing #left.deck>#chat:has(#chatIn:focus) #chatLog{flex:1 1 auto;min-height:0!important;max-height:none!important;overflow-y:auto}
html.h5.typing #left.deck>#chat:has(#chatIn:focus) h3{display:none}
/* the close button the goals sheet gets at its top */
html.h5 #mwrap .h5-cx{position:sticky;top:0;float:right;margin:0 0 4px 8px;z-index:3;background:var(--raised)}
/* Before you go, as a side sheet: one column (Meera's words, then the number and the buttons) */
html.h5 body:not(.phone-on) #mwrap[data-kind=leave] .lv-card{grid-template-columns:minmax(0,1fr)!important;align-content:start}
/* its answer buttons stay in view at the bottom of the sheet while Meera's words and the form scroll */
html.h5 body:not(.phone-on) #mwrap[data-kind=leave] .lv-row{position:sticky;bottom:-10px;z-index:2;background:var(--surface);padding:6px 0 4px;margin-bottom:-4px}
/* face-to-face conversation bar: along the bottom edge, between the stick's corner and the action button, not over the middle */
html.h5 .hx-cbar{bottom:max(8px,env(safe-area-inset-bottom,0px))!important;max-width:min(460px,calc(100vw - 2 * 170px))!important}

/* ---------------- [h8-sheet] a place's card on the map: a sheet on the right, never a popup cut off by the screen's top ----------------
   main.js mapSheet(): the card's words scroll inside, its buttons stay pinned at the bottom, the map stays live on the left. */
html:not(.h5) #mapSheet,html.h5 body:has(#city[hidden]) #mapSheet,html.h5 #mapSheet[hidden]{display:none!important}
html.h5 #mapSheet{position:fixed;top:0;right:0;bottom:0;width:min(44vw,400px);min-width:280px;z-index:962;display:flex;flex-direction:column;background:var(--raised);border-left:1px solid var(--line-strong);border-radius:16px 0 0 16px;box-shadow:var(--shadow-lg);padding:max(6px,env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) max(8px,env(safe-area-inset-bottom,0px)) 14px;box-sizing:border-box;animation:h5sheet .2s ease-out;color:var(--fg)}
html.h5 #mapSheet .ms-head{flex:none;display:flex;align-items:flex-start;gap:8px;padding-bottom:6px;border-bottom:1px solid var(--line)}
html.h5 #mapSheet .ms-tt{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px;padding-top:2px}
html.h5 #mapSheet .ms-tt small{font:700 12px/1.2 var(--body);text-transform:uppercase;letter-spacing:.04em;color:var(--note-text)}
html.h5 #mapSheet .ms-tt small:empty{display:none}
html.h5 #mapSheet .ms-tt b{font:700 17px/1.2 var(--display);overflow-wrap:anywhere}
html.h5 #mapSheet .ms-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:8px 2px 8px 0}
html.h5 #mapSheet .ms-body .pop{min-width:0;gap:7px;color:var(--fg)}
html.h5 #mapSheet .ms-body .pop>b:first-child{display:none}
html.h5 #mapSheet .ms-body .pop span{font-size:13.5px;line-height:1.35;color:var(--dim)}
html.h5 #mapSheet .ms-body .pop span:empty{display:none}
html.h5 #mapSheet .ms-foot{flex:none;display:flex;flex-wrap:wrap;gap:8px;padding-top:8px;border-top:1px solid var(--line)}
html.h5 #mapSheet .ms-foot[hidden]{display:none}
html.h5 #mapSheet .ms-foot .hb{flex:1 1 120px;min-height:48px;margin:0;font:700 14.5px var(--body);border-radius:12px}
html.h5 #mapSheet .ms-foot .hb.sel{flex-basis:100%}

/* [minor2] touch targets in the phone's apps: at least 40 px on a sideways phone (Friends pills, Hearts chips, Alerts chips and links) */
html.h5 .fr-pill{min-height:40px}
html.h5 .hr-chip{min-height:40px;box-sizing:border-box;display:inline-flex;align-items:center}
html.h5 .nt-go{min-height:40px}
html.h5 .nt-chip{min-height:40px;min-width:44px}
/* a chat line from another player can be reported: a taller line and a word that says so (there is no hover on a phone) */
html.h5 #chatLog>.rp-line{padding-block:7px}
html.h5 #chatLog>.rp-line::after{content:' · Report';font-size:11px;opacity:.55}
/* Before you go: the two answers stay at the bottom of the side sheet while the words above scroll */
html.h5 body:not(.phone-on) #mwrap[data-kind=leave] .lv-row{position:sticky;bottom:-10px;z-index:1;background:var(--surface);padding:8px 0 10px;margin-bottom:-10px}
/* [m3] Teji order pad on a phone: the quantity and order-type buttons are tappable (40 px) */
html.h5 .tj-quick button,html.h5 .tj-types button{min-height:40px}
