:root {
  --bg: #0b0708;
  --ice: #7ec8ff;
  --blood: #c62828;
  --gold: #d4a017;
  --panel: rgba(12, 8, 10, 0.82);
  --line: rgba(255, 220, 180, 0.18);
  --text: #f3ebe3;
  --muted: #b9a89a;
  --hud-h: 120px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-synthesis: none;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}
input, textarea, select, [contenteditable="true"] {
  user-select: text;
  -webkit-user-select: text;
  font-size: 16px;
}

#app {
  position: relative;
  width: 100%; height: 100%;
  display: grid;
  grid-template-rows: calc(var(--hud-h) + var(--safe-top)) 1fr;
}

/* ===== HUD ===== */
.hud {
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  min-height: calc(var(--hud-h) + var(--safe-top));
  padding: calc(10px + var(--safe-top)) 14px 10px;
  background:
    linear-gradient(180deg, rgba(20,12,10,0.97), rgba(12,8,8,0.78)),
    radial-gradient(120% 80% at 50% 0%, rgba(180,40,30,0.18), transparent 60%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.hud-left, .hud-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hud-right { flex-wrap: wrap; align-content: center; max-width: min(62vw, 720px); }
.hud-bars { display: flex; flex-direction: column; gap: 4px; min-width: 160px; flex: 1; }
.hud-meta { font-size: 11px; color: var(--muted); letter-spacing: 0.02em; }
.hud-rank { font-size: 10px; color: #ffb74d; margin-top: 2px; letter-spacing: 0.01em; max-width: 180px; line-height: 1.2; }

.hud-icon-wrap {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  aspect-ratio: 1 / 1;
  flex: 0 0 44px;
  background: rgba(14, 10, 12, 0.65);
  border-radius: 50%;
  border: 1px solid rgba(255, 220, 180, 0.28);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  overflow: hidden;
}
.hud-icon-wrap img {
  width: 72%; height: 72%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}
.hud-icon-wrap.gold { width: 36px; height: 36px; flex-basis: 36px; border-radius: 50%; }

.icon-plate {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  aspect-ratio: 1 / 1;
  flex: 0 0 44px;
  background: rgba(14, 10, 12, 0.65);
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
  box-shadow: 0 2px 0 rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.8);
  overflow: hidden;
}
.icon-plate img {
  width: 72%; height: 72%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}
.icon-plate.gold { width: 34px; height: 34px; flex-basis: 34px; border-radius: 50%; }

.hud-icon-btn {
  background: transparent; border: 0; padding: 0; cursor: pointer;
  flex: 0 0 44px;
  width: 44px !important;
  height: 44px !important;
  max-width: 44px;
  max-height: 44px;
  aspect-ratio: 1 / 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .15s ease;
  overflow: visible;
}
.hud-icon-btn:hover { transform: translateY(-1px) scale(1.04); }
.hud-icon-btn:active { transform: scale(0.96); }
.hud-left > .hud-icon-btn {
  width: 52px !important;
  height: 52px !important;
  max-width: 52px;
  max-height: 52px;
  flex-basis: 52px;
}
.hud-left .hud-icon-wrap { width: 52px; height: 52px; flex-basis: 52px; }
.hud-icon-btn > .hud-icon-wrap {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

.gold-plate {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
  color: #ffe28a;
  min-width: 72px;
}

.bar-row { display: grid; grid-template-columns: 14px 1fr auto; gap: 8px; align-items: center; }
.bar-label { width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0; }
.bar-label.hp-ico { background: linear-gradient(135deg, #b71c1c, #ff5252); box-shadow: 0 0 6px rgba(229,57,53,0.5); }
.bar-label.xp-ico { background: linear-gradient(135deg, #1565c0, #4fc3f7); box-shadow: 0 0 6px rgba(66,165,245,0.45); }
.bar-ico { width: 18px; height: 18px; object-fit: contain; filter: drop-shadow(0 1px 1px #000); }
.bar-track {
  height: 12px; border-radius: 999px;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
}
.bar-fill { height: 100%; width: 0%; border-radius: inherit; transition: width .35s ease; }
.bar-fill.hp { background: linear-gradient(90deg, #7a1010, #e53935 55%, #ff8a80); }
.bar-fill.xp { background: linear-gradient(90deg, #1a4d7a, #42a5f5 55%, #b3e5fc); }
.bar-text { font-size: 11px; color: var(--muted); min-width: 70px; text-align: right; font-weight: 700; }
.bar-row.hp .bar-text { font-weight: 800; font-size: 13px; color: #ffab91; }
.bar-row.xp .bar-text { color: #90caf9; }

/* ===== STAGE ===== */
#stage {
  position: relative;
  overflow: hidden;
  background: #12090a;
}
#gameCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.world-ui, .combat-ui {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 5;
}
.world-ui > *, .combat-ui > * { pointer-events: auto; }

.hidden { display: none !important; }

/* World clickables */
.hotspot {
  position: absolute;
  transform: translate(-50%, -100%);
  cursor: pointer;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,0.45));
  transition: filter .2s;
}
.hotspot img { display: block; width: 100%; height: auto; pointer-events: none; }
.hotspot:hover { filter: drop-shadow(0 8px 14px rgba(255,120,60,0.35)) brightness(1.05); }
.hotspot.imp { width: clamp(48px, 9vw, 78px); }
.hotspot.boss { width: clamp(90px, 16vw, 150px); }
.hotspot.npc { width: clamp(70px, 12vw, 120px); }
.hotspot.hut { width: clamp(110px, 20vw, 200px); }
.hotspot.merchant { width: clamp(64px, 10vw, 100px); }

.skill-fan.skill-fan-top {
  transform: translate(-50%, -110%) scale(0.75);
}
.skill-fan.skill-fan-top.open {
  transform: translate(-50%, -110%) scale(1);
}

.combat-top-hud {
  position: absolute;
  top: 2.2%;
  left: 0;
  right: 0;
  padding: 0 18px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
  z-index: 10;
  pointer-events: none;
}
.combat-top-hud-minimal {
  justify-content: center;
}
.combat-top-hud-minimal .combat-turn-board {
  pointer-events: auto;
}
.combat-demo-exit {
  position: static !important;
  transform: none !important;
  left: auto !important;
  top: auto !important;
  margin-top: 8px;
  width: 100%;
  pointer-events: auto;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 10px;
}
.combat-turn-board {
  pointer-events: auto;
}
.combat-hero-panel {
  width: min(320px, 36vw);
  min-width: 220px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 18px;
  border: 1px solid rgba(163, 122, 80, 0.85);
  background:
    linear-gradient(180deg, rgba(76, 48, 29, 0.92), rgba(30, 17, 10, 0.96));
  box-shadow: 0 12px 24px rgba(0,0,0,0.34);
  pointer-events: none;
}
.combat-hero-face-wrap {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 220, 170, 0.35);
  background: rgba(18, 10, 8, 0.85);
  flex: 0 0 auto;
}
.combat-hero-face {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.combat-hero-meta {
  flex: 1;
  min-width: 0;
}
.combat-hero-name-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.combat-hero-name {
  font-size: 15px;
  font-weight: 800;
  color: #ffe8c9;
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}
.combat-hero-class {
  font-size: 11px;
  font-weight: 700;
  color: #f0c79a;
  opacity: 0.92;
}
.combat-top-bar {
  position: relative;
  height: 12px;
  margin-top: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(10, 7, 6, 0.95);
  border: 1px solid rgba(255,255,255,0.16);
}
.combat-top-bar-fill {
  position: absolute;
  inset: 1px auto 1px 1px;
  width: 100%;
  border-radius: 999px;
  transition: width 0.12s linear;
}
.combat-top-bar.hp .combat-top-bar-fill {
  background: linear-gradient(90deg, #7c0909, #df2f2f 58%, #ff8e6e);
}
.combat-top-bar.mana .combat-top-bar-fill {
  background: linear-gradient(90deg, #2959d6, #3ea8ff 62%, #98e4ff);
}
.combat-top-spacer {
  width: min(320px, 36vw);
  min-width: 220px;
  flex: 0 0 auto;
  pointer-events: none;
}
.combat-sos-inline {
  position: static;
  display: inline-block;
  margin: 4px 0 0;
  padding: 6px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255, 210, 120, 0.95);
  background: linear-gradient(180deg, #ff5028 0%, #c81810 48%, #901008 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  cursor: pointer;
  pointer-events: auto;
  box-shadow:
    0 0 14px rgba(255, 90, 40, 0.65),
    inset 0 1px 0 rgba(255, 220, 160, 0.35);
  text-shadow: 0 1px 3px rgba(80, 0, 0, 0.8);
  writing-mode: horizontal-tb;
  flex: 0 0 auto;
  width: auto;
  max-width: 120px;
  white-space: nowrap;
}
.combat-action-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
  width: auto;
  max-width: min(360px, 92vw);
  pointer-events: auto;
  margin-top: 8px;
}
.hub-mob-engage {
  max-width: 320px;
  text-align: center;
}
.combat-sos-btn,
.combat-abort-btn {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 0;
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  pointer-events: auto;
  flex: 0 0 auto;
  width: auto;
  max-width: 130px;
  white-space: nowrap;
  letter-spacing: 0.04em;
}
.combat-sos-btn {
  border: 1px solid rgba(210, 78, 78, 0.82);
  background: rgba(14, 7, 7, 0.78);
  color: #ff7070;
  box-shadow: none;
  text-shadow: none;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.14em;
  padding: 5px 14px;
}
.combat-abort-btn {
  border: 1px solid rgba(180, 200, 220, 0.55);
  background: linear-gradient(180deg, #4a5568 0%, #2d3748 55%, #1a202c 100%);
  color: #e8edf5;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
.combat-sos-btn.on-cooldown,
.combat-sos-btn:disabled {
  opacity: 0.42;
  cursor: default;
  filter: grayscale(0.25);
  box-shadow: none;
}
.combat-sos-btn:hover:not(:disabled) {
  background: rgba(36, 12, 12, 0.9);
  border-color: rgba(255, 110, 110, 0.95);
  color: #ff9494;
  filter: none;
}
.combat-abort-btn:hover {
  filter: brightness(1.12);
}
.coe-combat-timer-wrap .combat-sos-btn,
.coe-combat-timer-wrap .combat-abort-btn,
.coe-combat-timer-wrap .combat-sos-inline,
.coe-combat-hud-top .combat-sos-btn,
.coe-combat-hud-top .combat-abort-btn,
.coe-combat-hud-top .combat-sos-inline {
  pointer-events: auto;
}
.combat-sos-inline:hover:not(:disabled) {
  filter: brightness(1.12);
  box-shadow:
    0 0 20px rgba(255, 120, 60, 0.85),
    inset 0 1px 0 rgba(255, 240, 200, 0.45);
}
.combat-sos-inline:disabled,
.combat-sos-inline.on-cooldown {
  opacity: 0.42;
  cursor: default;
  filter: grayscale(0.25);
  box-shadow: none;
}
.party-ready-box {
  position: relative;
  margin: 10px auto 0;
  z-index: 10;
  min-width: 0;
  width: min(272px, 90vw);
  min-height: 72px;
  padding: 8px 10px 9px;
  background: linear-gradient(168deg, rgba(28, 20, 14, 0.94), rgba(10, 8, 6, 0.9));
  border: 1px solid rgba(201, 148, 74, 0.38);
  border-radius: 12px;
  text-align: left;
  pointer-events: none;
  box-sizing: border-box;
}
.party-ready-box.hidden { display: none; }
.party-queue-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 18px;
  margin-bottom: 7px;
}
.party-queue-round { font-weight: 800; font-size: 11px; color: #f3e2c4; white-space: nowrap; }
.party-queue-badge {
  min-width: 72px;
  height: 18px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  line-height: 18px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #ffe8c8;
  background: rgba(201, 148, 74, 0.22);
  border: 1px solid rgba(201, 148, 74, 0.45);
}
.party-track.combat-turn-order {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  width: 100%;
  min-height: 30px;
}
.party-track-seg {
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  grid-template-rows: 14px 14px;
  gap: 1px;
  padding: 3px 2px;
  border-radius: 8px;
  border: 1px solid rgba(201, 148, 74, 0.28);
  background: rgba(12, 9, 6, 0.75);
  opacity: 0.72;
}
.party-track-seg.on { opacity: 1; border-color: rgba(120, 255, 140, 0.75); }
.party-track-seg.mob { flex: 0 0 52px; max-width: 52px; }
.party-track-ix { font-size: 9px; font-weight: 800; text-align: center; color: #e8c890; }
.party-track-nm {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  color: #efe0c8;
}
.party-ready-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: calc(var(--party-slot-rows, 2) * 20px);
  font-size: 10px;
  line-height: 1.2;
  color: #e8ddd2;
  margin: 6px 0 0;
}
.party-ready-box--strike .party-ready-list { display: none !important; }
.party-slot-row {
  display: grid;
  grid-template-columns: 18px 1fr 54px;
  align-items: center;
  gap: 6px;
  height: 20px;
}
.party-slot-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.party-slot-st { text-align: right; min-width: 54px; font-size: 9px; font-weight: 700; }
.party-slot-st.ok { color: #69f0ae; }
.party-slot-st.pick { color: #ffe08a; }
.party-slot-st.wait { color: rgba(232, 212, 168, 0.55); }
.party-slot-st.off { color: #ff9a9a; }
.ready-row { padding: 1px 0; opacity: 0.78; }
.ready-row.meta { font-size: 9px; opacity: 0.65; margin-bottom: 2px; }
.ready-row.ok { color: #69f0ae; opacity: 1; font-weight: 700; }
.ready-queued { font-size: 11px; color: #ffd54f; margin-top: 4px; }
.party-ready-box .btn { width: 100%; font-size: 13px; padding: 8px; }

.turn-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: min(290px, 42vw);
  padding: 8px 14px 10px;
  border-radius: 18px;
  border: 1px solid rgba(163, 122, 80, 0.88);
  background:
    linear-gradient(180deg, rgba(82, 52, 31, 0.94), rgba(34, 20, 12, 0.97));
  box-shadow: 0 12px 24px rgba(0,0,0,0.34);
  pointer-events: none;
  color: #ffe8d4;
}
.combat-turn-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ffe8c9;
}
.combat-turn-main {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.combat-round-badge {
  font-size: 14px;
  font-weight: 800;
  color: #f0c79a;
}
.combat-turn-seconds {
  min-width: 48px;
  text-align: right;
  font-size: 18px;
  font-weight: 900;
  color: #fff7ee;
}
.turn-timer-track {
  width: 100%;
  height: 8px;
  background: rgba(8,8,10,0.56);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
}
.turn-timer-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #5cc4ff, #3ea8ff 45%, #9ce76b 100%);
  transition: width 0.08s linear;
}

/* Круговой таймер хода (CoE combat) */
.turn-timer.turn-timer--ring {
  position: relative;
  width: 62px !important;
  min-width: 62px;
  max-width: 62px;
  height: 62px;
  padding: 0 !important;
  gap: 0;
  border: none;
  background: transparent;
  border-radius: 50%;
  box-shadow: none;
  pointer-events: none;
  flex-shrink: 0;
}
.turn-timer--ring .turn-timer-svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.turn-timer--ring .turn-timer-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 3;
}
.turn-timer--ring .turn-timer-ring-fill {
  fill: none;
  stroke: #5fe88c;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.08s linear, stroke 0.45s ease;
}
.turn-timer--ring .turn-timer-digit {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #fff7ee;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 12px rgba(0, 0, 0, 0.45);
  line-height: 1;
  transition: color 0.45s ease;
}
.turn-timer--ring.turn-timer--busy .turn-timer-ring-fill {
  stroke: #e85a5a;
}
.turn-timer--ring.turn-timer--busy .turn-timer-digit {
  color: #ffb0b0;
}
.turn-timer--ring.turn-timer--enemy .turn-timer-ring-fill {
  stroke: rgba(201, 148, 74, 0.55);
}
.turn-timer--ring.turn-timer--enemy .turn-timer-digit {
  color: #e8d4a8;
}
.turn-timer--ring.turn-timer--paused .turn-timer-ring-fill,
.turn-timer--ring.turn-timer--idle .turn-timer-ring-fill {
  stroke: rgba(150, 158, 168, 0.45);
}
.turn-timer--ring.turn-timer--pulse .turn-timer-digit {
  animation: turn-timer-pulse 0.9s ease-in-out infinite;
}
@keyframes turn-timer-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.82; transform: scale(1.04); }
}

.combat-top-bar.energy .combat-top-bar-fill {
  background: linear-gradient(90deg, #8a6010, #e8b028 58%, #ffe070);
}
.combat-top-bar-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.85);
  pointer-events: none;
}
.combat-turn-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
.combat-refresh-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 2px solid rgba(90, 140, 220, 0.85);
  background: linear-gradient(180deg, #2a4a72, #152840);
  color: #d8ecff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}
.combat-refresh-btn:hover { filter: brightness(1.12); }
.combat-turn-banner {
  min-width: min(220px, 34vw);
  padding: 8px 18px 10px;
  border-radius: 14px;
  border: 2px solid rgba(120, 180, 90, 0.9);
  background: linear-gradient(180deg, #4a8a28 0%, #2d6018 55%, #1a4010 100%);
  box-shadow:
    0 0 16px rgba(80, 200, 60, 0.35),
    inset 0 1px 0 rgba(220, 255, 180, 0.25);
  text-align: center;
  pointer-events: none;
}
.combat-turn-banner.enemy-turn {
  border-color: rgba(180, 90, 70, 0.85);
  background: linear-gradient(180deg, #6a3020 0%, #401810 55%, #280c08 100%);
  box-shadow: 0 0 12px rgba(200, 80, 40, 0.25);
}
.combat-turn-banner.finished {
  border-color: rgba(140, 140, 150, 0.6);
  background: linear-gradient(180deg, #3a3a42, #1a1a20);
  box-shadow: none;
}
.combat-turn-banner .combat-turn-title {
  margin-bottom: 4px;
}
.combat-turn-banner .turn-timer-track {
  margin: 4px 0;
}
.combat-turn-queue {
  position: absolute;
  top: 11%;
  right: 2.2%;
  width: min(118px, 16vw);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 9;
  pointer-events: none;
}
.combat-queue-item {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 4px 6px;
  border-radius: 10px;
  border: 1px solid rgba(120, 90, 60, 0.55);
  background: rgba(20, 12, 8, 0.82);
  opacity: 0.78;
}
.combat-queue-item.active {
  opacity: 1;
  border-color: rgba(180, 220, 120, 0.75);
  box-shadow: 0 0 10px rgba(100, 200, 60, 0.25);
}
.combat-queue-item.enemy.active {
  border-color: rgba(255, 120, 90, 0.75);
  box-shadow: 0 0 10px rgba(255, 80, 40, 0.2);
}
.combat-queue-item.dead { opacity: 0.35; filter: grayscale(0.6); }
.combat-queue-face {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 220, 170, 0.25);
  background: rgba(0,0,0,0.45);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #ffe8c9;
}
.combat-queue-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.combat-queue-meta { flex: 1; min-width: 0; }
.combat-queue-name {
  font-size: 10px;
  font-weight: 700;
  color: #f0dcc0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.combat-queue-hp {
  height: 5px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
}
.combat-queue-hp i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7c0909, #df2f2f);
  border-radius: 999px;
}

.combat-bottom .potion-row { display: none; }

.skill-fan {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%) scale(0.7);
  transition: opacity .28s ease, transform .34s cubic-bezier(.2,.9,.2,1.2);
  z-index: 8;
}
.skill-fan.open {
  opacity: 1;
  transform: translate(-50%, -100%) scale(1);
  pointer-events: auto;
}
.skill-fan .buff-row,
.skill-fan .attack-row {
  display: flex; gap: 8px; justify-content: center;
}
.skill-fan .buff-row { opacity: 0.92; transform: translateY(4px) scale(0.92); z-index: 1; }
.skill-fan .attack-row { z-index: 2; }
/* Герой: бафы + ally-скиллы (хил). Враг/босс: только атаки */
.skill-fan.mode-hero .attack-row { display: none !important; }
.skill-fan.mode-enemy .buff-row { display: none !important; }
.skill-fan.mode-enemy .attack-row .skill-btn[data-target="ally"] { display: none; }
.skill-fan.mode-enemy.skill-fan-top {
  transform: translate(-50%, -50%) scale(0.92);
}
.skill-fan.mode-enemy.skill-fan-top.open {
  transform: translate(-50%, -50%) scale(1);
}
/* Герой: центр кольца в точке layout, не уезжать вверх как skill-fan-top */
.skill-fan.mode-hero.skill-fan-top,
.skill-fan.mode-hero.skill-fan-top.open {
  transform: translate(-50%, -50%) scale(1);
}
.skill-ring-fan .skill-ring {
  position: relative;
  width: min(32vw, 220px);
  aspect-ratio: 201 / 189;
  height: auto;
  pointer-events: auto;
}
.skill-ring-fan.mode-hero .skill-ring {
  width: var(--hero-ring-w, min(34vw, 230px));
}
.skill-ring-fan.mode-enemy .skill-ring-frame {
  clip-path: inset(0 0 0 50%);
}
/* Левая половина овала — все круги, без тёмной подложки */
.skill-ring-fan.mode-hero .skill-ring-frame {
  clip-path: inset(0 50% 0 0);
  opacity: 1;
  visibility: visible;
  filter: none;
}
.skill-ring-fan.mode-hero .skill-ring-slot--buff {
  width: 20%;
  background: transparent !important;
  box-shadow: none !important;
}
.skill-ring-fan.mode-hero .skill-ring-slot--buff .skill-lock {
  background: transparent;
}
.skill-ring-fan.mode-hero .skill-ring-slot--buff img {
  width: 72%;
  height: 72%;
  max-width: 72%;
  max-height: 72%;
}
.skill-ring-fan.mode-hero .skill-ring-x {
  left: 50% !important;
  top: 88% !important;
}
.skill-ring-fan.mode-enemy .skill-ring-slot--buff {
  display: none !important;
}
.skill-ring-fan.mode-hero .skill-ring-slot--attack {
  display: none !important;
}
.skill-ring-slot .skill-lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  pointer-events: none;
}
.skill-ring-fan .skill-ring-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.55));
}
.skill-ring-fan .skill-ring-slot {
  position: absolute;
  width: 17.4%;
  aspect-ratio: 1;
  height: auto;
  margin: 0;
  padding: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  overflow: hidden;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(90, 58, 28, 0.75) !important;
  background: radial-gradient(circle at 35% 30%, rgba(48, 30, 18, 0.95), rgba(18, 10, 6, 0.98)) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 210, 140, 0.12) !important;
  cursor: pointer;
  box-sizing: border-box;
}
.skill-ring-fan .skill-ring-slot img {
  width: 68%;
  height: 68%;
  max-width: 68%;
  max-height: 68%;
  object-fit: contain;
  object-position: center center;
  pointer-events: none;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.45));
}
.skill-ring-fan .skill-ring-slot:hover {
  transform: translate(-50%, -50%) scale(1.08);
  filter: brightness(1.12);
  background: transparent !important;
}
.skill-ring-fan .kv-wheel-x,
.skill-ring-fan .skill-ring-x {
  position: absolute;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  z-index: 4;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(200, 160, 80, 0.55);
  border-radius: 50%;
  background: rgba(40, 24, 12, 0.72);
  color: #f0d080;
  font-size: 20px;
  font-weight: 800;
  line-height: 24px;
  text-align: center;
  cursor: pointer;
  box-shadow: none;
  filter: none;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.skill-ring-fan .skill-ring-x:hover {
  background: rgba(60, 36, 16, 0.9);
  color: #fff0c0;
  filter: none;
}
.skill-ring-fan .kv-wheel-x img {
  display: none;
}
.skill-fan.mode-enemy .kv-wheel {
  position: relative;
  width: 240px;
  height: 240px;
  display: block;
}
.skill-fan.mode-enemy .kv-wheel .skill-btn {
  position: absolute;
  width: 58px;
  height: 58px;
  padding: 0;
  border-radius: 50%;
  overflow: hidden;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 214, 150, 0.55);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45), 0 8px 16px rgba(0, 0, 0, 0.5);
}
.skill-fan.mode-enemy .kv-wheel .skill-btn:hover {
  transform: scale(1.12);
  border-color: #ffe0a3;
}
.skill-fan.mode-enemy .kv-wheel .skill-btn img {
  width: 100%;
  height: 100%;
  flex: none;
  object-fit: cover;
  border-radius: 50%;
  pointer-events: none;
}
.skill-fan.mode-enemy .kv-wheel .skill-btn-label {
  display: none;
}
.kv-skill-caption {
  display: none;
  margin-top: 6px;
  max-width: 260px;
  padding: 6px 10px 8px;
  text-align: center;
  background: rgba(8, 4, 6, 0.78);
  border: 1px solid rgba(255, 210, 150, 0.28);
  border-radius: 10px;
  pointer-events: none;
}
.skill-fan.mode-enemy .kv-skill-caption { display: block; }
.kv-skill-caption strong {
  display: block;
  color: #ffe0b2;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 3px;
  text-shadow: 0 1px 3px #000;
}
.kv-skill-caption span {
  display: block;
  color: #d8cfc4;
  font-size: 11px;
  line-height: 1.35;
  text-shadow: 0 1px 2px #000;
}
.kv-wheel-empty {
  display: none;
  position: absolute;
  width: 24px;
  height: 24px;
  background: rgba(184, 140, 46, 0.55);
  border-radius: 4px;
  pointer-events: none;
}
.skill-fan.mode-enemy .kv-wheel-empty { display: none; }
.kv-wheel-x {
  display: none;
  position: absolute;
  left: 98px;
  top: 188px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.skill-fan.mode-enemy .kv-wheel-x { display: block; }
.kv-wheel-x img { width: 100%; height: 100%; object-fit: contain; }
.skill-fan.mode-hero .kv-wheel {
  display: flex;
  width: auto;
  height: auto;
  position: static;
}
.skill-fan.mode-hero .kv-wheel .skill-btn { position: static; }
.skill-fan.mode-hero .kv-wheel-empty,
.skill-fan.mode-hero .kv-wheel-x { display: none; }

.class-preview-wrap {
  width: 100%;
  height: 180px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.class-preview {
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
}
.skill-btn {
  width: 58px; height: 58px;
  border-radius: 14px;
  border: 2px solid rgba(255,230,190,0.35);
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.18), transparent 45%),
    linear-gradient(160deg, #2a1814, #120a0c);
  box-shadow: 0 8px 18px rgba(0,0,0,0.45);
  cursor: pointer;
  padding: 6px;
  transition: transform .15s ease, border-color .15s;
}
.skill-btn img { width: 100%; height: 100%; object-fit: contain; }
.skill-btn:hover { transform: translateY(-3px) scale(1.06); border-color: var(--ice); }
.skill-btn.buff { width: 48px; height: 48px; border-radius: 12px; border-color: rgba(126,200,255,0.35); }
.skill-btn:disabled { opacity: 0.35; pointer-events: none; }

.combat-diag {
  position: absolute;
  right: 8px;
  bottom: calc(52px + var(--safe-bottom, 0px));
  z-index: 40;
  width: min(240px, 42vw);
  height: 118px;
  max-height: 118px;
  box-sizing: border-box;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(8, 6, 4, 0.38);
  border: 1px solid rgba(212, 175, 55, 0.22);
  color: rgba(243, 230, 200, 0.78);
  font: 500 10px/1.25 Consolas, ui-monospace, monospace;
  pointer-events: auto;
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.combat-diag-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
  font: 650 10px Georgia, serif;
  color: rgba(255, 232, 160, 0.85);
}
.combat-diag-copy {
  appearance: none;
  border: 1px solid rgba(201, 148, 74, 0.55);
  background: rgba(60, 36, 18, 0.55);
  color: #ffe8a0;
  border-radius: 4px;
  padding: 1px 6px;
  font: 650 10px Segoe UI, sans-serif;
  cursor: pointer;
}
.combat-diag-copy:hover { background: rgba(110, 70, 30, 0.75); }
.combat-diag-body {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  opacity: 0.85;
}
html.is-mobile .combat-diag {
  width: min(200px, 48vw);
  height: 100px;
  max-height: 100px;
  bottom: calc(64px + var(--safe-bottom, 0px));
  font-size: 9px;
}
.combat-bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 14px calc(10px + var(--safe-bottom));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(0deg, rgba(8,4,5,0.88), transparent);
  pointer-events: none;
}
.combat-log {
  flex: 1;
  max-width: 46%;
  font-size: 13px;
  color: #ffe8d4;
  text-shadow: 0 2px 4px #000;
  min-height: 1.2em;
}
.potion-row {
  display: flex; gap: 8px;
  pointer-events: auto;
}
.potion-slot {
  width: 52px; height: 52px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(20,12,12,0.75);
  position: relative;
  cursor: pointer;
  padding: 6px;
}
.potion-slot img { width: 100%; height: 100%; object-fit: contain; }
.potion-slot .count {
  position: absolute; right: 4px; bottom: 2px;
  font-size: 11px; font-weight: 700;
  background: #fff; color: #111; border-radius: 6px; padding: 0 4px;
}
.potion-slot.empty { opacity: 0.35; pointer-events: none; }

.combat-hint {
  padding: 8px 14px;
  border-radius: 16px;
  background: rgba(27, 16, 11, 0.9);
  border: 1px solid rgba(163, 122, 80, 0.78);
  font-size: 13px;
  font-weight: 700;
  color: #f6dcc0;
  transition: opacity .2s;
}
.combat-target-hint {
  min-width: 160px;
  max-width: min(240px, 28vw);
  text-align: center;
  pointer-events: none;
  box-shadow: 0 10px 18px rgba(0,0,0,0.28);
}

/* Overlays */
.overlay {
  position: absolute; inset: 0; z-index: 120;
  background: rgba(4,2,3,0.72);
  display: grid; place-items: center;
  padding: 18px;
  backdrop-filter: blur(4px);
  pointer-events: auto;
}
body.overlay-open #gameChat {
  pointer-events: none;
}
.panel {
  width: min(920px, 96vw);
  max-height: min(88vh, 720px);
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(36,22,18,0.96), rgba(14,8,9,0.96));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  padding: 18px;
}
.panel h2 { font-size: 22px; margin-bottom: 8px; color: #ffe6c8; }
.panel p { color: var(--muted); line-height: 1.45; margin-bottom: 12px; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.academy-ready-panel { max-width: 420px; }
.academy-ready-status { color: #ffe6c8; font-weight: 600; margin-bottom: 10px; }
.academy-ready-hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.academy-ready-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.academy-ready-list li {
  display: flex; align-items: baseline; gap: 8px;
  padding: 8px 10px; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line);
  color: #e8dfd4; font-size: 14px;
}
.academy-ready-mark { width: 1.1em; text-align: center; font-weight: 700; }
.academy-ready-ok { border-color: rgba(90, 180, 110, 0.45); }
.academy-ready-ok .academy-ready-mark { color: #7dcea0; }
.academy-ready-wait { border-color: rgba(220, 120, 80, 0.4); }
.academy-ready-wait .academy-ready-mark { color: #e59866; }
.academy-ready-sync { border-color: rgba(120, 160, 220, 0.4); }
.academy-ready-sync .academy-ready-mark { color: #85c1e9; }
.academy-ready-you { color: var(--muted); font-weight: 500; }
#academyReadyGo:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.btn {
  appearance: none; border: 1px solid var(--line);
  background: linear-gradient(180deg, #3a241c, #1a100e);
  color: var(--text); padding: 10px 16px; border-radius: 12px;
  cursor: pointer; font-weight: 600;
}
.btn.primary { border-color: rgba(126,200,255,0.45); background: linear-gradient(180deg, #2a4a62, #132433); }
.btn.danger { border-color: rgba(229,57,53,0.5); }
.btn:hover { filter: brightness(1.08); }

.grid-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.item-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
  text-align: center;
}
.item-card > img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
  padding: 4px;
  box-sizing: border-box;
}
.item-card .name { font-size: 12px; margin-top: 6px; }
.item-card .meta { font-size: 11px; color: var(--muted); }
.rarity-starter { color: #cfcfcf; }
.rarity-epic { color: #b388ff; }
.rarity-legendary { color: #ffd54f; }
.rarity-t1 { color: #cfcfcf; }
.rarity-t2 { color: #b388ff; }
.rarity-t3 { color: #ffd54f; }

.item-card.locked { opacity: 0.45; filter: grayscale(0.4); cursor: not-allowed; }

.char-panel { max-height: 82vh; overflow-y: auto; }
.char-profile {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: end;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.char-profile label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; }
.char-profile input, .char-profile select {
  background: rgba(0,0,0,0.45); border: 1px solid var(--line);
  color: #ffe8d4; border-radius: 8px; padding: 8px 10px; min-width: 140px;
}
.rank-list { max-height: 220px; overflow-y: auto; margin-top: 6px; }
.rank-row {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.rank-row.locked { opacity: 0.55; }
.rank-row.equipped { background: rgba(126,200,255,0.08); border-radius: 8px; padding: 8px; }
.shop-stats { color: #b3e5fc; font-size: 11px; line-height: 1.35; }

.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.stat-row button { margin-left: 8px; }

.toast {
  position: absolute; left: 50%; bottom: 18%;
  transform: translateX(-50%);
  z-index: 50;
  background: rgba(0,0,0,0.75);
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 12px;
  pointer-events: none;
}

.loader {
  position: absolute; inset: 0; z-index: 100;
  background: #060408;
  overflow: hidden;
  pointer-events: auto;
}
.loader-bg {
  position: absolute; inset: 0;
  background: url("../processed/ui/loader_splash_b.jpg") center / cover no-repeat;
  animation: loaderKenBurns 28s ease-in-out infinite alternate;
  will-change: transform;
}
.loader[data-splash="a"] .loader-bg {
  background-image: url("../processed/ui/loader_splash_a.jpg");
  inset: -4%;
}
@keyframes loaderKenBurns {
  0% { transform: scale(1.02) translate(0, 0); }
  100% { transform: scale(1.08) translate(-1.2%, -0.6%); }
}
.loader-portal-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 38% 34% at 50% 36%, rgba(100, 190, 255, 0.28), transparent 58%);
  animation: loaderPortalPulse 3.2s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: screen;
}
.loader[data-splash="a"] .loader-portal-glow {
  background: radial-gradient(ellipse 42% 38% at 50% 38%, rgba(255, 140, 60, 0.18), transparent 62%);
}
@keyframes loaderPortalPulse {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.04); }
}
.loader-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, transparent 0%, rgba(4, 2, 12, 0.2) 50%, transparent 72%),
    linear-gradient(180deg, transparent 68%, rgba(0, 0, 0, 0.35) 88%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}
.loader[data-splash="a"] .loader-vignette {
  background:
    radial-gradient(ellipse at 50% 35%, transparent 0%, rgba(4, 2, 8, 0.35) 55%, rgba(0, 0, 0, 0.72) 100%),
    linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.88) 100%);
}
.loader[data-splash="b"] .loader-vignette {
  background: linear-gradient(180deg, transparent 72%, rgba(0, 0, 0, 0.25) 100%);
}
.loader[data-splash="b"] .loader-portal-glow {
  opacity: 0.2;
  animation: none;
}
.loader[data-splash="b"] .loader-bg {
  animation: loaderKenBurnsSoft 32s ease-in-out infinite alternate;
}
@keyframes loaderKenBurnsSoft {
  0% { transform: scale(1); }
  100% { transform: scale(1.03); }
}
.loader[data-splash="b"] .loader-brand {
  display: none;
}
.loader-brand {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: clamp(8%, 14vh, 18%);
  transform: translateX(-50%);
  pointer-events: none;
  text-align: center;
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.75));
}
.loader-brand-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.loader-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.5vw, 18px);
}
.loader-brand-word {
  font-family: Georgia, "Palatino Linotype", "Times New Roman", serif;
  font-size: clamp(28px, 5.5vw, 54px);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
  background: linear-gradient(180deg, #fff6d8 0%, #e8b85a 38%, #a86b28 72%, #5c3a14 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 2px rgba(20, 10, 4, 0.95)) drop-shadow(0 0 18px rgba(255, 160, 60, 0.25));
}
.loader-brand-second {
  font-size: clamp(26px, 5vw, 50px);
  letter-spacing: 0.1em;
  padding-left: 0.15em;
}
.loader-brand-crystal {
  flex-shrink: 0;
  width: clamp(44px, 8vw, 72px);
  height: clamp(44px, 8vw, 72px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #f0fbff, #7ec8ff 38%, #3a78c8 62%, #1a3058 100%);
  box-shadow:
    0 0 28px rgba(126, 200, 255, 0.85),
    0 0 12px rgba(255, 220, 140, 0.45),
    inset 0 -4px 12px rgba(0, 40, 80, 0.5);
  animation: loaderBrandCrystal 3s ease-in-out infinite;
}
@keyframes loaderBrandCrystal {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.06); filter: brightness(1.12); }
}
.loader.loc-travel .loader-brand {
  opacity: 0.35;
  transform: translateX(-50%) scale(0.92);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.loader-ui {
  position: absolute; z-index: 3;
  left: 50%;
  top: 67%;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: min(720px, 78vw);
  text-align: center;
  pointer-events: none;
}
.loader[data-splash="b"] .loader-ui {
  top: 66%;
  width: min(520px, 50vw);
}
.loader[data-splash="a"] .loader-ui {
  top: 68%;
}
@media (max-width: 720px) {
  .loader-ui { top: 68%; width: min(720px, 92vw); }
  .loader[data-splash="b"] .loader-ui { top: 67%; width: min(520px, 72vw); }
}
.loader-crystal-line {
  position: relative;
  height: 16px;
  margin: 0 0 8px;
  opacity: 0.92;
}
.loader-crystal-line::before,
.loader-crystal-line::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 14px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 148, 74, 0.55), rgba(126, 200, 255, 0.45));
}
.loader-crystal-line::before { left: 0; }
.loader-crystal-line::after {
  right: 0;
  background: linear-gradient(270deg, transparent, rgba(201, 148, 74, 0.55), rgba(126, 200, 255, 0.45));
}
.loader-crystal-orb {
  position: absolute;
  left: 50%; top: 50%;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e8f4ff, #5eb8ff 45%, #2a5080 100%);
  box-shadow: 0 0 12px rgba(126, 200, 255, 0.85), 0 0 4px rgba(255, 232, 180, 0.6);
  animation: loaderCrystalOrb 2.6s ease-in-out infinite;
}
@keyframes loaderCrystalOrb {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.15); opacity: 1; }
}
.loader-loc {
  margin: 0 0 6px;
  font-size: clamp(15px, 3.2vw, 20px);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffe8c8;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9), 0 0 24px rgba(126, 200, 255, 0.35);
}
.loader-loc.hidden { display: none; }
.loader-status {
  margin: 10px 0 0;
  min-height: 1.35em;
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.45;
  color: rgba(255, 200, 180, 0.92);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}
.loader-status--err[hidden] {
  display: none !important;
}
.loader-hint {
  margin: 14px 0 0;
  min-height: 1.4em;
  font-size: clamp(11px, 2.4vw, 13px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 236, 200, 0.9);
  text-shadow: 0 0 18px rgba(126, 200, 255, 0.35), 0 2px 10px rgba(0, 0, 0, 0.9);
  animation: loaderHintFade 0.45s ease;
}
@keyframes loaderHintFade {
  from { opacity: 0.4; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.loader-ring-box {
  position: relative;
  width: clamp(128px, 22vw, 172px);
  height: clamp(128px, 22vw, 172px);
  margin: 4px auto 0;
}
.loader-ring-svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  filter: drop-shadow(0 0 10px rgba(126, 200, 255, 0.35));
}
.loader-ring-track {
  stroke: rgba(255, 248, 230, 0.14);
  stroke-width: 2;
}
.loader-ring-arc {
  stroke: url(#loaderRingGrad);
  stroke-width: 2.25;
  stroke-linecap: round;
  filter: url(#loaderRingGlow);
  transition: stroke-dashoffset 0.28s ease-out;
}
.loader-ring-glass {
  position: absolute;
  inset: 14%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04) 42%, rgba(8, 12, 24, 0.55) 100%);
  border: 1px solid rgba(255, 232, 200, 0.28);
  box-shadow:
    inset 0 0 24px rgba(126, 200, 255, 0.12),
    inset 0 -8px 20px rgba(0, 0, 0, 0.35),
    0 8px 28px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.loader-ring-pct {
  font: 700 clamp(26px, 5vw, 36px)/1 Georgia, "Times New Roman", serif;
  color: #fff4e0;
  text-shadow: 0 0 16px rgba(126, 200, 255, 0.55), 0 2px 6px rgba(0, 0, 0, 0.85);
  font-variant-numeric: tabular-nums;
}
.loader.loc-travel .loader-ring-glass {
  border-color: rgba(126, 200, 255, 0.35);
}
.load-bar {
  display: none;
}
.load-bar--legacy {
  position: relative;
  margin: 0 auto;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  padding: 1px;
  border: 1px solid rgba(201, 148, 74, 0.5);
  box-shadow:
    0 0 14px rgba(126, 200, 255, 0.25),
    inset 0 1px 0 rgba(255, 232, 180, 0.12);
  background: rgba(8, 6, 12, 0.45);
}
.loader[data-splash="b"] .load-bar {
  height: 11px;
  border-color: rgba(201, 148, 74, 0.62);
  box-shadow:
    0 0 20px rgba(255, 120, 40, 0.12),
    0 0 16px rgba(126, 200, 255, 0.3),
    inset 0 1px 0 rgba(255, 232, 180, 0.18);
}
.load-bar-groove {
  position: absolute; inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.65);
}
.load-bar-track {
  position: absolute; inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.65), rgba(20, 12, 8, 0.5));
  overflow: hidden;
}
.load-bar-fill,
#loadFill {
  position: absolute;
  left: 1px; top: 1px; bottom: 1px;
  z-index: 1;
  width: 0%;
  max-width: calc(100% - 2px);
  border-radius: inherit;
  background: linear-gradient(90deg, #3a8fd4, #5eb8ff 25%, #c9944a 55%, #ffe8a0 78%, #7ec8ff);
  box-shadow: 0 0 12px rgba(126, 200, 255, 0.65), 0 0 6px rgba(255, 180, 80, 0.35);
  transition: width 0.25s ease-out;
}
.load-bar-shimmer {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 65%
  );
  background-size: 220% 100%;
  animation: loaderBarShimmer 2.4s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: overlay;
}
@keyframes loaderBarShimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -40% 0; }
}
.loader-ui .boot-reload { pointer-events: auto; }
.coe-shop-cat {
  grid-column: 1 / -1;
  margin: 12px 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e8c878;
  border-bottom: 1px solid rgba(201, 160, 80, 0.35);
  padding-bottom: 4px;
}
.coe-shop-cat:first-child { margin-top: 0; }
.coe-shop-grid-section {
  margin-bottom: 4px;
}
.coe-shop-qty-label {
  font-size: 11px;
  font-weight: 700;
  color: #c4a574;
  margin-right: 4px;
}

