/* Волшебные Двери ИИстины — «Обсидиановый гримуар».
   Дуальность Свет(золото) / Тьма(аметист), кириллица-фэнтези. */

:root {
  color-scheme: dark;

  --abyss: #070409;
  --ink: #0b0710;
  --ink-2: #150c1e;
  --panel: rgba(23, 14, 32, 0.86);
  --panel-2: rgba(31, 19, 43, 0.9);

  --gold: #e7b24c;
  --gold-bright: #ffd67a;
  --ember: #d9622d;
  --violet: #8b5cf6;
  --violet-deep: #5b2ca8;
  --danger: #e0674f;
  --ok: #9ad86f;

  --text: #f3e9d8;
  --muted: #b3a2bd;
  --line: rgba(231, 178, 76, 0.34);
  --line-soft: rgba(158, 122, 210, 0.24);
  --shadow: rgba(2, 0, 6, 0.6);

  --f-display: "Ruslan Display", "Yeseva One", serif;
  --f-head: "Yeseva One", Georgia, serif;
  --f-body: "Golos Text", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 14px;
  font-family: var(--f-body);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(1200px 620px at 15% -8%, rgba(139, 92, 246, 0.16), transparent 60%),
    radial-gradient(980px 560px at 92% 0%, rgba(217, 98, 45, 0.13), transparent 58%),
    linear-gradient(180deg, #0d0714 0%, #080510 45%, #060309 100%);
}

button, input, select { font: inherit; color: inherit; }

/* Медленная арканная аврора на фоне */
.aurora {
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 70vh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(50% 60% at 25% 30%, rgba(139, 92, 246, 0.22), transparent 70%),
    radial-gradient(45% 55% at 78% 20%, rgba(231, 178, 76, 0.14), transparent 72%);
  filter: blur(30px);
  opacity: 0.8;
  animation: aurora 26s ease-in-out infinite alternate;
}
@keyframes aurora {
  0% { transform: translate3d(-3%, -2%, 0) scale(1); }
  100% { transform: translate3d(4%, 3%, 0) scale(1.12); }
}

.shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 34px 18px 60px;
}

.shell, .panel, .hero, .section-head, .layout, .artifact-workbench,
.artifact-detail, .artifact-copy, .artifact-meta div, .command-item,
.note-item, .inventory-entry-body { min-width: 0; }

h1, h2, h3, p, strong, small, span, code, dt, dd { overflow-wrap: break-word; }
h1, h2, h3, p { margin-top: 0; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Эйброу ---------- */
.eyebrow {
  margin: 0 0 10px;
  font-family: var(--f-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: "◆";
  margin-right: 0.7em;
  color: var(--violet);
  font-size: 0.7em;
  vertical-align: 0.15em;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 30px;
  align-items: center;
  margin-bottom: 26px;
  padding: 46px 44px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  /* НЕТ overflow:hidden на герое — иначе клипует fixed-поповер «?». Искры клипует .hero-fx. */
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(91, 44, 168, 0.28), transparent 55%),
    linear-gradient(150deg, rgba(30, 18, 42, 0.94), rgba(12, 7, 18, 0.92));
  box-shadow: 0 40px 120px var(--shadow), inset 0 1px 0 rgba(255, 235, 190, 0.06);
}
.hero::before { /* тонкая золотая рамка-гравюра */
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(231, 178, 76, 0.16);
  border-radius: 16px;
  pointer-events: none;
}

.hero-fx { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; border-radius: 22px; }
.ember {
  position: absolute;
  bottom: -10px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-bright), rgba(231, 178, 76, 0.1) 70%, transparent);
  box-shadow: 0 0 8px rgba(255, 214, 122, 0.7);
  opacity: 0;
  animation: rise linear infinite;
}
@keyframes rise {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  12% { opacity: 0.9; }
  85% { opacity: 0.7; }
  100% { transform: translateY(-360px) scale(1.1); opacity: 0; }
}

/* hero-copy ВЫШЕ дверей: иначе fixed-поповер «?» (он внутри hero-copy) прячется за дверьми. */
.hero-copy { position: relative; z-index: 3; }
.hero-side { position: relative; z-index: 1; }

.hero-title-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }

