@font-face {
  font-family: "El Messiri Local";
  src: url("../fonts/ElMessiri-VariableFont_wght.ttf") format("truetype");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --bg: #151519;
  --surface: #212128;
  --surface-2: #26262d;
  --panel: #17171c;
  --gold: #f2c287;
  --gold-light: #ffda9a;
  --gold-soft: #f6e4ce;
  --bronze: #9b7a50;
  --bronze-dark: #55432e;
  --ink: #151519;
  --muted: #b89b75;
  --danger: #ff6b6b;
  --success: #0ffc09;
  --shadow: 0 26px 70px rgba(0, 0, 0, .42);
  --card-radius: 0 18px 0 18px;
  --soft-radius: 15px 0 15px 0;
  --font: "El Messiri Local", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gold);
  background:
    linear-gradient(180deg, rgba(242, 194, 135, .08) 0, rgba(21, 21, 25, 0) 190px),
    repeating-linear-gradient(135deg, rgba(255, 218, 154, .025) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, #151519 0%, #111115 100%);
  font-family: var(--font);
  min-height: 100vh;
}

body.editor-open {
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--gold);
  text-decoration: none;
}

.guide-card a {
  color: var(--gold-light);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

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

::selection {
  background: rgba(255, 218, 154, .28);
  color: #fff;
}

::-webkit-scrollbar {
  width: 14px;
}

::-webkit-scrollbar-track {
  background: #151519;
  border-radius: 50px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to top, #55432e, #ecbc84);
  background-clip: content-box;
  border: 4px solid transparent;
  border-radius: 50px;
}

.page-shell {
  min-height: 100vh;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip: rect(0 0 0 0);
}

.container {
  width: min(1480px, calc(100% - 36px));
  margin: 0 auto;
}

.site-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background:
    linear-gradient(to bottom, rgba(18, 18, 22, .98), rgba(12, 12, 15, .94)),
    repeating-linear-gradient(135deg, rgba(255, 218, 154, .035) 0 1px, transparent 1px 14px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(242, 194, 135, .18);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .38);
}

.topbar-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(242, 194, 135, .38));
}

.guide-search {
  position: absolute;
  right: 0;
  top: 50%;
  width: min(360px, 31vw);
  transform: translateY(-50%);
}

.guide-search::before {
  content: "⌕";
  position: absolute;
  left: 13px;
  top: 50%;
  color: var(--gold-light);
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
  text-shadow: 0 0 10px rgba(255, 218, 154, .38);
}

.guide-search input {
  width: 100%;
  min-height: 42px;
  padding: 9px 82px 9px 36px;
  color: var(--gold-soft);
  background:
    linear-gradient(180deg, rgba(21, 21, 25, .92), rgba(11, 11, 14, .92)),
    repeating-linear-gradient(135deg, rgba(255, 218, 154, .035) 0 1px, transparent 1px 12px);
  border: 1px solid rgba(255, 218, 154, .55);
  border-radius: 16px;
  box-shadow: inset 0 0 14px rgba(0, 0, 0, .48), 0 0 18px rgba(242, 194, 135, .12);
  outline: none;
}

.guide-search input::placeholder {
  color: rgba(246, 228, 206, .62);
}

.guide-search input:focus {
  border-color: var(--gold-light);
  box-shadow: inset 0 0 14px rgba(0, 0, 0, .48), 0 0 0 2px rgba(255, 218, 154, .18), 0 0 22px rgba(242, 194, 135, .25);
}

#guideSearchCount {
  position: absolute;
  right: 12px;
  top: 50%;
  max-width: 68px;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateY(-50%);
  pointer-events: none;
}

