/* lwdb.ru: the recognizable 2009 design rebuilt with grid/flex (no tables, no spacer.gif) */

:root {
  --page-bg: #e5e5e5;
  --frame-bg: #fff;
  --text: #000;
  --link: #016ed4;
  --link-hover: #0566c0;
  --title: #a56664;
  --title-blue: #3e698f;
  --title-light: #3d7fb0;
  --gls: #594900;
  --panel: linear-gradient(180deg, #f4f7fb, #e7eef5);
  --panel-border: #d3dde8;
  --panel-text: #000;
  --menu-bg: #edf2f6;
  --menu-border: #d7d7d7;
  --th-bg: #e3e3e3;
  --th-text: #4b4b4b;
  --th-blue: #6895af;
  --row-line: #b8b8b8;
  --muted: #5c5c5c;
  --green: #2f7d1f;
  --red: #c00;
  --focus: #e08a00;
  --serif: "Times New Roman", Times, Georgia, serif;
  --display: Georgia, "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --heading: #1f3348;
  --heading-2: #24405e;
  --sans: Arial, Helvetica, sans-serif;
  --site-max: 1480px;
  --gold: #d9b45a;
  --tab-gold: #d8b25a;
  --tab-gold-ring: #f3d27a;
  --radius: 6px;
  --bar-1: #5a82a9;
  --bar-2: #3c6690;
  --bar-3: #2f5a85;
  --bar-dark: #24486c;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background-color: var(--page-bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font: 13px/1.45 var(--sans);
}

img {
  border: 0;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--link);
}

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

