/* =====================================================================
   Интерфейс v2: окна, панель быстрого доступа, рамка цели, чат, настройки, телефон
   ===================================================================== */
#hud { zoom: var(--z, 1); --sal: calc(env(safe-area-inset-left, 0px) / var(--z, 1)); --sar: calc(env(safe-area-inset-right, 0px) / var(--z, 1)); --W: calc(100vw / var(--z, 1)); --H: calc(100vh / var(--z, 1)); }
/* фокус с клавиатуры виден везде */
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
button:focus-visible, [role=button]:focus-visible { box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--gold-hi); }

/* ---------- окна ---------- */
.win { zoom: var(--fz, 1); max-width: calc(var(--W) / var(--fz, 1) - 12px); }
.win.dragging { opacity: 0.92; user-select: none; }
@media (pointer: fine) { .win > h3, .win > .dlgHead { cursor: grab; } }
.win .close { min-width: 28px; min-height: 28px; z-index: 3; }
#itemTip { z-index: 8000; }
#partyInvite { z-index: 9000; }

.modal { position: fixed; inset: 0; z-index: 9500; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.62); }
.mbox { position: relative; max-width: min(420px, calc(var(--W) - 32px)); padding: 20px 22px 16px; text-align: center; }
.mbox p { margin: 0 0 14px; font-size: 16px; line-height: 1.4; }
.mbox .row { display: flex; gap: 10px; justify-content: center; }
.mbox button { min-width: 96px; min-height: 40px; font-size: 15px; }
.mbox button.danger { border-color: #c0603a; }
#toasts { position: fixed; top: 96px; left: 50%; transform: translateX(-50%); z-index: 9400; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: min(460px, calc(var(--W) - 24px)); }
.toast { padding: 8px 14px; font-size: 14px; text-align: center; background: rgba(10, 8, 6, 0.94); border: 1px solid var(--bronze); box-shadow: 0 4px 16px #000; animation: toastIn 0.25s ease-out; }
.toast.tip { border-color: var(--gold); color: #ffeab8; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }

#recon { position: fixed; inset: 0; z-index: 9600; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.7); }
#recon .rbox { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 28px; text-align: center; font-size: 17px;
  background: rgba(14, 10, 8, 0.96); border: 2px solid var(--bronze); box-shadow: 0 10px 40px #000; max-width: calc(var(--W) - 32px); }
#recon small { color: var(--muted); font-size: 13px; }
#recon .spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--bronze-dk); border-top-color: var(--gold-hi); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#recon button { min-height: 40px; }

/* ---------- нижняя панель (компьютер) ---------- */
#orbs { width: min(1000px, var(--W, 100vw)); }
.orb .liquid { height: calc(var(--p, 1) * 100%); }
#belt { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#skills { display: flex; gap: 4px; flex: 1; min-width: 0; justify-content: center; }
.hslot { --hs: 46px; width: var(--hs); height: var(--hs); position: relative; flex: none; background: #0a0806; overflow: hidden; cursor: pointer; touch-action: none;
  border: 2px solid #7a5e36; box-shadow: 0 0 0 1px #000, inset 0 0 6px #000; user-select: none; -webkit-user-select: none; }
.hslot.empty { opacity: 0.5; border-style: dashed; }
.hslot.over { border-color: var(--gold-hi); box-shadow: 0 0 10px rgba(255, 220, 120, 0.9); opacity: 1; }
.hslot img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.hslot .glyph, .abtn .glyph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 17px var(--serif); font-style: normal; color: #f2dfb0; }
.hslot .kb { position: absolute; top: 1px; left: 3px; font: 700 12px var(--serif); color: var(--gold-hi); text-shadow: 0 0 3px #000, 0 0 2px #000; z-index: 2; }
.hslot .mp, .abtn .mp { position: absolute; bottom: 1px; right: 3px; font-size: 12px; color: #9ab8ff; text-shadow: 0 0 3px #000; z-index: 2; }
.cnt { position: absolute; bottom: 1px; left: 3px; font: 700 12px var(--serif); font-style: normal; color: #ffe0b0; text-shadow: 0 0 3px #000, 0 0 2px #000; z-index: 2; }
.cd { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hslot.on, .abtn.on { box-shadow: 0 0 10px rgba(255, 220, 120, 0.9), inset 0 0 8px rgba(255, 220, 120, 0.5); }
.hslot.dim img, .abtn.dim img, .hslot.dim .glyph { filter: grayscale(0.7) brightness(0.6); }
#beltSide { display: flex; align-items: center; gap: 6px; flex: none; }
.pgbtn { width: 30px; height: 46px; padding: 0; font: 700 15px var(--serif); font-variant-numeric: lining-nums; }
#shots { display: flex; gap: 4px; }
.pot.shot { width: 40px; height: 46px; background: #0a0806; border: 2px solid #7a5e36; position: relative; touch-action: none; }
.pot.shot span { bottom: 1px; right: 3px; color: #cfe6ff; }
.pot.shot i { font-size: 13px; }
#lvl { font-size: 12px; }

/* кнопки справа (компьютер): столбик над шаром маны */
#side { position: fixed; right: 12px; bottom: 134px; z-index: 4; display: flex; flex-direction: column; flex-wrap: wrap-reverse; align-content: flex-start; align-items: flex-end; gap: 4px; max-height: calc(var(--H) - 134px - 200px); }
#side button { display: flex; align-items: center; gap: 6px; min-width: 112px; padding: 4px 10px; font-size: 13px; text-align: left; position: relative; }
#side button b { font-size: 14px; width: 20px; text-align: center; font-weight: 400; }
.mobOnly { display: none; }
#bookBtn.pulse { animation: bookPulse 1.1s ease-in-out infinite; border-color: var(--gold-hi); }
#bookBtn.pulse::after { content: attr(data-badge); position: absolute; top: -7px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px; background: #c0301a;
  border: 1px solid #000; color: #fff; font: 700 12px/16px var(--serif); text-align: center; }
@keyframes bookPulse { 50% { box-shadow: 0 0 14px 3px rgba(255, 215, 106, 0.85); } }
#chatBadge { position: absolute; top: -7px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 3px; background: #c0301a; border: 1px solid #000; color: #fff; font: 700 12px/16px var(--serif); font-style: normal; text-align: center; }

#gmenu { top: 30%; left: 50%; transform: translateX(-50%); width: min(380px, calc(var(--W) - 24px)); }
#gmenu h3, #settings h3, #actions h3 { margin: 0 0 10px; font: 400 21px var(--title); letter-spacing: 1px; color: var(--gold-hi); }
.gm { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.gm button { display: flex; align-items: center; gap: 10px; min-height: 48px; font-size: 15px; text-align: left; }
.gm button b { width: 26px; text-align: center; font-weight: 400; font-size: 18px; }

/* ---------- рамка цели ---------- */
#tgt { position: absolute; top: 62px; left: 50%; transform: translateX(-50%); width: min(300px, calc(var(--W) - 220px)); padding: 5px 8px 6px; z-index: 3;
  background: linear-gradient(180deg, rgba(26, 20, 16, 0.94), rgba(12, 9, 7, 0.94)); border: 2px solid var(--bronze); box-shadow: 0 0 0 1px #000, 0 4px 14px rgba(0, 0, 0, 0.7); }
.tgtHead { display: flex; align-items: center; gap: 6px; }
#tgtName { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 15px var(--serif); color: #ffb0a0; }
#tgt[data-kind=p] #tgtName { color: #fff; } #tgt[data-kind=n] #tgtName { color: #c8f0a0; } #tgtName.boss { color: #ff8a3d; }
#tgtLv { font-size: 13px; color: var(--muted); white-space: nowrap; }
#tgt button { padding: 0 8px; min-width: 28px; height: 26px; font-size: 14px; line-height: 1; }
#tgt button.on { border-color: #ff6a3a; color: #ff9a6a; box-shadow: 0 0 8px rgba(255, 90, 40, 0.6); }
.tgtHp { position: relative; height: 15px; margin-top: 4px; background: #2a0604; border: 1px solid #000; }
#tgtHpFill { height: 100%; background: linear-gradient(180deg, #e03a22, #6a0a06); transition: width 0.2s; }
#tgtHpText { position: absolute; inset: 0; text-align: center; font: 700 12px/15px var(--serif); text-shadow: 0 0 3px #000, 0 0 2px #000; }
#tgtBuffs { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 4px; }
#tgtBuffs:empty { display: none; }

/* ---------- чат ---------- */
#chat { position: absolute; left: 10px; bottom: 136px; width: min(400px, calc(var(--W) - 20px)); z-index: 3; }
.chatHead { display: flex; align-items: flex-end; justify-content: space-between; }
#chatTabs { display: flex; gap: 2px; flex-wrap: wrap; }
#chatTabs button { padding: 2px 8px; font-size: 12px; background: rgba(10, 8, 6, 0.75); border-color: var(--bronze-dk); position: relative; }
#chatTabs button.sel { border-color: var(--gold); color: var(--gold-hi); background: rgba(40, 28, 16, 0.9); }
#chatTabs i { font-style: normal; background: #c0301a; border-radius: 8px; padding: 0 5px; margin-left: 4px; font-size: 12px; color: #fff; }
#chatLog { max-height: 150px; min-height: 40px; overflow-y: auto; font-size: 14px; line-height: 1.3; text-shadow: 0 0 3px #000, 0 0 2px #000, 0 1px 1px #000; margin-bottom: 4px;
  mask-image: linear-gradient(180deg, transparent, #000 22%); -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%); overflow-wrap: anywhere; }
body.chat-s #chatLog { max-height: 80px; } body.chat-l #chatLog { max-height: 270px; }
.chatRow { display: flex; gap: 4px; }
#chatIn { flex: 1; min-width: 0; background: rgba(8, 6, 5, 0.6); opacity: 0.8; }
#chatIn:focus { opacity: 1; }
#chatPeek, #sysFeed { pointer-events: none; text-shadow: 0 0 3px #000, 0 0 2px #000, 0 1px 1px #000; }
#chatPeek { display: none; }
#sysFeed { position: absolute; left: 420px; bottom: 142px; width: min(460px, calc(var(--W) - 420px - 150px)); text-align: left; font-size: 14px; z-index: 2; }
#sysFeed div { animation: toastIn 0.2s ease-out; margin-top: 2px; }

/* ---------- окна: действия и настройки ---------- */
#actions { top: 120px; left: 50%; transform: translateX(-50%); width: min(420px, calc(var(--W) - 24px)); max-height: calc(var(--H) - 160px); overflow-y: auto; }
#actions h4, #settings h4 { margin: 10px 0 6px; font: 400 15px var(--title); color: var(--gold); border-bottom: 1px solid rgba(199, 162, 90, 0.3); padding-bottom: 3px; }
#actions h4 small, #settings h4 small { color: var(--muted); font-size: 12px; font-family: var(--serif); }
.agrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.agrid button { min-height: 36px; text-align: left; font-size: 14px; }
.agrid small { color: var(--muted); margin-left: 4px; font-size: 12px; }
.agrid button:disabled { opacity: 0.4; cursor: not-allowed; }
.arow2 { display: flex; gap: 6px; } .arow2 input { flex: 1; min-width: 0; }

#settings { top: 70px; left: 50%; transform: translateX(-50%); width: min(520px, calc(var(--W) - 24px)); max-height: calc(var(--H) - 110px); display: flex; flex-direction: column; z-index: 6; }
#settings[hidden] { display: none; }
#setTabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
#setTabs button { flex: 1; min-height: 36px; padding: 4px 8px; }
#setTabs button.sel, .seg button.sel { border-color: var(--gold); background: linear-gradient(180deg, #5a3e20, #2a1c10); color: #fff3d0; }
#setBody { overflow-y: auto; flex: 1; min-height: 120px; padding-right: 4px; }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 2px; min-height: 40px; border-bottom: 1px solid rgba(160, 120, 70, 0.18); font-size: 14px; }
.srow > span { flex: 1; min-width: 0; } .srow small { display: block; color: var(--muted); font-size: 12px; }
.srow input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--gold); flex: none; }
.srow input[type=range] { flex: 0 1 190px; min-width: 90px; padding: 0; height: 28px; accent-color: var(--gold); background: none; border: 0; box-shadow: none; }
.srow output { min-width: 52px; text-align: right; color: var(--gold-hi); }
.srow .seg { flex-wrap: wrap; justify-content: flex-end; } .srow .seg button { min-height: 34px; }
.krow { display: grid; grid-template-columns: 1fr 76px 76px; gap: 5px; align-items: center; padding: 2px 0; font-size: 13px; }
.kbtn { padding: 3px 4px; font-size: 13px; min-height: 30px; } .kbtn.wait { border-color: var(--gold-hi); color: var(--gold-hi); }
#keysReset { margin-top: 10px; }
#sndHost .arow { display: grid; grid-template-columns: 110px 1fr 36px; align-items: center; gap: 8px; margin: 6px 0; min-height: 34px; font-size: 14px; }
#sndHost .arow:first-of-type { grid-template-columns: 1fr 24px; }
#sndHost .arow small { color: var(--muted); text-align: right; }
#sndHost input[type=range] { width: 100%; padding: 0; height: 28px; accent-color: var(--gold); background: none; border: 0; box-shadow: none; }
#sndHost input[type=range]:disabled { opacity: 0.4; }
#sndHost input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--gold); justify-self: start; }
#sndHost ul { padding-left: 18px; margin: 6px 0; } #sndHost li { margin: 5px 0; font-size: 13px; } #sndHost a { color: var(--gold-hi); }
#sndHost button { margin-top: 10px; }
#sndHost h3 { font-size: 18px; margin: 0 0 6px; } #sndHost .close { display: none; }
.ghost { position: fixed; left: 0; top: 0; width: 48px; height: 48px; z-index: 9800; pointer-events: none; opacity: 0.85; border: 2px solid var(--gold-hi); background: #0a0806; }
.ghost img { width: 100%; height: 100%; display: block; } .ghost .glyph { display: flex; align-items: center; justify-content: center; height: 100%; font: 700 16px var(--serif); font-style: normal; color: #f2dfb0; }
body.dnd { cursor: grabbing; user-select: none; }
[data-drag] { cursor: grab; }
.bk img[data-drag] { touch-action: none; }
#consum { display: flex; flex-wrap: wrap; gap: 6px; }
.cons { display: flex; align-items: center; gap: 6px; padding: 3px 8px; font-size: 13px; }
.cons img { width: 26px; height: 26px; touch-action: none; }
.bkBtns button { min-height: 28px; }

/* ---------- сенсорное управление ---------- */
#touchUi { display: none; zoom: calc(1 / var(--z, 1)); }
#worldMap { z-index: 6000; }
body.mobile #touchUi { display: block; }
#joy { position: fixed; z-index: 3; width: var(--js, 120px); height: var(--js, 120px); border-radius: 50%; touch-action: none; opacity: 0.55;
  background: radial-gradient(circle, rgba(60, 44, 30, 0.35) 55%, rgba(199, 162, 90, 0.18) 100%); border: 2px solid rgba(199, 162, 90, 0.55); }
#joy.fixed { opacity: 0.45; } #joy.act { opacity: 0.85; }
#joy i { position: absolute; left: 50%; top: 50%; width: 42%; height: 42%; border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 30%, #f0d090, #8a6a3a 70%); border: 2px solid #2a1c10; box-shadow: 0 2px 8px #000; }
#atkBtn { position: fixed; z-index: 4; right: 24px; bottom: calc(32px + env(safe-area-inset-bottom, 0px)); width: 76px; height: 76px; padding: 0; border-radius: 50%; touch-action: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; border: 3px solid #c0603a;
  background: radial-gradient(circle at 35% 28%, #c8402a, #6a1208 70%); box-shadow: 0 0 0 2px #000, 0 0 16px rgba(200, 60, 20, 0.55), inset 0 2px 0 rgba(255, 200, 150, 0.35); }
#atkBtn b { font-size: 26px; line-height: 1; font-weight: 400; } #atkBtn span { font-size: 12px; }
#atkBtn:active { transform: scale(0.94); }
.abtn { position: fixed; z-index: 4; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; background: #0a0806;
  border: 2px solid #8a6a3a; box-shadow: 0 0 0 1px #000, inset 0 0 6px #000;
  right: calc(62px - var(--dx) - 26px); bottom: calc(70px + var(--up) - 26px + env(safe-area-inset-bottom, 0px)); }
.abtn.empty { display: none; }
body.dnd .abtn.empty { display: block; opacity: 0.4; border-style: dashed; }
.abtn .cnt { left: 0; right: 0; bottom: 1px; text-align: center; font-size: 12px; background: rgba(0, 0, 0, 0.55); }
.abtn .mp { display: none; }
.abtn img { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.abtn.quick { width: 48px; height: 48px; right: calc(62px - var(--dx) - 24px); bottom: calc(70px + var(--up) - 24px + env(safe-area-inset-bottom, 0px)); }
.abtn.quick img { inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); }
.abtn.page { width: 44px; height: 44px; right: calc(62px - var(--dx) - 22px); bottom: calc(70px + var(--up) - 22px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; justify-content: center;
  font: 700 17px var(--serif); font-variant-numeric: lining-nums; color: var(--gold-hi); background: radial-gradient(circle, #3a2c1e, #1a120c); }
.abtn:active { filter: brightness(1.4); }

/* ---------- телефон ---------- */
body.mobile #topbar { position: absolute; top: 4px; left: calc(8px + var(--sal)); transform: none; text-align: left; max-width: calc(var(--W) - 190px); }
body.mobile #zone { font-size: 14px; padding: 2px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
body.mobile #sub { display: none; }
body.mobile #orbs { position: absolute; top: 30px; left: calc(8px + var(--sal)); bottom: auto; transform: none; width: min(44vw, 200px); padding: 0; display: flex; flex-direction: column; align-items: stretch; gap: 3px; }
body.mobile .orb { width: 100%; height: 20px; border-radius: 4px; border-width: 2px; margin: 0; box-shadow: 0 0 0 1px #000, inset 0 0 6px #000; overflow: hidden; }
body.mobile .orb.hp { order: 1; } body.mobile .orb.mp { order: 2; } body.mobile #bar { order: 3; }
body.mobile .orb .liquid { top: 0; bottom: 0; right: auto; left: 0; height: auto; width: calc(var(--p, 1) * 100%); transition: width 0.25s ease-out; }
body.mobile .orb .liquid i, body.mobile .orb .gloss { display: none; }
body.mobile .orb span { font-size: 12px; }
body.mobile #bar { padding: 0; margin: 0; background: none; border: 0; box-shadow: none; gap: 3px; border-radius: 0; }
body.mobile #cpbar { height: 5px; margin: 0; } body.mobile #cpText { display: none; }
body.mobile #xpbar { height: 14px; } body.mobile #lvl { font-size: 12px; inset: -1px 0 0 0; }
body.mobile #belt { display: none; }
body.mobile #above { gap: 4px; } body.mobile #buffs { justify-content: flex-start; pointer-events: auto; }
body.mobile #tgt { top: 126px; left: calc(8px + var(--sal)); transform: none; width: min(44vw, 200px); }
body.mobile #tgt button { min-width: 36px; height: 34px; }
body.mobile #party { top: auto; bottom: 190px; }
body.mobile #side { max-height: none; flex-wrap: nowrap; right: calc(8px + var(--sar)); bottom: auto; top: calc(min(78px, 16vw) * 2 + 34px); gap: 5px; align-items: stretch; }
body.mobile #side #gold { text-align: right; font-size: 13px; }
body.mobile #side button { min-width: 52px; width: 52px; height: 48px; padding: 2px; flex-direction: column; justify-content: center; gap: 0; font-size: 12px; }
body.mobile #side button b { font-size: 17px; line-height: 1; width: auto; }
body.mobile #side button span { font-size: 12px; line-height: 1.1; }
body.mobile #side .dsk { display: none; } body.mobile #side .mobOnly { display: flex; }
body.mobile #tracker { top: 176px; left: calc(8px + var(--sal)); right: auto; width: min(44vw, 200px); font-size: 12px; }
body.mobile #tracker .tq:nth-child(n+2) { display: none; }
body.mobile #tracker .tg:nth-of-type(n+4) { display: none; }
body.mobile .qrow button { min-height: 40px; font-size: 14px; padding: 6px 12px; }
body.mobile .qrow .qopts button { flex-basis: 100%; min-height: 44px; font-size: 15px; }
body.mobile .qgoals li { font-size: 14px; padding: 3px 0 3px 12px; }
body.mobile .qreroll { min-height: 44px; font-size: 14px; }
body.mobile .qbinfo, body.mobile .qtgt { font-size: 13px; }
body.mobile #sysFeed { display: none; }
body.mobile #chatPeek { display: block; position: absolute; left: calc(8px + var(--sal)); bottom: 190px; width: min(40vw, 150px); font-size: 13px; z-index: 2; }
body.mobile #chatPeek .pk { margin-top: 1px; opacity: 0.85; }
body.mobile #chat { display: none; position: fixed; left: 0; right: 0; top: 0; bottom: auto; width: auto; z-index: 9000; padding: 8px; background: rgba(8, 6, 5, 0.94); border-bottom: 2px solid var(--bronze); }
body.mobile #chat.open { display: block; }
body.mobile #chatLog { max-height: 34vh; min-height: 60px; font-size: 15px; mask-image: none; -webkit-mask-image: none; }
body.mobile #chat .mobOnly { display: inline-block; min-width: 44px; min-height: 44px; }
body.mobile #chatIn { min-height: 44px; font-size: 16px; opacity: 1; }
body.mobile #chatTabs { flex: 1; flex-wrap: nowrap; }
body.mobile #chatTabs button { flex: 1; min-height: 40px; padding: 4px 2px; font-size: 12px; }
body.mobile #chat.open ~ #chatPeek { display: none; }
body.mobile #toasts { top: 34%; } body.mobile .toast { font-size: 13px; padding: 6px 10px; }
body.mobile #topbar, body.mobile #orbs { pointer-events: none; }
body.mobile .win { position: fixed !important; inset: 0 !important; width: auto !important; max-width: none !important; height: auto !important; max-height: none !important; min-height: 0 !important;
  transform: none !important; zoom: 1; margin: 0; background: linear-gradient(180deg, #1c1612, #0c0907); border-radius: 0; padding: 54px 12px 18px; overflow-y: auto; z-index: 5000; border-width: 0; box-shadow: none; }
body.mobile .win::before, body.mobile .win::after { display: none; }
body.mobile .win .close { position: fixed; top: 6px; right: 6px; width: 46px; height: 46px; font-size: 20px; z-index: 5001; }
body.mobile .win > h3 { position: absolute; top: 10px; left: 14px; right: 60px; margin: 0; }
body.mobile #settings:not([hidden]) { display: flex; }
body.mobile #itemTip { top: auto; right: 8px; left: 8px; bottom: 8px; width: auto; max-height: 55vh; z-index: 8000; }
body.mobile button, body.mobile .bkBtns button { min-height: 40px; }
body.mobile .cell { min-width: 44px; }
body.mobile .item button { min-height: 36px; }
body.mobile .krow { grid-template-columns: 1fr 64px 64px; }
body.mobile .keysBox { display: none; }
body.mobile .srow input[type=range] { flex-basis: 150px; }
body.mobile.landscape #side { top: 6px; right: calc(min(78px, 16vw) * 2 + 30px + var(--sar)); flex-direction: row; align-items: flex-start; }
body.mobile.landscape #side #gold { display: none; }
body.mobile.landscape #orbs { width: 200px; }
body.mobile.landscape #tgt { top: 120px; width: 200px; }
body.mobile.landscape #tracker { top: 170px; }
body.mobile.landscape #chatPeek { bottom: 8px; width: min(34vw, 240px); }
body.mobile.landscape #chat { right: 50%; }
body.mobile.landscape #chat.open #chatLog { max-height: 28vh; }
body.mobile #worldMap { z-index: 6000; }
@media (max-width: 1060px) and (min-width: 821px) {
  .hslot { --hs: 38px; } .orb { width: 92px; height: 92px; } #orbs { width: var(--W, 100vw); }
  .pot.shot { height: 38px; width: 34px; } .pgbtn { height: 38px; }
}
@media (max-height: 520px) { #login { top: 8px; transform: translateX(-50%); left: 50%; max-height: calc(100vh - 16px); overflow-y: auto; } }
body:not(.touch) #hintTouch { display: none; }
body.touch #hintKeys { display: none; }
.hint { font-size: 13px; }

#sndHost h3:nth-of-type(2), #sndHost label:has(#gfxQ) { display: none; } /* качество — на вкладке «Графика» */

/* ---------- питомцы и верховая езда ---------- */
#mountBtn { right: 140px; bottom: 150px; }
body.mobile #mountBtn { position: fixed; right: calc(62px + 254px - 24px); bottom: calc(70px - 8px - 24px + env(safe-area-inset-bottom, 0px)); width: 48px; height: 48px; padding: 0; justify-content: center; border-radius: 50%; zoom: calc(1 / var(--z, 1)); }
body.mobile #mountBtn span { display: none; }
body.mobile #mountBtn img { width: 30px; height: 30px; }
body.mobile #petWin { left: calc(8px + var(--sal)); top: 232px; width: 168px; }
body.mobile #petShop { padding-top: 54px; }
