/* =========================================================
   ОРДЕН ПЕПЕЛЬНОГО ПЕРА — Dark Fantasy / Grimoire Stylesheet
   Эстетика "Oath of Dagon Spread": глубокие чернила, старое
   золото, гравюрная штриховка, тонкие рамки, туман.
   ========================================================= */

:root {
  --bg-0: #0C0B0F;
  --bg-1: #151218;
  --bg-2: #1A1519;
  --panel: rgba(24, 18, 22, .82);

  --line: #2a2329;
  --line-2: #3a2f33;

  --gold: #AD8B47;
  --gold-soft: #c9a45e;
  --gold-dim: #6b5628;
  --blood: #721D2B;
  --blood-soft: #9a3142;
  --ash: #B8B0A4;

  --text: #cfc4b1;
  --text-dim: #a39884;
  --text-mute: #7d7364;

  --font-display: "Cinzel", "Cormorant Garamond", serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", "Manrope", system-ui, sans-serif;

  --radius: 2px;
  --shadow-1: 0 20px 60px rgba(0,0,0,.8);
  --shadow-2: 0 8px 24px rgba(0,0,0,.55);
  --ease: .3s cubic-bezier(.25,.8,.25,1);
  --maxw: 1200px;
  --reading-w: 70ch;
}

/* ===== Сброс и база ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg-0); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px; line-height: 1.65;
  color: var(--text);
  background-color: var(--bg-0);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(114,29,43,.08), transparent 60%),
    radial-gradient(circle at 82% 42%, rgba(173,139,71,.05), transparent 50%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--gold-soft); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--gold); }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
section[id], div[id] { scroll-margin-top: 76px; }
::selection { background: rgba(114,29,43,.55); color: #fff; }

/* ===== Фоновые слои ===== */
.bg-stars { position: fixed; inset: 0; z-index: -3; pointer-events: none; opacity: .7; }
.bg-stars svg { width: 100%; height: 100%; }
.bg-stars .st { animation: twinkle 4s ease-in-out infinite; }
.bg-stars .d0 { animation-delay: 0s; }   .bg-stars .d1 { animation-delay: .6s; }
.bg-stars .d2 { animation-delay: 1.2s; } .bg-stars .d3 { animation-delay: 1.8s; }
.bg-stars .d4 { animation-delay: 2.4s; } .bg-stars .d5 { animation-delay: 3s; }
.bg-stars .d6 { animation-delay: 3.6s; }
@keyframes twinkle { 0%,100% { opacity: .25; } 50% { opacity: .9; } }

