/* ===== CoE play shell ? ????? ????????? ????????? (?????? ?????? + ?????????) ===== */

:root {
  --hud-h: 78px;
  --chat-h: 280px;
  --rail-w: 210px;
  --coe-wood-1: #2a170c;
  --coe-wood-2: #3d2414;
  --coe-wood-3: #5a3520;
  --coe-bronze: #a67c42;
  --coe-gold: #c9a050;
  --coe-gold-hi: #e8c878;
  --coe-parch: #d4b98a;
  --coe-parch-deep: #c4a574;
  --coe-ink: #1a1008;
  --coe-ink-soft: #3a2818;
  --coe-red: #8b1e1e;
  --coe-hp: #a82020;
  --coe-mana: #1e5a9a;
}

.coe-app {
  display: grid !important;
  grid-template-rows:
    calc(var(--hud-h) + var(--safe-top))
    1fr
    calc(var(--chat-h) + var(--safe-bottom));
  background:
    radial-gradient(ellipse at 50% 20%, #2c1a10 0%, #120a06 55%, #070402 100%);
  padding: 4px;
  gap: 0;
}

#app:has(.hud-hidden) {
  grid-template-rows: 1fr !important;
  padding: 0;
}

#app:has(.hud-hidden) #playShell,
#app:has(.hud-hidden) #gameChat {
  display: none !important;
}

/* ========== TOP HUD ? ?????? ?????? ?????? ========== */
#hud.coe-hud-minimal {
  overflow: visible !important;
  z-index: 30;
}
.coe-hud {
  min-height: calc(var(--hud-h) + var(--safe-top)) !important;
  padding: 8px 12px 6px !important;
  gap: 12px;
  background:
    linear-gradient(180deg, #4a2e1a 0%, #2a170c 42%, #1a0e08 100%);
  border: 3px solid #6b4424;
  border-bottom-width: 4px;
  border-radius: 6px 6px 0 0;
  box-shadow:
    inset 0 1px 0 rgba(232, 200, 120, 0.25),
    inset 0 -2px 0 rgba(0, 0, 0, 0.55),
    0 4px 14px rgba(0, 0, 0, 0.55);
  position: relative;
}

.coe-hud::before,
.coe-hud::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(201, 160, 80, 0.45);
  pointer-events: none;
}
.coe-hud::before { left: 6px; border-right: 0; border-bottom: 0; }
.coe-hud::after { right: 6px; border-left: 0; border-bottom: 0; }

.coe-hud .hud-left { gap: 10px; flex: 0 1 260px; }
.coe-hud .hud-bars { min-width: 150px; gap: 3px; }
.coe-hud .hud-meta {
  font-size: 13px;
  font-weight: 700;
  color: #f0dcb0;
  text-shadow: 0 1px 2px #000;
  display: flex;
  align-items: center;
  gap: 8px;
}
.coe-hud .hud-lvl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #5cb85c, #1e6b28 70%);
  border: 2px solid #0d3d12;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 0 6px rgba(40, 160, 60, 0.45);
}
.coe-hud .hud-rank,
.coe-hud .hud-shards { display: none; }

.coe-hud .bar-row .bar-label { display: none; }
.coe-hud .bar-track {
  height: 12px;
  border-radius: 3px;
  background: #0a0604;
  border: 1px solid #000;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
}
.coe-hud .bar-row.hp .bar-fill {
  background: linear-gradient(180deg, #e05050, #8b1515 70%);
}
.coe-hud .bar-row.xp .bar-fill {
  background: linear-gradient(180deg, #5aa0e0, #1a4a8a 70%);
}
.coe-hud .bar-text {
  font-size: 11px;
  font-weight: 700;
  color: #e8d4a8;
  text-shadow: 0 1px 1px #000;
  min-width: 58px;
}

.coe-portrait .hud-icon-wrap {
  width: 54px !important;
  height: 54px !important;
  flex-basis: 54px !important;
  border: 3px solid #c9a050;
  border-radius: 50%;
  box-shadow:
    0 0 0 2px #3a2414,
    inset 0 0 8px rgba(0, 0, 0, 0.5),
    0 0 10px rgba(201, 160, 80, 0.35);
  background: radial-gradient(circle at 30% 25%, #3a4a5a, #121820);
  overflow: hidden;
}
.coe-portrait .hud-icon-wrap img,
.coe-hud .hud-face-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.coe-iconbar {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  gap: 7px;
  flex-wrap: nowrap;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  padding: 2px 6px;
}

.coe-ico {
  width: 50px !important;
  height: 50px !important;
  flex: 0 0 50px !important;
  border-radius: 50% !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  cursor: pointer;
}
.coe-ico .hud-icon-wrap {
  width: 50px !important;
  height: 50px !important;
  flex-basis: 50px !important;
  border-radius: 50%;
  border: none !important;
  background: transparent !important;
  overflow: visible;
  box-shadow: none !important;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.coe-ico .hud-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.coe-ico:hover .hud-icon-wrap,
.coe-ico:focus-visible .hud-icon-wrap {
  transform: scale(1.08);
  filter: brightness(1.12);
  border-color: transparent;
}
.coe-ico:active .hud-icon-wrap { transform: scale(0.96); }
.coe-hud-minimal .coe-iconbar .coe-ico .hud-icon-wrap {
  transition: filter 0.18s ease;
}
.coe-hud-minimal .coe-iconbar .coe-ico .hud-icon-wrap img {
  transition: filter 0.18s ease;
}
.coe-hud-minimal .coe-iconbar .coe-ico:hover .hud-icon-wrap,
.coe-hud-minimal .coe-iconbar .coe-ico:focus-visible .hud-icon-wrap,
.coe-hud-minimal .coe-iconbar .coe-ico:active .hud-icon-wrap {
  transform: none;
  filter: none;
}
.coe-hud-minimal .coe-iconbar .coe-ico:hover .hud-icon-wrap img,
.coe-hud-minimal .coe-iconbar .coe-ico:focus-visible .hud-icon-wrap img {
  filter:
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5))
    brightness(1.1);
}

.coe-hud .hud-right { flex: 0 0 auto; gap: 8px; }
.coe-hud .gold-plate {
  background: linear-gradient(180deg, #3a2414, #1e120a);
  border: 2px solid #8a6030;
  border-radius: 8px;
  padding: 3px 10px;
  color: #f0dcb0;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, 0.15);
}

/* ========== PLAY SHELL ========== */
.play-shell {
  display: grid;
  grid-template-columns: 1fr var(--rail-w);
  min-height: 0;
  overflow: hidden;
  gap: 0;
  margin: 0 2px;
}

#stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 6px 4px 4px 6px;
  border: 5px solid #4a2e18;
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 2px #8a6030,
    inset 0 0 0 3px #2a170c,
    0 0 0 2px #1a0e08,
    0 6px 18px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  background: #0a0604;
}

.coe-frame {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 4;
  box-shadow:
    inset 0 0 28px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(201, 160, 80, 0.2);
}
.coe-frame::before,
.coe-frame::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(201, 160, 80, 0.4);
  pointer-events: none;
}
.coe-frame::before { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.coe-frame::after { top: 6px; right: 6px; border-left: 0; border-bottom: 0; }

#gameCanvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 3;
}

.kv-combat-swf-host {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: #0a1718;
  overflow: hidden;
}
.kv-combat-swf-host--boot {
  background:
    radial-gradient(circle at 50% 40%, rgba(40, 60, 80, 0.2), transparent 55%),
    #0a1718;
}
.kv-combat-swf-host ruffle-player,
.kv-combat-swf-host #kvCombatFlashPlayer {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

#app.combat-active .play-shell {
  grid-template-columns: 1fr;
}
#app.combat-active .right-rail,
.right-rail.combat-hidden {
  display: none !important;
}
#app.combat-active .coe-frame {
  display: none !important;
}
#app.combat-active #stage {
  margin: 0;
  aspect-ratio: 990 / 454;
  max-height: 100%;
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
#combatUi.coe-flash-ui #turnTimer,
#combatUi.coe-flash-ui .combat-hint,
#combatUi.coe-flash-ui .combat-bottom {
  display: none !important;
}
#combatUi.coe-flash-ui {
  z-index: 12;
}
#combatUi.coe-flash-ui .skill-fan {
  z-index: 14;
  pointer-events: none;
}
#combatUi.coe-flash-ui .skill-fan.open,
#combatUi.coe-flash-ui .skill-fan.open .skill-ring-slot,
#combatUi.coe-flash-ui .skill-fan.open .kv-wheel-x {
  pointer-events: auto;
}
.kv-combat-swf-host.hidden {
  display: none !important;
}

#stage.flash-combat-active {
  background: #0a1718;
}
#stage.flash-combat-active .coe-frame.hidden {
  display: none;
}
#stage.flash-combat-active #gameCanvas {
  pointer-events: auto;
}
#combatUi.flash-combat-ui {
  z-index: 5;
  pointer-events: none;
}
#combatUi.flash-combat-ui .combat-demo-exit {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 6;
  pointer-events: auto;
}

#combatUi.flash-combat-ui .skill-fan,
#combatUi.flash-combat-ui .skill-fan.open,
#combatUi.flash-combat-ui .skill-ring-slot,
#combatUi.flash-combat-ui .combat-bottom {
  pointer-events: auto;
}

/* ========== RIGHT RAIL ? ?????? ?????? + ????????? ========== */
.right-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 8px 4px 4px;
  min-height: 0;
  z-index: 15;
}