.language-switch {
  position: absolute;
  right: calc(min(360px, 31vw) + 12px);
  top: 50%;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background:
    linear-gradient(180deg, rgba(21, 21, 25, .94), rgba(11, 11, 14, .94)),
    repeating-linear-gradient(135deg, rgba(255, 218, 154, .035) 0 1px, transparent 1px 12px);
  border: 1px solid rgba(255, 218, 154, .45);
  border-radius: 8px;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, .42), 0 0 14px rgba(242, 194, 135, .1);
  transform: translateY(-50%);
}

.language-switch button {
  min-width: 42px;
  height: 32px;
  padding: 0 10px;
  color: rgba(246, 228, 206, .72);
  font: inherit;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.language-switch button:hover,
.language-switch button:focus-visible,
.language-switch button.is-active {
  color: #1a1310;
  background:
    linear-gradient(180deg, rgba(255, 221, 170, .96), rgba(179, 119, 46, .96)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .1) 0 1px, transparent 1px 10px);
  border-color: rgba(255, 232, 190, .72);
  outline: none;
  box-shadow: 0 0 16px rgba(242, 194, 135, .22);
}

.brand-mark {
  display: grid;
  gap: 0;
  color: var(--gold-light);
  line-height: .9;
  text-transform: uppercase;
  text-shadow: 0 4px 3px #9b7a50, 0 0 18px rgba(242, 170, 37, .38);
}

.brand-mark span {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: .28em;
}

.brand-mark strong {
  display: block;
  color: var(--gold-light);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: .025em;
}

.brand-copy {
  display: none;
  line-height: 1.15;
}

.brand-copy strong {
  display: block;
  color: var(--gold-light);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.brand-copy span {
  color: var(--muted);
  font-size: .86rem;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  flex-wrap: wrap;
  gap: 8px;
}

.top-menu {
  position: absolute;
  left: 0;
  top: 50%;
  justify-content: flex-start;
  max-width: min(320px, 24vw);
  flex: 0 1 auto;
  overflow: hidden;
  transform: translateY(-50%);
}

.top-menu .nav-pill {
  min-height: 36px;
  padding: 8px 13px;
  color: var(--gold-light);
  background:
    linear-gradient(180deg, rgba(21, 21, 25, .9), rgba(11, 11, 14, .9)),
    repeating-linear-gradient(135deg, rgba(255, 218, 154, .04) 0 1px, transparent 1px 12px);
  border-color: rgba(255, 218, 154, .52);
  border-radius: 8px;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, .38), 0 0 14px rgba(242, 194, 135, .1);
  font-size: .8rem;
  white-space: nowrap;
}

.nav-pill,
.cms-btn,
.icon-btn {
  border: 1px solid var(--gold-light);
  border-radius: 5px;
  color: var(--gold-light);
  background: rgba(21, 21, 25, .42);
  min-height: 38px;
  padding: 8px 14px;
  line-height: 1;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .035em;
  transition: transform .18s ease, color .18s ease, background .18s ease, box-shadow .18s ease;
}

.nav-pill:hover,
.cms-btn:hover,
.icon-btn:hover,
.nav-pill:focus-visible,
.cms-btn:focus-visible,
.icon-btn:focus-visible {
  color: var(--ink);
  background: var(--gold-light);
  box-shadow: 0 0 16px rgba(242, 170, 37, .42);
  outline: none;
  transform: translateY(-1px);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  min-width: 260px;
}

.cms-btn {
  position: relative;
  min-width: 145px;
  min-height: 45px;
  color: var(--gold);
  background-color: #413423;
  background-image: url("../images/btn-search-default.png");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 110% 115%;
  border: 1px solid #e1c452;
  border-radius: var(--soft-radius);
  box-shadow: 0 0 10px #413423;
  text-align: center;
}

.cms-btn:hover,
.cms-btn.is-active {
  color: var(--ink);
  background-image: url("../images/btn-search-active.png");
}

.cms-btn.secondary {
  min-width: 116px;
  background-image: url("../images/btn-ranking-default-bg.png");
  color: var(--ink);
  text-shadow: 0 3px 3px rgba(242, 242, 242, .8);
}