abbr[title] {
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

p {
  margin: 0 0 0.6em;
}

h1,
h2,
h3,
h4 {
  margin: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: #fff;
  padding: 8px 12px;
}

.skip-link:focus {
  left: 8px;
}

/* ------------------------------------------------------------------ */
/* site grid: header art, tab bar, full-width content (as in aidb)     */
/* ------------------------------------------------------------------ */

/* ------------------------------------------------------------------ */
/* header: full-bleed Lineage 2 artwork, SVG wordmark, glass search     */
/* ------------------------------------------------------------------ */

.site {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

.site > * {
  min-width: 0;
}

/* the header box and the tab bar are limited to the site container, like aidb; outside is the page background */
.head {
  position: relative;
  z-index: 70;
  width: 100%;
  max-width: var(--site-max);
  margin: 0 auto;
}

/* the header wordmark fonts: tiny OFL subsets (static/fonts/README.md) */
@font-face {
  font-family: "LWDB Word";
  src: url("../fonts/lwdb-word.208cffef601a.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "LWDB Tag";
  src: url("../fonts/lwdb-tag.d620c0f02ae8.woff2") format("woff2");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

/* the hero: the official key art as a picture on the left, the wordmark set in type on its right and the search;
   the box background is a grey gradient matched to the art's own grey (its right edge fades into it) */
.hero {
  position: relative;
  height: 340px;
  background:
    radial-gradient(ellipse 34% 75% at 50% 32%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #afafaf 0%, #a9a9a9 55%, #a3a3a3 100%);
}

.hero-inner {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  grid-template-areas: "art logo . search";
  align-items: center;
  column-gap: 36px;
  height: 100%;
  padding-right: 30px;
}

.hero-art {
  grid-area: art;
  align-self: end;
  display: block;
  height: 100%;
}

.hero-art img {
  display: block;
  width: auto;
  height: 100%;
  max-width: none;
}

.hero-inner > .search {
  align-self: start;
  margin-top: 28px;
}

/* the wordmark of the old lwdb logo, set in type: steel-blue serif caps and the bold italic tagline */
.logo {
  grid-area: logo;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
}

.logo-word {
  font: 400 120px/0.86 "LWDB Word", "Times New Roman", "Liberation Serif", Times, serif;
  letter-spacing: 0.01em;
  color: #fff;
}

.logo-tag {
  margin: 12px 0 0 4px;
  font: italic 700 27px/1.1 "LWDB Tag", Georgia, "PT Serif", serif;
  color: #fff;
}

.burger {
  display: none;
}

.search {
  grid-area: search;
  justify-self: end;
  position: relative;
  width: min(420px, 30vw);
}

.search .input {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 42px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 21px;
  background: rgba(12, 22, 40, 0.78) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 16 16'%3E%3Ccircle cx='6.5' cy='6.5' r='5' fill='none' stroke='%23ffffff' stroke-width='1.6'/%3E%3Cpath d='M10.3 10.3 15 15' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 15px center;
  color: #fff;
  font: 15px var(--sans);
  transition: background-color 0.15s, border-color 0.15s;
}

.search .input::placeholder {
  color: rgba(235, 242, 249, 0.85);
}

.search .input:focus {
  outline: none;
  border-color: #f3d27a;
  background-color: rgba(12, 22, 40, 0.88);
}

.search-hint {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 5px;
  color: #fff;
  font: 12px/18px var(--sans);
  pointer-events: none;
}

.search .input:focus ~ .search-hint {
  display: none;
}

/* inputs and selects: one height, radius and focus ring site-wide */
.input,
.filter input[type="text"],
.filter input[type="number"],
.filter input[type="search"],
.filter select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid #b9c8d6;
  border-radius: 8px;
  background: #fff;
  color: #1d2b38;
  font: 14px/1.2 var(--sans);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus,
.filter input:focus,
.filter select:focus {
  outline: none;
  border-color: var(--tab-gold);
  box-shadow: 0 0 0 3px rgba(216, 178, 90, 0.35);
}

.btn,
/* buttons: primary navy, secondary outline (.button-light / .button-outline), reset actions as text links */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 18px;
  border: 1px solid var(--bar-3);
  border-radius: 8px;
  background: var(--bar-3);
  color: #fff;
  font: bold 13px var(--sans);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover,
.button:hover {
  border-color: var(--bar-dark);
  background: var(--bar-dark);
  color: #fff;
}

.button:focus-visible {
  outline: 3px solid rgba(216, 178, 90, 0.6);
  outline-offset: 2px;
}

.button-light,
.button-outline {
  border-color: #9fb3c7;
  background: #fff;
  color: var(--bar-dark);
}

.button-light:hover,
.button-outline:hover {
  border-color: var(--bar-3);
  background: #eef3f8;
  color: var(--bar-dark);
}

/* tab bar: the old blue menu strip as tile-like tabs (icon, label, record counter) + tile dropdown groups.
   every tab keeps the same box in every state: highlight is drawn with background and inset shadows only */
.main-menu {
  position: sticky;
  top: 0;
  z-index: 60;
  width: 100%;
  max-width: var(--site-max);
  margin: 0 auto;
  background: linear-gradient(#24496f, var(--bar-dark) 60%, #1b3b5c);
  border-top: 1px solid rgba(243, 210, 122, 0.55);
  box-shadow: inset 0 8px 14px -10px rgba(243, 190, 100, 0.35), 0 2px 10px rgba(10, 25, 45, 0.25);
}

.main-menu .menu {
  display: flex;
  align-items: stretch;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 4px 6px;
  list-style: none;
  position: relative;
}

.main-menu .menu > li {
  position: relative;
  display: flex;
  flex: 1 1 auto;
}

.main-menu .menu > li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.main-menu .menu > li > a,
.main-menu summary {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  margin: 0 2px;
  padding: 0 12px;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s, box-shadow 0.15s, color 0.15s;
}

.main-menu .mi {
  flex: none;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 6px;
  background: #1c3a58;
  transition: border-color 0.15s;
}

.main-menu .mt {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.main-menu .ml {
  font: bold 14px var(--sans);
}

.main-menu .mc {
  margin-top: 2px;
  color: #d7e4f0;
  font-size: 11px;
}

.main-menu summary {
  list-style: none;
}

.main-menu summary::-webkit-details-marker {
  display: none;
}

.main-menu summary::after {
  content: "";
  margin-left: 1px;
  border: 4px solid transparent;
  border-top-color: currentColor;
  border-bottom: 0;
  opacity: 0.75;
  transition: transform 0.15s;
}

.main-menu details[open] > summary::after {
  transform: rotate(180deg);
}

/* tab states share the header palette: the blue bar + the logo gold (--tab-gold).
   hover lifts the tab with a lighter blue; the current section and an open group sit in a darker inset slot
   with a gold top edge and gold text. every state keeps the same box: only background, shadows, colour and filter change */
.main-menu .menu > li > a:hover,
.main-menu summary:hover {
  background: rgba(120, 170, 220, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: #fff;
}

.main-menu .menu > li > a:hover .mi,
.main-menu summary:hover .mi {
  border-color: rgba(255, 255, 255, 0.85);
}

.main-menu .menu > li.current > a,
.main-menu .menu > li.current > details > summary,
.main-menu details[open] > summary {
  background: rgba(8, 22, 40, 0.38);
  box-shadow:
    inset 0 3px 0 var(--tab-gold),
    inset 0 4px 0 rgba(216, 178, 90, 0.5),
    inset 0 10px 12px -8px rgba(216, 178, 90, 0.3),
    inset 0 4px 10px rgba(0, 0, 0, 0.5),
    0 1px 0 rgba(255, 255, 255, 0.12);
  color: #f3d27a;
}

.main-menu .menu > li.current .mi,
.main-menu details[open] > summary .mi {
  border-color: var(--tab-gold);
  filter: brightness(1.1) drop-shadow(0 0 3px rgba(216, 178, 90, 0.35));
}

.main-menu .menu > li.current .mc,
.main-menu details[open] > summary .mc {
  color: #e6d6ad;
}

.main-menu .menu > li > a:focus-visible,
.main-menu summary:focus-visible {
  outline: 2px solid var(--tab-gold-ring);
  outline-offset: -2px;
}

.main-menu details {
  display: flex;
  flex: 1 1 auto;
}

.main-menu .dd-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(2, minmax(210px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 12px;
  list-style: none;
  background: #f6f9fc;
  border: 1px solid rgba(160, 182, 204, 0.7);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(10, 28, 48, 0.32), 0 2px 6px rgba(10, 28, 48, 0.12);
}

/* caret pointing up at the opened tab (its arrow sits at the right end of the tab) */
.main-menu .dd-menu::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 26px;
  width: 12px;
  height: 12px;
  background: rgba(246, 249, 252, 0.98);
  border-top: 1px solid rgba(160, 182, 204, 0.7);
  border-left: 1px solid rgba(160, 182, 204, 0.7);
  transform: rotate(45deg);
}

.main-menu .dd-tools,
.main-menu .dd-archive {
  grid-template-columns: repeat(3, minmax(190px, 1fr));
}

.main-menu .mini-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid #dde5ed;
  background: #fff;
  color: #1c2f44;
  text-decoration: none;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.main-menu .mini-tile img {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #abb9c7;
}

.main-menu .mini-tile .mt-name {
  display: block;
  font: bold 13px/1.2 var(--sans);
  color: #1c2f44;
}

.main-menu .mini-tile .mt-count {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.main-menu .mini-tile:hover {
  border-color: rgba(190, 150, 60, 0.55);
  box-shadow: 0 4px 12px rgba(16, 42, 68, 0.16);
}

.main-menu .mini-tile:focus-visible {
  outline: 2px solid #b38a2e;
  outline-offset: 1px;
}

.main-menu .mini-tile.is-current {
  border-color: rgba(190, 150, 60, 0.55);
  box-shadow: inset 4px 0 0 var(--tab-gold);
}

.menu-backdrop {
  display: none;
}

/* content area: the old white frame, full width */
.content {
  width: calc(100% - 30px);
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 20px 22px 50px;
  background: #fff;
  border-radius: 0 0 8px 8px;
  min-width: 0;
}

.content:focus {
  outline: none;
}

/* footer like aidb's: a brand block (wordmark, years, counter) and the copyright text, in the lwdb palette */
.footer {
  width: 100%;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 30px 30px;
  color: #33475a;
  font-size: 12px;
}

.footer-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px 28px;
  align-items: start;
  padding-top: 22px;
  border-top: 2px solid var(--tab-gold);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-logo {
  font: bold 26px/1 var(--display);
  letter-spacing: 0.04em;
  color: var(--bar-3);
  text-decoration: none;
}

.footer-logo:hover {
  color: var(--bar-dark);
}

.footer p {
  margin: 0 0 3px;
}

.footer-title {
  color: var(--heading);
  font-weight: bold;
  font-size: 13px;
}

.footer-text a {
  color: var(--bar-3);
}

.footer-legal {
  color: var(--muted);
}

/* ------------------------------------------------------------------ */
/* building blocks: breadcrumbs, cards, toc, filter box, feed           */
/* ------------------------------------------------------------------ */

/* compact breadcrumbs above the page title */
ol.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0.45em;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  font: 13px/1.4 var(--sans);
  color: var(--muted);
}

ol.breadcrumbs li + li::before {
  content: "\203a";
  margin-right: 0.45em;
  color: #9aa8b6;
}

ol.breadcrumbs a {
  color: #2f5a85;
  text-decoration: none;
}

ol.breadcrumbs a:hover {
  color: var(--link);
  text-decoration: underline;
}

ol.breadcrumbs [aria-current] {
  color: var(--heading);
}

.card {
  background: #fff;
  border: 1px solid var(--menu-border);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 0 18px;
  min-width: 0;
}

/* section titles: slate serif with a short gold bar on the left */
.card-title {
  margin: 0 0 12px;
  padding-left: 11px;
  border-left: 3px solid var(--tab-gold);
  font: normal 21px/1.25 var(--display);
  color: var(--heading-2);
}

.card .table-wrap:last-child,
.card table:last-child,
.card p:last-child {
  margin-bottom: 0;
}

.obj-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 16px 20px;
}

.obj-card h1 {
  font: normal 28px/1.2 var(--display);
  color: var(--heading);
  margin: 0;
}

.obj-card .subtitle {
  display: block;
  font-size: 14px;
  font-weight: bold;
  margin-top: 3px;
}

.obj-card img.icon {
  border: 1px solid #fff;
}

.page-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.page-toc a {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 14px;
  background: var(--menu-bg);
  border: 1px solid var(--menu-border);
  color: #000;
  text-decoration: none;
  font-size: 12px;
}

.page-toc a:hover {
  background: var(--bar-3);
  border-color: var(--bar-3);
  color: #fff;
}

.page-title {
  font: normal 30px/1.2 var(--display);
  color: var(--heading);
  margin: 0 0 12px;
}

.filter-box {
  margin: 0 0 18px;
}

.filter-box > summary {
  display: none;
}

.note {
  color: var(--muted);
  font-size: 12px;
}

/* home: news feed */
.feed {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.news-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  background: var(--bar-3);
}

.tag-retro {
  background: #8a5a2b;
}

.tag-site {
  background: #5c6f80;
}

/* 7.5: the news picture spans the column, capped in height */
.news-figure {
  margin: 0 0 16px;
}

.news-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  border-radius: 10px;
}

.news-figure figcaption {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

/* 7.6: articles and news read on the page itself: no card, a large title, 15px body with air */
.reading .page-title {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1.2;
}

.reading .rich {
  font-size: 15px;
  line-height: 1.7;
}

.news-lead-text {
  font-size: 15px;
  font-weight: bold;
}

.ai-note {
  margin-top: 14px;
  font-style: italic;
}

/* comments archive */
.comment {
  display: flex;
  gap: 12px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--menu-bg);
  border: 1px solid #dce5ee;
}

.comment-avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: #ddd;
}

.comment-main {
  min-width: 0;
  flex: 1;
}

.comment-meta {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--muted);
}

.comment-meta b {
  color: #000;
  font-size: 13px;
}

.comment-body blockquote {
  margin: 4px 0;
  padding: 4px 10px;
  border-left: 3px solid #abb9c7;
  background: #fff;
  color: #333;
}

.comments-more > summary {
  cursor: pointer;
  color: var(--link);
  text-decoration: underline;
  margin: 6px 0 10px;
}
/* headings */

/* page titles: slate serif with a gold accent bar under them */
.highlight,
.highlight2 {
  margin: 4px 0 16px;
  padding-bottom: 10px;
  background: linear-gradient(90deg, var(--tab-gold), #ecd393) no-repeat 0 100% / 56px 3px;
  font: normal 30px/1.2 var(--display);
  color: var(--heading);
}

.highlight a {
  font: inherit;
  color: inherit;
}

.gls {
  color: var(--gls);
  margin: 0;
}

.muted {
  color: var(--muted);
}

/* rounded grey-blue panels (the old ltc/rtc corner tables) */

.panel {
  background: var(--panel);
  color: var(--panel-text);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 8px 0;
}

.panel-note {
  padding: 10px;
  text-align: center;
}

.panel img.icon {
  border: 1px solid #fff;
}

.stats {
  border-collapse: collapse;
  width: 100%;
}

.stats th,
.stats td {
  text-align: left;
  vertical-align: top;
  padding: 2px 4px;
}

.stats th {
  width: 50%;
}

.box {
  border: 1px solid #dcdcdc;
  padding: 6px;
}

/* forms (filters) */

.filter {
  display: grid;
  grid-template-columns: minmax(120px, 300px) minmax(0, 1fr);
  gap: 6px 10px;
  align-items: center;
}

.filter label,
.filter .label {
  font-weight: bold;
}

.filter select,
.filter input[type="number"],
.filter input[type="text"] {
  font: 13px var(--sans);
  max-width: 100%;
}

.filter select {
  width: 300px;
}

.filter .narrow {
  width: 70px;
}

.filter .inline {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.filter .inline select {
  width: auto;
}

.filter-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0 0;
}

/* «Очистить фильтр» is a secondary action: a text link, not a second primary button */
.filter-actions .button[data-reset-url] {
  height: auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font-weight: normal;
  text-decoration: underline;
}

.filter-actions .button[data-reset-url]:hover {
  background: none;
  color: var(--link-hover);
  text-decoration: none;
}

/* filter panels (items, mobs, quests): labelled field groups in a responsive grid, small uppercase labels above */
.filter.filter-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 12px 18px;
  align-items: start;
}

.filter-grid .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.filter-grid .field > label,
.filter-grid .field > .label {
  color: #4b5b6b;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.filter-grid .filter-actions {
  align-items: center;
}

.filter-grid .field > select {
  width: 100%;
}

.filter-grid .inline select {
  flex: 1 1 120px;
  min-width: 0;
}

.filter-grid .field-checks {
  justify-content: flex-end;
}

.filter-grid .check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: normal;
}

.filter-grid .filter-actions {
  padding-left: 0;
}

/* data tables: scroll inside their container, sticky name column */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 10px 0;
}

/* data tables: a rounded navy header bar (sticky under the stuck tab bar on wide screens), soft row lines,
   bold names without underline, the English name muted under it, tabular numbers */
.data {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  line-height: 1.3;
}

.data th {
  padding: 7px 8px;
  background: var(--bar-dark);
  color: #fff;
  font: bold 11px/1.2 var(--sans);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
}

.data thead tr:last-child th:first-child {
  border-radius: 10px 0 0 10px;
}

.data thead tr:last-child th:last-child {
  border-radius: 0 10px 10px 0;
}

.data th abbr {
  text-decoration: none;
}

.data th.th-name {
  width: 40%;
  text-align: left;
}

.data td {
  padding: 7px 8px;
  border-bottom: 1px solid #e8edf2;
  text-align: center;
  vertical-align: middle;
}

.data .num,
.data td.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.data tbody tr:hover td {
  background-color: #f4f8fb;
}

.data td.name,
.data th.left,
.data td.left {
  text-align: left;
}

.data td.name {
  min-width: 170px;
  background-color: var(--frame-bg);
}

.data tbody tr:hover td.name {
  background-color: #f4f8fb;
}

.data td.name > a {
  color: var(--link);
  font-weight: bold;
  text-decoration: none;
}

.data td.name > a:hover {
  text-decoration: underline;
}

.data td.name .en,
.data td.name .gls {
  display: block;
  margin: 1px 0 0;
  color: #6b7a89;
  font-size: 11px;
}

.data td.icon-cell {
  width: 44px;
  padding: 4px;
}

.data .item-desc {
  margin-top: 3px;
  color: #33475a;
  font-size: 12px;
}

/* badges next to names (grade, craft, drop, aggressive, SA...) */
.badges,
.mobile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}

.badges:empty,
.mobile-stats:empty {
  display: none;
}

.badge {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid #d5dee8;
  border-radius: 9px;
  background: #eef3f8;
  color: #33475a;
  font: bold 10px/1.5 var(--sans);
  white-space: nowrap;
}

.badge-craft { background: #fbf1d6; border-color: #e3cb8a; color: #5b4a1e; }
.badge-drop { background: #e3f4e5; border-color: #9fd0a8; color: #1d5a29; }
.badge-spoil { background: #e3eefb; border-color: #9fbfe6; color: #17457c; }
.badge-aggro { background: #fbe9e7; border-color: #e0a59c; color: #8c2b1d; }
.badge-raid { background: #2a1d10; border-color: #b38a2e; color: #f3d27a; }
.badge-sa { background: #eeeaf7; border-color: #b6a8d8; color: #47367a; }

.mobile-stats {
  display: none;
}

/* the header bar sticks under the stuck tab bar when the table fits the page (no inner scroll) */
@media (min-width: 1280px) {
  .table-wrap {
    overflow: visible;
  }

  .data > thead th {
    position: sticky;
    top: var(--sticky-top, 59px);
    z-index: 3;
  }
}

/* phones: the stat columns fold into badges under the name */
@media (max-width: 767px) {
  .data .col-stat {
    display: none;
  }

  .data .mobile-stats {
    display: flex;
  }

  .data td.name {
    min-width: 0;
  }

  .data th.th-name {
    width: 100%;
  }
}

.list-hint {
  margin: -6px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.list-count {
  margin: 0 0 8px;
  color: var(--muted);
}

.list-count b {
  color: var(--heading);
}

.filter-count {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 9px;
  background: var(--tab-gold);
  color: #3d3010;
  font-size: 11px;
}

.sticky-col {
  position: sticky;
  left: 0;
  z-index: 1;
}

.ingredients a {
  display: inline-block;
  margin: 1px;
}

/* the learn levels of a class: one chip bar that sticks under the tab bar while the tables scroll */
.level-nav {
  position: sticky;
  top: var(--sticky-top, 59px);
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 4px 0 12px;
  padding: 8px 0;
  background: #fff;
  border-bottom: 1px solid #e1e8ef;
}

.level-nav-label {
  margin-right: 4px;
  color: #4b5b6b;
  font-weight: bold;
}

.level-nav .chip {
  min-width: 34px;
  padding: 4px 8px;
  text-align: center;
  font-weight: bold;
}

.skills-table {
  scroll-margin-top: 120px;
}

@media (max-width: 1023px) {
  .level-nav {
    top: 0;
  }
}

/* pagination: touch targets >= 40px */

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 10px 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 8px;
  font-size: 13px;
}

.pagination .current {
  font-weight: bold;
  border: 1px solid var(--menu-border);
  background: var(--menu-bg);
}

/* cards with screenshots and maps */

.screenshot {
  display: inline-block;
  border: 1px solid #dcdcdc;
  padding: 6px;
  margin: 0;
}

.map-scroll {
  overflow: auto;
  max-width: 100%;
}

.npc-map {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid #f00;
  background: none;
  line-height: 0;
  cursor: zoom-in;
}

.map-scroll.zoomed .npc-map {
  width: 1359px;
  max-width: none;
  cursor: zoom-out;
}

.npc-map img,
.npc-map svg {
  width: 100%;
  height: auto;
}

.npc-map svg {
  position: absolute;
  inset: 0;
  height: 100%;
}

/* user content (quests, articles, news): legacy HTML */

.rich {
  overflow-wrap: anywhere;
}

.rich img {
  max-width: 100%;
  height: auto;
}

.rich table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.rich ul,
.rich ol {
  padding-left: 25px;
}

/* static guide pages converted from the old PHP */

.static-page table {
  border-collapse: separate;
}

.static-page .tablerow2 {
  background: var(--menu-bg);
  font: bold 14px var(--sans);
  padding: 3px;
}

.static-page .tablerow1 {
  padding: 5px;
}

.static-page .s_bigh,
.s_bigh {
  background: var(--th-blue);
  font: bold 14px Tahoma, var(--sans);
  color: #fff;
  padding: 2px 2px 2px 10px;
}

.static-page .s_tbhdr2,
.static-page .s_tbhdr {
  background: var(--th-bg);
  font: normal 14px Tahoma, var(--sans);
  color: var(--th-text);
  text-align: center;
}

.static-page .ar {
  text-align: right;
}

.static-page .p-2 {
  padding: 2px;
}

.static-page .cP {
  padding: 5px;
}

.static-page .aC {
  text-align: center;
}

.static-page .bR { border-right: 1px solid #21568a; }
.static-page .bL { border-left: 1px solid #21568a; }
.static-page .bB { border-bottom: 1px solid #21568a; }
.static-page .bT { border-top: 1px solid #21568a; }
.static-page .bTL { border-top: 1px solid #21568a; border-left: 1px solid #21568a; }
.static-page .bTR { border-top: 1px solid #21568a; border-right: 1px solid #21568a; }
.static-page .bBL { border-bottom: 1px solid #21568a; border-left: 1px solid #21568a; }
.static-page .bBR { border-bottom: 1px solid #21568a; border-right: 1px solid #21568a; }
.static-page .bTLR { border: 1px solid #21568a; border-bottom: 0; }
/* the third branch of the kamael tree (Inspector, reachable from Trooper / Warder): the old site left it
   dangling; these complete the fork to the right child */
.static-page .bBL2 { border-bottom: 1px solid #21568a; border-left: 1px solid #21568a; }
.static-page .bTLR2 { border-top: 1px solid #21568a; border-right: 1px solid #21568a; }

.static-page .hitline {
  padding: 0 6px;
}

.static-page .tabs {
  text-align: center;
  margin: 8px 0 12px;
}

.static-page .tabs .current {
  font-weight: bold;
}

/* gallery, video */

.picture {
  text-align: center;
  padding: 15px 0;
}

.picture img {
  border: 1px solid #1475b3;
}

/* video page: a large 16:9 player on a dark stage, the facts, description and tags under it */
.video-stage {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  max-width: 960px;
  max-height: 78vh;
  margin: 0 auto 16px;
  border-radius: 12px;
  background: #0b111b;
  overflow: hidden;
}

.video-player,
.video-poster {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0b111b;
}

/* big play button over the poster until playback starts (site.js initVideo) */
.video-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 86px;
  height: 86px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: rgba(27, 59, 92, 0.82);
  cursor: pointer;
  transition: background-color 0.15s, transform 0.15s;
}

.video-play span {
  display: block;
  width: 0;
  height: 0;
  margin-left: 32px;
  border-style: solid;
  border-width: 16px 0 16px 26px;
  border-color: transparent transparent transparent #fff;
}

.video-play:hover,
.video-play:focus-visible {
  background: #c99a3a;
  transform: scale(1.06);
}

.video-unavailable {
  position: absolute;
  bottom: 14px;
  margin: 0;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(11, 17, 27, 0.85);
  color: #fff;
}

.video-meta {
  max-width: 960px;
  margin: 0 auto 16px;
}

.video-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.video-facts span {
  color: var(--muted);
  margin-right: 4px;
}

.video-desc {
  margin: 0 0 10px;
}

.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--menu-bg);
  border: 1px dashed #b0bccb;
  color: var(--muted);
  min-width: 120px;
  min-height: 90px;
  padding: 8px;
  text-align: center;
}

.tag-list a {
  margin-right: 4px;
}

/* emblems: the result card (composite preview, the chosen emblems large, downloads) and a big pixel grid */

.emblems {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.emblem-result {
  position: sticky;
  top: 72px;
}

.emblem-stage {
  display: flex;
  justify-content: center;
  margin: 0 0 12px;
}

.emblem-preview {
  position: relative;
  flex: none;
  width: 230px;
  height: 400px;
  border-radius: 8px;
  background: no-repeat left top;
}

.emblem-preview img {
  position: absolute;
  image-rendering: pixelated;
}

.emblem-chosen {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.emblem-chosen figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.emblem-chosen img {
  image-rendering: pixelated;
  border: 1px solid #abb9c7;
  background: #fff;
}

.emblem-chosen figcaption {
  font-weight: bold;
  color: var(--heading-2);
}

.emblem-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.emblem-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.emblem-search label {
  font-weight: bold;
}

.emblem-search input {
  width: 110px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  font: 15px var(--sans);
}

.emblem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 6px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.emblem-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px 4px;
  border: 1px solid #dde5ed;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  text-decoration: none;
}

.emblem-grid img {
  width: 32px;
  height: 24px;
  image-rendering: pixelated;
}

.emblem-grid-ally img {
  width: 16px;
}

.emblem-grid a:hover,
.emblem-grid a:focus-visible {
  border-color: var(--tab-gold);
  color: var(--heading);
}

.emblem-grid a.selected {
  border-color: #b38a2e;
  background: #fbf1d6;
  color: #5b4a1e;
  font-weight: bold;
}

/* armor fitting */

/* controls on the left, the picture (638x618) on the right; stacked on narrow screens */
.fitting-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 680px);
  gap: 16px;
  align-items: start;
}

.fitting-form .tool-card:last-child {
  margin-bottom: 0;
}

.fitting-preview {
  position: sticky;
  top: 72px;
  margin: 0;
}

.fitting-image {
  display: grid;
  place-items: center;
  min-height: 420px;
  border-radius: 8px;
  background: #e9eef3 no-repeat center / cover;
  color: #33475a;
  text-align: center;
}

.fitting-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.chip-option.is-disabled span {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 1023px) {
  .fitting-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .fitting-preview {
    position: static;
  }
}

/* lightbox (site-wide image viewer) */

.lb-img {
  transform-origin: center center;
  transition: transform 0.12s ease-out;
  touch-action: none;
}

.lb-zoomed .lb-img {
  cursor: grab;
}

.lb-dragging .lb-img {
  cursor: grabbing;
  transition: none;
}

.lb-zoom {
  display: inline-flex;
  gap: 4px;
}

.lb-zoom button {
  width: 34px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: bold 18px/1 var(--sans);
  cursor: pointer;
}

.lb-zoom button:hover,
.lb-zoom button:focus-visible {
  border-color: var(--tab-gold);
  color: #f3d27a;
}

/* maps: thumbnail cards that open in the zoomable lightbox */
.map-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 14px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.map-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid #dde5ed;
  border-radius: 10px;
  background: #fff;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.map-card:hover {
  border-color: rgba(190, 150, 60, 0.55);
  box-shadow: 0 6px 16px rgba(16, 42, 68, 0.16);
}

.map-card a {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #e9e1cf;
  cursor: zoom-in;
}

.map-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-card figcaption {
  padding: 8px 12px;
  font-weight: bold;
  color: var(--heading-2);
}

.static-page h2.highlight2 {
  font-size: 24px;
}

body.lb-open {
  overflow: hidden;
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(12, 22, 34, 0.95);
  color: #eee;
}

.lightbox::backdrop {
  background: transparent;
}

.lb-stage {
  position: absolute;
  inset: 0 0 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 64px;
}

.lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  transition: opacity 0.2s;
}

.lightbox.lb-loading .lb-img {
  opacity: 0.25;
}

.lightbox.lb-loading .lb-stage::after {
  content: "";
  position: absolute;
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #9fc3e6;
  border-radius: 50%;
  animation: lb-spin 0.8s linear infinite;
}

@keyframes lb-spin {
  to {
    transform: rotate(360deg);
  }
}

.lb-status {
  position: absolute;
  max-width: 420px;
  margin: 0;
  color: #ddd;
  text-align: center;
}

.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s;
}

.lb-btn:hover,
.lb-btn:focus-visible {
  background: var(--bar-1);
  outline: none;
}

.lb-close {
  top: 14px;
  right: 14px;
  font-size: 28px;
}

.lb-prev {
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 52px;
  padding: 0 20px;
  background: rgba(0, 0, 0, 0.55);
  font-size: 13px;
}

.lb-caption {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lb-counter {
  color: #aaa;
}

.lb-bar a {
  color: #9fc3e6;
  text-decoration: none;
  white-space: nowrap;
}

.lb-bar a:hover {
  text-decoration: underline;
}

img.zoomable {
  cursor: zoom-in;
}

@media (max-width: 639px) {
  .lb-stage {
    padding: 10px 6px;
  }

  .lb-prev,
  .lb-next {
    top: auto;
    bottom: 64px;
    transform: none;
  }

  .lb-original {
    display: none;
  }
}

/* errors: one card with the big code, the message, a search form and section links */

.error-card {
  max-width: 720px;
  margin: 24px auto 40px;
  padding: 28px 30px 30px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: var(--panel);
  text-align: center;
}

.error-code {
  margin: 0;
  font: bold 96px/1 var(--display);
  color: var(--bar-3);
  letter-spacing: 0.04em;
}

.error-title {
  margin: 6px 0 10px;
  font: normal 28px/1.2 var(--display);
  color: var(--heading);
}

.error-text {
  margin: 0 auto 18px;
  max-width: 560px;
  color: #33475a;
  font-size: 14px;
  line-height: 1.6;
}

.error-search {
  display: flex;
  gap: 8px;
  max-width: 520px;
  margin: 0 auto 14px;
}

.error-search .input {
  flex: 1;
  min-width: 0;
}

.error-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.error-links .chip {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: bold;
}

/* craft block of the item card: recipe chips, a collapsible reagent tree, the sticky base material totals */

.craft-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 12px;
  padding: 4px;
  border-radius: 10px;
  background: var(--menu-bg);
}

.craft-tabs button {
  padding: 6px 14px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: #33475a;
  font: bold 13px var(--sans);
  cursor: pointer;
}

.craft-tabs button[aria-selected="true"] {
  background: #1f3f60;
  color: #f3d27a;
}

.craft-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}

.craft-meta .chip b,
.rc-meta .chip b {
  color: #10263f;
}

.chip-gold {
  background: linear-gradient(#fbf1d6, #f1dfae);
  border-color: #d8b25a;
  color: #5b4a1e;
  font-weight: bold;
}

a.chip-gold:hover {
  background: #f1dfae;
  color: #3d3010;
}

.craft-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

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

.tree-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 6px;
}

.tree-title {
  margin: 0;
  color: #4b5b6b;
  font: bold 12px var(--sans);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tree-tools {
  display: inline-flex;
  gap: 4px;
}

.tree-tools button {
  padding: 4px 10px;
  border: 1px solid var(--menu-border);
  border-radius: 6px;
  background: #fff;
  color: #33475a;
  font: 12px var(--sans);
  cursor: pointer;
}

.tree-tools button:hover {
  border-color: #d8b25a;
  color: #10263f;
}

.rtree {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* nested levels hang off a guide line */
.rtree.nested {
  margin: 0 0 2px 17px;
  padding-left: 14px;
  border-left: 1px solid #d5dee8;
}

.rtree li {
  margin: 0;
}

.rt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 3px 8px 3px 4px;
  border-radius: 7px;
  list-style: none;
}

.rt-row:hover {
  background: #f3f7fa;
}

summary.rt-row {
  cursor: pointer;
}

summary.rt-row::-webkit-details-marker {
  display: none;
}

summary.rt-row::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background: no-repeat center / 8px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M2 1l4 3-4 3z' fill='%23b38a2e'/%3E%3C/svg%3E");
  transition: transform 0.15s;
}

details[open] > summary.rt-row::before {
  transform: rotate(90deg);
}

.rt-leaf::before {
  content: "";
  flex: none;
  width: 14px;
}

.rt-row .icon {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 5px;
}

.rt-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
}

.rt-name .gls {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
}

.rt-qty {
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
}

.rt-qty b {
  padding: 0 8px;
  border-radius: 999px;
  background: var(--menu-bg);
  border: 1px solid var(--menu-border);
  color: #10263f;
  font-size: 12px;
  line-height: 20px;
}

.rt-qty small {
  color: var(--muted);
  font-size: 11px;
}

.craft-raw {
  position: sticky;
  top: 72px;
  padding: 12px 14px;
  border: 1px solid #ecdcb0;
  border-radius: 10px;
  background: #fffaf0;
}

.raw-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.raw-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px dashed #ecdcb0;
  font-size: 13px;
}

.raw-list li:last-child {
  border-bottom: 0;
}

.raw-list .icon {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.raw-name {
  flex: 1;
  min-width: 0;
}

.raw-qty {
  flex: none;
  color: #7a5a10;
}

/* recipe cards (/recipes/, "Рецепт для", search) */

.level-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
}

.level-chips-label {
  margin-right: 4px;
  color: #4b5b6b;
  font-weight: bold;
}

.level-chips .chip {
  min-width: 36px;
  padding: 6px 10px;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
}

.level-chips .chip-accent {
  box-shadow: inset 0 -3px 0 var(--tab-gold);
}

.recipe-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.recipe-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #dde5ed;
  border-radius: 10px;
  background: #fff;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.recipe-card:hover {
  border-color: rgba(190, 150, 60, 0.55);
  box-shadow: 0 4px 12px rgba(16, 42, 68, 0.12);
}

.rc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rc-head .icon {
  flex: none;
  border-radius: 6px;
}

.rc-title {
  min-width: 0;
  font-weight: bold;
}

.rc-title .gls {
  display: block;
  font-weight: normal;
}

.rc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.rc-ings {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rc-ings a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 2px;
  border: 1px solid var(--menu-border);
  border-radius: 6px;
  background: var(--menu-bg);
  color: #10263f;
  font-size: 12px;
  text-decoration: none;
}

.rc-ings a:hover {
  border-color: #d8b25a;
}

.rc-ings .icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

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

  .craft-raw {
    position: static;
  }
}

.npc-title {
  color: #d00;
}

/* class skills navigation */

.race-list {
  margin: 10px 0 0;
  padding-left: 25px;
  font-size: 14px;
  line-height: 1.8;
}

/* converted legacy tables: the data tables of the guide pages get the look of .data
   (row lines, a header row, hover) and a header that sticks under the tab bar on desktop */

.legacy-table {
  border-spacing: 1px;
}

.legacy-table.w100 {
  width: 100%;
}

.static-page .legacy-table:has(> thead),
.static-page .legacy-table.bordered {
  border-collapse: separate;
  border-spacing: 0;
}

.static-page .legacy-table.bordered td,
.static-page .legacy-table.bordered th {
  border: 0;
  border-bottom: 1px solid #e1e8ef;
  padding: 7px 10px;
}

/* the same navy header bar as table.data (sticky only on desktop, where the wrapper does not scroll) */
.static-page .legacy-table > thead th {
  padding: 8px 10px;
  border: 0;
  background: var(--bar-dark);
  color: #fff;
  font: bold 11px/1.3 var(--sans);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: left;
}

.static-page .legacy-table > thead tr:last-child th:first-child {
  border-radius: 10px 0 0 10px;
}

.static-page .legacy-table > thead tr:last-child th:last-child {
  border-radius: 0 10px 10px 0;
}

.static-page .legacy-table > thead th strong,
.static-page .legacy-table > thead th b {
  color: #fff;
}

.static-page .legacy-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.static-page .legacy-table > thead th .aC {
  text-align: left;
}

.static-page .legacy-table > tbody > tr:hover > td {
  background-color: #f6f9fc;
}

.static-page .legacy-table:has(> thead) td {
  border-bottom: 1px solid #edf1f5;
}

.static-page .legacy-table .tablerow1 {
  padding: 6px 8px;
}

/* the tables can stick only when their wrapper does not scroll: desktop widths fit them anyway */
@media (min-width: 1024px) {
  .static-page .table-wrap {
    overflow: visible;
  }

  .static-page .legacy-table > thead th {
    position: sticky;
    top: var(--sticky-top, 59px);
    z-index: 2;
  }
}

/* sets: one card per set (title, items, the set bonus row) in a two-column grid */
.set-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr));
  gap: 14px;
  align-items: start;
}

.set-card {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #dde5ed;
  border-radius: 10px;
  background: #fff;
}

.set-title {
  margin: 0 0 8px;
  padding-left: 10px;
  border-left: 3px solid var(--tab-gold);
  font: normal 18px/1.25 var(--display);
  color: var(--heading-2);
}

.set-card .legacy-table > thead th {
  position: static;
}

.set-card .legacy-table tr:last-child td {
  border-top: 1px solid #e1e8ef;
  background: #fbf6e8;
  color: #5b4a1e;
}

/* race pages: class cards and section titles */
.class-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 560px), 1fr));
  gap: 14px;
  align-items: start;
}

