:root { --bg:#12100e; --ink:#efe6d6; --muted:#b9a48a; --acc:#d4a017; --line:#3a2f24; --card:#1c1814; --rail: 58px; --edit-bar: 0px; }
* { box-sizing: border-box; }
body { margin:0; font-family: Georgia, "Times New Roman", serif; background:var(--bg); color:var(--ink); line-height:1.55; padding-left: var(--rail); padding-top: var(--edit-bar); }
body.drawer-open { --rail: 280px; }
header.hero { position: relative; overflow: hidden; }
header.hero .cover { width:100%; max-height:280px; object-fit:cover; display:block; }
header.hero.home .cover { max-height:340px; }
.logo-overlay { position:absolute; top:18px; width:min(300px, 42vw); height:auto; pointer-events:none; filter: drop-shadow(0 2px 8px rgba(0,0,0,.65)); }
.logo-left { left:18px; }
.logo-right { right:18px; left:auto; }
main { max-width:740px; margin:0 auto; padding:28px 20px 24px; }
h1 { font-size:1.65rem; margin:16px 0 8px; }
h2 { color:var(--acc); font-size:1.15rem; margin:28px 0 8px; }
.meta { color:var(--muted); font-size:.92rem; margin-bottom:20px; }
.q { color:#e8c37a; font-weight:700; margin:22px 0 6px; }
p { margin:0 0 14px; }
a { color:#e8c37a; }
.src { font-size:.85rem; color:var(--muted); border-top:1px solid var(--line); padding-top:16px; margin-top:28px; }
nav.top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:8px 14px;
  background:#0d0b09;
  border-bottom:1px solid var(--line);
  font-family: Arial, sans-serif;
  font-size:.9rem;
  min-height: 52px;
  position: sticky;
  top: var(--edit-bar);
  z-index: 1600;
  transition: transform .22s ease;
}
body.header-hide nav.top { transform: translateY(calc(-100% - var(--edit-bar))); }
nav.top a { text-decoration:none; }
nav.top .brand { color:var(--ink); font-weight:700; letter-spacing:.02em; white-space:nowrap; }
.brand-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.brand-logo {
  display: block;
  height: 36px;
  width: auto;
  max-width: min(220px, 52vw);
  object-fit: contain;
}
.brand-unofficial {
  color: var(--muted);
  font: 650 .68rem/1.2 Arial, sans-serif;
  letter-spacing: .01em;
}
.legal-line {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: .78rem;
}
.legal-line a, .legal-link {
  color: var(--muted);
  font-weight: 700;
  font-size: .78rem;
}
.drawer-foot .legal-link { display: inline-block; margin-top: 10px; }
.host-lock {
  max-width: 520px;
  margin: 12vh auto;
  padding: 28px 22px;
  font-family: Arial, sans-serif;
}
.lang-dropdown { position: relative; z-index: 1100; }
.lang-drop-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 10px 4px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #16120f;
  color: var(--ink);
  font: 650 .82rem "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
}
.lang-drop-btn:hover, .lang-drop-btn[aria-expanded="true"] { border-color: var(--acc); color: var(--acc); }
.lang-flag { width: 22px; height: 16px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.35); flex: 0 0 auto; }
.lang-drop-name { min-width: 0; }
.lang-caret {
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: .7; margin-left: 2px;
}
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  margin: 0; padding: 6px; list-style: none; min-width: 220px;
  background: #16120f; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0,0,0,.45);
}
.lang-option {
  appearance: none; width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border: 0; background: transparent; color: var(--ink);
  font: 650 .85rem Arial, sans-serif; cursor: pointer; border-radius: 8px; text-align: left;
}
.lang-option:hover, .lang-option.is-on { background: #2a2118; color: var(--acc); }
nav.top .nav-right {
  display:flex;
  align-items:center;
  gap:10px;
  margin-left: auto;
  flex-wrap: wrap;
}
nav.top .social-icons { display:flex; align-items:center; gap:10px; }
nav.top .social-icons a { display:block; line-height:0; }
nav.top .social-icons img { height:32px; width:auto; display:block; border-radius:8px; mix-blend-mode: screen; }

.nav-toggle {
  display: flex;
  flex: none;
  width: 42px;
  height: 42px;
  margin: 0 0 10px;
  border: 1px solid var(--line);
  background: #16120f;
  border-radius: 8px;
  padding: 10px 9px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}
.nav-toggle:hover,
.nav-toggle.is-open {
  border-color: var(--acc);
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  transition: transform .18s ease, opacity .18s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

.site-drawer {
  position: fixed;
  top: var(--edit-bar);
  left: 0;
  bottom: 0;
  width: var(--rail);
  z-index: 1900;
  background: #0d0b09;
  border-right: 1px solid var(--line);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  transition: width .2s ease;
}
.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drawer-links .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  text-decoration: none;
  padding: 0;
  min-height: 42px;
  font: 700 .9rem Arial, sans-serif;
  white-space: nowrap;
}
.nav-ico {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #16120f;
}
.nav-label {
  overflow: hidden;
  opacity: 0;
  max-width: 0;
  transition: opacity .15s ease, max-width .2s ease;
}
body.drawer-open .nav-label {
  opacity: 1;
  max-width: 220px;
}
.drawer-links .nav-link:hover .nav-ico,
.drawer-links .nav-link.is-active .nav-ico {
  background: #2a2118;
  border-color: var(--acc);
}
.drawer-links .nav-link:hover,
.drawer-links .nav-link.is-active {
  color: #fff;
}
.drawer-links .nav-link.is-disabled {
  opacity: .42;
  cursor: not-allowed;
  pointer-events: none;
}
.drawer-foot {
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
  text-align: center;
}
body.drawer-open .drawer-foot {
  opacity: 1;
  pointer-events: auto;
}
.drawer-foot .nav-support {
  color: var(--muted);
  font: 650 .78rem/1.35 Arial, sans-serif;
  margin: 0 0 10px;
  text-align: center;
}
.drawer-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 16px;
  font-family: Arial, sans-serif;
}
.drawer-social a {
  color: #e8c37a;
  font-weight: 700;
  text-decoration: none;
  font-size: .88rem;
}
.drawer-social a:hover { color: var(--acc); }
.drawer-foot .legal-link {
  display: inline-block;
  margin-top: 10px;
  text-align: center;
}