.cms-btn.secondary:hover {
  background-image: url("../images/btn-ranking-active-bg.png");
  text-shadow: 0 3px 3px #f1c086;
}

.hero {
  display: none;
}

.hero::before {
  content: none;
}

.hero::after {
  content: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  padding: 92px 0 145px;
}

.hero-kicker,
.section-kicker,
.editor-kicker {
  color: var(--gold-light);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .12em;
  text-shadow: 0 0 18px rgba(242, 170, 37, .35);
}

.hero-kicker {
  margin-bottom: 10px;
  font-size: .95rem;
}

.hero h1 {
  margin: 0;
  color: var(--gold-light);
  font-size: clamp(3rem, 7vw, 6.6rem);
  line-height: .92;
  text-transform: uppercase;
  text-shadow: 0 5px 3px #9b7a50, 0 26px 54px rgba(0, 0, 0, .58);
  letter-spacing: .018em;
}

.hero-subtitle {
  width: min(670px, 100%);
  margin: 24px 0 0;
  color: var(--gold-soft);
  font-size: clamp(1.18rem, 2vw, 1.65rem);
  line-height: 1.48;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.home-card-link {
  position: relative;
  display: flex;
  align-items: center;
  width: min(330px, 100%);
  min-height: 116px;
  padding-left: 34px;
  overflow: hidden;
  color: #50402c;
  background-image: url("../images/btn-home-bg.png");
  background-position: center center;
  background-repeat: repeat;
  border-radius: 0 0 15px 15px;
  transition: padding-left .25s ease, filter .25s ease;
  animation: moving-bg 60s linear infinite;
}

.home-card-link:hover {
  padding-left: 54px;
  filter: brightness(1.08);
}

.home-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background-position: right center;
  background-repeat: no-repeat;
  pointer-events: none;
}

.home-card-link.primary::after {
  background-image: url("../images/btn-login-char.png");
}

.home-card-link.secondary::after {
  background-image: url("../images/btn-register-char.png");
}

.home-card-link strong {
  position: relative;
  z-index: 1;
  color: #50402c;
  font-size: 1.4rem;
  text-shadow: 0 3px 3px #f1c086;
  text-transform: uppercase;
}

.waves-wrap {
  display: none;
}

.waves {
  position: relative;
  width: 100%;
  height: 64px;
  min-height: 48px;
  max-height: 82px;
  margin-bottom: -7px;
}

.waves .parallax > use {
  animation: move-forever 25s cubic-bezier(.55, .5, .45, .5) infinite;
}

.waves .parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; }
.waves .parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; }
.waves .parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; }
.waves .parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; }