.rail-panel {
  background:
    linear-gradient(180deg, #3d2818 0%, #2a170c 100%);
  border: 3px solid #6b4424;
  border-radius: 5px;
  box-shadow:
    inset 0 1px 0 rgba(232, 200, 120, 0.12),
    0 4px 10px rgba(0, 0, 0, 0.45);
  color: #1a1008;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.rail-residents {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
}
.rail-residents .rail-body {
  overflow-x: visible;
  padding-right: 6px;
}
.rail-quests { position: relative; min-height: 0; }
.kv-rail .rail-quests { flex: 1 1 62%; min-height: 0; }
.rail-quests .rail-head {
  position: relative;
  padding-right: 28px;
}
.rail-quests-close {
  position: absolute;
  top: 4px;
  right: 6px;
  z-index: 3;
  width: 22px;
  height: 22px;
  line-height: 18px;
  padding: 0;
  border: 1px solid #5a3520;
  border-radius: 3px;
  background: linear-gradient(180deg, #6a4030, #3a2010);
  color: #ffe8c8;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}
.rail-quests-close:hover { filter: brightness(1.15); }
.rail-quests.collapsed {
  display: none !important;
}
.rail-residents { position: relative; }
.rail-residents .rail-head { padding-right: 28px; }
.rail-residents-toggle {
  position: absolute;
  top: 4px;
  right: 6px;
  z-index: 3;
  width: 22px;
  height: 22px;
  line-height: 18px;
  padding: 0;
  border: 1px solid #5a3520;
  border-radius: 3px;
  background: linear-gradient(180deg, #6a4030, #3a2010);
  color: #ffe8c8;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}
.rail-residents-toggle:hover { filter: brightness(1.12); }
.rail-residents.collapsed .rail-tabs,
.rail-residents.collapsed .rail-body {
  display: none !important;
}
/* Выход — та же сетка, что и иконки меню */
.coe-hud-minimal .coe-iconbar .hud-exit-ico {
  flex: 0 0 46px !important;
  width: 46px !important;
  height: 46px !important;
  margin-left: 2px;
}
.hud-exit-wrap {
  background: linear-gradient(180deg, #4a3020 0%, #2a180c 100%) !important;
  border-color: #8a5030 !important;
}
.hud-exit-glyph {
  display: block;
  width: 22px;
  height: 22px;
  margin: auto;
  background:
    linear-gradient(180deg, #ffe8c0 0%, #d4a050 100%);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M10 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h5v-2H5V5h5V3zm4.7 5.3-1.4 1.4L15.2 11H3v2h12.2l-1.9 1.9 1.4 1.4L20.4 12l-5.7-5.7z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M10 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h5v-2H5V5h5V3zm4.7 5.3-1.4 1.4L15.2 11H3v2h12.2l-1.9 1.9 1.4 1.4L20.4 12l-5.7-5.7z'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.95;
}
.hud-exit-ico:hover .hud-exit-wrap {
  filter: brightness(1.1);
  border-color: #e8c060 !important;
}
/* Сторона (Север / Юг) — только фракционный значок, без звания */
#btnCharPanel.hud-faction-btn {
  width: 52px !important;
  height: 52px !important;
  flex: 0 0 52px !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
#btnCharPanel .hud-faction-frame {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 48px !important;
  height: 48px !important;
  flex: 0 0 48px !important;
  padding: 3px !important;
  border-radius: 50%;
  box-sizing: border-box;
  background: linear-gradient(145deg, #fff0c8 0%, #e8c060 35%, #a87038 70%, #6a4820 100%);
  box-shadow:
    0 0 0 1px #2a180c,
    0 0 0 2px rgba(255, 232, 160, 0.35),
    inset 0 1px 2px rgba(255, 248, 220, 0.55),
    inset 0 -2px 4px rgba(60, 40, 16, 0.45),
    0 3px 10px rgba(0, 0, 0, 0.45);
}
#btnCharPanel.fac-south .hud-faction-frame {
  background: linear-gradient(145deg, #ffe8d0 0%, #e8a050 38%, #b84030 72%, #6a2018 100%);
  box-shadow:
    0 0 0 1px #2a180c,
    0 0 0 2px rgba(255, 180, 120, 0.4),
    0 0 12px rgba(220, 80, 50, 0.28),
    inset 0 1px 2px rgba(255, 220, 180, 0.5),
    0 3px 10px rgba(0, 0, 0, 0.45);
}
#btnCharPanel.fac-north .hud-faction-frame {
  background: linear-gradient(145deg, #e8f0ff 0%, #88b8e8 38%, #3068b8 72%, #183868 100%);
  box-shadow:
    0 0 0 1px #2a180c,
    0 0 0 2px rgba(180, 220, 255, 0.4),
    0 0 12px rgba(80, 140, 220, 0.32),
    inset 0 1px 2px rgba(220, 240, 255, 0.55),
    0 3px 10px rgba(0, 0, 0, 0.45);
}
#btnCharPanel .hud-faction-ico,
#btnCharPanel .hud-faction-frame img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain !important;
  border-radius: 50%;
  border: none !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
#btnCharPanel.hud-faction-btn:hover .hud-faction-frame,
#btnCharPanel.hud-faction-btn:focus-visible .hud-faction-frame {
  filter: brightness(1.08);
}
#btnCharPanel.hud-faction-btn:active .hud-faction-frame {
  transform: scale(0.96);
}
.hud-char-rank-badge {
  display: none !important;
}
.coe-iconbar #btnClan.hud-clan-active .hud-icon-wrap {
  box-shadow:
    inset 0 0 0 1px #ffe8a0,
    0 0 0 2px rgba(201, 148, 74, 0.55);
}
.coe-iconbar #btnClan.hud-clan-active .hud-icon-wrap img {
  border-radius: 6px;
}

.rail-tabs {
  display: flex;
  gap: 0;
  background: linear-gradient(180deg, #5a3820, #2e1a0e);
  border-bottom: 2px solid #1a0e08;
  padding: 3px;
}
.rail-tab {
  flex: 1;
  padding: 7px 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #b89868;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  text-shadow: 0 1px 1px #000;
}
.rail-tab.on {
  background: linear-gradient(180deg, #8a5530, #5a3018);
  border-color: #c9a050;
  color: #fff0d0;
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, 0.25);
}
.rail-tab:hover { color: #ffe8c0; }

.rail-head {
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f0dcb0;
  background: linear-gradient(180deg, #5a3820, #2e1a0e);
  border-bottom: 2px solid #1a0e08;
  text-shadow: 0 1px 2px #000;
}

.rail-body {
  flex: 1;
  overflow: auto;
  padding: 8px;
  min-height: 0;
  background:
    linear-gradient(180deg, #cbb48a 0%, #b89a6e 100%);
  color: #1a1008;
}

.residents-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: visible;
  padding: 4px 2px 4px 4px;
  font-size: 12px;
  font-weight: 700;
  color: #1a1008;
  scrollbar-width: thin;
  scrollbar-color: #8a5a18 rgba(90, 50, 20, 0.2);
}
.residents-list .friend-btn {
  flex: 0 0 18px !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  visibility: visible !important;
  opacity: 1 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin-left: auto !important;
  z-index: 2;
  position: relative;
}
.residents-list .chat-nick-btn {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.residents-list::-webkit-scrollbar { width: 8px; }
.residents-list::-webkit-scrollbar-track {
  background: rgba(90, 50, 20, 0.15);
  border-radius: 4px;
}
.residents-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #b8843a, #6f3a08);
  border-radius: 4px;
  border: 1px solid #3b1808;
}
.residents-list .online-row .atk-sword-btn {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.residents-list .online-row .atk-sword-btn svg {
  width: 15px;
  height: 15px;
  display: block;
}
.residents-list .online-row .atk-sword-btn:hover svg path {
  fill: #ffe08a;
}
.residents-list .online-row {
  padding: 3px 4px;
  border-radius: 3px;
  color: #1a1008 !important;
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: nowrap;
}
.residents-list .online-row a,
.residents-list .chat-class {
  color: #1a1008 !important;
}
.residents-list .online-row .meta { display: none !important; }
.residents-list .chat-nick-btn.nick-south {
  color: #b03020 !important;
  text-decoration-color: rgba(176, 48, 32, 0.45);
}
.residents-list .chat-nick-btn.nick-north {
  color: #2060b0 !important;
  text-decoration-color: rgba(32, 96, 176, 0.45);
}
.residents-list .chat-nick-btn.nick-admin,
.coe-profile-name.nick-admin,
.profile-panel h2.nick-admin,
.coe-chat .chat-nick-btn.nick-admin,
.kv-rail .chat-nick-btn.nick-admin,
.lb-nick-btn.nick-admin {
  color: #7a1610 !important;
  text-decoration-color: rgba(100, 20, 12, 0.55);
  font-weight: 800 !important;
}
.coe-chat .chat-line.chat-staff {
  color: #5c140e !important;
  font-weight: 600 !important;
}
.coe-chat .chat-line.chat-staff .chat-nick-btn.nick-admin {
  color: #7a1610 !important;
}
/* ÐÐ¸Ð´ÑÑÐ°Ñ: Ð½Ð° <button> background-clip Ð»Ð¾Ð¼Ð°ÐµÑÑÑ â Ð²Ð¸Ð´Ð¸Ð¼ÑÐ¹ ÑÐ²ÐµÑ + Ð»ÑÐ³ÐºÐ¾Ðµ ÑÐ²ÐµÑÐµÐ½Ð¸Ðµ */
.residents-list .chat-nick-btn.nick-seer,
.chat-nick-btn.nick-seer,
.coe-profile-name.nick-seer,
.profile-panel h2.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.55), 0 0 1px #6a40c0;
  animation: nickSeerPulse 2.2s ease-in-out infinite;
}
.residents-list .chat-nick-btn.nick-seer,
.kv-rail .online-row .chat-nick-btn.nick-seer {
  overflow: visible !important;
  text-overflow: clip;
  flex: 0 1 auto;
  min-width: 5.2em;
  white-space: nowrap;
}
@keyframes nickSeerPulse {
  0%, 100% { color: #c45cff; text-shadow: 0 0 5px rgba(180, 90, 255, 0.45); }
  50% { color: #6a9bff; text-shadow: 0 0 8px rgba(100, 140, 255, 0.55); }
}
.mod-tools {
  margin: 10px 0 8px;
  padding: 8px;
  border: 1px solid rgba(139, 43, 255, 0.35);
  border-radius: 8px;
  background: rgba(80, 20, 120, 0.12);
}
.mod-tools .mod-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.mod-tools .btn { font-size: 12px; }

.coe-profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.prof-friend-plus {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 2px solid #6b4424;
  background: linear-gradient(180deg, #cbb48a, #a08050);
  color: #2a170c !important;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,230,180,0.35), 0 1px 3px rgba(0,0,0,0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.prof-friend-plus:hover { filter: brightness(1.08); }
.prof-friend-plus.is-friend {
  background: linear-gradient(180deg, #d4b870, #9a7030);
  border-color: #8a6030;
  color: #1a1008 !important;
  font-size: 14px;
}
.prof-friend-plus.is-pending {
  opacity: 0.65;
  cursor: default;
  font-size: 14px;
}
.mod-ban-panel {
  max-width: min(420px, 94vw);
  padding: 16px 18px;
  color: #1a1008;
}
.mod-ban-panel h2 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #ffe8c0;
}
.mod-ban-target {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: #f0dcb0;
}
.mod-ban-section { margin-bottom: 14px; }
.mod-ban-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #c9a878;
  margin-bottom: 6px;
}
.mod-ban-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mod-ban-grid .btn { width: 100%; justify-content: center; }
.mod-mute-duration-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mod-mute-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mod-mute-field > span {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #c9a878;
}
.mod-mute-num {
  min-height: 0;
  margin-bottom: 0;
  text-align: center;
}
.chat-mod-footer-audit {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(212, 175, 55, 0.25);
}
.chat-mod-audit-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c9a878;
}
.mod-audit-panel .mod-audit-verdict {
  line-height: 1.35;
}
.mod-audit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mod-audit-actions .btn {
  flex: 1 1 auto;
  min-width: 120px;
}
#chatModAudit,
#modPanelAudit,
#adminOpenAudit,
#profOpenAudit,
#profOpenAuditTop {
  font-weight: 800;
}

/* Ð§Ð°Ñ-Ð¼ÐµÐ½Ñ Ð¼Ð¾Ð´ÐµÑÐ°ÑÐ¾ÑÐ°: ÑÐ¸ÑÑÐ¾Ðµ, ÑÐ¸ÑÐ°ÐµÐ¼Ð¾Ðµ, Ð±ÐµÐ· ÐºÐ°ÑÐ¸ */
.chat-mod-menu {
  max-width: min(440px, 94vw);
  padding: 18px 18px 14px;
  color: #f3e6c8;
}
.chat-mod-head { margin-bottom: 12px; }
.chat-mod-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9a878;
  margin-bottom: 4px;
}
.chat-mod-menu h2 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.25;
  color: #ffe8c0;
  font-weight: 800;
}
.chat-mod-menu h2 b { color: #fff1c8; }
.chat-mod-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #cbb892;
}
.chat-mod-reason {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 14px;
}
.chat-mod-reason > span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c9a878;
}
.chat-mod-reason textarea,
.chat-mod-nick-input {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: rgba(12, 8, 4, 0.72);
  color: #f6ebcf;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  outline: none;
}
.chat-mod-nick-input {
  min-height: 0;
  margin-bottom: 10px;
}
.chat-mod-reason textarea:focus,
.chat-mod-nick-input:focus {
  border-color: rgba(255, 214, 120, 0.85);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.18);
}
.chat-mod-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.chat-mod-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(48, 32, 16, 0.95), rgba(24, 14, 8, 0.95));
  color: #f6ebcf;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s ease, transform 0.08s ease, filter 0.12s ease;
}
.chat-mod-btn i {
  width: 22px;
  text-align: center;
  font-style: normal;
  font-size: 16px;
  flex: none;
}
.chat-mod-btn:hover:not(:disabled) {
  border-color: rgba(255, 214, 120, 0.55);
  transform: translateY(-1px);
}
.chat-mod-btn:active:not(:disabled) { transform: translateY(0); }
.chat-mod-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.chat-mod-btn.warn {
  border-color: rgba(255, 193, 7, 0.45);
  background: linear-gradient(180deg, rgba(70, 48, 10, 0.96), rgba(36, 22, 6, 0.96));
}
.chat-mod-btn.mute {
  border-color: rgba(120, 170, 255, 0.35);
  background: linear-gradient(180deg, rgba(28, 40, 70, 0.96), rgba(14, 20, 40, 0.96));
}
.chat-mod-btn.ban {
  border-color: rgba(220, 80, 70, 0.5);
  background: linear-gradient(180deg, rgba(72, 22, 18, 0.96), rgba(32, 10, 8, 0.96));
}
.chat-mod-lock {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: #ffb4a8;
}
.chat-mod-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(212, 175, 55, 0.22);
}
.chat-mod-footer .btn { flex: 1 1 auto; justify-content: center; min-width: 90px; }
.coe-chat .chat-line.sys { white-space: pre-wrap; }
.residents-list .chat-rank-ico,
.residents-list .chat-mod-shield,
.residents-list .chat-clan-ico,
.kv-rail .online-row .chat-rank-ico,
.kv-rail .online-row .chat-mod-shield,
.kv-rail .online-row .chat-clan-ico {
  width: 22px;
  height: 22px;
  object-fit: contain;
  object-position: center;
  flex: 0 0 22px;
  min-width: 22px;
  min-height: 22px;
  image-rendering: auto;
  background: none !important;
}
.residents-list .chat-rank-ico,
.kv-rail .online-row .chat-rank-ico {
  width: 24px !important;
  height: 24px !important;
  flex: 0 0 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
}
.residents-list .chat-id-wrap,
.kv-rail .online-row .chat-id-wrap {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.residents-list .online-row:hover { background: rgba(90, 50, 20, 0.18); }
.residents-meta {
  flex: 0 0 auto;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #3a2818;
  border-top: 1px solid rgba(60, 40, 20, 0.45);
  padding-top: 5px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

/* Quests inside rail */
.right-rail .quest-tracker {
  position: static !important;
  left: auto !important;
  top: auto !important;
  max-width: none !important;
  width: 100%;
  max-height: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 8px;
  background: linear-gradient(180deg, #cbb48a 0%, #b89a6e 100%) !important;
  border: none !important;
  box-shadow: none !important;
  pointer-events: auto !important;
  color: #1a1008 !important;
}
.right-rail .quest-tracker .qt-card,
.right-rail .quest-tracker > div {
  background: rgba(40, 24, 12, 0.12) !important;
  border: 1px solid rgba(60, 40, 20, 0.35) !important;
  color: #1a1008 !important;
  margin-bottom: 7px;
  border-radius: 4px;
  padding: 7px !important;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}
.right-rail .quest-tracker b,
.right-rail .quest-tracker strong {
  color: #5a1808 !important;
  font-weight: 600;
}
.right-rail .quest-tracker.hidden {
  display: none !important;
}
.right-rail:not(.kv-rail) .quest-tracker .btn,
.right-rail:not(.kv-rail) .quest-tracker button {
  background: linear-gradient(180deg, #8a5530, #4a2810) !important;
  border: 1px solid #c9a050 !important;
  color: #fff0d0 !important;
  font-weight: 700;
}

/* ========== BOTTOM CHAT — лёгкий пергамент + тёмная шапка ========== */
.coe-chat.game-chat,
#gameChat.coe-chat {
  position: relative !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  width: auto !important;
  height: 100% !important;
  max-height: 100% !important;
  margin: 2px 6px 4px;
  border-radius: 10px;
  border: 1px solid rgba(120, 90, 50, 0.45);
  background: linear-gradient(165deg, #f8f0e0 0%, #ebe0c8 48%, #e0d4b8 100%);
  color: #2a2018;
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow:
    0 6px 22px rgba(30, 20, 10, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.coe-chat .chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(42, 32, 24, 0.92), rgba(28, 22, 18, 0.96));
  color: #f5ecd8;
  border-bottom: 1px solid rgba(255, 220, 160, 0.12);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
  text-shadow: none;
  flex-shrink: 0;
  backdrop-filter: blur(6px);
}

.coe-chat .chat-tabs.inline,
.coe-chat .chat-tabs,
.coe-chat .chat-dots,
.coe-chat .chat-chs {
  display: flex;
  gap: 4px;
  background: transparent;
  border: none;
  padding: 0;
  flex: 1;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
}
/* Ð¢Ð°ÐºÑÐ¸Ð»ÑÐ½Ð°Ñ ÐºÐ½Ð¾Ð¿ÐºÐ°: LED + Ð½Ð°Ð·Ð²Ð°Ð½Ð¸Ðµ */
.coe-chat .chat-power-btn,
.coe-chat .chat-chbtn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  height: 22px;
  padding: 0 8px 0 6px;
  border-radius: 11px;
  border: 1px solid #5a3a1c;
  background: linear-gradient(180deg, #3a2818 0%, #1e120a 100%);
  box-shadow: inset 0 1px 0 rgba(255,220,160,.12), 0 1px 2px rgba(0,0,0,.4);
  color: #c9a878;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}
.coe-chat .chat-power-btn:active,
.coe-chat .chat-chbtn:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.45);
}
.coe-chat .chat-chname { pointer-events: none; letter-spacing: 0.01em; }
.coe-chat .chat-led {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #3a2a18;
  background: radial-gradient(circle at 35% 30%, #2a2010, #0a0804);
  box-shadow: inset 0 1px 2px #000;
  transition: background .2s, box-shadow .2s, border-color .2s;
}
/* Ð§Ð°Ñ Ð²ÐºÐ»/Ð²ÑÐºÐ» â ÑÐ½ÑÐ°ÑÐ½ÑÐ¹ LED */
.coe-chat .chat-power-btn .chat-led {
  border-color: #5a4020;
  background: radial-gradient(circle at 35% 30%, #3a2a14, #120c04);
}
.coe-chat .chat-power-btn.on {
  border-color: #c9a050;
  color: #ffe8b0;
  background: linear-gradient(180deg, #4a3420 0%, #2a1a0c 100%);
}
.coe-chat .chat-power-btn.on .chat-led {
  border-color: #ffe08a;
  background: radial-gradient(circle at 35% 30%, #fff0c0, #e0a030 55%, #8a5010);
  box-shadow: 0 0 7px rgba(255, 200, 80, .85), inset 0 0 2px #fff8d0;
}
/* ÐÐ°Ð½Ð°Ð»Ñ: LED ÑÑÑÐ»ÑÐ¹ / Ð³Ð¾ÑÐ¸Ñ ÑÐ²ÐµÑÐ¾Ð¼ Ð¿ÑÐ¸ .on */
.coe-chat .chat-chbtn.ch-cyan .chat-led { border-color: #2a5a6a; }
.coe-chat .chat-chbtn.ch-cyan.on {
  border-color: #4aa8c8;
  color: #b8f0ff;
}
.coe-chat .chat-chbtn.ch-cyan.on .chat-led {
  border-color: #a8e8ff;
  background: radial-gradient(circle at 35% 30%, #e0f8ff, #2a90b8 60%, #0a4058);
  box-shadow: 0 0 8px rgba(80, 200, 255, .9);
}
.coe-chat .chat-chbtn.ch-red .chat-led { border-color: #6a3030; }
.coe-chat .chat-chbtn.ch-red.on {
  border-color: #d06060;
  color: #ffc0c0;
}
.coe-chat .chat-chbtn.ch-red.on .chat-led {
  border-color: #ffb0b0;
  background: radial-gradient(circle at 35% 30%, #ffe0e0, #c04040 60%, #501010);
  box-shadow: 0 0 8px rgba(255, 90, 90, .85);
}
.coe-chat .chat-chbtn.ch-green .chat-led { border-color: #3a5a30; }
.coe-chat .chat-chbtn.ch-green.on {
  border-color: #6aaa50;
  color: #c8f0a8;
}
.coe-chat .chat-chbtn.ch-green.on .chat-led {
  border-color: #c0f090;
  background: radial-gradient(circle at 35% 30%, #e8ffc8, #4a9028 60%, #183010);
  box-shadow: 0 0 8px rgba(100, 220, 80, .85);
}
.coe-chat .chat-chbtn.ch-gold .chat-led { border-color: #6a5020; }
.coe-chat .chat-chbtn.ch-gold.on {
  border-color: #c9a040;
  color: #ffe8a0;
}
.coe-chat .chat-chbtn.ch-gold.on .chat-led {
  border-color: #ffe080;
  background: radial-gradient(circle at 35% 30%, #fff4c0, #c89020 60%, #503010);
  box-shadow: 0 0 8px rgba(255, 200, 60, .9);
}
.coe-chat .chat-chbtn.ch-violet .chat-led { border-color: #4a3060; }
.coe-chat .chat-chbtn.ch-violet.on {
  border-color: #9860c0;
  color: #e8c8ff;
}
.coe-chat .chat-chbtn.ch-violet.on .chat-led {
  border-color: #e0b8ff;
  background: radial-gradient(circle at 35% 30%, #f0e0ff, #8040b8 60%, #301050);
  box-shadow: 0 0 8px rgba(180, 100, 255, .9);
}
.coe-chat .chat-chbtn.party-on:not(.on) {
  border-color: #4a7040;
  color: #a0c888;
}
.coe-chat .chat-chbtn.party-on:not(.on) .chat-led {
  box-shadow: 0 0 4px rgba(100, 200, 80, .4);
}
.coe-chat .chat-tab {
  flex: 0 0 auto;
  color: #b89868;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 3px 3px 0 0;
  border: 1px solid transparent;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
}
.coe-chat .chat-tab.on {
  background: linear-gradient(180deg, #a06030, #6a3a18);
  border-color: #c9a050;
  color: #fff8e0;
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, 0.2);
}
.coe-chat .chat-tab:hover { color: #ffe8c0; }
.coe-chat .chat-head-label {
  margin-left: auto;
  font-size: 11px;
  color: #c9a050;
}
.coe-chat .chat-head-spacer { flex: 1; }

.coe-chat .chat-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: linear-gradient(180deg, rgba(255, 252, 245, 0.65), rgba(240, 230, 210, 0.35));
}

.coe-chat .chat-online { display: none !important; }
.coe-chat .chat-channel-meta {
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #5a3018;
  background: rgba(60, 40, 20, 0.12);
}

.coe-chat .chat-log {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 10px 6px;
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 500;
  color: #2a2218 !important;
  background: transparent;
  display: block;
  scroll-behavior: auto;
}
.coe-chat .chat-log.chat-log-rebuild {
  overflow: hidden !important;
  pointer-events: none;
}
.coe-chat .chat-line {
  margin: 2px 0;
  padding: 4px 8px;
  border-radius: 8px;
  color: #2a2218 !important;
  font-weight: 500;
  transition: background 0.12s ease;
  word-break: break-word;
}
.coe-chat .chat-line:not(.sys):hover {
  background: rgba(255, 255, 255, 0.4);
}
.coe-chat .chat-time {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.45;
  margin-right: 2px;
  font-variant-numeric: tabular-nums;
}
.coe-chat .chat-line.chat-day-sep {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  font-style: normal;
  color: #6a5030 !important;
  opacity: 0.92;
  margin: 8px 0 4px;
  padding: 3px 10px;
  background: rgba(120, 90, 40, 0.14);
  border-radius: 8px;
  letter-spacing: 0.02em;
}
.coe-chat .chat-ch {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
  opacity: 0.75;
  vertical-align: middle;
}
.coe-chat .chat-line.sys {
  color: #5a5040 !important;
  font-weight: 600;
  font-size: 11.5px;
  opacity: 0.92;
  background: rgba(255, 255, 255, 0.25);
}
.coe-chat .chat-mention {
  color: #2f7a4a !important;
  font-weight: 800;
}
.coe-chat .chat-line .chat-nick {
  color: #1a4a8a !important;
  cursor: pointer;
  font-weight: 800;
}
.coe-chat .chat-line .chat-class { color: #3a2818 !important; }

.coe-chat .chat-emote-emoji,
.coe-chat .emote-emoji {
  font-size: 28px !important;
  line-height: 1.1 !important;
  display: inline !important;
  visibility: visible !important;
  opacity: 1 !important;
  vertical-align: middle;
  color: inherit !important;
}
.coe-chat .chat-emote,
.coe-chat .chat-emote-img {
  width: 28px !important;
  height: 28px !important;
  display: inline-block !important;
  vertical-align: middle;
  visibility: visible !important;
  opacity: 1 !important;
  object-fit: contain !important;
  image-rendering: auto !important;
}

.atk-nick-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(50vh, 320px);
  overflow: auto;
  margin: 8px 0 12px;
}
.atk-nick-row {
  width: 100%;
  text-align: left;
  font-size: 15px;
  padding: 10px 14px;
  justify-content: flex-start;
}

/* Пикер смайлов — всплывающая сетка (не линия под логом) */
.coe-chat .chat-body {
  position: relative;
}
.coe-chat .chat-emote-popover {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 52px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  max-height: min(42vh, 260px);
  border-radius: 12px;
  border: 1px solid rgba(120, 90, 50, 0.45);
  background: linear-gradient(180deg, #2a2218 0%, #1a140e 100%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  contain: layout paint;
  pointer-events: auto;
}
/* Старая полоска смайлов — не показывать (Chrome ломал вёрстку при flex+min-height) */
.coe-chat .chat-emotes:not(.chat-emote-popover) {
  display: none !important;
}
.coe-chat .chat-emote-popover[hidden] {
  display: none !important;
}
.coe-chat .chat-emote-popover.is-open {
  display: flex !important;
}
.coe-chat .chat-emote-popover-head {
  flex: 0 0 auto;
  padding: 8px 12px 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e8d4a8;
  border-bottom: 1px solid rgba(255, 220, 160, 0.12);
}
.coe-chat .chat-emote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
  gap: 4px;
  padding: 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.coe-chat .emote-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
  padding: 4px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.coe-chat .emote-btn img,
.coe-chat .emote-kolobok {
  width: 28px !important;
  height: 28px !important;
  object-fit: contain !important;
  image-rendering: auto;
  display: block;
}
.coe-chat .emote-btn:hover {
  background: rgba(232, 184, 90, 0.18);
  transform: scale(1.06);
}
.coe-chat .chat-emote, .coe-chat .chat-emote-img {
  width: 28px !important;
  height: 28px !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  object-fit: contain !important;
}

.coe-chat .chat-form {
  padding: 6px 8px 8px;
  gap: 6px;
  background: linear-gradient(180deg, rgba(36, 28, 22, 0.94), rgba(24, 18, 14, 0.98));
  border-top: 1px solid rgba(255, 220, 160, 0.1);
  display: flex;
  align-items: center;
}
.coe-chat .chat-channel-select,
.coe-chat #chatChannelSelect {
  background: linear-gradient(180deg, #5a3820, #2e1a0e);
  border: 1px solid #c9a050;
  color: #f0dcb0;
  border-radius: 3px;
  padding: 5px 6px;
  font-size: 11px;
  font-weight: 700;
  max-width: 110px;
}
.coe-chat #chatInput {
  flex: 1;
  background: rgba(255, 252, 245, 0.92);
  border: 1px solid rgba(255, 220, 160, 0.25);
  color: #2a2018;
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}
.coe-chat #chatInput:focus {
  outline: none;
  border-color: rgba(255, 200, 100, 0.55);
  box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.15);
}
.coe-chat #chatInput::placeholder { color: #8a7860; }
.coe-chat .chat-form .btn {
  background: linear-gradient(180deg, #a06030, #5a3018);
  border: 1px solid #c9a050;
  color: #fff8e0;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, 0.2);
}
.coe-chat .chat-form .btn:hover {
  filter: brightness(1.1);
}

.chat-collapse-btn {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid #c9a050;
  background: linear-gradient(180deg, #5a3820, #2e1a0e);
  color: #f0dcb0;
  font-size: 12px;
  flex-shrink: 0;
}

.chat-fab { display: none !important; }

.coe-app:not(:has(.hud-hidden)) #stage.stage-dim {
  filter: none;
  opacity: 1;
}

/* ÐÐ¾Ð±Ð¸Ð»ÑÐ½ÑÐ¹ ÑÐµÐ¶Ð¸Ð¼ â ÑÐ¾Ð»ÑÐºÐ¾ Ð¿Ð¾ ÑÑÑÑÐ¾Ð¹ÑÑÐ²Ñ (html.is-mobile), ÐÐ Ð¾ÑÑÐ°ÑÑÑÑ Ð´ÐµÑÐºÑÐ¾Ð¿Ð¾Ð¼ */
html.is-mobile {
  --app-h: 100dvh;
  --hud-h: clamp(64px, 11.5dvh, 72px);
  --chat-h: clamp(132px, 21dvh, 176px);
  --rail-w: 0px;
  --keyboard-offset: 0px;
  --touch-min: 44px;
}
html.is-mobile #app.coe-app {
  height: var(--app-h);
  min-height: var(--app-h);
  max-height: var(--app-h);
  overflow: hidden;
}
html.is-mobile #app.coe-app .play-shell {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
html.is-mobile #app:not(.combat-active) #stage {
  flex: 1 1 auto;
  min-height: min(38dvh, 280px) !important;
  max-height: calc(var(--app-h) - var(--hud-h) - var(--chat-h) - 10px) !important;
  width: 100% !important;
  margin: 0 auto 2px !important;
}
html.is-mobile .play-shell { grid-template-columns: 1fr; margin: 0 !important; width: 100%; }
html.is-mobile #stage {
  margin: 2px !important;
  width: auto !important;
  max-width: none !important;
}
html.is-mobile.coe-app,
html.is-mobile .coe-app {
  padding: 2px !important;
}
html.is-mobile .right-rail {
  position: fixed;
  inset: auto auto auto 0;
  width: 0;
  height: 0;
  overflow: visible;
  z-index: 45;
  pointer-events: none;
  background: transparent;
  border: 0;
  box-shadow: none;
}
html.is-mobile .chat-mobile-online {
  display: none !important;
}
html.is-mobile .chat-mobile-on-label,
html.is-mobile .chat-mobile-on-nick,
html.is-mobile .chat-mobile-on-empty {
  display: none !important;
}
html.is-mobile .rail-residents {
  display: flex !important;
  pointer-events: auto;
  position: fixed;
  top: calc(var(--hud-h) + 4px + var(--safe-top));
  right: 6px;
  left: auto;
  width: min(168px, 46vw);
  max-height: min(32vh, 220px);
  overflow: hidden;
  z-index: 46;
  margin: 0;
  font-size: 11px;
  flex-direction: column;
}
html.is-mobile .rail-residents .rail-head {
  font-size: 11px;
  padding: 2px 6px;
}
html.is-mobile .rail-residents .rail-tabs { padding: 2px; }
html.is-mobile .rail-residents .rail-tab { padding: 5px 2px; font-size: 11px; }
html.is-mobile .rail-residents .rail-body { padding: 4px; }
html.is-mobile .rail-residents .residents-list:not(.online-roster) { max-height: min(28vh, 220px); }
html.is-mobile .rail-residents .residents-meta { font-size: 10px; }
html.is-mobile .rail-quests {
  pointer-events: auto;
  position: fixed;
  top: calc(var(--hud-h) + 4px + var(--safe-top));
  left: 6px;
  width: min(200px, 58vw);
  max-height: min(22vh, 160px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 46;
  margin: 0;
  font-size: 11px;
  padding: 4px !important;
}
html.is-mobile .rail-quests .rail-head {
  font-size: 11px;
  padding: 2px 6px;
}
html.is-mobile .rail-quests .quest-tracker .qt-card,
html.is-mobile .rail-quests .quest-tracker > div {
  padding: 4px 6px !important;
  margin: 3px 0 !important;
  font-size: 11px;
}
html.is-mobile .rail-residents.collapsed {
  max-height: none;
  width: auto;
  min-width: 72px;
}
html.is-mobile .rail-quests.collapsed { display: none; }
html.is-mobile .coe-ico { width: 42px !important; height: 42px !important; flex-basis: 42px !important; }
html.is-mobile .coe-ico .hud-icon-wrap { width: 42px !important; height: 42px !important; flex-basis: 42px !important; }
html.is-mobile .hud-icon-btn.coe-ico {
  min-width: var(--touch-min);
  min-height: var(--touch-min);
}
html.is-mobile .coe-hud { padding-top: calc(6px + var(--safe-top)) !important; }
html.is-mobile .coe-iconbar { -webkit-overflow-scrolling: touch; }
html.is-mobile .overlay.overlay-dlg { padding: 8vh 8px 18vh; }

/* ===== Fantasy frames + dialog (?????? ???????-???????) ===== */
.coe-iconbar.hidden,
.coe-iconbar[hidden] {
  display: none !important;
}

.fantasy-frame {
  position: relative;
  background:
    linear-gradient(165deg, #4a2e1a 0%, #2a170c 45%, #1a0e08 100%) !important;
  border: 3px solid #8a6030 !important;
  box-shadow:
    inset 0 0 0 1px rgba(232, 200, 120, 0.35),
    inset 0 0 18px rgba(0, 0, 0, 0.45),
    0 6px 16px rgba(0, 0, 0, 0.55) !important;
}
.fantasy-frame::before,
.fantasy-frame::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(232, 200, 120, 0.55);
  pointer-events: none;
  z-index: 2;
}
.fantasy-frame::before { top: 5px; left: 5px; border-right: 0; border-bottom: 0; }
.fantasy-frame::after { top: 5px; right: 5px; border-left: 0; border-bottom: 0; }

.rail-quests.fantasy-frame .quest-tracker,
.rail-residents.fantasy-frame .rail-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background:
    url('../processed/kv/create/parchment.png') center / cover no-repeat,
    linear-gradient(180deg, #e8d4a8 0%, #c9a878 55%, #b08958 100%) !important;
  border: 2px solid #8a5a18;
  box-shadow: inset 0 0 0 1px rgba(255, 230, 180, 0.35);
}

.overlay.overlay-dlg {
  display: grid;
  place-items: center;
  align-content: start;
  justify-items: center;
  padding: 7vh 18px 28vh;
  background: rgba(4, 2, 3, 0.48);
  backdrop-filter: blur(3px);
}
.overlay .panel.kv-dlg.kv-dlg-compact {
  max-width: 420px;
  width: min(420px, 88vw);
  max-height: none;
  overflow: hidden !important;
  scrollbar-width: none;
}
.overlay .panel.kv-dlg.kv-dlg-compact::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.overlay .panel.kv-dlg.kv-dlg-compact .kv-dlg-story {
  max-height: none;
  overflow: visible;
}
.overlay .panel.kv-dlg.kv-dlg-compact .quest-reward-icons img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: transparent !important;
  border: 1px solid #c9a050;
  border-radius: 4px;
  padding: 4px;
  box-shadow: inset 0 0 0 1px rgba(40, 22, 10, 0.65);
}
.overlay .panel.kv-dlg {
  max-width: 460px;
  max-height: none;
  overflow: hidden !important;
  scrollbar-width: none;
  background:
    linear-gradient(165deg, #6a4428 0%, #3e2614 38%, #24160c 100%);
  border: 3px solid #d4b060;
  border-radius: 8px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 230, 160, 0.55),
    inset 0 0 0 5px #5a3818,
    inset 0 0 36px rgba(0, 0, 0, 0.28),
    0 18px 48px rgba(0, 0, 0, 0.7);
  color: #f4e6c8;
  padding: 16px 18px 14px;
  position: relative;
}
.overlay .panel.kv-dlg::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.overlay .panel.kv-dlg::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(232, 200, 120, 0.28);
  border-radius: 4px;
  pointer-events: none;
}
.overlay .panel.kv-dlg .kv-dlg-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  color: #ffe08a;
  text-shadow: 0 1px 2px #000, 0 0 14px rgba(255, 180, 60, 0.4);
  margin: 0 0 2px;
  text-align: center;
  letter-spacing: 0.06em;
}
.overlay .panel.kv-dlg .kv-dlg-quest {
  font-size: 14px;
  color: #e8b070;
  text-align: center;
  margin: 0 0 10px;
  font-weight: 700;
  font-style: italic;
}
.overlay .panel.kv-dlg .kv-dlg-story {
  color: #2a1a0c;
  font-size: 13.5px;
  line-height: 1.45;
  background:
    linear-gradient(180deg, #f0dcb0 0%, #e2c48a 100%);
  border: 1px solid #8a5a18;
  border-radius: 4px;
  padding: 9px 11px;
  margin-bottom: 8px;
  box-shadow: inset 0 0 10px rgba(80, 50, 10, 0.12);
}
.overlay .panel.kv-dlg .kv-dlg-obj {
  background: linear-gradient(180deg, #e8d09a, #c9a468);
  color: #1a1008;
  border: 2px solid #8a5a18;
  border-radius: 4px;
  padding: 7px 10px;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 13px;
}
.overlay .panel.kv-dlg .kv-dlg-count {
  display: inline-block;
  margin-top: 3px;
  font-size: 14px;
  font-weight: 800;
  color: #5a1808;
}
.overlay .panel.kv-dlg .quest-reward-line {
  color: #ffe8b0;
  font-size: 13px;
  margin: 0 0 8px;
  text-align: center;
}
.overlay .panel.kv-dlg .quest-reward-icons {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}
.overlay .panel.kv-dlg .panel-actions {
  justify-content: center;
  margin-top: 10px;
}
.overlay .panel.kv-dlg.confirm-dlg {
  max-width: min(420px, 92vw);
}
.overlay .panel.kv-dlg.confirm-dlg .confirm-dlg-msg {
  text-align: center;
  margin: 8px 0 4px;
}
.overlay .panel.kv-dlg.confirm-dlg .confirm-dlg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.overlay .panel.kv-dlg .kv-btn {
  background: linear-gradient(180deg, #9a6030, #4a2810);
  border: 2px solid #e0c060;
  color: #fff6dc;
  font-weight: 700;
  min-width: 118px;
  border-radius: 4px;
  text-shadow: 0 1px 1px #000;
}
.overlay .panel.kv-dlg .kv-btn.primary {
  background: linear-gradient(180deg, #c88838, #7a4010);
  box-shadow: 0 0 12px rgba(255, 180, 60, 0.4);
}

.overlay.overlay-letter {
  background: rgba(4, 2, 3, 0.55);
  backdrop-filter: blur(3px);
}
.overlay .panel.dev-letter-panel {
  width: min(520px, 92vw);
  max-height: min(82vh, 680px);
  padding: 20px 22px 18px;
  padding-top: 14px;
  background:
    url('../processed/kv/create/parchment.png') center / cover no-repeat,
    linear-gradient(180deg, #f0d49a 0%, #d4b070 45%, #c4a060 100%);
  border: 3px solid #8a5a18;
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 240, 200, 0.45),
    0 16px 48px rgba(0, 0, 0, 0.55);
  color: #1a1008;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  transform-origin: top center;
  opacity: 0;
  transform: perspective(800px) rotateX(12deg) scaleY(0.35);
  transition:
    opacity 0.45s ease,
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}
.dev-letter-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 2px solid #6f3a08;
  border-radius: 4px;
  background: linear-gradient(180deg, #f0c870 0%, #c89428 100%);
  color: #2a1206;
  font: 700 22px/1 Georgia, "Times New Roman", serif;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(60, 30, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.dev-letter-close:hover {
  filter: brightness(1.06);
  color: #1a1008;
}
.dev-letter-close:active {
  transform: scale(0.96);
}
.overlay .panel.dev-letter-panel h2,
.overlay .panel.dev-letter-panel p,
.overlay .panel.dev-letter-panel span,
.overlay .panel.dev-letter-panel b {
  color: inherit;
}
.overlay .panel.dev-letter-panel.dev-letter-open {
  opacity: 1;
  transform: perspective(800px) rotateX(0deg) scaleY(1);
}
.dev-letter-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font: 12px Georgia, "Times New Roman", serif;
  color: #2a1608;
  margin: 0 36px 10px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(42, 22, 8, 0.28);
  flex-shrink: 0;
}
.dev-letter-meta b {
  color: #1a1008;
  font-weight: 700;
}
.dev-letter-greeting {
  font: 20px Georgia, "Times New Roman", serif;
  color: #1a1008 !important;
  margin: 0 0 12px;
  text-align: center;
  font-weight: 700;
}
.dev-letter-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 10px;
  margin-right: -2px;
  scrollbar-width: thin;
  scrollbar-color: #7a4818 #e8cc88;
}
.dev-letter-scroll::-webkit-scrollbar {
  width: 11px;
}
.dev-letter-scroll::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #e8cc88, #d4b068);
  border-radius: 5px;
  border: 1px solid rgba(90, 48, 8, 0.35);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.12);
}
.dev-letter-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #b88838 0%, #7a4818 55%, #5a3010 100%);
  border-radius: 5px;
  border: 1px solid #4a2808;
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, 0.35);
}
.dev-letter-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #c89848 0%, #885828 55%, #6a3818 100%);
}
.dev-letter-p {
  font: 14px/1.6 Georgia, "Times New Roman", serif;
  color: #1a1008 !important;
  margin: 0 0 12px;
  text-indent: 1.2em;
}
.dev-letter-footer {
  margin-top: 14px;
  padding-top: 10px;
  padding-bottom: 4px;
  border-top: 1px solid rgba(42, 22, 8, 0.28);
  text-align: right;
}
.dev-letter-signoff {
  font: 13px Georgia, "Times New Roman", serif;
  color: #2a1608 !important;
  margin: 0 0 6px;
}
.dev-letter-signature {
  font: 17px Georgia, "Times New Roman", serif;
  font-weight: 700;
  color: #1a1008 !important;
  margin: 0;
}
.dev-letter-note {
  font: 12px Georgia, "Times New Roman", serif;
  font-style: italic;
  color: #3a2010 !important;
  margin: 4px 0 0;
}

.overlay .panel.kv-dlg .kv-dlg-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 2px solid #c9a050;
  background: linear-gradient(180deg, #6a3818, #2a1608);
  color: #ffe08a;
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, 0.2);
}
.overlay .panel.kv-dlg .kv-dlg-x:hover {
  border-color: #ffe08a;
  color: #fff;
  filter: drop-shadow(0 0 6px rgba(255, 180, 60, 0.55));
}

/* ===== coe60: HUD icons smaller + aligned ===== */
:root { --hud-h: 64px; }

.coe-hud-minimal {
  justify-content: center !important;
  align-items: center !important;
  min-height: calc(var(--hud-h) + var(--safe-top)) !important;
  padding: 4px 10px !important;
  gap: 10px !important;
  overflow: visible !important;
}
.coe-hud-minimal .coe-hud-left {
  align-items: center;
  flex: 0 0 auto;
}
.coe-hud-minimal .coe-hud-left .hud-buff-icons {
  align-self: center;
  align-items: center;
}
.coe-hud-minimal .coe-iconbar {
  display: flex !important;
  justify-content: flex-start;
  align-items: center;
  flex: 0 1 auto !important;
  gap: 6px !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 10px 4px 10px 10px !important;
  margin: 0;
  border-left: 1px solid rgba(201, 160, 80, 0.32);
  box-shadow: inset 1px 0 0 rgba(255, 232, 160, 0.08);
  align-self: center;
}
.coe-hud-minimal .coe-iconbar .coe-ico,
.coe-hud-minimal .coe-iconbar .hud-icon-btn {
  overflow: visible !important;
}
.coe-hud-minimal .coe-iconbar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.coe-hud-minimal .coe-ico {
  width: 46px !important;
  height: 46px !important;
  flex: 0 0 46px !important;
}
.coe-hud-minimal .coe-iconbar .coe-ico .hud-icon-wrap {
  width: 46px !important;
  height: 46px !important;
  flex-basis: 46px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  overflow: visible;
  box-sizing: border-box;
  padding: 0 !important;
  border-radius: 10px !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
.coe-hud-minimal .coe-iconbar .coe-ico .hud-icon-wrap img {
  width: 94% !important;
  height: 94% !important;
  max-width: 94%;
  max-height: 94%;
  object-fit: contain !important;
  object-position: center;
}
.coe-hud-minimal .coe-iconbar #btnInv .hud-icon-wrap img,
.coe-hud-minimal .coe-iconbar #btnClan .hud-icon-wrap img,
.coe-hud-minimal .coe-iconbar #btnMap .hud-icon-wrap img {
  width: 86% !important;
  height: 86% !important;
  max-width: 86%;
  max-height: 86%;
}
.coe-ico.locked {
  opacity: 0.42;
  filter: grayscale(0.35);
  cursor: not-allowed !important;
  pointer-events: none;
}
.coe-ico.locked:hover .hud-icon-wrap {
  transform: none !important;
  filter: none !important;
}

/* ??: ????-??????? ??????? / ???? */
body.fac-south .coe-hud,
body.fac-south #stage,
body.fac-south .coe-chat {
  border-color: #6a2818 !important;
  box-shadow:
    inset 0 0 0 1px rgba(180, 70, 30, 0.35),
    inset 0 0 22px rgba(80, 20, 8, 0.25),
    0 4px 14px rgba(0, 0, 0, 0.55) !important;
}
body.fac-south .right-rail:not(.kv-rail) .rail-panel {
  border-color: #6a2818 !important;
  box-shadow:
    inset 0 0 0 1px rgba(180, 70, 30, 0.35),
    inset 0 0 22px rgba(80, 20, 8, 0.25),
    0 4px 14px rgba(0, 0, 0, 0.55) !important;
}
body.fac-south .coe-hud {
  background:
    linear-gradient(180deg, #4a1e12 0%, #2a1008 50%, #140806 100%) !important;
}
body.fac-south .rail-head,
body.fac-south .rail-tabs {
  background: linear-gradient(180deg, #5a2818, #2a1008) !important;
}
body.fac-south .coe-frame::before,
body.fac-south .coe-frame::after {
  border-color: rgba(200, 90, 40, 0.55);
}

/* Ð¢ÑÐ¼Ð½ÑÐµ ÐºÐ°ÑÑÐ¾ÑÐºÐ¸ Ð·Ð°Ð´Ð°Ð½Ð¸Ð¹ â ÑÐ¾Ð»ÑÐºÐ¾ Ð²Ð½Ðµ kv-rail (pergament Ñ kv-rail Ð½Ð¸Ð¶Ðµ) */
.right-rail:not(.kv-rail) .quest-tracker {
  background: linear-gradient(180deg, #2a1a10 0%, #1a1008 100%) !important;
  color: #f0dcb0 !important;
  padding: 8px !important;
}
.right-rail:not(.kv-rail) .quest-tracker .quest-track-item,
.right-rail:not(.kv-rail) .quest-tracker .qt-card,
.right-rail:not(.kv-rail) .quest-tracker > div {
  background: linear-gradient(180deg, #3d2818, #2a170c) !important;
  border: 2px solid #8a5530 !important;
  color: #f0dcb0 !important;
}
.right-rail:not(.kv-rail) .quest-tracker .qt-title {
  color: #e8d4a8 !important;
}
.right-rail:not(.kv-rail) .quest-tracker .qt-obj,
.right-rail:not(.kv-rail) .quest-tracker .meta {
  color: #cbb892 !important;
}
.right-rail:not(.kv-rail) .quest-tracker b,
.right-rail:not(.kv-rail) .quest-tracker strong {
  color: #e0c898 !important;
}
.qt-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.qt-btn {
  flex: 1;
  padding: 5px 6px;
  font-size: 11px;
  font-weight: 700;
  color: #fff0d0 !important;
  background: linear-gradient(180deg, #6a3a18, #3a1e0c) !important;
  border: 1px solid #a07840 !important;
  border-radius: 3px;
  cursor: pointer;
}
.qt-btn:hover { border-color: #e8c878 !important; color: #fff !important; }

.chat-collapse-btn,
.chat-fab { display: none !important; }

/* Currency wallet + character icon */
.coe-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.coe-hud.coe-hud-minimal {
  justify-content: center !important;
}
/* Must win over .coe-hud flex â otherwise portal is blocked by a full-screen HUD */
.coe-hud.hud-hidden,
#hud.hud-hidden {
  display: none !important;
  pointer-events: none !important;
}
.coe-hud-left {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  overflow: visible;
  max-width: none;
  z-index: 2;
}
.coe-hud-minimal .coe-hud-bars {
  min-width: 148px;
  max-width: 200px;
  width: clamp(148px, 16vw, 188px);
}
.coe-wallet-host { display: flex; align-items: center; }
.coe-wallet-host:empty { display: none; }
.coe-wallet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  background: rgba(0,0,0,0.35);
  border: 1px solid #6b4424;
  border-radius: 4px;
}
.coe-wallet .cw-unit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #f0dcb0;
  font-weight: 800;
  font-size: 13px;
  text-shadow: 0 1px 2px #000;
}
.coe-wallet .cw-unit img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  image-rendering: auto;
}
/* Алмазы рядом с з/с/б — тот же размер, лёгкий акцент */
.coe-wallet .cw-unit.cw-diamond {
  margin-left: 2px;
  padding-left: 6px;
  border-left: 1px solid rgba(160, 120, 200, 0.35);
}
.coe-wallet .cw-unit.cw-diamond b {
  color: #e8d0ff;
}
.coe-hud-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 132px;
  max-width: 180px;
  width: 160px;
  flex: 0 0 auto;
}
.coe-hbar {
  position: relative;
  height: 15px;
  border: 1px solid rgba(60, 36, 18, 0.9);
  background: linear-gradient(180deg, rgba(8, 4, 2, 0.92), rgba(0, 0, 0, 0.78));
  border-radius: 3px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.65);
}
.coe-hbar > i {
  display: block;
  height: 100%;
  width: 0%;
  transition: width 0.15s ease-out;
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.coe-hbar.hp > i {
  background: linear-gradient(180deg, #ff6a58 0%, #e03830 42%, #9a1818 100%);
}
.coe-hbar.res > i {
  background: linear-gradient(180deg, #ffe070 0%, #e8b028 45%, #a87010 100%);
}
.coe-hbar.res.mana > i {
  background: linear-gradient(180deg, #7ecfff 0%, #3a98e8 48%, #1860b0 100%);
}
.coe-hbar.xp > i {
  background: linear-gradient(180deg, #9dff88 0%, #42d040 48%, #1c922c 100%);
}
.coe-hbar.xp {
  border-color: rgba(80, 140, 60, 0.55);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(120, 200, 90, 0.12);
}
.coe-hbar.xp > b {
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #f4ffe8;
  text-shadow: 0 1px 2px rgba(0,0,0,0.85);
}
/* Ð¡ÑÐµÑÑ ÑÐ¿ÑÐ°Ð²Ð° Ð¾Ñ Ð±Ð°ÑÐ¾Ð² â Ð¿Ð¾Ð»Ð¾ÑÐºÑ Ð¾Ð¿ÑÑÐ° Ð½Ðµ ÑÑÐ¾Ð³Ð°ÑÑ */
.hud-buff-icons {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: flex-end;
  align-self: flex-end;
  margin: 0 0 0 2px;
  min-height: 34px;
  flex: 0 0 auto;
}
.hud-buff-icons.empty {
  display: none;
}
.coe-hud-bars.has-sphere-buffs {
  box-shadow: 0 0 0 1px rgba(201, 148, 74, 0.22);
  border-radius: 4px;
}
.coe-hud-minimal .coe-hud-left .hud-buff-icons:not(.empty) {
  align-self: center;
  margin: 0 0 0 4px;
}
.hud-buff-slot.is-sphere .hud-buff-ico {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}
.chat-sphere-ico {
  width: 16px;
  height: 16px;
  margin: 0 2px 0 0;
  vertical-align: middle;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.55));
  flex: 0 0 16px;
}
.chat-id-wrap .chat-sphere-ico {
  display: inline-block;
}
.hud-buff-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
  width: 24px;
  flex: 0 0 24px;
}
.hud-buff-ico {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: transparent !important;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.55));
}
.hud-buff-timer {
  font-size: 9px;
  line-height: 1;
  font-weight: 700;
  color: #e8d6a8;
  text-shadow: 0 1px 2px #000;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
#btnSupport .hud-icon-wrap img,
#btnMail .hud-icon-wrap img {
  background: transparent !important;
  mix-blend-mode: normal;
}
#btnArena.coe-ico .hud-icon-wrap img,
#btnArena .hud-icon-wrap img {
  width: 118% !important;
  height: 118% !important;
  max-width: none !important;
  max-height: none !important;
  transform: scale(1.1);
}
.coe-hbar > b {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff8e8;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
  letter-spacing: 0.02em;
}
.rail-wallet {
  justify-content: center;
  margin-bottom: 4px;
}
.rail-wallet .coe-wallet {
  background: rgba(40, 24, 12, 0.2);
  border-color: rgba(80, 50, 24, 0.55);
  padding: 2px 6px;
  gap: 6px;
}
.rail-wallet .coe-wallet .cw-unit {
  color: #3a2818;
  text-shadow: none;
  font-size: 12px;
}
.rail-wallet .coe-wallet .cw-unit img {
  width: 14px;
  height: 14px;
}
.rail-wallet .coe-wallet .cw-unit.cw-diamond {
  border-left-color: rgba(100, 60, 140, 0.4);
}
.rail-wallet .coe-wallet .cw-unit.cw-diamond b {
  color: #5a3080;
}
/* ????? ??????? ??? ? ??????? ?????? ? PNG ? ?? ??????? ? ?? ?????????? ?? hover */
#btnCharPanel:not(.hud-faction-btn) .hud-icon-wrap,
.hud-face-wrap:not(.hud-faction-frame) {
  width: 52px !important;
  height: 52px !important;
  border-radius: 0 !important;
  overflow: visible !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  flex: 0 0 52px;
}
#btnCharPanel:not(.hud-faction-btn) .hud-icon-wrap img,
.hud-face-wrap:not(.hud-faction-frame) img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  border: 0 !important;
  display: block;
}
#btnCharPanel:not(.hud-faction-btn) {
  width: 54px !important;
  height: 54px !important;
  padding: 0 !important;
  overflow: visible;
  flex: 0 0 auto;
  background: transparent !important;
  border: none !important;
}
#btnCharPanel.hot:hover,
#btnCharPanel.hud-icon-btn:hover,
#btnCharPanel:hover {
  transform: none !important;
  filter: brightness(1.06);
  box-shadow: none !important;
  border-color: transparent !important;
}
#btnCharPanel:hover .hud-icon-wrap,
#btnCharPanel:focus-visible .hud-icon-wrap,
#btnCharPanel:active .hud-icon-wrap {
  transform: none !important;
  filter: none !important;
  border: none !important;
}
.coe-hud-left {
  /* keep overflow visible for sphere timers */
  overflow: visible;
  max-width: none;
  z-index: 2;
}
.coe-wallet-host {
  position: relative;
  z-index: 1;
}
.loot-panel .loot-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 6px;
}
.loot-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  background: rgba(0,0,0,0.28);
  border: 1px solid #6b4424;
  border-radius: 4px;
  font-weight: 650;
  color: #fff0d0;
  font-size: 13px;
}
.loot-chip img { width: 16px; height: 16px; object-fit: contain; }
/* Список лута: полное имя, всё читается, скролл если много */
.loot-drop-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 6px 0 4px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}
.loot-drop-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 7px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #6b4424;
  border-radius: 5px;
  opacity: 0;
  animation: lootLineIn 0.22s ease forwards;
  animation-delay: calc(var(--i, 0) * 0.03s);
}
@keyframes lootLineIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.loot-drop-line img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}
.loot-drop-name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 650;
  color: #fff0d0;
  line-height: 1.25;
  word-break: break-word;
}
.loot-drop-name small {
  font-weight: 500;
  color: #c9b48a;
  font-size: 10px;
}
.loot-drop-qty {
  flex-shrink: 0;
  font-weight: 800;
  color: #ffe082;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
/* legacy cards — на случай старых фрагментов */
.loot-drop-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 4px;
}
.loot-drop-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: auto;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid #6b4424;
  border-radius: 6px;
}
.loot-drop-card img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.loot-drop-card span {
  font-size: 13px;
  text-align: left;
  color: #fff0d0;
  line-height: 1.3;
  word-break: break-word;
}
.overlay .panel.loot-panel,
.overlay .panel.loot-panel-compact {
  width: auto !important;
  max-width: min(420px, 94vw) !important;
  min-width: min(280px, 92vw);
  max-height: min(88vh, 640px) !important;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px 12px !important;
  border-radius: 12px;
}
.overlay .panel.loot-panel h2 {
  font-size: 18px;
  margin-bottom: 4px;
}
.overlay .panel.loot-panel .loot-lead {
  margin-bottom: 6px;
  font-size: 13px;
  color: #d8c4a0;
}
.overlay .panel.loot-panel .meta {
  margin-bottom: 4px;
  font-size: 12px;
}
.overlay .panel.loot-panel .panel-actions {
  margin-top: 10px;
  justify-content: center;
}

