/* Wiki shell and guide banners */
body {
  background:
    linear-gradient(180deg, #120a09d9 4rem, #120a09b0 19rem, #120a09eb 47rem, #100a09 62rem),
    url("assets/theme-hero.png") center top / auto max(56rem, 66vw) no-repeat,
    #100a09;
}
.site-header { background: #140b09f5; border-block-end: 1px solid var(--line); }
.topbar {
  width: min(100%, 1260px);
  min-height: 72px;
  margin-inline: auto;
  padding: .7rem clamp(.85rem, 3vw, 2rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem clamp(.8rem, 2.1vw, 1.75rem);
}
.topbar > a, .nav-account > a { font-size: .82rem; font-weight: bold; color: var(--muted); }
.topbar a:hover, .topbar a[aria-current] { color: var(--gold); }
.topbar a[aria-current] { box-shadow: 0 2px var(--line-bright); }
.site-brand { display: flex; align-items: center; }
.site-brand img { width: 102px; height: 36px; object-fit: contain; }
.nav-account { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; margin-inline-start: auto; }
.language-panel { position: relative; z-index: 2; }
#language-toggle, .language-choice {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-align: start;
}
#language-toggle { font-size: .82rem; }
#language-toggle img, .language-choice img { width: 22px; height: 15px; object-fit: contain; flex-shrink: 0; }
#language-list {
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: calc(100% + .4rem);
  width: min(13rem, calc(100vw - 2rem));
  max-height: min(23rem, 60vh);
  overflow: auto;
  padding: .35rem;
  border: 1px solid var(--line-bright);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: 0 8px 24px #0008;
}
.language-choice { width: 100%; border-color: transparent; background: none; }

.layout {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  align-items: start;
  align-content: start;
  gap: 22px;
  width: min(100%, 1230px);
  margin: 0 auto;
  padding: 30px 24px 72px;
  flex: 1;
}
.wiki-rail, #wiki-main {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #1b0f0ded;
  box-shadow: 0 16px 48px #0d060747;
}
.wiki-rail { z-index: 1; position: sticky; inset-block-start: 18px; max-height: calc(100dvh - 36px); overflow-y: auto; scrollbar-width: thin; padding: .75rem; }
#wiki-main { padding: clamp(.9rem, 2.4vw, 1.8rem); }
#content { min-width: 0; }
.rail-heading { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .15rem .15rem .7rem; border-block-end: 1px solid var(--line); }
#wiki-home { font-size: .95rem; font-weight: bold; }
#menu-toggle { display: none; }
.wiki-search { position: relative; margin-block: .75rem; }
.search-frame { position: relative; }
.search-frame svg { position: absolute; inset-inline-start: .6rem; inset-block-start: .62rem; stroke: var(--gold); stroke-width: 1.5; fill: none; pointer-events: none; }
#search {
  width: 100%;
  min-width: 0;
  background: #100a09;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  padding: .5rem .65rem;
  padding-inline-start: 2rem;
  font-size: .85rem;
}
#search::placeholder { color: var(--muted); }
.exact-search { display: flex; align-items: center; gap: .45rem; margin-block-start: .4rem; color: var(--muted); font-size: .82rem; cursor: pointer; }
#search-exact { margin: 0; width: 1rem; height: 1rem; accent-color: var(--gold); }
#theme-sidebar { display: grid; gap: .4rem; }
.rail-group summary {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 10px;
  align-items: center;
  column-gap: 12px;
  list-style: none;
  min-height: 44px;
  padding: .5rem .65rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--interactive);
  color: var(--ink);
  font-size: .84rem;
  font-weight: bold;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.rail-group summary::-webkit-details-marker { display: none; }