.quick-strip {
  position: relative;
  z-index: 4;
  margin-top: -62px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.stat-card,
.cms-card {
  background-color: var(--surface);
  border-radius: 0 0 15px 15px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stat-card header,
.cms-card > header {
  min-height: 58px;
  padding: 14px 18px 10px;
  color: #50402c;
  background-color: var(--surface);
  background-image: url("../images/card-header-widget-bg.png");
  background-position: 0 0;
  background-repeat: repeat-x;
  background-size: 100% 100%;
}

.stat-card h3,
.cms-card > header h2,
.cms-card > header h3 {
  margin: 0;
  color: #50402c;
  text-shadow: 0 3px 3px #f1c086;
  text-transform: uppercase;
}

.stat-card p {
  margin: 0;
  padding: 18px;
  color: var(--gold-soft);
  font-size: 1.05rem;
  line-height: 1.45;
}

.layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  padding: 34px 0 74px;
}

.guide-sidebar {
  align-self: start;
  position: sticky;
  top: 110px;
  max-height: calc(100vh - 126px);
}

.sidebar-card {
  display: flex;
  flex-direction: column;
  max-height: inherit;
  min-height: 0;
  background: linear-gradient(to bottom, rgba(33, 33, 40, .98), rgba(21, 21, 25, .98));
  border: 2px solid var(--bronze);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.sidebar-card header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 18px 12px;
  background-image: url("../images/card-header-widget-bg.png");
  background-size: 100% 100%;
}

.sidebar-card header h2 {
  margin: 0;
  color: #50402c;
  text-shadow: 0 3px 3px #f1c086;
  text-transform: uppercase;
  font-size: 1.2rem;
}

.sidebar-nav {
  display: grid;
  gap: 9px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.sidebar-group {
  display: grid;
  gap: 6px;
}

.sidebar-edit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sidebar-edit-row .sidebar-parent,
.sidebar-edit-row .sidebar-sub-link {
  flex: 1 1 auto;
  min-width: 0;
}

.sidebar-parent,
.sidebar-subnav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 45px;
  padding: 10px 12px;
  color: var(--gold);
  background: rgba(65, 52, 35, .56);
  border: 1px solid rgba(242, 194, 135, .42);
  border-radius: var(--soft-radius);
  box-shadow: inset 0 0 13px rgba(21, 21, 25, .5);
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.sidebar-parent:hover,
.sidebar-parent.is-active {
  color: var(--ink);
  background: linear-gradient(40deg, #ecbc84 10%, #9b7a50 100%);
  transform: translateX(3px);
}

.sidebar-subnav {
  display: none;
  gap: 5px;
  padding: 0 0 2px 16px;
}

.sidebar-group.is-open .sidebar-subnav {
  display: grid;
}

.sidebar-subnav a {
  min-height: 34px;
  padding: 7px 10px 7px 14px;
  color: var(--muted);
  background: rgba(18, 18, 22, .72);
  border-color: rgba(242, 194, 135, .22);
  border-radius: 0 10px 0 10px;
  font-size: .92rem;
}

.sidebar-subnav a::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 8px;
  background: var(--bronze);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(242, 194, 135, .28);
}

.sidebar-subnav a:hover,
.sidebar-subnav a:focus-visible,
.sidebar-subnav a.is-active {
  color: var(--gold-light);
  background: rgba(65, 52, 35, .66);
  outline: none;
  transform: translateX(2px);
}

.sidebar-subnav a.is-active {
  border-color: rgba(255, 218, 154, .5);
  box-shadow: inset 0 0 14px rgba(236, 188, 132, .16);
}

.sidebar-empty {
  margin: 0;
  padding: 12px 10px;
  color: var(--muted);
  text-align: center;
}

.sidebar-help {
  padding: 0 16px 18px;
  color: var(--muted);
  font-size: .97rem;
  line-height: 1.45;
}

.chrome-edit-line {
  align-items: flex-start;
  flex: 0 0 auto;
  padding: 0 16px 18px;
}

.chrome-edit-line .sidebar-help {
  flex: 1 1 auto;
  padding: 0;
}

.guide-main {
  min-width: 0;
}

.guide-card {
  margin-bottom: 28px;
  background:
    linear-gradient(180deg, rgba(19, 19, 23, .98), rgba(14, 14, 18, .98)),
    repeating-linear-gradient(135deg, rgba(255, 218, 154, .025) 0 1px, transparent 1px 18px);
  border: 3px solid var(--gold);
  border-top: 0;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  scroll-margin-top: 105px;
}

.guide-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 11px 24px 10px;
  color: #50402c;
  background-image: url("../images/card-header-page-bg.png");
  background-position: center top;
  background-repeat: repeat-x;
  text-transform: uppercase;
}

.guide-title {
  margin: 0 0 20px;
  padding-bottom: 14px;
  color: var(--gold-light);
  font-size: var(--section-title-size, clamp(1.35rem, 2.3vw, 2.25rem));
  font-weight: var(--section-title-weight, 900);
  line-height: 1.16;
  border-bottom: 1px solid rgba(242, 194, 135, .34);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .82), 0 0 13px rgba(242, 194, 135, .28);
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.section-kicker {
  display: inline-block;
  margin-bottom: 4px;
  color: #151519;
  text-shadow: 0 2px 2px rgba(241, 192, 134, .82);
  font-size: .78rem;
}

.section-count {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: var(--gold-soft);
  background: rgba(21, 21, 25, .86);
  border: 2px solid var(--bronze);
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 900;
}

.guide-body {
  padding: 24px 26px 26px;
}

.editable-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.editable-line > :first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.editable-block {
  position: relative;
}

.guide-header-edit {
  align-items: center;
}

.edit-key {
  display: none;
  place-items: center;
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  padding: 0;
  color: #151519;
  background: linear-gradient(40deg, #ffda9a 0%, #b58345 100%);
  border: 1px solid rgba(255, 218, 154, .9);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(21, 21, 25, .78), 0 8px 22px rgba(0, 0, 0, .42), 0 0 16px rgba(255, 218, 154, .25);
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .3);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

body.editor-open .edit-key {
  display: inline-grid;
}

.edit-key:hover,
.edit-key:focus-visible {
  filter: brightness(1.1);
  outline: none;
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 0 0 2px rgba(21, 21, 25, .86), 0 12px 26px rgba(0, 0, 0, .48), 0 0 22px rgba(255, 218, 154, .5);
}

body.editor-open .editable-line > .edit-key {
  order: -1;
}

.editable-block > .edit-key {
  position: absolute;
  top: 9px;
  right: auto;
  left: 9px;
  z-index: 4;
}

body.editor-open [data-edit-surface] {
  outline: 1px dashed rgba(255, 218, 154, .16);
  outline-offset: 5px;
}

body.editor-open [data-edit-surface]:hover {
  outline-color: rgba(255, 218, 154, .45);
}

.inline-editable {
  cursor: text;
  border-radius: 4px;
}

.inline-editable:hover {
  background: rgba(255, 218, 154, .055);
}

.inline-editable:focus {
  outline: 2px solid rgba(255, 218, 154, .72);
  outline-offset: 4px;
  background: rgba(255, 218, 154, .09);
}

.empty-edit-slot {
  display: none;
}

body.editor-open .empty-edit-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  color: var(--muted);
  background: rgba(21, 21, 25, .58);
  border: 1px dashed rgba(242, 194, 135, .3);
  border-radius: var(--soft-radius);
}

.empty-edit-slot .edit-key {
  display: inline-grid;
}

.muted-empty {
  color: rgba(246, 228, 206, .48) !important;
  font-style: italic;
}

.guide-category-title {
  margin: 0 0 8px;
  color: var(--gold-light);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.22;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .82), 0 0 10px rgba(242, 194, 135, .22);
  overflow-wrap: anywhere;
}