.hero-title {
  margin: 0 0 14px;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2.7rem, 6.4vw, 6.2rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #fff2d4 0%, var(--gold) 52%, #a86a24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 26px rgba(231, 178, 76, 0.28));
}
.hero-title span {
  display: block;
  background: linear-gradient(180deg, #e5d4ff 0%, var(--violet) 60%, #4a2a8f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 26px rgba(139, 92, 246, 0.3));
}

.hero-help { display: inline-flex; margin-top: 0.5rem; }

.summary {
  margin: 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.55;
}

.hero-side { display: grid; gap: 22px; justify-items: center; }

/* --- Три арканные двери (signature) --- */
.doors {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  perspective: 900px;
}
.door {
  position: relative;
  width: clamp(58px, 8vw, 96px);
  aspect-ratio: 5 / 9;
  border-radius: 44% 44% 8% 8% / 22% 22% 6% 6%;
  background:
    linear-gradient(180deg, rgba(52, 32, 20, 0.95), rgba(20, 12, 9, 0.98));
  border: 1.5px solid rgba(231, 178, 76, 0.55);
  box-shadow:
    inset 0 0 22px rgba(0, 0, 0, 0.7),
    inset 0 0 0 3px rgba(20, 12, 9, 0.6),
    0 0 22px rgba(231, 178, 76, 0.16);
  display: grid;
  place-items: center;
  animation: doorFloat 4.6s ease-in-out infinite;
}
.door:nth-child(2) { animation-delay: 0.5s; }
.door:nth-child(3) { animation-delay: 1s; }
.door::after { /* рунный контур внутри */
  content: "";
  position: absolute;
  inset: 12% 16%;
  border: 1px solid rgba(231, 178, 76, 0.28);
  border-radius: 40% 40% 6% 6% / 18% 18% 4% 4%;
}
.door-rune {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  color: var(--gold-bright);
  text-shadow: 0 0 14px rgba(255, 214, 122, 0.85), 0 0 30px rgba(231, 178, 76, 0.5);
  animation: runePulse 2.4s ease-in-out infinite;
}
.door--special {
  border-color: rgba(139, 92, 246, 0.75);
  box-shadow:
    inset 0 0 26px rgba(0, 0, 0, 0.7),
    inset 0 0 0 3px rgba(20, 12, 9, 0.6),
    0 0 30px rgba(139, 92, 246, 0.34);
}
.door--special .door-rune {
  color: #d9c6ff;
  text-shadow: 0 0 16px rgba(178, 140, 255, 0.9), 0 0 34px rgba(139, 92, 246, 0.55);
}
@keyframes doorFloat {
  0%, 100% { transform: translateY(0) rotateX(0deg); filter: brightness(1); }
  50% { transform: translateY(-8px) rotateX(3deg); filter: brightness(1.12); }
}
@keyframes runePulse {
  0%, 100% { opacity: 0.7; transform: scale(0.94); }
  50% { opacity: 1; transform: scale(1.06); }
}

.status-card {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  padding: 13px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(10, 6, 16, 0.7);
  color: var(--muted);
  font-size: 0.94rem;
}
.status-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(154, 216, 111, 0.16), 0 0 12px var(--ok);
  animation: blink 2.2s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ---------- Core notes ---------- */
.core-notes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}
.core-note {
  position: relative;
  padding: 20px 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(38, 23, 52, 0.9), rgba(14, 8, 20, 0.9));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.core-note::before { /* угловой рунный акцент */
  content: "";
  position: absolute;
  top: 10px; right: 10px;
  width: 16px; height: 16px;
  border-top: 1px solid var(--gold);
  border-right: 1px solid var(--gold);
  opacity: 0.5;
}
.core-note:hover {
  transform: translateY(-4px);
  border-color: var(--line);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(231, 178, 76, 0.2);
}
.core-note-title { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.core-note strong {
  font-family: var(--f-head);
  font-size: 1.24rem;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.01em;
}
.core-note-title strong { margin-bottom: 0; }
.core-note p { margin: 0; color: var(--muted); line-height: 1.42; font-size: 0.97rem; }

/* ---------- Панели ---------- */
.panel {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 22px 60px var(--shadow);
  /* НЕТ backdrop-filter: он создаёт containing-block и ломает position:fixed поповеры (?). */
}

/* Команды чата — ВСЕГДА жирные, золотые и НЕРАЗРЫВНЫЕ (! не отрывается от слова). */
.cmd {
  white-space: nowrap;
  font-family: var(--f-mono);
  font-weight: 700;
  color: var(--gold-bright);
}
.player-panel { padding: 30px; margin-bottom: 26px; }

h2 {
  margin: 0;
  font-family: var(--f-head);
  font-weight: 400;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  letter-spacing: 0.01em;
  color: var(--text);
}
h3 {
  margin: 0 0 12px;
  font-family: var(--f-head);
  font-weight: 400;
  font-size: 1.9rem;
  line-height: 1.05;
  color: var(--text);
}

.section-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.section-title-row { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.section-title-row h2 { margin-bottom: 0; }
.section-help { display: inline-flex; }

/* ---------- Форма ---------- */
.lookup { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 14px; }
input, select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(9, 5, 14, 0.85);
  color: var(--text);
  padding: 0 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input::placeholder { color: rgba(179, 162, 189, 0.6); }
input:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(231, 178, 76, 0.18), 0 0 22px rgba(231, 178, 76, 0.14);
}

button {
  position: relative;
  min-height: 52px;
  border: 1px solid rgba(255, 214, 122, 0.6);
  border-radius: 12px;
  padding: 0 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #241505;
  cursor: pointer;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold) 55%, #b97f28);
  box-shadow: 0 10px 26px rgba(231, 178, 76, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
button::after { /* блик-свайп */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}
button:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 16px 34px rgba(231, 178, 76, 0.32); }
button:hover::after { transform: translateX(120%); }
button:active { transform: translateY(0); }

.player-result {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(9, 5, 14, 0.8);
}
.player-result.empty, .error { color: var(--muted); }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  padding: 15px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(160deg, rgba(58, 36, 78, 0.5), rgba(16, 9, 24, 0.6));
}
.stat span { display: block; color: var(--muted); font-size: 0.88rem; }
.stat strong {
  display: block;
  margin-top: 5px;
  font-family: var(--f-head);
  font-weight: 400;
  color: var(--gold-bright);
  font-size: 1.7rem;
}

