:root {
  --gold: #c8aa6e; --gold2: #785a28; --gold-hi: #f0e6d2; --panel: #010a13; --panel2: #091428; --blue: #0ac8b9;
  --hp: #3fae2a; --mana: #2f7fd8; --k: 1;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; color: var(--gold-hi); font-family: "Spiegel", "Segoe UI", "Helvetica Neue", Arial, sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; }
#gl, #overlay { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
#overlay { pointer-events: none; }
#vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0,4,10,.55) 100%); }
#ui { position: fixed; inset: 0; pointer-events: none; font-size: calc(13px * var(--k)); }
#ui .pe { pointer-events: auto; }
.frame { background: linear-gradient(180deg, #0b1a24 0%, #010a13 100%); border: 1px solid var(--gold2); box-shadow: 0 0 0 1px #000, inset 0 0 8px rgba(0,0,0,.8); }

/* bottom HUD (after reference/frames/hud/garen_hud_bottom_bar_closeup_x2.png) */
#hud { position: absolute; left: 50%; bottom: 0; transform: translateX(-52%); display: flex; align-items: flex-end; }
#stats { width: calc(150px * var(--k)); padding: calc(7px * var(--k)) calc(8px * var(--k)); display: grid; grid-template-columns: 1fr 1fr; gap: calc(3px*var(--k)) calc(10px*var(--k)); font-size: calc(12px * var(--k)); border-radius: calc(6px*var(--k)) 0 0 0; color: #f0e6c8; margin-bottom: 0; }
#stats div { display: flex; gap: calc(5px*var(--k)); align-items: center; white-space: nowrap; }
#stats i { width: calc(11px * var(--k)); height: calc(11px * var(--k)); border-radius: 2px; display: inline-block; transform: rotate(45deg) scale(.75); }
#pwrap { position: relative; width: calc(96px * var(--k)); height: calc(96px * var(--k)); margin: 0 calc(-14px*var(--k)) calc(6px*var(--k)) calc(-6px*var(--k)); z-index: 2; }
#portrait { position: absolute; inset: calc(7px*var(--k)); border-radius: 50%; overflow: hidden; border: 2px solid #7a6a46; background: #222; }
#portrait canvas { width: 100%; height: 100%; }
#pwrap .xp { position: absolute; inset: 0; transform: rotate(-90deg); }
#pwrap .xp circle { fill: none; stroke-width: 5; }
#pwrap .xp .bg { stroke: #1a1a22; }
#pwrap .xp .fg { stroke: #8a4ad8; stroke-dasharray: 0 289; }
#pwrap .lvl { position: absolute; right: calc(2px*var(--k)); bottom: calc(0px*var(--k)); width: calc(26px*var(--k)); height: calc(26px*var(--k)); border-radius: 50%; background: #0a1418; border: 1px solid var(--gold); display: grid; place-items: center; font-size: calc(13px*var(--k)); font-weight: 700; color: #f0e6d2; }
#corewrap { display: flex; flex-direction: column; align-items: flex-start; }
#buffbar { display: flex; gap: 3px; min-height: calc(26px*var(--k)); padding-left: calc(20px*var(--k)); margin-bottom: 2px; }
#buffbar .bf { width: calc(24px*var(--k)); height: calc(24px*var(--k)); border: 1px solid; background: rgba(0,0,0,.7); font-size: calc(11px*var(--k)); font-weight: 700; display: grid; place-items: center; position: relative; }
#buffbar .bf small { position: absolute; right: 1px; bottom: -1px; font-size: calc(8px*var(--k)); color: #fff; }
#core { position: relative; padding: calc(8px * var(--k)) calc(12px * var(--k)) calc(6px * var(--k)) calc(22px*var(--k)); display: flex; flex-direction: column; gap: calc(7px * var(--k)); border-radius: calc(8px*var(--k)) calc(8px*var(--k)) 0 0; }
.lvlup { position: absolute; left: 50%; top: calc(-46px*var(--k)); transform: translateX(-50%); color: #f0e6d2; font-size: calc(13px*var(--k)); font-weight: 700; text-shadow: 0 0 4px #000, 0 0 8px #c8a040; white-space: nowrap; pointer-events: none; }
#abilities { display: flex; gap: calc(6px * var(--k)); align-items: flex-start; height: calc(70px*var(--k)); }
.ab { position: relative; width: calc(56px * var(--k)); height: calc(56px * var(--k)); border: 1px solid #3c3c41; background: #111; overflow: visible; }
.ab.passive { width: calc(36px * var(--k)); height: calc(36px * var(--k)); margin-right: calc(2px*var(--k)); border-color: #5a4a2a; }
.ab.passive .stk { position: absolute; left: 3px; bottom: 1px; font-size: calc(13px*var(--k)); font-weight: 700; text-shadow: 0 0 3px #000, 0 0 2px #000; }
.ab.sum { width: calc(36px * var(--k)); height: calc(36px * var(--k)); }
.sep { width: 1px; height: calc(40px*var(--k)); background: #3c3c41; margin: 0 calc(4px*var(--k)); }
.ab canvas { width: 100%; height: 100%; display: block; }
.ab .cd { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: calc(19px * var(--k)); text-shadow: 0 0 3px #000, 0 0 3px #000; }
.ab .key { position: absolute; left: 0; right: 0; top: calc(100% + 1px); text-align: center; font-size: calc(10px * var(--k)); color: #c8c0a8; }
.ab.sum .key { left: auto; right: -2px; top: calc(100% - 4px); text-align: right; }
.ab .chg { position: absolute; right: 1px; bottom: 0; font-size: calc(10px*var(--k)); font-weight: 700; text-shadow: 0 0 2px #000; }
.ab .pips { position: absolute; left: 0; right: 0; top: calc(100% + 13px*var(--k)); display: flex; justify-content: center; gap: 3px; }
.ab .pips b { width: calc(4px*var(--k)); height: calc(4px*var(--k)); border-radius: 50%; background: #3a3a3a; }
.ab .pips b.on { background: #e0c070; box-shadow: 0 0 3px #e0c070; }
.ab .up { position: absolute; left: 50%; top: calc(-24px*var(--k)); transform: translateX(-50%); width: calc(26px*var(--k)); height: calc(18px*var(--k)); color: #f0d060; font-size: calc(17px*var(--k)); display: none; place-items: center; cursor: pointer; pointer-events: auto; text-shadow: 0 0 6px #f0c040; animation: pulse 1s infinite; }
.ab.canup .up { display: grid; }
.ab.nomana canvas { filter: saturate(.3) brightness(.6) sepia(1) hue-rotate(180deg); }
.ab.locked canvas { filter: grayscale(1) brightness(.35); }
@keyframes pulse { 50% { filter: brightness(1.5); transform: translate(-50%, -3px); } }
.bars { display: flex; flex-direction: column; gap: 2px; width: calc(450px*var(--k)); }
.bar { position: relative; height: calc(17px * var(--k)); background: #0a0a0a; border: 1px solid #000; overflow: hidden; }
.bar.mp { height: calc(15px * var(--k)); }
.bar.mp.none > * { display: none; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#26c21e, #0f7a0f); }
.bar > .sh { position: absolute; top: 0; bottom: 0; background: #e8e8e8; }
.bar.mp > i { background: linear-gradient(#2f80e0, #1a4ea0); }
.bar.mp.energy > i { background: linear-gradient(#f0d850, #b09020); }
.bar > span { position: absolute; inset: 0; text-align: center; font-size: calc(12px * var(--k)); line-height: calc(17px * var(--k)); text-shadow: 0 0 2px #000; }
.bar.mp > span { line-height: calc(15px * var(--k)); }
.bar > em { position: absolute; right: 6px; top: 0; font-size: calc(11px*var(--k)); font-style: normal; color: #c8e8b0; line-height: calc(17px*var(--k)); }
.bar.mp > em { line-height: calc(15px*var(--k)); color: #b0d0ff; }
#items { padding: calc(7px * var(--k)); display: flex; gap: calc(6px*var(--k)); border-radius: 0 calc(6px*var(--k)) 0 0; }
.icol { display: flex; flex-direction: column; gap: calc(6px*var(--k)); }
.igrid { display: grid; grid-template-columns: repeat(3, calc(38px * var(--k))); gap: calc(4px*var(--k)); }
.iside { display: flex; flex-direction: column; gap: calc(5px*var(--k)); align-items: center; }
.it { width: calc(38px * var(--k)); height: calc(38px * var(--k)); background: #0d1a20; border: 1px solid #3c3c41; position: relative; overflow: hidden; cursor: pointer; }
.it.trinket { border-radius: 50%; }
.it canvas { width: 100%; height: 100%; }
.it .n { position: absolute; right: 2px; bottom: 0; font-size: calc(11px*var(--k)); font-weight: 700; text-shadow: 0 0 2px #000; }
.it .k { position: absolute; left: 2px; top: 0; font-size: calc(8px*var(--k)); color: #888; }
.it .cd { position: absolute; inset: 0; }
.rbtn { width: calc(26px*var(--k)); height: calc(26px*var(--k)); border-radius: 50%; border: 1px solid #5a4a2a; background: radial-gradient(#2a4a8a, #0a1428); display: grid; place-items: center; cursor: pointer; font-size: calc(10px*var(--k)); color: #ddd; }
.rbtn.shopb { background: radial-gradient(#2a6a6a, #0a2028); }
#gold { text-align: center; color: #f0d070; font-weight: 700; font-size: calc(17px*var(--k)); cursor: pointer; background: #08121a; border: 1px solid #3c3c41; border-radius: 3px; padding: 1px 0; }
#gold::before { content: '● '; color: #c89a30; font-size: .8em; }
#gold:hover { filter: brightness(1.3); }

/* minimap */
#minimap { position: absolute; right: 0; bottom: 0; width: calc(270px * var(--k)); height: calc(270px * var(--k)); border: 2px solid var(--gold2); border-right: 0; border-bottom: 0; background: #000; }
#minimap canvas { width: 100%; height: 100%; }

/* top right */
#topright { position: absolute; right: 0; top: 0; padding: 4px 10px; display: flex; gap: 14px; font-size: calc(13px*var(--k)); background: rgba(1,10,19,.85); border: 1px solid var(--gold2); border-top: 0; border-right: 0; }
#topright b { color: #fff; font-weight: 600; }
#topright .tb { color: #4aa8ff; } #topright .tr { color: #ff5a5a; }
#score { position: absolute; left: 50%; top: 0; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; padding: 3px 14px; background: rgba(1,10,19,.85); border: 1px solid var(--gold2); border-top: 0; font-weight: 700; font-size: calc(15px*var(--k)); }
#score .b { color: #4aa8ff; } #score .r { color: #ff5a5a; } #score small { color: #999; font-weight: 400; font-size: calc(11px*var(--k)); }

#announce { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); font-size: calc(26px*var(--k)); font-weight: 700; color: #f0e6d2; text-shadow: 0 0 6px #000, 0 0 12px #000; letter-spacing: 1px; text-align: center; transition: opacity .4s; }
#death { position: absolute; inset: 0; display: none; }
#death.on { display: block; }
#gl.deadview { filter: grayscale(.75) brightness(.55) contrast(1.05); transition: filter .6s; }
#death .backin { position: absolute; left: 50%; bottom: calc(150px * var(--k)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
#death .backin small { color: #f0e6d2; font-size: calc(14px*var(--k)/.667); letter-spacing: 1px; text-shadow: 0 0 4px #000; }
#death .bar { position: relative; width: calc(170px*var(--k)/.667); height: calc(16px*var(--k)/.667); background: #1a0606; border: 1px solid #c8aa6e; }
#death .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#e03a2a, #8a1a10); }
#death .bar b { position: absolute; inset: 0; text-align: center; color: #fff; font-size: calc(16px*var(--k)/.667); line-height: 1; text-shadow: 0 0 3px #000; }
#death .killers { display: flex; gap: 8px; margin-top: 6px; } #death .killers img { width: calc(34px*var(--k)/.667); height: calc(34px*var(--k)/.667); border-radius: 50%; border: 2px solid #c03030; }
#death .recap { position: absolute; left: 6px; top: 6px; width: calc(160px*var(--k)/.667); background: rgba(1,10,19,.88); border: 1px solid var(--gold2); padding: 6px 8px; font-size: calc(12px*var(--k)/.667); }
#death .recap b { color: #c8aa6e; display: block; margin-bottom: 4px; } #death .recap div { display: flex; justify-content: space-between; } #death .recap em { color: #ff7a6a; font-style: normal; }

/* shop (after reference/frames/shop/garen_shop_open_fountain_start_0m02s.png) */
#shop { position: absolute; left: 26%; top: 5%; width: min(54vw, 96vw); height: 69vh; display: none; flex-direction: column; pointer-events: auto; background: rgba(1,10,19,.96); }
#shop.on { display: flex; }
#shop header { display: flex; gap: 20px; align-items: center; padding: 10px 14px 6px; font-size: 13px; color: #a09b8c; text-transform: uppercase; letter-spacing: 1px; }
#shop .tab { cursor: pointer; padding-bottom: 4px; } #shop .tab.on { color: #f0e6d2; border-bottom: 2px solid var(--blue); }
#shop .search { flex: 1; background: #0a141c; border: 1px solid #3c3c41; color: #ddd; padding: 5px 10px; font-size: 12px; }
#shop .body { flex: 1; display: grid; grid-template-columns: 88px 1fr 300px; overflow: hidden; }
#shop .quick { border-right: 1px solid #1e2328; padding: 8px 4px; display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-start; overflow: auto; }
#shop .grid { overflow: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
#shop .cat { color: #c8aa6e; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }
#shop .row { display: flex; flex-wrap: wrap; gap: 6px; }
#shop .si { width: 52px; text-align: center; cursor: pointer; font-size: 11px; color: #f0d070; }
#shop .si.big { width: 60px; } #shop .si.big canvas { width: 56px; height: 56px; }
#shop .si canvas { width: 44px; height: 44px; border: 1px solid #3c3c41; display: block; margin: 0 auto 2px; }
#shop .si.no { opacity: .45; } #shop .si.own canvas { border-color: #0ac8b9; }
#shop .si.sel canvas { border-color: var(--gold); box-shadow: 0 0 6px var(--gold); }
#shop .bundle { border: 1px solid #0ac8b9; background: linear-gradient(#0a2a3a, #061520); padding: 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; }
#shop .bundle b { color: #f0e6d2; } #shop .bundle span { color: #f0d070; }
#shop .detail { border-left: 1px solid #1e2328; padding: 10px; overflow: auto; font-size: 12px; line-height: 1.45; }
#shop .tip .th { display: flex; gap: 8px; align-items: center; } #shop .tip .th canvas { width: 40px; height: 40px; border: 1px solid var(--gold2); }
#shop .tip h3 { margin: 0; color: #f0e6d2; font-size: 14px; } #shop .tip small { color: #a09b8c; } #shop .tip .cost { margin-left: auto; color: #f0d070; }
#shop .sts { margin: 8px 0; } #shop .st { color: #f0e6d2; }
#shop .ds { color: #a09b8c; } #shop .ds .pn em { color: #f0e6d2; font-style: normal; font-weight: 700; display: block; margin-top: 6px; }
#shop .bf { margin-top: 8px; color: #c8aa6e; }
#shop footer { display: flex; gap: 10px; align-items: center; padding: 8px 14px; border-top: 1px solid #1e2328; }
#shop footer .g { color: #f0d070; font-weight: 700; } #shop .btn.dis { opacity: .4; pointer-events: none; }
.btn { background: linear-gradient(#1e2328, #0f1317); color: var(--gold-hi); border: 1px solid var(--gold); padding: 6px 18px; font-size: 13px; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; display: inline-block; }
.btn:hover { filter: brightness(1.3); }
.x { cursor: pointer; color: var(--gold); font-size: 20px; }

/* scoreboard (after reference/frames/scoreboard/garen_scoreboard_tab_6m12s.png) */
#board { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); width: min(770px * var(--k) / .667, 96vw); display: none; padding: 0; background: rgba(1,10,19,.92); }
#board.on { display: block; }
.sbhead { display: flex; justify-content: space-around; padding: 6px 10px; border-bottom: 1px solid var(--gold2); font-size: calc(14px*var(--k)/.667); color: #c8c0a8; }
.sbhead .k { font-weight: 700; } .sbhead .tb { color: #4aa8ff; } .sbhead .tr { color: #ff5a5a; }
.sbcols { display: grid; grid-template-columns: 1fr 1fr; }
.sbcol + .sbcol { border-left: 1px solid var(--gold2); }
.sbrow { display: grid; grid-template-columns: auto auto 36px 64px 1fr; align-items: center; gap: 8px; padding: 4px 8px; border-bottom: 1px solid #1e2328; font-size: calc(13px*var(--k)/.667); }
.sbrow.me { background: rgba(200,170,110,.12); }
.sbrow.dead .pp img { filter: grayscale(1) brightness(.6); }
.sbrow .sums { display: flex; flex-direction: column; gap: 2px; } .sbrow .sums img { width: 16px; height: 16px; }
.sbrow .pp { position: relative; width: 38px; height: 38px; } .sbrow .pp img { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--gold2); }
.sbrow .pp b { position: absolute; right: -4px; bottom: -4px; background: #010a13; border: 1px solid var(--gold2); border-radius: 50%; width: 16px; height: 16px; font-size: 10px; display: grid; place-items: center; }
.sbrow .pp i { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-weight: 700; color: #fff; text-shadow: 0 0 3px #000; }
.sbrow .its { display: flex; gap: 2px; } .sbrow .its img, .sbrow .its span { width: 22px; height: 22px; display: inline-block; background: #0d1a20; }
#allies { position: absolute; right: 2px; bottom: calc(275px * var(--k)); display: flex; gap: calc(6px*var(--k)); }
#allies .ally { position: relative; width: calc(46px*var(--k)); }
#allies img { width: calc(46px*var(--k)); height: calc(46px*var(--k)); border-radius: 50%; border: 2px solid #3a6a9a; display: block; }
#allies .dead img { filter: grayscale(1) brightness(.5); }
#allies b { position: absolute; right: -2px; top: calc(30px*var(--k)); font-size: calc(10px*var(--k)); background: #010a13; border-radius: 50%; width: calc(16px*var(--k)); height: calc(16px*var(--k)); display: grid; place-items: center; }
#allies i { position: absolute; left: 0; right: 0; top: calc(12px*var(--k)); text-align: center; font-style: normal; font-weight: 700; color: #fff; text-shadow: 0 0 3px #000; }
#allies u { position: absolute; left: 50%; top: -4px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #3ad0ff; box-shadow: 0 0 6px #3ad0ff; }
#allies .hb, #allies .mb { height: calc(5px*var(--k)); background: #111; margin-top: 2px; } #allies .mb { height: calc(3px*var(--k)); margin-top: 1px; }
#allies .hb s, #allies .mb s { display: block; height: 100%; background: #2ea82a; } #allies .mb s { background: #2f7fd8; }
#feed { position: absolute; right: 6px; top: 40px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
#feed .kf { display: flex; align-items: center; gap: 6px; background: rgba(1,10,19,.8); border: 1px solid #3a6a9a; padding: 2px 6px; animation: fadein .2s; }
#feed .kf.bad { border-color: #9a3a3a; }
#feed img { width: calc(30px*var(--k)/.8); height: calc(30px*var(--k)/.8); border-radius: 50%; border: 2px solid #3a8aff; } #feed img.e { border-color: #ff3a3a; }
#feed em { font-style: normal; color: #c8aa6e; } #feed .ex { font-size: 18px; color: #aaa; }
@keyframes fadein { from { opacity: 0; transform: translateX(20px); } }
.endscreen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; background: rgba(0,0,0,.55); pointer-events: auto; }
.endscreen h1 { font-family: "Beaufort", Georgia, serif; font-size: clamp(50px, 10vw, 120px); margin: 0; letter-spacing: 8px; }
.endscreen.win h1 { color: #f0d070; text-shadow: 0 0 30px #c8a040; } .endscreen.lose h1 { color: #c8c8d8; text-shadow: 0 0 30px #a03030; }

/* menus */
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; background: radial-gradient(ellipse at center, #0d2232 0%, #010a13 75%); pointer-events: auto; z-index: 5; }
.screen h1 { font-family: "Beaufort", Georgia, serif; font-size: clamp(30px, 6vw, 60px); margin: 0; color: var(--gold-hi); letter-spacing: 3px; text-transform: uppercase; }
.screen h2 { color: var(--gold); font-weight: 400; margin: 0; font-size: 16px; letter-spacing: 2px; text-transform: uppercase; }
.champs { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; max-width: 90vw; }
.champ { width: 120px; cursor: pointer; text-align: center; }
.champ canvas { width: 120px; height: 120px; border: 2px solid var(--gold2); display: block; }
.champ.sel canvas { border-color: var(--gold); box-shadow: 0 0 12px var(--gold); }
.champ div { margin-top: 6px; font-size: 14px; }
.champ small { color: #999; font-size: 11px; }
.opts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; font-size: 13px; }
.kit { color: #a09b8c; font-size: 13px; max-width: 80vw; text-align: center; min-height: 18px; }
.kit b { color: var(--gold-hi); }
.sumpick { width: 36px; height: 36px; border: 1px solid var(--gold2); cursor: pointer; margin: 0 3px; vertical-align: middle; }
.opts select { background: #0f1317; color: var(--gold-hi); border: 1px solid var(--gold2); padding: 4px 8px; }

/* touch controls */
#touch { position: absolute; inset: 0; display: none; }
#touch.on { display: block; }
#joy { position: absolute; left: calc(40px + env(safe-area-inset-left)); bottom: 40px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.07); border: 2px solid rgba(200,170,110,.4); pointer-events: auto; }
#joy b { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px; border-radius: 50%; background: rgba(200,170,110,.45); }
.tbtn { position: absolute; border-radius: 50%; pointer-events: auto; border: 2px solid var(--gold); background: rgba(1,10,19,.75); overflow: hidden; display: grid; place-items: center; font-weight: 700; color: #fff; }
.tbtn canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tbtn .cd { position: relative; text-shadow: 0 0 3px #000; font-size: 18px; }
.tbtn.atk { width: 92px; height: 92px; right: calc(28px + env(safe-area-inset-right)); bottom: 28px; background: radial-gradient(#3a2a1a, #1a1008); font-size: 13px; }
.tbtn.up::after { content: '+'; position: absolute; top: -4px; right: 2px; color: #ffe060; font-size: 22px; }
body.touch #minimap { left: 0; top: 0; right: auto; bottom: auto; width: 150px; height: 150px; border: 2px solid var(--gold2); border-left: 0; border-top: 0; }
body.touch #hud { display: none; }
body.touch #topright { font-size: 11px; }
#mstatus { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); width: 260px; display: none; }
body.touch #mstatus { display: block; }
#mbtns { position: absolute; right: calc(10px + env(safe-area-inset-right)); top: 34px; display: none; gap: 6px; pointer-events: auto; }
body.touch #mbtns { display: flex; }
#mbtns .btn { padding: 6px 10px; font-size: 11px; }