.drawer-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.drawer-lang {
  position: relative;
  z-index: 6;
  overflow: visible;
}
.drawer-lang .lang-drop-btn {
  width: 100%;
  justify-content: flex-start;
}
body.drawer-collapsed .drawer-lang .lang-drop-name,
body.drawer-collapsed .drawer-lang .lang-caret {
  display: none;
}
body.drawer-collapsed .drawer-lang .lang-drop-btn {
  width: 42px;
  min-height: 42px;
  padding: 0;
  justify-content: center;
  border-color: var(--line);
  background: #16120f;
}
.drawer-lang .lang-menu {
  left: 0;
  right: auto;
  bottom: calc(100% + 6px);
  top: auto !important;
  min-width: 220px;
  width: max-content;
  max-width: calc(var(--rail) - 16px);
  max-height: min(50vh, 320px);
  overflow: auto;
  z-index: 8;
}
.nav-link.nav-report {
  appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.local-editor-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2600;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  background: #1a1510;
  border-bottom: 1px solid var(--acc);
  font-family: Arial, sans-serif;
}
.local-editor-bar strong { color: var(--acc); font-size: .8rem; margin-right: 8px; }
.local-editor-bar button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--acc);
  background: #2a2118;
  color: var(--acc);
  border-radius: 8px;
  font: 700 .78rem Arial, sans-serif;
  cursor: pointer;
}
.local-editor-bar button.primary {
  background: var(--acc);
  color: #1a1208;
}
.local-editor-bar .ed-status { color: var(--muted); font-size: .78rem; }

.header-nav-toggle { display: none; }