.class-card {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid #dde5ed;
  border-radius: 10px;
  background: #fff;
}

.class-title,
.static-page h2.race-title {
  margin: 0 0 10px;
  padding-left: 10px;
  border-left: 3px solid var(--tab-gold);
  font: normal 20px/1.25 var(--display);
  color: var(--heading-2);
  text-align: left;
}

.static-page h2.race-title {
  margin-top: 18px;
  font-size: 24px;
}

.class-body {
  font-size: 14px;
  line-height: 1.6;
}

.class-body .float-left {
  margin: 2px 12px 6px 0;
}

.static-page .justify {
  font-size: 14px;
  line-height: 1.65;
}

.static-page .accent {
  color: var(--heading-2);
  font-weight: bold;
}

/* section switchers of the guide pages (grades, shops, clan halls, race pages) */
.chip-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
}

.chip-nav .chip {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: bold;
}

.chip-nav .chip[aria-current] {
  background: var(--bar-3);
  border-color: var(--bar-3);
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--tab-gold);
}

/* the search box above long guide tables (teleports, shops) */
.table-filter {
  position: relative;
  max-width: none;
  margin: 0 0 14px;
}

.table-filter input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Ccircle cx='6.5' cy='6.5' r='5' fill='none' stroke='%235c6b7a' stroke-width='1.6'/%3E%3Cpath d='M10.3 10.3 15 15' stroke='%235c6b7a' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 14px center;
  font: 15px var(--sans);
}