.inventory { display: grid; gap: 9px; margin-top: 11px; }
.inventory-item, .command-item, .note-item {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(9, 5, 14, 0.62);
}
.inventory-item strong { color: var(--gold); }

.inventory-entry { display: grid; grid-template-columns: 60px 1fr; gap: 13px; align-items: center; }
.inventory-icon { position: relative; display: grid; width: 60px; height: 60px; place-items: center; }
.inventory-icon img { width: 60px; height: 60px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(231, 178, 76, 0.3)); }
.inventory-placeholder {
  width: 60px; height: 60px;
  display: grid; place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  color: var(--gold);
  background: rgba(231, 178, 76, 0.08);
  font-size: 1.6rem;
}
.inventory-entry-body { min-width: 0; }
.inventory-entry-head { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
.inventory-count {
  position: absolute; top: -8px; right: -9px;
  color: var(--text); font-weight: 700; font-size: 0.82rem;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.24);
}
.inventory-note { color: var(--muted); font-size: 0.9rem; }

/* ---------- Layout: команды + артефакты ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}
.commands-panel, .artifacts-panel { padding: 30px; }
.commands-list, .notes-list { display: grid; gap: 11px; }
.notes-list { margin-top: 18px; }

.command-item { transition: transform 0.2s ease, border-color 0.2s ease; }
.command-item:hover { transform: translateX(3px); border-color: var(--line); }
.command-item code {
  display: inline-block;
  margin-bottom: 7px;
  font-family: var(--f-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--muted); /* плейсхолдер («текст», «факт») приглушён; сама команда золотая через .cmd */
  padding: 3px 9px;
  border-radius: 7px;
  background: rgba(231, 178, 76, 0.1);
  border: 1px solid rgba(231, 178, 76, 0.2);
  white-space: nowrap;
}
.command-title-row { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; min-width: 0; margin-bottom: 4px; }
.command-item.featured {
  border-color: rgba(231, 178, 76, 0.7);
  background: linear-gradient(150deg, rgba(76, 46, 108, 0.55), rgba(24, 14, 32, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255, 228, 165, 0.12), 0 12px 30px rgba(0, 0, 0, 0.3);
}
.command-item strong { display: block; margin-bottom: 0; font-family: var(--f-head); font-weight: 400; font-size: 1.12rem; }
.command-item p, .note-item { color: var(--muted); line-height: 1.42; }

/* ---------- Help popover (механика из app.js — сохранена) ---------- */
.help-wrap { position: relative; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; outline: none; }
.help-dot {
  display: inline-grid; width: 24px; height: 24px; place-items: center;
  border: 1px solid rgba(231, 178, 76, 0.7);
  border-radius: 999px;
  background: rgba(231, 178, 76, 0.13);
  color: var(--gold);
  font-weight: 700; font-size: 0.8rem; line-height: 1;
  cursor: help;
  transition: background 0.2s ease, transform 0.2s ease;
}
.help-wrap:hover .help-dot, .help-wrap.open .help-dot { background: rgba(231, 178, 76, 0.26); transform: scale(1.08); }
.help-popover {
  position: fixed;
  top: var(--help-top, 0); left: var(--help-left, 0);
  z-index: 1000;
  width: var(--help-width, min(380px, calc(100vw - 24px)));
  max-width: calc(100vw - 24px);
  max-height: min(70vh, 520px);
  overflow: auto;
  padding: 14px 16px;
  border: 1px solid rgba(231, 178, 76, 0.6);
  border-radius: 12px;
  background: rgba(14, 8, 20, 0.98);
  color: var(--text);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.6);
  font-size: 0.93rem; line-height: 1.4;
  opacity: 0; pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  white-space: pre-line;
}
/* Поповер портирован в <body>; показ управляется классом .show из app.js. */
.help-popover.show {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}