.bg-noise {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  opacity: .1; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bg-vignette {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(150% 120% at 50% 40%, transparent 42%, rgba(5,4,6,.88) 100%);
}

/* ===== Контейнер ===== */
.container { width: min(var(--maxw), 92%); margin: 0 auto; }
.container.narrow { width: min(760px, 92%); }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.6em;
  font-family: var(--font-display); font-size: .8rem; font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--gold-soft);
  background: linear-gradient(to bottom, #1d181c, #110d10);
  border: 1px solid var(--gold-dim); border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease), color var(--ease);
  position: relative; overflow: hidden; text-decoration: none;
}
.btn::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(173,139,71,.12), transparent);
  opacity: 0; transition: opacity var(--ease);
}
.btn:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: 0 0 14px rgba(173,139,71,.18), var(--shadow-1); color: var(--gold); }
.btn:hover::before { opacity: 1; }
.btn:active { transform: translateY(0); }
.btn-primary { color: #0e0b07; background: linear-gradient(to bottom, #c9a45e, #AD8B47); border-color: #AD8B47; }
.btn-primary:hover { color: #000; box-shadow: 0 0 18px rgba(173,139,71,.35), var(--shadow-1); }
.btn-primary::before { background: linear-gradient(to bottom, rgba(255,255,255,.22), transparent); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text-dim); box-shadow: none; }
.btn-ghost:hover { border-color: var(--gold-dim); color: var(--gold); }
.btn-block { width: 100%; }

.link-btn {
  background: none; border: none; padding: 0; color: var(--gold-soft);
  font-family: var(--font-display); font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  font-size: .8em; text-decoration: underline; text-underline-offset: 4px;
}
.link-btn:hover { color: var(--gold); }

/* ===== Шапка ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, rgba(12,11,15,.98), rgba(12,11,15,.86));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.2rem; width: min(var(--maxw), 92%); margin: 0 auto; padding: .6rem 0; }
.logo { display: inline-flex; align-items: center; gap: .8rem; color: var(--gold); flex-shrink: 0; }
.logo-mark { width: 42px; height: 42px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-title { font-family: var(--font-display); font-weight: 600; letter-spacing: .12em; font-size: .95rem; color: var(--gold-soft); }
.logo-sub { font-family: var(--font-serif); font-style: italic; font-size: .8rem; color: var(--text-mute); letter-spacing: .05em; }

.main-nav { margin-left: auto; }
.nav-list { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-list a {
  display: inline-block; padding: .5rem .7rem;
  font-family: var(--font-display); font-size: .72rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim);
  border-radius: var(--radius); transition: color var(--ease), background var(--ease);
}
.nav-list a:hover { color: var(--gold); background: rgba(173,139,71,.06); }

.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: .45rem; flex-direction: column; gap: 5px; min-width: 42px; min-height: 42px; justify-content: center;
}
.nav-toggle-bar { width: 22px; height: 2px; background: var(--gold-soft); transition: transform var(--ease), opacity var(--ease); margin: 0 auto; }

.header-auth { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.header-auth .btn { padding: .55em 1.1em; font-size: .7rem; }
.user-chip {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .3em .9em .3em .3em; border: 1px solid var(--line-2); border-radius: 40px;
  font-family: var(--font-display); font-size: .75rem; color: var(--gold-soft); letter-spacing: .05em;
  background: var(--bg-1); max-width: 190px;
}
.user-chip .avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg-0); border: 1px solid var(--gold-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
}
.user-chip .uname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout-btn {
  background: none; border: 1px solid var(--line-2); color: var(--text-dim);
  padding: .5em .85em; font-family: var(--font-display); font-size: .68rem;
  letter-spacing: .1em; text-transform: uppercase; border-radius: var(--radius);
  transition: color var(--ease), border-color var(--ease);
}
.logout-btn:hover { color: var(--gold); border-color: var(--gold-dim); }

/* ===== Герой (Зал Конклава) ===== */
.hero {
  position: relative; min-height: min(100svh, 820px);
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 6rem 1rem 4rem; overflow: hidden;
}
.hero-skyline {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(1100px, 160vw); height: min(1100px, 160vw);
  z-index: 1; opacity: .6; mix-blend-mode: screen; pointer-events: none;
}
.hero-skyline svg { width: 100%; height: 100%; }

/* вращение колец сигила — медленное, ненавязчивое */
.sigil-a, .sigil-b, .sigil-c, .sigil-d { transform-origin: 500px 500px; }
.sigil-a { animation: spin 90s linear infinite; }
.sigil-b { animation: spin 140s linear infinite reverse; }
.sigil-c { animation: spin 110s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* туман */
.fog {
  position: absolute; z-index: 2; pointer-events: none;
  width: 120%; height: 40%; left: -10%;
  background: radial-gradient(60% 100% at 50% 50%, rgba(184,176,164,.07), transparent 70%);
  filter: blur(20px);
}
.fog-a { bottom: -5%; animation: fogDrift 46s ease-in-out infinite alternate; }
.fog-b { bottom: 12%; animation: fogDrift 62s ease-in-out infinite alternate-reverse; opacity: .7; }
@keyframes fogDrift {
  from { transform: translateX(-6%); }
  to   { transform: translateX(6%); }
}

.hero-candles { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.candle-slot { position: absolute; bottom: 4%; width: 130px; }
.candle-slot.left { left: max(2%, calc(50vw - 580px)); }
.candle-slot.right { right: max(2%, calc(50vw - 580px)); }
.candle-slot .g-flame { width: 100%; height: auto; }

.hero-content { position: relative; z-index: 3; max-width: 900px; padding: 2rem 1rem; }
.hero-kicker {
  font-family: var(--font-display); color: var(--gold); letter-spacing: .4em;
  text-transform: uppercase; font-size: .85rem; margin: 0 0 1.5rem;
}
.hero-title {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(2rem, 6vw, 3.9rem); line-height: 1.12; margin: 0 0 1.5rem;
  color: #efe8d8; letter-spacing: .02em; text-shadow: 0 4px 24px rgba(0,0,0,.85);
}
.hero-tagline {
  font-family: var(--font-serif); font-style: italic; font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  color: var(--text-dim); margin: 0 auto 2.5rem; max-width: 640px; line-height: 1.6;
}
.hero-actions { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; }
.hero-rune { margin-top: 3rem; display: flex; justify-content: center; opacity: .85; }
.hero-rune svg { width: 280px; }

/* ===== Анимации графики ===== */
.g-flame .flame-outer { transform-origin: 70px 138px; animation: flameOuter 2.2s ease-in-out infinite alternate; }
.g-flame .flame-inner { transform-origin: 70px 134px; animation: flameInner 1.6s ease-in-out infinite alternate; }
.g-flame .flame-halo { animation: haloPulse 3.4s ease-in-out infinite; }
.g-flame .spark { animation: sparkRise 3.2s ease-in infinite; opacity: 0; }
.g-flame .s1 { animation-delay: 0s; } .g-flame .s2 { animation-delay: .8s; } .g-flame .s3 { animation-delay: 1.6s; }
@keyframes flameOuter { 0% { transform: scaleY(1) skewX(0); } 100% { transform: scaleY(1.06) skewX(1.6deg); } }
@keyframes flameInner { 0% { transform: scaleY(1); } 100% { transform: scaleY(1.12); } }
@keyframes haloPulse { 0%,100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes sparkRise { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-46px); opacity: 0; } }

.g-map .mp { cursor: pointer; }
.g-map .mp-flick { animation: mpFlick 1.8s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.g-map .mp:nth-child(2) .mp-flick { animation-delay: .5s; }
.g-map .mp:nth-child(3) .mp-flick { animation-delay: 1s; }
.g-map .mp:nth-child(4) .mp-flick { animation-delay: 1.4s; }
@keyframes mpFlick { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.g-seal { filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)); }
.g-ico { width: 44px; height: 44px; }
.g-empty { width: 110px; height: 110px; margin: 0 auto; }

/* ===== Секции ===== */
.section { padding: 6rem 0; position: relative; }
.section-alt {
  background: linear-gradient(180deg, rgba(21,18,24,.45), rgba(12,11,15,.45));
  border-top: 1px solid rgba(173,139,71,.1); border-bottom: 1px solid rgba(173,139,71,.1);
}
.section-head { text-align: center; margin-bottom: 3.2rem; }
.section-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.7rem, 4vw, 2.5rem); letter-spacing: .12em;
  color: var(--gold-soft); margin: 0 0 .7rem; text-transform: uppercase;
}
.section-lead { font-family: var(--font-serif); font-style: italic; color: var(--text-mute); max-width: 620px; margin: 0 auto; font-size: 1.12rem; }
.orn-slot { display: flex; justify-content: center; margin-top: 1.2rem; }
.orn-slot svg { width: 240px; }