.guide-category-summary {
  margin: 0 0 22px;
  max-width: 940px;
  color: var(--muted);
  font-size: 1.03rem;
  font-weight: 650;
  line-height: 1.58;
}

.subguide-card {
  scroll-margin-top: 112px;
}

.subguide-card + .subguide-card {
  margin-top: 30px;
  padding-top: 28px;
  border-top: 1px solid rgba(242, 194, 135, .24);
}

.guide-summary {
  margin: 0 0 20px;
  color: var(--gold-soft);
  font-size: var(--section-summary-size, 1.18rem);
  font-weight: var(--section-summary-weight, 700);
  line-height: 1.55;
}

.section-anchor {
  display: block;
  height: 0;
  scroll-margin-top: 110px;
}

.guide-image {
  margin: 20px 0 24px;
  aspect-ratio: var(--guide-image-aspect, auto);
  border: 3px solid var(--bronze);
  border-radius: 16px;
  overflow: hidden;
  background: #0f0f12;
  box-shadow: 0 18px 36px rgba(0, 0, 0, .34);
  clip-path: inset(0 round 16px);
}

.guide-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 13px;
}

.guide-image.is-compact {
  width: fit-content;
  max-width: min(100%, 820px);
  margin-left: auto;
  margin-right: auto;
}