/* ---------- Артефакты ---------- */
.select-wrap { display: grid; gap: 6px; min-width: min(360px, 100%); color: var(--muted); font-size: 0.9rem; }
.artifact-workbench { display: grid; grid-template-columns: minmax(230px, 290px) minmax(0, 1fr); gap: 18px; }
.artifact-grid {
  display: grid; align-content: start; gap: 9px;
  max-height: 760px; overflow: auto; padding-right: 5px;
}
.artifact-grid::-webkit-scrollbar { width: 8px; }
.artifact-grid::-webkit-scrollbar-thumb { background: rgba(231, 178, 76, 0.28); border-radius: 8px; }

.artifact-card {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 11px; align-items: center;
  width: 100%; min-height: 60px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 9px;
  background: rgba(14, 8, 20, 0.8);
  color: var(--text); text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.artifact-card:hover { transform: translateY(-2px); border-color: var(--line); box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35); }
.artifact-card.active {
  border-color: var(--gold);
  background: linear-gradient(150deg, rgba(118, 72, 30, 0.6), rgba(48, 29, 66, 0.7));
  box-shadow: 0 0 0 1px rgba(231, 178, 76, 0.35), 0 14px 30px rgba(0, 0, 0, 0.4);
}
.artifact-card img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(231, 178, 76, 0.25)); }
.artifact-card span { min-width: 0; }
.artifact-card strong { display: block; line-height: 1.08; font-family: var(--f-head); font-weight: 400; font-size: 1.02rem; overflow-wrap: anywhere; }
.artifact-card small { display: block; line-height: 1.1; color: var(--muted); font-size: 0.8rem; overflow-wrap: anywhere; }

.artifact-detail {
  display: grid; grid-template-columns: minmax(220px, 360px) minmax(0, 1fr); gap: 22px;
  min-height: 420px;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
}
.artifact-image-frame {
  position: relative;
  display: grid; place-items: center;
  min-height: 360px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, rgba(139, 92, 246, 0.2), rgba(9, 5, 14, 0.85) 70%);
}
.artifact-image-frame::before { /* вращающийся рунный ореол */
  content: "";
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, rgba(231, 178, 76, 0.22), transparent 40%);
  filter: blur(6px);
  animation: halo 14s linear infinite;
}
@keyframes halo { to { transform: rotate(360deg); } }
.artifact-image-frame img {
  position: relative; z-index: 1;
  max-width: 90%; max-height: 340px; object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.55));
  animation: relicFloat 5.5s ease-in-out infinite;
}
@keyframes relicFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.tag {
  display: inline-flex; width: fit-content; margin-bottom: 14px;
  padding: 5px 13px;
  border-radius: 999px;
  font-family: var(--f-mono); font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #cbb6ff;
}
.artifact-copy p { color: var(--muted); font-size: 1.05rem; line-height: 1.5; }
.artifact-copy h3 { font-size: clamp(1.7rem, 3vw, 2.7rem); }
.artifact-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 11px; margin: 20px 0 0; }
.artifact-meta div {
  padding: 13px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: rgba(9, 5, 14, 0.66);
}
.artifact-meta dt { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }
.artifact-meta dd { margin: 5px 0 0; color: var(--text); font-family: var(--f-head); font-weight: 400; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.site-foot {
  margin-top: 34px;
  text-align: center;
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}
.site-foot span { font-family: var(--f-head); color: var(--gold); }

/* ---------- Адаптив ---------- */
@media (max-width: 1500px) {
  .artifact-detail { grid-template-columns: 1fr; }
  .artifact-image-frame { min-height: 320px; }
  .artifact-image-frame img { max-height: 310px; }
}
@media (max-width: 1360px) {
  .layout { grid-template-columns: 1fr; }
  .commands-list, .notes-list { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding: 34px 26px; text-align: center; }
  .hero-title-row { justify-content: center; }
  .summary { margin-inline: auto; }
  .hero-side { justify-items: center; }
  .artifact-workbench { grid-template-columns: 1fr; }
  .artifact-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-height: 380px; }
  .core-notes, .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .artifact-image-frame { min-height: 300px; }
}
@media (max-width: 620px) {
  .shell { padding: 14px 11px 40px; }
  .hero { padding: 26px 18px; }
  .hero::before { inset: 8px; }
  .player-panel, .commands-panel, .artifacts-panel { padding: 20px; }
  .section-head, .lookup { grid-template-columns: 1fr; flex-direction: column; }
  .artifact-grid, .core-notes, .stat-grid, .artifact-meta { grid-template-columns: 1fr; }
  .artifact-detail { min-height: 0; padding: 14px; }
  .artifact-image-frame { min-height: 240px; }
  .artifact-copy h3 { font-size: clamp(1.5rem, 9vw, 2.2rem); }
  .doors { gap: 9px; }
}

/* ---------- Доступность: меньше движения ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