@media (max-width: 860px) {
  body,
  body.drawer-open,
  body.drawer-collapsed {
    --rail: 0px;
  }
  nav.top {
    gap: 10px;
    padding-left: 10px;
  }
  nav.top .social-icons { display: none !important; }
  nav.top .header-nav-toggle {
    display: flex;
    margin: 0;
  }
  .site-drawer .nav-toggle { display: none; }
  .site-drawer {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: min(88dvh, 100%);
    transform: translateY(110%);
    pointer-events: none;
    box-shadow: none;
    border-right: 0;
    border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    overflow: visible;
    padding: 14px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    transition: transform .22s ease;
  }
  body.drawer-open .site-drawer {
    transform: none;
    pointer-events: auto;
    box-shadow: 0 -12px 36px rgba(0,0,0,.55);
  }
  .drawer-links {
    overflow: auto;
    max-height: 46dvh;
    padding-bottom: 4px;
  }
  .drawer-bottom {
    margin-top: 12px;
    overflow: visible;
  }
  body.drawer-open .nav-label {
    opacity: 1;
    max-width: 220px;
  }
  body.drawer-open .drawer-foot {
    opacity: 1;
    pointer-events: auto;
  }
  body.drawer-collapsed .drawer-lang .lang-drop-name,
  body.drawer-collapsed .drawer-lang .lang-caret {
    display: unset;
  }
  body.drawer-collapsed .drawer-lang .lang-drop-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 4px 10px 4px 6px;
    border-color: var(--line);
    background: #16120f;
  }
  .drawer-lang .lang-menu {
    bottom: calc(100% + 6px);
    top: auto !important;
  }
}

@media (max-width: 640px) {
  nav.top .top-brand { font-size: .9rem; }
  .brand-logo { height: 30px; max-width: min(168px, 48vw); }
}

