:root {
  --bg: #120d0a;
  --bg-soft: #1d140f;
  --panel: rgba(34, 24, 17, 0.86);
  --panel-strong: rgba(22, 15, 10, 0.96);
  --line: rgba(255, 221, 177, 0.09);
  --text: #f4e7d2;
  --muted: #d4b38a;
  --gold: #d7a55d;
  --gold-soft: #f1d0a2;
  --shadow: rgba(0, 0, 0, 0.5);
  --accent: #8d6d4e;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top, rgba(199, 142, 78, 0.14), transparent 30%),
    linear-gradient(180deg, #120d0a 0%, #1a120d 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

.universal-page {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
}

.page-content {
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 90px);
  margin: 0 auto;
  padding: 165px 0 90px;
}

.page-panel {
  width: min(840px, 100%);
  max-width: 840px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(34, 24, 17, 0.86);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.24);
}

.page-panel h1 {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}

.page-panel .lead {
  margin-top: 18px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.wiki-directory {
  width: min(1080px, 100%);
  max-width: 1080px;
  border-color: rgba(224, 181, 111, 0.28);
  background:
    radial-gradient(circle at 100% 0%, rgba(93, 151, 170, 0.12), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(178, 92, 61, 0.1), transparent 32%),
    rgba(34, 24, 17, 0.9);
}

.wiki-directory-hero {
  max-width: 760px;
  margin-bottom: 42px;
}

.wiki-directory-hero h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.1;
  color: var(--text);
}

.wiki-directory-hero .lead {
  max-width: 680px;
  color: var(--muted);
  font-size: 1rem;
}

.wiki-directory-section + .wiki-directory-section {
  margin-top: 46px;
}

.wiki-directory-section-heading {
  margin-bottom: 18px;
}

.wiki-directory-section-heading .eyebrow {
  margin-bottom: 8px;
  color: var(--gold-soft);
}

.wiki-directory-section-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.5rem;
  text-shadow: 0 0 22px rgba(224, 181, 111, 0.16);
}

.wiki-directory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wiki-directory-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wiki-directory-card {
  --wiki-accent: #d9a45f;
  --wiki-tint: rgba(217, 164, 95, 0.1);
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--wiki-accent) 34%, transparent);
  border-top: 3px solid var(--wiki-accent);
  border-radius: 10px;
  background: linear-gradient(145deg, var(--wiki-tint), rgba(24, 17, 12, 0.72) 58%);
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.wiki-directory-card:hover {
  border-color: rgba(215, 165, 93, 0.38);
  background: rgba(42, 29, 19, 0.82);
  transform: translateY(-2px);
}

.wiki-directory-card-featured {
  min-height: 150px;
  border-color: rgba(215, 165, 93, 0.22);
}