.guide-image.is-dialog {
  width: fit-content;
  max-width: min(100%, 620px);
  margin-left: auto;
  margin-right: auto;
}

.guide-image.is-compact img,
.guide-image.is-dialog img {
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.guide-image.is-compact img {
  max-height: 680px;
}

.guide-image.is-dialog img {
  max-height: 560px;
}

.guide-image figcaption {
  padding: 10px 14px;
  color: var(--gold-soft);
  background: rgba(33, 33, 40, .94);
  border-top: 1px solid rgba(242, 194, 135, .23);
  border-radius: 0 0 13px 13px;
  font-size: .96rem;
}

.empty-search {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 34px;
  color: var(--gold-soft);
  background: linear-gradient(180deg, rgba(19, 19, 23, .98), rgba(14, 14, 18, .98));
  border: 2px solid rgba(242, 194, 135, .5);
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-align: center;
}

.rich-copy {
  color: var(--gold-soft);
  font-size: var(--section-body-size, 1.06rem);
  font-weight: var(--section-body-weight, 600);
  line-height: 1.67;
}

.rich-copy p {
  margin: 0 0 1rem;
}

.guide-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.guide-list li {
  position: relative;
  margin: 0 0 10px;
  padding: 0 0 0 22px;
  color: var(--gold-soft);
  font-size: var(--section-list-size, 1rem);
  font-weight: var(--section-list-weight, 600);
  line-height: 1.62;
}

.guide-list li:last-child {
  margin-bottom: 0;
}

.guide-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .72em;
  width: 7px;
  height: 7px;
  background: var(--bronze);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(242, 194, 135, .24);
}

.guide-note {
  margin-top: 22px;
  padding: 16px 18px;
  color: var(--gold-soft);
  background: linear-gradient(to bottom, rgba(15, 15, 18, .95), rgba(27, 27, 32, .82));
  border: 2px solid var(--bronze);
  border-radius: var(--card-radius);
}

.guide-note strong {
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.formatted-size {
  font-size: var(--inline-size);
}

.formatted-color {
  color: var(--inline-color);
}

.contenteditable-active [data-editable] {
  outline: 1px dashed rgba(255, 218, 154, .6);
  outline-offset: 4px;
  cursor: text;
}

.contenteditable-active [data-editable]:focus {
  outline: 2px solid var(--gold-light);
  background: rgba(255, 218, 154, .08);
}

.footer {
  position: relative;
  background: var(--surface);
  border-top: 1px solid rgba(242, 194, 135, .18);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 28px 0;
  color: var(--gold);
}

.footer-logo .brand-mark strong {
  font-size: 1.6rem;
}

.footer-logo .brand-mark span {
  font-size: .92rem;
}

.scroll-top-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #ffd98d;
  background:
    linear-gradient(180deg, rgba(255, 218, 154, .18), rgba(140, 91, 42, .08)),
    rgba(12, 12, 15, .82);
  border: 1px solid rgba(242, 194, 135, .58);
  border-radius: 50%;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, .46),
    inset 0 0 0 1px rgba(255, 255, 255, .06),
    0 0 18px rgba(223, 166, 85, .14);
  cursor: pointer;
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 10px rgba(255, 218, 154, .38);
  backdrop-filter: blur(10px);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.scroll-top-btn:hover,
