/* Палітра й типографіка — знято з albiononlinetools.com (реальний сайт-орієнтир,
   не вигадано): темний синювато-вугільний фон, золото-бурштиновий акцент,
   Poppins (текст) + Barlow 800 (заголовки), моноширинний для цін/лейблів
   таблиці — той самий "ігровий HUD" ефект. */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&family=Barlow:wght@700;800&display=swap');

:root {
  --bg: #0f161b;
  --panel: #161e25;
  --panel-2: #1c252d;
  --border: rgba(255,255,255,0.08);
  --text: #ffffff;
  --muted: #adb0bc;
  --accent: #ffbe18;
  --accent-hover: #ffcb4d;
  --accent-2: #ff9800;
  --on-accent: #1c1a12;
  --ok: #45f882;
  --info: #00ccff;
  --danger: #ff4d4d;
  --font-display: 'Barlow', sans-serif;
  --font-body: 'Poppins', -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --silver-coin: url("img/silver-coin.png"); /* реальна іконка срібла з Albion Online Wiki (SilverCoins.png, використовується на 100+ сторінках вікі поруч з цінами) — власна SVG-заглушка виявилась "не такою" */
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden; /* фонові фото лендінгу "виривають" секції на 100vw, це підстраховка від 1px горизонтального скролу через ширину скролбару */
}

.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
  background: rgba(22,27,34,0.8);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  flex-wrap: wrap;
}
.logo { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--accent); letter-spacing: 0.3px; }
.tabs { display: flex; gap: 8px; flex: 1; }
.tab-btn, .subtab-btn {
  background: none; border: 1px solid transparent; color: var(--muted);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 14px; font-family: var(--font-body);
  text-decoration: none; display: inline-block;
}
.logo { text-decoration: none; }
.tab-btn.active, .subtab-btn.active { background: var(--accent); color: var(--on-accent); font-weight: 600; }
/* .subtab-btn — справжній <button> (.tab-btn — завжди <a>, глобального
   button:hover не чіпає) без власного фону в неактивному стані — без
   цього золоте тло на hover перебивало б задум "прозора вкладка".
   .active лишається золотою й на hover — власна специфічність вища. */
.subtab-btn:hover { background: none; }

main { max-width: 1100px; margin: 0 auto; padding: 24px; }

/* Поки відкрита модалка логіну через "гейт" (спроба зайти в розділ, що
   вимагає авторизації, з #goto=...) — реальний вміст позаду розмитий і
   неклікабельний, щоб не показувати повний маркетплейс "просто так". */
body.content-gated main { filter: blur(10px); pointer-events: none; user-select: none; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.subtab-panel { display: none; }
.subtab-panel.active { display: block; }
.subtabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }

.filters { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
/* select саму по собі стилізує рядок вище, але випадаючий список <option>
   Chrome/Edge рендерять окремо, за системною темою (звідси білий фон) —
   треба явно задати колір і на option, інакше він ігнорує тему сайту. */
select option {
  background-color: var(--panel-2); color: var(--text);
}

.filters input, .filters select, select, input, textarea {
  background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text);
  padding: 8px 10px; border-radius: 8px; font-size: 14px; font-family: var(--font-body);
}
button {
  background: var(--accent); color: var(--on-accent); border: none; padding: 9px 16px;
  border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px; font-family: var(--font-body);
}
button:hover { background: var(--accent-hover); }
button.secondary { background: rgba(255,255,255,0.05); color: var(--text); border: 1px solid var(--border); }
button.secondary:hover { background: rgba(255,255,255,0.1); }

/* ---------- Таблиця оголошень / предметів (замість карток — як у референсу) ---------- */
.market-table { width: 100%; border-collapse: collapse; }
.market-table-head {
  display: flex; gap: 12px; padding: 10px 14px;
  font-family: var(--font-mono); text-transform: uppercase; font-size: 11px; letter-spacing: 1.5px;
  color: var(--accent); border-bottom: 1px solid var(--border);
}
.market-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--border);
}
.market-row:hover { background: rgba(255,255,255,0.06); }
.market-row .icon { width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; }
.market-row .info { flex: 1; min-width: 0; }
.market-row .name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.market-row .meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.market-row .price { font-family: var(--font-mono); color: var(--accent); font-weight: 700; font-size: 15px; white-space: nowrap; }
.market-row .qty { font-family: var(--font-mono); color: var(--muted); font-size: 12px; margin-left: 4px; }
.market-row .side { text-align: right; flex-shrink: 0; }
.market-row .tier-badge {
  font-family: var(--font-mono); font-size: 11px; color: var(--on-accent); background: var(--accent);
  border-radius: 4px; padding: 1px 6px; margin-left: 6px;
}

/* Пошук/вибір предмета з каталогу при створенні оголошення */
.item-picker { position: relative; }
.item-picker-results {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 10;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  margin-top: 4px; max-height: 260px; overflow-y: auto;
}
.item-picker-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; }
.item-picker-row:hover { background: rgba(255,255,255,0.06); }
.item-picker-row img { width: 28px; height: 28px; object-fit: contain; }
.item-picker-selected {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  background: rgba(255,190,24,0.08); border: 1px solid var(--accent); border-radius: 8px; margin-bottom: 4px;
}
.item-picker-selected img { width: 32px; height: 32px; object-fit: contain; }
.item-picker-selected .clear { margin-left: auto; cursor: pointer; color: var(--muted); font-size: 13px; }

.listing-form { display: flex; flex-direction: column; gap: 10px; max-width: 480px; margin-bottom: 28px; }
.listing-form .row { display: flex; gap: 10px; }
.listing-form .row input { flex: 1; }