.tools-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0 28px;
  align-items: stretch;
}
.tools-soon {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
  min-height: 0;
}
.tools-soon .tool-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  box-sizing: border-box;
}
@media (max-width: 719px) {
  .tools-row { grid-template-columns: 1fr; }
}
a.tool-card, .tool-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 18px 16px;
}
a.tool-card strong, .tool-card strong { color: var(--acc); display: block; font-size: 1.05rem; }
a.tool-card span, .tool-card span { color: var(--muted); font-size: .9rem; }
.tool-card.is-disabled { opacity: .5; cursor: not-allowed; }
.page-home .home-main { max-width: 860px; }
.home-block { margin: 8px 0 28px; }
.home-block h2 { margin-top: 0; }
.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.block-head h2 { margin: 0; }
.text-more { font-family: Arial, sans-serif; font-size: .85rem; font-weight: 700; }
.news-list { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.news-item {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 14px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.news-thumb { display: block; line-height: 0; }
.news-thumb img {
  width: 108px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.news-body h3 { margin: 0 0 6px; font-size: 1.02rem; line-height: 1.3; }
.news-body h3 a { color: var(--acc); text-decoration: none; }
.news-body p { margin: 0 0 10px; color: var(--muted); font-size: .9rem; }
.more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--acc);
  border-radius: 8px;
  background: #2a2118;
  color: var(--acc);
  font: 700 .85rem Arial, sans-serif;
  text-decoration: none;
}
.more-btn:hover { background: #3a2d20; }
.more-btn-block { display: flex; width: 100%; margin-top: 16px; }
@media (max-width: 640px) {
  header.hero .cover,
  header.hero.home .cover { max-height: 132px; }
  header.hero.article .cover { max-height: 110px; }
  .logo-overlay { top: 8px; width: min(128px, 38vw); }
  main { padding: 18px 16px 24px; }
  h1 { font-size: 1.35rem; margin-top: 8px; }
  .news-item { grid-template-columns: 84px 1fr; gap: 10px; padding: 10px; }
  .news-thumb img { width: 84px; height: 64px; }
  .more-btn { min-height: 44px; }
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  width: 100%;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--acc);
  background: #2a2118;
  color: var(--acc);
  font: 700 .85rem Arial, sans-serif;
  border-radius: 8px;
  cursor: pointer;
}
.share-btn svg { flex: none; }
.share-btn:hover { background: #3a2d20; }
.points-panel.is-shared .points-reset,
.points-panel.is-shared .points-budget { display: none; }
body.is-share-view .class-tabs [aria-selected="false"] { display: none; }

.cms-wrap { max-width: 720px; margin: 0 auto; padding: 28px 20px 48px; font-family: Arial, sans-serif; }
.cms-wrap h1 { font-family: Georgia, serif; }
.cms-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
.cms-card label { display: block; margin: 12px 0 6px; color: var(--muted); font-size: .85rem; }
.cms-card input, .cms-card select, .cms-card textarea {
  width: 100%;
  min-height: 42px;
  background: #100e0c;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: 1rem Arial, sans-serif;
}
.cms-card button {
  margin-top: 16px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--acc);
  background: #2a2118;
  color: var(--acc);
  font-weight: 700;
  cursor: pointer;
}
.cms-help { color: var(--muted); font-size: .88rem; }
.cms-help code { color: var(--acc); }
.cms-status { margin-top: 12px; color: var(--acc); }
.cms-status.is-err { color: #c45c4a; }

footer.social { max-width:740px; margin:0 auto 28px; padding:0 20px; font-family: Arial, sans-serif; }
footer.social .box { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:16px 18px; }
footer.social a { display:inline-block; margin:6px 14px 0 0; font-weight:700; }
.related { max-width:740px; margin:0 auto 48px; padding:0 20px 8px; }
.related h2 { margin-top:8px; }
.cards { display:grid; gap:18px; margin-top:12px; }
.cards.two { grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards.two { grid-template-columns: 1fr 1fr; } }
.cards a.card { display:block; text-decoration:none; color:var(--ink); background:var(--card); border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.cards a.card img { width:100%; height:160px; object-fit:cover; display:block; }
.cards a.card span { display:block; padding:12px 14px 16px; color:#e8c37a; font-weight:700; }

.section-block { margin: 32px 0 8px; }
.section-block h2 { margin-bottom: 6px; }
.section-block .sub { color: var(--muted); font-size: .95rem; margin: 0 0 12px; }
.artimg { width: 100%; height: auto; display: block; margin: 8px 0 18px; border-radius: 8px; }
.artimg.portrait { width: min(320px, 70%); margin-left: auto; margin-right: auto; }
.weapons { display: grid; gap: 16px; margin: 12px 0 20px; }
@media (min-width: 640px) { .weapons { grid-template-columns: 1fr 1fr; } }
.weapons figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.weapons img { width: 100%; height: 280px; object-fit: contain; background: #0a0908; display: block; }
.weapons figcaption { padding: 8px 12px 12px; color: #e8c37a; font-weight: 700; text-align: center; }
.hub-link { font-family: Arial, sans-serif; font-size: .9rem; }

.cards.three { grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards.three { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .cards.three { grid-template-columns: 1fr 1fr 1fr; } }

.report-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #16120f;
  color: var(--acc);
  font: 650 .82rem "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
}
.report-btn:hover { border-color: var(--acc); background: #2a2118; }
.report-modal {
  position: fixed; inset: 0; z-index: 2700;
  display: grid; place-items: center; padding: 16px;
  background: rgba(8, 6, 4, .72);
}
.report-modal[hidden] { display: none; }
.report-card {
  width: min(520px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  background: #16120f; color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 20px 16px;
}
.report-card h2 { margin: 0 0 8px; color: var(--acc); font: 700 1.2rem Georgia, serif; }
.report-lead, .report-context { margin: 0 0 12px; color: var(--muted); font-size: .88rem; }
.report-context { font-size: .78rem; padding: 8px 10px; background: #100e0c; border-radius: 8px; }
.report-type { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 12px; padding: 8px 12px 10px; }
.report-type label { display: flex; align-items: center; gap: 8px; min-height: 36px; cursor: pointer; }
.report-field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; font-size: .78rem; color: var(--muted); }
.report-field input, .report-field textarea, .report-field select {
  background: #100e0c; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: 0.92rem/1.4 Arial, sans-serif;
}
.report-actions { display: flex; justify-content: flex-end; gap: 8px; }
.report-cancel, .report-send { appearance: none; min-height: 40px; padding: 0 14px; border-radius: 8px; font: 650 .85rem Arial, sans-serif; cursor: pointer; }
.report-cancel { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.report-send { border: 0; background: var(--acc); color: #160f0a; }
.report-status { margin: 8px 0; font-size: .85rem; }
.report-status.is-ok { color: #8fdf7a; }
.report-status.is-err { color: #c45c4a; }
.host-lock { max-width: 520px; margin: 12vh auto; padding: 28px 22px; font-family: Arial, sans-serif; }