/* Подсказка лута моба: компактно, БЕЗ скролла, pointer-events:none */
.mob-loot-tip {
  position: absolute;
  z-index: 8;
  box-sizing: border-box;
  padding: 6px 8px 5px;
  background: linear-gradient(180deg, #3a2414, #1a100a);
  border: 2px solid #c9a050;
  border-radius: 7px;
  color: #ffe8d4;
  font: 11px/1.25 "Segoe UI", system-ui, sans-serif;
  pointer-events: none !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  overflow: visible;
}
.mob-loot-tip.hidden { display: none; }
.mob-loot-title {
  font-weight: 800;
  font-size: 12px;
  color: #ffe082;
  margin: 0 0 1px;
  line-height: 1.2;
}
.mob-loot-stats {
  opacity: 0.82;
  font-size: 10px;
  margin: 0 0 3px;
  color: #d8c4a0;
}
.mob-loot-label {
  font-weight: 700;
  font-size: 10px;
  color: #c9b48a;
  margin: 0 0 2px;
  letter-spacing: 0.02em;
}
.mob-loot-rows {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.mob-loot-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 2px 0;
}
.mob-loot-row .coe-gear-ico--loot {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
}
.mob-loot-row .coe-gear-ico--gear.coe-gear-ico--loot {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}
.mob-loot-name {
  flex: 1;
  min-width: 0;
  font-size: 10.5px;
  line-height: 1.2;
  color: #ffe8d4;
  word-break: break-word;
}
.mob-loot-pct {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  color: #ffe082;
  font-variant-numeric: tabular-nums;
}

/* ===== CoE profile / backpack ===== */
.coe-profile {
  max-width: min(920px, 96vw) !important;
  width: 920px;
  padding: 10px 12px 12px !important;
  background:
    linear-gradient(180deg, #3a2414 0%, #24160e 40%, #1a100a 100%) !important;
  border: 3px solid #6b4424 !important;
  position: relative;
  overflow-x: hidden;
}
.coe-profile-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 20;
  min-width: 88px;
  padding: 6px 14px !important;
  font-weight: 800 !important;
  pointer-events: auto !important;
}
.coe-profile-staff-btn {
  position: absolute;
  top: 10px;
  right: 108px;
  z-index: 20;
  min-width: 96px;
  padding: 6px 12px !important;
  font-weight: 800 !important;
  pointer-events: auto !important;
}
.coe-admin-toolbox {
  margin: 44px 12px 8px;
  padding: 12px 14px 10px;
  border: 1px solid rgba(212, 175, 55, 0.42);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.38);
  max-height: min(42vh, 320px);
  overflow-y: auto;
}
.coe-admin-toolbox[hidden] {
  display: none !important;
}
.coe-admin-toolbox__section {
  margin-bottom: 12px;
}
.coe-admin-toolbox__section:last-child {
  margin-bottom: 0;
}
.coe-admin-toolbox__title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c9a050;
  margin-bottom: 8px;
}
.coe-admin-toolbox__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.coe-admin-toolbox__nick {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(107, 68, 36, 0.55);
}
.coe-admin-toolbox__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #e8d4a8;
  margin-bottom: 4px;
}
.coe-admin-inp {
  width: 100%;
  max-width: 280px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #6b4424;
  background: #1a1008;
  color: #f0e0c0;
  font-size: 13px;
}
.coe-admin-inp--sm {
  width: auto;
  max-width: none;
  min-width: 88px;
}
html.is-mobile .coe-profile-staff-btn {
  top: 8px;
  right: 104px;
  min-height: 40px;
  font-size: 13px !important;
}
html.is-mobile .coe-profile-close {
  top: 8px;
  right: 8px;
  z-index: 30;
  min-height: 40px;
  min-width: 96px;
  font-size: 15px !important;
}
html.is-mobile .overlay {
  z-index: 120 !important;
  pointer-events: auto !important;
}
/* ???? ?????? ??????? ? ??? ?? ????????????? ????? (VIP/????????? ??????????? ?????) */
html.is-mobile body.overlay-open #gameChat {
  pointer-events: none !important;
}
html.is-mobile body.overlay-open .overlay {
  pointer-events: auto !important;
}
html.is-mobile body.overlay-open .overlay .panel {
  pointer-events: auto !important;
}
html.is-mobile .overlay .panel.coe-inspect {
  position: relative;
  z-index: 2;
  pointer-events: auto !important;
}
html.is-mobile .rail-residents {
  z-index: 46;
}
html.is-mobile body.overlay-open .rail-residents {
  pointer-events: none !important;
  /* ?? ????? ?????? ? ????? ??????? ??? ?????? «???????» */
  opacity: 1;
}