.orders-list { display: flex; flex-direction: column; gap: 10px; }
.order-card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.order-review-line { margin-top: 8px; }
.stars { color: var(--accent); letter-spacing: 1px; }
.review-form { flex-direction: column; gap: 8px; max-width: 320px; margin-top: 8px; }
.review-form select, .review-form textarea { width: 100%; box-sizing: border-box; }
.review-form button { align-self: flex-start; }

/* ---------- Профіль продавця (seller.html) ---------- */
.seller-header { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.seller-header-info h1 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 800; font-size: 26px; }
.seller-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.seller-rating .stars { font-size: 16px; }
.seller-bio-text { color: var(--text); white-space: pre-wrap; margin: 0; }
.review-list { display: flex; flex-direction: column; gap: 12px; }
.review-item { background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.review-item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-item-head .stars { font-size: 13px; }
.review-item-comment { margin: 8px 0 0; font-size: 14px; color: var(--text); white-space: pre-wrap; }
@media (max-width: 560px) {
  .seller-header { flex-direction: column; align-items: flex-start; }
}
a.inline-link {
  display: inline-block; text-decoration: none; background: rgba(255,255,255,0.05); color: var(--text);
  border: 1px solid var(--border); padding: 9px 16px; border-radius: 8px; font-weight: 600; font-size: 14px;
}
a.inline-link:hover { background: rgba(255,255,255,0.1); }
.status-pending { color: var(--accent-2); }
.status-confirmed { color: var(--info); }
.status-completed { color: var(--ok); }
.status-cancelled { color: var(--danger); }

/* ---------- Тікети підтримки ---------- */
.ticket-status-badge {
  display: inline-block; font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 9px; border-radius: 999px; margin-left: 8px;
}
.ticket-status-badge.open { background: rgba(255,190,24,0.15); color: var(--accent); }
.ticket-status-badge.answered { background: rgba(69,248,130,0.15); color: var(--ok); }
.ticket-status-badge.closed { background: rgba(255,255,255,0.08); color: var(--muted); }
.conv-item .ticket-status-badge { position: absolute; top: 10px; right: 10px; margin-left: 0; }
.chat-bubble.staff { border-color: rgba(69,248,130,0.3); }
.chat-bubble-sender { display: block; font-size: 11px; color: var(--accent); font-weight: 700; margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.5px; }

.notice, .hint { color: var(--muted); font-size: 14px; }
.msg { font-size: 13px; min-height: 18px; }
.msg.error { color: var(--danger); }
.msg.ok { color: var(--ok); }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.72);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; width: 360px; position: relative;
}
.modal-close { position: absolute; top: 10px; right: 12px; background: none; color: var(--muted); font-size: 20px; padding: 0; }
.modal-close:hover { background: none; color: var(--text); }
.modal-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.modal-tabs button { flex: 1; background: rgba(255,255,255,0.05); color: var(--muted); }
.modal-tabs button.active { background: var(--accent); color: var(--on-accent); }
.auth-form { display: flex; flex-direction: column; gap: 10px; }