.table-filter input:focus {
  outline: 2px solid var(--tab-gold);
  outline-offset: 1px;
}

.table-filter-empty {
  margin: 0 0 14px;
  color: var(--muted);
}

[data-filter-hidden] {
  display: none !important;
}

.static-page .vt {
  vertical-align: top;
}

.static-page .al {
  text-align: left;
}

.static-page .justify {
  text-align: justify;
}

.static-page .big {
  font-size: larger;
}

.static-page .float-left {
  float: left;
  margin: 0 10px 6px 0;
}

.static-page .float-right {
  float: right;
  margin: 0 0 6px 10px;
}

.static-page h2 {
  margin: 6px 0;
}

.race-tree .legacy-table {
  border-spacing: 0;
}

.race-tree .table-wrap > .legacy-table {
  min-width: 640px;
}

.race-tree td {
  height: 12px;
}

.race-tabs {
  font-size: 14px;
}

.more {
  font-weight: bold;
}

/* ------------------------------------------------------------------ */
/* responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 1359px) {
  .main-menu .menu > li > a .mi,
  .main-menu summary .mi {
    display: none;
  }

  .main-menu .menu > li > a,
  .main-menu summary {
    padding: 0 8px;
  }
}

@media (max-width: 1023px) {
  /* the tab bar becomes a slide-in drawer */
  .main-menu {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 200;
    width: min(320px, 86vw);
    margin: 0;
    border-radius: 0;
    overflow-y: auto;
    background: #fff;
    box-shadow: -4px 0 18px rgba(0, 0, 0, 0.35);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.2s ease, visibility 0.2s;
  }

  .nav-open .main-menu {
    transform: none;
    visibility: visible;
  }

  .nav-open .menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(0, 0, 0, 0.45);
  }

  .main-menu .menu {
    flex-direction: column;
    padding: 10px 0 30px;
  }

  .main-menu .menu > li {
    display: block;
    flex: none;
  }

  .main-menu .menu > li > a,
  .main-menu summary {
    margin: 0;
    flex: none;
    min-height: 50px;
    padding: 0 18px;
    border-radius: 0;
    font-size: 15px;
    color: #1f4a73;
    border-bottom: 1px solid #e1e8ef;
  }

  .main-menu .menu > li > a:hover,
  .main-menu summary:hover {
    color: #10263f;
    background: var(--menu-bg);
    box-shadow: none;
  }

  /* drawer: the current row and an open group in the bar's dark slot with gold text and a gold edge bar */
  .main-menu .menu > li.current > a,
  .main-menu .menu > li.current > details > summary,
  .main-menu details[open] > summary {
    background: #1f3f60;
    color: #f3d27a;
    box-shadow: inset 4px 0 0 var(--tab-gold), inset 0 2px 6px rgba(0, 0, 0, 0.4);
  }

  .main-menu .menu > li.current .mc,
  .main-menu details[open] > summary .mc {
    color: #e6d6ad;
  }

  .main-menu .mi {
    width: 28px;
    height: 28px;
    margin-right: 12px;
    border-color: #abb9c7;
  }

  .main-menu .menu > li + li::before {
    display: none;
  }

  .main-menu .menu > li > a .mi,
  .main-menu summary .mi {
    display: block;
  }

  .main-menu .menu > li > a,
  .main-menu summary {
    justify-content: flex-start;
    gap: 0;
  }

  .main-menu .mt {
    flex: 1;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
  }

  .main-menu .ml {
    font-size: 15px;
  }

  .main-menu .mc {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
  }

  .main-menu summary::after {
    margin-left: auto;
  }

  .main-menu details {
    display: block;
  }

  .main-menu .dd-menu,
  .main-menu .dd-tools,
  .main-menu .dd-archive {
    position: static;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 8px 12px 12px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: var(--menu-bg);
  }

  .main-menu .dd-menu::before {
    display: none;
  }

  .content {
    margin: 0;
    border-radius: 0;
    padding: 16px 14px 40px;
  }

  .footer {
    padding: 0 14px 26px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .filter-box > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--panel);
    font-weight: bold;
    cursor: pointer;
    list-style: none;
  }

  .filter-box > summary::-webkit-details-marker {
    display: none;
  }

  .filter-box > summary::after {
    content: "\25BE";
  }

  .filter-box[open] > summary {
    border-radius: 12px 12px 0 0;
  }

  .filter-box[open] > summary::after {
    content: "\25B4";
  }

  .filter-box .panel {
    margin-top: 0;
    border-radius: 0 0 12px 12px;
  }
}