.block-title { font-family: var(--font-display); color: var(--gold-soft); letter-spacing: .1em; text-transform: uppercase; font-size: 1.3rem; margin: 0 0 .7rem; }
.block-title.center { text-align: center; }
.block-sub { color: var(--text-mute); font-family: var(--font-serif); font-style: italic; margin: 0 0 1.5rem; font-size: 1.05rem; }

/* ===== Проза ===== */
.prose { font-family: var(--font-serif); font-size: 1.22rem; line-height: 1.8; color: var(--text); }
.prose p { margin: 0 0 1.2rem; }
.prose strong { color: var(--gold-soft); font-weight: 600; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.manifesto-text { text-align: center; font-size: 1.3rem; }
.manifesto-text p { max-width: 64ch; margin: 0 auto 1.4rem; }

/* ===== Общие панели ===== */
.upload-block, .order-block, .order-form, .support-form, .support-aside,
.review-form, .codex, .tavern, .chron-card, .script-card, .quest-card,
.member-card, .review-card, .lore-card, .featured, .founder-card, .merch-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-2); position: relative;
}

/* ===== Избранная история ===== */
.featured { margin-top: 4rem; display: grid; grid-template-columns: 1fr 1.2fr; overflow: hidden; }
.featured::before { content: ""; position: absolute; top: -1px; left: -1px; right: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-dim), transparent); opacity: .7; }
.featured-cover { background: #0c0b0f; border-right: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 2rem; }
.featured-cover svg { width: 100%; max-width: 320px; height: auto; }
.featured-body { padding: 3rem; display: flex; flex-direction: column; justify-content: center; }
.featured-tag { font-family: var(--font-display); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-dim); margin-bottom: .5rem; }
.featured-title { font-family: var(--font-display); color: var(--gold-soft); font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 1.2rem; line-height: 1.25; }
.featured-quote { font-family: var(--font-serif); font-style: italic; font-size: 1.18rem; border-left: 2px solid var(--gold-dim); padding-left: 1.2rem; margin: 0 0 2rem; }
.featured-actions { display: flex; gap: .8rem; flex-wrap: wrap; }

/* ===== Фильтры ===== */
.filters { display: flex; gap: 1.4rem; flex-wrap: wrap; margin-bottom: 2.4rem; justify-content: center; }
.filter-group { display: flex; flex-direction: column; gap: .4rem; min-width: 170px; }
.filter-label { font-family: var(--font-display); font-size: .68rem; letter-spacing: .15em; text-transform: uppercase; color: var(--text-mute); }

/* ===== Хроники ===== */
.chron-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 1.8rem; }
.chron-card { display: flex; flex-direction: column; cursor: pointer; transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease); overflow: hidden; }
.chron-card:hover, .chron-card:focus-visible { transform: translateY(-4px); border-color: var(--gold-dim); box-shadow: 0 0 18px rgba(173,139,71,.1), var(--shadow-2); outline: none; }
.chron-card::before { content: ""; position: absolute; top: -1px; left: -1px; right: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-dim), transparent); opacity: .6; z-index: 1; }
.chron-cover { height: 180px; background: #0c0b0f; border-bottom: 1px solid var(--line); }
.chron-cover svg { width: 100%; height: 100%; }
.chron-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.chron-meta-row { display: flex; gap: .6rem; margin-bottom: .8rem; flex-wrap: wrap; }
.chip { font-family: var(--font-display); font-size: .63rem; letter-spacing: .1em; text-transform: uppercase; padding: .3em .6em; border: 1px solid var(--line-2); color: var(--text-mute); border-radius: var(--radius); }
.chip.status-complete { color: var(--gold); border-color: var(--gold-dim); }
.chip.status-wip { color: var(--blood-soft); border-color: rgba(114,29,43,.55); }
.chip.status-preview { color: var(--ash); border-color: #4a443c; }
.chron-title { font-family: var(--font-display); color: var(--gold-soft); font-size: 1.22rem; margin: 0 0 .8rem; line-height: 1.3; }
.chron-excerpt { font-family: var(--font-serif); font-style: italic; color: var(--text-dim); flex: 1; font-size: 1.05rem; margin: 0; }
.chron-foot { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--text-mute); }
.chron-author { font-family: var(--font-display); color: var(--gold-soft); letter-spacing: .05em; font-size: .72rem; text-transform: uppercase; }
.chron-empty { grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; color: var(--text-mute); font-family: var(--font-serif); font-style: italic; font-size: 1.1rem; }

/* ===== Загрузка рукописи ===== */
.upload-block { margin-top: 4rem; padding: 3rem; }
.upload-head { text-align: center; margin-bottom: 2rem; }
.upload-title { font-family: var(--font-display); color: var(--gold-soft); letter-spacing: .1em; text-transform: uppercase; font-size: 1.35rem; margin: 0 0 .5rem; }
.upload-sub { color: var(--text-mute); font-family: var(--font-serif); font-style: italic; max-width: 560px; margin: 0 auto; font-size: 1.05rem; }
.upload-form { max-width: 680px; margin: 0 auto; }
.file-drop {
  border: 1px dashed var(--gold-dim); border-radius: var(--radius); padding: 2.4rem 1.5rem;
  background: rgba(173,139,71,.03); cursor: pointer; text-align: center;
  transition: background var(--ease), border-color var(--ease);
}
.file-drop:hover, .file-drop.dragover { background: rgba(173,139,71,.08); border-color: var(--gold); }
.file-drop:focus-visible { outline: none; border-color: var(--gold); box-shadow: 0 0 0 1px rgba(173,139,71,.3); }
.file-drop-icon { font-size: 2.2rem; color: var(--gold-dim); display: block; margin-bottom: .4rem; }
.file-drop.has-file .file-drop-icon { color: var(--gold); }
.file-drop-label { font-family: var(--font-serif); font-style: italic; font-size: 1.08rem; color: var(--text-dim); }
.upload-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: .4rem; }
.up-manual { margin-top: 1.2rem; }