.hud-hidden { display: none !important; }
#app:has(.hud-hidden) {
  grid-template-rows: 1fr;
}
.stage-dim { filter: brightness(0.85) saturate(1.05); }

.title-screen {
  position: absolute; inset: 0; z-index: 90;
  display: grid; place-items: end center;
  padding: 0 18px calc(28px + var(--safe-bottom));
  pointer-events: auto;
}
.title-screen.hidden { display: none; }
.title-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 5, 6, 0.05) 0%, rgba(8, 5, 6, 0.25) 45%, rgba(5, 3, 4, 0.82) 70%, #050304 100%),
    url('../processed/loc_hell_shore.png') center top / cover no-repeat;
  pointer-events: none;
}
.title-veil {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 28%, rgba(126, 200, 255, 0.10), transparent 50%);
  pointer-events: none;
  animation: titlePulse 6s ease-in-out infinite;
}
@keyframes titlePulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
.title-card {
  position: relative; z-index: 1;
  width: min(440px, 94vw);
  text-align: center;
  animation: titleIn 0.7s ease-out both;
}
@keyframes titleIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.title-eyebrow {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: #c4a484; margin-bottom: 8px;
}
.title-brand {
  font-family: Georgia, "Palatino Linotype", "Times New Roman", serif;
  font-size: clamp(48px, 12vw, 72px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  background: linear-gradient(180deg, #fff4e4 10%, #e8a070 55%, #c45a3a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 18px rgba(0,0,0,0.55));
  margin-bottom: 10px;
}
.title-tag {
  font-size: 15px; color: #f0e6dc; margin-bottom: 10px;
}
.title-blurb {
  font-size: 13px; line-height: 1.5; color: #b9a89a;
  margin: 0 auto 18px; max-width: 36em;
}
.title-actions {
  display: flex; flex-direction: column; gap: 10px; align-items: stretch;
}
.title-btn {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.title-btn.primary {
  background: linear-gradient(180deg, #c45a3a, #8b1e1e);
  border-color: rgba(255, 200, 160, 0.35);
  color: #fff;
}
.title-btn.primary:hover { filter: brightness(1.08); }

.class-pick { width: min(1100px, 98vw); max-height: min(92vh, 900px); overflow-y: auto; }
.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
  text-align: left;
}
.class-card {
  background: rgba(12, 8, 10, 0.82);
  border: 1px solid rgba(255, 200, 150, 0.28);
  border-radius: 14px;
  padding: 14px;
  color: var(--text);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}
.class-card:hover {
  transform: translateY(-2px);
  border-color: rgba(126, 200, 255, 0.55);
}
.class-preview-wrap {
  height: 168px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 6px;
  background:
    radial-gradient(ellipse at 50% 88%, rgba(126, 200, 255, 0.18), transparent 55%),
    linear-gradient(180deg, rgba(20, 12, 14, 0.2), rgba(8, 4, 6, 0.55));
  border-radius: 10px;
  overflow: hidden;
}
.class-preview {
  height: 160px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.65));
  pointer-events: none;
}
.class-face {
  width: 48px; height: 48px;
  object-fit: contain;
  display: block;
  margin: -18px auto 6px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255, 200, 150, 0.35);
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}
.class-name { font-size: 20px; font-weight: 800; text-align: center; color: #ffe8d4; }
.class-title { font-size: 13px; text-align: center; color: #7ec8ff; margin-top: -2px; }
.class-tag { font-size: 12px; text-align: center; color: #ffab91; margin: 4px 0 8px; }
.class-blurb { font-size: 12px; line-height: 1.4; color: #b9a89a; margin-bottom: 8px; }
.class-guide {
  white-space: pre-wrap;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10px;
  line-height: 1.35;
  color: #c9b8a6;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,200,150,0.15);
  border-radius: 8px;
  padding: 8px;
  margin: 6px 0 8px;
  text-align: left;
  max-height: 140px;
  overflow: auto;
}
.class-passives {
  list-style: none;
  font-size: 11px;
  color: #d8cfc4;
  line-height: 1.45;
  padding: 0;
}
.class-passives li { margin: 3px 0; }
.class-card-wrap { display: flex; flex-direction: column; gap: 6px; }
.demo-class-btn {
  width: 100%;
  font-size: 12px;
  padding: 8px 10px;
}
.demo-priest-note { text-align: center; opacity: 0.75; font-size: 11px; }

.loot-box {
  text-align: center;
}
.loot-box img { width: min(220px, 50vw); cursor: pointer; filter: drop-shadow(0 12px 20px rgba(0,0,0,0.5)); }

.quest-tracker {
  position: absolute;
  left: 8px;
  top: 10px;
  z-index: 6;
  max-width: 240px;
  pointer-events: none;
}
.quest-track-item {
  background: rgba(0,0,0,0.65);
  border: 1px solid rgba(255,200,150,0.2);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 11px;
}
.quest-track-item.done { border-color: rgba(105,240,174,0.45); }
.qt-title { font-weight: 700; color: #ffe8d4; margin-bottom: 3px; }
.qt-obj { color: #b9a89a; }
.qt-turnin { color: #69f0ae; margin-top: 4px; font-weight: 600; }

/* Переходы ярмарки — кликабельный список под квестами */
.quest-track-item.loc-travel {
  pointer-events: auto;
  border-color: rgba(126, 200, 255, 0.35);
  background: rgba(8, 14, 22, 0.78);
}
.loc-travel-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 4px;
}
.loc-travel-btn {
  appearance: none;
  border: 1px solid rgba(180, 210, 240, 0.28);
  background: linear-gradient(180deg, rgba(40, 55, 72, 0.9), rgba(18, 26, 36, 0.95));
  color: #e8f2ff;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  line-height: 1.25;
  transition: border-color .12s ease, filter .12s ease, transform .12s ease;
}
.loc-travel-btn:hover {
  border-color: rgba(126, 200, 255, 0.65);
  filter: brightness(1.12);
  transform: translateY(-1px);
}
.loc-travel-btn:active { transform: translateY(0); }
.quest-track-item.world-boss-banner {
  border-color: rgba(255, 80, 80, 0.55);
  background: linear-gradient(180deg, rgba(60, 10, 20, 0.9), rgba(12, 8, 18, 0.92));
}
.wb-rank-box {
  position: absolute;
  right: 8px;
  top: 56px;
  z-index: 8;
  min-width: 140px;
  max-width: 200px;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,140,100,0.4);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11px;
  pointer-events: none;
}
.wb-rank-title { font-weight: 800; color: #ffccbc; margin-bottom: 4px; }
.wb-rank-list { color: #d8cfc4; line-height: 1.35; }
.wb-rank-list .me { color: #69f0ae; font-weight: 700; }
.hud-wound { color: #ff8a80; font-weight: 700; }
.wb-top { line-height: 1.35; margin-top: 4px; color: #ffccbc; }
.lore-panel .lore-text { line-height: 1.55; margin-bottom: 10px; color: #d8cfc4; }
.skill-manage-row { display: flex; gap: 6px; align-items: center; margin: 4px 0; flex-wrap: wrap; }
.skill-list { margin-top: 8px; }

/* Orientation / responsive */
@media (orientation: portrait) {
  :root { --hud-h: 118px; }
  .hud { flex-wrap: wrap; }
  .hud-bars { min-width: 0; width: 100%; }
  .skill-btn { width: 52px; height: 52px; }
  .hotspot.imp { width: clamp(42px, 14vw, 70px); }
  .combat-log { max-width: 100%; font-size: 12px; }
}

@media (orientation: landscape) and (max-height: 500px) {
  :root { --hud-h: 86px; }
  .hud-icon-btn, .hud-icon-wrap { width: 36px; height: 36px; flex-basis: 36px; }
  .hud-left > .hud-icon-btn, .hud-left .hud-icon-wrap { width: 40px; height: 40px; flex-basis: 40px; }
  .icon-plate { width: 36px; height: 36px; flex-basis: 36px; border-radius: 50%; }
  .skill-btn { width: 46px; height: 46px; }
  .potion-slot { width: 42px; height: 42px; }
  .combat-top-hud {
    top: 1.6%;
    padding: 0 10px;
    gap: 8px;
  }
  .combat-hero-panel {
    min-width: 170px;
    width: min(42vw, 230px);
    padding: 6px 8px;
  }
  .combat-hero-face-wrap {
    width: 42px;
    height: 42px;
  }
  .combat-hero-name {
    font-size: 12px;
  }
  .combat-hero-class,
  .combat-top-bar-text,
  .combat-turn-title,
  .combat-round-badge,
  .combat-target-hint {
    font-size: 10px;
  }
  .turn-timer {
    width: min(44vw, 220px);
    padding: 6px 10px 8px;
  }
  .combat-turn-seconds {
    font-size: 15px;
  }
  .party-ready-box {
    bottom: 20%;
    left: 6px;
    max-width: min(220px, 58vw);
  }
  .turn-timer.turn-timer--ring {
    width: 56px !important;
    min-width: 56px;
    max-width: 56px;
    height: 56px;
  }
  .turn-timer.turn-timer--ring .turn-timer-digit {
    font-size: 15px;
  }
}

@media (min-width: 1100px) and (orientation: landscape) {
  .hud-bars { min-width: 260px; }
  .skill-btn { width: 64px; height: 64px; }
}

/* === Overhaul: hover, inventory, map, alchemy, arena, chat === */
.hot:hover, .hud-icon-btn:hover, .btn:hover, .item-card:hover, .class-card:hover, .eq-slot:hover {
  filter: brightness(1.12);
  border-color: rgba(126, 200, 255, 0.55) !important;
  transform: translateY(-1px);
  transition: filter .12s ease, border-color .12s ease, transform .12s ease;
}
.coe-pack-cell.hot:hover,
.coe-eq-slot.hot:hover,
.item-tip-host.hot:hover,
.coe-shop-card:hover,
.shop-card:hover {
  transform: none !important;
}
.hud-icon-btn { transition: filter .12s ease, box-shadow .12s ease; }
.hud-icon-btn:hover { box-shadow: 0 0 12px rgba(126,200,255,0.35); }
.save-btn { font-size: 16px; min-width: 40px; }

.reg-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; text-align: left; max-width: 360px; margin-left: auto; margin-right: auto; }
.reg-form label { font-size: 12px; color: #cbb; display: flex; flex-direction: column; gap: 4px; }
.reg-input {
  background: rgba(0,0,0,0.45); border: 1px solid rgba(255,200,150,0.3);
  border-radius: 8px; padding: 10px 12px; color: #fff; font-size: 14px;
}

.inv-panel { max-width: min(820px, 96vw); }
.inv-layout { display: grid; grid-template-columns: 160px 1fr; gap: 14px; align-items: start; }
.inv-face { width: 96px; height: 96px; object-fit: contain; display: block; margin: 0 auto 8px; background: transparent; }
.inv-name { text-align: center; font-weight: 800; color: #ffe8d4; }
.inv-stats { font-size: 12px; line-height: 1.6; margin-top: 8px; color: #d8cfc4; }
.eq-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.eq-slot {
  min-height: 72px; background: rgba(0,0,0,0.45); border: 1px dashed rgba(255,200,150,0.28);
  border-radius: 10px; padding: 6px; color: #ccc; cursor: pointer;
}
.eq-slot img { width: 36px; height: 36px; object-fit: contain; display: block; margin: 0 auto; }
.eq-name { font-size: 10px; display: block; text-align: center; margin-top: 4px; }
.eq-empty { font-size: 9px; opacity: 0.55; }
.inv-h { margin: 12px 0 8px; color: #ffe6c8; }

.map-stage-active {
  aspect-ratio: auto;
  min-height: 180px;
  padding: 16px;
  background: linear-gradient(160deg, #1a2430 0%, #0e141c 100%);
}
.map-stage-empty {
  min-height: 160px;
  border-radius: 10px;
  border: 1px dashed rgba(201, 148, 74, 0.35);
  background:
    radial-gradient(ellipse at 50% 40%, rgba(90, 60, 30, 0.35), transparent 65%),
    linear-gradient(160deg, #1a1410 0%, #0c0a08 100%);
}
.coe-world-map {
  width: min(96vw, 720px);
  max-height: min(92vh, 960px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px 12px;
}
.coe-world-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
}
.coe-world-map-head h2 {
  margin: 0;
  font-size: 1.05rem;
}
.map-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.map-zoom-btns {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(201, 160, 80, 0.35);
}
.map-zoom-btn {
  min-width: 32px !important;
  padding: 4px 8px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}
.map-zoom-label {
  min-width: 44px;
  text-align: center;
  font-size: 12px;
  color: #ffd89a;
  font-variant-numeric: tabular-nums;
}
.map-stage-art {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border-radius: 8px;
  background: #0a1218;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.map-art-frame {
  position: relative;
  width: min(100%, 720px);
  margin: 0 auto;
  flex: 0 0 auto;
  line-height: 0;
  transform-origin: top center;
  transition: transform 0.12s ease;
  will-change: transform;
}
.map-stage-art .map-bg-exact,
.map-art-frame .map-bg.map-bg-exact {
  width: 100% !important;
  height: auto !important;
  max-width: 100%;
  display: block;
  object-fit: contain !important;
  object-position: top center;
  user-select: none;
  pointer-events: none;
  aspect-ratio: auto;
}
.map-art-frame .map-nodes,
.map-stage-art .map-nodes {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.map-stage-art .map-nodes-live {
  pointer-events: none;
}
.map-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  z-index: 4;
}
.map-poi {
  width: 4.6%;
  min-width: 28px;
  max-width: 42px;
  aspect-ratio: 1 / 1;
}
.map-poi-sprite {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  image-rendering: pixelated;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.75));
}
.map-poi-landmark {
  z-index: 6;
  min-width: 32px;
  max-width: 56px;
}
.map-poi-editor {
  min-width: 24px;
  max-width: 48px;
  aspect-ratio: 1 / 1;
}
.map-editor-dot {
  position: relative;
  flex-shrink: 0;
  width: 31px;
  height: 31px;
  margin: 0;
  border-radius: 50%;
  pointer-events: none;
  display: block;
  box-sizing: border-box;
}
.map-editor-dot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--map-dot-ring, rgba(140, 220, 130, 0.45));
}
.map-editor-dot::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--map-inner-px, 17px);
  height: var(--map-inner-px, 17px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--map-dot-fill, rgba(120, 210, 110, 0.92));
  border: var(--map-stroke-px, 2px) solid var(--map-dot-stroke, #183818);
  box-sizing: border-box;
}
.map-editor-dot-north {
  --map-dot-ring: rgba(100, 180, 255, 0.5);
  --map-dot-fill: rgba(70, 150, 255, 0.95);
  --map-dot-stroke: #0a2848;
}
.map-editor-dot-south {
  --map-dot-ring: rgba(255, 130, 100, 0.5);
  --map-dot-fill: rgba(255, 85, 65, 0.95);
  --map-dot-stroke: #401008;
}
.map-editor-dot-neutral {
  --map-dot-ring: rgba(140, 220, 130, 0.45);
  --map-dot-fill: rgba(120, 210, 110, 0.92);
  --map-dot-stroke: #183818;
}
.map-editor-point {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  max-width: none;
  z-index: 6;
  padding: 0;
}
.map-editor-label {
  position: absolute;
  z-index: 7;
  margin: 0;
  padding: 0;
  font-family: Segoe UI, system-ui, sans-serif;
  white-space: nowrap;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  text-shadow: none;
  background: transparent;
  color: inherit;
  border-style: solid;
  cursor: pointer;
  max-width: none;
  overflow: visible;
}
.map-editor-label:hover,
.map-editor-label:focus-visible {
  filter: brightness(1.06);
  box-shadow: 0 0 0 2px rgba(255, 235, 180, 0.45);
}
.map-city-hit {
  z-index: 8;
}
.map-poi-landmark .map-poi-sprite {
  inset: 2%;
  width: 96%;
  height: 96%;
  filter:
    drop-shadow(0 0 1px rgba(0, 0, 0, 0.95))
    drop-shadow(0 2px 3px rgba(0, 0, 0, 0.85));
}
.map-poi-kind-gate {
  z-index: 8;
  min-width: 36px;
  max-width: 62px;
}
.map-poi-kind-gate .map-poi-sprite {
  filter:
    drop-shadow(0 0 2px rgba(0, 0, 0, 1))
    drop-shadow(0 0 8px rgba(255, 235, 180, 0.45))
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9));
}
.map-poi-kind-forest .map-poi-sprite {
  filter:
    drop-shadow(0 0 1px rgba(0, 0, 0, 0.95))
    drop-shadow(0 0 6px rgba(80, 160, 70, 0.35))
    drop-shadow(0 2px 3px rgba(0, 0, 0, 0.85));
}
.map-poi-landmark .map-hotspot-hit {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.map-poi-landmark:hover .map-hotspot-hit,
.map-poi-landmark:focus-visible .map-hotspot-hit {
  border: 2px solid rgba(255, 235, 180, 0.7) !important;
  background: rgba(255, 240, 200, 0.14) !important;
  box-shadow: 0 0 10px rgba(255, 210, 120, 0.45) !important;
  transform: none !important;
}
.map-poi-landmark .map-city-label,
.map-mark-label {
  font-size: 13px;
  padding: 4px 10px;
  font-weight: 700;
  max-width: 220px;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}
.map-mark-label[style*="left:"] {
  position: absolute;
  top: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
}
.map-label-gate {
  color: #fff4d0 !important;
  border-color: rgba(255, 220, 140, 0.65) !important;
  background: rgba(40, 24, 10, 0.88) !important;
}
/* legacy alias */
.map-poi-bogs {
  z-index: 6;
  min-width: 32px;
  max-width: 56px;
}
.map-label-soon {
  font-size: 8px !important;
  padding: 1px 4px !important;
  color: #f0d090 !important;
  opacity: 0.92;
}
.map-label-boar {
  white-space: nowrap;
  z-index: 7;
}
/* Руины — подпись НАД точкой; лунная — НИЖЕ и чуть влево, без наложения */
.map-label-above {
  top: 0 !important;
  bottom: auto !important;
  transform: translate(-50%, calc(-100% - 4px)) !important;
  white-space: nowrap;
  z-index: 8;
}
/* Только текст — без «холста» (руины и т.п.) */
.map-label-plain {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  color: #fff8e8 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-shadow:
    0 0 1px #000,
    0 1px 2px #000,
    0 2px 4px rgba(0, 0, 0, 0.95),
    1px 0 0 #3a2410,
    -1px 0 0 #3a2410;
}
.travel-wait-stack {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 5, 2, 0.62);
  backdrop-filter: blur(2px);
}
.travel-wait-dlg {
  max-width: 360px;
  width: min(360px, 94vw);
  margin: 0;
}
.travel-wait-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #c8b090;
  font-weight: 500;
}
.travel-wait-bar {
  height: 10px;
  margin: 12px 0 6px;
  border-radius: 999px;
  background: rgba(20, 12, 6, 0.55);
  border: 1px solid rgba(201, 160, 80, 0.45);
  overflow: hidden;
}
.travel-wait-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8a5a22, #e6c98a 55%, #ffe8c0);
  transition: width 0.08s linear;
}
.travel-wait-eta {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: #ffe8c0;
  text-align: center;
}
.map-poi-moon {
  z-index: 7;
}
.map-label-moon {
  left: 35% !important;
  top: 100% !important;
  transform: translate(-50%, 3px) !important;
  white-space: nowrap;
  z-index: 7;
}
.map-city {
  width: 8%;
  max-width: 88px;
  min-width: 40px;
  aspect-ratio: 1 / 1;
  z-index: 5;
}
.map-hotspot-hit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  background: transparent;
  box-shadow: none;
  transition: box-shadow .14s ease, border-color .14s ease, transform .14s ease, background-color .14s ease;
}
.map-city-label {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, 2px);
  white-space: nowrap;
  font: 600 10px/1.2 Segoe UI, sans-serif;
  color: #ffe8c0;
  text-shadow: 0 1px 2px #000, 0 0 6px rgba(0,0,0,.8);
  pointer-events: none;
  background: rgba(20, 12, 6, 0.72);
  border: 1px solid rgba(201, 160, 80, 0.45);
  border-radius: 4px;
  padding: 2px 5px;
}
.map-locked .map-hotspot-hit {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.map-help {
  margin: 0 0 6px;
  font-size: 12px;
  color: #d8c4a0;
  line-height: 1.35;
}
.map-skin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
}
.map-skin-label {
  font-size: 12px;
  font-weight: 600;
  color: #d8c4a0;
  margin-right: 2px;
}
.map-skin-btn {
  font-size: 11px !important;
  padding: 5px 10px !important;
  border-radius: 999px !important;
  opacity: 0.88;
}
.map-skin-btn.active {
  opacity: 1;
  border-color: #e8c878 !important;
  box-shadow: 0 0 8px rgba(232, 200, 120, 0.35);
  background: linear-gradient(180deg, #4a3218 0%, #2a1a0c 100%) !important;
}
.map-quick-travel {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}
.map-quick-btn {
  font-size: 12px !important;
  padding: 7px 12px !important;
  border-radius: 8px !important;
}
.map-quick-ruins {
  background: linear-gradient(180deg, #5a3a18 0%, #3a2410 100%) !important;
  border-color: #c9a050 !important;
  color: #ffe8c0 !important;
  box-shadow: 0 0 10px rgba(201, 160, 80, 0.25);
}
.map-hotspot-ruins .map-hotspot-hit {
  border-color: transparent;
  background: transparent;
}
.qt-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* Карта мира — текстовая кнопка, без иконки с белым фоном */
.qt-map-btn {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 100%;
  margin: 0 0 5px;
  padding: 5px 8px !important;
  border: 1px solid rgba(140, 100, 40, 0.35) !important;
  background: linear-gradient(180deg, #fff8e8, #f0dfa8) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset !important;
  cursor: pointer;
  border-radius: 7px !important;
}
.qt-map-btn:hover {
  background: linear-gradient(180deg, #fffcef, #f5e8b8) !important;
}
.qt-map-compass { display: none !important; }
.qt-map-title {
  font-size: 12px;
  font-weight: 700;
  color: #3a2410;
  letter-spacing: 0.02em;
}
.qt-map-here {
  font-size: 10px;
  font-weight: 500;
  color: #7a6040;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Кнопки локаций — без кружков со стрелками */
.qt-dest,
.qt-travel-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  padding: 9px 12px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(140, 100, 40, 0.35) !important;
  background: linear-gradient(180deg, #fff8e8, #f0dfa8) !important;
  color: #2a1808 !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  text-decoration: none !important;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 1px 3px rgba(60, 40, 10, 0.12);
}
.qt-dest:hover:not(.locked),
.qt-travel-btn:hover:not(.locked) {
  border-color: rgba(160, 110, 30, 0.55) !important;
  background: linear-gradient(180deg, #fffcef, #f5e8b8) !important;
  color: #1a1008 !important;
}
.qt-dest-academy,
.qt-travel-academy {
  border-color: rgba(180, 110, 30, 0.5) !important;
  background: linear-gradient(180deg, #fff4d8, #efd090) !important;
}
.qt-dest.locked,
.qt-travel-btn.locked {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.2);
  color: #6a5030 !important;
}
.qt-travel-ico { display: none !important; }
.qt-travel-map,
.qt-travel-compass,
.qt-travel-map-text { display: none !important; }
.map-hotspot:hover .map-hotspot-hit,
.map-hotspot:focus-visible .map-hotspot-hit {
  border-color: rgba(255, 220, 70, 0.55);
  background: rgba(255, 210, 40, 0.12);
  box-shadow: 0 0 10px rgba(255, 200, 40, 0.35);
  transform: scale(1.06);
}
.chat-ch {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  margin-right: 2px;
  background: rgba(80, 50, 20, 0.55);
  color: #ffd89a;
  border: 1px solid rgba(201, 160, 80, 0.35);
}
html.is-mobile .map-poi {
  min-width: 26px;
  width: 5.2%;
}
html.is-mobile .map-city {
  min-width: 48px;
  width: 12%;
}
html.is-mobile .map-cave {
  min-width: 26px;
  width: 4.6%;
}
html.is-mobile .coe-world-map {
  width: min(100vw, 100%);
  max-height: 94vh;
  padding: 8px;
}
html.is-mobile .coe-world-map-head h2 {
  font-size: 0.95rem;
}
.map-active-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  position: relative;
}
.map-active-list .map-node {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: 100%;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
}
.map-bg { width: 100%; height: 100%; object-fit: cover; display: block; }
.map-path {
  position: absolute; height: 5px; transform-origin: 0 50%;
  background: linear-gradient(90deg,
    rgba(255, 171, 145, 0.15) 0%,
    rgba(255, 183, 77, 0.95) 8%,
    rgba(255, 138, 101, 0.95) 50%,
    rgba(255, 183, 77, 0.95) 92%,
    rgba(255, 171, 145, 0.15) 100%);
  box-shadow: 0 0 0 1px rgba(40, 20, 10, 0.85), 0 0 8px rgba(255, 140, 80, 0.35);
  border-radius: 999px;
  pointer-events: none; z-index: 2;
}
.map-path::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 10px, rgba(0,0,0,0.35) 10px 14px);
  border-radius: inherit;
}
.map-node {
  position: absolute; transform: translate(-50%, -50%); z-index: 3;
  background: transparent; border: 0; color: #fff; cursor: pointer; padding: 0;
}
.map-node-dot {
  display: block; width: 10px; height: 10px; border-radius: 50%;
  background: #e8dcc8;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.65), 0 0 8px rgba(255,220,180,0.35);
  margin: 0 auto 4px;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.map-node.here .map-node-dot {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.7), 0 0 10px rgba(255,255,255,0.5);
}
.map-node:hover .map-node-dot, .map-node.hot-glow:hover .map-node-dot {
  transform: scale(1.35);
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255,210,140,0.8), 0 0 12px rgba(255,200,120,0.55);
}
.map-node-label {
  font-size: 11px; font-weight: 700; text-shadow: 0 1px 4px #000; white-space: nowrap;
  background: transparent; padding: 0; border-radius: 0;
  opacity: 0.92;
}
.map-dash {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 6;
}
.map-dash-line {
  fill: none;
  stroke: #f6e6a8;
  stroke-width: 2;
  stroke-dasharray: 6 8;
  stroke-linecap: butt;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.map-cave {
  width: 3.6%;
  min-width: 22px;
  max-width: 34px;
  aspect-ratio: 1 / 1;
  z-index: 7;
}
.map-cave .map-cave-hit {
  border-radius: 50%;
}
.map-cave:hover .map-cave-hit,
.map-cave:focus-visible .map-cave-hit {
  border-color: rgba(224, 170, 255, 0.7);
  background: rgba(186, 104, 200, 0.16);
  box-shadow: 0 0 10px rgba(186, 104, 200, 0.4);
  transform: scale(1.08);
}
.map-traveler {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  z-index: 8;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 28%, #fff8e4, #e6c98a 58%, #8a5a22);
  border: 2px solid #5a3a16;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.45);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-traveler-face {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3e2a14;
  box-shadow: 0 5px 0 -1px #3e2a14;
  margin-bottom: 3px;
}
.map-travel-bar {
  position: absolute; left: 12%; right: 12%; bottom: 10%; height: 10px; z-index: 5;
  background: rgba(0,0,0,0.55); border-radius: 999px; overflow: hidden;
  border: 1px solid rgba(255, 200, 140, 0.28);
  box-shadow: 0 0 12px rgba(126, 200, 255, 0.25);
}
.map-travel-bar #mapTravelFill { height: 100%; width: 0; background: linear-gradient(90deg,#7ec8ff,#ffab91); }
.map-travel-eta {
  position: absolute; left: 50%; bottom: 3.5%; transform: translateX(-50%);
  z-index: 6; min-width: 200px; max-width: 86%;
  padding: 6px 14px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(28, 22, 16, 0.92), rgba(12, 10, 8, 0.94));
  border: 1px solid rgba(201, 148, 74, 0.45);
  color: #ffe6c8; font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  text-align: center; pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.45);
}
.map-travel-eta.hidden, .map-travel-bar.hidden { display: none; }

/* Боковой переход — карточка пути на loc-travel loader */
.loader.loc-travel .loader-ui::before {
  content: "";
  display: block;
  width: min(360px, 86%);
  margin: 0 auto 10px;
  height: 0;
}
.travel-panel {
  max-width: 360px;
  text-align: center;
  padding: 16px 18px 14px;
  border-radius: 14px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(126, 200, 255, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(36, 28, 20, 0.96), rgba(14, 12, 10, 0.97));
  border: 1px solid rgba(201, 148, 74, 0.42);
  box-shadow: 0 10px 28px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255, 230, 180, 0.08);
}
.travel-panel h2 {
  font-size: 18px;
  margin: 0 0 6px;
  color: #ffe6c8;
  letter-spacing: 0.03em;
}
.travel-panel .travel-route {
  color: #d8cfc4;
  font-size: 14px;
  margin-bottom: 10px;
  line-height: 1.35;
}
.travel-panel .travel-eta {
  color: #7ec8ff;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 8px;
}
.travel-panel .load-bar {
  margin: 10px 0 4px;
  height: 10px;
  background: rgba(0,0,0,0.45);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,200,150,0.18);
}
.travel-panel .load-bar > div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #7ec8ff, #ff8a65);
  transition: width 0.08s linear;
}

.alchemy-panel .panel-ico, .arena-panel .panel-ico { width: 36px; height: 36px; vertical-align: middle; margin-right: 6px; }
.alchemy-mats { display: flex; gap: 12px; margin: 10px 0; }
.mat-card {
  flex: 1; text-align: center; background: rgba(0,0,0,0.4); border-radius: 12px; padding: 10px;
  border: 1px solid rgba(255,200,150,0.2);
}
.mat-card img { width: 56px; height: 56px; object-fit: contain; }
.mat-card b { display: block; font-size: 18px; color: #ffe8d4; }
.alchemy-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin: 8px 0; padding: 8px; background: rgba(0,0,0,0.3); border-radius: 10px; }

.arena-bg-preview { display: none; }
.arena-hero { margin-bottom: 10px; }
.panel.arena-panel.arena-compact,
.panel.arena-panel.arena-v2 {
  width: min(440px, 94vw) !important;
  max-width: min(440px, 94vw) !important;
  max-height: min(78vh, 640px) !important;
  padding: 14px 14px 12px !important;
  border-radius: 14px;
  overflow-y: auto;
}
html.is-mobile .panel.arena-panel.arena-compact,
html.is-mobile .panel.arena-panel.arena-v2 {
  width: min(440px, calc(100vw - 20px)) !important;
  max-width: min(440px, calc(100vw - 20px)) !important;
  max-height: 78vh !important;
}
.panel.arena-panel.arena-v2 h2,
.panel.arena-panel.arena-compact h2 {
  font-size: 17px; margin: 0 0 8px; display: flex; align-items: center; gap: 6px;
}
.panel.arena-panel.arena-v2 .panel-ico,
.panel.arena-panel.arena-compact .panel-ico { width: 28px; height: 28px; margin: 0; }
.panel.arena-panel.arena-v2 p,
.panel.arena-panel.arena-compact p { margin-bottom: 4px; font-size: 12px; line-height: 1.35; }
.panel.arena-panel.arena-v2 .panel-actions,
.panel.arena-panel.arena-compact .panel-actions { margin-top: 10px; gap: 8px; flex-wrap: wrap; }
.panel.arena-panel.arena-v2 .btn,
.panel.arena-panel.arena-compact .btn { padding: 9px 14px; font-size: 13px; border-radius: 10px; }
.arena-actions .btn { min-width: 120px; }
.arena-pvp { max-width: min(440px, 94vw); }
.arena-me-card {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px;
  margin: 6px 0; padding: 8px; border-radius: 10px;
  background: rgba(0,0,0,0.45); border: 1px solid rgba(255,200,150,0.22);
  text-align: center; font-size: 12px; color: #ffe8d4;
}
html.is-mobile .arena-me-card { grid-template-columns: 1fr; gap: 2px; }
.arena-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.arena-col { background: rgba(0,0,0,0.4); border-radius: 10px; padding: 8px; min-height: 0; }
.arena-col.north { border: 1px solid rgba(120,180,255,0.5); }
.arena-col.south { border: 1px solid rgba(255,140,80,0.5); }
.arena-col h3 { margin: 0 0 6px; font-size: 12px; }
.arena-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; padding: 3px 0; }
.arena-row-main { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.arena-row-stats { display: flex; gap: 8px; white-space: nowrap; font-size: 11px; }
.arena-row.me { color: #ffe8d4; font-weight: 700; }
.arena-empty { opacity: 0.55; font-size: 11px; margin: 2px 0; }
.arena-hint { text-align: center; margin: 8px 0 !important; color: #ffe8d4 !important; }
.arena-me-line { text-align: center; margin: 4px 0 !important; color: #ffe8d4 !important; }
.arena-prize-one { text-align: center; margin: 0 0 8px !important; opacity: 0.9; }
.arena-need { text-align: center; color: #ffb38a !important; }
.arena-start-block { margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.arena-fight-btn { width: 100%; justify-content: center; }
.arena-challenge-rival { text-align: center; font-size: 15px; margin: 8px 0 !important; }
.arena-timer { font-size: 32px; margin: 6px 0; color: #ffe8d4; text-align: center; font-weight: 800; }
.arena-contrib-board .arena-contrib-row { padding: 2px 0; }
.arena-scoreboard {
  display: flex; align-items: stretch; justify-content: center; gap: 8px;
  margin: 4px 0 6px;
}
.arena-scoreboard.compact { margin: 4px 0; }
.arena-score {
  flex: 1; text-align: center; padding: 6px 6px; border-radius: 8px;
  background: rgba(0,0,0,0.4);
}
.arena-score.north { border: 1px solid rgba(120,180,255,0.5); }
.arena-score.south { border: 1px solid rgba(255,140,80,0.5); }
.arena-score b { display: block; font-size: 20px; line-height: 1.1; color: #ffe8d4; }
.arena-score span { font-size: 11px; }
.arena-score-side { font-weight: 700; }
.arena-score-vs {
  align-self: center; font-weight: 800; color: #c9a27a; letter-spacing: 1px; font-size: 12px;
}
.arena-pts { color: #9ecbff; font-weight: 700; }
.arena-mini-top { margin-top: 4px; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 3px; }
.arena-history {
  margin: 6px 0; padding: 6px 8px; border-radius: 8px;
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,200,150,0.18);
}
.arena-history h3 { margin: 0 0 4px; font-size: 12px; }
.arena-hist-row {
  display: flex; flex-direction: column; gap: 1px;
  padding: 4px 0; border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 11px; line-height: 1.25;
}
.arena-hist-row:first-of-type { border-top: 0; }
.arena-hist-vs b.north { color: #8ec7ff; }
.arena-hist-vs b.south { color: #ff9a6b; }
.arena-hist-beat { opacity: 0.7; margin: 0 3px; }
.arena-hist-pts { color: #cbb; font-size: 10px; }
.arena-result { text-align: center; }
.arena-result.win { box-shadow: 0 0 0 1px rgba(120,200,120,0.35); }
.arena-result.lose { box-shadow: 0 0 0 1px rgba(200,90,80,0.35); }
.arena-result-vs { display: flex; gap: 8px; align-items: stretch; margin: 8px 0; }
.arena-result-delta { margin: 4px 0 8px; }
.arena-season-end { color: #ffe082; font-weight: 700; }

.arena-vs-bar {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 6px auto 4px; max-width: min(640px, 94vw);
  padding: 6px 10px; border-radius: 12px;
  background: rgba(8,4,6,0.72); border: 1px solid rgba(255,200,150,0.28);
  font-size: 13px; font-weight: 700; color: #ffe8d4;
  pointer-events: none;
}
.arena-vs-bar .me { color: #ffb38a; text-align: right; }
.arena-vs-bar .foe { color: #9ecbff; text-align: left; }
.arena-vs-bar .mid { opacity: 0.6; font-size: 11px; }
.arena-vs-name { font-size: 12px; font-weight: 700; }
.arena-hp {
  font-size: 13px; font-weight: 800; color: #ffe8d4;
  text-shadow: 0 1px 4px #000; margin-top: 2px;
}
.arena-strike {
  text-align: center; font-size: 16px; font-weight: 800; color: #ffe8d4;
  text-shadow: 0 2px 10px #000; margin: 2px 0 6px; min-height: 1.2em;
  pointer-events: none;
}
.arena-strike.you { color: #ffcc80; }
.arena-strike.foe { color: #90caf9; }
.combat-log.arena-log {
  max-width: 72%;
  font-size: 14px;
  line-height: 1.35;
}
.combat-log.arena-log div { margin: 1px 0; }

.game-chat {
  position: fixed; right: 8px; top: calc(var(--hud-h, 64px) + 8px); bottom: 8px;
  width: min(260px, 28vw); z-index: 20;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(18,10,12,0.92), rgba(8,4,6,0.95));
  border: 1px solid rgba(255,200,150,0.28); border-radius: 12px;
  overflow: hidden; pointer-events: auto;
}
.chat-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; font-weight: 700; font-size: 13px; color: #ffe8d4;
  border-bottom: 1px solid rgba(255,255,255,0.08); flex-shrink: 0;
}
.chat-collapse-btn {
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(255,200,150,0.3); background: rgba(0,0,0,0.35);
  color: #ffe8d4; font-size: 14px; line-height: 1; flex-shrink: 0;
}
.chat-collapse-btn:hover { border-color: rgba(255,200,150,0.55); }
.chat-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.game-chat.collapsed {
  bottom: auto;
  height: auto;
}
.game-chat.collapsed .chat-body { display: none; }
.game-chat.collapsed .chat-head { border-bottom: 0; }
.chat-tabs { display: flex; gap: 4px; padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.chat-tab {
  flex: 1; font-size: 11px; font-weight: 700; padding: 6px 4px;
  background: transparent; border: 1px solid transparent; color: #cbb;
  border-radius: 8px; cursor: pointer;
}
.chat-tab.on { color: #ffe8d4; border-color: rgba(255,200,150,0.35); }
.chat-channel-meta { font-size: 10px; color: #9ab; padding: 4px 10px; }
.chat-nick-btn {
  background: none; border: 0; color: #ffe0b2; font: inherit; font-weight: 700;
  padding: 0; cursor: pointer; text-decoration: underline dotted rgba(255,200,150,0.4);
}
.chat-nick-btn.nick-north {
  color: #5eb3ff;
  text-decoration-color: rgba(94, 179, 255, 0.45);
}
.chat-nick-btn.nick-south {
  color: #ff6b6b;
  text-decoration-color: rgba(255, 107, 107, 0.45);
}
.chat-nick-btn.nick-admin,
.nick-admin {
  color: #8b1a12 !important;
  text-decoration-color: rgba(120, 24, 16, 0.55);
  font-weight: 800 !important;
}
#hudName.nick-admin { color: #8b1a12; }
.chat-line.chat-staff {
  color: #6e1810 !important;
  font-weight: 600;
}

.chat-nick-btn.nick-seer,
.nick-seer,
#hudName.nick-seer,
.coe-profile-name.nick-seer,
.lb-nick.nick-seer {
  background-image: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  color: #c45cff !important;
  -webkit-text-fill-color: #c45cff !important;
  text-shadow: 0 0 6px rgba(180, 90, 255, 0.5);
  text-decoration-color: rgba(140, 110, 255, 0.45);
  animation: nickSeerPulse 2.2s ease-in-out infinite;
}
@keyframes nickSeerPulse {
  0%, 100% { color: #c45cff; }
  50% { color: #6a9bff; }
}
@keyframes nickSeerShimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: -20% 50%; }
}
.chat-nick-btn.nick-mod-north,
.nick-mod-north,
#hudName.nick-mod-north,
.coe-profile-name.nick-mod-north,
.lb-nick.nick-mod-north {
  background-image: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  color: #3d8fd9 !important;
  -webkit-text-fill-color: #3d8fd9 !important;
  font-weight: 800 !important;
  text-decoration-color: rgba(61, 143, 217, 0.55);
  text-shadow: 0 0 6px rgba(80, 160, 255, 0.5);
  animation: nickNorthPulse 2.2s ease-in-out infinite;
}
@keyframes nickNorthPulse {
  0%, 100% { color: #3d8fd9; -webkit-text-fill-color: #3d8fd9; }
  50% { color: #7ec8ff; -webkit-text-fill-color: #7ec8ff; }
}
.chat-mod-shield.mod-shield-north,
.mod-shield-ico.mod-shield-north {
  filter: hue-rotate(195deg) saturate(1.35) brightness(1.05)
    drop-shadow(0 0 3px rgba(70, 150, 255, 0.65));
}
.chat-vip-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 3px;
  padding: 0 5px;
  height: 15px;
  font-family: "Cinzel", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  color: #2a1400;
  background: linear-gradient(180deg, #ffe9a0 0%, #e0b23a 45%, #b8860b 100%);
  border: 1px solid #fff1b0;
  border-radius: 3px;
  box-shadow: 0 0 6px rgba(255, 200, 80, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  text-shadow: 0 1px 0 rgba(255, 255, 220, 0.45);
  vertical-align: middle;
  flex-shrink: 0;
}
.chat-vip-ico {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex: none;
  display: inline-block;
  vertical-align: -3px;
  margin-right: 1px;
  filter: drop-shadow(0 0 3px rgba(255, 200, 80, 0.75));
}
.hud-buff-slot.is-vip .hud-buff-ico {
  filter: drop-shadow(0 0 4px rgba(255, 200, 80, 0.85));
}
.hud-buff-slot.is-novice .hud-buff-ico {
  filter: drop-shadow(0 0 5px rgba(80, 220, 120, 0.9));
}
.chat-rank-ico {
  width: 18px;
  height: 20px;
  min-width: 18px;
  min-height: 20px;
  max-width: 18px;
  object-fit: contain;
  object-position: center;
  flex: 0 0 18px;
  image-rendering: auto;
  -ms-interpolation-mode: bicubic;
  vertical-align: -4px;
  margin-right: 2px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4));
}
.chat-clan-ico {
  width: 14px;
  height: 14px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  vertical-align: -2px;
  margin-right: 0;
  flex: none;
}
.chat-id-wrap {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  vertical-align: middle;
  max-width: 100%;
}
.chat-id-wrap .chat-nick-btn {
  min-width: 0;
}
.chat-mod-shield,
.mod-shield-ico {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex: none;
  display: inline-block;
  vertical-align: -2px;
  background: none !important;
  background-color: transparent !important;
  box-shadow: none;
  border: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.mod-shield-ico {
  width: 16px;
  height: 16px;
  margin-left: 2px;
}
.lb-mod-shield {
  width: 14px;
  height: 14px;
  margin-right: 3px;
  vertical-align: -2px;
}
.chat-class { opacity: 0.75; font-size: 11px; }
.chat-ch {
  font-size: 9px; font-weight: 800; letter-spacing: 0.04em;
  padding: 1px 4px; border-radius: 4px; margin-right: 2px;
  background: rgba(255,255,255,0.08);
}
.chat-ch.world { color: #ffd54f; }
.chat-ch.north { color: #81d4fa; }
.class-card.selected {
  outline: 2px solid #ffe0b2;
  box-shadow: 0 0 0 2px rgba(255,180,80,0.35);
}
.map-qmark {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  width: 22px; height: 22px; object-fit: contain; pointer-events: none; z-index: 5;
  background: transparent !important;
  mix-blend-mode: normal;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.55));
}
.qt-chapter { font-size: 11px; color: #ffd54f; font-weight: 800; margin-bottom: 4px; }
.rarity-t4 { color: #ffd54f !important; }
.skill-card.locked {
  opacity: 0.45;
  filter: grayscale(0.6);
  pointer-events: none;
}
.hud-crystals { font-size: 12px; color: #b388ff; margin-left: 6px; }
.pvp-tag { color: #e8c4ff; font-weight: 800; }
.chat-fac-inline { width: 12px; height: 12px; vertical-align: middle; }
.profile-panel { max-width: min(640px, 96vw); text-align: left; }
.prof-hero { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.prof-face { width: 72px; height: 72px; object-fit: contain; background: transparent; }
.prof-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin: 10px 0; font-size: 13px;
}
.prof-gear {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
}
.prof-slot {
  min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; font-size: 10px; color: #ccc; background: transparent;
  border: 1px solid rgba(255,200,150,0.15); border-radius: 8px; padding: 6px;
}
.prof-slot img { width: 36px; height: 36px; object-fit: contain; background: transparent; }
.prof-slot.empty { opacity: 0.45; }
.chat-online { max-height: 72px; overflow: auto; padding: 6px 10px; font-size: 11px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.online-row.on::before { content: none; display: none; }
.chat-log { flex: 1; overflow: auto; padding: 8px 10px; font-size: 12px; line-height: 1.4; }
.chat-line { margin-bottom: 6px; color: #e8ddd2; }
.chat-line.sys { color: #9ab; font-style: italic; }
.chat-mention { color: #3d8f5a; font-weight: 700; }
.friend-btn {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1px solid #2a5a18;
  border-radius: 4px;
  background: linear-gradient(180deg, #7ecf55, #3d8a28);
  color: #fff !important;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
  margin-left: 4px;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.35);
  font-family: Arial, sans-serif;
}
.friend-btn:hover { filter: brightness(1.12); }
.friend-btn.is-friend,
.friend-btn.friend-btn-sm {
  background: linear-gradient(180deg, #c07050, #8a4028);
  border-color: #5a2818;
  color: #fff !important;
  font-size: 12px;
}
.friend-mark {
  flex: 0 0 auto;
  color: #8a6a10;
  font-size: 11px;
  margin-left: 2px;
}
.friend-req-box {
  position: fixed;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  z-index: 120;
  width: min(320px, 92vw);
  padding: 14px 16px;
  border-radius: 8px;
  border: 3px solid #8a6030;
  background: linear-gradient(180deg, #e8d4a8, #c9a878);
  color: #1a1008;
  box-shadow: 0 10px 28px rgba(0,0,0,0.55);
  pointer-events: auto;
}
.friend-req-title {
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.friend-req-text { font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.friend-req-actions { display: flex; gap: 8px; justify-content: flex-end; }
.chat-mobile-online { display: none !important; }
.chat-mobile-on-item { display: none !important; }
.online-row { display: flex; align-items: center; gap: 4px; }
.online-row .chat-nick-btn { flex: 1 1 auto; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.party-panel {
  margin: 0 0 8px;
  padding: 8px 8px 6px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(80, 50, 18, 0.45), rgba(40, 24, 10, 0.55));
  border: 1px solid rgba(212, 168, 88, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 230, 180, 0.12);
}
.party-panel-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.party-title {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffe2b0;
}
.party-bonus {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: #9fe08a;
  white-space: nowrap;
}
.party-btn {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(255, 200, 140, 0.35);
  background: rgba(0, 0, 0, 0.25);
  color: #ffe8d0;
  cursor: pointer;
}
.party-btn.danger { border-color: rgba(220, 90, 70, 0.45); color: #ffc8b8; }
.party-member {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 2px;
  font-size: 12px;
}
.party-member.is-leader .party-nick { color: #ffd48a; font-weight: 800; }
.party-member.is-me .party-nick { text-decoration: underline; text-underline-offset: 2px; }
.party-crown { width: 12px; text-align: center; color: #f0c060; }
.party-role { margin-left: auto; font-size: 10px; opacity: 0.7; }
.party-hint { font-size: 10px; opacity: 0.7; padding: 4px 2px 0; line-height: 1.3; }
.chat-tab.party-on { color: #c8e8a8; }
.friends-empty { padding: 10px 6px; font-size: 12px; color: #3a2818; line-height: 1.4; }
.friend-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto;
  background: #888; box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
}
.friend-dot.on { background: #3d8a28; }
.friend-dot.off { background: #8a5a40; opacity: 0.7; }
.chat-form { display: flex; gap: 4px; padding: 8px; border-top: 1px solid rgba(255,255,255,0.08); }
.chat-form input {
  flex: 1; background: rgba(0,0,0,0.45); border: 1px solid rgba(255,200,150,0.25);
  border-radius: 8px; color: #fff; padding: 8px; font-size: 12px;
}
/* Мобильный клиент — чат в сетке app, без 38vh-оверлея */
html.is-mobile .game-chat {
  display: flex;
  position: relative;
  left: auto; right: auto; bottom: auto; top: auto;
  width: auto; max-width: none;
  height: auto; max-height: none;
  border-radius: 5px;
  z-index: 55;
}
html.is-mobile .game-chat.collapsed { height: auto; max-height: none; }
html.is-mobile .game-chat .chat-body { touch-action: pan-y; overflow: auto; -webkit-overflow-scrolling: touch; }
html.is-mobile .game-chat .chat-emotes,
html.is-mobile .chat-emotes {
  display: flex !important;
  flex-wrap: wrap;
  visibility: visible !important;
  max-height: 72px !important;
  gap: 2px !important;
  padding: 2px 4px !important;
}
html.is-mobile .game-chat .emote-btn,
html.is-mobile .emote-btn {
  width: 20px !important;
  height: 20px !important;
  flex: 0 0 20px !important;
}
html.is-mobile .game-chat .emote-btn img,
html.is-mobile .game-chat .emote-kolobok,
html.is-mobile .emote-btn img,
html.is-mobile .emote-kolobok {
  width: 20px !important;
  height: 20px !important;
}
html.is-mobile .game-chat .chat-emote,
html.is-mobile .game-chat .chat-emote-img,
html.is-mobile .chat-emote,
html.is-mobile .chat-emote-img {
  width: 20px !important;
  height: 20px !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  object-fit: contain !important;
  image-rendering: auto !important;
}
html.is-mobile .chat-emote-emoji,
html.is-mobile .emote-emoji {
  font-size: 20px !important;
}
html.is-mobile .inv-layout { grid-template-columns: 1fr; }
html.is-mobile .eq-grid { grid-template-columns: repeat(3, 1fr); }
html.is-mobile .shop-grid { grid-template-columns: 1fr 1fr; }
html.is-mobile .hud-right { flex-wrap: wrap; max-width: 62vw; }
html.is-mobile .overlay .panel { max-height: 88vh; overflow: auto; touch-action: pan-y; width: calc(100vw - 16px); max-width: 100%; }
html.is-mobile #gameCanvas { touch-action: none; }
html.is-mobile .chat-fab {
  display: flex !important;
}
html.is-mobile .skill-btn { width: 52px; height: 52px; }
html.is-mobile .combat-bottom { padding-bottom: calc(12px + var(--safe-bottom)); }
html.is-mobile .hot:hover, html.is-mobile .hud-icon-btn:hover, html.is-mobile .btn:hover { transform: none; }

.quest-track-item.guide { border-color: rgba(126,200,255,0.45); }
.quest-track-item .meta { opacity: 0.8; font-size: 10px; }
.rank-row {
  display: flex; justify-content: space-between; gap: 8px; align-items: center;
  padding: 8px; margin: 4px 0; border-radius: 10px;
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,200,150,0.15);
}
.rank-row.unlocked { border-color: rgba(126,200,255,0.35); }
.rank-row.equipped { box-shadow: inset 0 0 0 1px #ffd54f; }

/* Polish pack */
.faq-btn { font-weight: 900; }
.save-btn { font-weight: 800; }
.hud-text-ico {
  color: #ffe8d4;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}
.faq-panel { max-width: min(720px, 96vw); text-align: left; }
.faq-block { margin: 8px 0; background: rgba(0,0,0,0.35); border-radius: 10px; padding: 8px 12px; border: 1px solid rgba(255,200,150,0.2); }
.faq-block summary { cursor: pointer; font-weight: 800; color: #ffe8d4; }
.faq-body { white-space: pre-wrap; font-family: inherit; font-size: 13px; color: #ddd; margin: 8px 0 0; line-height: 1.45; }

.eq-bonus { display: block; font-size: 9px; color: #9ec; text-align: center; line-height: 1.2; margin-top: 2px; }
.eq-slot.filled { border-style: solid; border-color: rgba(126,200,255,0.35); }

.map-path {
  position: absolute; height: 5px; transform-origin: 0 50%;
  background: linear-gradient(90deg,
    rgba(255, 171, 145, 0.15) 0%,
    rgba(255, 183, 77, 0.95) 8%,
    rgba(255, 138, 101, 0.95) 50%,
    rgba(255, 183, 77, 0.95) 92%,
    rgba(255, 171, 145, 0.15) 100%);
  box-shadow: 0 0 0 1px rgba(40, 20, 10, 0.85), 0 0 8px rgba(255, 140, 80, 0.35);
  border-radius: 999px;
  pointer-events: none; z-index: 2;
}
.map-path::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 10px, rgba(0,0,0,0.35) 10px 14px);
  border-radius: inherit;
}
/* Точки на карте (не жёлтые пузыри) — финальный оверрайд */
.map-node-dot {
  display: block; width: 10px; height: 10px; border-radius: 50%;
  background: #e8dcc8;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.65), 0 0 8px rgba(255,220,180,0.35);
  margin: 0 auto 4px;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.map-node.here .map-node-dot {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.7), 0 0 10px rgba(255,255,255,0.5);
}
.map-node.region-north .map-node-dot { background: #9ad4ff; }
.map-node.region-south .map-node-dot { background: #ffb09a; }
.map-node.region-rift .map-node-dot, .map-node.pvp .map-node-dot {
  background: #e8c4ff;
  box-shadow: 0 0 0 2px rgba(80,20,60,0.7), 0 0 10px rgba(200,120,255,0.45);
}
.map-tip {
  display: none; position: absolute; left: 50%; bottom: calc(100% + 10px);
  transform: translateX(-50%); width: 240px; z-index: 8;
  background: linear-gradient(180deg, rgba(28,14,12,0.97), rgba(10,6,8,0.98));
  border: 1px solid rgba(255,183,77,0.45); border-radius: 12px;
  padding: 10px; text-align: left; pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.55);
}
.map-node:hover .map-tip, .map-node:focus .map-tip { display: block; }
.map-tip-title { font-weight: 800; color: #ffe8d4; margin-bottom: 6px; font-size: 13px; }
.map-tip-row { font-size: 11px; color: #d8cfc4; margin: 3px 0; line-height: 1.35; }
.map-tip-lock { color: #ff8a80; font-size: 11px; margin-top: 6px; }
.skill-card {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(0,0,0,0.4); border: 1px solid rgba(255,200,150,0.22);
  border-radius: 12px; padding: 10px; margin: 8px 0;
}
.skill-card.in-slot { border-color: rgba(126,200,255,0.55); }
.skill-ico { width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; }
.skill-title { font-weight: 800; color: #ffe8d4; }
.skill-desc { font-size: 12px; color: #ccc; margin: 4px 0 8px; line-height: 1.35; }
.skill-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.skill-slots-row { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-slot-btn { display: inline-flex; align-items: center; gap: 6px; }
.slot-mini { width: 18px; height: 18px; object-fit: contain; }
.rank-ico { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.rank-info { flex: 1; min-width: 0; }
.hud-rank { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.hud-rank-ico {
  width: 22px;
  height: 22px;
  object-fit: contain;
  object-position: center;
  flex: 0 0 22px;
  image-rendering: auto;
}

.game-chat { z-index: 40; }
.game-chat.in-combat { opacity: 0.96; }
.chat-badge { width: 16px; height: 16px; object-fit: contain; vertical-align: -3px; margin-right: 3px; image-rendering: pixelated; image-rendering: crisp-edges; }
.chat-badge.fac { width: 14px; height: 14px; }
.chat-nick { font-weight: 700; color: #ffe8d4; }
.hud-rank-ico {
  width: 22px;
  height: 22px;
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
}
.chat-emotes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 6px;
  border-top: 1px solid rgba(255,255,255,0.06);
  max-height: 140px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  contain: layout paint;
}
.coe-chat .chat-emotes {
  display: none !important;
}
.emote-btn {
  width: 28px; height: 28px; padding: 0; border: 0; background: transparent;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 28px; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.emote-btn:hover { transform: scale(1.08); }
.emote-btn img, .emote-kolobok { display: block; width: 28px; height: 28px; object-fit: contain; vertical-align: middle; }
.emote-emoji, .chat-emote-emoji { display: none; }
.chat-emote, .chat-emote-img {
  width: 28px !important; height: 28px !important;
  object-fit: contain !important; vertical-align: middle;
  display: inline-block !important; margin: 0 1px;
  visibility: visible !important; opacity: 1 !important;
}
.chat-fac {
  display: inline-flex; align-items: center; justify-content: center;
  width: 12px; height: 12px; border-radius: 50%;
  margin-right: 3px; vertical-align: -1px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.3);
  flex: 0 0 12px;
}
.chat-fac img { width: 9px; height: 9px; object-fit: contain; display: block; }
.chat-fac.northern_hell, .chat-fac.frost_order { background: linear-gradient(135deg, #4fc3f7, #1565c0); }
.chat-fac.southern_hell, .chat-fac.ash_cult { background: linear-gradient(135deg, #ffab91, #bf360c); box-shadow: 0 0 0 1px #ffccbc, 0 0 5px rgba(255,110,64,0.4); }

.map-region {
  position: absolute; z-index: 2; pointer-events: none;
  font-family: 'Cinzel', 'Segoe UI', serif; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; font-size: clamp(11px, 1.6vw, 15px);
  text-shadow: 0 2px 8px rgba(0,0,0,0.85), 0 0 12px rgba(0,0,0,0.5);
  opacity: 0.88;
}
.map-region-north {
  top: 3%; left: 4%; color: #9ad8ff;
}
.map-region-south {
  bottom: 4%; right: 4%; color: #ffab80;
}

.hot-glow {
  background: transparent !important;
  border: 1px solid transparent;
  transition: filter 0.15s, box-shadow 0.15s, border-color 0.15s, transform 0.12s;
}
.hot-glow:hover, .hot-glow:focus-visible {
  filter: brightness(1.18) drop-shadow(0 0 6px rgba(255, 200, 120, 0.55));
  box-shadow: 0 0 0 1px rgba(255, 210, 140, 0.45);
  border-color: rgba(255, 210, 140, 0.35);
  transform: translateY(-1px);
}
.item-tip-host { position: relative; }
.item-tip-host[data-tip]:hover::after,
.item-tip-host[data-tip]:hover::before { content: none !important; display: none !important; }
.coe-float-tip {
  position: fixed;
  z-index: 40000;
  left: 0;
  top: 0;
  display: none;
  max-width: min(280px, calc(100vw - 16px));
  padding: 9px 11px;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  color: #f7ead4;
  background: rgba(10, 7, 5, 0.96);
  border: 1px solid rgba(232, 186, 110, 0.55);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
  white-space: pre-line;
  pointer-events: none;
  word-break: break-word;
}
.coe-float-tip.on { display: block; }
.coe-float-tip--gear {
  max-width: min(300px, calc(100vw - 16px));
  padding: 10px 12px;
  border-color: rgba(212, 175, 85, 0.65);
}
.coe-float-tip--gear .coe-tip-slot {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a89070;
  margin-bottom: 2px;
}
.coe-float-tip--gear .coe-tip-name {
  font-size: 14px;
  font-weight: 800;
  color: #ffe8c0;
  margin-bottom: 6px;
}
.coe-float-tip--gear .coe-tip-stats {
  font-size: 12px;
  font-weight: 600;
  color: #d4c4a0;
  line-height: 1.45;
}
.coe-float-tip--gear .coe-tip-extra {
  font-size: 11px;
  color: #9a8468;
  margin-top: 4px;
}
.quest-reward-icons { display: flex; gap: 8px; margin: 8px 0; }
.quest-reward-icons img { width: 40px; height: 40px; object-fit: contain; background: transparent; }
.quest-reward-line { color: #ffd54f; }
.shop-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.panel-icon { width: 36px; height: 36px; vertical-align: middle; object-fit: contain; background: transparent; }
.hud-shards { display: flex; gap: 4px; margin-top: 2px; }
.hud-shard { width: 18px; height: 18px; object-fit: contain; background: transparent; }
.hud-shard.off { opacity: 0.25; filter: grayscale(1); }
.hud-shard.on { opacity: 1; }
.hud-clan { color: #ffcc80; font-weight: 700; margin-left: 4px; }
.chat-clan {
  display: inline-block; font-size: 10px; font-weight: 700; color: #ffe0a0;
  margin-right: 3px; vertical-align: middle;
}
.clan-members { margin: 8px 0; padding-left: 18px; }
.fair-panel .grid-items .item-card { min-height: auto; }
.map-node.hot-glow:hover .map-node-dot {
  box-shadow: 0 0 14px #ffd54f, 0 0 4px #fff;
}
.eq-slot.hot-glow { background: transparent; }
.eq-slot.hot-glow.filled:hover { outline: 1px solid rgba(255, 210, 140, 0.5); }
.skill-btn.on-cd { opacity: 0.45; filter: grayscale(0.4); }
.map-paths, .map-path { display: none !important; }

.combat-rank {
  position: absolute; top: 12px; left: 12px; display: flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,0.55); border: 1px solid rgba(255,200,150,0.3);
  border-radius: 999px; padding: 4px 10px 4px 4px; font-size: 11px; color: #ffe8d4; z-index: 5;
}
.combat-rank img { width: 26px; height: 26px; object-fit: contain; }
.combat-assist-btn {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 5; font-size: 12px; padding: 6px 12px;
}
.combat-sos-btn {
  /* остаётся в .combat-action-row — не absolute поверх таймера */
  z-index: 5;
  font-size: 13px;
  font-weight: 700;
}
.chat-sos-row {
  margin-top: 0;
  pointer-events: auto;
}
.coe-chat .chat-line.sys .chat-sos-join,
.coe-chat .chat-line.sys .chat-sos-row,
.coe-chat .chat-line.sys .chat-sos-card {
  pointer-events: auto;
}
html.is-mobile .chat-sos-join {
  pointer-events: auto !important;
}
.skill-btn-label {
  display: block; font-size: 9px; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #eee; margin-top: 2px;
}
.skill-btn { flex-direction: column; }

/* Shop / warehouse / mail / paper doll */
.shop-panel { max-width: min(960px, 96vw); }
.shop-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.shop-slot-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 10px; }
.shop-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px; max-height: 52vh; overflow: auto; touch-action: pan-y;
  padding: 4px;
}
.shop-card {
  display: flex; gap: 8px; align-items: stretch;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,180,120,0.28);
  border-radius: 12px; padding: 8px;
  background-image: url('../processed/ui_frame_card.png');
  background-size: 100% 100%; background-repeat: no-repeat;
}
.shop-card.locked { opacity: 0.55; }
.shop-card-frame {
  width: 64px; height: 64px; flex: 0 0 64px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid rgba(201, 160, 80, 0.35);
  border-radius: 10px;
}
.shop-card-frame img { width: 48px; height: 48px; object-fit: contain; background: transparent; }
.shop-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shop-card-actions { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.btn.tiny { padding: 4px 8px; font-size: 11px; }
.mail-form { display: grid; gap: 8px; margin: 10px 0; text-align: left; }
.mail-form label { display: grid; gap: 4px; font-size: 12px; color: #d8cfc4; }
.mail-form input, .mail-form select {
  background: rgba(0,0,0,0.45); border: 1px solid rgba(255,200,150,0.25);
  border-radius: 8px; color: #fff; padding: 8px;
}
.mail-card {
  background: rgba(0,0,0,0.4); border: 1px solid rgba(255,180,120,0.25);
  border-radius: 12px; padding: 10px; text-align: left;
}
.paper-doll {
  display: block;
}
.paper-doll-stage {
  position: relative;
  width: 160px;
  height: 220px;
  margin: 0 auto 8px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 70%, rgba(40,24,18,0.65), rgba(0,0,0,0.35));
  border: 1px solid rgba(255,210,150,0.28);
  border-radius: 12px;
}
.doll-body {
  position: absolute;
  left: 8%;
  bottom: 0;
  width: 84%;
  height: 96%;
  object-fit: contain;
  object-position: bottom center;
  pointer-events: none;
}
.doll-piece {
  display: block !important;
  position: absolute;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px #000);
}
.doll-piece.slot-head { left: 34%; top: 2%; width: 32%; height: 22%; }
.doll-piece.slot-shoulders { left: 18%; top: 18%; width: 64%; height: 16%; }
.doll-piece.slot-chest { left: 28%; top: 30%; width: 44%; height: 22%; }
.doll-piece.slot-gloves { left: 6%; top: 46%; width: 22%; height: 16%; }
.doll-piece.slot-pants { left: 30%; top: 52%; width: 40%; height: 22%; }
.doll-piece.slot-boots { left: 30%; bottom: 2%; width: 40%; height: 16%; }
.doll-piece.slot-weapon { right: 2%; top: 28%; width: 28%; height: 40%; }
.doll-piece.north,
.eq-slot.north img,
.item-card.north img {
  filter: saturate(1.2) hue-rotate(18deg) brightness(1.06);
}
.inv-layout { grid-template-columns: 180px 1fr; }
.inv-extra-btns { justify-content: center; margin-top: 8px; }
.chat-fab {
  display: none; position: fixed; right: 12px; bottom: calc(12px + var(--safe-bottom));
  z-index: 56; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(255,180,120,0.45); background: rgba(20,10,8,0.9);
  color: #ffe8d4; font-weight: 800; align-items: center; justify-content: center;
}
.overlay .panel { touch-action: pan-y; }
#gameCanvas { touch-action: none; }

/* Текст UI — обычное начертание вместо жирного */
b, strong {
  font-weight: normal;
}
.coe-profile-name,
.coe-inspect-row b,
.inv-name,
.class-name,
.bar-text,
.qt-title,
.qt-chapter,
.chat-nick,
.item-card .name,
.coe-shop-card .name,
.coe-shop-have b,
.panel h2,
.panel h3,
.kv-news-card b,
.combat-hint strong {
  font-weight: normal;
}