/* Party invite modal â Ð¿Ð¾Ð²ÐµÑÑ Ð²ÑÐµÐ³Ð¾ UI */
.party-invite-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(2, 6, 12, 0.72);
  pointer-events: auto;
}
.party-invite-modal.on {
  display: flex;
}
.party-invite-card {
  width: min(420px, 94vw);
  padding: 22px 18px 16px;
  text-align: center;
  background: linear-gradient(165deg, #243044 0%, #121a26 100%);
  color: #e8eef6;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(180, 210, 255, 0.18);
  border-radius: 6px;
}
.party-invite-badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  margin-bottom: 10px;
  border: 1px solid rgba(120, 180, 255, 0.35);
  color: #9ec8ff;
  border-radius: 999px;
}
.party-invite-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 12px;
  color: #fff;
}
.party-invite-body {
  font-size: 16px;
  line-height: 1.4;
  margin-bottom: 8px;
}
.party-invite-nick {
  color: #ffe08a;
}
.party-invite-side {
  display: inline-block;
  margin-left: 4px;
  font-size: 12px;
  color: #9ec8ff;
}
.party-invite-hint {
  font-size: 12px;
  opacity: 0.7;
  margin-bottom: 16px;
}
.party-invite-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.party-invite-actions .btn {
  min-width: 128px;
  min-height: 42px;
  font-size: 15px;
}
.party-invite-accept {
  font-weight: 700;
}
/* Residents row: compact 2-line card, icon buttons (no truncated text) */
.residents-list .online-row,
.kv-rail .residents-list .online-row {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 4px !important;
  padding: 7px 8px !important;
  border-radius: 5px;
  border-bottom: 1px solid rgba(120, 90, 40, 0.18);
  flex-wrap: nowrap !important;
}
.residents-list .online-row.is-enemy,
.kv-rail .online-row.is-enemy {
  background: rgba(160, 40, 20, 0.07);
}
.residents-list .online-row.is-ally,
.kv-rail .online-row.is-ally {
  background: rgba(40, 90, 30, 0.05);
}
.residents-list .online-row.is-self,
.kv-rail .online-row.is-self {
  background: rgba(255, 248, 220, 0.35);
}
.peer-top {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.peer-top .chat-id-wrap {
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
  flex-shrink: 1;
}
.peer-top .chat-rank-ico,
.peer-top .chat-vip-badge,
.peer-top .chat-clan-ico,
.peer-top .chat-mod-shield {
  flex-shrink: 0;
}
.peer-top .chat-nick-btn {
  font-size: 13px !important;
  font-weight: 600 !important;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.peer-bot {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
}
.peer-bot .peer-tag {
  margin-left: 0 !important;
  font-size: 10px;
  letter-spacing: 0.02em;
  opacity: 0.95;
  white-space: nowrap;
}
.peer-bot .friend-mark {
  color: #b8860b;
  font-size: 11px;
}
.residents-list .chat-rank-ico,
.kv-rail .online-row .chat-rank-ico {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  object-fit: contain !important;
  object-position: center !important;
  flex: 0 0 24px !important;
  flex-shrink: 0 !important;
  image-rendering: auto !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}
.kv-rail .peer-lvl,
.residents-list .peer-lvl {
  margin-left: auto !important;
  flex: 0 0 auto;
  min-width: 20px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: #5a4020;
  background: rgba(255, 248, 220, 0.55);
  border: 1px solid rgba(168, 132, 72, 0.45);
  border-radius: 999px;
  padding: 1px 7px;
  line-height: 1.35;
}
.kv-rail .peer-actions,
.residents-list .peer-actions {
  display: inline-flex !important;
  align-items: center;
  gap: 5px !important;
  margin-left: auto !important;
}
.kv-rail .peer-act,
.kv-rail .atk-sword-btn,
.residents-list .peer-act,
.residents-list .atk-sword-btn {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  padding: 0 !important;
  border-radius: 5px !important;
  font-size: 13px !important;
  font-weight: 700;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: rgba(255, 248, 220, 0.85) !important;
  border: 1px solid #a88448 !important;
  color: #4a3010 !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.35) inset;
}
.kv-rail .peer-act:hover,
.kv-rail .atk-sword-btn:hover,
.residents-list .peer-act:hover,
.residents-list .atk-sword-btn:hover {
  background: #f5e6c0 !important;
  filter: brightness(1.05);
}
.kv-rail .peer-act.invite,
.residents-list .peer-act.invite {
  background: linear-gradient(180deg, #d8f0b8, #9cbc58) !important;
  border-color: #5a7830 !important;
  color: #203010 !important;
  font-size: 15px !important;
  line-height: 1 !important;
}
.kv-rail .peer-act.invite.cross-faction,
.residents-list .peer-act.invite.cross-faction {
  background: linear-gradient(180deg, #f0d8b0, #c89848) !important;
  border-color: #8a6030 !important;
}
.kv-rail .atk-sword-btn,
.residents-list .atk-sword-btn {
  background: linear-gradient(180deg, #f0c8b8, #c86848) !important;
  border-color: #8a3020 !important;
  color: #3a1008 !important;
}
.coe-profile-tabs { display: none !important; }
.coe-quick-slot.empty img { opacity: 0.32; filter: grayscale(0.35); }
.coe-quick-slot.filled img { opacity: 1; filter: none; }
.coe-profile-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.coe-profile-tabs button {
  flex: 1;
  padding: 6px 8px;
  font-weight: 800;
  color: #d4b98a;
  background: linear-gradient(180deg, #4a2e1a, #2a170c);
  border: 1px solid #6b4424;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
}
.coe-profile-tabs button.on {
  color: #fff0d0;
  border-color: #c9a050;
  background: linear-gradient(180deg, #5a3a20, #3a2414);
}
.coe-profile-tabs button:disabled { opacity: 0.45; cursor: default; }
.coe-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.coe-profile-name {
  font-weight: 800;
  color: #ffe8c0;
  font-size: 16px;
}
.coe-profile-name .coe-lv {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  border-radius: 50%;
  background: #2e7d32;
  color: #fff;
  font-size: 12px;
}
.coe-profile-bars { flex: 1; max-width: 280px; }
.coe-bar {
  position: relative;
  height: 14px;
  margin: 3px 0;
  background: #1a0e08;
  border: 1px solid #5a3520;
  border-radius: 3px;
  overflow: hidden;
}
.coe-bar i {
  display: block;
  height: 100%;
}
.coe-bar.hp i { background: linear-gradient(90deg, #8b1e1e, #c62828); }
.coe-bar.en i { background: linear-gradient(90deg, #b8860b, #daa520); }
.coe-bar b {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
  text-shadow: 0 1px 2px #000;
}
.coe-profile-body {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 12px;
}
.coe-doll-wrap {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: start;
  min-height: 300px;
}
.coe-belt-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.coe-doll-frame {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.coe-belt-roles {
  margin: 0;
  font-size: 10px;
  opacity: 0.65;
  text-align: center;
  line-height: 1.2;
}
.coe-inv-v2 .coe-belt-roles {
  display: none;
}
.coe-eq-top {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
}
.coe-eq-top .coe-eq-slot--mini:first-child {
  margin-right: 4px;
}
.coe-eq-top .coe-eq-slot--mini:last-child {
  margin-left: 4px;
}
.coe-eq-mid {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  gap: 6px;
  align-items: start;
}
.coe-eq-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.coe-eq-col .coe-eq-slot--mini {
  margin-top: 2px;
}
/* Пояс в рюкзаке — как боевые кругляшки, но компактнее (бой не трогаем) */
.coe-quick {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 4px 0 2px;
  z-index: 2;
}
.coe-quick-rail {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(201, 148, 74, 0.15), rgba(201, 148, 74, 0.55), rgba(201, 148, 74, 0.15));
  border-radius: 2px;
  pointer-events: none;
  z-index: 0;
}
.coe-quick-slot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #c9944a;
  background: rgba(36, 24, 14, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(20, 12, 6, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
  flex: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.coe-quick-slot:hover {
  border-color: #ffe08a;
  filter: brightness(1.1);
}
.coe-quick-slot.locked {
  opacity: 0.42;
  cursor: not-allowed;
  border-color: #6a5340;
  background: rgba(18, 12, 8, 0.88);
  filter: grayscale(0.35);
}
.coe-quick-slot.locked:hover {
  border-color: #6a5340;
  filter: grayscale(0.35);
}
.coe-quick-slot img {
  width: 72% !important;
  height: 72% !important;
  object-fit: contain !important;
  pointer-events: none;
}
.coe-quick-count {
  position: absolute;
  right: -3px;
  bottom: -3px;
  min-width: 14px;
  padding: 0 3px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
  color: #fff8e8;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
}
.coe-quick-role {
  position: absolute;
  left: 1px;
  top: 0;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: rgba(255, 236, 190, 0.78);
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
}
.coe-eq-slot {
  width: 52px;
  height: 52px;
  padding: 2px;
  border: 1px solid #6a4a2e;
  border-radius: 3px;
  background: rgba(32, 22, 14, 0.58);
  box-shadow: inset 0 0 0 1px rgba(20, 12, 6, 0.35);
  color: #a08060;
  font-size: 9px;
  cursor: pointer;
}
.coe-inv-v2 .coe-eq-slot {
  width: 64px;
  height: 64px;
  min-height: 64px;
  max-height: 64px;
  aspect-ratio: 1;
  padding: 3px;
  border-radius: 10px;
  border: 2px solid rgba(130, 92, 48, 0.85);
  background: linear-gradient(165deg, rgba(52, 34, 18, 0.96), rgba(24, 14, 8, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.08), 0 2px 6px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}
.coe-eq-slot--mini {
  width: 28px;
  height: 28px;
  padding: 1px;
  border-radius: 2px;
}
.coe-inv-v2 .coe-eq-slot--mini {
  width: 64px;
  height: 64px;
  min-height: 64px;
  max-height: 64px;
  aspect-ratio: 1;
  border-radius: 10px;
}
.coe-inv-v2 .coe-eq-slot.filled {
  background: linear-gradient(165deg, rgba(68, 48, 26, 0.95), rgba(30, 20, 12, 0.98));
  border-color: rgba(170, 120, 55, 0.9);
}
.coe-eq-slot.filled:not(.coe-inv-slot):not(.coe-inspect-slot) {
  background: rgba(210, 190, 150, 0.88);
  border-color: #8a6230;
}
.coe-eq-slot.filled img { width: 100%; height: 100%; object-fit: contain; }
.coe-eq-slot span { display: none; }
.coe-inv-v2 .coe-eq-slot .coe-slot-cap,
.coe-inv-v2 .coe-eq-slot .coe-eq-art,
.coe-inspect-slot .coe-eq-art,
.coe-inspect-slot .coe-slot-cap { display: flex; }
.coe-inv-slot {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 3px 2px !important;
  height: auto !important;
  min-height: 52px;
  position: relative;
  aspect-ratio: 1;
}
.coe-inv-v2 .coe-eq-mid {
  grid-template-columns: 66px minmax(0, 1fr) 66px;
}
.coe-inv-v2 .coe-eq-bottom,
.coe-inspect .coe-eq-bottom {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 66px;
  gap: 8px;
  align-items: center;
  justify-items: center;
  width: 100%;
  margin-top: 6px;
  padding-bottom: 4px;
}
.coe-eq-bottom-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
}
.coe-eq-bottom-cell--l { grid-column: 1; }
.coe-eq-bottom-cell--c { grid-column: 2; }
.coe-eq-bottom-cell--r { grid-column: 3; }
.coe-inv-v2 .coe-eq-bottom .coe-inv-slot,
.coe-inspect .coe-eq-bottom .coe-inspect-slot,
.coe-inspect .coe-eq-bottom .coe-eq-slot {
  width: 64px !important;
  height: 64px !important;
  min-height: 64px !important;
  max-width: 64px;
  max-height: 64px;
  flex: 0 0 64px;
  box-sizing: border-box;
}
.coe-inspect.coe-inspect--clean .coe-eq-bottom .coe-inspect-slot .coe-eq-art img {
  width: 88% !important;
  height: 88% !important;
  object-fit: contain !important;
}
.coe-inv-v2 .coe-inv-slot {
  width: 64px !important;
  height: 64px !important;
  min-height: 64px !important;
  max-width: 64px;
  max-height: 64px;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  gap: 0;
  padding: 3px !important;
  aspect-ratio: 1;
  box-sizing: border-box;
}
.coe-inv-v2 .coe-inv-slot.coe-eq-slot--mini,
.coe-inv-v2 .coe-eq-top .coe-inv-slot,
.coe-inv-v2 .coe-eq-top .coe-inv-slot.coe-eq-slot--mini {
  width: 64px !important;
  height: 64px !important;
  min-height: 64px !important;
  max-width: 64px;
  max-height: 64px;
}
.coe-inv-v2 .coe-eq-slot,
.coe-inv-v2 .coe-eq-slot--mini {
  width: 64px;
  height: 64px;
}
.coe-inv-v2 .coe-eq-art {
  flex: 1 1 100%;
  width: 100%;
  height: 100%;
  min-height: 0;
  align-self: stretch;
}
.coe-inv-v2 .coe-slot-cap,
.coe-inv-v2 .coe-slot-cap--empty,
.coe-inv-v2 .coe-slot-cap--pack {
  display: none !important;
}
.coe-inspect-slot.filled .coe-slot-cap {
  display: none !important;
}
.coe-inspect-slot:not(.filled) .coe-slot-cap {
  display: none !important;
}
.coe-inv-v2 .coe-inv-slot > img {
  display: none;
}
.coe-inv-slot .eq-lab {
  display: block !important;
  font-size: 8px;
  font-weight: 700;
  color: #a88860;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.coe-inv-v2 .coe-inv-slot .eq-lab {
  display: none !important;
}
.coe-inv-slot.filled .eq-lab { color: #5a3a18; }
.coe-doll {
  height: 260px;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(60,40,28,0.55), rgba(18, 12, 8, 0.72)),
    #241810;
  border: 1px solid #6b4424;
  border-radius: 4px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
.coe-doll-img {
  max-height: 96%;
  max-width: 90%;
  object-fit: contain;
  object-position: bottom center;
}
.coe-doll .kv-doll,
.coe-doll .coe-doll-kv {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.coe-doll .kv-doll-canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
}
.coe-pack-wrap {
  background: linear-gradient(180deg, rgba(28,16,10,0.92), rgba(12,8,6,0.88));
  border: 1px solid #6b4228;
  border-radius: 10px;
  padding: 10px;
  box-shadow: inset 0 1px 0 rgba(255,220,160,0.08);
}
.coe-pack-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  padding: 0 2px 6px;
  border-bottom: 1px solid rgba(201,160,80,0.28);
}
.coe-pack-title {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f0d9a8;
  font-size: 14px;
}
.coe-pack-slots {
  font-weight: 700;
  color: #e8c878;
  font-size: 13px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(80,50,20,0.55);
  border: 1px solid rgba(201,160,80,0.35);
}
.coe-pack-hint {
  margin-left: auto;
  font-size: 10px;
  color: #908068;
  opacity: 0.9;
}
.coe-inv-v2 .coe-pack-head {
  gap: 8px;
  margin-bottom: 6px;
  padding-bottom: 5px;
}
.coe-pack-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 10px;
  padding: 4px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(90, 53, 32, 0.65);
}
.coe-pack-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #a89070;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
.coe-pack-tab b {
  font-size: 11px;
  font-weight: 800;
  color: #ffe8c0;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  padding: 1px 7px;
  min-width: 1.4em;
  text-align: center;
}
.coe-pack-tab.on {
  color: #ffe8c0;
  background: linear-gradient(180deg, rgba(130, 85, 40, 0.55), rgba(50, 32, 16, 0.9));
  border-color: rgba(210, 170, 90, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 230, 180, 0.12);
}
.coe-pack-tab:not(.on):hover { color: #e8d4b0; background: rgba(255, 255, 255, 0.04); }
.coe-pack-panel { display: none; }
.coe-pack-panel.on { display: block; }
.coe-pack-empty {
  grid-column: 1 / -1;
  padding: 28px 12px;
  text-align: center;
  font-size: 13px;
  color: #9a8468;
  border: 1px dashed rgba(90, 53, 32, 0.55);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
}
.coe-pack-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-height: 180px;
  max-height: min(48vh, 380px);
  overflow: auto;
  padding: 2px 4px 2px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(180, 130, 70, 0.45) transparent;
}
.coe-pack-cell--locked {
  cursor: help;
  opacity: 0.72;
  background: rgba(0, 0, 0, 0.35);
  border-style: dashed;
  border-color: rgba(120, 90, 50, 0.45);
}
.coe-pack-cell--locked .coe-pack-lock {
  font-size: 18px;
  line-height: 1;
  filter: grayscale(0.35);
}
.coe-inv-v2 .coe-pack-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: minmax(52px, auto);
  gap: 6px;
  min-height: 220px;
  max-height: min(48vh, 280px);
  overflow: auto;
  padding: 0 0 4px;
  scrollbar-gutter: stable;
}
.coe-inv-v2 .coe-pack-cell--frame {
  contain: layout style;
}
.coe-inv-v2 .coe-pack-cell.hot:hover {
  transform: none;
  box-shadow: inset 0 0 0 1px rgba(201, 160, 80, 0.55);
}
.coe-inv-v2 .coe-eq-slot.hot:hover,
.coe-inv-v2 .coe-inv-slot.hot:hover {
  transform: none;
  filter: brightness(1.08);
}
.coe-inv-v2 .coe-pack-cell--frame {
  aspect-ratio: 1;
  padding: 3px;
  border-radius: 10px;
  border: 2px solid rgba(130, 92, 48, 0.8);
  background: linear-gradient(165deg, rgba(52, 34, 18, 0.96), rgba(24, 14, 8, 0.98));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  overflow: hidden;
  box-sizing: border-box;
}
.coe-inv-v2 .coe-pack-cell--frame.coe-pack-cell--empty,
.coe-inv-v2 .coe-pack-slot-ph {
  cursor: default;
  opacity: 0.72;
  pointer-events: none;
}
.coe-inv-v2 .coe-pack-cell--frame .coe-eq-art {
  flex: 1 1 auto;
  min-height: 0;
}
.coe-inv-v2 .coe-pack-cell--frame {
  justify-content: center;
  padding: 3px;
}
.coe-inv-v2 .coe-pack-cell--frame .coe-eq-art--pack {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.coe-inv-v2 .coe-pack-cell--frame .coe-eq-art--pack img {
  width: 86% !important;
  height: 86% !important;
  max-height: none;
  object-fit: contain;
}
/* Studio в рюкзаке: явная рамка ячейки (без «слоёв» соседних одинаковых карт) */
.coe-inv-v2 .coe-pack-cell--frame.coe-pack-cell--studio {
  border-color: rgba(130, 92, 48, 0.85);
  background: linear-gradient(165deg, rgba(52, 34, 18, 0.96), rgba(24, 14, 8, 0.98));
  box-shadow: none;
  padding: 3px;
  overflow: hidden;
}
.coe-inv-v2 .coe-pack-cell--frame .coe-eq-art--studio img {
  width: 92% !important;
  height: 92% !important;
  object-fit: contain !important;
  filter: none;
}
.coe-inv-v2 .coe-eq-slot.coe-eq-slot--studio,
.coe-inv-v2 .coe-eq-slot:has(.coe-eq-art--studio) {
  background: transparent;
  border-color: rgba(120, 90, 50, 0.45);
  box-shadow: none;
  padding: 1px;
}
.coe-inv-v2 .coe-eq-slot .coe-eq-art--studio img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  filter: none;
}
.coe-inv-v2 .coe-pack-cell .pack-dura {
  display: none;
}
.coe-slot-cap {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  justify-content: center;
  align-items: center;
}
.coe-inv-v2 .coe-pack-panel {
  margin-bottom: 2px;
}
.coe-inv-v2 .coe-pack-wallet {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid rgba(90, 53, 32, 0.45);
}
.coe-inv-v2.coe-profile {
  width: min(780px, 96vw) !important;
  max-width: 780px !important;
}
.coe-inv-v2 .coe-doll {
  height: 280px;
  border-radius: 10px;
}
.coe-inv-v2 .coe-pack-wrap {
  border-radius: 12px;
  border-color: rgba(120, 80, 45, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.06);
}
.coe-inv-v2 .coe-profile-body {
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.coe-inv-gear-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.coe-inv-v2 .coe-doll-wrap {
  grid-template-columns: 1fr;
  min-height: 0;
}
.coe-inv-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(201, 148, 74, 0.38);
  background: linear-gradient(165deg, rgba(44, 30, 16, 0.92), rgba(22, 14, 8, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.07);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.35;
  color: #e8dcc8;
}
.coe-inv-topbar--prof {
  margin-top: 4px;
}
.coe-inv-top-nick {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #f0e4cc;
}
.coe-inv-top-rank {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 400;
  color: #d4bc88;
}
.coe-inv-top-sep {
  opacity: 0.45;
  user-select: none;
}
.coe-inv-top-class,
.coe-inv-top-lv {
  font-size: 12px;
  font-weight: 400;
  color: #c8b8a0;
}
.coe-inv-top-lv {
  font-variant-numeric: tabular-nums;
}
.coe-inv-top-faction {
  font-size: 10px;
  font-weight: 400;
  padding: 2px 7px;
}
.coe-inv-top-glory {
  flex: 1 1 100%;
  font-size: 11px;
  font-weight: 400;
  color: #a89878;
  padding-top: 4px;
  border-top: 1px solid rgba(201, 148, 74, 0.2);
  margin-top: 2px;
}
.coe-inv-top-actions {
  margin-left: auto;
}
.coe-inv-topbar--prof .coe-inv-top-glory {
  flex: 1 1 auto;
  border-top: none;
  padding-top: 0;
  margin-top: 0;
  margin-left: auto;
  text-align: right;
}
.coe-gifts-block--dock {
  margin-top: 0;
  margin-bottom: 0;
  min-height: 88px;
  padding: 8px 10px 10px;
}
.coe-gifts-dock-head {
  font-size: 12px;
  font-weight: 500;
  color: #dcc8a8;
  letter-spacing: 0.03em;
}
.coe-gifts-grid--dock {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}
.coe-gifts-ph {
  aspect-ratio: 1;
  max-width: 52px;
  border: 1px dashed rgba(100, 75, 50, 0.45);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
}
.coe-inspect-doll .coe-gifts-block--dock {
  margin-top: 10px;
}
.coe-inv-v2 .coe-inv-eq-shell {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}
.coe-inv-v2 .coe-eq-stack {
  min-width: 0;
}
.coe-inv-v2 .coe-eq-mid {
  grid-template-columns: 66px minmax(0, 1fr) 66px;
  gap: 8px;
  align-items: start;
}
.coe-inv-v2 .coe-eq-top {
  justify-content: center;
  width: 100%;
  margin-bottom: 6px;
}
.coe-inv-v2 .coe-belt-col {
  align-self: center;
  padding: 4px 0;
}
.coe-inv-v2 .coe-quick {
  padding: 2px 0;
  gap: 8px;
}
.coe-inv-rank-ico {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: none;
}
html.is-mobile .coe-inv-v2 .coe-profile-body {
  grid-template-columns: 1fr;
}
html.is-mobile .coe-inv-topbar {
  padding: 8px 10px;
  margin-bottom: 10px;
}
html.is-mobile .coe-inv-top-glory {
  flex: 1 1 100%;
}
html.is-mobile .coe-inv-v2 .coe-doll-wrap {
  grid-template-columns: 1fr;
}
html.is-mobile .coe-inv-v2 .coe-inv-eq-shell {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 6px;
}
html.is-mobile .coe-inv-v2 .coe-eq-mid {
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  gap: 6px;
}
.coe-pack-cell {
  aspect-ratio: 1;
  border: 1px solid #5a3520;
  border-radius: 8px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255,210,140,0.07), transparent 55%),
    rgba(18,11,7,0.88);
  padding: 3px;
  cursor: pointer;
  position: relative;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  transition: border-color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.coe-pack-cell.hot:hover {
  border-color: #c9a050;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}
.coe-pack-cell--potion { border-color: #4a7a5a; background: linear-gradient(160deg, rgba(40,80,55,0.45), rgba(18,11,7,0.9)); }
.coe-pack-cell--mat { border-color: #3a6a8a; background: linear-gradient(160deg, rgba(35,70,95,0.45), rgba(18,11,7,0.9)); }
.coe-pack-cell--gear { border-color: #8a6a3a; background: linear-gradient(160deg, rgba(90,60,25,0.4), rgba(18,11,7,0.9)); }
.coe-pack-cell--tool { border-color: #7a5a8a; background: linear-gradient(160deg, rgba(70,45,90,0.4), rgba(18,11,7,0.9)); }
.coe-pack-cell--consumable { border-color: #8a4a4a; background: linear-gradient(160deg, rgba(90,40,40,0.35), rgba(18,11,7,0.9)); }
.coe-pack-cell--gift { border-color: #8a4a7a; background: linear-gradient(160deg, rgba(90,40,75,0.35), rgba(18,11,7,0.9)); }
.coe-pack-cell.empty,
.coe-pack-cell--empty {
  cursor: default;
  opacity: 0.5;
  border-style: dashed;
  background: rgba(20,12,8,0.35);
}
.coe-pack-cell .pack-slot-n {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 10px;
  color: rgba(200,170,120,0.45);
  font-weight: 700;
}
.coe-pack-cell img { width: 100%; height: 100%; object-fit: contain; }
.coe-pack-del {
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  line-height: 16px;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  background: rgba(140, 20, 20, 0.95);
  border: 1px solid #5a1010;
  border-radius: 0 2px 0 4px;
  padding: 0;
  cursor: pointer;
  z-index: 6;
  text-align: center;
  pointer-events: auto;
  box-shadow: 0 1px 2px rgba(0,0,0,.55);
}
.coe-pack-del:hover { background: #c62828; }
.coe-pack-wallet { margin-top: 6px; }
.coe-pack-stats { display: none !important; }
.coe-profile-name .coe-lv { display: none !important; }
.coe-profile-bars { display: none !important; }

/* ÐÑÐ¼Ð¾ÑÑ Ð¸Ð³ÑÐ¾ÐºÐ° Ð¿Ð¾ Ð½Ð¸ÐºÑ */
.coe-inspect {
  width: min(640px, 96vw) !important;
  max-width: 640px !important;
  padding-top: 14px !important;
}
.coe-inspect.coe-char-sheet,
.coe-inspect.coe-inspect--clean {
  width: min(720px, 96vw) !important;
  max-width: 720px !important;
}
.coe-inspect.coe-char-sheet.coe-profile,
.coe-inspect.coe-inspect--clean.coe-profile {
  max-height: none !important;
  overflow: visible !important;
}
.coe-inspect-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 44px 12px 0;
  min-width: 0;
}
.coe-inspect-staff-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid rgba(100, 150, 200, 0.45);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
}
.coe-inspect-staff-hint {
  flex: 1 1 140px;
  font-size: 11px;
  line-height: 1.25;
  opacity: 0.85;
}
.coe-inspect.coe-profile {
  max-height: min(90vh, 720px);
  overflow-y: auto;
  overflow-x: hidden;
}
.coe-inspect-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.coe-inspect-title .coe-profile-name {
  font-size: 20px;
  line-height: 1.15;
  max-width: min(100%, 280px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coe-inspect .coe-lv {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 13px;
  background: linear-gradient(180deg, #3d8f4a, #246b32);
  border: 1px solid #1a4a22;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
}
.coe-inspect-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.coe-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #6a4a2e;
  background: rgba(20, 12, 8, 0.55);
  color: #e8d4b0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.coe-chip--north {
  border-color: rgba(100, 150, 200, 0.55);
  color: #b8d4f0;
}
.coe-chip--south {
  border-color: rgba(200, 100, 70, 0.55);
  color: #f0c0a0;
}
.coe-chip--rank {
  color: #f0d090;
  border-color: rgba(200, 160, 70, 0.55);
}
.coe-chip--rank img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}
.coe-chip--rank span {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.coe-inspect-body {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(176px, 210px) !important;
  gap: 12px;
  align-items: start;
}
.coe-inspect-doll {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.coe-inspect .coe-eq-top {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  justify-content: stretch;
  align-items: stretch;
}
.coe-inspect .coe-eq-mid {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 76px;
  gap: 10px;
  align-items: stretch;
}
.coe-inspect--clean .coe-eq-mid {
  grid-template-columns: 98px minmax(0, 1fr) 98px;
}
.coe-inspect--clean .coe-inspect-head {
  padding: 0 0 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(90, 53, 32, 0.5);
}
.coe-inspect--clean .coe-inspect-stats.coe-kv-stat-panel {
  border-radius: 10px;
  background: linear-gradient(165deg, rgba(32, 22, 14, 0.55), rgba(12, 8, 5, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.06);
}
.coe-inspect .coe-eq-col {
  gap: 8px;
}
.coe-inspect .coe-doll {
  height: 280px;
  min-height: 220px;
}
.coe-inspect-slot {
  width: 100% !important;
  height: auto !important;
  min-height: 0;
  aspect-ratio: 1;
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0;
  padding: 3px !important;
  position: relative;
  border-radius: 10px;
  border: 2px solid rgba(130, 92, 48, 0.85);
  background: linear-gradient(165deg, rgba(52, 34, 18, 0.96), rgba(24, 14, 8, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.06), 0 2px 5px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  box-sizing: border-box;
}
.coe-inspect-slot.filled {
  background: linear-gradient(165deg, rgba(68, 48, 26, 0.95), rgba(30, 20, 12, 0.98));
  border-color: rgba(170, 120, 55, 0.9);
}
.coe-inspect-slot > img {
  display: none;
}
.coe-eq-art {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 0;
  width: 100%;
  border-radius: 7px;
  background: rgba(14, 10, 6, 0.35);
  border: 1px solid rgba(70, 50, 32, 0.45);
  box-shadow: none;
  overflow: hidden;
}
/* Иконка шмота: фон на PNG карточки (studio), без второй зелёной плитки */
.coe-eq-art--gear,
.coe-gear-ico--gear {
  background: transparent;
  border: none;
  box-shadow: none;
}
.coe-gear-ico {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 7px;
  overflow: hidden;
  box-sizing: border-box;
  vertical-align: middle;
}
.coe-gear-ico--slot {
  flex: 1 1 100%;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
}
.coe-gear-ico--md {
  width: 64px;
  height: 64px;
}
.coe-gear-ico--shop {
  width: 72px;
  height: 72px;
  border-radius: 8px;
}
.coe-gear-ico--loot {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  flex-shrink: 0;
}
.coe-gear-ico--plain {
  background: rgba(8, 6, 4, 0.45);
  border: 1px solid rgba(180, 140, 80, 0.45);
  box-shadow: inset 0 0 0 1px rgba(255, 240, 200, 0.06);
}
.coe-gear-ico--plain img {
  width: 78% !important;
  height: 78% !important;
  max-width: none;
  max-height: none;
  object-fit: contain !important;
  filter: none;
}
.coe-gear-ico--gear img {
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  max-height: none;
  object-fit: cover !important;
  border-radius: inherit;
  filter: none;
}
.coe-gear-ico--empty {
  background:
    radial-gradient(90% 70% at 50% 30%, rgba(60, 45, 30, 0.35), transparent 70%),
    rgba(12, 8, 5, 0.55);
  border: 1px dashed rgba(100, 75, 50, 0.45);
  box-shadow: none;
}
.item-card .coe-gear-ico--md {
  margin-bottom: 2px;
}
.loot-drop-line .coe-gear-ico--loot {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
}
.loot-drop-line .coe-gear-ico--gear.coe-gear-ico--loot {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
}
.mob-loot-row .coe-gear-ico--loot {
  flex-shrink: 0;
}
.coe-shop-tile-ico.coe-gear-ico--shop {
  margin-bottom: 2px;
}
.coe-eq-art--empty {
  background:
    radial-gradient(90% 70% at 50% 30%, rgba(60, 45, 30, 0.35), transparent 70%),
    rgba(12, 8, 5, 0.55);
  border: 1px dashed rgba(100, 75, 50, 0.45);
  box-shadow: none;
}
.coe-eq-art img {
  width: 94% !important;
  height: 94% !important;
  max-height: none !important;
  object-fit: contain !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}
.coe-eq-art--gear img {
  filter: none;
}
.coe-inspect-slot .coe-eq-art img {
  flex: 0 0 auto;
}
.coe-inspect-slot .eq-lab {
  display: block !important;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #b89870;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  pointer-events: none;
}
.coe-inspect-slot.filled .eq-lab {
  color: #5a3a18;
}
.coe-inspect-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid #5a3520;
  border-radius: 8px;
  background: rgba(0,0,0,0.28);
  min-width: 168px;
  max-height: min(70vh, 520px);
  overflow: auto;
}
.coe-inspect--clean .coe-inspect-stats,
.coe-char-sheet .coe-inspect-stats {
  max-height: none;
  overflow: visible;
  min-width: 200px;
  scrollbar-width: none;
}
.coe-inspect--clean .coe-inspect-stats::-webkit-scrollbar,
.coe-char-sheet .coe-inspect-stats::-webkit-scrollbar {
  display: none;
}
.coe-gifts-block {
  margin-top: 12px;
  padding: 10px 10px 6px;
  border: 1px solid #5a3520;
  border-radius: 8px;
  background: rgba(0,0,0,0.22);
  clear: both;
}
.coe-gifts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.coe-gift-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.coe-gift-ico {
  position: relative;
  width: 48px;
  height: 48px;
  border: 1px solid #5a3520;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}
.coe-gift-ico img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  image-rendering: auto;
}
.coe-gift-qty {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #8b1a1a;
  color: #ffe8c0;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  border: 1px solid #c44;
}
.coe-gift-from {
  font-size: 10px;
  color: #cbb090;
  text-align: center;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coe-gift-ttl {
  font-size: 9px;
  color: #8a7058;
}
.coe-gifts-empty {
  font-size: 11px;
  color: #8a7058;
  margin-top: 4px;
}
.gift-send-panel .gift-send-preview {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 8px 0 12px;
}
.gift-send-panel .gift-send-preview img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.gift-friend-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow: auto;
  margin-bottom: 10px;
}
.gift-friend-row {
  width: 100%;
  text-align: left;
}

.coe-inspect-stats-title {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a89070;
  margin-bottom: 2px;
}
.coe-inspect-stats .coe-inspect-stats-title:not(:first-child) {
  margin-top: 8px;
}
.coe-inspect-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #c9b48a;
  font-size: 13px;
}
.coe-inspect-row b { color: #ffe8c0; }
.coe-kv-stat-panel {
  background: linear-gradient(165deg, rgba(36, 24, 12, 0.96) 0%, rgba(12, 8, 4, 0.92) 100%);
  border: 1px solid rgba(180, 130, 70, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 160, 0.08),
    0 4px 18px rgba(0, 0, 0, 0.35);
}
.coe-kv-stat-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 4px;
}
.coe-kv-stat-list--card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 0;
  width: 100%;
  min-width: 0;
}
.coe-kv-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: #c9b48a;
  cursor: help;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.coe-kv-stat-row--tile {
  padding: 7px 9px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(100, 70, 40, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.05);
}
.coe-kv-stat-row--tile .coe-kv-stat-label {
  font-size: 12px;
  letter-spacing: 0.01em;
  color: #cbb090;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coe-kv-stat-row--tile .coe-kv-stat-value {
  font-size: 15px;
  font-weight: 800;
  color: #ffe8c0;
  flex: 0 0 auto;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.coe-kv-stat-row--primary {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(90, 53, 32, 0.65);
}
.coe-kv-stat-row--primary .coe-kv-stat-value {
  font-size: 15px;
  font-weight: 800;
  color: #ffe8c0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}
.coe-kv-stat-row--secondary {
  opacity: 0.88;
  font-size: 12px;
  padding: 3px 8px;
}
.coe-kv-stat-label { flex: 1 1 auto; min-width: 0; }
.coe-kv-stat-value {
  font-weight: 700;
  color: #f0d8a8;
  flex: 0 0 auto;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.coe-kv-stat-divider { margin-top: 6px !important; }
.coe-char-sheet .coe-inspect-stats,
.coe-inspect--clean .coe-inspect-stats {
  width: 100%;
  max-width: 176px;
  min-width: 0;
  flex-shrink: 0;
  box-sizing: border-box;
  overflow: hidden;
}
.coe-inspect--clean .coe-inspect-body {
  grid-template-columns: minmax(0, 1fr) minmax(0, 176px) !important;
  align-items: start;
  gap: 10px !important;
}
.coe-inspect--clean .coe-inspect-doll {
  padding: 8px 4px 4px;
  border-radius: 10px;
  background: radial-gradient(ellipse at 50% 80%, rgba(80, 50, 25, 0.35), transparent 70%);
}
/* Информация о персонаже — компактно, как рюкзак */
.coe-inspect.coe-inspect--clean.coe-profile {
  width: min(780px, 96vw) !important;
  max-width: 780px !important;
  padding: 10px 14px 12px !important;
}
.coe-inspect.coe-inspect--clean .coe-inv-topbar--prof {
  margin: 2px 44px 10px 0;
}
.coe-inspect.coe-inspect--clean .coe-inspect-doll {
  padding: 2px 0 0;
  background: transparent;
  gap: 6px;
}
.coe-inspect.coe-inspect--clean .coe-eq-top {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  width: 100%;
  margin-bottom: 6px;
}
.coe-inspect.coe-inspect--clean .coe-eq-top .coe-inspect-slot {
  width: 64px !important;
  height: 64px !important;
  min-height: 64px !important;
  max-width: 64px;
  flex: 0 0 64px;
  justify-content: stretch;
}
.coe-inspect.coe-inspect--clean .coe-eq-mid {
  grid-template-columns: 66px minmax(0, 1fr) 66px !important;
  gap: 8px;
  align-items: start;
}
.coe-inspect.coe-inspect--clean .coe-eq-col {
  gap: 6px;
  align-items: center;
}
.coe-inspect.coe-inspect--clean .coe-eq-col .coe-inspect-slot {
  width: 64px !important;
  height: 64px !important;
  min-height: 64px !important;
  max-width: 64px;
  justify-content: stretch;
}
.coe-inspect.coe-inspect--clean .coe-doll {
  height: 248px;
  min-height: 200px;
  border-radius: 10px;
}
.coe-inspect.coe-inspect--clean .coe-inspect-body {
  grid-template-columns: minmax(0, 1fr) minmax(142px, 162px) !important;
  gap: 10px !important;
}
.coe-inspect.coe-inspect--clean .coe-char-sheet .coe-inspect-stats,
.coe-inspect.coe-inspect--clean .coe-inspect-stats {
  max-width: 162px;
  padding: 8px 9px 10px;
  border: 2px solid rgba(130, 92, 48, 0.75);
  border-radius: 10px;
  background: linear-gradient(165deg, rgba(52, 34, 18, 0.96), rgba(24, 14, 8, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.07);
}
.coe-inspect.coe-inspect--clean .coe-inspect-stats-title {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  color: #b8a088;
}
.coe-inspect.coe-inspect--clean .coe-kv-stat-list--card {
  gap: 3px;
}
.coe-inspect.coe-inspect--clean .coe-kv-stat-row--tile {
  padding: 4px 7px;
  border-radius: 7px;
  border-color: rgba(90, 53, 32, 0.5);
  background: rgba(0, 0, 0, 0.22);
}
.coe-inspect.coe-inspect--clean .coe-kv-stat-row--tile .coe-kv-stat-label {
  font-size: 11px;
  font-weight: 400;
  color: #b8a890;
}
.coe-inspect.coe-inspect--clean .coe-kv-stat-row--tile .coe-kv-stat-value {
  font-size: 13px;
  font-weight: 500;
  color: #ecd8b8;
  text-shadow: none;
}
.coe-inspect.coe-inspect--clean .coe-inspect-slot .eq-lab {
  display: none !important;
}
.coe-inspect.coe-inspect--clean .coe-inspect-slot .coe-eq-art {
  flex: 1 1 100%;
  height: 100%;
}
.coe-inspect.coe-inspect--clean .coe-inspect-slot .coe-eq-art img {
  width: 88% !important;
  height: 88% !important;
}
.coe-inspect.coe-inspect--clean .coe-gifts-block--dock {
  min-height: 76px;
  padding: 6px 8px 8px;
  border-color: rgba(120, 80, 45, 0.55);
  border-radius: 10px;
}
.coe-inspect.coe-inspect--clean .coe-gifts-dock-head {
  font-size: 11px;
  font-weight: 500;
}
.coe-inspect.coe-inspect--clean .coe-gifts-grid--dock {
  gap: 6px;
}
.coe-inspect.coe-inspect--clean .coe-gift-ico {
  width: 40px;
  height: 40px;
}
.coe-inspect.coe-inspect--clean .coe-gift-ico img {
  width: 34px;
  height: 34px;
}
.coe-inspect.coe-inspect--clean .coe-pvp-kills--compact {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 400;
}
.coe-doll--sheet {
  overflow: hidden;
}
.coe-doll--sheet .kv-doll-canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
}
.coe-inspect-slot {
  position: relative;
}
.coe-inspect-slot .coe-slot-cap {
  position: relative;
  flex: 0 0 auto;
  left: auto;
  right: auto;
  bottom: auto;
  margin-top: 2px;
  padding: 2px 3px;
  font-size: 8px;
  line-height: 1.1;
  text-align: center;
  color: #e8d4b0;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 0 0 6px 6px;
  pointer-events: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coe-inspect-slot:not(.filled) .coe-slot-cap {
  color: #8a7058;
  background: rgba(0, 0, 0, 0.45);
  font-size: 9px;
}
.coe-inv-v2 .coe-slot-cap {
  position: relative;
  flex: 0 0 auto;
  left: auto;
  right: auto;
  bottom: auto;
  margin-top: 2px;
  padding: 2px 3px;
  font-size: 8px;
  line-height: 1.1;
  text-align: center;
  color: #e8d4b0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
  border-radius: 0 0 7px 7px;
  pointer-events: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coe-inv-v2 .coe-slot-cap--empty {
  position: static;
  background: transparent;
  color: #8a7058;
  font-size: 9px;
  padding: 4px 2px;
}
.coe-inv-v2 .coe-inv-slot {
  position: relative;
  padding-bottom: 3px !important;
}
.coe-inv-v2 .coe-eq-art img {
  width: 90% !important;
  height: 90% !important;
  max-height: none !important;
  object-fit: contain !important;
}
.coe-mod-fold {
  margin: 0 0 8px;
  border: 1px solid rgba(100, 150, 200, 0.35);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}
.coe-mod-fold summary {
  cursor: pointer;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #b8c8e0;
  list-style: none;
}
.coe-mod-fold summary::-webkit-details-marker { display: none; }
.coe-mod-fold .coe-inspect-staff-bar {
  margin: 0;
  border: none;
  border-radius: 0 0 8px 8px;
}
.coe-gifts-block--compact {
  margin-top: 10px;
  padding: 8px;
}
.coe-pvp-kills--compact {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(90, 53, 32, 0.5);
}
.coe-profile-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}
.coe-profile-head-row .coe-profile-name { flex: 1; min-width: 0; }
.coe-inspect-worn-row span { color: #9a8468; }
.coe-inspect-worn-row b {
  font-size: 12px;
  text-align: right;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coe-inspect .coe-profile-close {
  z-index: 5;
}
html.is-mobile .coe-inspect-body { grid-template-columns: 1fr !important; }
html.is-mobile .coe-inspect-stats { order: -1; min-width: 0; }
html.is-mobile .coe-inspect .coe-eq-mid { grid-template-columns: 56px minmax(0, 1fr) 56px; }
html.is-mobile .coe-inspect .coe-doll { height: 200px; min-height: 160px; }
html.is-mobile .coe-inspect-title .coe-profile-name { max-width: min(100%, 200px); }
html.is-mobile .coe-chip--rank span { max-width: 120px; }

/* legacy face inspect (unused) */
.coe-inspect-face {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}
.coe-inspect-face img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}
.coe-pvp-kills {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(90, 53, 32, 0.85);
}
.coe-pvp-kills-line {
  font-size: 13px;
  color: #c9b48a;
}
.coe-pvp-kills-line b {
  color: #ffe8c0;
  font-weight: 700;
  margin-left: 4px;
}
.coe-pvp-kills-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.coe-pvp-kills-title {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a89070;
}
.coe-pvp-kills-total {
  min-width: 28px;
  height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #2a180c;
  background: linear-gradient(180deg, #f0d4a0, #c9a06a);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}
.coe-pvp-kills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.coe-pvp-kill-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid rgba(70, 42, 24, 0.9);
  background: rgba(12, 8, 6, 0.45);
}
.coe-pvp-kill-pill img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.55));
}
.coe-pvp-kill-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}
.coe-pvp-kill-label {
  font-size: 10px;
  color: #9a8468;
}
.coe-pvp-kill-pill b {
  font-size: 16px;
  color: #ffe8c0;
  font-variant-numeric: tabular-nums;
}
.coe-pvp-kill-pill.north.accent {
  border-color: rgba(120, 170, 210, 0.45);
  background: linear-gradient(160deg, rgba(40, 70, 100, 0.35), rgba(12, 8, 6, 0.5));
}
.coe-pvp-kill-pill.south.accent {
  border-color: rgba(210, 110, 70, 0.5);
  background: linear-gradient(160deg, rgba(100, 45, 28, 0.4), rgba(12, 8, 6, 0.5));
}
.coe-inspect .coe-profile-name .coe-lv {
  display: inline-flex !important;
}
html.is-mobile .coe-inspect-body { grid-template-columns: 1fr !important; }
html.is-mobile .coe-profile-body { grid-template-columns: 1fr; }
html.is-mobile .coe-doll-wrap { grid-template-columns: 28px 1fr; }
html.is-mobile .coe-eq-mid { grid-template-columns: 44px 1fr 44px; }
html.is-mobile .coe-eq-slot { width: 44px; height: 44px; }
html.is-mobile .coe-eq-slot--mini { width: 30px; height: 30px; }
html.is-mobile .coe-inv-slot.coe-eq-slot--mini {
  width: 42px !important;
  min-height: 42px;
}
html.is-mobile .coe-inv-slot.coe-eq-slot--mini img {
  max-height: 28px;
}
html.is-mobile .coe-inspect .coe-eq-mid {
  grid-template-columns: 56px minmax(0, 1fr) 56px;
}
html.is-mobile .coe-inspect-slot img {
  max-height: 32px;
}
html.is-mobile .coe-pack-grid { grid-template-columns: repeat(5, 1fr); }

/* ÐÐ¾ÑÑÑÐµÑ: ÑÑÐµÐ½Ð° Ð½Ð° Ð²ÐµÑÑ mid-ÑÑÐ´, ÑÐ°Ñ ÑÐ¾Ð½ÐºÐ¸Ð¹ (golden Ð¿ÐµÑÐµÐ±Ð¸Ð²Ð°ÐµÑ --chat-h) */
html.is-mobile .coe-theme-golden {
  --hud-h: 56px;
  --chat-h: 188px;
  --rail-w: 0px;
}
html.is-mobile #app:has(#gameChat:not(.collapsed)) {
  --chat-h: 188px;
}
html.is-mobile #app:has(#gameChat.collapsed) {
  --chat-h: 40px;
}
html.is-mobile #app.combat-active.coe-theme-golden {
  --chat-h: 180px;
}
html.is-mobile #app.combat-active:has(#gameChat:not(.collapsed)) {
  --chat-h: 180px;
}
html.is-mobile #app.combat-active:has(#gameChat.collapsed) {
  --chat-h: 36px;
}
/* ÐÐ° Ð¼Ð¾Ð±Ð¸Ð»ÐºÐµ Ð¼Ð¾Ð¶Ð½Ð¾ ÑÐ²ÐµÑÐ½ÑÑÑ ÑÐ°Ñ (Ð¾ÑÐ²Ð¾Ð±Ð¾Ð¶Ð´Ð°ÐµÑ ÑÑÐµÐ½Ñ) */
html.is-mobile #gameChat.coe-chat.collapsed .chat-body {
  display: none !important;
}
html.is-mobile #gameChat.coe-chat.collapsed {
  --chat-h: 36px;
}

html.is-mobile #gameChat.coe-chat,
html.is-mobile #gameChat.fantasy-frame {
  position: relative !important;
  inset: auto !important;
  width: auto !important;
  height: auto !important;
  max-height: none !important;
  margin: 2px 4px 2px !important;
}

html.is-mobile #app.combat-active.coe-theme-golden .play-shell {
  display: grid !important;
  grid-template-columns: 1fr !important;
  align-items: center !important;
  justify-content: stretch !important;
  margin: 0 2px !important;
  min-height: 0 !important;
  height: 100%;
  background: #0a0604;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

html.is-mobile #app.combat-active #stage,
html.is-mobile #app.combat-active.coe-theme-golden #stage {
  aspect-ratio: 990 / 454 !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: none !important;
  min-height: 38vh !important;
  margin: 0 auto !important;
  border-radius: 0 !important;
  touch-action: pan-x pan-y pinch-zoom;
}

/* Ð Ð±Ð¾Ñ ÑÐµÐ»ÑÑÑ Ð½Ðµ Ð¿ÐµÑÐµÐºÑÑÐ²Ð°ÑÑ ÑÑÐµÐ½Ñ */
html.is-mobile #app.combat-active .rail-residents,
html.is-mobile #app.combat-active .rail-quests {
  display: none !important;
}

/* ÐÐ»Ð°Ð²Ð¸Ð°ÑÑÑÐ°: ÑÐ°Ñ Ð¿Ð¾Ð´Ð½Ð¸Ð¼Ð°ÐµÑÑÑ, Ð½Ðµ Ð¿ÐµÑÐµÐºÑÑÐ²Ð°ÐµÑ Ð²Ð²Ð¾Ð´ */
html.is-mobile.kbd-open {
  --chat-h: min(42vh, 240px);
}
html.is-mobile.kbd-open #gameChat.coe-chat,
html.is-mobile.kbd-open #gameChat.fantasy-frame {
  position: fixed !important;
  left: 4px !important;
  right: 4px !important;
  bottom: calc(var(--keyboard-offset, 0px) + var(--safe-bottom, 0px)) !important;
  top: auto !important;
  z-index: 90 !important;
  max-height: min(46vh, 280px) !important;
  margin: 0 !important;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.45);
}
html.is-mobile.kbd-open .rail-residents,
html.is-mobile.kbd-open .rail-quests {
  display: none !important;
}
html.is-mobile .overlay {
  padding-bottom: calc(12px + var(--keyboard-offset, 0px) + var(--safe-bottom, 0px));
}
html.is-mobile .chat-mod-menu,
html.is-mobile .mod-ban-panel {
  max-width: min(440px, 96vw);
  max-height: min(86vh, 640px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

html.is-mobile #app.combat-active #gameCanvas,
html.is-mobile #app.combat-active.coe-theme-golden #gameCanvas {
  width: 100% !important;
  height: 100% !important;
  touch-action: pan-x pan-y pinch-zoom;
  transform-origin: center center;
}

html.is-mobile .combat-belt-oval {
  width: 52px !important;
  z-index: 30;
}
html.is-mobile .combat-belt-links { opacity: 0.4; }
html.is-mobile .combat-belt-slot {
  width: 30px !important;
  height: 30px !important;
  border-width: 1.5px;
}
html.is-mobile .combat-belt-slot.shape-square,
html.is-mobile .combat-belt-slot.is-backpack {
  width: 34px !important;
  height: 34px !important;
}

html.is-mobile .coe-hud-minimal {
  padding: 4px 4px !important;
  gap: 4px !important;
}
html.is-mobile .coe-hud-minimal .coe-iconbar {
  gap: 4px !important;
  justify-content: flex-end !important;
  overflow-x: auto !important;
  min-width: 0;
  flex: 0 1 auto !important;
  border-left: none !important;
  box-shadow: none !important;
  padding-left: 0 !important;
}
html.is-mobile .coe-hud-left {
  flex: 1 1 auto;
  min-width: 0;
}
html.is-mobile .coe-hud-minimal .coe-iconbar .hud-exit-ico {
  flex: 0 0 42px !important;
  width: 42px !important;
  height: 42px !important;
}

html.is-mobile .party-ready-box {
  top: auto !important;
  bottom: 19% !important;
  left: 4px !important;
  transform: none !important;
  max-width: min(220px, 58vw) !important;
  padding: 5px 7px !important;
}
html.is-mobile .party-ready-box .btn {
  padding: 10px 8px !important;
  font-size: 14px !important;
}
html.is-mobile .toast {
  left: 50%;
  transform: translateX(-50%);
  max-width: 92vw;
  bottom: calc(var(--chat-h, 44px) + 20px + var(--safe-bottom));
}

html.is-mobile .coe-inspect-body { grid-template-columns: 1fr !important; }
html.is-mobile .coe-profile-body { grid-template-columns: 1fr; }
html.is-mobile .coe-doll-wrap { grid-template-columns: 28px 1fr; }
html.is-mobile .coe-eq-mid { grid-template-columns: 44px 1fr 44px; }
html.is-mobile .coe-eq-slot { width: 44px; height: 44px; }
html.is-mobile .coe-eq-slot--mini { width: 30px; height: 30px; }
html.is-mobile .coe-inv-slot.coe-eq-slot--mini {
  width: 42px !important;
  min-height: 42px;
}
html.is-mobile .coe-pack-grid { grid-template-columns: repeat(5, 1fr); }

/* Mobile: смайлы только пикером по ☺ */
html.is-mobile .coe-chat .chat-emote-emoji,
html.is-mobile .coe-chat .emote-emoji {
  font-size: 18px !important;
  line-height: 1.1 !important;
}
html.is-mobile .coe-chat .chat-emote-popover {
  max-height: min(38vh, 220px) !important;
  bottom: 48px !important;
}
html.is-mobile .coe-chat .chat-body {
  display: flex !important;
  flex-direction: column !important;
}
html.is-mobile .coe-chat .chat-log {
  order: 1;
  flex: 1 1 auto !important;
  max-height: none !important;
  min-height: 120px !important;
}
html.is-mobile .coe-chat .chat-form {
  order: 3;
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 2;
  background: inherit;
}
html.is-mobile .coe-chat .chat-emote-toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #8a6830;
  background: rgba(255, 248, 220, 0.7);
  color: #3a2410;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
html.is-mobile .coe-chat .chat-emote-toggle.on {
  background: #f0d080;
  border-color: #6a4820;
}
html.is-mobile .coe-chat .emote-btn {
  width: 36px !important;
  height: 36px !important;
}
html.is-mobile .coe-chat .emote-btn img,
html.is-mobile .coe-chat .emote-kolobok,
html.is-mobile .coe-chat .chat-emote,
html.is-mobile .coe-chat .chat-emote-img {
  width: 28px !important;
  height: 28px !important;
  object-fit: contain !important;
}

.atk-nick-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
  margin: 10px 0 14px;
}
.atk-nick-row {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
}

/* Кнопка ☺ видна везде — открывает пикер */
.coe-chat .chat-emote-toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(201, 160, 80, 0.55);
  background: linear-gradient(180deg, #3a2a18, #1e140c);
  color: #f0dcb0;
  font-size: 18px;
  cursor: pointer;
}
.coe-chat .chat-emote-toggle.on {
  background: linear-gradient(180deg, #5a4020, #3a2810);
  border-color: #e8c060;
  color: #ffe8a0;
}

/* ÐÐ¾Ð±Ð¸Ð»ÐºÐ°: ÐºÐ½Ð¾Ð¿ÐºÐ° Ð¾ÑÐºÑÑÑÐ¸Ñ Ð·Ð°Ð´Ð°Ð½Ð¸Ð¹/Ð¿ÐµÑÐµÑÐ¾Ð´Ð¾Ð² */
.quests-open-fab {
  display: none;
  position: fixed;
  top: calc(var(--hud-h, 56px) + 8px + var(--safe-top, 0px));
  left: 8px;
  z-index: 55;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 2px solid #8a6830;
  background: linear-gradient(180deg, #f6e2a8, #c9a050);
  color: #3a2410;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
html.is-mobile .quests-open-fab.is-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.residents-open-fab {
  display: none;
  position: fixed;
  top: calc(var(--hud-h, 56px) + 8px + var(--safe-top, 0px));
  right: 8px;
  z-index: 55;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 2px solid #8a6830;
  background: linear-gradient(180deg, #f6e2a8, #c9a050);
  color: #3a2410;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
html.is-mobile .residents-open-fab.is-visible,
html.is-desktop .residents-open-fab.is-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
html.is-mobile .rail-residents {
  pointer-events: auto;
}
html.is-mobile .rail-residents.collapsed {
  max-height: none;
  width: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
html.is-mobile .rail-residents.collapsed .rail-head,
html.is-mobile .rail-residents.collapsed .rail-tabs,
html.is-mobile .rail-residents.collapsed .rail-body {
  display: none !important;
}
/* ÐÐ¾Ð±Ð¸Ð»ÐºÐ°: Ð¼ÐµÐ½ÑÑÐµ blur/Ð°Ð½Ð¸Ð¼Ð°ÑÐ¸Ð¹ â Ð¼ÐµÐ½ÑÑÐµ Ð»Ð°Ð³Ð¾Ð² Ð¿Ð¾ÑÐ»Ðµ Ð±Ð¾Ñ */
html.is-mobile .overlay,
html.is-mobile .fantasy-frame {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html.is-mobile .coe-chat .chat-log {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
html.is-mobile .rail-quests-close {
  width: 32px;
  height: 32px;
  top: 6px;
  right: 6px;
  font-size: 20px;
  line-height: 28px;
  border-width: 2px;
  z-index: 8;
}
html.is-mobile .rail-quests {
  padding-top: 4px;
}

/* ========== Level ring: Ð²Ð¾Ð´Ð° ÑÐ½Ð¸Ð·Ñ Ð²Ð²ÐµÑÑ ========== */
.coe-level-ring {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  margin: 0 6px 0 2px;
  align-self: center;
}
.coe-level-bowl {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 35% 30%, #3a2818 0%, #1a1008 70%);
  border: 2px solid rgba(255, 220, 160, 0.55);
  box-shadow: inset 0 0 8px rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.45);
}
.coe-level-liquid {
  position: absolute;
  left: -15%;
  right: -15%;
  bottom: 0;
  height: 0%;
  background:
    linear-gradient(180deg, rgba(160,230,255,.55) 0%, transparent 18%),
    linear-gradient(180deg, #7ed0ff 0%, #3a9be8 42%, #1e6fb8 100%);
  transition: height 0.55s cubic-bezier(.22,.8,.2,1);
  box-shadow: inset 0 2px 8px rgba(255,255,255,.4), inset 0 -4px 10px rgba(0,40,80,.25);
  border-radius: 40% 40% 0 0 / 12% 12% 0 0;
}
.coe-level-liquid.full {
  background: linear-gradient(180deg, #ffe08a 0%, #e0a030 50%, #b87810 100%);
  border-radius: 0;
  box-shadow: inset 0 0 10px rgba(255,240,180,.45);
}
.coe-level-wave {
  position: absolute;
  left: -25%;
  width: 150%;
  height: 10px;
  bottom: 0;
  margin-bottom: -5px;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(200,240,255,.95) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 50%, rgba(140,210,255,.85) 0%, transparent 50%);
  opacity: 0.9;
  animation: coeLevelWave 1.8s ease-in-out infinite;
  pointer-events: none;
  transition: bottom 0.55s cubic-bezier(.22,.8,.2,1), opacity .3s;
  filter: blur(0.2px);
}
@keyframes coeLevelWave {
  0%, 100% { transform: translateX(-6%) scaleY(1); }
  50% { transform: translateX(6%) scaleY(1.35); }
}
.coe-level-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff8e8;
  text-shadow: 0 1px 3px #000, 0 0 6px rgba(0,0,0,.6);
  pointer-events: none;
  z-index: 1;
}
.coe-hud-bars .coe-hbar > b,
.coe-hud-bars .coe-hbar > span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 500 !important;
  color: #fff8e8;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
}

.right-rail.kv-rail {
  background: transparent;
  gap: 6px;
  padding: 4px 4px 4px 0;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.kv-rail .rail-panel {
  background: linear-gradient(180deg, #e8d4a8 0%, #d4bc8c 55%, #c4a878 100%);
  border: 2px solid #8a6838;
  border-radius: 6px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 240, 200, 0.35),
    0 3px 10px rgba(0, 0, 0, 0.35);
  color: #3a2814;
  overflow: hidden;
}
.kv-rail .rail-quests {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
}
.kv-rail .rail-quests-close,
.kv-rail .rail-residents-toggle {
  background: transparent;
  border: none;
  color: #6a4a28;
  font-weight: 500;
  font-size: 16px;
  width: 22px;
  height: 22px;
  top: 4px;
  right: 4px;
}
.kv-rail .rail-tabs {
  background: linear-gradient(180deg, #d8c090, #c4a870);
  border-bottom: 1px solid #9a7840;
  padding: 2px 4px;
  gap: 2px;
  align-items: center;
}
.kv-rail .rail-tab {
  font-weight: 500 !important;
  font-size: 12px;
  color: #5a4020;
  text-shadow: none;
  text-transform: none;
  letter-spacing: 0;
  padding: 6px 8px;
}
.kv-rail .rail-tab.on {
  background: linear-gradient(180deg, #f0e0b8, #e0c890);
  border-color: #a88448;
  color: #3a2410;
  box-shadow: none;
  font-weight: 600 !important;
}
.kv-rail .rail-body {
  background: linear-gradient(180deg, #efe0b8, #ddc898);
  color: #3a2814;
}
.kv-rail .residents-list .online-row {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(120, 90, 40, 0.2);
  padding: 4px 6px;
  font-weight: 400;
  color: #2e1c0c;
}
.kv-rail .chat-nick-btn {
  font-weight: 500 !important;
  background: transparent !important;
  border: none !important;
  padding: 0 2px !important;
  font-size: 12px;
}
.kv-rail .nick-south { color: #b03020 !important; }
.kv-rail .nick-north { color: #2060b0 !important; }
.kv-rail .nick-enemy { color: #a01818 !important; }
.kv-rail .peer-tag.enemy {
  font-size: 10px;
  font-weight: 500;
  color: #8a2010;
  margin-left: 4px;
  opacity: 0.9;
}
.kv-rail .peer-lvl {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: #6a5030;
  min-width: 18px;
  text-align: right;
}
.kv-rail .peer-loc {
  font-size: 10px;
  color: #7a6040;
  margin-left: 4px;
  font-weight: 400;
}
.kv-rail .online-row.is-enemy {
  background: rgba(180, 40, 20, 0.08);
}
.kv-rail .atk-sword-btn {
  background: transparent;
  border: none;
  color: #8a3018;
  font-size: 13px;
  cursor: pointer;
  padding: 0 4px;
  margin-left: 2px;
}
.kv-rail .residents-meta {
  color: #5a4028;
  font-weight: 400;
  font-size: 11px;
  border-top-color: rgba(120, 90, 40, 0.25);
}

/* Quest tracker â Ð¼ÑÐ³ÐºÐ¸Ð¹ ÑÐ¿Ð¸ÑÐ¾Ðº */
.kv-rail .quest-tracker {
  background: transparent !important;
  color: #3a2814 !important;
  max-height: min(40vh, 260px);
  padding: 8px 10px !important;
  font-weight: 400 !important;
}
.kv-rail .quest-tracker b,
.kv-rail .quest-tracker strong {
  font-weight: 500 !important;
  color: inherit !important;
}
.qt-sec { margin-bottom: 12px; }
.qt-sec-title {
  font-size: 11px;
  font-weight: 700 !important;
  color: #6a4a22;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(120, 90, 40, 0.22);
}
.qt-links { display: flex; flex-direction: column; gap: 6px; }
.qt-ico { display: none; }
.qt-muted {
  font-size: 11px;
  color: #7a6040;
  font-weight: 400;
  margin-top: 4px;
  line-height: 1.3;
}
.qt-mob-row {
  font-size: 12px;
  font-weight: 600;
  color: #3d2810;
  padding: 5px 8px;
  margin: 0 0 4px;
  background: rgba(255, 252, 240, 0.85);
  border-radius: 6px;
  border: 1px solid rgba(120, 90, 40, 0.18);
}
.qt-item,
.qt-card {
  padding: 9px 10px;
  margin: 0 0 8px !important;
  background: rgba(255, 252, 240, 0.9) !important;
  border: 1px solid rgba(120, 90, 40, 0.28) !important;
  border-left: 3px solid #c9a050 !important;
  border-radius: 8px !important;
}
.qt-item-title {
  font-size: 13px;
  font-weight: 700 !important;
  color: #3a2410;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}
.qt-mark {
  color: #c04020;
  font-weight: 700;
  font-size: 12px;
}
.qt-item.ready .qt-mark { color: #2a8a30; }
.qt-item-body {
  font-size: 12px;
  font-weight: 500 !important;
  color: #4a3420;
  line-height: 1.35;
}
.qt-item-prog {
  font-size: 11px;
  color: #6a5030;
  margin-top: 6px;
  font-weight: 700;
}
.qt-claim {
  margin-top: 5px;
  background: linear-gradient(180deg, #c9a050, #8a6830) !important;
  border: 1px solid #6a4820 !important;
  color: #fff8e0 !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  padding: 4px 8px !important;
  border-radius: 4px;
  cursor: pointer;
}

/* Chat bottom â ÐºÐ°Ðº ÑÐµÑÐµÑÐµÐ½Ñ */
#gameChat.coe-chat {
  border: 2px solid #8a6838 !important;
  background: linear-gradient(180deg, #e8d4a8, #d4bc8c) !important;
  color: #2e1c0c !important;
  box-shadow: inset 0 0 0 1px rgba(255,240,200,.3), 0 2px 8px rgba(0,0,0,.35) !important;
}
.coe-chat .chat-head {
  background: linear-gradient(180deg, #d8c090, #c4a870) !important;
  border-bottom: 1px solid #9a7840 !important;
  color: #3a2814 !important;
  text-shadow: none !important;
  font-weight: 500 !important;
  padding: 3px 6px !important;
}
.coe-chat .chat-tab {
  font-weight: 500 !important;
  color: #5a4020 !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  padding: 5px 12px !important;
  font-size: 12px !important;
}
.coe-chat .chat-tab.on {
  background: linear-gradient(180deg, #f0e0b8, #e0c890) !important;
  border-color: #a88448 !important;
  color: #2e1c0c !important;
  box-shadow: none !important;
  font-weight: 600 !important;
}
.coe-chat .chat-tab.party-on {
  color: #2a5a18 !important;
  border-color: #6a8a40 !important;
}
.kv-rail .party-panel {
  margin: 4px 4px 8px;
  padding: 7px 8px 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, #efe0b8, #d8c090);
  border: 1px solid #a07a38;
  box-shadow: inset 0 1px 0 rgba(255, 250, 230, 0.55);
  color: #2e1c0c;
}
.kv-rail .party-title { color: #5a3010; }
.kv-rail .party-bonus { color: #2a6418; }
.kv-rail .party-btn {
  background: #efe4c0;
  color: #3a2410;
  border-color: #a07a38;
}
.kv-rail .party-btn.danger { color: #7a2010; border-color: #b06040; }
.kv-rail .party-member.is-leader .party-nick { color: #7a4a10; }
.kv-rail .party-hint { color: #5a4020; }
.coe-chat .chat-body {
  background: linear-gradient(180deg, #efe0b8, #ddc898) !important;
}
.coe-chat .chat-log {
  background: transparent !important;
  color: #2e1c0c !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.4;
}
.coe-chat .chat-line {
  font-weight: 400 !important;
  color: #2e1c0c;
  padding: 1px 6px;
}
.coe-chat .chat-line.sys {
  color: #6a5030 !important;
  font-weight: 400 !important;
  font-style: italic;
}
.coe-chat .chat-line b,
.coe-chat .chat-nick-btn {
  font-weight: 500 !important;
}
.coe-chat .chat-ch {
  font-weight: 500 !important;
  background: rgba(120, 90, 40, 0.15);
  color: #5a4020;
  border-color: rgba(120, 90, 40, 0.25);
}
.coe-chat .chat-time {
  font-size: 10px;
  font-weight: 500;
  color: #7a6040;
  margin-right: 4px;
  white-space: nowrap;
  opacity: 0.9;
}
.coe-chat .chat-form {
  background: rgba(255, 248, 220, 0.35);
  border-top: 1px solid rgba(120, 90, 40, 0.3);
  padding: 4px 6px;
  gap: 4px;
}
.coe-chat #chatInput {
  background: rgba(255, 252, 240, 0.85) !important;
  border: 1px solid #a88448 !important;
  color: #2e1c0c !important;
  font-weight: 400 !important;
  border-radius: 4px;
  padding: 5px 8px;
}
.coe-chat .chat-send {
  background: linear-gradient(180deg, #c9a050, #8a6830);
  border: 1px solid #6a4820;
  color: #fff8e0;
  font-weight: 500;
  border-radius: 4px;
  padding: 4px 12px;
  cursor: pointer;
}
.coe-chat .chat-channel-meta { display: none !important; }

/* ===== coe515: Ð¿ÐµÑÐ³Ð°Ð¼ÐµÐ½Ñ ÑÐ¸ÑÐ°ÐµÐ¼ÑÐ¹ + ÑÐ°Ñ ÑÐ¸ÐºÑÐ¸ÑÐ¾Ð²Ð°Ð½Ð½Ð¾Ð¹ Ð²ÑÑÐ¾ÑÑ ===== */
body.coe-theme-golden .right-rail.kv-rail .rail-panel,
body.fac-south .right-rail.kv-rail .rail-panel,
body.fac-north .right-rail.kv-rail .rail-panel,
.right-rail.kv-rail .rail-panel {
  background: linear-gradient(180deg, #f6ebd0 0%, #ead6a8 55%, #d8bc82 100%) !important;
  border: 2px solid #8a6838 !important;
  color: #1a1008 !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 245, 210, 0.55),
    0 3px 10px rgba(0, 0, 0, 0.3) !important;
}

body.coe-theme-golden .right-rail.kv-rail .quest-tracker,
body.fac-south .right-rail.kv-rail .quest-tracker,
.right-rail.kv-rail .quest-tracker,
.kv-rail .quest-tracker {
  background: #f3e6c0 !important;
  color: #1a1008 !important;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  height: 100%;
  padding: 8px 10px 10px !important;
  overflow: auto;
}
body.coe-theme-golden .right-rail.kv-rail .quest-tracker > .qt-sec,
body.coe-theme-golden .right-rail.kv-rail .quest-tracker .qt-sec,
.right-rail.kv-rail .quest-tracker > .qt-sec,
.right-rail.kv-rail .quest-tracker .qt-sec {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #1a1008 !important;
  padding: 0 !important;
  margin: 0 0 12px !important;
}
.kv-rail .qt-sec { margin-bottom: 8px !important; }
.kv-rail .qt-travel {
  position: relative !important;
  top: auto !important;
  z-index: auto !important;
  margin-bottom: 8px !important;
  padding: 0 0 8px !important;
  background: transparent !important;
  border-bottom: 1px solid rgba(90, 60, 20, 0.18);
}
.kv-rail .qt-sec-title {
  display: block !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #6a4a22 !important;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 5px !important;
  padding-bottom: 3px !important;
  border-bottom: 1px solid rgba(90, 60, 20, 0.2);
}
.kv-rail .qt-links {
  display: flex !important;
  flex-direction: column;
  gap: 4px;
  visibility: visible !important;
}
.kv-rail .qt-links,
.kv-rail .qt-travel,
.rail-quests,
#questTracker {
  pointer-events: auto !important;
}

/* ????? ? ?? ??????, ??? ????-??????? */
body.coe-theme-golden .right-rail.kv-rail .quest-tracker button.qt-map-btn,
.right-rail.kv-rail .quest-tracker button.qt-map-btn,
.kv-rail .qt-map-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 1px !important;
  width: 100% !important;
  margin: 0 0 5px !important;
  padding: 5px 8px !important;
  background: linear-gradient(180deg, #fff9ec, #f0dfa8) !important;
  border: 1px solid rgba(130, 95, 40, 0.38) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset !important;
  border-radius: 7px !important;
  cursor: pointer;
  text-decoration: none !important;
  min-height: 0 !important;
}
.kv-rail .qt-map-btn:hover {
  background: linear-gradient(180deg, #fffcef, #f6e8b4) !important;
}
.kv-rail .qt-map-compass { display: none !important; }
.kv-rail .qt-map-title {
  color: #2a1808 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}
.kv-rail .qt-map-here {
  color: #7a5a30 !important;
  font-size: 10px !important;
  font-weight: 500 !important;
}

/* ??????? ? ????????? ??????, ??? ??????? ? ????? ?????? */
body.coe-theme-golden .right-rail.kv-rail .quest-tracker button.qt-link,
body.coe-theme-golden .right-rail.kv-rail .quest-tracker button.qt-dest,
.right-rail.kv-rail .quest-tracker button.qt-link,
.right-rail.kv-rail .quest-tracker button.qt-dest,
.kv-rail .qt-link,
.kv-rail .qt-dest {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  visibility: visible !important;
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(180deg, #fff9ec, #f0dfa8) !important;
  border: 1px solid rgba(130, 95, 40, 0.38) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 1px 2px rgba(50, 30, 8, 0.1) !important;
  color: #1f1408 !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  text-align: center !important;
  text-decoration: none !important;
  padding: 6px 8px !important;
  line-height: 1.2;
  cursor: pointer;
  border-radius: 7px !important;
  min-height: 28px;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: relative;
  z-index: 6;
}
.right-rail.kv-rail .quest-tracker button.qt-link:hover,
.right-rail.kv-rail .quest-tracker button.qt-dest:hover,
.kv-rail .qt-link:hover,
.kv-rail .qt-dest:hover {
  background: linear-gradient(180deg, #fffcef, #f6e8b4) !important;
  border-color: rgba(150, 105, 35, 0.55) !important;
  color: #120c06 !important;
  text-decoration: none !important;
}
.right-rail.kv-rail .quest-tracker button.qt-link.locked,
.right-rail.kv-rail .quest-tracker button.qt-dest.locked,
.kv-rail .qt-link.locked,
.kv-rail .qt-dest.locked {
  color: #6a5030 !important;
  border-color: rgba(140, 110, 60, 0.35) !important;
  background: rgba(230, 210, 170, 0.65) !important;
  text-decoration: none !important;
  opacity: 0.65 !important;
  cursor: default;
}
.kv-rail .qt-travel-ico { display: none !important; }

/* ??????? ? ?????????? ????????-????? */
body.coe-theme-golden .right-rail.kv-rail .quest-tracker .qt-item,
body.coe-theme-golden .right-rail.kv-rail .quest-tracker .qt-card,
.right-rail.kv-rail .quest-tracker .qt-item,
.right-rail.kv-rail .quest-tracker .qt-card,
.kv-rail .qt-item,
.kv-rail .qt-card {
  display: block !important;
  position: relative !important;
  z-index: 0 !important;
  margin: 0 0 6px !important;
  padding: 7px 8px 8px !important;
  background: rgba(255, 252, 240, 0.95) !important;
  border: 1px solid rgba(120, 90, 40, 0.28) !important;
  border-left: 3px solid #c9a050 !important;
  border-radius: 7px !important;
  box-shadow: 0 1px 2px rgba(40, 25, 8, 0.08) !important;
}
.kv-rail .qt-item.active,
.kv-rail .qt-card.active {
  border-left-color: #b87820 !important;
}
.kv-rail .qt-item.available,
.kv-rail .qt-card.available {
  border-left-color: #d4a020 !important;
  background: rgba(255, 248, 220, 0.95) !important;
}
.kv-rail .qt-item.ready,
.kv-rail .qt-card.ready {
  border-left-color: #2f9a40 !important;
  background: rgba(220, 240, 210, 0.9) !important;
}
.kv-rail .qt-item-title,
.kv-rail .qt-item-body,
.kv-rail .qt-item-prog,
.kv-rail .qt-muted,
.kv-rail .qt-mark {
  color: #1a1008 !important;
}
.kv-rail .qt-item-title {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #1a1008 !important;
  margin-bottom: 2px !important;
  display: flex !important;
  align-items: center;
  gap: 5px;
}
.kv-rail .qt-item-body {
  font-size: 11px !important;
  font-weight: 500 !important;
  color: #3a2814 !important;
  line-height: 1.3 !important;
}
.kv-rail .qt-item-prog {
  margin-top: 4px !important;
  display: inline-block;
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #4a3010 !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  background: rgba(200, 160, 80, 0.22) !important;
  border: 1px solid rgba(140, 100, 40, 0.25) !important;
}
.kv-rail .qt-item.ready .qt-item-prog,
.kv-rail .qt-card.ready .qt-item-prog {
  background: rgba(80, 160, 70, 0.22) !important;
  border-color: rgba(40, 120, 50, 0.3) !important;
  color: #1a5a20 !important;
}
.kv-rail .qt-muted {
  font-size: 11px !important;
  color: #5a4020 !important;
}
.kv-rail .qt-hint {
  margin-top: 6px !important;
  padding: 4px 7px !important;
  background: rgba(255, 248, 220, 0.7) !important;
  border: 1px solid rgba(120, 90, 40, 0.22) !important;
  border-radius: 6px !important;
  color: #3a2410 !important;
  font-weight: 600 !important;
}
.kv-rail .qt-mark { color: #b02010 !important; font-weight: 800 !important; }
.kv-rail .qt-item.ready .qt-mark,
.kv-rail .qt-card.ready .qt-mark { color: #1a7a28 !important; }
.kv-rail .qt-claim {
  margin-top: 8px !important;
  width: 100%;
  border-radius: 7px !important;
  padding: 7px 10px !important;
  font-weight: 700 !important;
}

.kv-rail .rail-quests {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
}
html.is-mobile .kv-rail .rail-residents {
  flex: 0 0 auto !important;
  margin-top: auto;
  max-height: 190px;
}
html.is-mobile .kv-rail .residents-list {
  max-height: 120px;
}
.kv-rail .residents-list {
  font-weight: 500;
}
.kv-rail .rail-tabs {
  background: linear-gradient(180deg, #efe0b8, #ddc898) !important;
  color: #2a1808 !important;
}
.kv-rail .rail-tab { color: #4a3018 !important; }
.kv-rail .rail-tab.on {
  background: linear-gradient(180deg, #fff6d8, #f0e0b0) !important;
  color: #1a1008 !important;
}
.kv-rail .residents-list .online-row {
  flex-wrap: wrap;
  gap: 2px 6px;
  padding: 3px 4px !important;
  font-size: 12px;
  color: #1a1008 !important;
}
.kv-rail .peer-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.kv-rail .peer-act,
.kv-rail .atk-sword-btn {
  background: rgba(255, 248, 220, 0.7);
  border: 1px solid #a88448;
  color: #5a3818;
  font-size: 11px;
  line-height: 1;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 3px;
  cursor: pointer;
}
.kv-rail .peer-act:hover,
.kv-rail .atk-sword-btn:hover { background: #f0e0b8; }
.kv-rail .peer-tag {
  font-size: 10px;
  font-weight: 600;
  color: #5a4020;
  margin-left: 4px;
}
.kv-rail .peer-tag.enemy { color: #8a2010; }
.kv-rail .peer-tag.ally { color: #2a5a18; }
.kv-rail .peer-tag.party { color: #2a4080; }
.kv-rail .nick-south,
.kv-rail .chat-nick-btn.nick-south { color: #b03020 !important; }
.kv-rail .nick-north,
.kv-rail .chat-nick-btn.nick-north { color: #2060b0 !important; }

/* Ð§Ð°Ñ: Ð¶ÑÑÑÐºÐ°Ñ Ð²ÑÑÐ¾ÑÐ° â Ð½Ðµ ÑÐ°ÑÑÑÑ Ð¾Ñ ÑÐ¸ÑÐ»Ð° ÑÐ¾Ð¾Ð±ÑÐµÐ½Ð¸Ð¹ */
.coe-app {
  grid-template-rows:
    calc(var(--hud-h) + var(--safe-top))
    minmax(0, 1fr)
    calc(var(--chat-h) + var(--safe-bottom)) !important;
}
#gameChat.coe-chat,
body.coe-theme-golden #gameChat.coe-chat,
body.fac-south #gameChat.coe-chat {
  display: flex !important;
  flex-direction: column !important;
  height: calc(var(--chat-h) - 6px) !important;
  max-height: calc(var(--chat-h) - 6px) !important;
  min-height: calc(var(--chat-h) - 6px) !important;
  overflow: hidden !important;
  align-self: stretch !important;
  box-sizing: border-box !important;
}
#gameChat.coe-chat .chat-head {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  flex: 0 0 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  overflow: visible;
  padding: 3px 6px !important;
}
#gameChat.coe-chat .chat-head-actions {
  flex-shrink: 0;
  z-index: 2;
}
#gameChat.coe-chat .chat-head-actions .chat-rules-head-btn {
  height: 17px !important;
  padding: 0 5px !important;
  font-size: 8px !important;
}
#gameChat.coe-chat .chat-tabs,
#gameChat.coe-chat .chat-dots,
#gameChat.coe-chat .chat-chs {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  align-items: center;
}
#gameChat.coe-chat .chat-power-btn,
#gameChat.coe-chat .chat-chbtn {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto !important;
  height: 22px !important;
  padding: 0 7px 0 5px !important;
  border-radius: 11px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  white-space: nowrap;
}
#gameChat.coe-chat .chat-led {
  width: 9px !important;
  height: 9px !important;
  flex: 0 0 9px !important;
  border-radius: 50% !important;
}
#gameChat.coe-chat .chat-tab {
  display: inline-block;
  flex: 0 0 auto !important;
  color: #3a2410 !important;
  background: rgba(255, 248, 220, 0.45) !important;
  border: 1px solid #b89458 !important;
  border-radius: 4px 4px 0 0 !important;
  padding: 3px 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  white-space: nowrap;
}
#gameChat.coe-chat .chat-tab.on {
  background: linear-gradient(180deg, #f8ecd0, #e8d4a0) !important;
  color: #1a1008 !important;
  border-color: #8a6830 !important;
}
#gameChat.coe-chat .chat-body {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
#gameChat.coe-chat .chat-log {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}
#gameChat.coe-chat .chat-emote-popover {
  flex: 0 0 auto !important;
}
#gameChat.coe-chat .chat-form {
  flex: 0 0 auto !important;
}
#gameChat.coe-chat .chat-toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-left: 4px;
  background: rgba(255, 248, 220, 0.55);
  border: 1px solid #8a6830;
  border-radius: 4px;
  color: #3a2410;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
#gameChat.coe-chat .chat-toggle:hover { background: #f0e0b8; }
#gameChat.coe-chat.collapsed {
  display: flex !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
}
#gameChat.coe-chat.collapsed .chat-body {
  display: none !important;
}
.coe-app:has(#gameChat.collapsed) {
  --chat-h: 34px;
}

/* ââ Ð¢Ð¾Ð¿Ð¸ / Ð¡ÑÐ°ÑÑÑÐºÐ° ââ */
.bog-panel { max-width: 520px; }
.bog-hero {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.bog-hero-img {
  width: 110px;
  height: auto;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.35));
}
.bog-grandma-tint {
  /* ÑÐ¿ÑÐ°Ð¹Ñ ÑÐ¶Ðµ Ñ ÑÐ¸Ð¾Ð»ÐµÑÐ¾Ð²Ð¾Ð¹ Ð¾Ð´ÐµÐ¶Ð´Ð¾Ð¹; Ð»Ð¸ÑÐ¾/ÑÑÐºÐ¸ Ð±ÐµÐ· hue-rotate */
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)) !important;
}
.bog-reward-line {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(140, 90, 180, 0.14);
  border: 1px solid rgba(150, 100, 190, 0.35);
  color: #4a2a60;
  font-size: 13px;
  font-weight: 500;
}
.bog-tale { font-size: 14px; line-height: 1.45; margin: 0 0 8px; color: #3a2a18; }
.bog-pick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.bog-pick-card {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start !important;
  gap: 4px;
  min-height: 72px;
  text-align: left !important;
}
.bog-pick-title { font-size: 16px; font-weight: 600; }
.bog-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.bog-menu--prof {
  flex-direction: column;
  align-items: stretch;
}
.bog-menu--prof .bog-menu-main {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
}
.bog-menu--prof .bog-menu-secondary {
  width: 100%;
  opacity: 0.92;
}
.bog-hub.bog-prof--alchemist .bog-prof-badge {
  background: linear-gradient(135deg, #7b1fa2 0%, #9c27b0 100%);
}
.bog-hub.bog-prof--miner .bog-prof-badge {
  background: linear-gradient(135deg, #006064 0%, #00838f 100%);
}
.bog-prof-badge {
  display: inline-block;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.bog-tool-line { margin: 4px 0 8px; line-height: 1.4; }
.bog-menu-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(120, 90, 40, 0.2);
}
.bog-menu-section--secondary {
  border-bottom: none;
  padding-top: 8px;
}
.bog-menu-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(60, 45, 20, 0.65);
  margin-bottom: 2px;
}
.bog-menu-link {
  font-size: 13px !important;
  opacity: 0.85;
  background: transparent !important;
  border-style: dashed !important;
}

/* Ежедневная отметка (клевер удачи) */
.hud-icon-btn.daily-claim-pending .hud-icon-wrap {
  box-shadow: 0 0 0 2px rgba(255, 215, 64, 0.95), 0 0 12px rgba(255, 193, 7, 0.55);
  animation: dailyHudPulse 1.6s ease-in-out infinite;
}
.hud-icon-btn.daily-locked { opacity: 0.55; }
@keyframes dailyHudPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
/* —— Алтарный фолиант: ежедневный хаб —— */
.daily-hub-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
}
.daily-hub-window {
  width: min(960px, 96vw);
  height: min(580px, 92vh);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255, 184, 0, 0.08), transparent 45%),
    linear-gradient(145deg, #1a110c 0%, #0a0604 55%, #120c08 100%);
  border: 3px solid #5a3a22;
  box-shadow:
    0 0 0 1px #2a180e,
    0 0 40px rgba(0, 0, 0, 0.9),
    inset 0 0 28px rgba(61, 37, 26, 0.45);
  border-radius: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 24px 18px;
  box-sizing: border-box;
  color: #f5ecd8;
  overflow: hidden; /* зелёная рамка квеста / VIP×2 не вылезают за окно */
}
.daily-hub-window::before,
.daily-hub-window::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(201, 148, 74, 0.65);
  pointer-events: none;
  z-index: 2;
}
.daily-hub-window::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.daily-hub-window::after { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.daily-hub-header { text-align: center; margin-bottom: 14px; flex-shrink: 0; }
.gothic-title {
  font-family: Georgia, "Times New Roman", serif;
  color: #ffb800;
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: 0.12em;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85), 0 0 18px rgba(255, 184, 0, 0.25);
}
.gothic-subtitle {
  color: #a38570;
  font-size: 13px;
  margin: 6px 0 0;
}
.daily-hub-body {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 20px;
  flex: 1;
  min-height: 0;
}
.daily-hub-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
  max-height: 100%;
}
.pet-showcase-card {
  background: rgba(26, 17, 12, 0.72);
  border: 1px solid #4a3224;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.pet-preview-zone {
  height: 112px;
  flex: 0 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(201, 148, 74, 0.35);
  background:
    radial-gradient(ellipse at 50% 78%, rgba(90, 140, 40, 0.28), transparent 55%),
    radial-gradient(ellipse at 50% 35%, rgba(255, 184, 0, 0.14), transparent 50%),
    linear-gradient(165deg, #2a1c12 0%, #100a06 55%, #1a120c 100%);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.55);
}
.pet-pedestal {
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 10px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.65), transparent 70%);
  z-index: 1;
}
.pet-animated-avatar {
  height: 108px;
  width: auto;
  max-width: 88%;
  object-fit: contain;
  object-position: center bottom;
  animation: petBreath 4s ease-in-out infinite;
  z-index: 2;
  /* убирает «шахматку» артефактов PNG на тёмном ложе */
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 10px rgba(120, 200, 60, 0.35)) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.65));
}
@keyframes petBreath {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.03); }
}
.pet-glow-effect {
  position: absolute;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(255, 184, 0, 0.22) 0%, rgba(80, 160, 40, 0.12) 40%, transparent 70%);
  z-index: 1;
  pointer-events: none;
}
.pet-mystery {
  position: relative;
  z-index: 2;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pet-mystery-ring {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 184, 0, 0.45);
  box-shadow:
    0 0 18px rgba(255, 184, 0, 0.28),
    inset 0 0 16px rgba(90, 140, 40, 0.22);
  animation: petMysteryRing 3.6s ease-in-out infinite;
}
.pet-mystery-q {
  position: relative;
  z-index: 2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 54px;
  font-weight: 700;
  line-height: 1;
  color: #ffe08a;
  text-shadow:
    0 0 12px rgba(255, 184, 0, 0.55),
    0 2px 0 #5a3a12,
    0 8px 14px rgba(0, 0, 0, 0.65);
  animation: petMysteryQ 2.8s ease-in-out infinite;
}
.pet-mystery-spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffd56a;
  box-shadow: 0 0 10px rgba(255, 200, 80, 0.9);
  animation: petMysterySpark 2.4s ease-in-out infinite;
}
.pet-mystery-spark--a { top: 14px; right: 18px; animation-delay: 0s; }
.pet-mystery-spark--b { bottom: 18px; left: 16px; animation-delay: 1.1s; }
@keyframes petMysteryRing {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.06); opacity: 1; }
}
@keyframes petMysteryQ {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.05); }
}
@keyframes petMysterySpark {
  0%, 100% { opacity: 0.25; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.15); }
}
.pet-mystery-hint {
  margin: 0 0 2px;
  font-size: 11px;
  color: #8a7460;
  line-height: 1.35;
}
.pet-progress-info {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.pet-progress-info h3 {
  margin: 0 0 4px;
  font-size: 14px;
  color: #ffe8c0;
}
.pet-bar-container,
.dq-progress-bar {
  background: #000;
  border: 1px solid #3d251a;
  height: 20px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  margin: 8px 0;
}
.pet-bar-fill {
  background: linear-gradient(90deg, #ff9000, #ffb800);
  height: 100%;
  transition: width 0.35s ease;
}
.dq-fill {
  background: linear-gradient(90deg, #518c22, #7ad130);
  height: 100%;
}
.pet-bar-text,
.dq-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  text-shadow: 1px 1px 2px #000;
}
.daily-exchange-btn {
  width: 100%;
  padding: 9px 10px;
  border-radius: 7px;
  border: none;
  font-weight: 800;
  cursor: pointer;
  font-size: 13px;
}
.daily-exchange-btn.active {
  background: linear-gradient(180deg, #ffc800, #d48800);
  color: #1a1008;
  box-shadow: 0 0 12px rgba(255, 184, 0, 0.4);
}
.daily-exchange-btn.disabled {
  background: #2b1f18;
  color: #5c4538;
  cursor: not-allowed;
}
.daily-quest-compact {
  background: rgba(20, 31, 15, 0.45);
  border: 1px solid #2d4a1c;
  border-radius: 12px;
  padding: 10px 12px;
  flex: 0 0 auto;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.dq-header {
  font-size: 11px;
  color: #7ad130;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.dq-title {
  font-size: 15px;
  color: #fff;
  font-weight: 800;
  margin: 4px 0 2px;
}
.dq-objective {
  font-size: 12px;
  color: #b8d89a;
  line-height: 1.35;
  margin: 0 0 4px;
}
.dq-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
.dq-reward {
  font-size: 12px;
  color: #a38570;
  text-align: left;
  flex: 1 1 auto;
}
.dq-action-btn {
  flex: 0 0 auto;
  border: none;
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.dq-action-btn--accept {
  background: linear-gradient(180deg, #6aa832, #3f6e1c);
  color: #f5ffe8;
  box-shadow: 0 0 10px rgba(90, 180, 40, 0.25);
}
.dq-action-btn--claim {
  background: linear-gradient(180deg, #ffc800, #d48800);
  color: #1a1008;
  box-shadow: 0 0 12px rgba(255, 184, 0, 0.4);
  animation: goldGlowPulse 2s infinite alternate;
}
.dq-action-btn--wait,
.dq-action-btn--done {
  background: #2b1f18;
  color: #7a6554;
  cursor: default;
}
.daily-quest-compact.is-ready {
  border-color: #c9944a;
  box-shadow: 0 0 14px rgba(255, 184, 0, 0.22);
}
.daily-quest-compact.is-done {
  opacity: 0.85;
}
.daily-vip-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 184, 0, 0.45);
  background: linear-gradient(90deg, rgba(80, 52, 18, 0.55), rgba(40, 26, 12, 0.4));
  color: #f0d9a0;
  font-size: 12px;
  box-shadow: 0 0 16px rgba(255, 184, 0, 0.18);
}
.daily-vip-banner-mark {
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #1a1208;
  background: linear-gradient(180deg, #ffe08a, #d4a018);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
}
.daily-hint-vip {
  color: #ffc94a;
  font-weight: 800;
}
.daily-hub-window--vip {
  box-shadow:
    0 0 0 1px #2a180e,
    0 0 40px rgba(0, 0, 0, 0.9),
    0 0 28px rgba(255, 184, 0, 0.12),
    inset 0 0 28px rgba(61, 37, 26, 0.45);
}
.daily-hub-main {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: 0;
}
.daily-hub-cycle-hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: #c9b090;
}
.daily-timeline-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  flex: 1 1 auto;
  align-content: center;
  position: relative;
  z-index: 1;
  overflow: visible;
  padding: 10px 4px 6px; /* место под VIP×2 без выхода за окно */
  box-sizing: border-box;
  pointer-events: none; /* клики по пустоте сетки не блокируют кнопку снизу */
}
.daily-day-card {
  pointer-events: auto;
  background:
    linear-gradient(180deg, rgba(58, 42, 28, 0.95) 0%, rgba(28, 18, 12, 0.98) 100%);
  border: 1px solid #5a3a22;
  border-radius: 8px;
  padding: 10px 4px 10px;
  text-align: center;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  min-height: 128px;
  color: inherit;
  font: inherit;
  cursor: default;
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.08);
  overflow: visible;
}
.daily-day-card.status-today {
  cursor: pointer;
}
.daily-day-card.is-vip {
  border-color: rgba(212, 160, 60, 0.85);
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 160, 0.1),
    0 0 0 1px rgba(255, 184, 0, 0.12),
    0 0 14px rgba(255, 184, 0, 0.18);
  animation: dailyVipCardGlow 3.2s ease-in-out infinite;
}
.daily-day-card.is-vip.status-done {
  animation: none;
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.05);
}
.daily-day-card.is-vip.status-future {
  animation: dailyVipCardGlow 4.2s ease-in-out infinite;
}
.daily-vip-x2 {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 3;
  min-width: 26px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #1a1208;
  background: linear-gradient(180deg, #ffe48a 0%, #d49218 100%);
  border: 1px solid rgba(255, 230, 160, 0.85);
  box-shadow: 0 0 10px rgba(255, 184, 0, 0.45);
  animation: dailyVipX2Pulse 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes dailyVipX2Pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(255, 184, 0, 0.35); }
  50% { transform: scale(1.08); box-shadow: 0 0 16px rgba(255, 200, 80, 0.65); }
}
@keyframes dailyVipCardGlow {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.08), 0 0 10px rgba(255, 184, 0, 0.12); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.12), 0 0 18px rgba(255, 184, 0, 0.28); }
}
.daily-day-card .day-num {
  font-size: 11px;
  color: #a38570;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.daily-day-card .reward-qty-base {
  text-decoration: line-through;
  opacity: 0.45;
  margin-right: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #a38570;
}
.daily-day-card .reward-qty-vip {
  color: #ffd56a;
  text-shadow: 0 0 8px rgba(255, 184, 0, 0.35);
}
.daily-day-icons {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.daily-day-card .reward-ico {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}
.daily-day-card .reward-ico--sm {
  width: 32px;
  height: 32px;
  opacity: 1;
  margin-top: 2px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.55));
}
.daily-day-card .reward-qty {
  font-size: 12px;
  font-weight: 800;
  color: #ffe8a0;
}
.daily-day-seal {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.daily-day-card.status-done {
  opacity: 0.62;
  background: #0f0a08;
  border-color: #241610;
}
.daily-day-card.status-today {
  background: linear-gradient(180deg, #3a2818 0%, #2b1e16 100%);
  border-color: #ffb800;
  transform: translateY(-4px);
  box-shadow: 0 0 20px rgba(255, 184, 0, 0.55);
  z-index: 2;
  animation: dailyTodayPulse 2.2s ease-in-out infinite alternate;
}
.daily-day-card.status-today .day-num { color: #ffb800; }
.daily-day-card.status-today:hover {
  transform: translateY(-7px);
}
.daily-day-card.status-future {
  opacity: 0.42;
  filter: grayscale(35%);
}
@keyframes dailyTodayPulse {
  0% { box-shadow: 0 0 12px rgba(255, 184, 0, 0.35); }
  100% { box-shadow: 0 0 26px rgba(255, 184, 0, 0.7); }
}
.daily-action-zone {
  text-align: center;
  margin-top: 14px;
  flex-shrink: 0;
  position: relative;
  z-index: 20;
  pointer-events: auto;
}
.epic-claim-btn {
  position: relative;
  z-index: 21;
  pointer-events: auto;
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.04em;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.epic-claim-btn.pulse-gold {
  background: linear-gradient(180deg, #ffc800 0%, #d48800 100%);
  color: #1a1008;
  box-shadow: 0 4px 15px rgba(212, 136, 0, 0.45);
  animation: goldGlowPulse 2s infinite alternate;
}
.epic-claim-btn.pulse-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(212, 136, 0, 0.65);
}
.epic-claim-btn.is-vip.pulse-gold {
  box-shadow: 0 4px 18px rgba(212, 136, 0, 0.55), 0 0 22px rgba(255, 200, 80, 0.25);
}
.vip-fanfare-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 900;
  color: #1a1208;
  background: linear-gradient(180deg, #ffe48a, #d49218);
  vertical-align: middle;
}
.daily-claim-fanfare-card.is-vip {
  border-color: #ffc94a;
  box-shadow: 0 0 44px rgba(255, 184, 0, 0.45);
}
.epic-claim-btn.claimed-disabled {
  background: #2a2018;
  color: #9a8068;
  border: 1px solid #4a3528;
  cursor: not-allowed;
  opacity: 0.95;
}
.epic-claim-btn.is-claiming { opacity: 0.7; pointer-events: none; }
@keyframes goldGlowPulse {
  0% { box-shadow: 0 0 10px rgba(255, 184, 0, 0.4); }
  100% { box-shadow: 0 0 25px rgba(255, 184, 0, 0.75); }
}
.daily-hub-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: #a38570;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
}
.daily-hub-close:hover { color: #ffb800; }
.daily-hub-locked-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  color: #c9b090;
  padding: 20px;
}
.daily-hub-locked-ico {
  width: 72px;
  height: 72px;
  object-fit: contain;
  opacity: 0.85;
}
.daily-claim-fanfare {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  animation: dailyFanfareIn 0.35s ease;
}
.daily-claim-fanfare-card {
  position: relative;
  padding: 28px 36px;
  border-radius: 14px;
  border: 2px solid #ffb800;
  background: linear-gradient(165deg, #2a1c12, #120c08);
  text-align: center;
  box-shadow: 0 0 40px rgba(255, 184, 0, 0.35);
  min-width: min(360px, 90vw);
}
.daily-claim-fanfare-kicker {
  margin: 0 0 16px;
  font-family: Georgia, serif;
  font-size: 22px;
  color: #ffb800;
  letter-spacing: 0.06em;
  text-shadow: 0 0 16px rgba(255, 184, 0, 0.45);
}
.daily-claim-fanfare-icons {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 18px;
}
.daily-claim-loot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: #ffe8c0;
}
.daily-claim-loot img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255, 200, 80, 0.45));
  animation: petBreath 1.6s ease-in-out infinite;
}
.daily-claim-sparks {
  pointer-events: none;
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 200, 80, 0.35), transparent 12%),
    radial-gradient(circle at 80% 40%, rgba(255, 140, 40, 0.3), transparent 14%),
    radial-gradient(circle at 50% 80%, rgba(255, 220, 120, 0.25), transparent 16%);
  animation: dailySparks 1.2s ease-out;
}
@keyframes dailyFanfareIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes dailySparks {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1.1); }
}
@media (max-width: 820px) {
  .daily-hub-window { height: auto; max-height: 94vh; overflow: auto; }
  .daily-hub-body { grid-template-columns: 1fr; }
  .daily-timeline-grid { grid-template-columns: repeat(4, 1fr); }
  .daily-day-card:nth-child(n+5) { /* wrap last 3 */ }
}
html.is-mobile-desk .daily-hub-window {
  width: min(960px, 100%);
  height: min(560px, 100%);
}
.bog-res-line {
  margin: 6px 0 4px;
  font-size: 14px;
  color: #2a4a28;
  font-weight: 600;
}
.bog-hub-hint { line-height: 1.45; margin-bottom: 6px !important; }
.bog-craft-lead { margin: 0 0 10px; }
html.is-mobile .bog-hero {
  flex-direction: column;
  align-items: center;
  text-align: center;
}
html.is-mobile .bog-hero-img { width: 92px; }
html.is-mobile .bog-panel { max-width: min(100%, 100vw - 16px); }
html.is-mobile .bog-menu--prof .btn { min-height: 44px; }
.bog-quest-card {
  background: rgba(255, 248, 220, 0.45);
  border: 1px solid rgba(120, 90, 40, 0.35);
  border-radius: 8px;
  padding: 10px 12px;
}
.bog-quest-card.ready { border-color: #4a9a40; box-shadow: 0 0 0 1px rgba(76,175,80,.25); }
.bog-quest-src { font-size: 11px; color: #7a5530; margin-bottom: 4px; }
.bog-quest-title { font-size: 15px; font-weight: 600; color: #2a1a0a; margin-bottom: 4px; }
.qt-item.qt-bog {
  background: rgba(90, 140, 90, 0.08) !important;
  border-left: 3px solid #5a8a40 !important;
  padding-left: 6px !important;
  border-radius: 4px !important;
}
.qt-bog-src { color: #3a6a30 !important; font-weight: 500; }
.bog-recipe-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 48vh;
  overflow: auto;
}
.bog-recipe {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: rgba(255,248,220,.4);
  border: 1px solid rgba(120,90,40,.35);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  color: #2a1a0a;
}
.bog-recipe:hover { background: rgba(255,236,180,.7); border-color: #a07830; }
.bog-recipe img { width: 40px; height: 40px; object-fit: contain; }
.bog-need-ok { color: #2a7a30; }
.bog-need-bad { color: #a03020; }
.bog-panel-ritual { min-height: 220px; display: flex; align-items: center; justify-content: center; }
.bog-ritual {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.bog-ritual-ring {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 2px solid rgba(200,160,60,.55);
  box-shadow: 0 0 24px rgba(255,200,80,.35), inset 0 0 20px rgba(255,220,120,.2);
  animation: bogPulse 1.1s ease-in-out infinite;
}
.bog-ritual-ico {
  width: 72px;
  height: 72px;
  object-fit: contain;
  z-index: 1;
  filter: drop-shadow(0 0 12px rgba(255,210,100,.7));
}
.bog-ritual-ico.spinning { animation: bogSpin 1.2s linear; }
.bog-ritual-txt { margin-top: 12px; z-index: 1; color: #5a4020; font-weight: 500; }
@keyframes bogSpin {
  from { transform: scale(.6) rotate(-20deg); opacity: .3; }
  50% { transform: scale(1.1) rotate(10deg); opacity: 1; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes bogPulse {
  0%, 100% { transform: scale(1); opacity: .7; }
  50% { transform: scale(1.06); opacity: 1; }
}
.bog-result {
  position: relative;
  text-align: center;
  padding: 12px 8px 4px;
}
.bog-result img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.35));
  animation: bogPop .45s ease-out;
}
.bog-result-glow {
  position: absolute;
  left: 50%; top: 40px;
  width: 120px; height: 120px;
  margin-left: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,220,120,.45), transparent 70%);
  pointer-events: none;
}
.bog-result.ok img { filter: drop-shadow(0 0 14px rgba(80,200,90,.7)); }
.bog-result.fail img { filter: grayscale(.4) drop-shadow(0 0 10px rgba(180,60,40,.5)); }
@keyframes bogPop {
  from { transform: scale(.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.bog-gem-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.bog-gem-chip {
  touch-action: manipulation;
  cursor: pointer;
  min-height: 44px;
  padding: 8px 10px;
  z-index: 2;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 16px;
  border: 1px solid rgba(120,90,40,.4);
  background: rgba(255,248,220,.5);
  font-size: 12px;
  color: #2a1a0a;
}
.bog-gem-chip.on { border-color: #c9a050; background: rgba(255,220,140,.75); }
.bog-gem-chip img { width: 22px; height: 22px; object-fit: contain; }
.bog-gear-list { display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow: auto; }
.bog-gear-row {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(120,90,40,.35);
  background: rgba(255,248,220,.4);
  cursor: pointer;
  color: #2a1a0a;
}
.bog-gear-row:hover { background: rgba(255,236,180,.75); }
.bog-gear-row img { width: 36px; height: 36px; object-fit: contain; }
.bog-gear-ico {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}
.bog-gear-ico > img:first-child { width: 100%; height: 100%; object-fit: contain; }
.bog-gear-ico .pack-sock {
  position: absolute;
  width: 45%;
  height: 45%;
  max-width: 18px;
  max-height: 18px;
  object-fit: contain;
  background: rgba(10,6,2,.55);
  border-radius: 3px;
  padding: 1px;
}
.bog-gear-ico .pack-sock--bog {
  left: 0;
  bottom: 0;
  right: auto;
  top: auto;
}
.bog-gear-ico .pack-sock--sharpen {
  right: 0;
  top: 0;
  left: auto;
  bottom: auto;
}
.bog-chest-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.bog-chest-head img { width: 64px; height: 56px; object-fit: contain; }
.overlay .panel.bog-chest-modal {
  max-width: min(640px, 96vw);
  padding: 14px 16px 12px;
  display: block !important;
  position: relative;
  z-index: 2;
}
.bog-chest-v2 { display: flex; flex-direction: column; gap: 8px; }
.bog-chest-head--v2 {
  align-items: flex-start;
  margin-bottom: 0;
  position: relative;
  padding-right: 36px;
}
.bog-chest-head-text h2 { margin-bottom: 4px; }
.bog-chest-x {
  position: absolute;
  right: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(212, 168, 75, 0.45);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: #ffe8c8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.bog-chest-x:hover { background: rgba(80, 40, 20, 0.55); }
.bog-chest-sync { margin: 0; font-size: 12px; color: #a89070; }
.bog-chest-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.bog-chest-tab {
  flex: 1;
  min-width: 120px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(120, 90, 40, 0.35);
  background: rgba(255, 248, 220, 0.08);
  color: #e8d4b0;
  font-weight: 600;
  cursor: pointer;
}
.bog-chest-tab.on {
  border-color: #d4a84b;
  background: linear-gradient(180deg, rgba(212, 168, 75, 0.28), rgba(80, 50, 20, 0.2));
  color: #fff3dc;
}
.bog-chest-tab-n { opacity: 0.85; font-weight: 700; }
.bog-chest-panels { min-height: 120px; }
.bog-chest-v2 .bog-chest-tabpanel { display: none; }
.bog-chest-v2 .bog-chest-tabpanel.on { display: block; }
.bog-chest-leg { margin: 0 0 6px; font-size: 11px; line-height: 1.35; }
/* Компактные ячейки — не на весь экран (aspect-ratio 1fr раздувал иконки) */
.bog-chest-v2 .bog-slot-grid.bog-chest-grid,
.bog-chest-v2 .bog-slot-grid.bog-chest-bp-scroll {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  max-height: min(34vh, 240px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.bog-chest-v2 .bog-chest-cell.bog-slot {
  aspect-ratio: unset;
  width: 100%;
  height: 46px;
  min-height: 46px;
  max-height: 48px;
  padding: 2px;
  border-radius: 5px;
}
.bog-chest-v2 .bog-chest-cell.bog-slot.empty {
  min-height: 46px;
  height: 46px;
}
.bog-chest-v2 .bog-chest-cell.bog-slot img {
  width: 80%;
  height: 80%;
  max-width: 38px;
  max-height: 38px;
  object-fit: contain;
}
.bog-chest-v2 .bog-slot-qty {
  font-size: 9px;
  right: 1px;
  bottom: 0;
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(255, 248, 220, 0.85);
}
.bog-chest-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); max-height: none; }
.bog-chest-bp-scroll { max-height: min(34vh, 240px); }
.bog-chest-empty-bp { padding: 12px 8px; text-align: center; }
.bog-chest-desk {
  display: flex;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(120, 90, 40, 0.25);
}
.bog-chest-desk-col { flex: 1; text-align: center; }
.bog-chest-desk-label {
  display: block;
  font-size: 11px;
  color: #9a8060;
  margin-bottom: 2px;
}
.bog-chest-foot { margin-top: 4px; justify-content: flex-end; }
.bog-slot--out:hover { box-shadow: 0 0 0 2px rgba(129, 199, 132, 0.55); }
.bog-slot--in:hover { box-shadow: 0 0 0 2px rgba(255, 213, 79, 0.55); }
.bog-slot-qty {
  position: absolute;
  right: 2px;
  bottom: 1px;
  font-size: 10px;
  color: #3a2410;
  font-weight: 600;
}
html.is-mobile .overlay .panel.bog-chest-modal {
  max-width: min(400px, 96vw);
  padding: 10px 10px 8px;
  max-height: min(88dvh, 640px);
}
html.is-mobile .bog-chest-v2 .bog-slot-grid.bog-chest-grid,
html.is-mobile .bog-chest-v2 .bog-slot-grid.bog-chest-bp-scroll {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-height: min(32dvh, 200px);
}
html.is-mobile .bog-chest-v2 .bog-chest-cell.bog-slot,
html.is-mobile .bog-chest-v2 .bog-chest-cell.bog-slot.empty {
  height: 40px;
  min-height: 40px;
  max-height: 42px;
}
html.is-mobile .bog-chest-v2 .bog-chest-cell.bog-slot img {
  max-width: 32px;
  max-height: 32px;
}
html.is-mobile .bog-chest-head--v2 img { width: 52px; height: 46px; }
html.is-mobile .bog-chest-head-text h2 { font-size: 18px; }
html.is-mobile .bog-chest-tab { padding: 6px 8px; font-size: 13px; min-width: 0; }
html.is-mobile .bog-chest-sync { font-size: 11px; }
html.is-mobile .bog-chest-desk { flex-direction: row; padding: 6px 8px; }
.bog-chest-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.bog-col-title {
  font-size: 12px;
  color: #6a5030;
  margin-bottom: 6px;
  font-weight: 500;
}
.bog-slot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  max-height: 42vh;
  overflow: auto;
  padding: 4px;
  background: rgba(40,28,12,.06);
  border-radius: 8px;
}
.bog-bp-grid { grid-template-columns: repeat(5, 1fr); }
.bog-slot {
  aspect-ratio: 1;
  border: 1px solid rgba(120,90,40,.35);
  border-radius: 6px;
  background: rgba(255,248,220,.55);
  padding: 4px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bog-slot.empty { cursor: default; background: rgba(0,0,0,.04); border-style: dashed; }
.bog-slot img { width: 85%; height: 85%; object-fit: contain; }
.bog-slot span {
  position: absolute;
  right: 2px; bottom: 1px;
  font-size: 10px;
  color: #3a2410;
  font-weight: 600;
}
@media (max-width: 640px) {
  .bog-hero { flex-direction: column; align-items: center; text-align: center; }
  .bog-pick-grid, .bog-chest-cols { grid-template-columns: 1fr; }
}



/*  Clan hall  */
.clan-panel { max-width: 560px; }
.clan-hall .clan-head {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 10px; padding: 10px 12px;
  border: 1px solid rgba(120, 80, 30, 0.35);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(90, 55, 20, 0.16), rgba(40, 24, 10, 0.08));
}
.clan-head-ico {
  width: 44px; height: 44px; object-fit: contain;
  image-rendering: pixelated; flex: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.35));
}
.clan-head-text h2 { margin: 0; font-size: 1.25rem; line-height: 1.2; }
.clan-head-tag { color: var(--coe-gold-hi, #d4a24a); margin-right: 4px; }
.clan-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 12px; }
.clan-tab {
  font: 600 12px/1.2 Georgia, 'Times New Roman', serif;
  padding: 7px 12px;
  border: 1px solid var(--coe-bronze);
  background: linear-gradient(180deg, #e8d4a8, #c9a878);
  color: var(--coe-ink);
  cursor: pointer;
  border-radius: 5px;
  display: inline-flex; align-items: center; gap: 6px;
}
.clan-tab.on {
  background: linear-gradient(180deg, #f4e4bc, #b8863c);
  box-shadow: inset 0 0 0 1px #6a4018, 0 1px 0 rgba(255,230,160,.35);
  color: #3a220c;
}
.clan-tab-badge {
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; font-size: 10px; line-height: 16px;
  background: #6a3010; color: #ffe8b0; text-align: center;
}
.clan-section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin: 0 0 8px;
}
.clan-section-head h3 { margin: 0; font-size: 1.05rem; }
.clan-stat-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.clan-pill {
  font-size: 11px; padding: 3px 8px; border-radius: 999px;
  border: 1px solid rgba(120,80,30,.35);
  background: rgba(80,50,20,.12); color: var(--coe-ink-soft);
}
.clan-pill.ok { border-color: rgba(60,120,50,.45); background: rgba(40,90,30,.12); }
.clan-pill.wait { border-color: rgba(140,90,20,.5); background: rgba(120,70,10,.12); }
.clan-pill.role-leader { border-color: rgba(180,130,40,.55); background: rgba(160,110,20,.18); color: #6a4010; font-weight: 700; }
.clan-pill.role-deputy { border-color: rgba(90,90,160,.45); background: rgba(70,70,140,.12); }
.clan-dir { margin-top: 4px; }
.clan-dir-msg { display: block; margin-bottom: 10px; }
.clan-dir-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow: auto; padding-right: 2px; }
.clan-dir-card {
  border: 1px solid rgba(120,80,30,.3);
  border-radius: 8px; padding: 10px;
  background: linear-gradient(180deg, rgba(255,240,210,.35), rgba(200,160,100,.12));
}
.clan-dir-card.is-full { opacity: .72; }
.clan-dir-top { display: flex; align-items: center; gap: 10px; }
.clan-dir-ico { width: 36px; height: 36px; object-fit: contain; flex: none; image-rendering: pixelated; }
.clan-dir-meta { flex: 1; min-width: 0; }
.clan-dir-name { font-weight: 700; font-size: 14px; }
.clan-dir-tag { color: var(--coe-gold-hi, #c48a2e); }
.clan-dir-sub { font-size: 11px; opacity: .85; margin-top: 2px; }
.clan-dir-desc { margin: 8px 0 0; font-size: 12px; line-height: 1.35; opacity: .9; white-space: pre-wrap; }
.clan-bank-sum { font-size: 1.15rem; font-weight: 700; color: var(--coe-gold-hi, #c48a2e); }
.clan-bank-pay {
  margin-top: 10px; padding: 10px;
  border: 1px solid rgba(80,50,20,.22); border-radius: 6px;
  background: rgba(80,50,20,.06);
}
.clan-subh { margin: 14px 0 6px; font-size: 0.95rem; }
.clan-member-row.role-leader { background: rgba(180,130,40,.12); }
.clan-member-row.role-deputy { background: rgba(80,80,150,.08); }
.clan-role-badge.role-leader {
  background: linear-gradient(180deg, #f0d080, #c09030); border-color: #8a6020; font-weight: 700;
}
.clan-role-badge.role-deputy {
  background: linear-gradient(180deg, #c8c8f0, #8888c8); border-color: #5050a0;
}
.clan-role-badge.role-guard {
  background: linear-gradient(180deg, #d0e0c8, #789868); border-color: #406030;
}
.clan-app-row { align-items: flex-start !important; }
.clan-app-who { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 2px; }
.clan-app-acts { display: flex; gap: 4px; flex-wrap: wrap; }
/* ?????-??? ? ???? ???????? ? ?????? ?????? + title ?? ????????? */
.chat-clan-tag-btn { display: none !important; }
.clan-form { margin: 12px 0; padding-top: 8px; border-top: 1px solid rgba(80,50,20,.25); }
.clan-form label { display: block; margin: 6px 0; font-size: 13px; color: var(--coe-ink-soft); }
.clan-desc { width: 100%; min-height: 64px; resize: vertical; }
.clan-logo { width: 120px; height: 120px; object-fit: contain; display: block; margin: 0 auto 10px; }
.clan-logo-ph {
  width: 120px; height: 80px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center;
  background: rgba(40,24,12,.15); border: 1px dashed var(--coe-bronze); font-size: 12px; color: var(--coe-ink-soft);
}
.clan-members, .clan-apps, .clan-vault, .clan-bank-log { list-style: none; padding: 0; margin: 8px 0; max-height: 240px; overflow: auto; }
.clan-members li, .clan-apps li, .clan-vault li, .clan-bank-log li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 6px 4px; border-bottom: 1px solid rgba(80,50,20,.18); font-size: 13px;
}
.clan-vault-ico { width: 28px; height: 28px; object-fit: contain; }
.clan-vault-put { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.clan-ico, .chat-clan-ico {
  width: 14px;
  height: 14px;
  object-fit: contain;
  vertical-align: -2px;
  margin-right: 0;
  flex: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.clan-ico-ph {
  display: inline-flex;
  width: 14px;
  height: 14px;
  align-items: center;
  justify-content: center;
  opacity: .55;
  font-size: 10px;
  line-height: 1;
}
.panel-icon.clan-ico { width: 36px; height: 36px; image-rendering: auto; }
.btn.tiny { padding: 2px 8px; font-size: 11px; }
.reg-input.tiny { width: 90px; padding: 2px 6px; font-size: 12px; }
.coe-chat .chat-chbtn.ch-ember .chat-led { border-color: #6a3020; }
.coe-chat .chat-chbtn.ch-ember.on {
  background: linear-gradient(180deg, #5a2818, #3a1810);
}
.coe-chat .chat-chbtn.ch-ember.on .chat-led {
  background: radial-gradient(circle at 40% 35%, #ffb070, #c05020 55%, #401808);
  box-shadow: 0 0 6px #e07030;
}

.chat-clan-ico-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; padding: 0; margin: 0;
  border: 0; background: transparent;
  cursor: pointer; vertical-align: middle; flex: none;
  overflow: visible;
}
.kv-rail .online-row .chat-clan-ico-btn,
.residents-list .chat-clan-ico-btn {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}
.chat-clan-ico-btn:hover .chat-clan-ico,
.chat-clan-ico-btn:hover { filter: brightness(1.15); outline: 1px solid var(--coe-gold); }
button.chat-clan {
  display: inline; padding: 0 2px; margin: 0; border: 0; background: transparent;
  color: inherit; font: inherit; cursor: pointer; opacity: .9;
}
button.chat-clan:hover { text-decoration: underline; color: var(--coe-gold-hi); }
.clan-role-badge {
  font-size: 11px; padding: 1px 6px; border: 1px solid var(--coe-bronze);
  border-radius: 3px; background: rgba(80,50,20,.12);
}
.clan-member-name { min-width: 88px; font-weight: 600; }
.clan-info-card .clan-desc-text { white-space: pre-wrap; line-height: 1.35; margin: 10px 0; }

.clan-size-hint {
  display: block;
  font-size: 11px;
  line-height: 1.35;
  margin: 2px 0 6px;
  opacity: .85;
}

/* Clan hall v2 — единый стиль зала / карточки / каталога */
.clan-hall-v2.clan-panel {
  max-width: min(520px, 96vw);
}
.clan-hall-v2 .clan-head-v2 {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(120, 75, 30, 0.22), rgba(30, 18, 8, 0.12)),
    linear-gradient(180deg, #f0e0c0, #dcc898);
  border: 1px solid rgba(138, 96, 48, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 248, 220, 0.35);
}
.clan-hall-v2 .clan-head-ico,
.clan-hall-v2 .coe-shop-badge.clan-head-ico {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: rgba(20, 10, 6, 0.08);
  padding: 4px;
  box-sizing: border-box;
  image-rendering: auto;
}
.clan-mem-bar {
  display: block;
  height: 6px;
  margin: 8px 0 4px;
  border-radius: 999px;
  background: rgba(40, 24, 10, 0.15);
  overflow: hidden;
  border: 1px solid rgba(120, 80, 30, 0.25);
}
.clan-mem-bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8a5020, #d4a050);
  box-shadow: 0 0 6px rgba(212, 160, 80, 0.45);
}
.clan-mem-label {
  font-size: 11px !important;
  opacity: 0.9;
}
.clan-tabs-v2 {
  gap: 6px !important;
  margin-bottom: 10px !important;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(120, 80, 30, 0.2);
}
.clan-hall-v2 .clan-tab-body,
.clan-hall-v2 .clan-info-scroll {
  max-height: min(52vh, 420px);
  padding-right: 4px;
}
.clan-hall-v2 .clan-logo {
  width: min(160px, 40vw);
  height: auto;
  max-height: 120px;
  border-radius: 8px;
  padding: 6px;
  background: rgba(255, 248, 230, 0.5);
  border: 1px solid rgba(120, 80, 30, 0.25);
}
.clan-hall-v2 .clan-dir-ico {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  padding: 3px;
  background: rgba(255, 248, 230, 0.45);
  image-rendering: auto;
}
.clan-hall-v2 .clan-dir-card {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.clan-hall-v2 .clan-dir-card:not(.is-full):hover {
  border-color: rgba(201, 148, 74, 0.55);
  box-shadow: 0 2px 10px rgba(80, 50, 20, 0.12);
}
.clan-hall-v2 .clan-members li,
.clan-hall-v2 .clan-apps li,
.clan-hall-v2 .clan-vault li {
  border-radius: 6px;
  margin-bottom: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(120, 80, 30, 0.14);
  border-bottom: 1px solid rgba(120, 80, 30, 0.14);
  background: rgba(255, 248, 230, 0.35);
}
.clan-roster .clan-member-row {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
@media (min-width: 420px) {
  .clan-roster .clan-member-row {
    flex-direction: row;
    align-items: center;
  }
}
.clan-hall-v2 .clan-member-row.role-leader {
  background: linear-gradient(90deg, rgba(212, 160, 80, 0.22), rgba(255, 248, 230, 0.35));
}
.clan-hall-v2 .clan-panel-foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(120, 80, 30, 0.2);
}
.clan-hall-v2 .clan-desc-text {
  font-size: 13px;
  line-height: 1.5;
  color: #3a2818;
}
.clan-hall-v2 .clan-desc-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Клан в тёмном overlay — тёмная доска, светлый читаемый текст */
.overlay .panel.clan-hall-v2.coe-shop {
  color: #f2e6d0;
  background:
    linear-gradient(165deg, rgba(42, 28, 16, 0.98), rgba(18, 12, 8, 0.98)),
    #1a120c;
  border: 1px solid rgba(180, 130, 70, 0.45);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}
.overlay .panel.clan-hall-v2 .clan-head-v2 {
  background:
    linear-gradient(135deg, rgba(90, 58, 28, 0.55), rgba(28, 18, 10, 0.75)),
    linear-gradient(180deg, #2a1c12, #1a120c) !important;
  border-color: rgba(201, 148, 74, 0.5) !important;
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, 0.12);
}
.overlay .panel.clan-hall-v2 .clan-head-v2 h2,
.overlay .panel.clan-hall-v2 .clan-head-v2 .clan-head-tag {
  color: #ffe8b8 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}
.overlay .panel.clan-hall-v2 .clan-head-v2 .meta,
.overlay .panel.clan-hall-v2 .clan-mem-label {
  color: #d8c4a0 !important;
  opacity: 1;
}
.overlay .panel.clan-hall-v2 .clan-head-ico,
.overlay .panel.clan-hall-v2 .coe-shop-badge.clan-head-ico {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(201, 148, 74, 0.35);
  object-fit: contain;
}
.overlay .panel.clan-hall-v2 .clan-logo {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(201, 148, 74, 0.35);
  object-fit: contain;
}
.overlay .panel.clan-hall-v2 .clan-logo-ph {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(201, 148, 74, 0.35);
  color: #c8b090;
  flex-direction: column;
  gap: 6px;
}
.overlay .panel.clan-hall-v2 .clan-tabs-v2 {
  border-bottom-color: rgba(201, 148, 74, 0.28);
}
.overlay .panel.clan-hall-v2 .clan-tab {
  color: #f0e0c8;
  border-color: rgba(140, 100, 50, 0.55);
}
.overlay .panel.clan-hall-v2 .clan-tab:not(.on) {
  background: linear-gradient(180deg, #3a2a1c, #241810);
  color: #e8d4a8;
  border-color: #5a4030;
}
.overlay .panel.clan-hall-v2 .clan-tab.on {
  background: linear-gradient(180deg, #c9a060, #8a6028);
  color: #1a1008 !important;
  box-shadow: inset 0 0 0 1px #6a4018, 0 1px 0 rgba(255, 230, 160, 0.25);
}
.overlay .panel.clan-hall-v2 .clan-tab-body,
.overlay .panel.clan-hall-v2 .clan-info-scroll,
.overlay .panel.clan-hall-v2 .coe-shop-scroll.clan-tab-body {
  background: linear-gradient(180deg, rgba(32, 22, 14, 0.95), rgba(22, 14, 10, 0.98));
  border: 1px solid rgba(138, 96, 48, 0.4);
  border-radius: 10px;
  padding: 12px 14px;
  color: #f0e0c8;
}
.overlay .panel.clan-hall-v2 .clan-tab-body label,
.overlay .panel.clan-hall-v2 .clan-form label,
.overlay .panel.clan-hall-v2 .clan-section-head h3,
.overlay .panel.clan-hall-v2 .clan-subh {
  color: #ffe8b8 !important;
}
.overlay .panel.clan-hall-v2 .clan-section-head .meta,
.overlay .panel.clan-hall-v2 .clan-roster-hint,
.overlay .panel.clan-hall-v2 .meta {
  color: #c8b090 !important;
}
.overlay .panel.clan-hall-v2 .clan-desc-text {
  color: #f0e0c8 !important;
}
.overlay .panel.clan-hall-v2 .clan-pill {
  color: #f0e0c8;
  background: rgba(60, 40, 20, 0.55);
  border-color: rgba(180, 130, 70, 0.35);
}
.overlay .panel.clan-hall-v2 .clan-members li,
.overlay .panel.clan-hall-v2 .clan-apps li,
.overlay .panel.clan-hall-v2 .clan-vault li,
.overlay .panel.clan-hall-v2 .clan-bank-log li {
  background: rgba(40, 28, 18, 0.72);
  border-color: rgba(160, 110, 55, 0.28);
  color: #f0e0c8;
}
.overlay .panel.clan-hall-v2 .clan-vault-name,
.overlay .panel.clan-hall-v2 .clan-member-name,
.overlay .panel.clan-hall-v2 .clan-you {
  color: #ffe8b8 !important;
}
.overlay .panel.clan-hall-v2 .reg-input,
.overlay .panel.clan-hall-v2 select.reg-input,
.overlay .panel.clan-hall-v2 textarea.reg-input {
  background: rgba(12, 8, 6, 0.75);
  color: #f0e0c8;
  border-color: rgba(160, 110, 55, 0.45);
}
.clan-vault-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}
.clan-vault-pick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid rgba(160, 110, 55, 0.4);
  background: rgba(28, 18, 12, 0.85);
  color: #f0e0c8;
  cursor: pointer;
  font: 600 11px/1.2 Georgia, 'Times New Roman', serif;
  text-align: center;
}
.clan-vault-pick-card img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: auto;
}
.clan-vault-pick-card:hover,
.clan-vault-pick-card:focus {
  border-color: rgba(212, 160, 80, 0.75);
  background: rgba(50, 34, 20, 0.95);
}
.clan-vault-row .clan-vault-ico {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex: none;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 2px;
}
.clan-vault-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
}
.clan-member-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 140px;
  min-width: 0;
}
.clan-member-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}
.clan-member-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 8px;
  border: 1px solid rgba(0, 0, 0, 0.25);
}
.clan-member-dot.on {
  background: #5cb85c;
  box-shadow: 0 0 6px rgba(80, 200, 80, 0.65);
}
.clan-member-dot.off {
  background: #6a6058;
}
.clan-member-row.is-self {
  box-shadow: inset 0 0 0 1px rgba(201, 148, 74, 0.45);
}
.clan-you {
  font-size: 11px;
  font-weight: 600;
  color: #8a6020;
}
.clan-member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.qt-abandon {
  margin-top: 5px;
  margin-right: 6px;
  background: linear-gradient(180deg, #6a4038, #4a2820) !important;
  border: 1px solid #8a5040 !important;
  color: #ffe8d8 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 4px 8px !important;
  border-radius: 4px;
  cursor: pointer;
}

/* coe706 mail-chat-broken */
/* coe706 mail-chat-broken */
.coe-pack-cell.is-broken img {
  filter: sepia(0.55) saturate(2.2) hue-rotate(-25deg) brightness(0.92);
}
.coe-pack-cell.is-broken {
  box-shadow: inset 0 0 0 1px rgba(180, 40, 30, 0.55);
}
.coe-pack-cell .pack-dura.broken {
  color: #fff;
  background: rgba(140, 30, 20, 0.85);
  font-size: 9px;
}
#btnMail {
  position: relative;
}
#btnMail.has-mail .hud-mail-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #e86848, #a82818);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.45);
  z-index: 2;
  pointer-events: none;
}
#btnMail.has-mail-pulse .hud-icon-wrap {
  animation: mailPulse 1.1s ease-in-out infinite;
}
@keyframes mailPulse {
  0%, 100% { filter: brightness(1); transform: scale(1); }
  50% { filter: brightness(1.35) drop-shadow(0 0 6px rgba(255, 180, 80, 0.85)); transform: scale(1.06); }
}
.coe-chat .chat-chbtn.has-unread:not(.on) {
  box-shadow: 0 0 0 1px rgba(255, 200, 90, 0.55), 0 0 10px rgba(255, 170, 60, 0.35);
  animation: chatTabGlow 1.4s ease-in-out infinite;
}
.coe-chat .chat-chbtn.has-unread:not(.on) .chat-led {
  background: #ffc050 !important;
  box-shadow: 0 0 6px rgba(255, 190, 70, 0.9);
}
@keyframes chatTabGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.18); }
}

/* ===== coe801: чат уже (под картой), жители вниз, компактные значки ===== */
html.is-desktop #app.coe-app:not(.combat-active) {
  grid-template-columns: minmax(0, 1fr) var(--rail-w);
}

html.is-desktop #app.coe-app:not(.combat-active) #playShell {
  display: contents;
}

html.is-desktop #app.coe-app:not(.combat-active) .coe-hud {
  grid-column: 1 / -1;
}

html.is-desktop #app.coe-app:not(.combat-active) #stage {
  grid-column: 1;
  grid-row: 2;
  min-height: 0;
}

html.is-desktop #app.coe-app:not(.combat-active) #rightRail.kv-rail {
  grid-column: 2;
  grid-row: 2 / 4;
  min-height: 0;
  align-self: stretch;
  padding-bottom: 4px;
}

html.is-desktop #app.coe-app:not(.combat-active) #gameChat.coe-chat {
  grid-column: 1;
  grid-row: 3;
  width: auto;
  max-width: none;
  margin: 0 4px calc(4px + var(--safe-bottom, 0px)) 6px;
  border-radius: 6px;
  box-shadow:
    inset 0 0 0 1px #8a6030,
    0 3px 12px rgba(0, 0, 0, 0.45);
}

html.is-desktop #app.coe-app:not(.combat-active) .kv-rail .rail-quests {
  flex: 1 1 50% !important;
  min-height: 0 !important;
  max-height: none !important;
  display: flex !important;
  flex-direction: column !important;
}

html.is-desktop #app.coe-app:not(.combat-active) .kv-rail .rail-quests .quest-tracker {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: thin;
}

html.is-desktop #app.coe-app:not(.combat-active) .kv-rail .rail-residents {
  flex: 1 1 50% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin-top: 0 !important;
  display: flex;
  flex-direction: column;
}

html.is-desktop #app.coe-app:not(.combat-active) .kv-rail .rail-residents .rail-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

html.is-desktop #app.coe-app:not(.combat-active) .kv-rail .residents-list {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  align-content: flex-start;
}

html.is-desktop #app.coe-app:not(.combat-active) .kv-rail .residents-meta {
  flex: 0 0 auto;
}

html.is-desktop #app.coe-app:not(.combat-active) .kv-rail .residents-list .online-row {
  padding: 5px 6px !important;
  gap: 3px !important;
  border-radius: 4px;
  margin-bottom: 2px;
  background: rgba(255, 252, 235, 0.35);
}

html.is-desktop #app.coe-app:not(.combat-active) .kv-rail .peer-top {
  gap: 4px;
}

html.is-desktop #app.coe-app:not(.combat-active) .kv-rail .peer-bot {
  min-height: 0;
  gap: 4px;
  padding-top: 1px;
}

html.is-desktop #app.coe-app:not(.combat-active) .kv-rail .chat-rank-ico,
html.is-desktop #app.coe-app:not(.combat-active) .coe-chat .chat-rank-ico {
  width: 18px !important;
  height: 20px !important;
  max-width: 18px !important;
  min-width: 18px !important;
  min-height: 20px !important;
  flex: 0 0 18px !important;
}

html.is-desktop #app.coe-app:not(.combat-active) .kv-rail .peer-act,
html.is-desktop #app.coe-app:not(.combat-active) .kv-rail .atk-sword-btn,
html.is-desktop #app.coe-app:not(.combat-active) .residents-list .peer-act,
html.is-desktop #app.coe-app:not(.combat-active) .residents-list .atk-sword-btn {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  font-size: 10px !important;
  line-height: 1 !important;
  border-radius: 3px !important;
}

html.is-desktop #app.coe-app:not(.combat-active) .kv-rail .peer-act.invite,
html.is-desktop #app.coe-app:not(.combat-active) .residents-list .peer-act.invite {
  font-size: 11px !important;
  font-weight: 800;
}

html.is-desktop #app.coe-app:not(.combat-active) .kv-rail .peer-actions,
html.is-desktop #app.coe-app:not(.combat-active) .residents-list .peer-actions {
  gap: 3px !important;
}

html.is-desktop #app.coe-app:not(.combat-active) .kv-rail .peer-lvl,
html.is-desktop #app.coe-app:not(.combat-active) .residents-list .peer-lvl {
  font-size: 10px !important;
  padding: 0 5px !important;
  line-height: 1.3;
}

html.is-desktop #app.coe-app:not(.combat-active) #gameChat.coe-chat .chat-log {
  min-height: 0 !important;
}

html.is-desktop #app.coe-app:not(.combat-active) .kv-rail .chat-vip-badge {
  font-size: 9px !important;
  padding: 0 4px !important;
  line-height: 1.35;
}

/* ===== chat rules + system banners (coe803) ===== */
.coe-chat .chat-line.sys .chat-sys-banner {
  display: inline-block;
  line-height: 1.45;
  padding: 2px 0;
}
.coe-chat .chat-sys-queen {
  color: #5a3018;
}
.coe-chat .chat-sys-queen-live {
  color: #2a5a18;
}
.coe-chat .chat-sys-rules-inline {
  display: inline;
  font-size: 10px;
  line-height: 1.4;
  color: #3a2818;
}
.coe-chat .chat-sys-card.chat-sys-rules {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  color: inherit;
}
.coe-chat .chat-sys-rules-text {
  font-size: 10px;
  line-height: 1.35;
  color: inherit;
}
.coe-chat .chat-sys-rules-actions {
  display: inline;
  pointer-events: auto;
}
.coe-chat .chat-line.sys.chat-line-rules {
  margin: 2px 0 4px;
}
.coe-chat .chat-line.sys.chat-line-deploy {
  margin: 2px 0 4px;
  padding: 0;
}
.coe-chat .chat-sys-deploy {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  color: #5c4a32;
  font-size: 12px;
  line-height: 1.4;
}
.coe-chat .chat-sys-deploy b {
  color: #3d2e1a;
  font-weight: 800;
}
.coe-chat .chat-sys-deploy-badge {
  display: inline;
  margin-right: 4px;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(120, 90, 40, 0.12);
  color: #6b5428;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: baseline;
  box-shadow: none;
}
.coe-chat .chat-sys-deploy-hint {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  color: #9ec5ff;
}
.coe-chat .chat-line.sys.chat-line-dev {
  margin: 6px 0;
}
.coe-chat .chat-sys-dev {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  border: 2px solid #c9a04a;
  background: linear-gradient(145deg, #3d2e14 0%, #1f1608 50%, #2a2010 100%);
  color: #fff3dc;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}
.coe-chat .chat-sys-dev-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: linear-gradient(180deg, #e8b84a, #a87218);
  color: #1a1000;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
}
.coe-chat .chat-sys-dev-name {
  font-size: 14px;
  color: #ffe8b0;
}
.coe-chat .chat-sys-dev-body {
  margin-top: 8px;
  color: #fff8eb;
}
.coe-chat .chat-sys-dev-body b {
  font-weight: 900;
  color: #fff;
}
.coe-chat .chat-head-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}
.coe-chat .chat-rules-head-btn {
  flex: 0 0 auto;
  height: 18px;
  padding: 0 6px;
  margin-left: 0;
  border-radius: 5px;
  border: 1px solid #5c3a22;
  background: linear-gradient(180deg, #7a5034 0%, #4a301c 55%, #3a2414 100%);
  color: #ff2222;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255, 80, 80, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 220, 180, 0.22), 0 1px 2px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.75);
}
.coe-chat .chat-story-head-btn {
  color: #ffe8c8;
  border-color: #5a4828;
  background: linear-gradient(180deg, #6a5438 0%, #4a3820 100%);
}
.coe-chat .chat-rules-head-btn:hover,
.coe-chat .chat-rules-head-btn:focus-visible {
  border-color: #8a5530;
  color: #ff4040;
  filter: brightness(1.08);
}
html.is-mobile .coe-chat .chat-rules-head-btn {
  height: 20px;
  min-width: 0;
  padding: 0 5px;
  font-size: 8px;
  border-radius: 5px;
}
html.is-mobile #gameChat.coe-chat .chat-head {
  flex-wrap: wrap;
  height: auto !important;
  min-height: 30px !important;
  max-height: none !important;
  row-gap: 3px;
  padding: 2px 4px !important;
}
html.is-mobile #gameChat.coe-chat .chat-chs {
  flex: 1 1 100%;
  order: 3;
  min-width: 0;
  max-width: 100%;
  padding-bottom: 1px;
}
html.is-mobile #gameChat.coe-chat .chat-head-actions {
  margin-left: auto;
  gap: 3px;
}
html.is-mobile #gameChat.coe-chat .chat-power-btn {
  flex: 0 0 auto !important;
}
html.is-mobile #app.combat-active.coe-theme-golden .play-shell {
  overflow: hidden !important;
}
html.is-mobile .coe-profile.fantasy-frame,
html.is-mobile .overlay .panel.coe-profile {
  max-height: min(86vh, calc(100dvh - var(--hud-h) - var(--chat-h) - 12px)) !important;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
html.is-mobile .coe-pack-grid {
  gap: 4px;
}
html.is-mobile .coe-pack-cell img {
  max-height: 36px;
  width: auto;
}
.chat-soft-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  border: 1px solid rgba(108, 112, 122, 0.5);
  background: linear-gradient(180deg, #545860 0%, #404448 100%);
  color: #ff7070;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255, 120, 120, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: filter 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.chat-soft-btn:hover:not(:disabled),
.chat-soft-btn:focus-visible:not(:disabled) {
  filter: brightness(1.07);
  border-color: rgba(140, 145, 155, 0.75);
  color: #ff8585;
}
.chat-soft-btn:disabled {
  cursor: default;
  color: rgba(255, 130, 130, 0.42);
  opacity: 0.82;
}
.chat-rules-open-btn {
  margin: 0;
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 800;
}
html.is-mobile .chat-soft-btn {
  min-height: 24px;
  padding: 0 9px;
  font-size: 9px;
}
.coe-chat .chat-line.sys .chat-rules-open-btn {
  display: inline-flex;
}
.chat-rules-ok-btn {
  min-width: 120px;
  text-transform: none;
  letter-spacing: 0.02em;
}

.coe-chat .chat-sos-msg {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  color: #3a2818;
  font-size: 10px;
  line-height: 1.38;
  pointer-events: auto;
}
.coe-chat .chat-sos-card {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}
.coe-chat .chat-sos-lead b {
  color: #2a1808;
  font-weight: 800;
}
.coe-chat .chat-sos-ctrl,
.coe-chat .chat-sos-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
  margin-left: 3px;
  pointer-events: auto;
}
.coe-chat .chat-sos-slots {
  font-size: 8px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: rgba(58, 40, 24, 0.72);
  letter-spacing: 0.03em;
}
.coe-chat .chat-line-sos {
  margin: 2px 0 3px;
}
.chat-sos-btn,
.chat-rules-chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 0 7px;
  border-radius: 5px;
  border: 1px solid #5c3a22;
  background: linear-gradient(180deg, #7a5034 0%, #4a301c 55%, #3a2414 100%);
  color: #ff1a1a;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255, 60, 60, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 180, 0.2),
    0 0 0 1px rgba(90, 90, 98, 0.35),
    0 1px 3px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.85);
  transition: filter 0.12s ease, color 0.12s ease;
}
.chat-rules-chip-btn {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 8px;
  min-height: 17px;
  padding: 0 6px;
  margin-left: 4px;
  vertical-align: middle;
}
.chat-sos-btn:hover:not(:disabled),
.chat-sos-btn:focus-visible:not(:disabled),
.chat-rules-chip-btn:hover,
.chat-rules-chip-btn:focus-visible {
  color: #ff4040;
  filter: brightness(1.1);
}
.chat-sos-btn:disabled {
  cursor: default;
  color: rgba(255, 70, 70, 0.45);
  opacity: 0.78;
}
html.is-mobile .chat-sos-btn,
html.is-mobile .chat-rules-chip-btn {
  min-height: 20px;
  padding: 0 8px;
  font-size: 9px;
}
.chat-rules-layer {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 4, 2, 0.72);
  animation: partyDiceFadeIn 0.2s ease-out;
}
.chat-rules-layer.out {
  opacity: 0;
  transition: opacity 0.2s ease;
}
/* fantasy-frame даёт тёмное дерево !important — перекрываем пергаментом */
.chat-rules-panel,
.chat-rules-panel.fantasy-frame {
  position: relative;
  width: min(480px, 96vw);
  max-height: min(88vh, 640px);
  display: flex;
  flex-direction: column;
  padding: 14px 16px 12px;
  background:
    url('../processed/kv/create/parchment.png') center / cover no-repeat,
    linear-gradient(180deg, #f8ecd0 0%, #e8d4a8 55%, #d4b878 100%) !important;
  border: 2px solid #8a5a18 !important;
  border-radius: 8px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 230, 180, 0.45),
    0 12px 40px rgba(0, 0, 0, 0.55) !important;
  color: #1a0e08 !important;
}
.coe-theme-golden .chat-rules-panel.fantasy-frame {
  background:
    url('../processed/kv/create/parchment.png') center / cover no-repeat,
    linear-gradient(180deg, #f8ecd0 0%, #e8d4a8 55%, #d4b878 100%) !important;
  border-color: #a87038 !important;
}
.chat-rules-panel h2 {
  margin: 0 0 10px;
  padding-right: 28px;
  font-size: 18px;
  color: #3d2010 !important;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 248, 220, 0.6);
}
.chat-rules-panel h3 {
  margin: 12px 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: #4a2810 !important;
}
.chat-rules-panel .chat-rules-body,
.chat-rules-panel .chat-rules-body li,
.chat-rules-panel .chat-rules-body b {
  color: #1a0e08 !important;
}
.chat-rules-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  font-size: 13px;
  line-height: 1.5;
}
.chat-rules-body ul {
  margin: 0 0 8px;
  padding-left: 18px;
}
.chat-rules-body li {
  margin: 4px 0;
}
.chat-rules-foot,
.chat-rules-panel .chat-rules-foot.meta {
  margin: 10px 0 0;
  font-size: 12px;
  color: #3d2818 !important;
  opacity: 1;
}
.chat-rules-actions {
  flex: 0 0 auto;
  margin-top: 12px;
  text-align: center;
}
.chat-rules-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 1px solid #8a6830;
  border-radius: 4px;
  background: rgba(255, 248, 220, 0.8);
  color: #4a2810;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.chat-rules-close:hover {
  background: #fff6d8;
}