/* ===== Формы ===== */
.field { margin-bottom: 1.2rem; text-align: left; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
label { display: block; font-family: var(--font-display); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mute); margin-bottom: .5rem; }
label.check { display: flex; align-items: center; gap: .6rem; text-transform: none; letter-spacing: .02em; font-family: var(--font-body); font-size: .92rem; color: var(--text-dim); }
label.check input { width: auto; accent-color: var(--gold-dim); }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], select, textarea {
  width: 100%; padding: .8rem 1rem;
  background: #0c0b0f; color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius);
  font-size: 1rem; transition: border-color var(--ease), box-shadow var(--ease);
}
textarea { font-family: var(--font-serif); font-size: 1.08rem; resize: vertical; min-height: 90px; }
input::placeholder, textarea::placeholder { color: var(--text-mute); font-style: italic; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 10px rgba(173,139,71,.18); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23AD8B47'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.4rem; }
.form-msg { font-family: var(--font-serif); font-style: italic; font-size: 1rem; margin: 1rem 0 0; min-height: 1.4rem; color: var(--text-dim); }
.form-msg.ok { color: var(--gold-soft); }
.form-msg.err { color: var(--blood-soft); }

/* ===== Заказ ===== */
.order-block { margin-top: 4rem; padding: 3rem; }
.order-head { text-align: center; margin-bottom: 1.6rem; }
.order-form { max-width: 720px; margin: 0 auto; padding: 2.2rem; background: rgba(15,12,16,.6); }
.order-login-note, .review-login-note {
  margin-bottom: 1.4rem; padding: 1rem 1.2rem; border: 1px dashed var(--line-2); border-radius: var(--radius);
  background: rgba(114,29,43,.08); font-family: var(--font-serif); font-style: italic; color: var(--text-dim);
}
.order-summary {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  padding: 1rem 1.2rem; margin: 1.2rem 0;
  background: rgba(173,139,71,.05); border: 1px solid var(--line); border-radius: var(--radius);
}
.order-price { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; color: var(--gold); letter-spacing: .04em; }
.order-price-note { font-family: var(--font-serif); font-style: italic; color: var(--text-mute); font-size: .88rem; }

/* ===== Лор ===== */
.lore-map { border: 1px solid var(--gold-dim); background: #0c0b0f; box-shadow: var(--shadow-1); margin-bottom: .8rem; border-radius: var(--radius); overflow: hidden; }
.lore-map svg { width: 100%; height: auto; }
.lore-map-tip { font-family: var(--font-serif); font-style: italic; color: var(--text-mute); text-align: center; margin-bottom: 2.2rem; font-size: 1.05rem; min-height: 1.5em; }
.lore-tabs { display: flex; justify-content: center; gap: .4rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.lore-tab {
  background: none; border: none; padding: .7rem 1rem;
  font-family: var(--font-display); font-size: .75rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--text-mute); border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color var(--ease), border-color var(--ease);
}
.lore-tab.active { color: var(--gold); border-bottom-color: var(--gold-dim); }
.lore-tab:hover { color: var(--gold-soft); }
.lore-deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 1.5rem; }
.lore-card { padding: 1.5rem; }
.lore-card::before { content: ""; position: absolute; top: .6rem; right: .6rem; width: 10px; height: 10px; border-top: 1px solid var(--gold-dim); border-right: 1px solid var(--gold-dim); }
.lore-card::after { content: ""; position: absolute; bottom: .6rem; left: .6rem; width: 10px; height: 10px; border-bottom: 1px solid var(--gold-dim); border-left: 1px solid var(--gold-dim); }
.lore-kind { font-family: var(--font-display); font-size: .66rem; letter-spacing: .16em; color: var(--blood-soft); text-transform: uppercase; display: block; margin-bottom: .5rem; }
.lore-name { font-family: var(--font-display); color: var(--gold-soft); font-size: 1.15rem; margin: 0 0 .7rem; }
.lore-text { font-family: var(--font-serif); font-size: 1.08rem; color: var(--text-dim); margin: 0; }

/* ===== Скрипторий ===== */
.script-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1.8rem; margin-bottom: 4rem; }
.script-card { padding: 1.8rem; display: flex; flex-direction: column; transition: transform var(--ease), border-color var(--ease); }
.script-card:hover { transform: translateY(-3px); border-color: var(--gold-dim); }
.script-seal { position: absolute; top: 1.2rem; right: 1.2rem; width: 62px; height: 62px; }
.script-seal svg { width: 100%; height: 100%; }
.script-title { font-family: var(--font-display); color: var(--gold-soft); font-size: 1.25rem; margin: 0 0 .5rem; max-width: 78%; line-height: 1.3; }
.script-author { font-family: var(--font-display); color: var(--text-mute); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.script-excerpt { font-family: var(--font-serif); font-style: italic; font-size: 1.12rem; color: var(--text); margin: 1.4rem 0; flex: 1; }
.script-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--text-mute); }
.script-read { font-family: var(--font-display); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-soft); }