.scroll-top-btn:focus-visible {
  color: #111;
  background:
    linear-gradient(180deg, #ffd98d, #b97a38);
  border-color: #ffe5a8;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, .5),
    0 0 22px rgba(255, 205, 118, .24);
  outline: none;
  transform: translateY(-3px);
  text-shadow: none;
}

.editor-backdrop {
  display: none;
  pointer-events: none;
}

body.editor-open .editor-backdrop {
  display: none;
  pointer-events: none;
}

.editor-panel {
  position: fixed;
  z-index: 80;
  top: auto;
  right: 24px;
  bottom: 24px;
  width: min(520px, calc(100vw - 48px));
  height: min(46vh, 560px);
  min-width: min(380px, calc(100vw - 48px));
  min-height: 310px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 120px);
  display: grid;
  grid-template-rows: auto 1fr;
  color: var(--gold);
  background: #151519;
  border: 2px solid var(--bronze);
  border-radius: var(--card-radius);
  box-shadow: 0 36px 110px rgba(0, 0, 0, .62);
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  resize: both;
  transform: translateY(12px) scale(.98);
  transition: opacity .22s ease, transform .22s ease;
}

body.editor-open .editor-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.editor-header {
  padding: 18px 18px 14px;
  background-image: url("../images/card-header-widget-bg.png");
  background-position: 0 0;
  background-repeat: repeat-x;
  background-size: 100% 100%;
  color: #50402c;
  cursor: move;
  user-select: none;
}

.editor-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.editor-header h2 {
  margin: 0;
  color: #50402c;
  text-shadow: 0 3px 3px #f1c086;
  text-transform: uppercase;
}

.icon-btn {
  min-width: 42px;
  min-height: 38px;
  padding: 8px 10px;
  background: rgba(21, 21, 25, .72);
  cursor: pointer;
}

.editor-scroll {
  overflow: auto;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.editor-current {
  padding: 14px 16px;
  background:
    linear-gradient(180deg, rgba(255, 218, 154, .11), rgba(255, 218, 154, .03)),
    rgba(21, 21, 25, .92);
  border: 1px solid rgba(255, 218, 154, .3);
  border-radius: var(--card-radius);
}

.editor-current span {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.editor-current h3 {
  margin: 4px 0 4px;
  color: var(--gold-light);
  font-size: 1.3rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.editor-current p {
  margin: 0;
  color: var(--gold-soft);
  line-height: 1.42;
}

.context-editor {
  display: grid;
  gap: 14px;
}

.editor-block {
  padding: 16px;
  background: rgba(33, 33, 40, .96);
  border: 1px solid rgba(242, 194, 135, .24);
  border-radius: var(--card-radius);
}

.editor-block-main {
  grid-column: auto;
  grid-row: auto;
}

.editor-block-actions {
  grid-column: auto;
}

.editor-block h3 {
  margin: 0 0 12px;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.editor-field {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.editor-field label {
  color: var(--gold-light);
  font-weight: 800;
  letter-spacing: .035em;
}

.editor-field input,
.editor-field textarea,
.editor-field select {
  width: 100%;
  color: var(--gold);
  background-color: #413423;
  border: 1px solid var(--gold);
  border-radius: 0 !important;
  box-shadow: inset 0 0 13px rgba(21, 21, 25, .5);
  padding: 10px 12px;
}

.editor-field textarea {
  resize: vertical;
  min-height: 96px;
}

.editor-field input:focus,
.editor-field textarea:focus,
.editor-field select:focus {
  outline: 2px solid rgba(255, 218, 154, .38);
  border-color: var(--gold-light);
}

.editor-field small {
  color: var(--muted);
}

.compact-format-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px;
  background: rgba(21, 21, 25, .96);
  border: 1px solid rgba(242, 194, 135, .18);
  border-radius: var(--soft-radius);
}

.editor-grid {
  display: grid;
  gap: 10px;
}

.editor-grid.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-field {
  display: grid;
  gap: 6px;
  color: var(--gold-light);
  font-weight: 800;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 12px;
  margin-top: 12px;
}

.check-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-soft);
}

.check-grid input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold-light);
}

.format-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.format-btn {
  min-height: 34px;
  padding: 7px 10px;
  color: var(--gold-light);
  background: rgba(65, 52, 35, .58);
  border: 1px solid rgba(255, 218, 154, .62);
  border-radius: 10px 0 10px 0;
  cursor: pointer;
  font-weight: 900;
}