.calc-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; margin-top: 16px; align-items: start; }
.calc-items-list { display: flex; flex-direction: column; gap: 6px; max-height: 560px; overflow-y: auto; }
.calc-item-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.03); cursor: pointer;
}
.calc-item-row:hover { border-color: var(--accent); }
.calc-item-row.active { border-color: var(--accent); background: rgba(255,190,24,0.08); }
.calc-item-row img { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; }
.calc-item-row .name { font-size: 13px; flex: 1; }
.calc-item-row .tier { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* ---------- Ієрархічна навігація калькулятора (категорія → підкатегорія → тір) ---------- */
/* Напис "Мої крафти" — окремим рядком зверху, плитки під ним (не в один
   рядок один з одним, як було). Сам напис — кнопка, що згортає/розгортає
   список плиток (стан пам'ятається в localStorage). */
.saved-crafts-row { margin-bottom: 16px; }
.saved-crafts-header {
  display: flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer;
  padding: 0 0 8px; color: inherit; font: inherit;
}
/* Той самий фікс, що й .tile-remove/.tile-star: без явного background тут
   глобальне button:hover малює золоте тло під золотим текстом лейбла
   (var(--accent)) — саме це й лишалось нечитабельним. */
.saved-crafts-header:hover { background: none; }
.saved-crafts-label { font-family: var(--font-mono); text-transform: uppercase; font-size: 12px; letter-spacing: 1px; color: var(--accent); }
.saved-crafts-arrow { color: var(--muted); font-size: 10px; transition: transform 0.15s; }
.saved-crafts-header.collapsed .saved-crafts-arrow { transform: rotate(-90deg); }
.saved-crafts-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.saved-crafts-chips.collapsed { display: none; }
.saved-crafts-chips:empty::before { content: 'порожньо — тисни ★ на предметі'; color: var(--muted); font-size: 12.5px; font-family: var(--font-body); }
/* Плитки "Мої крафти" — той самий вигляд, що й плитки категорій/предметів
   (.tile), тільки компактніші й з хрестиком видалення замість зірочки. */
.saved-tile { width: 96px; padding: 10px 6px; }
.tile-remove {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: transparent; border: none; color: var(--muted); font-size: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
/* background: transparent тут ОБОВ'ЯЗКОВО — глобальне `button:hover`
   (нижче) інакше переважує через специфічність (type+pseudo > class) і
   малює золоте тло під хрестиком, роблячи його нечитабельним (Ілай
   зловив наживо на плитці "Мої крафти"). */
.tile-remove:hover { color: var(--danger); background: transparent; }

.crumbs { font-family: var(--font-mono); font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 4px 0 16px; }
.crumbs .seg { cursor: pointer; }
.crumbs .seg:hover { color: var(--text); }
.crumbs .seg.current { color: var(--accent); cursor: default; }
.crumbs .sep { color: var(--border); }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-bottom: 24px; }
.tile {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; text-align: center; position: relative;
}
.tile:hover { border-color: var(--accent); }
.tile .tile-glyph {
  width: 56px; height: 56px; border-radius: 8px; background: rgba(255,190,24,0.1);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
}
.tile .tile-icon { width: 56px; height: 56px; object-fit: contain; }
.tile .tile-label { font-size: 13.5px; font-weight: 500; line-height: 1.3; }
.tile .tile-count { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.tile.tier-item { border-top: 3px solid var(--tier-color, var(--muted)); }
.tile .tile-tier-badge { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.tile-star {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: transparent; border: none; color: var(--muted); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
/* Той самий фікс, що й .tile-remove:hover вище — без явного background
   тло крала б глобальна button:hover. */
.tile-star:hover { color: var(--accent); background: transparent; }
.tile-star.on { color: var(--accent); }

.calc-recipe-view { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px; min-height: 200px; }

/* Шапка рецепта: собівартість — перший елемент зліва (найважливіше
   число), далі кількість крафту й ціна продажу (вхідні поля), далі
   прибуток/маржа (похідні від них), шестерня фінального кроку й статус
   збереження — в кінці рядка. */
.calc-total-bar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px; background: rgba(255,190,24,0.08);
  border: 1px solid rgba(255,190,24,0.3); border-radius: 8px; padding: 10px 14px; margin-bottom: 10px;
  font-size: 13px; color: var(--muted);
}
.calc-root-stat { display: flex; flex-direction: column; gap: 2px; }
.calc-root-stat-label { font-size: 11px; color: var(--muted); }
.calc-root-stat b { font-family: var(--font-mono); font-size: 17px; color: var(--text); }
.calc-root-stat.is-cost b { font-size: 21px; color: var(--accent); }
.calc-root-input-group { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); }
.calc-root-input-group input { width: 96px; }
.calc-save-status { margin-left: auto; font-size: 12px; font-family: var(--font-mono); color: var(--muted); }

#rootMechanicsInfo { margin-bottom: 12px; }
#rootMechanicsInfo .calc-mechanics-info { padding-left: 0; }
#rootMechanicsPanelBox:not(:empty) { margin-bottom: 12px; }
.node-mechanics-panel.is-root { margin-left: 0; }

.calc-tree-box { display: flex; flex-direction: column; }

/* Стрічка іконок прямих інгредієнтів одного рівня — клік розкриває
   полотно з розрахунком під стрічкою (.ing-canvas нижче). Лише одна
   іконка на рівень позначена .open одночасно (обробник у calculator.js
   сам стежить за цим). */
/* Розмір іконки — той самий, що й у шапки рецепта (.calc-recipe-header
   img, 68px), а не окрема дрібніша константа — раніше тут (32/36px) все
   виглядало помітно дрібніше за головну іконку зверху на тій самій
   сторінці, Ілай попросив вирівняти. */
.ing-strip { display: flex; flex-wrap: wrap; gap: 12px; }
.ing-icon {
  display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 92px;
  padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); cursor: pointer;
}
.ing-icon:hover { border-color: var(--accent-hover); }
.ing-icon.open { border-color: var(--accent); background: rgba(255,190,24,0.12); }
.ing-icon img { width: 68px; height: 68px; object-fit: contain; }
.ing-icon-qty { font-family: var(--font-mono); font-size: 13px; color: var(--accent-2); }
.ing-icon-cost { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
/* "Маю" прямо на іконці (режим "Маю ресурси") — компактне поле замість
   вартості, з тим самим візуальним місцем в тайлі. */
.ing-icon-have { width: 68px; font-size: 12px; text-align: center; padding: 3px 4px; }

/* Блок симуляції — "Повернеться"/"Залишок" + чекбокс реінвестування,
   під стрічкою іконок кореня, спільний для обох режимів (хочу N / маю X). */
.calc-sim-block { margin-top: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.calc-sim-extra { margin-top: 8px; font-size: 12.5px; color: var(--ok); }
.calc-sim-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.calc-sim-label { font-size: 12px; color: var(--muted); min-width: 90px; }
.calc-sim-item { display: flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 12.5px; }
.calc-sim-item img { width: 22px; height: 22px; object-fit: contain; }

/* Полотно — розкритий розрахунок одного інгредієнта: власний рядок
   (назва/кількість/перемикач/ціна/собівартість 1 шт), під ним опційно
   поля вирощування й return rate/фокус, і якщо це теж крафт — своя
   стрічка дітей + своє вкладене полотно нижче (рекурсивно). Кожне
   полотно — окрема бордерована картка, тому глибина дерева читається як
   вкладені картки, а не як довгий список з відступами. */
.ing-canvas { margin-top: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.ing-panel-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.ing-panel-row img { width: 68px; height: 68px; object-fit: contain; flex-shrink: 0; }
.ing-panel-name { font-size: 17px; font-weight: 600; }
.ing-panel-need { font-size: 13.5px; color: var(--muted); font-family: var(--font-mono); }
.ing-panel-cost { font-family: var(--font-mono); font-size: 16px; color: var(--text); margin-left: auto; flex-shrink: 0; }
.ing-panel .ing-strip { margin-top: 12px; }
.calc-price-input { width: 90px; flex-shrink: 0; }
.calc-node-detail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.calc-grow-input { width: 96px; flex-shrink: 0; font-size: 12.5px; }
.calc-grow-check { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.calc-grow-check input { flex-shrink: 0; }
.calc-feed-group {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex-shrink: 0;
  padding: 4px 8px; border-radius: 8px; background: var(--panel-2); font-size: 12px;
}
.calc-mechanics-info { font-size: 11.5px; color: var(--muted); margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.calc-mechanics-rate { font-family: var(--font-mono); }
.calc-mechanics-focus { color: var(--accent-2); font-family: var(--font-mono); }
.calc-mechanics-custom { color: var(--accent); font-weight: 600; }
.calc-gear {
  padding: 3px 8px; font-size: 13px; line-height: 1; border-radius: 6px; flex-shrink: 0;
}
.calc-gear.active { background: rgba(255,190,24,0.18); border: 1px solid var(--accent); color: var(--accent); }

/* ---------- Панель налаштувань крафту (return rate/фокус/ставка станка) ----------
   Глобальну панель "за замовчуванням" прибрано (Ілай) — лишається лише
   перевизначення на конкретному вузлі/корені (шестерня), яке переюзує
   ці самі класи для розмітки полів. */
.craft-settings-panel { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 14px; overflow: hidden; background: var(--panel); }
.craft-settings-body {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 20px;
  padding: 16px; background: rgba(0,0,0,0.12); border-top: 1px solid var(--border);
}
.craft-settings-field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.craft-settings-field span { display: block; }
.craft-settings-field select, .craft-settings-field input { width: 100%; box-sizing: border-box; }
/* Чекбокси мають лише один рядок тексту, а сусідні поля-селекти інколи
   переносяться на два (довгі підписи) — align-self:end раніше тягнув
   чекбокс до низу комірки грід-рядка й він "наїжджав" на другий рядок
   сусіднього лейбла. display:flex на самій комірці (замість вирівнювання
   по низу) тримає чекбокс по центру висоти рядка незалежно від сусідів. */
.craft-settings-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.craft-settings-check input { flex-shrink: 0; }
.craft-settings-check span { min-width: 0; }

/* Компактна панель перевизначення локації на конкретному вузлі (шестерня) */
.node-mechanics-panel { margin: 6px 0 6px 54px; border-color: var(--accent); }
.node-mechanics-panel .craft-settings-body { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); padding: 12px; gap: 12px 16px; }
.node-mechanics-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px;
  border-top: 1px solid var(--border); flex-wrap: wrap;
}
.node-mechanics-actions .hint { font-size: 11px; }

.calc-recipe-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.calc-recipe-header img { width: 68px; height: 68px; object-fit: contain; }
.calc-recipe-header h4 { margin: 0; font-family: var(--font-display); font-weight: 800; }

/* Перемикач рівня зачарування (.0-.4) у шапці рецепта — порожній, якщо
   в каталозі нема зачарованих варіантів цього предмета (renderEnchantRow
   тоді лишає row.innerHTML = ''). */
.calc-enchant-row { display: flex; gap: 8px; margin: -8px 0 16px; flex-wrap: wrap; }
.calc-enchant-btn {
  padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.05); color: var(--text); font-weight: 600; cursor: pointer;
}
.calc-enchant-btn:hover { background: rgba(255,255,255,0.1); }
.calc-enchant-btn.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.recipe-tree-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.recipe-tree-row:last-child { border-bottom: none; }
.recipe-tree-row img { width: 24px; height: 24px; object-fit: contain; }
.recipe-tree-row .depth-indent { color: var(--muted); font-family: var(--font-mono); }
.recipe-tree-row .qty { color: var(--accent); font-family: var(--font-mono); font-weight: 700; min-width: 48px; }
.recipe-tree-row .price { margin-left: auto; color: var(--muted); font-size: 13px; font-family: var(--font-mono); }

/* ---------- Окремий простір: Маркетплейс ---------- */
.auth-gate {
  min-height: calc(100vh - 65px); display: flex; align-items: center; justify-content: center; padding: 40px 24px;
}
.auth-gate-card {
  max-width: 440px; width: 100%; text-align: center;
  background: var(--panel); border: 1px solid var(--border); border-radius: 20px; padding: 44px 36px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.auth-gate-card h1 { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1.2; margin: 0 0 12px; }

/* Поля з іконкою зліва (людина/замок) — той самий вигляд, що в референсу. */
.input-icon { position: relative; }
.input-icon .icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none; font-size: 15px; line-height: 1;
}
.input-icon input { width: 100%; padding: 13px 14px 13px 40px; border-radius: 10px; font-size: 14px; }

.auth-form button[type="submit"] {
  padding: 14px; border-radius: 10px; font-weight: 700; letter-spacing: 0.5px; font-size: 14.5px;
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 4px;
}

.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11.5px; margin: 22px 0; text-transform: uppercase; letter-spacing: 1.5px; font-family: var(--font-mono); }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.discord-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  background: #5865F2; color: #fff; padding: 13px; border-radius: 10px; font-weight: 600; font-size: 14px;
  cursor: pointer; border: none;
}
.discord-btn:hover { background: #4752c4; }

.auth-switch-link { margin-top: 18px; font-size: 13px; color: var(--muted); }
.auth-switch-link button.link {
  color: var(--accent); font-weight: 600; background: none; border: none; padding: 0; cursor: pointer;
  font-size: 13px; font-family: var(--font-body); text-decoration: underline;
}
.auth-switch-link button.link:hover { background: none; }

.mp-wrap { max-width: 1100px; margin: 0 auto; padding: 24px; }

/* ---------- Особистий кабінет (dashboard.html) ---------- */
.dash-welcome {
  display: flex; align-items: center; gap: 18px; padding: 28px 30px; margin-bottom: 24px;
  background: radial-gradient(circle at 15% 30%, rgba(255,190,24,0.12), transparent 60%), var(--panel);
  border: 1px solid var(--border); border-radius: 16px;
}
.dash-avatar {
  position: relative; width: 56px; height: 56px; border-radius: 50%; background: var(--panel-2); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display);
  font-weight: 800; font-size: 22px; flex-shrink: 0;
}
.dash-welcome-label { display: block; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 1.5px; font-size: 11px; color: var(--accent); margin-bottom: 4px; }
.dash-welcome h1 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 22px; }