@media (max-width: 767px) {
  .highlight,
  .highlight2,
  .page-title {
    font-size: 24px;
  }

  ol.breadcrumbs {
    font-size: 12px;
  }

  .panel {
    padding: 12px;
  }

  .obj-card {
    padding: 12px;
  }

  .obj-card h1 {
    font-size: 19px;
  }

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

  .filter select {
    width: 100%;
  }

  .filter-actions {
    padding-left: 0;
  }

  .filter-actions .button {
    height: 40px;
  }

  .stats th {
    width: 45%;
  }

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

  .emblem-result {
    position: static;
  }

  .card {
    padding: 12px;
  }
}

/* very narrow phones: secondary columns of the wide tables are hidden */

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

.suggest mark {
  background: #fff1a8;
  color: inherit;
  padding: 0;
}

.suggest-all a {
  justify-content: center;
  color: var(--link);
  font-weight: bold;
  border-top: 1px solid var(--menu-border);
  border-radius: 0 0 6px 6px;
}

.suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 300;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #fff;
  border: 1px solid #8ea6bd;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(16, 42, 68, 0.25);
  max-height: 70vh;
  overflow-y: auto;
}

.suggest a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  color: #000;
  text-decoration: none;
}

.suggest li.active a,
.suggest a:hover {
  background: var(--menu-bg);
}

