/* =====================================================================
   MOBILE — phones & tablets (body.mobile). Landscape-first HUD, thumb
   controls, full-screen windows, compact menus. Portrait gameplay asks
   the player to rotate; menus work in both orientations.
   ===================================================================== */
body.mobile, body.mobile * { -webkit-tap-highlight-color: transparent; }
body.mobile { overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.mobile input, body.mobile textarea { -webkit-user-select: text; user-select: text; }
body.mobile #gl { touch-action: none; }
body.mobile #tip { display: none !important; }

/* ------------------------------ HUD ------------------------------ */
body.mobile #abar, body.mobile #zone2, body.mobile #mmInfo { display: none !important; }
/* top-left column (built in hud.js): online count, world event, then the quest tracker */
body.mobile #mStack { position: absolute; left: max(10px, env(safe-area-inset-left)); top: 78px; width: 190px; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
body.mobile #mStack > #mpChip, body.mobile #mStack > #evChip, body.mobile #mStack > #tracker, body.mobile #mStack > #actHud { position: static !important; left: auto !important; right: auto !important; top: auto !important; transform: none !important; width: auto !important; min-width: 0 !important; max-width: none !important; }
body.mobile #mStack > #mpChip { font-size: 10.5px; } body.mobile #mStack > #mpChip:empty { display: none; }
body.mobile #mStack > #evChip { font-size: 10.5px; line-height: 1.3; }
body.mobile #mStack > #actHud { padding: 7px 9px; text-align: left; }
body.mobile #mStack > #actHud .at { font-size: 12px; }
body.mobile #pframe { left: max(10px, env(safe-area-inset-left)); top: 8px; gap: 8px; }
body.mobile #pframe .por { width: 44px; height: 44px; font-size: 20px; }
body.mobile #pframe .lvl { min-width: 20px; height: 20px; font-size: 11px; right: -5px; bottom: -3px; }
body.mobile #pframe .bars { width: 150px; }
body.mobile #pframe .nm { font-size: 13px; } body.mobile #pframe .nm small { display: none; }
body.mobile #pframe .bar { height: 12px; margin-top: 3px; } body.mobile #pframe .bar b { font-size: 9px; }
body.mobile #pframe .bar.en { height: 6px; }
body.mobile #buffs { transform: scale(.8); transform-origin: left top; }
body.mobile #money { left: calc(max(10px, env(safe-area-inset-left)) + 52px); right: auto; top: 60px; bottom: auto; font-size: 12px; }
body.mobile #mapwrap { right: max(8px, env(safe-area-inset-right)); top: 6px; width: 112px; pointer-events: auto; }
body.mobile #zone { font-size: 10px; letter-spacing: .08em; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.mobile #mm { width: 100px; height: 100px; box-shadow: 0 0 0 3px rgba(8, 14, 26, .6); }
body.mobile #tracker { left: max(10px, env(safe-area-inset-left)); right: auto; top: 78px; width: 190px; pointer-events: auto; }
body.mobile #tracker .tq { padding: 6px 8px; margin-bottom: 4px; }
body.mobile #tracker .tq ~ .tq { display: none; }
body.mobile .tq .qn { font-size: 12px; } body.mobile .tq .qo, body.mobile .tq .qr { font-size: 10.5px; line-height: 1.35; }
body.mobile #tframe { top: 56px; width: 220px; } body.mobile #tframe .tn { font-size: 13px; }
body.mobile #bossbar { top: 56px; width: 52vw; } body.mobile #bossbar .bn { font-size: 14px; letter-spacing: .12em; }
body.mobile #actHud { top: 52px; min-width: 200px; padding: 5px 10px; transform: translateX(-50%) scale(.72); transform-origin: top center; }
/* big announcements sit below the lore card so the two never stack on top of each other */
body.mobile #banner { left: max(10px, env(safe-area-inset-left)); top: 30vh; width: min(360px, calc(100vw - 24px)); padding: 9px 12px; } body.mobile #banner .b1 { font-size: 22px; letter-spacing: .22em; } body.mobile #banner .b2 { font-size: 10px; line-height: 1.4; }
body.mobile #region { top: 36vh; } body.mobile #region .r1 { font-size: 17px; } body.mobile #region .r2 { font-size: 10px; }
body.mobile #levelup .l1 { font-size: 30px; } body.mobile #levelup .l2 { font-size: 11px; }
body.mobile #lore { left: 50%; top: 54px; width: min(360px, 44vw); padding: 7px 11px; transform: translateX(-50%) translateY(-10px); }
body.mobile #lore.show { transform: translateX(-50%); }
body.mobile #lore .lt { font-size: 10px; margin-bottom: 2px; } body.mobile #lore .lb { font-size: 10.5px; line-height: 1.35; }
body.mobile #toasts { left: max(10px, env(safe-area-inset-left)); right: auto; top: 148px; bottom: auto; width: 210px; flex-direction: column; }
body.mobile #toasts .toast:nth-child(n+3) { display: none; }
body.mobile .toast { font-size: 10.5px; padding: 4px 8px; }
body.mobile #msg { top: 34%; font-size: 12px; }
body.mobile #bottom { bottom: 6px; left: 0; right: 0; transform: none; }
body.mobile #prompt { position: fixed; left: 50%; top: 58%; transform: translateX(-50%); z-index: 13; pointer-events: auto; padding: 10px 18px; font-size: 14px; border-radius: 26px; border: 1px solid var(--gold); background: rgba(20, 16, 8, .78); box-shadow: 0 0 18px rgba(255, 210, 120, .25); animation: tin .2s; }
body.mobile #prompt .key { background: var(--gold); color: #1a1206; }
body.mobile #prompt:active { transform: translateX(-50%) scale(.96); }
body.mobile #castbar { position: fixed; left: 50%; top: 70%; transform: translateX(-50%); width: 220px; }
body.mobile #shipHud { position: relative; left: auto; bottom: 0; transform: scale(.62); transform-origin: bottom center; }
body.mobile #xpbar b { display: none; }
body.mobile #fishui { transform: translate(90px, -50%) scale(.9); }

/* ------------------------------ touch layer ------------------------------ */
#touch { position: fixed; inset: 0; z-index: 12; pointer-events: none; display: none; }
body.mobile #touch .tstick { position: absolute; left: 0; bottom: 0; width: 44vw; height: 70vh; pointer-events: auto; touch-action: none; background: none; border: none; border-radius: 0; --sx: 110px; --sy: calc(100% - 100px); }
body.mobile #touch .tstick::before { content: ''; position: absolute; left: var(--sx); top: var(--sy); width: 116px; height: 116px; margin: -58px 0 0 -58px; border-radius: 50%; border: 2px solid rgba(120, 210, 255, .25); background: radial-gradient(circle, rgba(10, 22, 38, .15), rgba(10, 22, 38, .4)); transition: border-color .15s; }
body.mobile #touch .tstick.on::before { border-color: rgba(120, 210, 255, .55); }
body.mobile #touch .tstick.sprint::before { border-color: var(--gold); box-shadow: 0 0 18px rgba(255, 210, 120, .35); }
body.mobile #touch .tstick .nub { position: absolute; left: var(--sx); top: var(--sy); width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(95, 216, 255, .32); border: 2px solid rgba(159, 232, 216, .65); box-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
body.mobile #touch .tlook { position: absolute; left: 44vw; right: 0; top: 0; bottom: 0; pointer-events: auto; touch-action: none; }

/* action cluster around the big attack button (coordinates from the bottom-right corner) */
body.mobile #touch .tbtns { position: absolute; right: max(10px, env(safe-area-inset-right)); bottom: 10px; width: 290px; height: 250px; pointer-events: none; display: block; }
body.mobile #touch .tb { position: absolute; pointer-events: auto; touch-action: none; border-radius: 50%; display: grid; place-items: center; align-content: center; color: #d8ecff; background: rgba(8, 18, 32, .55); border: 2px solid rgba(120, 210, 255, .35); box-shadow: 0 2px 10px rgba(0, 0, 0, .35); overflow: hidden; }
body.mobile #touch .tb .ti { font-size: 20px; line-height: 1; }
body.mobile #touch .tb .tl { font-family: var(--font-h); font-weight: 700; font-size: 9px; letter-spacing: .08em; margin-top: 2px; }
body.mobile #touch .tb.press { background: rgba(95, 216, 255, .35); transform: scale(.94); }
body.mobile #touch .tb.on { background: rgba(255, 190, 90, .42); box-shadow: 0 0 14px rgba(255, 190, 90, .55); }
body.mobile #touch .tb .cd { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(rgba(0, 0, 0, .62) calc(var(--p, 0) * 1%), transparent 0); pointer-events: none; }
body.mobile #touch .tb.atk { right: 12px; bottom: 12px; width: 92px; height: 92px; border-color: var(--gold); color: var(--gold); background: rgba(40, 28, 8, .55); }
body.mobile #touch .tb.atk .ti { font-size: 34px; }
body.mobile #touch .tb.jump { right: 116px; bottom: 4px; width: 62px; height: 62px; }
body.mobile #touch .tb.dodge { right: 4px; bottom: 116px; width: 62px; height: 62px; }
body.mobile #touch .tb.alt { right: 100px; bottom: 90px; width: 54px; height: 54px; }
body.mobile #touch .tb.dive { right: 190px; bottom: 4px; width: 56px; height: 56px; display: none; }
body.mobile.swimming #touch .tb.dive { display: grid; }
body.mobile #touch .tb.ab { width: 52px; height: 52px; border-color: rgba(154, 232, 255, .5); }
body.mobile #touch .tb.ab .ti { font-size: 22px; }
body.mobile #touch .tb.ab0 { right: 180px; bottom: 66px; }
body.mobile #touch .tb.ab1 { right: 166px; bottom: 128px; }
body.mobile #touch .tb.ab2 { right: 124px; bottom: 170px; }
body.mobile #touch .tb.ab3 { right: 64px; bottom: 186px; }
body.mobile #touch .tb.ab4 { right: 4px; bottom: 186px; }
body.mobile #touch .tbtns.foot .tb.ab4 { border-color: var(--gold); color: var(--gold); }
body.mobile #touch .tb.locked { opacity: .35; } body.mobile #touch .tb.poor { color: #7a8aa8; }
body.mobile.swimming #touch .tbtns.foot .tb.ab { opacity: .5; }
body.mobile #touch .tbtns.ship .tb.ab { width: 50px; height: 50px; }
/* quick actions: top centre, between the player frame and the minimap */
body.mobile #touch .ttop { position: absolute; top: 6px; left: 50%; transform: translateX(-38%); display: flex; gap: 6px; pointer-events: none; }
body.mobile #touch .ttop .tb { position: relative; width: 40px; height: 40px; border-radius: 12px; }
body.mobile #touch .ttop .tb .ti { font-size: 17px; } body.mobile #touch .ttop .tb .tl { display: none; }
body.mobile #touch .ttop .tb.menu { width: 48px; border-color: var(--gold); color: var(--gold); }

/* menu sheet */
#mMenu { display: none; }
body.mobile #mMenu { position: fixed; inset: 0; z-index: 45; background: rgba(2, 6, 14, .72); backdrop-filter: blur(6px); align-items: center; justify-content: center; flex-direction: column; gap: 14px; }
body.mobile #mMenu.show { display: flex; }
body.mobile #mMenu .mm-grid { display: grid; grid-template-columns: repeat(6, 88px); gap: 10px; }
@media (max-width: 640px) { body.mobile #mMenu .mm-grid { grid-template-columns: repeat(4, 80px); } }
body.mobile #mMenu .mm-it { height: 80px; border-radius: 16px; background: rgba(12, 22, 38, .92); border: 1px solid var(--line2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--text); font-size: 24px; }
body.mobile #mMenu .mm-it span { font-size: 11px; font-weight: 700; letter-spacing: .06em; font-family: var(--font-h); }
body.mobile #mMenu .mm-it:active { border-color: var(--teal); color: var(--teal); }
body.mobile #mMenu .mm-x { padding: 10px 30px; border-radius: 20px; border: 1px solid var(--line2); color: var(--dim); font-family: var(--font-h); letter-spacing: .2em; text-transform: uppercase; font-size: 12px; }

/* ------------------------------ windows & dialogs ------------------------------ */
body.mobile .win { left: 0; top: 0; transform: none; width: 100vw; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; border: none; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
body.mobile .win.wardrobe-mode { width: min(360px, 48vw); left: 0; transform: none; background: rgba(7, 12, 23, .88); }
body.mobile .win-h { padding: 8px 12px 0; } body.mobile .win-h h2 { font-size: 15px; letter-spacing: .16em; }
body.mobile .win-h .x { width: 44px; height: 44px; font-size: 22px; border-color: var(--line2); }
body.mobile .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; flex-shrink: 0; padding: 6px 10px 0; }
body.mobile .win-h { flex-shrink: 0; } body.mobile .tabs::-webkit-scrollbar { display: none; }
body.mobile .tab { flex: 0 0 auto; padding: 10px 12px; font-size: 11px; }
body.mobile .win-b { padding: 10px 12px 18px; -webkit-overflow-scrolling: touch; }
body.mobile .cols, body.mobile .cols3 { grid-template-columns: 1fr !important; gap: 12px; }
body.mobile .doll { grid-template-columns: repeat(4, 1fr); gap: 6px; }
body.mobile .eslot { height: 62px; min-height: 0; }
body.mobile .bag { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 5px; }
body.mobile .bslot { height: 48px; }
body.mobile .btn { min-height: 38px; }
body.mobile .btn.small { min-height: 34px; padding: 6px 12px; }
body.mobile .plus { width: 36px; height: 36px; }
body.mobile #mapCanvas { width: 100%; height: auto; }
body.mobile #dialog { left: 0; right: 0; bottom: 0; transform: none; width: 100vw; border-radius: 16px 16px 0 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); max-height: 70vh; overflow-y: auto; }
body.mobile #dialog .dt { font-size: 13.5px; margin: 6px 0 10px; min-height: 0; }
body.mobile #dialog .dopt { min-height: 42px; display: flex; align-items: center; font-size: 13px; }
body.mobile #pause { gap: 8px; } body.mobile #pause .btn { width: min(320px, 80vw); min-height: 44px; }
body.mobile #death .d1 { font-size: 30px; }
body.mobile #ending h1 { font-size: 30px; }

/* item action sheet (tap an item instead of hovering) */
#itemSheet { display: none; }
body.mobile #itemSheet.show { display: flex; position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .55); align-items: flex-end; justify-content: center; }
body.mobile #itemSheet .is-card { width: min(520px, 100vw); max-height: 86vh; overflow-y: auto; background: rgba(9, 15, 28, .98); border: 1px solid var(--line2); border-radius: 18px 18px 0 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); font-size: 12.5px; }
body.mobile #itemSheet .is-acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
body.mobile #itemSheet .is-acts .btn { flex: 1 1 30%; }

/* ------------------------------ title / select / create ------------------------------ */
body.mobile #title { justify-content: flex-start; overflow-y: auto; padding: 14px 12px 24px; }
body.mobile #title .brand { font-size: clamp(26px, 7vw, 44px); margin-top: 4px; }
body.mobile #title .brand-sub { margin: 8px 0 14px; font-size: 9px; letter-spacing: .3em; }
body.mobile #title .card { padding: 16px 18px; }
body.mobile .field { min-height: 44px; font-size: 16px; }
body.mobile #select .side, body.mobile #create .side { width: min(380px, 52vw); padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); padding-left: max(16px, env(safe-area-inset-left)); }
body.mobile .side .brand { font-size: 22px; } body.mobile .side .brand-sub { margin: 4px 0 12px; font-size: 9px; }
body.mobile .class-grid { grid-template-columns: repeat(5, 1fr); gap: 5px; }
body.mobile .cls { padding: 8px 2px; } body.mobile .cls .cn { font-size: 10px; }
body.mobile .sw { width: 30px; height: 30px; } body.mobile .swc { width: 30px; height: 30px; }
body.mobile .opt { padding: 8px 12px; }
body.mobile .acct { top: 8px; right: 12px; font-size: 10px; }
.mfs { display: none; }
body.mobile .drag-hint { width: calc(100% - min(380px, 52vw)); }
body.mobile .mfs { display: inline-flex; position: fixed; right: 12px; bottom: 12px; z-index: 55; padding: 10px 14px; border-radius: 22px; border: 1px solid var(--line2); background: rgba(8, 16, 30, .8); color: var(--text); font-size: 12px; font-family: var(--font-h); letter-spacing: .12em; gap: 6px; align-items: center; }
body.mobile.ingame .mfs { display: none; }

/* portrait: menus stack (preview on top, panel below); gameplay asks to rotate */
@media (orientation: portrait) {
  body.mobile #select .side, body.mobile #create .side { position: absolute; left: 0; right: 0; bottom: 0; top: auto; width: 100vw; height: 60vh; border-radius: 18px 18px 0 0; background: rgba(4, 9, 18, .9); }
  body.mobile #select, body.mobile #create { background: linear-gradient(0deg, rgba(3, 7, 15, .92) 0%, rgba(3, 7, 15, .3) 60%, transparent 75%); }
  body.mobile .class-grid { grid-template-columns: repeat(4, 1fr); }
}
#rotate { display: none !important; }
/* portrait gameplay: HUD across the top, thumbs share the bottom third */
@media (orientation: portrait) {
  body.mobile #pframe .bars { width: 118px; } body.mobile #pframe .por { width: 38px; height: 38px; font-size: 17px; }
  body.mobile #money { top: 52px; left: 56px; }
  body.mobile #mapwrap { width: 92px; } body.mobile #mm { width: 84px; height: 84px; } body.mobile #zone { font-size: 9px; }
  /* quick buttons become a column down the right edge, under the minimap */
  body.mobile #touch .ttop { top: 122px; left: auto; right: max(8px, env(safe-area-inset-right)); transform: none; flex-direction: column; gap: 6px; }
  body.mobile #touch .ttop .tb { width: 38px; height: 38px; }
  body.mobile #touch .ttop .tb.menu { width: 38px; }
  body.mobile #mStack { top: 72px; width: calc(100vw - 130px); }
  body.mobile #lore { left: 10px; top: 236px; width: calc(100vw - 68px); transform: translateY(-10px); }
  body.mobile #lore.show { transform: none; }
  body.mobile #chat { bottom: 250px; width: 60vw; }
  body.mobile #toasts { top: 340px; left: 10px; transform: none; width: calc(100vw - 68px); }
  body.mobile #actHud { top: 160px; }
  body.mobile #tframe, body.mobile #bossbar { top: 164px; }
  body.mobile #touch .tstick { width: 50vw; height: 45vh; --sx: 80px; --sy: calc(100% - 96px); }
  body.mobile #touch .tlook { left: 0; top: 0; bottom: 0; right: 0; }
  body.mobile #touch .tstick { z-index: 2; }
  body.mobile .drag-hint { width: 100%; bottom: calc(60vh + 10px); }
  body.mobile #touch .tbtns { transform: scale(.8); transform-origin: bottom right; }
  body.mobile #tUse { top: 50%; }
  body.mobile #shipHud { transform: scale(.5); }
  body.mobile #banner { top: 40vh; } body.mobile #region { top: 33vh; }
}
@keyframes rot { 0%, 20% { transform: rotate(0deg); } 50%, 80% { transform: rotate(-90deg); } 100% { transform: rotate(0deg); } }
/* small tablets & large phones get a bit more room */
@media (min-height: 560px) and (orientation: landscape) {
  body.mobile #mm { width: 130px; height: 130px; } body.mobile #mapwrap { width: 140px; } body.mobile #mStack { width: 220px; }
  body.mobile #touch .tbtns { transform: scale(1.12); transform-origin: bottom right; }
}

/* chat: a few faint lines above the stick; the menu's Chat button opens the input */
body.mobile #chat { left: max(10px, env(safe-area-inset-left)); bottom: 178px; width: 250px; }
body.mobile #chatLog { max-height: 58px; font-size: 10.5px; line-height: 1.35; }
body.mobile #chatIn.show { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); width: min(520px, 90vw); font-size: 16px; z-index: 60; }

/* contextual interact button (lives in the touch layer so the look pad can't swallow taps) */
body.mobile #prompt { display: none !important; }
body.mobile #tUse { display: none; position: absolute; left: 50%; top: 56%; transform: translateX(-50%); pointer-events: auto; touch-action: none; align-items: center; gap: 10px; padding: 12px 22px 12px 12px; border-radius: 30px; border: 2px solid var(--gold); background: rgba(24, 18, 6, .82); box-shadow: 0 0 22px rgba(255, 210, 120, .35); color: #fff4dc; font-family: var(--font-h); font-weight: 700; font-size: 15px; letter-spacing: .04em; white-space: nowrap; max-width: 70vw; z-index: 3; animation: tin .2s; }
body.mobile #tUse b { background: var(--gold); color: #1a1206; border-radius: 16px; padding: 4px 10px; font-size: 12px; letter-spacing: .12em; }
body.mobile #tUse span { overflow: hidden; text-overflow: ellipsis; }
/* while flying, keep Land/Dock up top so dragging to steer can't press it by accident */
body.mobile.flying #tUse { top: 17%; padding: 8px 16px 8px 8px; font-size: 13px; }
body.mobile #tUse.press { transform: translateX(-50%) scale(.95); background: rgba(60, 44, 10, .9); }
/* skiff flight stick: appears under the right thumb while flying */
body.mobile #tSteer { position: absolute; width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%; border: 2px solid rgba(160, 230, 255, .35); background: radial-gradient(circle, rgba(90, 200, 255, .10), rgba(90, 200, 255, 0) 70%); pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 2; }
body.mobile #tSteer.on { opacity: 1; }
body.mobile #tSteer i { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(160, 230, 255, .35); border: 2px solid rgba(220, 245, 255, .7); }
/* character sheet on phones: slots side by side, no see-through portrait */
body.mobile .sheet { grid-template-columns: 1fr 1fr; min-height: 0; gap: 8px; }
body.mobile .sheet-portrait { grid-column: 1 / -1; order: -1; background: var(--glass2); cursor: default; }
body.mobile .sheet-side { grid-column: 1 / -1; }
body.mobile .sp-gs { position: static; text-align: center; margin: 4px 0; }
body.mobile .sheet-slot { padding: 5px; gap: 7px; }
body.mobile .sheet-slot .eslot { width: 50px; min-width: 50px; height: 50px; }
body.mobile .sheet-col.r .sheet-slot { flex-direction: row; text-align: left; }
body.mobile .stats { grid-template-columns: 1fr; }
body.mobile .st-g:first-child { grid-template-columns: 1fr; }
body.mobile #guide { top: auto; bottom: 8px; width: min(420px, 46vw); padding: 7px 11px 9px; }
body.mobile.flying #guide { bottom: auto; top: 64px; }
body.mobile #guide .gt { font-size: 13px; }
body.mobile .win::before, body.mobile .win::after { display: none; }
body.mobile .sp-attrs { grid-template-columns: repeat(4, 1fr); }
body.mobile .sp-attrs .attr { padding: 4px 6px; } body.mobile .sp-attrs .attr .an { display: none; }
body.mobile .sp-name { font-size: 18px; } body.mobile .sp-top { padding-top: 6px; } body.mobile .sp-gs b { font-size: 20px; }
body.mobile .sp-attrs { grid-template-columns: repeat(4, 1fr); }
body.mobile .sp-attrs .attr { padding: 4px 6px; } body.mobile .sp-attrs .attr .an { display: none; }
body.mobile .sp-name { font-size: 18px; } body.mobile .sp-top { padding-top: 6px; } body.mobile .sp-gs b { font-size: 20px; }
/* phones: the sheet is a single scrolling column so the bag is never cut off */
body.mobile .sheet { height: auto; }
body.mobile .sheet-side { overflow: visible; }
body.mobile .win.sheet-mode .win-b { overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain; }
body.mobile .sheet .bag { grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 5px; }
body.mobile .sheet-portrait { min-height: 150px; }

/* the select / create screens: a drag on the open area turns the hero (the browser used to take it for a scroll) */
body.mobile #select, body.mobile #create { touch-action: none; }
body.mobile #select .side, body.mobile #create .side { touch-action: pan-y; }
body.mobile #tracker .tqh { margin-left: 0; text-align: left; }