/* ===== Таверна / чат ===== */
.tavern { overflow: hidden; }
.tavern-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; padding: 1.2rem 1.8rem; border-bottom: 1px solid var(--line); background: rgba(12,11,15,.7); }
.tavern-title { font-family: var(--font-display); color: var(--gold-soft); font-size: 1.05rem; letter-spacing: .1em; margin: 0; text-transform: uppercase; display: flex; align-items: center; gap: .6rem; }
.tavern-title .rune { color: var(--gold-dim); }
.tavern-sub { font-family: var(--font-serif); font-style: italic; color: var(--text-mute); font-size: .9rem; }
.chat-gate { padding: 4rem 2rem; text-align: center; }
.chat-gate-inner { max-width: 420px; margin: 0 auto; }
.rune-big { font-size: 2.6rem; color: var(--gold-dim); display: block; margin-bottom: 1rem; }
.chat-gate h3 { font-family: var(--font-display); color: var(--gold-soft); letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .6rem; }
.chat-gate p { color: var(--text-mute); font-family: var(--font-serif); font-style: italic; margin: 0 0 1.5rem; }
.chat-gate-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.chat-room { display: flex; flex-direction: column; }
.chat-log { height: 440px; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; background: rgba(0,0,0,.3); }
.chat-log::-webkit-scrollbar { width: 6px; }
.chat-log::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
.chat-system { text-align: center; font-family: var(--font-serif); font-style: italic; color: var(--text-mute); font-size: .92rem; }
.chat-msg { display: flex; flex-direction: column; gap: .25rem; max-width: 82%; }
.chat-msg.own { margin-left: auto; align-items: flex-end; }
.chat-msg-head { display: flex; gap: .7rem; font-size: .78rem; color: var(--text-mute); }
.chat-msg.own .chat-msg-head { flex-direction: row-reverse; }
.chat-msg-author { font-family: var(--font-display); color: var(--gold-soft); letter-spacing: .06em; text-transform: uppercase; font-size: .68rem; }
.chat-time { font-family: var(--font-serif); font-style: italic; }
.chat-msg-bubble { background: #1a1519; border: 1px solid var(--line); padding: .8rem 1.1rem; border-radius: var(--radius); font-family: var(--font-serif); font-size: 1.08rem; line-height: 1.5; }
.chat-msg.own .chat-msg-bubble { background: #221a16; border-color: var(--gold-dim); color: var(--gold-soft); }
.chat-input { display: flex; gap: .8rem; padding: 1.1rem 1.4rem; border-top: 1px solid var(--line); background: rgba(12,11,15,.7); flex-wrap: wrap; }
.chat-input input { flex: 1; min-width: 200px; }

/* ===== Доска поручений ===== */
.quest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1.5rem; }
.quest-card { padding: 1.8rem; display: flex; flex-direction: column; gap: .6rem; }
.quest-card::before { content: ""; position: absolute; top: -1px; left: 1.8rem; width: 42px; height: 2px; background: var(--gold); }
.quest-rank { font-family: var(--font-display); font-size: .68rem; color: var(--gold-dim); letter-spacing: .16em; text-transform: uppercase; }
.quest-title { font-family: var(--font-display); color: var(--gold-soft); font-size: 1.2rem; margin: 0; line-height: 1.3; }
.quest-brief { font-family: var(--font-serif); font-size: 1.08rem; color: var(--text-dim); flex: 1; margin: 0; }
.quest-reward { display: flex; justify-content: space-between; gap: .6rem; padding-top: .8rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--text-mute); }
.quest-reward span:last-child { color: var(--gold-soft); font-family: var(--font-display); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
.quest-claim { margin-top: .6rem; }
.quest-claim .btn { width: 100%; font-size: .7rem; padding: .7em 1em; }

/* ===== Круг авторов ===== */
.founder-card { display: grid; grid-template-columns: 300px 1fr; gap: 3rem; align-items: center; padding: 3rem; margin-bottom: 3rem; border-color: var(--gold-dim); }
.founder-card::before { content: ""; position: absolute; top: -1px; left: -1px; right: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.founder-portrait { background: #0c0b0f; padding: 1rem; border: 1px solid var(--line); }
.founder-portrait svg { width: 100%; height: auto; }
.founder-name { font-family: var(--font-display); color: var(--gold); font-size: 1.9rem; margin: 0 0 .4rem; letter-spacing: .06em; }
.founder-role { font-family: var(--font-display); color: var(--blood-soft); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 1.4rem; }
.founder-bio { font-family: var(--font-serif); font-size: 1.2rem; margin: 0 0 1.8rem; line-height: 1.7; }
.founder-seals { display: flex; gap: .8rem; flex-wrap: wrap; }
.seal-inline { font-family: var(--font-display); font-size: .7rem; letter-spacing: .1em; color: var(--gold-soft); border: 1px solid var(--gold-dim); padding: .4em .8em; text-transform: uppercase; border-radius: var(--radius); }

.members-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 1.5rem; margin-bottom: 4rem; }
.member-card { padding: 2rem 1.5rem; text-align: center; display: flex; flex-direction: column; align-items: center; transition: transform var(--ease), border-color var(--ease); }
.member-card:hover { transform: translateY(-3px); border-color: var(--gold-dim); }
.member-seal { width: 64px; height: 64px; margin-bottom: .8rem; }
.member-seal svg { width: 100%; height: 100%; }
.member-avatar {
  width: 58px; height: 58px; border-radius: 50%; margin-bottom: .9rem;
  background: linear-gradient(180deg, #241d18, #120e0c);
  border: 1px solid var(--gold-dim);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.3rem; color: var(--gold);
}
.member-name { font-family: var(--font-display); color: var(--gold-soft); font-size: 1.1rem; margin: 0 0 .4rem; }
.member-role { font-family: var(--font-display); font-size: .66rem; color: var(--gold-dim); text-transform: uppercase; letter-spacing: .14em; }
.member-works { color: var(--text-mute); font-family: var(--font-serif); font-style: italic; font-size: .9rem; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line); width: 100%; }

/* ===== Отзывы ===== */
.reviews-wrap { max-width: 820px; margin: 0 auto; }
.reviews-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 1.5rem; margin: 1.6rem 0 3rem; }
.review-card { padding: 1.8rem; }
.review-card::before { content: "❝"; position: absolute; top: .4rem; left: .9rem; font-size: 2.8rem; color: var(--gold-dim); opacity: .22; font-family: serif; }
.review-head { display: flex; justify-content: space-between; gap: .6rem; margin-bottom: .9rem; padding-left: 1.8rem; flex-wrap: wrap; }
.review-author { font-family: var(--font-display); color: var(--gold-soft); font-size: 1rem; }
.review-stars { color: var(--gold); letter-spacing: 2px; }
.review-text { font-family: var(--font-serif); font-style: italic; font-size: 1.12rem; color: var(--text); margin: 0; }
.review-date { display: block; margin-top: .8rem; font-size: .78rem; color: var(--text-mute); font-style: italic; text-align: right; }
.review-form { padding: 2.2rem; max-width: 640px; margin: 0 auto; background: rgba(15,12,16,.6); }
.stars { display: flex; gap: .3rem; }
.star { background: none; border: none; font-size: 1.7rem; color: var(--text-mute); padding: 0; transition: color var(--ease), transform var(--ease); }
.star.active, .star:hover { color: var(--gold); }
.star:hover { transform: scale(1.15); }

/* ===== О гильдии ===== */
.codex { padding: 3rem 3.5rem; background: rgba(12,11,15,.85); border-left: 3px solid var(--blood-soft); }
.codex-chapter { font-family: var(--font-display); color: var(--gold-soft); font-size: 1.15rem; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--line); padding-bottom: .7rem; margin: 2.4rem 0 1.3rem; }
.codex-chapter:first-child { margin-top: 0; }
.codex-rules { padding-left: 1.3rem; margin: 0; }
.codex-rules li { font-family: var(--font-serif); font-size: 1.12rem; margin-bottom: .6rem; }
.codex-seals { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 1.2rem; }
.codex-seals li { display: flex; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(21,18,24,.6); }
.codex-seals .seal-mini { width: 56px; height: 56px; flex-shrink: 0; }
.codex-seals .seal-mini svg { width: 100%; height: 100%; }
.codex-seals .seal-name { font-family: var(--font-display); color: var(--gold-soft); font-size: .85rem; display: block; margin-bottom: .25rem; letter-spacing: .05em; }
.codex-seals .seal-desc { font-family: var(--font-serif); font-style: italic; color: var(--text-mute); font-size: .92rem; }