.suggest img {
  flex: none;
  border-radius: 4px;
}

.suggest-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.suggest-name {
  color: var(--link);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggest-sub {
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggest-label {
  flex: none;
  color: var(--muted);
  font-size: 11px;
}

/* home: news posts in the style of mmoboom.ru (wide cover, lead, footer) + sidebar */

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.post {
  margin: 0 0 20px;
  padding: 16px 20px;
  border: 1px solid var(--menu-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 42, 68, 0.08);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin-bottom: 6px;
}

.post-source {
  color: var(--muted);
  font-size: 12px;
}

.post-title {
  font: normal 26px/1.25 var(--serif);
  margin: 0 0 10px;
}

.post-title a {
  color: var(--title-blue);
  text-decoration: none;
}

.post-title a:hover {
  text-decoration: underline;
}

.post-cover {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 8 / 3;
  background: var(--menu-bg);
}

.post-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.post:hover .post-cover img {
  transform: scale(1.02);
}

.post-lead {
  margin: 12px 0;
  font-size: 15px;
  line-height: 1.55;
  color: #222;
}

.post-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--menu-border);
  color: var(--muted);
  font-size: 12px;
}

.post-more {
  margin-left: auto;
  font-weight: bold;
  color: var(--title);
  text-decoration: none;
}

.post-more:hover {
  text-decoration: underline;
}

.aside-card {
  padding: 12px 14px;
}

.aside-title {
  font: bold 13px var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--title);
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--menu-border);
}

.home-aside {
  position: sticky;
  top: 12px;
}

.side-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* home sidebar: the "about" card (20 years of the project, thanks to LineageWorld) */
.about-card {
  border: 0;
  border-top: 3px solid #d8b25a;
  background: linear-gradient(160deg, #24496f, #1b3b5c 60%, #142f4a);
  color: #e8eef5;
}

.about-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.about-card .aside-title {
  margin: 0;
  color: #fff;
}

.about-card p {
  margin: 0 0 10px;
  line-height: 1.5;
}

.about-card b {
  color: #f3d27a;
}

.about-badge {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  gap: 2px;
  border: 2px solid #d8b25a;
  border-radius: 50%;
  color: #f3d27a;
  line-height: 1;
}

.about-years {
  font: 700 22px/1 Georgia, serif;
}

.about-years-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.about-sign {
  margin-bottom: 0;
  text-align: right;
  font-style: italic;
  color: #fff;
}

.side-comment time {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.side-comment {
  display: flex;
  gap: 10px;
  padding: 9px 0;
}

.side-comment + .side-comment {
  border-top: 1px dotted var(--menu-border);
}

.side-comment img {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #eee;
}

.side-comment-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0 0 3px;
}

.side-comment-head time {
  display: inline;
  margin: 0;
}

.side-comment-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #222;
  text-decoration: none;
  font-size: 12px;
}

.side-comment-text:hover {
  color: var(--link);
  text-decoration: underline;
}

.side-comment-target {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.post-comments {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  text-decoration: none;
}

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

  .home-aside {
    position: static;
  }
}

@media (max-width: 767px) {
  .post {
    padding: 12px;
  }

  .post-title {
    font-size: 21px;
  }

  .post-cover {
    aspect-ratio: 16 / 9;
  }
}

.ad {
  margin: 0 0 18px;
  text-align: center;
}

.ad-bottom {
  margin: 24px 0 0;
}

.ad ins {
  display: block;
}

.counter {
  margin-top: 8px;
}

/* gallery: tiles with a hover caption (open in the lightbox), detail page on a dark stage */

.gal-head .muted {
  margin: -4px 0 18px;
}

.gal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.gal-tile {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: #1c2b3a;
}

.gal-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s;
}

.gal-tile:hover img,
.gal-tile:focus-visible img {
  transform: scale(1.05);
  filter: brightness(0.85);
}

.gal-over {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 24px 12px 10px;
  background: linear-gradient(transparent, rgba(10, 20, 32, 0.85));
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
}

.gal-tile:hover .gal-over,
.gal-tile:focus-visible .gal-over {
  opacity: 1;
  transform: none;
}

.gal-name {
  overflow: hidden;
  font-size: 13px;
  font-weight: bold;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.gal-meta {
  color: #dde6ee;
  font-size: 11px;
}

@media (hover: none) {
  .gal-over {
    opacity: 1;
    transform: none;
  }
}

.gal-view-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
}

.gal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}

.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--menu-bg);
  border: 1px solid var(--menu-border);
  color: #33475a;
  font-size: 12px;
  text-decoration: none;
}

a.chip:hover {
  background: #dfe8f0;
}

.chip-accent {
  background: var(--bar-3);
  border-color: var(--bar-3);
  color: #fff;
}

a.chip-accent:hover {
  background: var(--bar-dark);
}

.gal-stage {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #111b26;
  text-align: center;
  min-height: 200px;
}

.gal-stage img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 78vh;
  margin: 0 auto;
  cursor: zoom-in;
}

.gal-arrow {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 32px;
  text-decoration: none;
  opacity: 0.8;
}

.gal-arrow:hover,
.gal-arrow:focus-visible {
  opacity: 1;
  background: var(--bar-1);
  color: #fff;
}

.gal-arrow-prev {
  left: 12px;
}

.gal-arrow-next {
  right: 12px;
}

.gal-strip {
  display: flex;
  gap: 8px;
  margin: 12px 0 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.gal-strip a {
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 110px;
  aspect-ratio: 4 / 3;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--menu-bg);
  opacity: 0.7;
  transition: opacity 0.15s, border-color 0.15s;
}

.gal-strip a:hover {
  opacity: 1;
}

.gal-strip a.current {
  border-color: var(--title);
  opacity: 1;
}

.gal-strip img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 639px) {
  .gal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .gal-tile {
    border-radius: 8px;
  }
}

.side-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-gallery a {
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  background: var(--menu-bg);
}

.side-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}

.side-gallery a:hover img {
  transform: scale(1.06);
}

.side-more {
  margin: 8px 0 0;
  text-align: right;
  font-size: 12px;
}

/* icons of the converted tables keep their size in the narrow icon columns */
.legacy-table img {
  max-width: none;
}

.side-comment > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* the off-canvas menu and long words never widen the page */
html,
body {
  overflow-x: clip;
}

@media (max-width: 1023px) {
  .hero {
    height: auto;
  }

  /* phones: art left, wordmark, burger; the search row below */
  .hero-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "art logo burger" "search search search";
    align-items: center;
    column-gap: 12px;
    row-gap: 10px;
    padding: 0 12px 12px 0;
  }

  .hero-art {
    height: clamp(130px, 38vw, 200px);
  }

  .hero-inner > .search {
    justify-self: stretch;
    width: auto;
    margin: 0 0 0 12px;
  }

  .burger {
    justify-self: end;
    align-self: start;
    margin-top: 12px;
  }

  .logo-word {
    font-size: clamp(40px, 12.5vw, 76px);
  }

  .logo-tag {
    margin-top: 6px;
    font-size: clamp(12px, 3.6vw, 19px);
  }

  .burger {
    grid-area: burger;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    padding: 11px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 10px;
    background: rgba(12, 22, 40, 0.78);
    cursor: pointer;
  }

  .burger span {
    display: block;
    height: 3px;
    background: #fff;
    border-radius: 2px;
  }

  .search {
    width: 100%;
  }

  .search .input {
    height: 44px;
    font-size: 16px;
  }

  .search-hint {
    display: none;
  }

  .main-menu .menu {
    padding-left: 0;
  }

  .content {
    width: 100%;
  }
}

/* ------------------------------------------------------------------ */
/* modern tools (soulshot calculator and the fitting rooms)             */
/* ------------------------------------------------------------------ */

.lead-text {
  margin: -4px 0 18px;
  color: #33475a;
  font-size: 14px;
}

.tool-card {
  background: #fff;
  border: 1px solid var(--menu-border);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 16px;
  box-shadow: 0 1px 3px rgba(16, 42, 68, 0.06);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0 16px;
}

.chips,
.grade-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}

.chip-option input,
.grade-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-option span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--menu-border);
  border-radius: 20px;
  background: var(--menu-bg);
  cursor: pointer;
  font-weight: bold;
  color: #33475a;
}

.grade-option span {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 64px;
  padding: 8px 0 6px;
  border: 1px solid var(--menu-border);
  border-radius: 10px;
  background: var(--menu-bg);
  cursor: pointer;
}

.chip-option input:checked + span,
.grade-option input:checked + span {
  border-color: var(--bar-3);
  background: var(--bar-3);
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--gold, #d9b45a);
}

.chip-option input:focus-visible + span,
.grade-option input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.recipe-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(90deg, #f4f8fb, #eaf1f7);
}