.wiki-directory-card:nth-child(2) { --wiki-accent: #d87964; --wiki-tint: rgba(184, 76, 62, 0.12); }
.wiki-directory-card:nth-child(3) { --wiki-accent: #6fb7c2; --wiki-tint: rgba(71, 143, 158, 0.12); }
.wiki-directory-card:nth-child(4) { --wiki-accent: #c79a5b; --wiki-tint: rgba(199, 154, 91, 0.12); }
.wiki-directory-card:nth-child(5) { --wiki-accent: #7cbf8a; --wiki-tint: rgba(76, 151, 93, 0.12); }
.wiki-directory-card:nth-child(6) { --wiki-accent: #8fa9d0; --wiki-tint: rgba(79, 111, 165, 0.12); }

.wiki-directory-grid-3 .wiki-directory-card:nth-child(1) { --wiki-accent: #e0b56f; --wiki-tint: rgba(224, 181, 111, 0.14); }
.wiki-directory-grid-3 .wiki-directory-card:nth-child(2) { --wiki-accent: #d87964; --wiki-tint: rgba(184, 76, 62, 0.12); }
.wiki-directory-grid-3 .wiki-directory-card:nth-child(3) { --wiki-accent: #70b7c5; --wiki-tint: rgba(71, 143, 158, 0.12); }

.wiki-directory-card-kicker {
  margin-bottom: 10px;
  color: var(--wiki-accent);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wiki-directory-card strong {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 1.08rem;
}

.wiki-directory-card > span:not(.wiki-directory-card-kicker) {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.wiki-directory-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 17px;
}

.wiki-directory-links a {
  color: color-mix(in srgb, var(--wiki-accent) 82%, white);
  font-size: 0.8rem;
  text-decoration: underline;
  text-decoration-color: rgba(241, 208, 162, 0.35);
  text-underline-offset: 3px;
}

.wiki-directory-links a:hover {
  color: var(--text);
  text-decoration-color: var(--text);
}

.skill-catalog,
.skill-page {
  width: min(1080px, 100%);
  max-width: 1080px;
  border-color: rgba(224, 181, 111, 0.28);
  background:
    linear-gradient(155deg, #261a14 0%, #1e1510 52%, #17100d 100%);
}

.skill-catalog-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 42px;
}

.skill-catalog-hero h1 {
  margin: 0;
  color: var(--text);
  font-family: Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 0.95;
}

.skill-catalog-hero .lead {
  max-width: 680px;
  color: var(--muted);
  font-size: 1rem;
}

.skill-catalog-mark {
  display: grid;
  flex: 0 0 125px;
  place-items: center;
  min-height: 125px;
  border: 1px solid rgba(224, 181, 111, 0.4);
  border-radius: 50%;
  background: rgba(224, 181, 111, 0.08);
  color: var(--gold-soft);
  text-align: center;
}

.skill-catalog-mark span,
.skill-catalog-mark small {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.skill-catalog-mark strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 2.4rem;
  line-height: 0.8;
}

.skill-category + .skill-category {
  margin-top: 46px;
}

.skill-category-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(224, 181, 111, 0.18);
}

.skill-category-heading .eyebrow {
  margin: 0 0 8px;
  color: var(--gold-soft);
}

.skill-category-heading h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1.45rem;
}

.skill-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.skill-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(224, 181, 111, 0.14);
  border-radius: 8px;
  background: rgba(18, 13, 10, 0.62);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.skill-card:hover {
  border-color: rgba(224, 181, 111, 0.48);
  background: rgba(52, 35, 22, 0.75);
  transform: translateY(-2px);
}

.skill-card img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  border: 1px solid rgba(224, 181, 111, 0.2);
  border-radius: 6px;
  background: rgba(224, 181, 111, 0.08);
}

.skill-card-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.skill-card-copy small {
  color: var(--gold-soft);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.skill-card-copy strong {
  margin: 2px 0 4px;
  color: var(--text);
  font-size: 1rem;
}

.skill-card-copy em {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.skill-page {
  padding: 32px;
  background: linear-gradient(135deg, #261a14 0%, #1e1611 52%, #17100d 100%);
}

.skill-page .wiki-article {
  gap: 16px;
}

.skill-page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 20px 0 16px;
}

.skill-page-intro {
  min-width: 0;
}

.skill-page-hero h1 span {
  color: var(--muted);
  font-size: 0.58em;
}

.skill-page .wiki-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.skill-art {
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(224, 181, 111, 0.24);
  border-radius: 12px;
  background: rgba(18, 13, 10, 0.7);
}

.skill-art img {
  display: block;
  width: 100%;
  height: 132px;
  object-fit: contain;
  image-rendering: auto;
}

.skill-art figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.skill-toc {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 18px;
}

.skill-toc a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid rgba(224, 181, 111, 0.18);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.8rem;
}

.skill-toc a:hover {
  border-color: rgba(224, 181, 111, 0.5);
  background: rgba(224, 181, 111, 0.08);
}

.skill-toc span {
  color: var(--gold-soft);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.skill-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 20px;
  border: 0;
  background: transparent;
}

.skill-facts span {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid rgba(224, 181, 111, 0.18);
  border-radius: 8px;
  background: rgba(18, 13, 10, 0.48);
  color: var(--muted);
  font-size: 0.78rem;
}

.skill-facts b {
  color: var(--gold-soft);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skill-note {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  margin-top: 20px;
  padding: 15px;
  border-left: 3px solid var(--gold-soft);
  background: rgba(224, 181, 111, 0.07);
}

.skill-note strong {
  color: var(--gold-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.skill-note span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.animal-table-image,
.monster-table-image {
  width: 92px;
  height: 68px;
  margin: 0 auto;
  object-fit: contain;
  image-rendering: pixelated;
  transform: perspective(220px) rotateY(-16deg) rotateZ(-1deg);
  transform-origin: center;
  filter: drop-shadow(8px 5px 4px rgba(0, 0, 0, 0.28));
}

.skill-art img[src*="/Animals/"],
.skill-art img[src*="/Monsters/"],
.skill-card img[src*="/Animals/"],
.skill-card img[src*="/Monsters/"] {
  transform: perspective(220px) rotateY(-14deg) rotateZ(-1deg);
  transform-origin: center;
  filter: drop-shadow(8px 5px 4px rgba(0, 0, 0, 0.28));
}

.players-directory {
  width: min(1080px, 100%);
  max-width: 1080px;
  background:
    radial-gradient(circle at 100% 0%, rgba(101, 186, 119, 0.2), transparent 40%),
    linear-gradient(145deg, rgba(38, 76, 47, 0.66), rgba(34, 24, 17, 0.94) 68%);
}

.players-directory-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.players-directory-hero h1 {
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.players-directory-hero .lead {
  max-width: 660px;
  color: var(--muted);
}

.players-live-indicator {
  display: grid;
  grid-template-columns: 10px auto;
  align-items: center;
  column-gap: 10px;
  min-width: 132px;
  padding: 14px 16px;
  border: 1px solid rgba(101, 232, 138, 0.32);
  border-radius: 8px;
  background: rgba(61, 180, 96, 0.09);
  color: #a9f0b8;
}

.players-live-indicator span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4dff78;
  box-shadow: 0 0 12px rgba(77, 255, 120, 0.8);
}

.players-live-indicator strong { font-size: 1.3rem; }
.players-live-indicator small { grid-column: 2; color: var(--muted); }

.players-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.players-stats div {
  padding: 14px 16px;
  border: 1px solid rgba(255, 221, 177, 0.1);
  border-radius: 8px;
  background: rgba(24, 17, 12, 0.6);
}

.players-stats span { display: block; color: var(--muted); font-size: 0.76rem; }
.players-stats strong { display: block; margin-top: 4px; color: var(--gold-soft); font-size: 1.15rem; }

.players-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid rgba(111, 183, 194, 0.24);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(52, 76, 78, 0.3), rgba(24, 17, 12, 0.78));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16), inset 0 1px rgba(255, 255, 255, 0.035);
}

.players-toolbar label { margin: 0; }
.players-toolbar label span { display: block; margin-bottom: 7px; color: var(--gold-soft); font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; }
.players-toolbar input, .players-toolbar select { width: 100%; min-height: 46px; padding: 9px 13px; border: 1px solid #8a623d !important; border-radius: 7px; outline: none; background: #2b1c13 !important; color: #f4e7d2 !important; font: inherit; transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease; }
.players-toolbar input::placeholder { color: #c4ae91; }
.players-toolbar input:focus, .players-toolbar select:focus { border-color: #d7a55d !important; background: #3a2719 !important; box-shadow: 0 0 0 3px rgba(224, 181, 111, 0.13), 0 0 20px rgba(224, 181, 111, 0.08); }
.players-reset { min-height: 46px; padding: 9px 16px; border: 1px solid rgba(215, 165, 93, 0.35); border-radius: 7px; background: rgba(215, 165, 93, 0.12); color: var(--gold-soft); font: inherit; cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease; }
.players-reset:hover { border-color: var(--gold); background: rgba(215, 165, 93, 0.22); transform: translateY(-1px); }
.players-results { min-height: 22px; margin: 0 0 8px; color: var(--muted); font-size: 0.82rem; }
.players-table-wrap { margin-top: 0; }
.players-table { width: 100%; min-width: 0; table-layout: fixed; font-size: 0.82rem; }
.players-table th, .players-table td { padding: 9px 10px; overflow-wrap: anywhere; }
.players-table th { white-space: normal; }
.players-table td:first-child { color: var(--gold-soft); text-align: center; }
.players-table td:nth-child(2) strong { color: var(--text); }
.players-table td:nth-child(3), .players-table td:nth-child(5) { color: var(--muted); }
.players-table td:nth-child(4), .players-table td:nth-child(6) { color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.player-status { display: inline-flex; align-items: center; gap: 7px; color: #a9f0b8; }
.player-status::before { width: 6px; height: 6px; border-radius: 50%; background: #4dff78; box-shadow: 0 0 8px rgba(77, 255, 120, 0.75); content: ""; }

.players-ranking {
  width: min(1080px, 100%);
  max-width: 1080px;
  background:
    radial-gradient(circle at 100% 0%, rgba(98, 153, 177, 0.11), transparent 34%),
    rgba(34, 24, 17, 0.9);
}

.money-ranking {
  background:
    radial-gradient(circle at 100% 0%, rgba(224, 181, 111, 0.2), transparent 42%),
    linear-gradient(145deg, rgba(91, 56, 25, 0.9), rgba(34, 24, 17, 0.94) 62%);
}

.skills-ranking {
  background:
    radial-gradient(circle at 100% 0%, rgba(184, 76, 62, 0.2), transparent 42%),
    linear-gradient(145deg, rgba(75, 34, 27, 0.9), rgba(34, 24, 17, 0.94) 62%);
}

.xp-ranking {
  background:
    radial-gradient(circle at 100% 0%, rgba(132, 93, 177, 0.2), transparent 42%),
    linear-gradient(145deg, rgba(53, 37, 72, 0.9), rgba(34, 24, 17, 0.94) 62%);
}

.players-ranking-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.players-ranking-hero h1 { color: var(--text); font-size: clamp(2rem, 4vw, 3.1rem); }
.players-ranking-hero .lead { max-width: 650px; color: var(--muted); }
.ranking-mark { padding: 11px 14px; border: 1px solid rgba(224, 181, 111, 0.35); border-radius: 6px; color: var(--gold-soft); font-size: 0.75rem; letter-spacing: 0.16em; }
.ranking-toolbar { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 10px; padding: 10px 12px; border: 1px solid rgba(255, 221, 177, 0.1); border-radius: 6px; background: rgba(24, 17, 12, 0.58); color: var(--muted); font-size: 0.78rem; }
.ranking-search-label { display: flex; align-items: center; gap: 9px; margin-right: auto; color: var(--muted); }
.ranking-search-label span { white-space: nowrap; }
.ranking-search-label input { width: 190px; min-height: 36px; padding: 7px 10px; border: 1px solid rgba(224, 181, 111, 0.38); border-radius: 6px; background: rgba(55, 38, 25, 0.82); color: var(--text); font: inherit; outline: none; }
.ranking-search-label input::placeholder { color: #c4ae91; }
.ranking-search-label input:focus { border-color: var(--gold); background: rgba(67, 46, 29, 0.92); box-shadow: 0 0 0 3px rgba(224, 181, 111, 0.13); }
.ranking-results { min-height: 20px; margin: 0 0 8px; color: var(--muted); font-size: 0.8rem; }
.players-ranking-table-wrap { margin-top: 0; }
.players-ranking-table { width: 100%; min-width: 0; table-layout: fixed; font-size: 0.82rem; }
.players-ranking-table th, .players-ranking-table td { padding: 9px 10px; overflow-wrap: anywhere; }
.players-ranking-table th { white-space: normal; }
.skills-ranking-table { min-width: 0; font-size: 0.74rem; }
.skills-ranking-table th, .skills-ranking-table td { padding: 7px 6px; overflow-wrap: anywhere; word-break: break-word; }
.skills-ranking-table-wrap { overflow-x: hidden; max-width: 100%; }
.skills-ranking-table { width: 100% !important; max-width: 100%; min-width: 0 !important; }
.skills-ranking-table-wrap { width: 100% !important; overflow-x: hidden !important; }
.skills-ranking-table { display: table; table-layout: fixed !important; }
.skills-ranking-table th, .skills-ranking-table td { min-width: 0 !important; max-width: none !important; white-space: normal !important; overflow-wrap: anywhere !important; word-break: break-word !important; }
.players-ranking-table th:first-child, .players-ranking-table td:first-child { text-align: center; color: var(--gold-soft); }
.players-table th:first-child, .players-table td:first-child, .players-ranking-table th:first-child, .players-ranking-table td:first-child { width: var(--players-rank-column-width, 2.5em) !important; min-width: 0 !important; white-space: nowrap !important; }
.players-ranking-table td:nth-child(2) strong { color: var(--text); }
.ranking-value { color: var(--gold-soft); font-variant-numeric: tabular-nums; }

.players-ranking-table th:nth-child(1), .players-ranking-table td:nth-child(1) { background: rgba(224, 181, 111, 0.08); }
.players-ranking-table th:nth-child(2), .players-ranking-table td:nth-child(2) { background: rgba(104, 157, 190, 0.09); }
.players-ranking-table th:nth-child(3), .players-ranking-table td:nth-child(3) { background: rgba(224, 181, 111, 0.1); }
.players-ranking-table th:nth-child(4), .players-ranking-table td:nth-child(4) { background: rgba(103, 171, 127, 0.09); }
.players-ranking-table th:nth-child(5), .players-ranking-table td:nth-child(5) { background: rgba(100, 170, 178, 0.09); }
.players-ranking-table th:nth-child(6), .players-ranking-table td:nth-child(6) { background: rgba(177, 125, 91, 0.1); }

.players-ranking-table th:nth-child(1) { color: #f0c879; }
.players-ranking-table th:nth-child(2) { color: #a8d5ef; }
.players-ranking-table th:nth-child(3) { color: #f1d0a2; }
.players-ranking-table th:nth-child(4) { color: #b8e2c1; }
.players-ranking-table th:nth-child(5) { color: #a9e0e3; }
.players-ranking-table th:nth-child(6) { color: #e1b89a; }

.players-ranking-table th:nth-child(odd), .players-ranking-table td:nth-child(odd) { background: rgba(126, 82, 49, 0.17); }
.players-ranking-table th:nth-child(even), .players-ranking-table td:nth-child(even) { background: rgba(57, 38, 25, 0.28); }
.players-ranking-table th:nth-child(n) { color: var(--gold-soft); }

.players-ranking-table th, .players-ranking-table td { background: transparent !important; }
.players-ranking-table tbody tr:nth-child(odd) td { background: rgba(126, 82, 49, 0.075) !important; }
.players-ranking-table tbody tr:nth-child(even) td { background: rgba(57, 38, 25, 0.11) !important; }

.lead-sidebar-link {
  color: #fff;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.lead-sidebar-link:hover {
  color: var(--gold);
}

.page-sidebar > .eyebrow,
.page-panel > .eyebrow {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.page-topbar .nav {
  min-height: 90px;
}

.page-topbar {
  width: 100%;
  background: rgba(24, 16, 11, 0.58);
}

.page-header-banner {
  min-height: 463px;
  margin-top: 0;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 28px 72px rgba(216, 180, 110, 0.12);
  background-image: url("images/header4.png");
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
}

.page-header-banner-content {
  display: flex;
  align-items: flex-end;
  min-height: 463px;
  padding-bottom: 28px;
}

.page-header-banner-content .eyebrow {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.page-layout-main {
  display: grid;
  grid-template-columns: 300px minmax(0, 760px);
  justify-content: center;
  align-items: start;
  gap: 32px;
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 90px);
  margin: 0 auto;
  padding: 138px 0 80px;
}

.page-layout-main > .page-content {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.page-sidebar {
  position: sticky;
  top: 120px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(34, 24, 17, 0.86);
}

.page-sidebar .eyebrow {
  margin-bottom: 18px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-nav a {
  padding: 8px 12px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.3;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.is-active {
  border-left-color: var(--gold);
  background: rgba(216, 180, 110, 0.1);
  color: var(--text);
}

.sidebar-group {
  border-bottom: 1px solid rgba(255, 221, 177, 0.06);
}

.sidebar-group summary {
  padding: 8px 12px;
  border-left: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.88rem;
  line-height: 1.3;
  list-style: none;
}

.sidebar-group summary::-webkit-details-marker {
  display: none;
}

.sidebar-group summary::after {
  content: "+";
  float: right;
  color: var(--gold-soft);
}

.sidebar-group[open] summary::after {
  content: "-";
}

.sidebar-group summary:hover {
  border-left-color: var(--gold);
  background: rgba(216, 180, 110, 0.1);
  color: var(--text);
}

.sidebar-submenu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 8px 14px;
}

.sidebar-submenu a {
  padding: 5px 10px;
  font-size: 0.88rem;
  line-height: 1.3;
}

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

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(24, 16, 11, 0.58);
  border-bottom: 1px solid rgba(255, 221, 177, 0.14);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 90px;
  gap: 18px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 210px;
}

.brand-logo {
  width: 220px;
  height: auto;
  filter: drop-shadow(0 6px 18px rgba(216, 180, 110, 0.25));
}

.online-badge {
  display: inline-flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 31px;
  padding: 0 12px;
  border: 1px solid rgba(216, 180, 110, 0.35);
  background: rgba(216, 180, 110, 0.08);
  border-radius: 999px;
  color: var(--gold-soft);
  text-decoration: none;
  font-size: 0.61rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.online-badge:hover {
  background: rgba(101, 232, 138, 0.14);
  box-shadow: inset 0 0 14px rgb(215 164 20 / 16%), 0 0 18px rgb(255 186 31 / 24%);
  transform: translateY(-1px);
}

.online-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #4dff78;
  box-shadow: 0 0 6px #4dff78, 0 0 14px rgba(77, 255, 120, 0.9);
}

.offline-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #ff0000;
  box-shadow: 0 0 6px #db091d, 0 0 14px rgb(157 35 35 / 90%);
}

.online-badge strong {
  margin-left: -5px;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  color: var(--text);
}

.hero-illustration {
  width: min(520px, 100%);
  height: auto;
  display: block;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.38));
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 18px;
  flex-wrap: nowrap;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-links a,
.nav-dropdown summary {
  position: relative;
  padding: 10px 12px;
  color: var(--muted);
  transition: color 0.2s ease, text-shadow 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-dropdown summary:hover {
  color: #fff3cf;
  text-shadow: 0 0 6px rgba(255, 221, 144, 0.85), 0 0 16px rgba(216, 180, 110, 0.7);
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown summary {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown summary::after {
  content: "▾";
  font-size: 0.72rem;
  color: var(--gold-soft);
}

.nav-dropdown[open] summary::after {
  content: "▴";
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: flex;
  flex-direction: column;
  min-width: 180px;
  padding: 8px;
  border: 1px solid rgba(255, 221, 177, 0.14);
  border-radius: 12px;
  background: rgba(24, 16, 11, 0.96);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.28);
}

.nav-dropdown-menu a {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-dropdown-menu a:hover {
  background: rgba(216, 180, 110, 0.08);
  color: var(--text);
}

.hero {
  position: relative;
  isolation: isolate;
  background-image:
    linear-gradient(
      180deg,
      rgba(18, 13, 10, 0.2) 0%,
      rgba(18, 13, 10, 0.38) 48%,
      rgba(18, 13, 10, 0.78) 82%,
      rgba(18, 13, 10, 0.96) 100%
    ),
    linear-gradient(90deg, rgba(18, 13, 10, 0.18), rgba(18, 13, 10, 0.08)),
    url("images/header4.png");
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero {
  padding: 165px 0 46px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 28px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--gold-soft);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.hero-copy h1,
.section-head h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.hero-copy h1 {
  max-width: 620px;
  font-size: clamp(3.1rem, 5vw, 5.8rem);
  font-weight: 700;
}

.lead {
  max-width: 640px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.28), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(180deg, #f1d79b 0%, #d6b065 100%);
  color: #111;
  box-shadow: 0 18px 34px rgba(216, 180, 110, 0.16);
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(180deg, #ffc36b 0%, #e87924 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.btn-primary:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 220, 0.95),
    inset 0 0 18px rgba(255, 205, 111, 0.62),
    inset 0 -8px 14px rgba(154, 57, 11, 0.28),
    0 10px 22px rgba(239, 125, 38, 0.28);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

.hero-stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  padding: 0;
  margin: 44px 0 0;
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  min-width: 110px;
}

.hero-stats .num {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  color: var(--gold-soft);
}

.hero-stats .label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-art {
  display: flex;
  justify-content: center;
}

.hero-art {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: -46px;
}

.section {
  padding: 90px 0;
}

.join-section {
  scroll-margin-top: 90px;
}

.join-section.is-viewport-bound {
  min-height: calc(100vh - 90px);
}

.features-section {
  position: relative;
  isolation: isolate;
  background: #0c0907;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.features-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(180deg, rgba(12, 9, 7, 0.72), rgba(12, 9, 7, 0.9)),
    url("images/bazar.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.section-head {
  margin-bottom: 38px;
}

.section-head.centered {
  text-align: center;
}

.section-head h2 {
  font-size: clamp(2.8rem, 4vw, 4rem);
}

.narrow {
  max-width: 700px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.feature-card {
  padding: 26px 22px;
  border-radius: 20px;
  background: rgba(22, 15, 10, 0.84);
  border: 1px solid var(--line);
  min-height: 240px;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(216, 180, 110, 0.1);
  border: 1px solid rgba(216, 180, 110, 0.4);
  color: var(--gold-soft);
  font-weight: 700;
  margin-bottom: 18px;
}

.feature-card h3 {
  margin: 0 0 12px;
  font-size: 1.28rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.step-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  column-gap: 18px;
  align-items: start;
  align-content: start;
  padding: 32px 24px 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(41, 29, 20, 0.95), rgba(19, 14, 10, 0.95));
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0;
  grid-row: 1;
  border: 1px solid rgba(241, 208, 162, 0.72);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(241, 208, 162, 0.2), rgba(92, 53, 24, 0.38));
  box-shadow: inset 0 0 14px rgba(255, 221, 144, 0.18), 0 6px 16px rgba(0, 0, 0, 0.24);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold-soft);
  text-transform: uppercase;
}

.step-card h3 {
  grid-column: 2;
  margin: 0;
  font-size: 1.5rem;
}

.step-card p {
  grid-column: 1 / -1;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.step-card a {
  color: var(--gold-soft);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.step-card a:hover {
  color: #fff;
}

.step-download-link {
  color: #ffc977 !important;
  text-decoration: underline dashed #ffc977 !important;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  font-weight: 600;
  transition: color 0.2s ease, text-decoration-color 0.2s ease, opacity 0.2s ease;
}

.step-download-link:hover {
  color: #ffe6ba !important;
  text-decoration-color: #ffe6ba !important;
  opacity: 0.95;
}

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

.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  justify-self: center;
  aspect-ratio: 16 / 10;
  min-height: 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  border-color: rgba(241, 208, 162, 0.9);
  box-shadow: 0 0 0 2px rgba(216, 180, 110, 0.24), 0 0 24px rgba(216, 180, 110, 0.34), 0 22px 36px rgba(0, 0, 0, 0.28);
  transform: translateY(-4px);
}

.gallery-image {
  width: 100%;
  height: 100%;
  min-height: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 5, 4, 0.84);
  backdrop-filter: blur(8px);
}

.gallery-modal[hidden] {
  display: none;
}

.gallery-modal-content {
  position: relative;
  width: min(920px, 100%);
  max-height: min(780px, 92vh);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-strong);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.gallery-modal-image {
  min-height: min(520px, 62vh);
  background-position: center;
  background-size: cover;
}

.gallery-modal-caption {
  padding: 22px 26px 26px;
  background: rgba(18, 12, 9, 0.94);
}

.gallery-modal-caption h3,
.gallery-modal-caption p {
  margin: 0;
}

.gallery-modal-caption p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.7;
}

.gallery-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(8, 6, 5, 0.72);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.gallery-modal-close:hover {
  background: rgba(216, 180, 110, 0.84);
  color: #17100b;
}

.item-1 {
  background-image: linear-gradient(180deg, rgba(8, 12, 16, 0.12), rgba(8, 12, 16, 0.44)), url('images/scr2.png');
}

.item-2 {
  background-image: linear-gradient(180deg, rgba(8, 12, 16, 0.12), rgba(8, 12, 16, 0.44)), url('images/scr5.png');
}

.item-3 {
  background-image: linear-gradient(180deg, rgba(8, 12, 16, 0.12), rgba(8, 12, 16, 0.44)), url('images/scr1.png');
}

.item-4 {
  background-image: linear-gradient(180deg, rgba(8, 12, 16, 0.12), rgba(8, 12, 16, 0.44)), url('images/scr4.png');
}

.item-5 {
  background-image: linear-gradient(180deg, rgba(8, 12, 16, 0.12), rgba(8, 12, 16, 0.44)), url('images/scr3.png');
}

.item-6 {
  background-image: linear-gradient(180deg, rgba(8, 12, 16, 0.12), rgba(8, 12, 16, 0.44)), url('images/scr6.png');
}

.footer {
  position: relative;
  overflow: hidden;
  padding-top: 80px;
  border-top: 1px solid var(--line);
  background-image:
    linear-gradient(180deg, rgba(8, 6, 5, 0.82), rgba(8, 6, 5, 0.92)),
    url("images/dungeon.png");
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.footer-dragon {
  position: absolute;
  left: 12%;
  bottom: -8%;
  z-index: 0;
  width: min(550px, 40vw);
  max-width: none;
  opacity: 0.42;
  mix-blend-mode: screen;
  pointer-events: none;
}

.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 28px;
  padding-bottom: 32px;
}

.footer-brand p {
  margin: 0;
  max-width: 440px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-logo {
  width: 200px;
  height: auto;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-self: end;
  text-align: right;
}

.footer-column h4 {
  margin: 0 0 12px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--gold-soft);
  text-transform: uppercase;
}

.footer-column a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.footer-column a:hover {
  color: var(--text);
}

.footer-bottom {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.home-footer-bottom {
  grid-template-columns: 1fr auto;
}

.footer-bottom .lang-switcher {
  display: none;
}

.footer-bottom > *:first-child {
  justify-self: start;
}

.footer-bottom > *:last-child {
  justify-self: end;
  text-align: right;
}

.lang-switcher {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(34, 24, 17, 0.7);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.lang-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 4px;
  transition: color 0.2s ease, background 0.2s ease;
}

.lang-btn:hover {
  color: var(--gold-soft);
}

.lang-btn.is-active {
  color: var(--gold);
  background: rgba(216, 180, 110, 0.16);
  cursor: default;
}

.lang-divider {
  color: rgba(255, 221, 177, 0.2);
  font-size: 0.75rem;
  user-select: none;
}

@media (max-width: 980px) {
  .hero-grid,
  .feature-grid,
  .steps-grid,
  .gallery-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .page-layout-main {
    grid-template-columns: 190px minmax(0, 760px);
    gap: 22px;
  }
}

@media (max-width: 640px) {
  .wiki-directory {
    padding: 24px;
  }

  .wiki-directory-hero {
    margin-bottom: 30px;
  }

  .wiki-directory-grid,
  .wiki-directory-grid-3 {
    grid-template-columns: 1fr;
  }

  .wiki-directory-section + .wiki-directory-section {
    margin-top: 34px;
  }

  .players-directory {
    padding: 24px;
  }

  .players-directory-hero {
    align-items: start;
    flex-direction: column;
  }

  .players-live-indicator {
    width: 100%;
  }

  .players-stats,
  .players-toolbar {
    grid-template-columns: 1fr;
  }

  .players-table-wrap {
    overflow-x: auto;
  }

  .players-ranking {
    padding: 24px;
  }

  .players-ranking-hero {
    align-items: start;
    flex-direction: column;
  }

  .ranking-mark { align-self: flex-start; }
  .ranking-toolbar { align-items: flex-start; flex-direction: column; }
  .ranking-search-label { align-items: flex-start; flex-direction: column; width: 100%; }
  .ranking-search-label input { width: 100%; }
  .players-ranking-table-wrap { overflow-x: auto; }
  .skills-ranking-table-wrap { overflow-x: auto; }

  .topbar {
    position: sticky;
    max-height: 100svh;
    overflow: hidden;
  }

  .nav {
    display: block;
    min-height: 0;
    padding: 12px 0;
  }

  .brand-wrap {
    justify-content: space-between;
    gap: 10px;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo {
    width: min(180px, 58vw);
  }

  .online-badge {
    flex: 0 1 auto;
    gap: 7px;
    padding: 0 9px;
    font-size: 0.55rem;
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    justify-content: stretch;
    gap: 2px 4px;
    width: 100%;
    max-height: calc(100svh - 78px);
    margin-top: 10px;
    padding: 4px 0 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    font-size: 0.68rem;
  }

  .nav-links > a,
  .nav-dropdown summary {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 6px;
    text-align: center;
  }

  .nav-dropdown {
    display: block;
  }

  .nav-dropdown-menu {
    position: static;
    min-width: 0;
    margin: 2px 4px 4px;
    padding: 4px;
    border-radius: 8px;
    box-shadow: none;
  }

  .nav-dropdown-menu a {
    min-height: 36px;
    padding: 7px 8px;
    font-size: 0.62rem;
  }

  .page-content {
    padding-top: 32px;
  }

  .page-header-banner {
    min-height: 463px;
    margin-top: 0;
  }

  .page-header-banner-content {
    min-height: 463px;
  }

  .hero {
    padding-top: 48px;
  }

  .feature-grid,
  .steps-grid,
  .gallery-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 3rem;
  }

  .page-layout-main {
    grid-template-columns: 1fr;
    padding-top: 40px;
  }

  body.houses-page .page-layout-main {
    grid-template-columns: minmax(0, 1fr);
  }

  body.houses-page .page-content,
  body.houses-page .page-panel,
  body.houses-page .wiki-article,
  body.houses-page .wiki-section,
  body.houses-page .wiki-table-wrap {
    min-width: 0;
  }

  body.houses-page .wiki-article,
  body.houses-page .wiki-section,
  body.houses-page .wiki-table-wrap {
    width: 100%;
  }

  body.houses-page .wiki-table-wrap {
    overflow: hidden;
    border: 0;
  }

  body.guilds-page .page-layout-main {
    grid-template-columns: minmax(0, 1fr);
  }

  body.guilds-page .page-content,
  body.guilds-page .page-panel,
  body.guilds-page .wiki-article,
  body.guilds-page .wiki-section,
  body.guilds-page .wiki-table-wrap {
    min-width: 0;
  }

  body.guilds-page .wiki-article,
  body.guilds-page .wiki-section,
  body.guilds-page .wiki-table-wrap {
    width: 100%;
  }

  body.monsters-page .page-layout-main,
  body.animals-page .page-layout-main {
    grid-template-columns: minmax(0, 1fr);
  }

  body.monsters-page .page-content,
  body.monsters-page .page-panel,
  body.monsters-page .wiki-article,
  body.monsters-page .wiki-section,
  body.monsters-page .wiki-table-wrap,
  body.animals-page .page-content,
  body.animals-page .page-panel,
  body.animals-page .wiki-article,
  body.animals-page .wiki-section,
  body.animals-page .wiki-table-wrap {
    min-width: 0;
  }

  body.monsters-page .wiki-article,
  body.monsters-page .wiki-section,
  body.monsters-page .wiki-table-wrap,
  body.animals-page .wiki-article,
  body.animals-page .wiki-section,
  body.animals-page .wiki-table-wrap {
    width: 100%;
  }

  body.mining-page .page-layout-main,
  body.resource-page .page-layout-main {
    grid-template-columns: minmax(0, 1fr);
  }

  body.mining-page .page-content,
  body.resource-page .page-content,
  body.mining-page .page-panel,
  body.resource-page .page-panel,
  body.mining-page .wiki-article,
  body.resource-page .wiki-article,
  body.mining-page .wiki-section,
  body.resource-page .wiki-section,
  body.mining-page .wiki-table-wrap,
  body.resource-page .wiki-table-wrap {
    min-width: 0;
  }

  body.mining-page .wiki-article,
  body.resource-page .wiki-article,
  body.mining-page .wiki-section,
  body.resource-page .wiki-section,
  body.mining-page .wiki-table-wrap,
  body.resource-page .wiki-table-wrap {
    width: 100%;
  }

  body.houses-page .houses-table,
  body.houses-page .houses-table tbody {
    display: block;
    width: 100%;
  }

  body.houses-page .houses-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  body.houses-page .houses-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(22, 15, 10, 0.72);
  }

  body.houses-page .houses-table tbody tr:last-child {
    margin-bottom: 0;
  }

  body.houses-page .houses-table tbody th[scope="row"] {
    grid-column: 1 / -1;
    width: 100%;
    padding: 10px 12px;
    white-space: normal;
    overflow-wrap: anywhere;
    border-bottom: 1px solid var(--line);
  }

  body.houses-page .houses-table tbody td {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    padding: 8px 12px;
    border: 0;
    overflow-wrap: anywhere;
  }

  body.houses-page .houses-table tbody td::before {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 600;
  }

  body.houses-page .houses-summary-table td:nth-of-type(1)::before { content: "Моделей"; }
  body.houses-page .houses-summary-table td:nth-of-type(2)::before { content: "Аренда"; }
  body.houses-page .houses-summary-table td:nth-of-type(3)::before { content: "Крупнейшая модель"; }

  body.houses-page .houses-model-table td:nth-of-type(1)::before { content: "Превью"; }
  body.houses-page .houses-model-table td:nth-of-type(2)::before { content: "Этажи"; }
  body.houses-page .houses-model-table td:nth-of-type(3)::before { content: "Габариты дома"; }
  body.houses-page .houses-model-table td:nth-of-type(4)::before { content: "AM-зона"; }
  body.houses-page .houses-model-table td:nth-of-type(5)::before { content: "Аренда"; }
  body.houses-page .houses-model-table td:nth-of-type(6)::before { content: "Экспоцентр"; }

  body.houses-page .houses-model-table td:nth-of-type(1) {
    grid-column: 1 / -1;
    align-items: center;
  }

  body.houses-page .houses-model-table .craft-item-image {
    width: 190px;
    height: 150px;
    max-width: 100%;
  }

  body.houses-page .houses-recipe-table td:nth-of-type(1)::before { content: "Blank Deeds"; }
  body.houses-page .houses-recipe-table td:nth-of-type(2)::before { content: "Iron Ingots"; }
  body.houses-page .houses-recipe-table td:nth-of-type(3)::before { content: "Logs"; }
  body.houses-page .houses-recipe-table td:nth-of-type(4)::before { content: "Stone Bricks"; }
  body.houses-page .houses-recipe-table td:nth-of-type(5)::before { content: "Каждый вид древесины"; }

  body.houses-page .houses-summary-table td:nth-of-type(3),
  body.houses-page .houses-model-table td:nth-of-type(6),
  body.houses-page .houses-recipe-table td:nth-of-type(5) {
    grid-column: 1 / -1;
  }

  .page-sidebar {
    position: static;
    padding: 30px 22px;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-panel {
    padding: 30px 22px;
  }

  .footer-bottom {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;
    text-align: center;
  }

  .footer-bottom > *:first-child,
  .footer-bottom > *:last-child {
    justify-self: center;
    text-align: center;
  }

  .footer-column {
    justify-self: start;
    text-align: left;
  }
}

/* Wiki Article Styles */
.wiki-article {
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: var(--text);
  line-height: 1.75;
}

.wiki-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.wiki-breadcrumb a {
  color: var(--gold-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.wiki-breadcrumb a:hover {
  color: var(--gold);
  text-decoration: underline;
}

.wiki-breadcrumb-sep {
  opacity: 0.4;
}

.wiki-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.wiki-title-group {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.wiki-title {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.3rem);
  font-weight: 700;
  color: #fff8eb;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.wiki-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wiki-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(216, 180, 110, 0.12);
  border: 1px solid rgba(216, 180, 110, 0.3);
  color: var(--gold-soft);
}

.wiki-badge.is-primary {
  background: rgba(216, 180, 110, 0.22);
  border-color: var(--gold);
  color: #fff;
}

.wiki-lead {
  margin: 12px 0 0;
  font-size: 1.05rem;
  color: #e4d7c8;
  line-height: 1.7;
}

.xp-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(22, 15, 10, 0.72);
}

.xp-intro-content {
  align-self: center;
  padding: 24px 28px;
}

.xp-intro-content h2,
.xp-intro-content p {
  margin: 0;
}

.xp-intro-content h2 {
  color: var(--gold-soft);
  font-family: "Inter", sans-serif;
  font-size: 1.25rem;
  line-height: 1.3;
}

.xp-intro-content p {
  margin-top: 10px;
  color: #e4d7c8;
  font-size: 0.94rem;
  line-height: 1.6;
}

@media (max-width: 560px) {
  .xp-intro {
    grid-template-columns: minmax(0, 1fr);
  }
}

.city-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.city-card {
  display: grid;
  grid-template-columns: minmax(0, 35fr) minmax(0, 65fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(22, 15, 10, 0.72);
}

.city-card-image {
  display: block;
  grid-column: 1;
  grid-row: 1;
  min-height: 100%;
  background: rgba(10, 7, 5, 0.7);
}

.city-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.city-card-image:hover img,
.city-card-image:focus-visible img {
  transform: scale(1.04);
}

.city-card:nth-child(even) .city-card-image {
  grid-column: 2;
}

.city-card:nth-child(even) {
  grid-template-columns: minmax(0, 65fr) minmax(0, 35fr);
}

.city-card:nth-child(even) .city-card-content {
  grid-column: 1;
}

.city-card-content {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  padding: 18px 22px;
}

.city-card-content h2,
.city-card-content p {
  margin: 0;
}

.city-card-content h2 {
  color: var(--gold-soft);
  font-family: "Inter", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
}

.city-card-content p {
  margin-top: 8px;
  color: #e4d7c8;
  font-size: 0.94rem;
  line-height: 1.55;
}

.city-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 5, 4, 0.84);
  backdrop-filter: blur(8px);
}

.city-lightbox[hidden] {
  display: none;
}

.city-lightbox-content {
  position: relative;
  width: min(1080px, 100%);
  max-height: calc(100vh - 48px);
}

.city-lightbox-image {
  display: block;
  width: 100%;
  max-height: calc(100vh - 48px);
  object-fit: contain;
}

.city-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(8, 6, 5, 0.72);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.city-lightbox-close:hover,
.city-lightbox-close:focus-visible {
  background: rgba(216, 180, 110, 0.84);
  color: #17100b;
}

@media (max-width: 560px) {
  .city-card {
    grid-template-columns: 1fr;
  }

  .city-card:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .city-card-image {
    grid-column: 1 !important;
    grid-row: auto;
    width: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .city-card-content,
  .city-card:nth-child(even) .city-card-content {
    grid-column: 1;
    grid-row: auto;
  }
}

/* Two-column overview: Lead + Infobox */
.wiki-overview-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  align-items: start;
}

@media (max-width: 860px) {
  .wiki-overview-grid {
    grid-template-columns: 1fr;
  }
}

/* Wikipedia-like Infobox */
.wiki-infobox {
  border: 1px solid rgba(216, 180, 110, 0.35);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(28, 19, 13, 0.95), rgba(18, 12, 8, 0.98));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  font-size: 0.88rem;
}

.wiki-infobox-header {
  padding: 12px 16px;
  background: linear-gradient(90deg, rgba(216, 180, 110, 0.25), rgba(120, 80, 40, 0.18));
  border-bottom: 1px solid rgba(216, 180, 110, 0.3);
  text-align: center;
}

.wiki-infobox-title {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.wiki-infobox-subtitle {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Wikipedia-style Infobox Image / Thumbnail */
.wiki-infobox-image-wrap {
  padding: 12px;
  background: rgba(14, 9, 6, 0.75);
  border-bottom: 1px solid rgba(255, 221, 177, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.wiki-infobox-image-box {
  width: 100%;
  max-width: 220px;
  min-height: 120px;
  border-radius: 8px;
  border: 1px dashed rgba(216, 180, 110, 0.35);
  background: radial-gradient(circle at center, rgba(45, 30, 20, 0.75), rgba(15, 10, 6, 0.9));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  text-align: center;
  color: var(--gold-soft);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.5);
  transition: border-color 0.2s ease;
}

.wiki-infobox-image-box:hover {
  border-color: var(--gold);
}

.wiki-infobox-image-box img {
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
  display: block;
}

.wiki-infobox-image-placeholder-icon {
  font-size: 1.8rem;
  line-height: 1;
  margin-bottom: 6px;
  opacity: 0.85;
}

.wiki-infobox-image-placeholder-text {
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.3;
}

.wiki-infobox-caption {
  font-size: 0.76rem;
  color: #cbb8a4;
  text-align: center;
  font-style: italic;
  line-height: 1.3;
  margin: 0;
}

.wiki-infobox-body {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wiki-infobox-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 221, 177, 0.08);
  font-size: 0.85rem;
}

.wiki-infobox-row:last-child {
  border-bottom: none;
}

.wiki-infobox-label {
  color: var(--muted);
  font-weight: 600;
}

.wiki-infobox-val {
  color: #fff;
  font-weight: 500;
}

.wiki-infobox-val a {
  color: var(--gold-soft);
  text-decoration: none;
}
.wiki-infobox-val a:hover {
  text-decoration: underline;
}

/* Table of contents (TOC) */
.wiki-toc {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(20, 14, 10, 0.7);
  padding: 16px 20px;
  margin: 20px 0 8px;
  display: inline-block;
  min-width: 260px;
}

.wiki-toc-title {
  margin: 0 0 10px;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}

.wiki-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}

.wiki-toc-list a {
  color: #d8c6b2;
  text-decoration: none;
  transition: color 0.2s ease;
}

.wiki-toc-list a:hover {
  color: var(--gold);
  text-decoration: underline;
}

/* Headings within wiki article */
.wiki-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.wiki-h2 {
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(216, 180, 110, 0.25);
  font-family: "Inter", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wiki-h3 {
  margin: 8px 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff4e2;
}

/* Callout / Notes / Formulas */
.wiki-note {
  border-left: 3px solid var(--gold);
  background: rgba(216, 180, 110, 0.07);
  border-radius: 0 10px 10px 0;
  padding: 12px 18px;
  margin: 6px 0;
  font-size: 0.92rem;
  color: #eddcd0;
}

.wiki-formula {
  border: 1px dashed rgba(216, 180, 110, 0.4);
  background: rgba(14, 10, 7, 0.85);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: monospace;
  font-size: 0.92rem;
  color: #ffd899;
  overflow-x: auto;
}

/* Tables */
.wiki-table-wrap {
  overflow-x: auto;
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.rocks-art-table {
  table-layout: fixed;
}

.rocks-art-table caption {
  padding: 10px 16px;
  text-align: left;
  color: var(--gold-soft);
}

.rocks-art-table td {
  width: 25%;
  padding: 10px 4px;
  text-align: center;
  vertical-align: bottom;
}

.rocks-art-table img {
  display: block;
  width: 56px;
  max-width: 100%;
  height: 56px;
  margin: 0 auto;
  object-fit: contain;
  image-rendering: pixelated;
}

.rocks-page .item-link {
  color: var(--gold-soft);
  text-decoration: underline;
  text-underline-offset: .2em;
}

.wiki-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.wiki-table th {
  background: rgba(30, 21, 14, 0.95);
  color: var(--gold-soft);
  font-family: "Inter", sans-serif;
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.wiki-table td {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 221, 177, 0.08);
  color: #ecd9c7;
}

.wiki-table tr:last-child td {
  border-bottom: none;
}

.skill-training-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  vertical-align: middle;
}

.skill-training-item img {
  width: auto;
  height: auto;
  max-width: 44px;
  max-height: 44px;
  object-fit: contain;
  image-rendering: pixelated;
}

.wiki-table tr:hover td {
  background: rgba(216, 180, 110, 0.06);
}

.blacksmith-craft-page .page-panel > .wiki-article {
  display: none;
}

.blacksmith-craft-page .page-layout-main > .page-content,
.blacksmith-craft-page .page-panel {
  min-width: 0;
}

.craft-catalog {
  color: var(--text);
}

.craft-catalog > .wiki-breadcrumb {
  margin: 0 0 28px;
}

.craft-catalog-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.craft-catalog-header .wiki-breadcrumb {
  margin-bottom: 12px;
}

.page-panel .craft-catalog-title {
  margin: 0;
  color: var(--gold-soft);
  font-family: inherit;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
}

.craft-catalog-subtitle,
.craft-source {
  color: var(--muted);
  font-size: 0.82rem;
}

.craft-source {
  flex: 0 0 auto;
  padding-bottom: 5px;
}

.craft-source a {
  color: var(--gold-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.craft-toolbar {
  margin: 24px 0 12px;
  padding: 10px 12px 12px;
  border: 1px solid rgba(215, 165, 93, 0.22);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(48, 34, 24, 0.78), rgba(24, 17, 12, 0.94));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14), inset 0 1px rgba(255, 241, 220, 0.035);
}

.craft-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
  padding-bottom: 10px;
  scrollbar-width: thin;
}

.craft-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.craft-tab:hover {
  color: var(--gold-soft);
  border-color: rgba(215, 165, 93, 0.16);
  background: rgba(255, 221, 177, 0.045);
}

.craft-tab[aria-selected="true"] {
  color: var(--gold-soft);
  border-color: rgba(215, 165, 93, 0.38);
  background: rgba(215, 165, 93, 0.11);
  box-shadow: inset 0 1px rgba(255, 241, 220, 0.05);
}

.craft-tab-count {
  color: #a99075;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 221, 177, 0.055);
}

.craft-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(190px, 280px) auto;
  gap: 10px;
}

.craft-category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.craft-category-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 221, 177, 0.035);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.craft-category-button:hover,
.craft-category-button.is-active {
  border-color: rgba(215, 165, 93, 0.42);
  background: rgba(215, 165, 93, 0.14);
  color: var(--gold-soft);
}

.craft-control {
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(14, 10, 7, 0.72);
  color: var(--text);
  font: inherit;
}

.craft-control::placeholder {
  color: #a99075;
}

.craft-control:focus {
  border-color: var(--gold);
  outline: 2px solid rgba(215, 165, 93, 0.16);
  outline-offset: 1px;
}

.craft-control option {
  background: #1d140f;
  color: var(--text);
}

.craft-reset {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 221, 177, 0.035);
  color: var(--gold-soft);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.craft-reset:hover {
  border-color: var(--gold);
  background: rgba(216, 180, 110, 0.1);
}

.craft-results {
  margin: 0 0 8px;
  padding-left: 2px;
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.craft-table-wrap {
  margin-top: 0;
}

.craft-table {
  width: 100%;
  font-size: 0.78rem;
  table-layout: fixed;
}

.craft-table th,
.craft-table td {
  padding: 8px 5px;
}

.craft-table th {
  white-space: normal;
  overflow-wrap: anywhere;
}

.craft-table th:first-child,
.craft-table td:first-child {
  width: 5%;
  text-align: center;
}

.craft-table th:nth-child(2) {
  width: 18%;
}

.craft-table th:nth-child(3) {
  width: 19%;
}

.craft-table th:nth-child(4) {
  width: 12%;
}

.craft-table th:nth-child(5) {
  width: 25%;
}

.craft-table th:nth-child(6) {
  width: 21%;
}

.magic-tools-table {
  table-layout: fixed;
}

.magic-tools-table th,
.magic-tools-table td {
  padding: 8px 5px;
  overflow-wrap: anywhere;
}

.magic-tools-table th:first-child,
.magic-tools-table td:first-child {
  width: 18%;
  text-align: center;
}

.magic-tools-table th:nth-child(2) { width: 19%; }
.magic-tools-table th:nth-child(3) { width: 12%; }
.magic-tools-table th:nth-child(4) { width: 24%; }
.magic-tools-table th:nth-child(5) { width: 17%; }
.magic-tools-table th:nth-child(6) { width: 10%; }

.craft-selection-table th:first-child,
.craft-selection-table td:first-child {
  width: 4%;
}

.craft-selection-table th:nth-child(2) {
  width: 15%;
}

.craft-selection-table th:nth-child(3) {
  width: 19%;
}

.craft-selection-table th:nth-child(4) {
  width: 11%;
}

.craft-selection-table th:nth-child(5) {
  width: 24%;
}

.craft-selection-table th:nth-child(6) {
  width: 21%;
}

.craft-selection-table th:nth-child(7),
.craft-selection-table td:nth-child(7) {
  width: 6%;
  text-align: center;
}

.craft-selection-table .craft-keep-cell input,
.craft-selection-table .craft-keep-column input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--gold);
  vertical-align: middle;
}

.reagents-page .craft-table th:nth-child(4) {
  width: 28%;
}

.mining-page .craft-table {
  min-width: 560px;
}

.mining-page .craft-table th:nth-child(4) {
  width: 14%;
}

.mining-page .craft-table th:nth-child(5) {
  width: 15%;
}

.mining-page .craft-table th:nth-child(6) {
  width: 29%;
}

.lumberjacking-page .craft-table th:nth-child(4) {
  width: 16%;
}

.lumberjacking-page .craft-table th:nth-child(5) {
  width: 23%;
}

.lumberjacking-page .craft-table th:nth-child(6) {
  width: 19%;
}

.hunting-page .craft-table th:nth-child(4) {
  width: 18%;
}

.hunting-page .craft-table th:nth-child(5) {
  width: 22%;
}

.hunting-page .craft-table th:nth-child(6) {
  width: 18%;
}

.fishing-page .craft-table th:nth-child(4) {
  width: 16%;
}

.fishing-page .craft-table th:nth-child(5) {
  width: 42%;
}

.craft-table td {
  vertical-align: middle;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.craft-table tbody tr:nth-child(even) td {
  background: rgba(255, 221, 177, 0.018);
}

.craft-table td:nth-child(4) {
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
}

.craft-item-image {
  width: 96px;
  height: 96px;
  margin: auto;
  object-fit: contain;
  image-rendering: pixelated;
}

/* Craft sprites keep their original client scale on desktop and mobile. */
.craft-page .craft-item-image {
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
}

.craft-image-empty {
  color: #826d58;
}

.craft-item-name {
  color: #f1dfca;
  font-weight: 600;
}

.craft-empty,
.craft-error {
  padding: 28px 16px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 700px) {
  .craft-table {
    font-size: 0.68rem;
  }

  .craft-table th,
  .craft-table td {
    padding: 7px 2px;
  }

  .craft-table th:first-child,
  .craft-table td:first-child {
    width: 5%;
  }

  .craft-table th:nth-child(2) {
    width: 18%;
  }

  .craft-table th:nth-child(3) {
    width: 19%;
  }

  .craft-table th:nth-child(4) {
    width: 12%;
  }

  .craft-table th:nth-child(5) {
    width: 25%;
  }

  .craft-table th:nth-child(6) {
    width: 21%;
  }

  .craft-selection-table th:first-child,
  .craft-selection-table td:first-child {
    width: 4%;
  }

  .craft-selection-table th:nth-child(2) {
    width: 15%;
  }

  .craft-selection-table th:nth-child(3) {
    width: 19%;
  }

  .craft-selection-table th:nth-child(4) {
    width: 11%;
  }

  .craft-selection-table th:nth-child(5) {
    width: 24%;
  }

  .craft-selection-table th:nth-child(6) {
    width: 21%;
  }

  .craft-selection-table th:nth-child(7),
  .craft-selection-table td:nth-child(7) {
    width: 6%;
  }

  .craft-item-image {
    width: 44px;
    height: 44px;
  }

  .craft-catalog-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .craft-source {
    padding-bottom: 0;
  }

  .craft-controls {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .craft-toolbar {
    margin-top: 20px;
    padding: 8px;
  }

  .craft-search {
    grid-column: 1 / -1;
  }

  .craft-reset {
    min-height: 42px;
  }
}

.mining-page .mining-ore-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 0.8rem;
}

.mining-page .mining-ore-table th,
.mining-page .mining-ore-table td {
  padding: 8px 10px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.mining-page .mining-ore-table th:nth-child(1) { width: 36%; }
.mining-page .mining-ore-table th:nth-child(2) { width: 22%; }
.mining-page .mining-ore-table th:nth-child(3) { width: 25%; }
.mining-page .mining-ore-table th:nth-child(4) { width: 17%; }

.monster-category th {
  text-align: center;
}

.houses-page .wiki-table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.houses-page .houses-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 0.78rem;
}

.houses-page .houses-table th,
.houses-page .houses-table td {
  padding: 8px 9px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.houses-page .houses-model-table .craft-item-image {
  width: 220px;
  height: 165px;
  max-width: 100%;
  object-fit: contain;
}

.houses-page .houses-summary-table thead th:nth-child(1) { width: 23%; }
.houses-page .houses-summary-table thead th:nth-child(2) { width: 13%; }
.houses-page .houses-summary-table thead th:nth-child(3) { width: 21%; }
.houses-page .houses-summary-table thead th:nth-child(4) { width: 43%; }

.houses-page .houses-model-table thead th:nth-child(1) { width: 16%; }
.houses-page .houses-model-table thead th:nth-child(2) { width: 33%; }
.houses-page .houses-model-table thead th:nth-child(3) { width: 6%; }
.houses-page .houses-model-table thead th:nth-child(4) { width: 10%; }
.houses-page .houses-model-table thead th:nth-child(5) { width: 10%; }
.houses-page .houses-model-table thead th:nth-child(6) { width: 10%; }
.houses-page .houses-model-table thead th:nth-child(7) { width: 15%; }

.houses-page .houses-recipe-table thead th:nth-child(1) { width: 10%; }
.houses-page .houses-recipe-table thead th:nth-child(2) { width: 14%; }
.houses-page .houses-recipe-table thead th:nth-child(3) { width: 17%; }
.houses-page .houses-recipe-table thead th:nth-child(4) { width: 17%; }
.houses-page .houses-recipe-table thead th:nth-child(5) { width: 17%; }
.houses-page .houses-recipe-table thead th:nth-child(6) { width: 25%; }

.experience-table-wrap {
  width: 100%;
  max-width: 100%;
}

.experience-table {
  width: 100%;
  font-size: 0.78rem;
}

.experience-table th,
.experience-table td {
  padding: 7px 10px;
  text-align: center;
}

.experience-table th:first-child {
  text-align: left;
}

.page-panel:has(.experience-table-wrap) .wiki-table-wrap {
  overflow-x: hidden;
}

.page-panel:has(.experience-table-wrap) .wiki-table {
  table-layout: fixed;
}

.page-panel:has(.experience-table-wrap) .wiki-table th,
.page-panel:has(.experience-table-wrap) .wiki-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.page-panel section[aria-labelledby="experience-progression-title"] .experience-table th:first-child {
  width: 15%;
}

.page-panel section[aria-labelledby="paladin-progression-title"] .wiki-table th:first-child,
.page-panel section[aria-labelledby="vampire-progression-title"] .wiki-table th:first-child,
.page-panel section[aria-labelledby="elf-progression-title"] .wiki-table th:first-child,
.page-panel section[aria-labelledby="berserker-progression-title"] .wiki-table th:first-child {
  width: 10%;
}

.page-panel section[aria-labelledby="paladin-progression-title"] .wiki-table th:nth-child(2),
.page-panel section[aria-labelledby="vampire-progression-title"] .wiki-table th:nth-child(2),
.page-panel section[aria-labelledby="elf-progression-title"] .wiki-table th:nth-child(2),
.page-panel section[aria-labelledby="berserker-progression-title"] .wiki-table th:nth-child(2) {
  width: 17%;
}

.page-panel section[aria-labelledby="paladin-progression-title"] .wiki-table th:nth-child(3),
.page-panel section[aria-labelledby="vampire-progression-title"] .wiki-table th:nth-child(3),
.page-panel section[aria-labelledby="elf-progression-title"] .wiki-table th:nth-child(3),
.page-panel section[aria-labelledby="berserker-progression-title"] .wiki-table th:nth-child(3) {
  width: 30%;
}

.page-panel section[aria-labelledby="paladin-progression-title"] .wiki-table th:nth-child(4),
.page-panel section[aria-labelledby="vampire-progression-title"] .wiki-table th:nth-child(4),
.page-panel section[aria-labelledby="elf-progression-title"] .wiki-table th:nth-child(4),
.page-panel section[aria-labelledby="berserker-progression-title"] .wiki-table th:nth-child(4) {
  width: 43%;
}

.page-panel section[aria-labelledby="skill-choice-title"] .wiki-table th:first-child {
  width: 30%;
}

/* Standalone races dashboard */
.page-panel .races-panel {
  gap: 0;
}

.races-panel > :not(.races-dashboard) {
  display: none;
}

.races-dashboard {
  display: grid;
  gap: 28px;
  color: var(--text);
}

.races-dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.races-kicker,
.races-section-heading > span {
  margin: 0 0 8px;
  color: var(--gold-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.races-dashboard-header h1 {
  margin: 0;
  color: #fff8eb;
  font-family: "Inter", sans-serif;
  font-size: clamp(1.6rem, 2.8vw, 2.35rem);
  line-height: 1.05;
}

.races-dashboard-header p {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.races-summary {
  display: flex;
  min-width: 300px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(216, 180, 110, 0.08);
  text-align: center;
}

.races-summary > div {
  display: grid;
  flex: 1;
  gap: 7px;
  padding: 0 12px;
  align-content: center;
}

.races-summary > div + div {
  border-left: 1px solid rgba(255, 221, 177, 0.12);
}

.races-summary strong {
  color: var(--gold-soft);
  font-family: "Inter", sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 0.9;
}

.races-summary span {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.2;
}

.races-dashboard-section {
  display: grid;
  gap: 16px;
}

.races-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.races-section-heading > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.races-section-number {
  color: var(--gold-soft);
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
}

.races-section-heading h2 {
  margin: 0;
  color: #fff8eb;
  font-family: "Inter", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.races-section-heading > span {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.races-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.races-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.races-table th,
.races-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 221, 177, 0.08);
  text-align: left;
  vertical-align: top;
}

.races-table thead th {
  color: var(--gold-soft);
  background: rgba(30, 21, 14, 0.95);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.races-table tbody th {
  color: #fff8eb;
  white-space: nowrap;
}

.races-table tbody tr:last-child th,
.races-table tbody tr:last-child td {
  border-bottom: 0;
}

.races-table small {
  display: block;
  margin-top: 3px;
  color: var(--gold-soft);
  font-size: 0.7rem;
  font-weight: 500;
}

.races-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.race-profile {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.race-profile header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 221, 177, 0.1);
}

.race-profile h3 {
  margin: 0;
  color: #fff8eb;
  font-family: "Inter", sans-serif;
  font-size: 1.15rem;
}

.race-profile header span {
  color: var(--gold-soft);
  font-size: 0.72rem;
}

.race-profile > p {
  min-height: 48px;
  margin: 12px 0 14px;
  color: var(--muted);
  line-height: 1.55;
}

.race-profile dl {
  display: grid;
  grid-template-columns: minmax(100px, 34%) 1fr;
  gap: 8px 12px;
  margin: 0;
  font-size: 0.82rem;
}

.race-profile dt {
  color: var(--gold-soft);
  font-weight: 700;
}

.race-profile dd {
  margin: 0;
  color: #eadccf;
}

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

.races-rule-grid p {
  margin: 0;
  padding: 16px;
  border-left: 2px solid var(--gold);
  background: rgba(216, 180, 110, 0.06);
  color: var(--muted);
  line-height: 1.55;
}

.races-rule-grid strong {
  display: block;
  margin-bottom: 6px;
  color: #fff8eb;
}

@media (max-width: 760px) {
  .races-dashboard-header,
  .races-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .races-card-grid,
  .races-rule-grid {
    grid-template-columns: 1fr;
  }

  .races-summary {
    min-width: 96px;
    width: 100%;
  }

  .races-summary > div {
    padding: 0 6px;
  }
}

.wiki-list {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* NPC Vendor Cards Grid */
.npc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin: 14px 0 24px;
}

.npc-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(22, 15, 10, 0.88);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.npc-card:hover {
  transform: translateY(-2px);
  border-color: rgba(216, 180, 110, 0.35);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

.npc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 221, 177, 0.08);
}

.npc-card-thumb-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 80px;
  border-radius: 8px;
  border: 1px dashed rgba(216, 180, 110, 0.25);
  background: radial-gradient(circle at center, rgba(35, 24, 16, 0.7), rgba(16, 11, 7, 0.9));
  margin-top: 2px;
  margin-bottom: 2px;
}

.npc-card-thumb-placeholder {
  font-size: 0.76rem;
  color: var(--muted);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 6px;
}

.npc-card-title {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold-soft);
}

.npc-card-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(216, 180, 110, 0.12);
  color: var(--gold);
  border: 1px solid rgba(216, 180, 110, 0.25);
  text-transform: uppercase;
  font-weight: 600;
}

.npc-card-desc {
  margin: 0;
  font-size: 0.88rem;
  color: #ddd0c0;
  line-height: 1.55;
}

.npc-card-goods {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 221, 177, 0.1);
  font-size: 0.84rem;
}

.npc-card-goods strong {
  color: var(--gold);
  display: block;
  margin-bottom: 4px;
}

.npc-card-goods p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

/* Sidebar Spacer & Logout */
.sidebar-spacer {
  height: 16px;
  margin: 8px 0;
  border-bottom: 1px dashed rgba(255, 221, 177, 0.12);
}

.sidebar-logout {
  color: #e57373 !important;
}

.sidebar-logout:hover {
  background: rgba(229, 115, 115, 0.1) !important;
  border-left-color: #e57373 !important;
  color: #ff8a80 !important;
}

/* Profile / Cabinet Styles */
.profile-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(26, 18, 12, 0.92);
  padding: 24px 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.profile-user-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 221, 177, 0.1);
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  border: 2px solid var(--gold);
  background: linear-gradient(135deg, rgba(216, 180, 110, 0.3), rgba(30, 20, 12, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-soft);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.profile-user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-user-name {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-status-badge {
  font-size: 0.72rem;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(101, 232, 138, 0.15);
  border: 1px solid rgba(101, 232, 138, 0.4);
  color: #65e88a;
}

.profile-user-email {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.profile-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
}

@media (max-width: 700px) {
  .profile-grid-2 {
    grid-template-columns: 1fr;
  }
}

.profile-stat-box {
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(18, 12, 8, 0.75);
  border: 1px solid rgba(255, 221, 177, 0.08);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-stat-val {
  font-family: "Inter", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold-soft);
}

/* Forms in Cabinet */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--gold-soft);
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(216, 180, 110, 0.3);
  background: rgba(12, 8, 5, 0.85);
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(216, 180, 110, 0.25);
}

.form-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}

.btn-cabinet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  background: linear-gradient(180deg, #f1d79b 0%, #d6b065 100%);
  color: #111;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-cabinet:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(216, 180, 110, 0.35);
}

.btn-cabinet-secondary {
  background: rgba(216, 180, 110, 0.1);
  border: 1px solid rgba(216, 180, 110, 0.3);
  color: var(--gold-soft);
}

.btn-cabinet-secondary:hover {
  background: rgba(216, 180, 110, 0.18);
  border-color: var(--gold);
  color: #fff;
}

@media (max-width: 720px) {
  .skill-catalog,
  .skill-page {
    padding: 22px 16px;
  }

  .skill-catalog-hero {
    display: block;
  }

  .skill-catalog-mark {
    margin-top: 24px;
  }

  .skill-card-grid,
  .skill-toc,
  .skill-facts {
    grid-template-columns: 1fr;
  }

  .skill-page-hero {
    grid-template-columns: 1fr;
  }

  .skill-art {
    max-width: 240px;
  }

  .skill-note {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}





/* Responsive navigation and content */
.mobile-nav-toggle { display: none; }
.page-content, .page-panel, .wiki-article, .wiki-section, .page-layout-main > *, .hero-grid > * { min-width: 0; }
:where(a, button, summary, input, select):focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }
@media (max-width: 980px) {
  html { scroll-padding-top: 90px; }
  .topbar { position: sticky; max-height: 100svh; overflow-y: auto; background: rgba(24,16,11,.96); }
  .nav { display: flex; flex-wrap: wrap; min-height: 72px; gap: 10px; padding: 10px 0; }
  .brand-wrap { flex: 1; justify-content: flex-start; gap: 10px; min-width: 0; }
  .brand { min-width: 0; }
  .brand-logo { width: 160px; }
  .mobile-nav-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 14px; border: 1px solid var(--gold); border-radius: 8px; background: var(--bg-soft); color: var(--gold-soft); font: inherit; font-size: .88rem; cursor: pointer; }
  .nav-links { width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin: 0; padding: 8px 0; max-height: none; font-size: .9rem; }
  .has-mobile-navigation:not(.mobile-navigation-open) > .nav-links, .has-mobile-navigation:not(.mobile-navigation-open) > .sidebar-nav { display: none; }
  .nav-links > a, .nav-dropdown summary { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px; text-align: center; }
  .nav-dropdown-menu { position: static; min-width: 0; margin: 0; box-shadow: none; }
  .nav-dropdown-menu a { min-height: 44px; padding: 12px; font-size: .85rem; }
  .page-layout-main, body.houses-page .page-layout-main { grid-template-columns: minmax(0,1fr); padding-top: 24px; gap: 20px; }
  .page-sidebar { position: static; padding: 14px; }
  .page-sidebar.has-mobile-navigation > .eyebrow { display: none; }
  .page-sidebar > .mobile-nav-toggle { width: 100%; justify-content: space-between; }
  .mobile-nav-toggle::after { content: '+'; margin-left: 12px; }
  .mobile-nav-toggle[aria-expanded='true']::after { content: '−'; }
  .sidebar-nav { display: flex; flex-direction: column; margin-top: 12px; }
  .sidebar-nav a, .sidebar-group summary { min-height: 44px; padding: 12px; }
  .page-content { padding-top: 28px; }
  .hero { padding-top: 40px; }
  .hero-art { max-width: 460px; justify-self: center; }
  .npc-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); }
}
@media (max-width: 640px) {
  .brand-logo { width: 130px; }
  .online-badge { gap: 5px; padding: 0 7px; letter-spacing: 0; }
  .nav > .mobile-nav-toggle { padding: 10px; font-size: .8rem; }
  .nav > .mobile-nav-toggle::after { margin-left: 6px; }
  .page-panel, .wiki-directory, .players-directory, .players-ranking, .profile-card { padding: 22px 16px; }
  .page-panel { border-radius: 14px; }
  .hero-copy h1 { font-size: clamp(2.6rem,12vw,3.4rem); }
  .lead { font-size: 1rem; line-height: 1.65; }
  .hero-actions { gap: 10px; margin-top: 26px; }
  .hero-actions .btn { flex: 1 1 140px; }
  .hero-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 28px; }
  .hero-stats li { min-width: 0; }
  .hero-stats .label { font-size: .65rem; letter-spacing: .05em; }
  .hero-art { max-width: 300px; }
  .section { padding: 48px 0; }
  .section-head h2 { font-size: clamp(2rem,9vw,3rem); }
  .wiki-article { overflow-wrap: anywhere; }
  .wiki-table-wrap, .craft-table-wrap, .players-table-wrap, .players-ranking-table-wrap { max-width: 100%; overscroll-behavior-x: contain; }
  .skills-ranking-table-wrap { overflow-x: auto !important; }
  .players-table, .players-ranking-table { min-width: 540px; }
  .skills-ranking-table { min-width: 540px !important; }
  .craft-table { min-width: 640px; font-size: .82rem; }
  .craft-table th, .craft-table td { padding: 9px 8px; }
  .craft-controls { grid-template-columns: minmax(0,1fr); }
  .craft-controls > * { min-width: 0; max-width: 100%; grid-column: auto; }
  input, select, textarea, .form-control { font-size: 16px; }
  .profile-user-header, .profile-user-name, .form-actions, .npc-card-header { flex-wrap: wrap; }
  .profile-user-info { min-width: 0; overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Keep language selection visible at the top right, including on phones. */
.craft-table .item-link { color: var(--gold-soft); text-decoration: underline; text-underline-offset: .2em; }
.language-switch { position: absolute; top: 8px; right: 12px; display: inline-flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid rgba(216,180,110,.35); border-radius: 8px; }
.language-switch a { display: flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; padding: 4px 6px; border-radius: 5px; color: var(--gold-soft); font: 600 .8rem Inter, sans-serif; text-decoration: none; }
.language-switch a:hover { background: rgba(216,180,110,.12); }
.language-switch a[aria-current="true"] { background: var(--gold); color: #20170f; }
@media (min-width: 981px) {
  .topbar .nav { flex-wrap: nowrap; justify-content: flex-start; gap: 18px; padding-right: 100px; }
  .topbar .brand-wrap { flex: 0 0 auto; }
  .topbar .nav-links { flex-wrap: nowrap; justify-content: flex-start; gap: 6px; font-size: .74rem; letter-spacing: .06em; }
  .topbar .nav-links > a, .topbar .nav-dropdown > summary { flex-shrink: 0; padding-inline: 8px; white-space: nowrap; }
}
@media (min-width: 981px) and (max-width: 1200px) {
  .topbar .brand { min-width: 0; }
  .topbar .brand-logo { width: 130px; }
  .topbar .brand-wrap { gap: 8px; }
  .topbar .nav-links { gap: 2px; font-size: .7rem; letter-spacing: .04em; }
  .topbar .nav-links > a, .topbar .nav-dropdown > summary { padding-inline: 4px; }
}
@media (max-width: 980px) {
  .topbar .nav { padding-right: 88px; }
  .nav .brand-wrap { order: 0; }
  .nav > .mobile-nav-toggle { order: 1; }
  .nav > .nav-links { order: 3; }
  .language-switch a { min-width: 36px; min-height: 38px; }
}
@media (max-width: 480px) {
  .nav { gap: 6px; }
  .nav .brand-wrap { gap: 6px; }
  .nav .brand-logo { width: clamp(85px,24vw,120px); }
  .nav > .mobile-nav-toggle { padding: 8px; }
  .language-switch { gap: 0; padding: 2px; }
  .language-switch a { min-width: 30px; padding: 4px; }
}
@media (max-width: 760px) {
  html[lang="en"] body.houses-page .houses-summary-table td:nth-of-type(1)::before { content: "Models"; }
  html[lang="en"] body.houses-page .houses-summary-table td:nth-of-type(2)::before { content: "Rent"; }
  html[lang="en"] body.houses-page .houses-summary-table td:nth-of-type(3)::before { content: "Largest model"; }
  html[lang="en"] body.houses-page .houses-model-table td:nth-of-type(1)::before { content: "Preview"; }
  html[lang="en"] body.houses-page .houses-model-table td:nth-of-type(2)::before { content: "Floors"; }
  html[lang="en"] body.houses-page .houses-model-table td:nth-of-type(3)::before { content: "Dimensions"; }
  html[lang="en"] body.houses-page .houses-model-table td:nth-of-type(4)::before { content: "AM area"; }
  html[lang="en"] body.houses-page .houses-model-table td:nth-of-type(5)::before { content: "Rent"; }
  html[lang="en"] body.houses-page .houses-model-table td:nth-of-type(6)::before { content: "Showroom"; }
  html[lang="en"] body.houses-page .houses-recipe-table td:nth-of-type(5)::before { content: "Each wood type"; }
}

/* Comfortable reading sizes for phones. */
@media (max-width: 640px) {
  body { font-size: 16px; -webkit-text-size-adjust: 100%; }
  .page-panel, .wiki-article, .skill-page, .craft-catalog { font-size: 1rem; line-height: 1.65; }
  .wiki-article { overflow-wrap: break-word; }
  .page-panel .lead, .wiki-lead, .wiki-note, .wiki-toc-list,
  .wiki-infobox, .wiki-infobox-row, .skill-note span, .skill-facts span,
  .npc-card-desc, .npc-card-goods, .wiki-directory-card > span:not(.wiki-directory-card-kicker),
  .skill-card-copy em, .step-card p, .feature-card p { font-size: 1rem; line-height: 1.6; }
  .wiki-breadcrumb, .wiki-infobox-subtitle, .wiki-infobox-caption,
  .wiki-directory-links a, .skill-card-copy small, .skill-art figcaption,
  .players-results, .ranking-results, .craft-results, .footer-bottom,
  .footer-column a { font-size: .9rem; line-height: 1.5; }
  .wiki-toc { min-width: 0; width: 100%; padding: 16px; }
  .skill-card-copy em { display: block; overflow: visible; -webkit-line-clamp: unset; }
  .wiki-toc-list { gap: 0; }
  .wiki-toc-list a, .skill-toc a { display: block; padding: 10px 4px; }
  .wiki-article a:not(.wiki-badge), .wiki-directory-links a { text-decoration: underline; text-underline-offset: 3px; }
  .mobile-nav-toggle, .nav > .mobile-nav-toggle, .nav-links,
  .nav-dropdown-menu a, .sidebar-nav a, .sidebar-group summary { font-size: 1rem; }
  .sidebar-submenu a { font-size: .95rem; }
  .eyebrow, .hero-stats .label, .wiki-badge, .wiki-directory-card-kicker { font-size: .8rem; letter-spacing: .06em; }
  .wiki-table, .players-table, .players-ranking-table, .craft-table,
  .mining-page .mining-ore-table, .houses-page .houses-table { font-size: .95rem; line-height: 1.45; }
  .players-table, .players-ranking-table { min-width: 620px; }
  .skills-ranking-table { min-width: 620px !important; font-size: .95rem; }
  .craft-table { min-width: 720px; }
  .mining-page .mining-ore-table { min-width: 540px; }
  .wiki-table-wrap:has(.mining-ore-table) { overflow-x: auto; }
  .houses-page .houses-table tbody td::before { font-size: .85rem; }
  .hero-stats .label { line-height: 1.4; }
}

/* Monster catalogue: one client sprite per row and combined loot. */
.monster-category-filters { flex-wrap: wrap; overflow-x: visible; }
.monster-category-filters .craft-tab[aria-pressed="true"] {
  color: var(--gold-soft); border-color: rgba(215,165,93,.38);
  background: rgba(215,165,93,.11);
}
.monster-catalog .monster-table-image { width: auto; height: auto; max-width: 110px; max-height: 110px; object-fit: contain; image-rendering: pixelated; }
.slayer-table .slayer-image { width: auto; height: auto; max-width: 70px; max-height: 90px; object-fit: contain; image-rendering: pixelated; }
.monster-catalog td:nth-child(2), .slayer-table td:nth-child(2) { text-align: center; min-width: 90px; }
.monster-catalog td:last-child { min-width: 250px; line-height: 1.7; }
.monster-no-image { font-size: .75rem; color: var(--muted); }
.monster-catalog tr[hidden] { display: none; }
.monsters-page .monster-catalog { table-layout: fixed; width: 100%; min-width: 660px; font-size: .82rem; }
.monsters-page .monster-catalog th, .monsters-page .monster-catalog td { padding: 12px 9px; overflow-wrap: anywhere; }
.monsters-page .monster-catalog th:nth-child(1) { width: 20%; }
.monsters-page .monster-catalog th:nth-child(2) { width: 14%; }
.monsters-page .monster-catalog th:nth-child(3) { width: 16%; }
.monsters-page .monster-catalog th:nth-child(4) { width: 13%; }
.monsters-page .monster-catalog th:nth-child(5) { width: 37%; }
.monsters-page .monster-catalog td:last-child { min-width: 0; }
.slayers-page .slayer-table { width: 100%; min-width: 600px; }
/* Links in article content follow the main navigation palette without movement. */
.page-content :is(article, .wiki-article) a:any-link {
  color: var(--muted);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-shadow: none;
  transform: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.page-content :is(article, .wiki-article) a:any-link:hover,
.page-content :is(article, .wiki-article) a:any-link:focus-visible {
  color: #fff3cf;
  text-shadow: 0 0 6px rgba(255, 221, 144, 0.45), 0 0 12px rgba(216, 180, 110, 0.3);
  transform: none;
}

/* Loot and magical-item sprites use the original client scale. */
.loot-item-image { width: auto; height: auto; max-width: 88px; max-height: 120px; margin: auto; image-rendering: pixelated; object-fit: contain; }
.loot-table td, .loot-table th { vertical-align: middle; }
.loot-table td:first-child { min-width: 44px; }