.rail-label { min-width: 0; line-height: 1.4; overflow-wrap: normal; }
.rail-group summary > .rail-icon, .rail-group summary > .category-sprite { justify-self: center; }
.rail-group summary::after { margin-inline-start: 0; justify-self: end; }
.rail-group summary::after, #menu-toggle::after {
  content: "";
  width: .4rem;
  height: .4rem;
  flex-shrink: 0;
  margin-inline-start: auto;
  border: solid var(--gold);
  border-width: 0 1px 1px 0;
  transform: translateY(-2px) rotate(45deg);
}
.rail-group[open] summary::after, #menu-toggle[aria-expanded="true"]::after { transform: translateY(2px) rotate(225deg); }
.rail-group summary:hover, .rail-group[open] summary { color: var(--gold); border-color: var(--line-bright); }
.rail-icon, .rail-group .category-sprite { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.rail-link {
  display: block;
  margin-inline-start: .55rem;
  padding: .4rem .55rem;
  border-inline-start: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
  overflow-wrap: anywhere;
}
.rail-link:hover, .rail-link[aria-current] { color: var(--gold); background: var(--hover); border-color: var(--line-bright); }
#categories { display: flex; flex-wrap: wrap; gap: .45rem; margin-block-end: .9rem; }
#summary { color: var(--muted); font-size: .85rem; margin-block-end: .55rem; }
#summary:empty { display: none; }
#more { margin-block-start: 1rem; }

.wiki-intro { margin: 0 auto 1.55rem; text-align: center; }
.wiki-intro h1 { font-size: clamp(2rem, 4vw, 2.65rem); margin-block-end: .65rem; }
.wiki-intro p { max-width: 52ch; margin: 0 auto; color: var(--muted); overflow-wrap: anywhere; }
.guide-banners { display: grid; gap: .95rem; width: min(100%, 570px); margin-inline: auto; }
.guide-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: clamp(.5rem, 2vw, 1rem);
  min-height: 94px;
  padding-block: .9rem;
  padding-inline: clamp(.6rem, 2.5vw, 1.5rem) 30%;
  border: 1px solid var(--line);
  border-radius: 5px;
  box-shadow: inset 0 0 0 4px #180e0c;
  background: linear-gradient(100deg, #42291bea, #1b100ee6 58%, #35241870), url("assets/theme-hero.png") center 38% / cover;
  color: var(--gold);
  font: bold clamp(1.05rem, 2.4vw, 1.55rem)/1.2 var(--heading-font);
  overflow-wrap: anywhere;
}
[dir="rtl"] .guide-banner { background-image: linear-gradient(260deg, #42291bea, #1b100ee6 58%, #35241870), url("assets/theme-hero.png"); }
.guide-banner:hover { border-color: var(--line-bright); color: #ffe5b5; }
.guide-banner span { min-width: 0; text-shadow: 0 2px 6px #0d0605; }
.guide-figure {
  position: absolute;
  z-index: -1;
  inset-inline-end: 3%;
  inset-block-start: .3rem;
  width: 31%;
  height: 175%;
  object-fit: contain;
  object-position: center top;
  filter: drop-shadow(0 4px 9px #100807);
}
.guide-emblem { width: 38px; height: 38px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 0 7px #ce944d88); }
footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  padding: 1.35rem .85rem;
  border-block-start: 1px solid var(--line);
  color: var(--muted);
  background: #120a09;
}
footer img { width: 80px; height: 35px; object-fit: contain; }
@media (max-width: 760px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: .8rem; padding: 1rem .8rem 2rem; }
  .wiki-rail { position: static; max-height: none; overflow: visible; }
  #menu-toggle { display: inline-flex; gap: .55rem; align-items: center; padding: .35rem .55rem; font-size: .82rem; }
  .wiki-rail:has(#menu-toggle[aria-expanded="false"]) #theme-sidebar { display: none; }
  .wiki-search { margin-block-end: .15rem; }
  .wiki-rail:has(#menu-toggle[aria-expanded="true"]) .wiki-search { margin-block-end: .75rem; }
}
@media (max-width: 480px) {
  .topbar { gap: .4rem .85rem; }
  .topbar > a, .nav-account > a { font-size: .75rem; }
  .site-brand img { width: 75px; height: 29px; }
  #language-name { display: none; }
  #language-toggle { padding: .35rem .45rem; }
  .guide-banner { min-height: 80px; }
  .guide-emblem { width: 28px; height: 30px; }
}

#suggestions {
  position: absolute;
  inset-block-start: calc(100% + .2rem);
  inset-inline: 0;
  z-index: 3;
  max-height: min(24rem, 55vh);
  overflow: auto;
  padding: .4rem;
  border: 1px solid var(--line-bright);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: 0 12px 20px #0008;
}
.suggestion-group { display: grid; }
.suggestion-group + .suggestion-group { border-block-start: 1px solid var(--line); }
.suggestion-group strong { padding: .25rem .45rem; color: var(--muted); font-size: .75rem; }
.suggestion-group a { display: block; padding: .35rem .45rem; border-radius: 4px; font-size: .85rem; overflow-wrap: anywhere; }
.suggestion-group a:hover, .suggestion-group a[aria-selected="true"] { background: var(--hover); color: var(--ink); }
@media (max-width: 760px) {
  #suggestions { position: static; margin-block-start: .4rem; max-height: min(16rem, 38vh); }
}

/* Client Wiki artwork on responsive panels. */
:root {
  --ink: #efe7db;
  --muted: #c3b7a7;
  --gold: #ead2a1;
  --line: #766653;
  --line-bright: #b59a72;
  --surface: #161413;
  --interactive: #211d19;
  --hover: #35291f;
  --heading-font: Tahoma, Arial, sans-serif;
}
body { background: #0f0e0d; font-size: 14px; }
.site-header, footer { background: #151310; }
.topbar { min-height: 56px; }
.layout {
  width: min(calc(100% - 2rem), 1260px);
  grid-template-columns: minmax(210px, 245px) minmax(0, 1fr);
  gap: 5px;
  padding: 6px;
  margin-block: 1.1rem 2rem;
  border: 2px ridge #746759;
  background: #1e1a16 url("assets/native/board.webp") repeat;
}
#wiki-window-title {
  grid-column: 1 / -1;
  min-height: 25px;
  padding: .12rem .45rem;
  border: 1px solid #a0896a;
  background: #3f2719 url("assets/native/titlebar.webp") center / auto 100% repeat-x;
  color: #f5e7cf;
  text-align: center;
  text-shadow: 1px 1px #000;
}
.wiki-rail, #wiki-main {
  border: 1px solid #615447;
  border-radius: 0;
  box-shadow: inset 0 0 0 1px #080706;
  background: #171513;
}
#wiki-main { min-height: min(610px, 68vh); }
.wiki-rail { inset-block-start: 5px; padding: .45rem; }
.rail-heading { padding: .3rem .45rem; background: #25201b; }
.search-frame svg {
  inset-block-start: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  background: url("assets/native/search.webp") center / contain no-repeat;
  stroke: none;
}
#search { border-radius: 0; border-color: #71624e; background: #100f0e; padding-inline-start: 2.35rem; }
#search::-webkit-search-cancel-button {
  appearance: none;
  width: 16px;
  height: 16px;
  background: url("assets/native/clear.webp") center / contain no-repeat;
  cursor: pointer;
}
#search-exact {
  appearance: none;
  flex-shrink: 0;
  background: url("assets/native/checkbox.webp") center / contain no-repeat;
}
#search-exact:checked { background-image: url("assets/native/checkbox-checked.webp"); }
#theme-sidebar { gap: 3px; }
.rail-group summary {
  border-radius: 0;
  background: #30251b url("assets/native/group.webp") center / 100% 100% no-repeat;
}
.rail-group[open] summary, .rail-group summary:hover {
  background-image: url("assets/native/group-active.webp");
}
.rail-link {
  margin-inline-start: 0;
  border: 1px solid #3c3227;
  background: #1f1914 url("assets/native/category.webp") center / 100% 100% no-repeat;
}
.rail-link:hover, .rail-link[aria-current] {
  background: #34281d url("assets/native/category-active.webp") center / 100% 100% no-repeat;
}
button, #language-list, #suggestions, .card, .stage, .attribute-section, .guide-step, .tower-preparation {
  border-radius: 0;
}
#content h1 { font-size: clamp(1.35rem, 2.5vw, 1.9rem); }
#content h2 { font-size: 1.2rem; }
#content h3 { font-size: 1.06rem; }
.wiki-intro { margin: 0 0 .85rem; text-align: start; }
.wiki-intro p { margin: 0; }
.native-class-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .35rem;
  margin-block-end: .85rem;
}
.native-class {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: end;
  min-height: 3rem;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #75634c;
  background: #211b16 var(--portrait) center / cover no-repeat;
  text-align: center;
}
.native-class-warrior { --portrait: url("assets/native/warrior.webp"); --portrait-active: url("assets/native/warrior-active.webp"); }
.native-class-sura { --portrait: url("assets/native/sura.webp"); --portrait-active: url("assets/native/sura-active.webp"); }
.native-class-assassin { --portrait: url("assets/native/assassin.webp"); --portrait-active: url("assets/native/assassin-active.webp"); }
.native-class-shaman { --portrait: url("assets/native/shaman.webp"); --portrait-active: url("assets/native/shaman-active.webp"); }
.native-class:hover, .native-class[aria-current] { border-color: var(--line-bright); background-image: var(--portrait-active); }
.native-class span {
  padding: .25rem .35rem;
  background: #100d0bdc;
  color: var(--gold);
  overflow-wrap: anywhere;
}
.native-class-home .native-class {
  background: #201a15 url("assets/native/board.webp") repeat;
}
.native-class-home .native-class:hover { background-color: #392b20; }
.native-class-model { width: 100%; height: clamp(108px, 16vw, 205px); object-fit: contain; object-position: center bottom; }
.native-model-hint { margin: 0 0 .4rem; color: var(--muted); }
#content:not(:has(.native-model-viewer canvas)) .native-model-hint { visibility: hidden; }
.native-model-viewer {
  position: relative;
  height: clamp(128px, 17vw, 220px);
}
.native-model-viewer > .model-fallback, .native-model-viewer > canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.native-model-viewer > canvas { touch-action: pan-y; cursor: grab; }
.native-model-viewer > canvas:active { cursor: grabbing; }
.native-model-viewer > canvas:focus-visible { outline: 2px solid var(--line-bright); outline-offset: -2px; }
.native-model-viewer[data-state="ready"] > .model-fallback { visibility: hidden; }
.native-class-link { display: block; border-block-start: 1px solid #75634c; }
.native-class-link span { display: block; }
.native-class-link:hover span { color: #fff1d4; background: #2c2016; }
.guide-banners { width: 100%; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .45rem; }
.guide-banner, [dir="rtl"] .guide-banner {
  min-height: 65px;
  padding: .55rem;
  border-radius: 0;
  background: #211b16 url("assets/native/board.webp") repeat;
  box-shadow: inset 0 0 0 1px #0c0a09;
  font: bold .9rem/1.3 Tahoma, Arial, sans-serif;
}
.guide-figure { display: none; }
.guide-emblem { width: 32px; height: 32px; filter: none; }
.native-item-slot, .native-list-slot {
  position: relative;
  display: block;
  width: 32px;
  height: calc(32px * var(--item-rows, 1));
  min-height: 0;
  flex: 0 0 auto;
  border: 0;
  padding: 0;
  overflow: visible;
  isolation: isolate;
}
.item-slots-1 { --item-rows: 1; }
.item-slots-2 { --item-rows: 2; }
.item-slots-3 { --item-rows: 3; }
.native-slot-grid { position: absolute; inset: 0; display: grid; grid-auto-rows: 32px; }
.native-slot-cell { display: block; width: 32px; height: 32px; background: #151310 url("assets/native/slot.webp") center / 32px 32px no-repeat; }
.native-item-slot > .item-icon, .native-list-slot > .item-icon {
  position: absolute;
  inset: 0;
  display: block;
  width: 32px;
  height: calc(32px * var(--item-rows, 1));
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
  z-index: 1;
}
.chest-contents { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,210px),1fr)); gap: .65rem; padding: 0; list-style: none; }
.chest-reward { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: .75rem; align-items: center; min-width: 0; padding: .65rem; border: 1px solid var(--line); background: #1c1814; }
.chest-reward-copy { display: grid; gap: .3rem; min-width: 0; overflow-wrap: normal; }
.chest-reward-copy > span:last-child { color: var(--muted); }
.chest-reward-text .chest-reward-copy { grid-column: 1 / -1; }
.research-table th, .research-table td { overflow-wrap: normal; word-break: normal; }
.research-table th:first-child, .research-table td:first-child, .research-table td:nth-child(3) { white-space: nowrap; }
.research-table th:nth-child(3) { min-inline-size: 110px; }
.horse-guide > .table-scroll > .guide-table { overflow-wrap: normal; }
.horse-guide details > img { display: block; max-width: 100%; height: auto; margin-block: .65rem; }
.listing-grid:has(.inventory-card) { grid-template-columns: repeat(auto-fill,minmax(min(100%,220px),1fr)); }
.catalog-card > .inventory-card { display: grid; grid-template-columns: 32px minmax(0,1fr); column-gap: .65rem; }
.inventory-card .card-copy { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.inventory-card .card-title { overflow-wrap: normal; }
.inventory-card small { margin-inline-start: 0; text-align: start; white-space: nowrap; }
.guide-step, .tower-preparation, .stage {
  background: #211b16;
  box-shadow: inset 0 0 0 1px #0d0b09;
}
.guide-step > h2, .stage > h3 {
  padding-block-end: .4rem;
  border-block-end: 1px solid #5f5141;
}
.dialogue { background: #12100e; }
.detail > h1, .listing-title {
  padding-block-end: .35rem;
  border-block-end: 1px solid #5f5141;
}
.matrix thead th, .matrix tr:first-child th { background: #241e17; }
.matrix tr:first-child th { white-space: nowrap; }
.matrix td { background: #141210; }
.matrix td:not(:has(.refine-material)), .refine-material > span { white-space: nowrap; }
@media (max-width: 760px) {
  .layout { width: calc(100% - 1rem); grid-template-columns: minmax(0,1fr); margin-block-start: .65rem; }
  #wiki-window-title { display: none; }
  #wiki-main { min-height: 0; }
}
@media (max-width: 480px) {
  .native-class-bar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .guide-banners { grid-template-columns: minmax(0,1fr); }
  .guide-banner, [dir="rtl"] .guide-banner { min-height: 44px; }
}

#footer-wiki{display:flex;justify-content:center;flex-wrap:wrap;gap:12px 24px} .stage>summary{cursor:pointer;padding:12px 0;color:var(--gold,#dfc586)}

.level-roadmap th:first-child, .level-roadmap td:first-child { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.pet-guide h2 a { display: inline-flex; align-items: center; gap: 10px; }
.pet-guide h2 .item-icon { flex: none; margin: 0; }

.hunting-list-table th:first-child, .hunting-list-table td:first-child, .hunting-list-table td:last-child { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