.recipe-part {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.recipe-part img {
  border-radius: 6px;
  border: 1px solid #abb9c7;
}

.recipe-op {
  font-size: 20px;
  color: var(--muted);
}

.recipe-result b {
  color: var(--bar-3);
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
}

.field-row label {
  font-weight: bold;
}

.field-row input,
.stepper input {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #8ea6bd;
  border-radius: 8px;
  font: 15px var(--sans);
  text-align: right;
}

.stepper {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
}

.stepper input {
  border-radius: 0;
  text-align: center;
}

.stepper button {
  height: 40px;
  border: 1px solid #8ea6bd;
  background: var(--menu-bg);
  font-size: 18px;
  cursor: pointer;
}

.stepper button:first-child {
  border-radius: 8px 0 0 8px;
  border-right: 0;
}

.stepper button:last-child {
  border-radius: 0 8px 8px 0;
  border-left: 0;
}

.field-more summary {
  cursor: pointer;
  color: var(--link);
  margin: 8px 0;
}

.result-card {
  background: linear-gradient(180deg, #fff, #f6f9fc);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin: 0;
}

.result-grid div {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--menu-bg);
}

.result-grid dt {
  color: var(--muted);
  font-size: 12px;
}

.result-grid dd {
  margin: 2px 0 0;
  font: bold 18px var(--sans);
  font-variant-numeric: tabular-nums;
}

.result-grid .result-main {
  background: var(--bar-3);
  color: #fff;
}

.result-grid .result-main dt {
  color: #d7e4f0;
}

.result-grid .result-main dd {
  font-size: 22px;
}

.tool-actions {
  margin: 12px 0 0;
}

.reset-link {
  margin-left: 10px;
  color: var(--link);
}

.reset-link:hover {
  color: var(--link-hover);
  text-decoration: none;
}

@media (max-width: 639px) {
  .field-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .grade-option span {
    width: 54px;
  }
}

/* 5.7: archive comments of a gallery picture in the lightbox: a right panel, a bottom sheet on phones */
.lb-side {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 52px;
  width: 380px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  border-left: 1px solid rgba(216, 178, 90, 0.45);
  background: #f4f7fb;
  color: #1c2f44;
  font-size: 13px;
}

.lightbox.lb-has-side .lb-stage {
  right: 380px;
}

.lightbox.lb-has-side .lb-next {
  right: 392px;
}

.lightbox.lb-has-side .lb-close {
  right: 394px;
}

.lb-comments-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--heading-2, #24405e);
}

.lb-side .lb-comments-head a {
  color: #2f5a85;
  font-size: 12px;
}

.lb-comments-empty {
  color: var(--muted);
}

.lb-side .comment {
  margin: 0 0 8px;
  background: #fff;
  border: 1px solid #dde5ed;
}

@media (max-width: 899px) {
  .lb-side {
    top: auto;
    left: 0;
    bottom: 0;
    width: auto;
    height: 42vh;
    border-left: 0;
    border-top: 1px solid rgba(216, 178, 90, 0.45);
  }

  .lightbox.lb-has-side .lb-stage {
    right: 0;
    bottom: calc(42vh + 52px);
  }

  .lightbox.lb-has-side .lb-next {
    right: 12px;
  }

  .lightbox.lb-has-side .lb-close {
    right: 14px;
  }

  .lightbox.lb-has-side .lb-bar {
    bottom: 42vh;
  }

  .lightbox.lb-has-side .lb-prev,
  .lightbox.lb-has-side .lb-next {
    top: calc((100vh - 42vh - 52px) / 2);
  }
}

/* internal linking blocks (similar items, NPCs nearby, quests of the same level) */
.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 6px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 8px;
  border-radius: 8px;
  text-decoration: none;
}

.related-list a:hover {
  background: #f3f7fa;
}

.related-list .icon {
  flex: none;
  border-radius: 4px;
}

.related-name {
  display: block;
  color: var(--link);
}

.related-list a:hover .related-name {
  text-decoration: underline;
}

.related-sub {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

/* ------------------------------------------------------------------ */
/* detail pages (item, NPC, ...): main cards on the left, a sticky navy  */
/* summary card and the «На странице» nav with scrollspy on the right    */
/* ------------------------------------------------------------------ */

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  grid-template-areas: "main aside";
  gap: 22px;
  align-items: start;
}

.detail-main {
  grid-area: main;
  min-width: 0;
}

.detail-aside {
  grid-area: aside;
  position: sticky;
  top: 72px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.detail .obj-card {
  display: block;
  margin: 0;
  padding: 16px;
  border: 1px solid #1d3d5e;
  border-radius: 12px;
  background: linear-gradient(160deg, #24496f 0%, #1b3b5c 55%, #142f4b 100%);
  color: #dfe8f1;
}

.obj-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
}

.obj-card-head > .icon,
.obj-card-head > img {
  flex: none;
  width: 56px;
  height: 56px;
  padding: 3px;
  border: 1px solid #b38a2e;
  border-radius: 8px;
  background: #0e2238;
  object-fit: cover;
}

.obj-card-head > .obj-thumb {
  height: 64px;
}

.detail .obj-card .name {
  margin: 0;
  color: #fff;
  font: bold 20px/1.2 var(--display);
}

.detail .obj-card .name-en {
  display: block;
  margin-top: 3px;
  color: #b9c8d8;
  font-size: 12px;
}

.obj-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 10px;
}

.badge-level {
  background: #f3d27a;
  border-color: #d8b25a;
  color: #3d3010;
}

.detail .obj-card .facts {
  margin: 0;
  padding: 8px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  list-style: none;
}

.detail .obj-card .facts li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.12);
  font-size: 13px;
}

.detail .obj-card .facts li:last-child {
  border-bottom: 0;
}

.detail .obj-card .facts span {
  color: #b9c8d8;
}

.detail .obj-card .facts b {
  color: #fff;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.copy-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  padding: 8px 12px;
  border: 1px dashed #b38a2e;
  border-radius: 8px;
  background: rgba(243, 210, 122, 0.08);
  color: #f3d27a;
  font: 13px/1.3 var(--sans);
  cursor: pointer;
}

.copy-link code {
  overflow-wrap: anywhere;
  color: #fff;
  font: bold 13px/1.3 Consolas, "Courier New", monospace;
  text-align: left;
}

.copy-link span {
  flex: none;
  font-size: 11px;
}

.copy-link:hover,
.copy-link:focus-visible {
  border-color: #f3d27a;
  background: rgba(243, 210, 122, 0.16);
}

.copy-link.copied span {
  color: #9be29b;
}

.toc-side {
  padding: 10px 6px;
  border: 1px solid #dde5ed;
  border-radius: 12px;
  background: #fff;
}

.toc-title {
  margin: 0 0 4px;
  padding: 0 10px;
  color: #5c6b7a;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.toc-side .page-toc {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.toc-side .page-toc a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-left: 3px solid transparent;
  border-radius: 6px;
  color: #33475a;
  font-size: 13px;
  text-decoration: none;
}

.toc-side .page-toc a:hover {
  background: #f4f8fb;
  color: var(--heading);
}

.toc-side .page-toc a.active {
  border-left-color: var(--tab-gold);
  background: #fbf6e8;
  color: var(--heading);
  font-weight: bold;
}

.toc-side .count,
.card-title .count {
  color: #6b7a89;
  font: normal 12px var(--sans);
}

.detail-main .card {
  scroll-margin-top: 76px;
}

.detail-main #comments {
  scroll-margin-top: 76px;
}

.obj-desc {
  font-size: 14px;
  line-height: 1.6;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 300;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 10px;
  background: #142f4b;
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* NPC abilities: icon + name chips (race / weak points link to the mob filter) */
.ability-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ability-chips a,
.ability-chips .ability-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 3px;
  border: 1px solid #dde5ed;
  border-radius: 8px;
  background: #fff;
  color: #1c2f44;
  font-size: 13px;
  text-decoration: none;
}

.ability-chips a:hover {
  border-color: var(--tab-gold);
}

.ability-chips .icon {
  border-radius: 5px;
}

.link-list {
  margin: 0;
  padding-left: 18px;
}

.link-list li {
  margin: 3px 0;
}

/* phones and tablets: the summary first, no aside nav */
@media (max-width: 1023px) {
  .detail {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "aside" "main";
  }

  .detail-aside {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .toc-side {
    display: none;
  }
}

/* drop / spoil: sortable header cells, a sticky head on desktop, the chance bar under the value */
.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.sort-btn::after {
  content: "\2195";
  color: #8a99a8;
  font-size: 11px;
}

th[aria-sort="ascending"] .sort-btn::after {
  content: "\25B2";
  color: #b38a2e;
}

th[aria-sort="descending"] .sort-btn::after {
  content: "\25BC";
  color: #b38a2e;
}

.sort-btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.chance-cell {
  min-width: 120px;
}

.chance-bar {
  display: block;
  width: var(--w, 0%);
  height: 5px;
  margin: 0 0 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #d8b25a, #b38a2e);
}

.chance-text {
  font-variant-numeric: tabular-nums;
}

@media (min-width: 1024px) {
  .table-wrap-sticky {
    overflow: visible;
  }

  .table-wrap-sticky .drops-table > thead th {
    position: sticky;
    top: var(--sticky-top, 59px);
    z-index: 2;
  }
}

.map-hint {
  margin: 6px 0 0;
  font-size: 12px;
}

/* hover tooltips of item / skill / NPC links (static/js/tooltips.js, /api/tooltip/...) */
.tooltip {
  position: fixed;
  z-index: 500;
  width: max-content;
  max-width: min(340px, calc(100vw - 24px));
  padding: 10px 12px;
  border: 1px solid #2f5a85;
  border-radius: 10px;
  background: #142a42;
  color: #e3ebf3;
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
}

.tooltip .tt-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tooltip .tt-head .icon {
  flex: none;
  border: 1px solid #5d7894;
  border-radius: 6px;
}

.tooltip .tt-name {
  display: block;
  color: #fff;
  font-size: 14px;
}

.tooltip .tt-en {
  display: block;
  color: #a9bccf;
  font-size: 11px;
}

.tooltip .tt-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 8px 0 0;
}

.tooltip .tt-badge {
  padding: 1px 8px;
  border: 1px solid #3f6489;
  border-radius: 999px;
  background: #1c3a58;
  color: #e3ebf3;
  font-size: 11px;
}