.dash-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 32px; }
.dash-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 20px;
  display: flex; flex-direction: column; gap: 4px;
}
.dash-card-label { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 1px; font-size: 11px; color: var(--accent); }
.dash-card-value { font-family: var(--font-display); font-weight: 800; font-size: 28px; }
.dash-card p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.dash-card .btn-cta { align-self: flex-start; padding: 8px 16px; font-size: 13px; }

/* Швидкі дії — колонка зліва (як у референсу), а не сітка плиток знизу. */
.dash-layout { display: flex; gap: 24px; align-items: flex-start; }
.dash-sidebar {
  width: 230px; flex-shrink: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 84px;
}
.dash-sidebar-label { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 1px; font-size: 11px; color: var(--accent); margin: 0 0 8px; padding: 0 10px; }
.dash-sidebar-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: 14px; font-family: var(--font-body);
  background: none; border: none; width: 100%; text-align: left; cursor: pointer;
}
.dash-sidebar-link:hover { background: rgba(255,255,255,0.06); }
.dash-sidebar-link span { font-size: 18px; width: 22px; text-align: center; flex-shrink: 0; }
.dash-main { flex: 1; min-width: 0; }

.dash-sidebar-link.active { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.dash-sidebar-badge {
  margin-left: auto; background: var(--danger); color: #fff; font-family: var(--font-mono);
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; flex-shrink: 0;
}

@media (max-width: 760px) {
  .dash-layout { flex-direction: column; }
  .dash-sidebar { width: 100%; position: static; flex-direction: row; flex-wrap: wrap; }
  .dash-sidebar-label { width: 100%; }
  .dash-sidebar-link { width: auto; }
}

/* ---------- Друзі (блок у кабінеті) ---------- */
.dash-friends {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 20px;
  scroll-margin-top: 84px;
}
.dash-friends h2 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.dash-friends h4 { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.dash-friends-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dash-friend-add { display: flex; gap: 8px; }
.dash-friend-add input { min-width: 200px; }
.friend-list { display: flex; flex-direction: column; gap: 8px; }
.friend-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px;
}
.friend-name { font-weight: 600; }
.friend-actions { display: flex; gap: 8px; flex-shrink: 0; }
.friend-actions .small, button.small { padding: 6px 12px; font-size: 12.5px; }
.friend-actions a.btn-cta { text-decoration: none; }

/* ---------- Налаштування акаунту ---------- */
.settings-layout { display: flex; gap: 24px; align-items: flex-start; }
.settings-menu {
  width: 230px; flex-shrink: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 84px;
}
.settings-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.settings-main > h1 { font-family: var(--font-display); font-weight: 800; font-size: 26px; margin: 0; }
.settings-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.settings-card h3 { margin: 0 0 16px; font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.settings-form { display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.settings-form label { font-size: 12.5px; color: var(--muted); margin-bottom: -4px; }
.settings-form button { align-self: flex-start; margin-top: 4px; }
/* Багаторядкові поля (напр. опис продавця) не мають стискатись у ті самі
   380px, що й короткі поля налаштувань (нікнейм/пароль) — виглядало
   обрізаним (Ілай). max-width: none повертає форму на всю ширину картки. */
.settings-form-wide { max-width: none; }
.settings-form-wide textarea { width: 100%; box-sizing: border-box; }
.settings-info-row {
  display: flex; justify-content: space-between; max-width: 380px; padding: 8px 0;
  border-bottom: 1px solid var(--border); font-size: 14px;
}
.settings-info-row:last-of-type { margin-bottom: 20px; }
.settings-info-row span { color: var(--muted); }
@media (max-width: 760px) {
  .settings-layout { flex-direction: column; }
  .settings-menu { width: 100%; position: static; flex-direction: row; flex-wrap: wrap; }
}

/* ---------- Аватар/рамка (реальна графіка гри, avatar-catalog.json) ---------- */
.avatar-editor { display: flex; gap: 24px; align-items: flex-start; }
.avatar-preview-box { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.avatar-preview-circle {
  position: relative; width: 110px; height: 110px; border-radius: 50%; background: var(--panel-2);
  display: flex; align-items: center; justify-content: center; overflow: visible; flex-shrink: 0;
}
.avatar-circle-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar-circle-initial {
  width: 100%; height: 100%; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; color: var(--accent);
}
.avatar-preview-circle .avatar-circle-initial { font-size: 36px; }
.frame-overlay-img {
  position: absolute; top: 50%; left: 50%; width: 124%; height: 124%;
  transform: translate(-50%, -50%); pointer-events: none;
}
/* Мала інлайн-версія аватара+рамки — біля ніка в картках оголошень/замовлень,
   у профілі продавця (сам розмір задається інлайн-стилем через JS). */
.avatar-inline { position: relative; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--panel-2); flex-shrink: 0; vertical-align: middle; }
.avatar-inline .avatar-circle-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar-inline .avatar-circle-initial { width: 100%; height: 100%; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; color: var(--accent); font-size: inherit; }
.seller-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: inherit; }
.seller-link:hover .avatar-circle-initial, .seller-link:hover { text-decoration: underline; }
.avatar-galleries { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.avatar-gallery-block { min-width: 0; }
.avatar-gallery-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 13.5px; font-weight: 600; }
.avatar-gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px;
  max-height: 340px; overflow-y: auto; padding: 6px; background: rgba(0,0,0,0.15); border-radius: 10px;
}
.avatar-tile {
  width: 100%; aspect-ratio: 1; padding: 0; border-radius: 50%; border: 2px solid transparent;
  background: rgba(255,255,255,0.05); cursor: pointer; overflow: hidden; display: block;
}
.avatar-tile img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.avatar-tile:hover { border-color: rgba(255,190,24,0.4); }
.avatar-tile.selected { border-color: var(--accent); }
@media (max-width: 640px) {
  .avatar-editor { flex-direction: column; align-items: center; }
}

/* ---------- Повідомлення (messages.html) ---------- */
.chat-layout { display: flex; gap: 20px; align-items: stretch; height: calc(100vh - 220px); min-height: 480px; }
.chat-sidebar {
  width: 280px; flex-shrink: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-new { padding: 14px; border-bottom: 1px solid var(--border); position: relative; }
.chat-new input { width: 100%; }
.conv-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.conv-list .hint { padding: 10px; }
.conv-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  background: none; border: none; border-radius: 10px; padding: 10px 12px; cursor: pointer; color: var(--text); width: 100%;
  position: relative;
}
.conv-item:hover { background: rgba(255,255,255,0.06); }
.conv-item.active { background: rgba(255,190,24,0.1); border: 1px solid var(--accent); }
.conv-name { font-weight: 600; font-size: 14px; }
.conv-preview { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.conv-unread {
  position: absolute; top: 10px; right: 10px; background: var(--danger); color: #fff; font-family: var(--font-mono);
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px;
}
.chat-main {
  flex: 1; min-width: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-empty { flex: 1; display: flex; align-items: center; justify-content: center; }
#chatActive, #ticketActive { display: flex; flex-direction: column; height: 100%; }
.chat-header { padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 15px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.chat-bubble {
  max-width: 65%; padding: 9px 13px; border-radius: 14px; position: relative;
  background: rgba(255,255,255,0.06); align-self: flex-start; border: 1px solid var(--border);
}
.chat-bubble.mine { align-self: flex-end; background: rgba(255,190,24,0.14); border-color: rgba(255,190,24,0.3); }
.chat-bubble p { margin: 0; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.chat-bubble-img { max-width: 240px; max-height: 240px; border-radius: 8px; display: block; margin-bottom: 6px; object-fit: contain; }
.chat-bubble-time { display: block; margin-top: 4px; font-size: 10.5px; color: var(--muted); font-family: var(--font-mono); }
.chat-send-form { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); }
.chat-send-form input { flex: 1; }
.chat-attach {
  display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex-shrink: 0;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: 16px;
}
.chat-attach:hover { background: rgba(255,255,255,0.1); }
.chat-image-preview { display: flex; align-items: center; gap: 8px; padding: 0 14px 12px; }
.chat-image-preview img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.chat-image-preview button { padding: 4px 9px; }
@media (max-width: 760px) {
  .chat-layout { flex-direction: column; height: auto; }
  .chat-sidebar { width: 100%; max-height: 260px; }
}

.mp-header { margin-bottom: 24px; }
.mp-header h1 { font-family: var(--font-display); font-weight: 800; font-size: 30px; margin: 0 0 8px; }
/* .hero-sub за замовчуванням центрований з max-width:560px+margin:auto — це
   правильно всередині .hero/.auth-gate-card, але в .mp-header (звичайний
   лівовирівняний заголовок сторінки маркетплейсу/калькулятора) той самий
   клас робив вузький "плаваючий" по центру абзац, який виглядав криво
   поруч з лівовирівняним h1 і рештою сторінки. Тут — звичайний лівий текст. */
.mp-header .hero-sub { margin: 0; max-width: 640px; text-align: left; }

.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.mp-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column; border-top: 3px solid var(--muted);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.mp-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,0.35); border-color: var(--accent); }
.mp-card-media {
  position: relative; aspect-ratio: 1.7 / 1; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 45%, rgba(255,190,24,0.16), transparent 72%);
}
.mp-card-media img { width: 96px; height: 96px; object-fit: contain; }
.mp-card-tier {
  position: absolute; top: 8px; right: 8px; font-family: var(--font-mono); font-size: 11.5px;
  background: rgba(0,0,0,0.5); color: var(--accent); border-radius: 4px; padding: 2px 6px;
}
.mp-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.mp-card-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-card-meta { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mp-card-meta .seller-link { color: var(--muted); font-size: 12.5px; }
.mp-card-meta .seller-link:hover { color: var(--text); }
.mp-card-price { font-family: var(--font-mono); color: var(--accent); font-weight: 700; font-size: 17px; margin-top: 4px; }
.mp-card-price span { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.mp-card-qty { margin-left: 6px; }
.mp-card-server { padding: 1px 7px; border-radius: 6px; background: rgba(255,255,255,0.06); border: 1px solid var(--border); }
/* Довідкова ціна з AODP-кешу — зелена/червона залежно від того, дорожче
   чи дешевше за ринок продавець виставив (Ілай: "продавцю допоможе
   поставити ціну, а покупцю не переплатить"). */
.mp-card-market { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 2px; }
.mp-card-market.is-under { color: var(--ok); }
.mp-card-market.is-over { color: var(--danger); }

/* Іконка срібла — власна SVG-монета (сірий метал, а не жовта емодзі-монета
   🪙, яка виглядала як золото і не схожа на щось з Альбіону). Два способи
   застосування: .silver-icon — самостійний порожній <span> як фіксована
   іконка; .silver-amount — іконка як ::after на елементі з числом, щоб
   переживати часткові textContent-оновлення калькулятора (заміна тексту не
   чіпає псевдоелемент, тому іконка не зникає при кожному введенні ціни). */
.silver-icon {
  display: inline-block; width: 1.3em; height: 1.3em; vertical-align: -0.28em; margin-left: 4px;
  background: var(--silver-coin) no-repeat center / contain;
}
.silver-amount:not(:empty)::after {
  content: '';
  display: inline-block; width: 1.3em; height: 1.3em; vertical-align: -0.28em; margin-left: 5px;
  background: var(--silver-coin) no-repeat center / contain;
}
.mp-card-actions { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.mp-card-actions button { width: 100%; }
.mp-card-actions a.secondary {
  width: 100%; text-align: center; text-decoration: none; box-sizing: border-box;
  background: rgba(255,255,255,0.05); color: var(--text); border: 1px solid var(--border);
  padding: 9px 16px; border-radius: 8px; font-weight: 600; font-size: 14px; display: block;
}
.mp-card-actions a.secondary:hover { background: rgba(255,255,255,0.1); }

.mp-card.tier-1, .mp-card.tier-2 { border-top-color: #9a9a9a; }
.mp-card.tier-3 { border-top-color: #4caf50; }
.mp-card.tier-4 { border-top-color: #4fc3f7; }
.mp-card.tier-5 { border-top-color: #b967ff; }
.mp-card.tier-6 { border-top-color: var(--accent); }
.mp-card.tier-7 { border-top-color: #ff7043; }
.mp-card.tier-8 { border-top-color: #ff4d4d; }

/* ---------- Лендінг / тарифи ---------- */
/* Статус-бар у стилі конкурента: годинник UTC зліва, статуси 3 регіонів
   справа (кожен — зелений кружечок з галочкою + назва + стан). Офіційне
   джерело гри (serverstatus.albiononline.com) віддає лише ОДИН загальний
   статус на всю гру, без розбивки по регіонах (перевірено — запити з
   різними параметрами region повертають ідентичну відповідь) — тому всі
   3 індикатори живляться з того самого реального запиту. Це чесний
   компроміс: статус завжди правдивий і реально відстежується/змінюється,
   просто без незалежної гранулярності по регіонах, якої офіційно не існує. */
.status-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 24px;
  background: #0a0f13; border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.5px; color: var(--muted);
  flex-wrap: wrap;
}
.status-bar-time { text-transform: uppercase; letter-spacing: 1px; color: var(--accent); font-weight: 700; flex-shrink: 0; }
.status-bar-time b { color: var(--text); font-weight: 700; margin-left: 4px; letter-spacing: 0.5px; }
.status-bar-regions { display: flex; gap: 10px; flex-wrap: wrap; }
.status-bar-region {
  display: flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
}
.status-bar-region b { color: var(--ok); font-weight: 700; text-transform: lowercase; margin-left: 2px; }
.status-bar-region b.offline { color: var(--danger); }
.status-bar-region b.unknown { color: var(--muted); }
.region-dot {
  width: 14px; height: 14px; border-radius: 50%; background: var(--ok); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.region-dot::after { content: '✓'; color: #0a0f13; font-size: 9px; font-weight: 900; line-height: 1; }
.region-dot.offline { background: var(--danger); }
.region-dot.offline::after { content: '✕'; }
.region-dot.unknown { background: var(--muted); }
.region-dot.unknown::after { content: '?'; }

.landing-wide { max-width: 1100px; }

.hero-title {
  font-family: var(--font-display); font-weight: 800; font-size: 52px; line-height: 1.05;
  margin: 0 0 18px; text-transform: uppercase; letter-spacing: 0.5px;
}
.hero-outline {
  color: transparent; -webkit-text-stroke: 2px var(--accent); text-stroke: 2px var(--accent);
}

/* Фонові фото секцій лендінгу — офіційні wallpaper'и гри
   (assets.albiononline.com), той самий прийом, що в конкурента
   albiononlinetools.com: повнокадрове фото на всю ширину вікна + темний
   градієнт-скрім поверху для читабельності тексту. Секція "виривається"
   з max-width контейнера .landing-wide (від'ємні margin у пів-viewport),
   а сам текст лишається у вузькій колонці через .section-inner всередині. */
.bg-photo {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: linear-gradient(180deg, rgba(15,22,27,0.8) 0%, rgba(15,22,27,0.92) 100%), var(--bg-photo) center/cover no-repeat;
  overflow: hidden;
}
.bg-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 12% 15%, rgba(255,190,24,0.10) 0%, transparent 45%);
  pointer-events: none;
}
.section-inner { position: relative; z-index: 2; max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Великі блоки-розділи (Маркетплейс / Калькулятор / Тарифи) — на всю ширину,
   з великим заголовком, описовим абзацом і списком фіч з іконками. */
.big-block { padding: 64px 0; border-top: 1px solid var(--border); }
.big-block-eyebrow {
  display: block; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 2px;
  font-size: 12px; color: var(--accent); margin-bottom: 14px;
}
.big-block-title {
  font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1.2;
  margin: 0 0 20px; max-width: 640px;
}
.accent-text { color: var(--accent); }
.big-block-text { color: var(--muted); font-size: 16px; line-height: 1.7; max-width: 680px; margin: 0 0 32px; }

.big-block-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-bottom: 32px; }
.big-feature { display: flex; gap: 14px; align-items: flex-start; }
.big-feature-icon { font-size: 24px; flex-shrink: 0; }
.big-feature h4 { margin: 0 0 4px; font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.big-feature p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.landing-preview { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border); }

@media (max-width: 720px) {
  .hero-title { font-size: 38px; }
  .big-block-title { font-size: 26px; }
}

/* Перемикач мов у шапці — випадаючий список замість групи кнопок (компактніше).
   За замовчуванням (поки нема збереженого вибору) підбирається по мові
   браузера юзера, інакше — англійська. Словник поки повний лише для
   лендінгу (index.html), тому сам перемикач підключений скрізь, а реально
   щось перемикає там, де є [data-i18n]. */
select.lang-switch {
  background: rgba(255,255,255,0.06); border: 1px solid var(--border); color: var(--text);
  font-family: var(--font-mono); font-weight: 700; font-size: 12px; letter-spacing: 0.5px;
  padding: 7px 10px; border-radius: 8px; cursor: pointer;
}

/* Дзвіночок сповіщень — реальні дані (нові замовлення/зміна статусу), не
   заглушка. Прихований за замовчуванням (display:none у розмітці),
   notifications.js сам показує його, якщо юзер залогінений. */
.notif-bell-wrap { position: relative; display: none; }
.notif-bell {
  background: rgba(255,255,255,0.06); border: none; color: var(--text); width: 38px; height: 38px;
  border-radius: 50%; cursor: pointer; font-size: 16px; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.notif-bell:hover { background: rgba(255,255,255,0.12); }
.notif-badge {
  position: absolute; top: -3px; right: -3px; background: var(--danger); color: #fff;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; min-width: 16px; height: 16px;
  border-radius: 999px; display: none; align-items: center; justify-content: center; padding: 0 3px;
}
.notif-dropdown {
  display: none; position: absolute; top: 46px; right: 0; width: 320px; max-height: 380px; overflow-y: auto;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,0.4);
  z-index: 30;
}
.notif-dropdown.open { display: block; }
.notif-item { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: rgba(255,190,24,0.06); }
.notif-time { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.notif-empty { padding: 20px 14px; text-align: center; color: var(--muted); font-size: 13px; }

.cabinet-cta {
  background: var(--accent); color: var(--on-accent); padding: 9px 16px; border-radius: 8px;
  font-weight: 600; font-size: 14px; text-decoration: none; font-family: var(--font-body);
}
.cabinet-cta:hover { background: var(--accent-hover); }

.landing { max-width: 960px; margin: 0 auto; padding: 0 24px 60px; }
.hero { text-align: center; padding: 64px 0 40px; }
/* "Nexus" саме по собі не пояснює, що це — коротка приписка одразу під
   заголовком, ще до довшого hero-sub (Ілай: "треба нексус і опис що це таке"). */
.hero-tagline {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 1.5px;
  font-size: 13px; color: var(--accent); margin: 0 0 14px;
}
.hero-sub { color: var(--muted); font-size: 16px; max-width: 560px; margin: 0 auto 28px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn-cta {
  display: inline-block; padding: 12px 24px; border-radius: 8px; font-weight: 600;
  text-decoration: none; font-family: var(--font-body); font-size: 15px;
}
.btn-cta.primary { background: var(--accent); color: var(--on-accent); }
.btn-cta.primary:hover { background: var(--accent-hover); }
.btn-cta.secondary { background: rgba(255,255,255,0.06); color: var(--text); border: 1px solid var(--border); }
.btn-cta.secondary:hover { background: rgba(255,255,255,0.1); }

.landing-section { margin-top: 48px; }
.landing-section h2 { font-family: var(--font-display); font-weight: 800; font-size: 22px; margin-bottom: 16px; }
.see-all { display: inline-block; margin-top: 14px; color: var(--accent); text-decoration: none; font-weight: 600; font-size: 14px; }
.see-all:hover { color: var(--accent-hover); }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.feature-card { background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.feature-card h3 { font-family: var(--font-display); font-weight: 700; margin: 0 0 8px; color: var(--accent); }
.feature-card p { color: var(--muted); font-size: 14px; margin: 0; line-height: 1.5; }

.landing-footer { text-align: center; padding: 24px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.pricing-card {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 14px;
  padding: 28px 24px; position: relative; display: flex; flex-direction: column;
}
.pricing-card.featured { border-color: var(--accent); background: rgba(255,190,24,0.06); }
.pricing-card .badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700;
  padding: 3px 12px; border-radius: 999px;
}
.pricing-card h3 { font-family: var(--font-display); font-weight: 700; margin: 0 0 8px; }
.price-tag { font-family: var(--font-mono); font-size: 32px; font-weight: 700; color: var(--accent); margin-bottom: 16px; }
.price-tag span { font-size: 14px; color: var(--muted); font-weight: 400; }
.pricing-card ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.pricing-card li { color: var(--muted); font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.pricing-card li:last-child { border-bottom: none; }
.pricing-card .btn-cta { text-align: center; }

/* ---------- Часті запитання (акордеон), як у конкурента ---------- */
.faq-block { max-width: 1100px; margin: 0 auto; padding: 64px 24px; border-top: 1px solid var(--border); text-align: center; }
.faq-eyebrow {
  display: block; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 2px;
  font-size: 12px; color: var(--accent); margin-bottom: 12px;
}
.faq-title { font-family: var(--font-display); font-weight: 800; font-size: 34px; margin: 0 0 32px; }
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.faq-item { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.faq-question {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 18px 20px; background: none; border: none; color: var(--text); font-family: var(--font-body);
  font-weight: 600; font-size: 15px; cursor: pointer; text-align: left;
}
.faq-question:hover { color: var(--accent); background: none; }
.faq-arrow { color: var(--muted); transition: transform 0.2s; flex-shrink: 0; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.faq-answer p { margin: 0; padding: 0 20px 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }

@media (max-width: 720px) {
  .faq-title { font-size: 26px; }
}

/* ---------- Умови користування (terms.html) — звичайний текстовий документ,
   вужча колонка для читабельності, ніж решта лендінгу. ---------- */
.terms-page { max-width: 760px; }
.terms-page h1 { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1.25; margin: 40px 0 20px; }
.terms-notice {
  background: rgba(255,190,24,0.08); border: 1px solid rgba(255,190,24,0.3); border-radius: 10px;
  padding: 16px 18px; margin-bottom: 32px; font-size: 13.5px; color: var(--muted); line-height: 1.6;
}
.terms-notice strong { color: var(--text); }
.terms-section { margin-bottom: 30px; }
.terms-section h2 { font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1.3; margin: 0 0 12px; }
.terms-section p, .terms-section li { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 0 0 10px; }
.terms-section strong { color: var(--text); }
.terms-section ul, .terms-section ol { padding-left: 22px; margin: 0; }
/* 🔶-позначки з чернетки — відкриті питання, ще не вирішені; підсвічено,
   але текст лишається дослівно таким, як у джерелі, без редагування. */
.terms-flag { background: rgba(255,190,24,0.1); padding: 1px 5px; border-radius: 4px; font-style: italic; }

.landing-footer a { color: var(--muted); text-decoration: none; margin-left: 16px; }
.landing-footer a:hover { color: var(--accent); }