/* —— Книга мира (история) —— */
.coe-chat .chat-story-head-btn {
  border-color: #6a8aa8;
  background: linear-gradient(180deg, #3a4858, #1e2838);
  color: #d8e8ff;
}
.coe-chat .chat-story-head-btn:hover,
.coe-chat .chat-story-head-btn:focus-visible {
  border-color: #a8c8e8;
  color: #f0f8ff;
}
.story-book-layer {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(4, 8, 16, 0.78);
  animation: partyDiceFadeIn 0.2s ease-out;
}
.story-book-layer.out {
  opacity: 0;
  transition: opacity 0.2s ease;
}
.story-book-panel {
  position: relative;
  width: min(440px, 96vw);
  max-height: min(88vh, 620px);
  display: flex;
  flex-direction: column;
  padding: 16px 18px 14px;
  background:
    url('../processed/kv/create/parchment.png') center / cover no-repeat,
    linear-gradient(165deg, #e8dcc0 0%, #c8a870 45%, #a88048 100%);
  border: 3px solid #5a3810;
  border-radius: 6px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 240, 200, 0.4),
    0 16px 48px rgba(0, 0, 0, 0.55);
  color: #1a0e08;
  overflow: hidden;
}
.story-book-close {
  z-index: 2;
}
.story-book-cover {
  text-align: center;
  padding: 4px 8px 12px;
  border-bottom: 1px solid rgba(42, 22, 8, 0.25);
}
.story-book-emblem {
  display: block;
  width: 52px;
  height: 52px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(180, 220, 255, 0.95), rgba(40, 100, 180, 0.5) 45%, transparent 70%),
    linear-gradient(145deg, #3a2818, #1a1008);
  border: 2px solid #8a6830;
  box-shadow: 0 0 18px rgba(80, 160, 255, 0.35);
}
.story-book-panel h2 {
  margin: 0 0 6px;
  font: 700 20px Georgia, "Times New Roman", serif;
  color: #2a1408;
}
.story-book-lead {
  margin: 0;
  font: 13px/1.45 Georgia, "Times New Roman", serif;
  color: #3a2010;
}
.story-book-toc {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.story-book-chapter {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #8a6830;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255, 248, 220, 0.92), rgba(232, 200, 140, 0.85));
  color: #1a1008;
  font-family: Georgia, "Times New Roman", serif;
  text-align: left;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.story-book-chapter:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}
.story-book-chapter-num {
  font-size: 16px;
  font-weight: 700;
}
.story-book-chapter-sub {
  font-size: 13px;
  color: #4a2818;
}
.story-book-chapter.locked {
  opacity: 0.72;
  cursor: default;
  background: linear-gradient(180deg, rgba(220, 210, 190, 0.7), rgba(180, 160, 130, 0.65));
}
.story-book-soon {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6a4830;
}
.story-book-foot {
  margin: 8px 0 0;
  font-size: 11px;
  text-align: center;
  color: #4a3020 !important;
}
.overlay .panel.dev-letter-panel.story-book-letter {
  width: min(580px, 94vw);
  max-height: min(92vh, 820px);
}
.story-book-scroll .dev-letter-p {
  text-align: justify;
  hyphens: auto;
}
.story-book-scroll .dev-letter-p:first-of-type {
  text-indent: 0;
}
.story-book-figure {
  margin: 14px 0 10px;
  padding: 0;
}
.story-book-figure-frame {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid #7a4818;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(120, 180, 255, 0.35), transparent 55%),
    linear-gradient(180deg, #1a2030 0%, #0a0c14 100%);
}
.story-book-figure-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(80, 140, 220, 0.25), transparent 50%),
    linear-gradient(180deg, #283048, #101820);
  pointer-events: none;
}
.story-book-figure-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-book-figure-img.missing {
  opacity: 0;
}
.story-book-figure-cap {
  margin: 6px 0 0;
  font: italic 12px Georgia, "Times New Roman", serif;
  text-align: center;
  color: #4a2818 !important;
}
.story-book-letter-actions {
  flex-shrink: 0;
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* Рюкзак → пояс: выбор количества расходников */
.coe-belt-qty-modal {
  position: fixed;
  inset: 0;
  z-index: 50000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px));
  background: rgba(8, 4, 2, 0.78);
  pointer-events: auto;
  -webkit-overflow-scrolling: touch;
}
.coe-belt-qty-rules {
  margin-top: 4px !important;
  font-size: 11px !important;
  opacity: 0.9;
}
.coe-belt-qty-prompt {
  margin: 0 0 10px !important;
  font-size: 13px !important;
  color: #e8d4a8 !important;
}
.coe-belt-qty-card {
  width: min(340px, 94vw);
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(201, 148, 74, 0.45);
  background:
    linear-gradient(165deg, rgba(48, 32, 18, 0.98), rgba(18, 12, 8, 0.98));
  color: #f0e0c8;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
}
.coe-belt-qty-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.coe-belt-qty-head img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex: none;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 3px;
}
.coe-belt-qty-head b {
  display: block;
  color: #ffe8b8;
  font-size: 15px;
}
.coe-belt-qty-head .meta {
  margin: 4px 0 0;
  color: #c8b090 !important;
}
.coe-belt-qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.coe-belt-qty-row input[type="number"] {
  width: 64px;
  text-align: center;
  font-size: 16px !important;
  padding: 6px 4px;
  border-radius: 6px;
  border: 1px solid rgba(160, 110, 55, 0.5);
  background: rgba(12, 8, 6, 0.8);
  color: #f0e0c8;
}
.coe-belt-qty-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Надеть / снять — игровое окно вместо window.confirm */
.coe-game-confirm {
  position: fixed;
  inset: 0;
  z-index: 50050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px));
  background: rgba(6, 3, 2, 0.78);
  pointer-events: auto;
}
.coe-game-confirm-card {
  width: min(360px, 94vw);
  padding: 18px 16px 14px;
  text-align: left;
  background: linear-gradient(165deg, #3a2818 0%, #16100a 100%);
  color: #f0e0c8;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(201, 148, 74, 0.28);
  border-radius: 8px;
}
.coe-game-confirm-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.coe-game-confirm-head img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex: none;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  padding: 4px;
  border: 1px solid rgba(201, 148, 74, 0.35);
}
.coe-game-confirm-head b {
  display: block;
  color: #ffe8b8;
  font-size: 17px;
  margin-bottom: 4px;
}
.coe-game-confirm-head .meta {
  margin: 0;
  color: #d4c0a0 !important;
  font-size: 14px;
  line-height: 1.35;
}
.coe-game-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.coe-game-confirm-actions .btn {
  min-width: 110px;
  min-height: 40px;
}