.tooltip .tt-badge.grade-s {
  border-color: #d8b25a;
  color: #f3d27a;
}

.tooltip .tt-raid,
.tooltip .tt-aggro {
  border-color: #c96b5e;
  color: #ffb4a8;
}

.tooltip .tt-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 14px;
  margin: 8px 0 0;
}

.tooltip .tt-stats div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.tooltip .tt-stats dt {
  color: #a9bccf;
}

.tooltip .tt-stats dd {
  margin: 0;
  color: #fff;
  font-weight: bold;
  font-variant-numeric: tabular-nums;
}

.tooltip .tt-desc {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #2f4c69;
  color: #cfdae5;
}

/* detail / list fixes: icons keep their size in narrow table columns; the inline NPC map is capped until zoomed */
.data td.icon-cell {
  min-width: 44px;
}

.data td.icon-cell .icon {
  width: 32px;
  height: 32px;
  max-width: none;
}

.detail-main .map-scroll:not(.zoomed) {
  display: flex;
  justify-content: center;
}

.detail-main .map-scroll:not(.zoomed) .npc-map {
  max-width: 440px;
}

/* search page: a big search box, group chips with counts, groups as cards, plain results as link tiles */
.search-page-form {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
}

.search-page-form .input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  font: 16px var(--sans);
}

.search-page-form .button {
  height: 44px;
  padding: 0 20px;
}

.chip-count {
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 9px;
  background: #fff;
  color: var(--heading-2);
  font-size: 11px;
}

.search-group {
  scroll-margin-top: 76px;
}

.search-group .table-wrap {
  margin: 0;
}

.result-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.result-tiles a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: 9px 12px;
  border: 1px solid #dde5ed;
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
}

.result-tiles a:hover {
  border-color: var(--tab-gold);
  background: #fffaf0;
}

.result-tiles .r-name {
  color: var(--link);
  font-weight: bold;
}

.result-tiles .r-sub {
  color: #6b7a89;
  font-size: 11px;
}

.search-group .more {
  margin: 10px 0 0;
}

/* list rows stay compact: the description is clamped to two lines (the full text is in the tooltip / card) */
.data .item-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* the chance bar: a fixed 60px track to the left of the value, centred on the row */
.chance-cell {
  white-space: nowrap;
}

.chance-track {
  display: inline-block;
  width: 60px;
  height: 6px;
  margin-right: 8px;
  overflow: hidden;
  border-radius: 3px;
  background: #e8edf2;
  vertical-align: middle;
}

.chance-track .chance-bar {
  height: 100%;
  margin: 0;
}

/* links in the UI blocks: bold-ish, no underline until hover; long prose keeps underlines */
main.content a {
  text-decoration: none;
}

main.content a:hover {
  text-decoration: underline;
}

.rtree a,
.raw-list a,
.related a,
.result-tiles a .r-name,
.rc-title a,
.link-list a {
  font-weight: 600;
}

.reading .rich a,
.quest-text a,
.static-page .justify a,
.comment-body a {
  text-decoration: underline;
}

/* ------------------------------------------------------------------ */
/* skills (class page, skill detail) and quests (list, detail)         */
/* ------------------------------------------------------------------ */

/* class page header: class name, race chips, the profession path as chips */
.class-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin: 0 0 14px;
  padding: 16px 20px;
  border: 1px solid #1d3d5e;
  border-radius: 12px;
  background: linear-gradient(160deg, #24496f 0%, #1b3b5c 55%, #142f4b 100%);
  color: #dfe8f1;
}

.class-head-main {
  flex: 1 1 360px;
  min-width: 0;
}

.class-head h1 {
  margin: 0;
  color: #fff;
  font: normal 28px/1.2 var(--display);
}

.class-head-race {
  margin: 0 0 4px;
  color: #f3d27a;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.class-head-en {
  margin: 3px 0 12px;
  color: #b9c8d8;
}

.class-head .chip-nav {
  margin: 0;
}

.class-head .chip {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.class-head a.chip:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--tab-gold);
}

.class-head .chip-accent,
.class-head .chip[aria-current] {
  background: var(--tab-gold);
  border-color: var(--tab-gold);
  color: #3d3010;
}

.chip-disabled {
  opacity: 0.55;
  cursor: default;
}

.class-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.class-path .chip {
  padding: 6px 12px;
  font-weight: bold;
}

.skill-level {
  scroll-margin-top: 120px;
}

.skill-level .table-wrap {
  margin-bottom: 0;
}

.skill-desc {
  display: block;
  margin-top: 3px;
  color: #33475a;
  font-size: 12px;
  line-height: 1.45;
}

.badge-active {
  background: #e3eefb;
  border-color: #9fbfe6;
  color: #17457c;
}

.skill-levels tr.is-current td {
  background: #fbf6e8;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* quests: type icons with text labels, the start NPC as a link */
.quest-tags {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.quest-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  white-space: nowrap;
}

.quest-tag img {
  flex: none;
}

.badge.quest-tag {
  font-size: 10px;
}

.quest-req {
  font-size: 12px;
}

.npc-cell {
  text-align: left;
}

.npc-cell a {
  font-weight: 600;
}

.npc-cell .en {
  display: block;
  color: #6b7a89;
  font-size: 11px;
}

.detail .obj-card .facts b.rich {
  max-width: 60%;
  font-weight: bold;
}

.detail .obj-card .facts a {
  color: #f3d27a;
}

.detail .obj-card .obj-badges a.badge {
  text-decoration: none;
}

.quest-text {
  font-size: 14px;
  line-height: 1.65;
}

.quest-reward {
  border-color: #ecdcb0;
  background: #fffaf0;
}

/* ------------------------------------------------------------------ */
/* guide pages (section F): race / village cards, teleport and clan     */
/* hall cards, shop tables, tool polish                                 */
/* ------------------------------------------------------------------ */

.static-page {
  font-size: 14px;
  line-height: 1.6;
}

/* race and village pages: one card per section; screenshots open in the lightbox */
.guide-cards {
  display: grid;
  gap: 14px;
}

.guide-card {
  margin: 0;
  padding: 16px 20px;
  border: 1px solid #dde5ed;
  border-radius: 12px;
  background: #fff;
}

.guide-card h2.race-title {
  margin-top: 0;
}

.guide-card img {
  max-width: 100%;
  height: auto;
}

.guide-shot {
  display: inline-block;
  cursor: zoom-in;
}

.guide-shot img {
  border-radius: 10px;
  border: 1px solid #dde5ed;
}

.guide-card .aC b {
  display: block;
  margin-top: 6px;
  color: var(--heading-2);
  font: normal 18px/1.3 var(--display);
}

/* teleports: a grid of gatekeeper cards */
.tele-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 560px), 1fr));
  gap: 14px;
  align-items: start;
}

.tele-card {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #dde5ed;
  border-radius: 12px;
  background: #fff;
}

.tele-card .table-wrap {
  margin: 0;
}

.tele-card .legacy-table > thead th:first-child {
  text-transform: none;
  font-size: 13px;
}

.tele-card .legacy-table > thead th .aC {
  text-align: left;
}

.tele-card td h3 {
  margin: 4px 0 0;
  color: var(--heading-2);
  font: bold 13px var(--sans);
}

/* special shops and epic jewelry: the item rows read like data tables */
.static-page .legacy-table:has(> thead) td {
  padding: 6px 10px;
  vertical-align: middle;
}

.static-page .legacy-table:has(> thead) td img {
  border-radius: 6px;
}

/* clan halls: a heading and cards (buffs, functions, item creation, the map) */
.hall-title {
  margin: 0 0 12px;
  padding-left: 11px;
  border-left: 3px solid var(--tab-gold);
  font: normal 24px/1.25 var(--display);
  color: var(--heading);
}

.hall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 14px;
  align-items: start;
}

.hall-card {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #dde5ed;
  border-radius: 12px;
  background: #fff;
}

.hall-buffs {
  grid-row: span 2;
}

.hall-sub {
  margin: 0 0 8px;
  color: #4b5b6b;
  font: bold 12px var(--sans);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hall-icons,
.hall-lines {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hall-icons li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid #edf1f5;
}

.hall-icons li:last-child,
.hall-lines li:last-child {
  border-bottom: 0;
}

.hall-icons img {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 5px;
}

.hall-name {
  flex: 1;
  min-width: 0;
  color: #1c2f44;
}

.hall-lines li {
  padding: 4px 0;
  border-bottom: 1px solid #edf1f5;
  color: #1c2f44;
}

.hall-map a {
  display: block;
  cursor: zoom-in;
}

.hall-map img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

@media (max-width: 767px) {
  .map-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .guide-card {
    padding: 12px 14px;
  }

  .static-page .justify {
    text-align: left;
  }

  .hall-buffs {
    grid-row: auto;
  }
}

/* video archive: categories and videos as cards (poster, title, meta, tags) */
.media-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 14px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.media-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dde5ed;
  border-radius: 12px;
  background: #fff;
}

.media-card:hover {
  border-color: rgba(190, 150, 60, 0.55);
}

.media-thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #142f4b;
}

.media-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-thumb .placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  color: #b9c8d8;
}

.media-duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 1px 7px;
  border-radius: 6px;
  background: rgba(10, 20, 34, 0.82);
  color: #fff;
  font: bold 11px/1.6 var(--sans);
}

.media-body {
  padding: 10px 12px 12px;
}

.media-title {
  margin: 0 0 4px;
  font: bold 15px/1.3 var(--sans);
}

.media-meta {
  margin: 0 0 6px;
  color: #6b7a89;
  font-size: 12px;
}

.media-desc {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 6px;
  color: #33475a;
  font-size: 13px;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

.media-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
}