.format-btn:hover,
.format-btn:focus-visible {
  color: var(--ink);
  background: linear-gradient(40deg, #ecbc84 10%, #9b7a50 100%);
  outline: none;
}

.context-jump-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.context-chip {
  min-height: 32px;
  padding: 6px 10px;
  color: var(--gold-light);
  background: rgba(65, 52, 35, .48);
  border: 1px solid rgba(255, 218, 154, .3);
  border-radius: 10px 0 10px 0;
  cursor: pointer;
  font-weight: 900;
}

.context-chip:hover,
.context-chip:focus-visible {
  color: var(--ink);
  background: linear-gradient(40deg, #ecbc84 10%, #9b7a50 100%);
  outline: none;
}

.upload-context-btn {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  cursor: pointer;
}

.compact-actions .cms-btn {
  min-width: 96px;
}

.editor-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 12px;
}

.section-picker {
  display: grid;
  gap: 8px;
  max-height: 250px;
  overflow: auto;
  padding-right: 4px;
}

.section-picker button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  text-align: left;
  color: var(--gold);
  background: rgba(65, 52, 35, .44);
  border: 1px solid rgba(242, 194, 135, .28);
  border-radius: var(--soft-radius);
  cursor: pointer;
}

.section-picker button.is-active,
.section-picker button:hover {
  color: var(--ink);
  background: linear-gradient(40deg, #ecbc84 10%, #9b7a50 100%);
}

.import-label {
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.hidden-input {
  display: none;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 92px;
  max-width: min(440px, calc(100vw - 48px));
  padding: 13px 16px;
  color: var(--ink);
  background: linear-gradient(40deg, #ecbc84 10%, #9b7a50 100%);
  border-radius: var(--soft-radius);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  font-weight: 800;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.empty-image {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: var(--muted);
  background: rgba(15, 15, 18, .75);
}

@keyframes moving-bg {
  50% { background-position: center left; }
}

@keyframes move-forever {
  0% { transform: translate3d(-90px, 0, 0); }
  100% { transform: translate3d(85px, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 1180px) {
  .topbar-inner {
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
  }

  .top-menu {
    position: relative;
    left: auto;
    top: auto;
    justify-content: center;
    max-width: 100%;
    transform: none;
  }

  .guide-search {
    position: relative;
    right: auto;
    top: auto;
    width: min(100%, 420px);
    transform: none;
  }

  .language-switch {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .guide-sidebar {
    position: relative;
    top: auto;
    max-height: none;
  }

  .sidebar-card,
  .sidebar-nav {
    max-height: none;
    overflow: visible;
  }

  .sidebar-nav {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }
}

@media (max-width: 980px) {
  .scroll-top-btn {
    right: 12px;
    bottom: 18px;
  }

  .editor-panel {
    top: auto;
    right: 12px;
    bottom: 12px;
    width: min(560px, calc(100vw - 24px));
    height: min(54vh, 700px);
    min-width: min(360px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 100px);
  }

  .editor-scroll {
    grid-template-columns: 1fr;
  }

  .editor-block-main,
  .editor-block-actions {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 820px) {
  .container {
    width: min(100% - 24px, 1480px);
  }

  .hero {
    min-height: 320px;
  }

  .hero::after {
    opacity: .38;
    width: 88vw;
  }

  .guide-card > header,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .guide-body {
    padding: 18px;
  }

  .editor-panel {
    width: calc(100vw - 18px);
    height: calc(100vh - 18px);
    min-width: calc(100vw - 18px);
    min-height: 50vh;
    max-width: calc(100vw - 18px);
    max-height: calc(100vh - 18px);
    top: auto;
    right: 9px;
    bottom: 9px;
    resize: none;
  }

  .editor-grid.two-columns,
  .check-grid {
    grid-template-columns: 1fr;
  }
}