/* ===== Поддержка ===== */
.support-block { margin-top: 4rem; }
.support-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; align-items: start; }
.support-form { padding: 2.2rem; }
.support-aside { padding: 2.2rem; }
.aside-title { font-family: var(--font-display); color: var(--gold-soft); letter-spacing: .1em; text-transform: uppercase; font-size: 1.05rem; margin: 0 0 1rem; }
.support-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.support-links li { display: flex; align-items: center; gap: .9rem; color: var(--text-dim); font-size: .98rem; }
.support-links .g-ico { width: 34px; height: 34px; flex-shrink: 0; }
.support-rune { color: var(--gold-dim); font-size: 1.3rem; width: 34px; text-align: center; flex-shrink: 0; }

/* ===== Мерч ===== */
.merch-block { margin-top: 4.5rem; }
.merch-block .section-head { margin-bottom: 2.2rem; }
.merch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 1.4rem; }
.merch-card { padding: 1.3rem; display: flex; flex-direction: column; gap: .7rem; transition: transform var(--ease), border-color var(--ease); }
.merch-card:hover { transform: translateY(-3px); border-color: var(--gold-dim); }
.merch-visual {
  height: 130px; border-radius: var(--radius);
  background: radial-gradient(70% 70% at 50% 42%, rgba(173,139,71,.09), transparent), #0c0b0f;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.merch-visual .g-ico { width: 58px; height: 58px; }
.merch-name { font-family: var(--font-display); color: var(--gold-soft); font-size: .98rem; margin: 0; letter-spacing: .04em; line-height: 1.35; }
.merch-desc { color: var(--text-dim); font-family: var(--font-serif); font-size: .95rem; flex: 1; margin: 0; }
.merch-foot { display: flex; align-items: center; justify-content: space-between; padding-top: .7rem; border-top: 1px solid var(--line); }
.merch-price { font-family: var(--font-display); color: var(--gold); font-size: 1.02rem; font-weight: 600; }
.merch-buy { padding: .55em 1em; font-size: .64rem; }

/* ===== Футер ===== */
.site-footer { border-top: 1px solid var(--line); padding: 3rem 0; background: rgba(8,7,10,.7); margin-top: 4rem; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: .9rem; text-align: center; }
.footer-brand { font-family: var(--font-display); color: var(--gold-soft); font-size: 1rem; letter-spacing: .1em; display: inline-flex; align-items: center; gap: .6rem; }
.footer-mark { color: var(--gold-dim); }
.footer-copy { font-family: var(--font-serif); font-style: italic; color: var(--text-mute); font-size: .98rem; margin: 0; }
.footer-copy strong { color: var(--gold-soft); font-weight: 600; }
.footer-nav { display: flex; gap: 1.2rem; flex-wrap: wrap; justify-content: center; margin-top: .3rem; }
.footer-nav a { color: var(--text-dim); font-family: var(--font-display); letter-spacing: .12em; text-transform: uppercase; font-size: .68rem; }
.footer-nav a:hover { color: var(--gold); }

/* ===== Модальные окна ===== */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 1rem; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5,4,6,.9); backdrop-filter: blur(5px); }
.modal-window {
  position: relative; z-index: 2; width: min(480px, 100%);
  background: var(--bg-0); border: 1px solid var(--gold-dim); border-radius: var(--radius);
  box-shadow: 0 0 80px rgba(0,0,0,.9); padding: 2.4rem; max-height: 94svh; overflow-y: auto;
}
.modal-window::before { content: ""; position: absolute; top: -1px; left: -1px; right: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.modal-window-wide { width: min(900px, 100%); padding: 0; display: flex; flex-direction: column; }
.modal-close {
  position: absolute; top: .9rem; right: .9rem; z-index: 10;
  background: rgba(12,11,15,.7); border: 1px solid var(--line-2); color: var(--text-mute);
  width: 36px; height: 36px; border-radius: 50%; font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color var(--ease), border-color var(--ease);
}
.modal-close:hover { color: var(--gold); border-color: var(--gold-dim); }
.modal-tabs { display: flex; gap: .3rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.modal-tab {
  flex: 1; background: none; border: none; padding: .75rem .4rem;
  font-family: var(--font-display); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-mute); border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color var(--ease), border-color var(--ease);
}
.modal-tab.active { color: var(--gold); border-bottom-color: var(--gold-dim); }
.auth-title { font-family: var(--font-display); color: var(--gold-soft); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .5rem; font-size: 1.25rem; }
.auth-lead { color: var(--text-mute); font-family: var(--font-serif); font-style: italic; margin: 0 0 1.3rem; font-size: 1rem; }

/* ===== Читалка ===== */
.reader-toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: .8rem;
  padding: .9rem 1.6rem; border-bottom: 1px solid var(--line);
  background: var(--bg-1); position: sticky; top: 0; z-index: 5;
}
.reader-mode-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: none; border: 1px solid var(--line-2); color: var(--text-dim);
  padding: .5em .95em; font-family: var(--font-display); font-size: .7rem;
  letter-spacing: .12em; text-transform: uppercase; border-radius: var(--radius);
  transition: color var(--ease), border-color var(--ease);
}
.reader-mode-btn:hover { color: var(--gold); border-color: var(--gold-dim); }
.reader-mode-btn[aria-pressed="true"] { color: var(--gold); border-color: var(--gold-dim); background: rgba(173,139,71,.08); }
.reader-mode-btn .reader-mode-icon { color: var(--blood-soft); }
.reader-toolbar .modal-close { position: static; }
.reader { padding: 3rem; max-width: var(--reading-w); margin: 0 auto; width: 100%; }
.reader-cover { height: 240px; background: #0c0b0f; border: 1px solid var(--line); margin-bottom: 2rem; border-radius: var(--radius); overflow: hidden; }
.reader-cover svg { width: 100%; height: 100%; }
.reader-meta { font-family: var(--font-display); color: var(--gold-dim); font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; }
.reader-title { font-family: var(--font-display); color: var(--gold-soft); font-size: clamp(1.8rem, 5vw, 2.7rem); margin: .5rem 0 .4rem; line-height: 1.15; }
.reader-author { font-family: var(--font-serif); font-style: italic; font-size: 1.15rem; color: var(--text-mute); margin: 0 0 2.2rem; }
.reader-body { font-family: var(--font-serif); font-size: 1.3rem; line-height: 1.8; color: var(--text); }
.reader-body p { margin: 0 0 1.4rem; }
.reader-body p:first-of-type::first-letter {
  font-family: var(--font-display); font-size: 3.8rem; color: var(--gold);
  float: left; line-height: .85; margin: .25rem .5rem 0 0;
}
.reader-end { margin-top: 2rem; font-family: var(--font-serif); color: var(--gold-dim); text-align: center; font-size: 1.4rem; }

/* Режим чтения */
.modal-reader.reading-mode .modal-window-wide { background: #080709; }
.modal-reader.reading-mode .reader-cover { display: none; }
.modal-reader.reading-mode .reader-body { font-size: 1.42rem; line-height: 1.9; color: #e6dfd1; }
.modal-reader.reading-mode .reader-toolbar { background: #0a090c; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-0); border: 1px solid var(--gold-dim); color: var(--gold-soft);
  padding: 1rem 1.8rem; border-radius: var(--radius); font-family: var(--font-display); font-size: .85rem;
  letter-spacing: .05em; opacity: 0; pointer-events: none; transition: all var(--ease); z-index: 200;
  box-shadow: var(--shadow-1); max-width: 92vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

@media (max-width: 1080px) {
  .nav-toggle { display: flex; }
  .nav-list {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: rgba(12,11,15,.98); border-bottom: 1px solid var(--line);
    padding: .6rem 1rem 1rem; display: none; box-shadow: var(--shadow-1);
    max-height: calc(100svh - 64px); overflow-y: auto;
  }
  .nav-list.open { display: flex; }
  .nav-list a { padding: .95rem .6rem; border-bottom: 1px solid var(--line); width: 100%; font-size: .82rem; }
  .header-inner { flex-wrap: wrap; }
  .main-nav { order: 3; width: 100%; position: static; margin-left: 0; display: flex; justify-content: flex-end; }
  .header-auth { margin-left: auto; }
  .logo-text { display: none; }
}

@media (max-width: 1024px) {
  .featured { grid-template-columns: 1fr; }
  .featured-cover { height: 280px; border-right: none; border-bottom: 1px solid var(--line); padding: 1.5rem; }
  .founder-card { grid-template-columns: 1fr; text-align: center; padding: 2rem; gap: 2rem; }
  .founder-portrait { max-width: 300px; margin: 0 auto; }
  .founder-seals { justify-content: center; }
  .support-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 4rem 0; }
  .hero { padding: 4.5rem 1rem 3rem; }
  .candle-slot { width: 88px; }
  .codex { padding: 2rem 1.5rem; }
  .reader { padding: 2rem 1.4rem; }
  .reader-body { font-size: 1.15rem; }
  .modal-reader.reading-mode .reader-body { font-size: 1.25rem; }
  .field-row { grid-template-columns: 1fr; }
  .upload-block, .order-block { padding: 1.8rem 1.4rem; }
  .order-form, .support-form, .review-form { padding: 1.6rem 1.3rem; }
  .modal-window { padding: 1.8rem 1.4rem; }
  .chat-log { height: 360px; padding: 1.1rem; }
  .chat-input { padding: .9rem 1rem; padding-bottom: calc(.9rem + env(safe-area-inset-bottom)); }
  .featured-body { padding: 1.8rem 1.5rem; }
  .filters { gap: .9rem; }
  .filter-group { min-width: 0; flex: 1 1 140px; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .hero-title { font-size: 1.9rem; }
  .hero-tagline { font-size: 1.05rem; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .hero-rune svg { width: 200px; }
  .candle-slot { width: 64px; opacity: .8; }
  .section-title { letter-spacing: .08em; }
  .manifesto-text { font-size: 1.15rem; }
  .prose { font-size: 1.12rem; }
  .chron-grid, .script-grid, .quest-grid, .lore-deck, .reviews-list { gap: 1.2rem; }
  .user-chip { padding: .3em; max-width: none; }
  .user-chip .uname { display: none; }
  .tavern-head { padding: 1rem 1.2rem; }
  .quest-card, .script-card { padding: 1.4rem; }
  .toast { bottom: 1.2rem; font-size: .78rem; padding: .85rem 1.3rem; }
  .reader-toolbar { padding: .7rem 1rem; }
  .reader-mode-btn { font-size: .62rem; padding: .45em .7em; }
  .modal-close { width: 32px; height: 32px; }
}

/* Очень узкие экраны */
@media (max-width: 360px) {
  .hero-title { font-size: 1.65rem; }
  .btn { font-size: .72rem; padding: .8em 1.2em; letter-spacing: .1em; }
  .logo-mark { width: 36px; height: 36px; }
}

/* Крупные экраны */
@media (min-width: 1500px) {
  body { font-size: 17px; }
}

/* Уважение к настройкам пользователя */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
  .fog, .bg-stars .st { animation: none !important; }
}