/* game/css/main.css — стили игры, тёмная тема */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #1a1a2e;
  color: #e0e0e0;
  font-family: monospace;
  font-size: 14px;
}

/* #app удалён — теперь используется #shell и #content */

/* Многострочный текст (description-подобные поля) — textContent не превращает
   \n в видимый перенос строки при white-space: normal (по умолчанию), навешивается
   на контейнеры, куда пишутся свободнотекстовые поля из dev-редакторов.
   См. docs/architecture/dev_tools_string_escaping.md */
.text-multiline {
  white-space: pre-wrap;
}

/* ==================== ОБЩИЕ ЭКРАНЫ ==================== */

.screen {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.screen-heading {
  font-size: 22px;
  color: #c0c0ff;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* ==================== КНОПКИ ==================== */

.btn {
  display: inline-block;
  padding: 8px 18px;
  background: #16213e;
  color: #e0e0e0;
  border: 1px solid #444466;
  border-radius: 4px;
  font-family: monospace;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn:hover:not(:disabled) {
  background: #1f3060;
  border-color: #8888cc;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn.selected {
  background: #2a2a6a;
  border-color: #aaaaff;
  color: #ffffff;
}

.btn-primary {
  background: #1e3a5f;
  border-color: #5577aa;
  color: #d0e8ff;
  font-weight: bold;
}

.btn-primary:hover:not(:disabled) {
  background: #254a78;
  border-color: #88aadd;
}

.btn-secondary {
  background: #2a1a3a;
  border-color: #554466;
  color: #ccaadd;
}

.btn-secondary:hover:not(:disabled) {
  background: #3a2a4a;
  border-color: #9977bb;
}

/* Кнопки классов */
.class-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.btn-class {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 12px;
  background: #16213e;
  border: 1px solid #334;
  min-height: 64px;
  text-align: left;
}

.btn-class:hover:not(:disabled) {
  background: #1f3060;
  border-color: #6677aa;
}

.btn-class.selected {
  background: #1e2a5a;
  border-color: #8899ff;
}

.class-btn-name {
  font-size: 14px;
  font-weight: bold;
  color: #d0d0ff;
}

.class-btn-desc {
  font-size: 11px;
  color: #8899bb;
  line-height: 1.3;
}

/* ==================== ФОРМЫ ==================== */

.create-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 540px;
}

.form-label {
  font-size: 12px;
  color: #9999cc;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-label.label-error {
  color: #ff6666;
}

.form-input {
  padding: 8px 12px;
  background: #12192e;
  color: #e0e0e0;
  border: 1px solid #444466;
  border-radius: 4px;
  font-family: monospace;
  font-size: 14px;
  width: 100%;
  max-width: 280px;
}

.form-input:focus {
  outline: none;
  border-color: #8888cc;
}

.form-input.input-error {
  border-color: #ff6666;
}

/* ==================== КАРТОЧКА ПЕРСОНАЖА ==================== */

.char-card {
  background: #12192e;
  border: 1px solid #334466;
  border-radius: 6px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 400px;
}

.player-card {
  border-color: #445577;
}

.char-card-name {
  font-size: 18px;
  color: #d0d0ff;
  font-weight: bold;
}

.char-card-info {
  font-size: 12px;
  color: #8899bb;
}

.char-card-xp {
  font-size: 12px;
  color: #6688aa;
  margin-top: 4px;
}

.char-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.char-card-active {
  border-color: #5577cc;
  background: #151e38;
}

.char-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.char-active-badge {
  font-size: 10px;
  font-weight: normal;
  color: #7799dd;
  background: #1e2d50;
  border: 1px solid #334466;
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==================== РЕЗУЛЬТАТ РАУНДА ==================== */

.result-title {
  font-size: 13px;
  color: #aabbcc;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.result-line {
  font-size: 13px;
  padding: 3px 0;
}

.result-player {
  color: #88ccff;
}

.result-bot {
  color: #ff9988;
}

.result-stances {
  font-size: 11px;
  color: #6677aa;
  margin-top: 4px;
}

/* ==================== ЛОГ БОЯ ==================== */

.log-line {
  font-size: 11px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 2px 0;
}

.log-line-player {
  color: #6699cc;
  border-bottom: none;
}

.log-line-bot {
  color: #cc7766;
  border-bottom: 1px solid #111122;
  padding-bottom: 4px;
  margin-bottom: 2px;
}

.log-round {
  color: #445566;
  min-width: 24px;
  flex-shrink: 0;
}

.log-hp {
  margin-left: auto;
  color: #445566;
  font-size: 10px;
  flex-shrink: 0;
}

/* Нарративный лог — стили элементов строк */
.log-sep-round {
  border: none;
  border-top: 1px solid #1a2535;
  margin: 4px 0;
}

.log-crit      { color: #ff9933; font-weight: bold; }
.log-dmg       { color: #ff6666; }
.log-hp-inline { color: #556677; font-size: 10px; }

/* Итоговые строки боя */
.log-summary-sep  { color: #334455; display: block; text-align: center; padding: 4px 0; }
.log-summary-win  { color: #66cc66; font-weight: bold; display: block; padding: 2px 0; }
.log-summary-loss { color: #ff6666; font-weight: bold; display: block; padding: 2px 0; }
.log-summary-xp   { color: #ffdd66; display: block; padding: 1px 0; }
.log-summary-loot { display: block; padding: 1px 0; }

/* ==================== ЭКРАН КОНЕЦ БОЯ ==================== */

.screen-end {
  max-width: 500px;
}

.outcome-win {
  color: #88ffaa;
}

.outcome-draw {
  color: #ffdd88;
}

.outcome-loss {
  color: #ff6677;
}

.end-stats {
  background: #0f1629;
  border: 1px solid #223;
  border-radius: 4px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #aabbcc;
}

.xp-gained {
  font-size: 18px;
  color: #ffdd66;
  font-weight: bold;
}

.level-up {
  font-size: 15px;
  color: #88ffcc;
  font-weight: bold;
}

.tier-up {
  font-size: 16px;
  color: #ffaa44;
  font-weight: bold;
}

/* ==================== ИНВЕНТАРЬ ==================== */

.loot-block {
  background: #0f1629;
  border: 1px solid #334466;
  border-radius: 4px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 400px;
}

.loot-title {
  font-size: 11px;
  color: #7788aa;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.loot-item-name {
  font-size: 15px;
  font-weight: bold;
}

.loot-item-desc {
  font-size: 12px;
  color: #8899bb;
}

.loot-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gear-slots {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.gear-slot {
  padding: 6px 10px;
  background: #0f1629;
  border: 1px solid #223344;
  border-radius: 4px;
  font-size: 11px;
  color: #7788aa;
  min-width: 120px;
}

.gear-slot-name {
  color: #aabbcc;
  font-weight: bold;
}

.gear-slot-empty {
  color: #334455;
  font-style: italic;
}

.stat-final-list {
  background: #0f1629;
  border: 1px solid #223344;
  border-radius: 4px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 400px;
}

.stat-final-title {
  font-size: 11px;
  color: #7788aa;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.stat-final-row {
  font-size: 12px;
  color: #aabbcc;
}

.stat-final-bonus {
  color: #5599ff;
}

.btn-small {
  padding: 4px 10px;
  font-size: 12px;
  background: #16213e;
  border: 1px solid #334466;
}

/* ==================== АДАПТИВНОСТЬ (старые экраны) ==================== */

@media (max-width: 600px) {
  .class-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==================== ШЕЛ И НАВИГАЦИЯ ==================== */

#shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

#nav-main {
  display: flex;
  gap: 2px;
  background: #0a0f1e;
  border-bottom: 2px solid #334466;
  padding: 8px 12px 0;
}

.tab-main {
  padding: 6px 18px;
  background: #12192e;
  color: #7788aa;
  border: 1px solid #223344;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  font-family: monospace;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.tab-main:hover {
  background: #1a2540;
  color: #aabbcc;
}

.tab-main.active {
  background: #1a1a2e;
  color: #c0c0ff;
  border-color: #334466;
  border-bottom-color: #1a1a2e;
  font-weight: bold;
}

.tab-main--locked {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: all;
}

.tab-main--locked:hover {
  background: #12192e;
  color: #7788aa;
}

.combat-block-notice {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a0a05;
  border: 1px solid #664422;
  border-radius: 6px;
  padding: 8px 18px;
  color: #ff9966;
  font-size: 12px;
  font-family: monospace;
  z-index: 9999;
  pointer-events: none;
  animation: fadeInOut 2.5s ease forwards;
}

@keyframes fadeInOut {
  0%   { opacity: 0; transform: translateX(-50%) translateY(6px); }
  15%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  75%  { opacity: 1; }
  100% { opacity: 0; }
}

#content {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* ==================== НИЖНЯЯ ПАНЕЛЬ ЛОГА ==================== */

#log-panel {
  height: 175px;
  border-top: 2px solid #1a2535;
  background: #07090f;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: height 0.15s ease;
}

#log-panel.log-panel--collapsed {
  height: auto;
}

#log-panel.log-panel--collapsed .lp-body {
  display: none;
}

.lp-tabs {
  display: flex;
  gap: 2px;
  align-items: center;
  background: #0a0d18;
  border-bottom: 1px solid #1a2535;
  padding: 4px 8px 0;
  flex-shrink: 0;
}

.lp-toggle {
  margin-left: auto;
  margin-bottom: 4px;
  padding: 1px 8px;
  background: transparent;
  border: 1px solid #1a2535;
  border-radius: 3px;
  color: #445566;
  font-size: 10px;
  cursor: pointer;
  line-height: 1.4;
}

.lp-toggle:hover {
  color: #7788aa;
  border-color: #334455;
}

.lp-tab {
  padding: 3px 14px;
  background: #0d1020;
  color: #445566;
  border: 1px solid #1a2535;
  border-bottom: none;
  border-radius: 3px 3px 0 0;
  font-family: monospace;
  font-size: 12px;
  cursor: pointer;
}

.lp-tab.active {
  background: #07090f;
  color: #8899bb;
  border-color: #1a2535;
}

.lp-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 10px 4px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-height: 0;
}

.lp-empty {
  color: #2a3a4a;
  font-size: 12px;
  font-style: italic;
  padding: 6px 0;
}

/* Обычная запись */
.lp-entry {
  font-size: 12px;
  padding: 1px 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  line-height: 1.5;
}

.lp-time      { color: #2a3a4a; flex-shrink: 0; font-size: 11px; }
.lp-travel    { color: #5577aa; }
.lp-quest     { color: #6699aa; }
.lp-quest-done { color: #55aa77; }
.lp-levelup   { color: #ccaa33; font-weight: bold; }
.lp-rewards   { color: #667788; font-size: 11px; }

/* Бой */
.lp-win       { color: #44aa66; font-weight: bold; }
.lp-loss      { color: #aa4444; }
.lp-draw      { color: #666677; }
.lp-combat-vs { color: #8899bb; }

.lp-combat-entry {
  flex-direction: column;
  align-items: flex-start;
}

.lp-combat-summary {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
}

.lp-expand-btn {
  font-family: monospace;
  font-size: 10px;
  color: #2a3a4a;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 2px;
  margin-left: auto;
}

.lp-expand-btn:hover { color: #5577aa; }

/* Детали боя */
.lp-combat-details {
  margin: 2px 0 4px 14px;
  border-left: 2px solid #12192e;
  padding-left: 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: 120px;
  overflow-y: auto;
}

.lp-combat-details.hidden { display: none; }

.lp-detail-line {
  font-size: 11px;
  line-height: 1.4;
}

/* Обновления квестов внутри записи боя */
.lp-quest-updates { margin-left: 14px; }

.lp-quest-update {
  font-size: 11px;
  color: #55886a;
}

/* ==================== ЭКРАН ПЕРСОНАЖА ==================== */

.char-sheet {
  display: grid;
  grid-template-columns: 200px 1fr 1fr;
  align-items: start;
  border: 1px solid #334466;
  border-radius: 6px;
  overflow: hidden;
  min-width: 540px;
}

.char-sheet-col {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #0d1525;
  border-right: 1px solid #223344;
  min-height: 400px;
}

.char-sheet-col:last-child {
  border-right: none;
}

.col-heading {
  font-size: 10px;
  color: #556677;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: #0a1020;
  border-bottom: 1px solid #223344;
  padding: 6px 10px;
}

/* Слоты экипировки */
.equip-slot {
  border-bottom: 1px solid #1a2535;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.equip-slot-label {
  font-size: 9px;
  color: #334455;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.equip-slot-item {
  font-size: 12px;
  font-weight: bold;
}

.equip-slot-empty {
  font-size: 11px;
  color: #2a3a4a;
  font-style: italic;
}

.equip-slot-bonus {
  font-size: 10px;
  color: #445566;
}

.equip-group-label {
  font-size: 10px;
  color: #334455;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 10px 0 4px;
  padding-top: 8px;
  border-top: 1px solid #1a2535;
}
.equip-group-label:first-child {
  margin-top: 0;
  border-top: none;
}

.equip-slot-locked {
  font-size: 11px;
  color: #2a3a4a;
  font-style: italic;
  padding: 2px 0;
}

.equip-slot-soon {
  font-size: 10px;
  color: #2a3a4a;
  font-style: italic;
}

/* Статистика */
.stat-col-inner {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.char-name-row {
  font-size: 14px;
  font-weight: bold;
  color: #d0d0ff;
  padding: 2px 0 1px;
}

.char-class-row {
  font-size: 11px;
  color: #6677aa;
  padding-bottom: 6px;
  border-bottom: 1px solid #1a2535;
  margin-bottom: 4px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  padding: 2px 0;
  border-bottom: 1px solid #111820;
}

.stat-row-label {
  color: #7788aa;
}

.stat-row-value {
  color: #c0c0ff;
  font-weight: bold;
}

.stat-section-title {
  font-size: 9px;
  color: #445566;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 8px;
  margin-bottom: 2px;
  padding-top: 6px;
  border-top: 1px solid #1a2535;
}

.stat-points-notice {
  background: #1a2030;
  border: 1px solid #445533;
  border-radius: 3px;
  padding: 5px 8px;
  font-size: 11px;
  color: #ffdd66;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 4px 0;
}

/* Инвентарь */
.inv-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #223344;
  background: #0a1020;
}

.inv-tab {
  padding: 5px 8px;
  background: transparent;
  color: #445566;
  border: none;
  border-right: 1px solid #1a2535;
  font-family: monospace;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

.inv-tab:hover { background: #0f1a2a; color: #8899aa; }

.inv-tab.active {
  background: #0d1525;
  color: #99aacc;
  font-weight: bold;
}

.inv-list {
  padding: 4px 6px;
}

.inv-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 6px;
  background: #0a1018;
  border: 1px solid #1a2535;
  border-radius: 2px;
  margin-bottom: 3px;
  gap: 6px;
}

.inv-item-info { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.inv-item-name { font-size: 11px; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; }
.inv-item-bonuses { font-size: 10px; color: #445566; }
.inv-item-req     { font-size: 10px; color: #cc4444; margin-top: 1px; }
.inv-item-empty { font-size: 11px; color: #2a3a4a; font-style: italic; padding: 8px 6px; }

/* Ховерабельное имя вещи в квестах, наградах, логах */
.item-link { cursor: default; border-bottom: 1px dotted currentColor; }

/* Hover-тултип вещи */
.item-hover-tt {
  position: fixed;
  z-index: 2000;
  background: #0d1525;
  border: 1px solid #334466;
  border-radius: 4px;
  padding: 10px 14px;
  min-width: 180px;
  max-width: 260px;
  pointer-events: none;
  font-family: monospace;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.6);
}
.iht-name    { font-size: 13px; font-weight: bold; }
.iht-meta    { font-size: 10px; color: #445566; text-transform: uppercase; letter-spacing: 1px; }
.iht-tags    { font-size: 11px; color: #7d8fa3; }
.iht-bonuses { font-size: 11px; color: #6688aa; }
.iht-desc    { font-size: 11px; color: #7788aa; font-style: italic; line-height: 1.4; }
.iht-req-title { font-size: 10px; color: #445566; text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }
.iht-req-row   { font-size: 11px; }
.iht-sell      { font-size: 10px; color: #ddaa44; margin-top: 4px; border-top: 1px solid #1a2535; padding-top: 4px; }
.iht-sell--no  { color: #445566; }

.item-tooltip-sell     { font-size: 11px; color: #ddaa44; margin-top: 6px; padding-top: 6px; border-top: 1px solid #1a2535; }
.item-tooltip-sell--no { color: #445566; }

/* XP полоска */
.xp-bar-wrap {
  height: 6px;
  background: #0a0f1e;
  border: 1px solid #1a2535;
  border-radius: 2px;
  overflow: hidden;
  margin: 3px 0 4px;
}
.xp-bar-fill {
  height: 100%;
  background: linear-gradient(to right, #2244aa, #4466cc);
  border-radius: 1px;
  transition: width 0.3s;
}

/* Кнопка маленькая */
.btn-small {
  padding: 3px 8px;
  font-size: 11px;
}

.stat-points-available {
  font-size: 11px;
  color: #ff9933;
  font-weight: bold;
  padding: 4px 0 2px;
}

.stat-row-left {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Кнопка + для статов */
.btn-stat-plus {
  padding: 0 6px;
  font-size: 13px;
  font-weight: bold;
  line-height: 18px;
  height: 18px;
  background: #1a3a1a;
  border: 1px solid #336633;
  border-radius: 3px;
  color: #66cc66;
  cursor: pointer;
  font-family: monospace;
  margin-left: 6px;
  flex-shrink: 0;
}

.btn-stat-plus:hover {
  background: #224422;
  border-color: #44aa44;
  color: #88ff88;
}

/* Кнопка − для статов */
.btn-stat-minus {
  padding: 0 6px;
  font-size: 13px;
  font-weight: bold;
  line-height: 18px;
  height: 18px;
  background: #2a1a1a;
  border: 1px solid #663333;
  border-radius: 3px;
  color: #cc6666;
  cursor: pointer;
  font-family: monospace;
  margin-left: 2px;
  flex-shrink: 0;
}

.btn-stat-minus:hover {
  background: #3a1a1a;
  border-color: #aa4444;
  color: #ff8888;
}

/* Flash-анимации боевого стата */
@keyframes statFlashUp {
  0%   { color: #66ff66; }
  100% { color: #c0c0ff; }
}
@keyframes statFlashDown {
  0%   { color: #ff6666; }
  100% { color: #c0c0ff; }
}
.stat-flash-up   { animation: statFlashUp   0.6s ease-out forwards; }
.stat-flash-down { animation: statFlashDown 0.6s ease-out forwards; }

/* Тултип первичного стата */
.prim-stat-tooltip {
  position: fixed;
  background: #0d1525;
  border: 1px solid #223344;
  border-radius: 3px;
  padding: 4px 8px;
  font-size: 11px;
  color: #8899bb;
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
  display: none;
}

/* Адаптив */
@media (max-width: 560px) {
  .char-sheet { grid-template-columns: 1fr; min-width: unset; }
  #nav-main { flex-wrap: wrap; }
}

/* Карта мира v2 (game/css/map_v2_*.css): старые стили карты удалены 2026-10-07.
   .map-location-info-meta оставлен: второй потребитель — screen_duels.js. */
.map-location-info-meta {
  font-size: 10px;
  color: #334455;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* Экран поединков — секции */
.duel-location-header {
  background: #0a1018;
  border: 1px solid #1a2535;
  border-radius: 4px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.duel-loc-name {
  font-size: 14px;
  color: #66dd88;
  font-weight: bold;
}
.duel-loc-desc {
  font-size: 12px;
  color: #556677;
}
.arena-section {
  background: #0f1629;
  border: 1px solid #223344;
  border-radius: 4px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 480px;
}
.arena-title {
  font-size: 11px;
  color: #7788aa;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: bold;
}
.arena-desc { font-size: 12px; color: #445566; }
.mob-pool-list { display: flex; flex-direction: column; gap: 3px; }
.mob-pool-row {
  font-size: 12px;
  color: #556677;
  padding: 3px 8px;
  background: #0a1018;
  border: 1px solid #1a2535;
  border-radius: 3px;
}

/* ==================== NPC-ПАНЕЛЬ НА КАРТЕ ==================== */
/* Панель НПС карты переехала в game/css/map_v2_npc.css (2026-10-07). Ниже остались стили NPC-модала. */

.npc-quest-list {
  display: none;
  flex-direction: column;
  gap: 6px;
}

.npc-quest-list.open {
  display: flex;
}

.npc-quest-item {
  padding: 6px 8px;
  background: #0a0f1e;
  border: 1px solid #1a2535;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.npc-quest-item.npc-quest-locked {
  opacity: 0.5;
}

.npc-quest-name {
  font-size: 11px;
  color: #aabbcc;
  font-weight: bold;
}

.npc-quest-meta {
  font-size: 10px;
  color: #445566;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.npc-quest-locked .npc-quest-meta {
  color: #883333;
}

.npc-quest-desc {
  font-size: 10px;
  color: #334455;
  line-height: 1.4;
  margin-top: 2px;
}

.npc-quest-reward {
  font-size: 10px;
  color: #7a6824;
  margin-top: 2px;
}

/* Заголовок квеста (название + значок) */
.npc-quest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.npc-quest-badge-done {
  font-size: 10px;
  color: #44aa66;
  font-weight: bold;
  flex-shrink: 0;
}

.npc-quest-badge-ready {
  font-size: 10px;
  color: #ffaa33;
  font-weight: bold;
  flex-shrink: 0;
}

/* Прогресс kill-требований */
.npc-quest-progress {
  font-size: 10px;
  color: #5577aa;
  margin-top: 2px;
}

/* Завершённый квест — весь элемент */
.npc-quest-item.npc-quest-completed {
  opacity: 0.55;
}
.npc-quest-item.npc-quest-completed .npc-quest-name {
  color: #556677;
}

/* Кнопки квестов */
.btn-npc-accept {
  margin-top: 5px;
  font-size: 11px;
  padding: 3px 10px;
  background: #0f2030;
  border-color: #2255aa;
  color: #88aaff;
}
.btn-npc-accept:hover:not(:disabled) {
  background: #152840;
  border-color: #4477cc;
  color: #aaccff;
}

.btn-npc-claim {
  margin-top: 5px;
  font-size: 11px;
  padding: 3px 10px;
  background: #0d2010;
  border-color: #33aa55;
  color: #66dd88;
  font-weight: bold;
}
.btn-npc-claim:hover:not(:disabled) {
  background: #142a18;
  border-color: #55cc77;
  color: #88ffaa;
}

/* Уведомление о квесте в логе боя */
.log-summary-quest {
  color: #88aaff;
  font-weight: bold;
  display: block;
  padding: 2px 0;
}

/* Строки сообщения «Недостаточно здоровья» (screen_combat.js); раньше использовали класс окна НПС */
.lowhp-row {
  font-size: 11px;
  color: #7a8899;
  margin: 2px 0;
}

/* ==================== ВЕЛКОМ-ОВЕРЛЕЙ (ОНБОРДИНГ) ==================== */

.welcome-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-modal {
  background: #16213e;
  border: 1px solid #444466;
  border-radius: 6px;
  max-width: 420px;
  width: 90%;
  padding: 32px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7);
}

.welcome-modal h2 {
  font-size: 20px;
  color: #c0c0ff;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0;
}

.welcome-modal p {
  font-size: 14px;
  color: #aabbcc;
  line-height: 1.5;
  margin: 0;
}

.btn-skip {
  background: transparent;
  border: 1px solid #333355;
  color: #778899;
  font-size: 12px;
  padding: 5px 12px;
  cursor: pointer;
  border-radius: 4px;
  font-family: monospace;
  align-self: flex-start;
  transition: background 0.15s, border-color 0.15s;
}

.btn-skip:hover {
  background: #1a1a3a;
  border-color: #555577;
  color: #99aabb;
}

/* ==================== HP-ПОЛОСКА В ЛИСТЕ ПЕРСОНАЖА ==================== */

.hp-bar-bg {
  background: #1a2a3a;
  border-radius: 4px;
  height: 10px;
  width: 100%;
  margin: 4px 0 2px;
  overflow: hidden;
}

.hp-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.hp-low-warning {
  font-size: 11px;
  color: #cc4444;
  margin-top: 2px;
}

/* ==================== PLAYER HUD ==================== */

#player-hud {
  display: none; /* показывается через style.display = 'flex' в JS */
  align-items: center;
  gap: 20px;
  background: #0d1220;
  border-bottom: 1px solid #1e2d45;
  padding: 7px 16px;
  flex-shrink: 0;
}

.hud-identity {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-width: 110px;
}

.hud-name {
  font-family: monospace;
  font-size: 13px;
  color: #c0c0ff;
  font-weight: bold;
}

.hud-class {
  font-family: monospace;
  font-size: 11px;
  color: #7788aa;
  margin-top: 1px;
}

.hud-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hud-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-bar-label {
  font-family: monospace;
  font-size: 11px;
  color: #556677;
  width: 52px;
  flex-shrink: 0;
}

.hud-bar-bg {
  flex: 1;
  background: #1c2d40;
  border-radius: 3px;
  height: 8px;
  overflow: hidden;
  min-width: 60px;
}

.hud-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.hud-bar-value {
  font-family: monospace;
  font-size: 11px;
  color: #7788aa;
  width: 72px;
  text-align: right;
  flex-shrink: 0;
}

/* ==================== ТАБЫ ПРАВОЙ КОЛОНКИ (Инвентарь / Квесты) ==================== */

.right-col-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 8px;
  border-bottom: 1px solid #1e2d45;
  padding-bottom: 6px;
}

.right-col-tab {
  padding: 4px 14px;
  background: #12192e;
  color: #7788aa;
  border: 1px solid #223344;
  border-radius: 4px 4px 0 0;
  font-family: monospace;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.right-col-tab:hover { background: #1a2540; color: #aabbcc; }

.right-col-tab.active {
  background: #1a1a2e;
  color: #c0c0ff;
  border-color: #334466;
  font-weight: bold;
}

/* ==================== ПАНЕЛЬ КВЕСТОВ ==================== */

.quests-panel {
  overflow-y: auto;
  flex: 1;
}

.quests-empty {
  font-family: monospace;
  font-size: 12px;
  color: #3d5060;
  padding: 4px 0;
}

/* Раскрываемый элемент квеста */
.quest-item {
  border: 1px solid #1a2535;
  border-radius: 4px;
  margin-bottom: 4px;
  overflow: hidden;
}

.quest-item--ready { border-color: #2a5a3a; }
.quest-item--done  { opacity: 0.7; }
.quest-item--open  { border-color: #2a3a55; }

/* Persistent-индикатор смены этапа (docs/architecture/quest_stages.md) — обязательное
   место (журнал персонажа); сбрасывается при раскрытии карточки (markStageSeen). */
.quest-item--stage-changed { border-color: #5566cc; }
.quest-item--stage-changed .quest-item-name { color: #99aaff; }

.quest-item-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  cursor: pointer;
  background: #0e1828;
  user-select: none;
  transition: background 0.12s;
}

.quest-item-header:hover { background: #111e32; }
.quest-item--open .quest-item-header { background: #0f1f30; }

.quest-item-arrow {
  font-size: 9px;
  color: #445566;
  flex-shrink: 0;
  width: 10px;
}

.quest-item-name {
  font-family: monospace;
  font-size: 12px;
  color: #aabbcc;
  flex: 1;
}

.quest-item--ready .quest-item-name { color: #88ccaa; }

.quest-card-badge {
  font-family: monospace;
  font-size: 11px;
  color: #44cc77;
  font-weight: bold;
  flex-shrink: 0;
}

.quest-item-level {
  font-family: monospace;
  font-size: 11px;
  color: #445566;
  flex-shrink: 0;
}

/* Раскрытое содержимое */
.quest-item-details {
  padding: 8px 10px 10px;
  background: #080f1a;
  border-top: 1px solid #1a2535;
}

.quest-item-desc {
  font-family: monospace;
  font-size: 11px;
  color: #778899;
  line-height: 1.5;
  margin-bottom: 8px;
  font-style: italic;
}

.quest-item-reqs { margin-bottom: 6px; }

.quest-item-done-badge {
  font-family: monospace;
  font-size: 12px;
  color: #2a6a3a;
  margin-bottom: 8px;
}

.quest-item-rewards {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid #1a2535;
}

.quest-item-rewards-title {
  font-family: monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #445566;
  margin-bottom: 4px;
}

.quest-item-rewards-row {
  display: flex;
  gap: 10px;
  margin-bottom: 3px;
}

.quest-reward-xp {
  font-family: monospace;
  font-size: 12px;
  color: #7788cc;
}

.quest-reward-gold {
  font-family: monospace;
  font-size: 12px;
  color: #ccaa33;
}

.quest-reward-item {
  font-family: monospace;
  font-size: 12px;
  margin-top: 2px;
}

.quest-card-name {
  font-family: monospace;
  font-size: 13px;
  color: #aabbcc;
  font-weight: bold;
}

/* Строка требования */
.quest-req-row { margin-bottom: 5px; }

.quest-req-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2px;
}

.quest-req-label {
  font-family: monospace;
  font-size: 11px;
  color: #7788aa;
}

.quest-req-label.done { color: #44aa66; }

.quest-req-progress {
  font-family: monospace;
  font-size: 11px;
  color: #556677;
  flex-shrink: 0;
}

.quest-req-progress.done { color: #44aa66; }

.quest-req-track {
  background: #111c2b;
  border-radius: 2px;
  height: 4px;
  overflow: hidden;
}

.quest-req-fill {
  height: 100%;
  background: #3366aa;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* НПС для сдачи */
.quest-card-npc {
  font-family: monospace;
  font-size: 11px;
  color: #556677;
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid #1a2535;
}

/* ==================== ОНБОРДИНГ ==================== */

/* Контейнер группировки — без pointer-events, без фона */
.ob-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
}

/* 4 полосы затемнения вокруг spotlight-зоны — блокируют клики */
.ob-bar {
  position: fixed;
  background: rgba(0, 0, 0, 0.78);
  pointer-events: all;
  z-index: 10000;
}

/* Визуальная рамка вокруг spotlight (только декор, не блокирует клики) */
.ob-spotlight-ring {
  position: fixed;
  z-index: 10001;
  pointer-events: none;
  border-radius: 4px;
  outline: 2px solid rgba(100, 180, 255, 0.4);
  box-shadow: 0 0 12px rgba(100, 180, 255, 0.15);
}

.ob-tooltip {
  position: fixed;
  z-index: 10002;
  background: #0d1525;
  border: 1px solid #334455;
  border-radius: 6px;
  padding: 12px 14px;
  max-width: 280px;
  pointer-events: all;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.ob-tooltip-text {
  font-size: 13px;
  color: #c0cce0;
  line-height: 1.5;
  margin-bottom: 10px;
  white-space: pre-line; /* переводы строк в тексте шага дают абзацы */
}

.ob-tooltip-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.ob-btn-next {
  padding: 5px 14px;
  background: #1a3a5a;
  border: 1px solid #336688;
  border-radius: 4px;
  color: #88ccff;
  font-family: monospace;
  font-size: 12px;
  cursor: pointer;
}

.ob-btn-next:hover {
  background: #224466;
  color: #aaddff;
}

.ob-btn-skip {
  padding: 5px 10px;
  background: transparent;
  border: 1px solid #334455;
  border-radius: 4px;
  color: #445566;
  font-family: monospace;
  font-size: 11px;
  cursor: pointer;
}

.ob-btn-skip:hover {
  color: #667788;
  border-color: #445566;
}

.ob-validation-warn {
  display: none;
  font-size: 11px;
  color: #ff8844;
  background: #1a0905;
  border: 1px solid #662211;
  border-radius: 3px;
  padding: 5px 8px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.ob-validation-warn--visible {
  display: block;
}

/* Затемнение всего экрана пока ждём прибытия в локацию */
.ob-waiting-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.78);
  pointer-events: all;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ob-waiting-tooltip {
  position: static;
  transform: none;
  text-align: center;
}

.ob-skip-confirm {
  position: fixed;
  z-index: 10010;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #0d1525;
  border: 1px solid #334455;
  border-radius: 8px;
  padding: 20px 24px;
  max-width: 320px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
  pointer-events: all;
}

.ob-skip-confirm-text {
  font-size: 15px;
  font-weight: bold;
  color: #c0cce0;
  margin-bottom: 8px;
}

.ob-skip-confirm-sub {
  font-size: 12px;
  color: #667788;
  line-height: 1.5;
  margin-bottom: 16px;
}

.ob-skip-confirm-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Финальный попап завершения онбординга */
.ob-completion-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 10010;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ob-completion-modal {
  background: #0d1f33;
  border: 1px solid #1a3a5a;
  border-radius: 10px;
  padding: 32px 36px;
  max-width: 420px;
  width: 90%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.6);
}

.ob-completion-title {
  font-size: 20px;
  font-weight: bold;
  color: #aaddff;
  text-align: center;
}

.ob-completion-body {
  font-size: 14px;
  color: #c0cce0;
  line-height: 1.6;
  white-space: pre-line;
  text-align: center;
}

.ob-completion-close {
  align-self: center;
  padding: 8px 28px;
  font-size: 14px;
}

