:root {
  --bg: #080707;
  --bg-soft: #100c0b;
  --panel: rgba(17, 12, 10, 0.9);
  --panel-solid: #15100e;
  --red: #bd2c22;
  --red-bright: #db3b2c;
  --red-deep: #52140f;
  --gold: #c69539;
  --gold-bright: #f0cd76;
  --gold-dim: #8d6b32;
  --teal: #38c6b2;
  --cream: #f2e5c9;
  --text: #d9cab1;
  --muted: #988b7a;
  --line: rgba(194, 145, 55, 0.28);
  --header-height: 72px;
  /* Keep title typography aligned with the Baolv page. */
  --serif: "STKaiti", KaiTi, "Songti SC", SimSun, serif;
  --sans: "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--sans);
  letter-spacing: 0;
  overflow-x: hidden;
}

body.menu-open,
body.modal-open {
  overflow: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: fixed;
  z-index: 1000;
  inset: 0 0 auto 0;
  height: var(--header-height);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 0 3vw;
  background: rgba(4, 4, 5, 0.78);
  border-bottom: 1px solid rgba(176, 112, 36, 0.24);
  backdrop-filter: blur(14px);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
  background: rgba(5, 5, 6, 0.96);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.38);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 12px;
  min-width: 0;
}

.brand-seal {
  display: block;
  width: clamp(180px, 19vw, 220px);
  height: 72px;
  flex: 0 1 auto;
  object-fit: contain;
}

.brand > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand strong {
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 18px;
  white-space: nowrap;
}

.brand small {
  color: #a98447;
  margin-top: 2px;
  font-family: Georgia, serif;
  font-size: 11px;
  letter-spacing: 2px;
  white-space: nowrap;
}

.desktop-nav {
  position: relative;
  left: -50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  padding: 0 4px;
  width: 100%;
  min-width: 0;
  height: 100%;
}

.desktop-nav a {
  position: relative;
  display: grid;
  place-items: center;
  height: 100%;
  color: #fff1c7;
  font-family: FangSong, "仿宋", SimSun, serif;
  font-size: 14px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 1), 0 0 9px rgba(198, 149, 57, 0.62);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 0;
  height: 3px;
  background: #f0bd4e;
  box-shadow: 0 0 8px rgba(240, 189, 78, 0.72);
  transform: translateX(-50%);
  transition: width 0.2s ease, box-shadow 0.2s ease;
}

.desktop-nav a:nth-child(5)::before,
.desktop-nav a:nth-child(9)::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -7px;
  width: 1px;
  height: 18px;
  background: rgba(240, 189, 78, 0.38);
  transform: translateY(-50%);
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: #ffe083;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 1), 0 0 12px rgba(240, 189, 78, 0.88);
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
  width: 100%;
  box-shadow: 0 0 12px rgba(240, 189, 78, 0.9), 0 0 24px rgba(240, 189, 78, 0.42);
}

.header-actions {
  justify-self: end;
  display: flex;
  gap: 10px;
}

@media (max-width: 1500px) {
  .brand > span:last-child {
    display: none;
  }

  .desktop-nav {
    gap: 8px;
  }

  .desktop-nav a {
    font-size: 13px;
  }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 22px;
  color: #fff6dd;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0;
  transition: transform 0.2s ease, filter 0.2s ease, border-color 0.2s ease;
}

.button:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
}

.button-small {
  min-height: 38px;
  padding: 0 17px;
  font-size: 13px;
}

.button-large {
  min-width: 0;
  min-height: 60px;
  width: 100%;
  font-size: 17px;
}

.button-red {
  background: #bb241c;
  border-color: #e85c44;
  box-shadow: 0 12px 30px rgba(150, 24, 17, 0.3);
}

.button-gold {
  color: #fff0c5;
  background: #694311;
  border-color: #b98126;
  box-shadow: 0 12px 30px rgba(124, 76, 12, 0.22);
}

.button-dark {
  color: var(--gold-bright);
  background: rgba(10, 7, 10, 0.76);
  border-color: #7c5126;
}

.mobile-header-logo {
  display: none;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: transparent;
  border: 1px solid rgba(198, 149, 57, 0.45);
  border-radius: 4px;
  cursor: pointer;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--gold-bright);
}

.mobile-menu,
.menu-backdrop {
  display: none;
}

.hero {
  position: relative;
  min-height: 920px;
  overflow: hidden;
  background: #080707;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-image {
  background-image: url("assets/官方首页.webp");
  background-position: center;
  background-size: cover;
  transform: scale(1.015);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(4, 5, 7, 0.96) 0%, rgba(4, 5, 7, 0.78) 28%, rgba(7, 5, 6, 0.18) 58%, rgba(4, 4, 5, 0.28) 100%),
    linear-gradient(0deg, #080707 0%, transparent 23%, rgba(0, 0, 0, 0.22) 100%);
}

.page-corners {
  position: absolute;
  z-index: 10;
  inset: calc(var(--header-height) + 14px) 15px 18px;
  color: #9f772c;
  pointer-events: none;
  background:
    linear-gradient(currentColor 0 0) left top / 34px 1px,
    linear-gradient(currentColor 0 0) left top / 1px 34px,
    linear-gradient(currentColor 0 0) right top / 34px 1px,
    linear-gradient(currentColor 0 0) right top / 1px 34px,
    linear-gradient(currentColor 0 0) left bottom / 34px 1px,
    linear-gradient(currentColor 0 0) left bottom / 1px 34px,
    linear-gradient(currentColor 0 0) right bottom / 34px 1px,
    linear-gradient(currentColor 0 0) right bottom / 1px 34px;
  background-repeat: no-repeat;
}

.hero-inner {
  position: relative;
  z-index: 3;
  width: min(1240px, calc(100% - 72px));
  min-height: 900px;
  margin: 0 auto;
  padding: 165px 0 110px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(400px, 0.85fr);
  align-items: center;
  gap: 80px;
}

.live-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 17px;
  color: #5ce1cf;
  background: rgba(15, 42, 40, 0.62);
  border: 1px solid rgba(56, 198, 178, 0.55);
  border-radius: 18px;
  font-size: 14px;
  font-weight: 700;
}

.live-status span {
  width: 8px;
  height: 8px;
  background: #55edd8;
  border-radius: 50%;
  box-shadow: 0 0 12px #55edd8;
}

.online-status {
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 30px;
  color: #fff0b7;
  background: rgba(65, 24, 12, 0.84);
  border: 1px solid rgba(239, 181, 66, 0.78);
  border-radius: 35px;
  box-shadow: 0 0 24px rgba(210, 112, 31, 0.26);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 0 #5c2c12;
}

.online-status > span {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  background: #46e36f;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(70, 227, 111, 0.78);
}

.online-status strong {
  display: inline;
  position: static;
  min-width: 3ch;
  color: #f3ce68;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  text-shadow:
    0 1px 0 #7d3b0e,
    0 0 5px rgba(255, 211, 91, 0.32);
}

.hero-brand-logo {
  display: block;
  width: min(100%, 560px);
  height: auto;
  margin: 0 0 22px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.36));
}

.hero-brand-logo + .online-status {
  margin-bottom: 25px;
}

.hero-kicker {
  margin: 25px 0 4px;
  color: #d29a32;
  font-family: var(--serif);
  font-size: 22px;
}

.hero h1 {
  margin: 0;
  color: #ffe8a7;
  font-family: var(--serif);
  font-size: 106px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 3px 0 #7e4a18, 0 10px 35px rgba(204, 83, 24, 0.35);
}

.hero-subtitle {
  margin: 0 0 22px 8px;
  color: #bfa06b;
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 700;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.hero-tags span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: #61d6c8;
  background: rgba(17, 40, 39, 0.72);
  border: 1px solid rgba(56, 198, 178, 0.4);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--serif);
  white-space: nowrap;
}

.hero-tags .tag-teal {
  color: #61d6c8;
  border-color: rgba(56, 198, 178, 0.4);
  background: rgba(17, 40, 39, 0.72);
}

.hero-description {
  max-width: 600px;
  margin: 0;
  color: #c7b49c;
  font-size: 15px;
  line-height: 2;
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 29px;
}

.hero-notices {
  display: grid;
  gap: 12px;
}

.notice-card {
  padding: 17px 20px;
  background: rgba(9, 8, 7, 0.88);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.27);
  backdrop-filter: blur(10px);
}

.notice-card h2 {
  margin: 0 0 10px;
  padding-bottom: 9px;
  font-family: var(--serif);
  font-size: 16px;
  border-bottom: 1px solid rgba(198, 149, 57, 0.25);
}

.notice-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notice-card li,
.notice-card p {
  position: relative;
  margin: 7px 0;
  color: #c8b599;
  font-size: 12px;
  line-height: 1.55;
}

.notice-card li {
  padding-left: 13px;
}

.notice-card li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--gold);
}

.notice-red {
  background: rgba(45, 10, 8, 0.83);
  border-color: rgba(181, 49, 38, 0.45);
}

.notice-red h2 {
  color: #e89483;
  border-color: rgba(181, 49, 38, 0.45);
}

.notice-gold h2 {
  color: #f1d48d;
}

.notice-teal {
  background: rgba(4, 30, 30, 0.82);
  border-color: rgba(56, 198, 178, 0.35);
}

.notice-teal h2 {
  color: #65ddcf;
  border-color: rgba(56, 198, 178, 0.3);
}

.notice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.compact-notice p {
  margin: 5px 0;
}

.page-next {
  position: absolute;
  z-index: 20;
  bottom: 14px;
  left: 50%;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 132px;
  min-width: 0;
  height: 46px;
  padding: 0;
  color: #f1d48d;
  background: transparent;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
  transform: translateX(-50%);
  transition: color 0.2s ease;
}

.page-next:hover,
.page-next:focus-visible {
  color: #fff0b5;
  transform: translateX(-50%);
}

.page-next:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.page-next .page-next-label {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.16em;
}

.page-next .page-next-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 18px;
  flex: 0 0 18px;
}

.page-next svg {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
  transition: transform 180ms ease;
}

.page-next:hover svg {
  transform: translateY(2px);
}

.page-next-home:hover svg {
  transform: translateY(-2px);
}

/* Leave a separate row for exploration below the sect controls. */
#classes .sect-preview-controls {
  bottom: 78px;
}

@media (max-width: 760px) {
  #classes .sect-preview-controls {
    bottom: 64px;
  }

  #classes .sect-preview-mobile-picker {
    bottom: 116px;
  }

  #classes .sect-preview-info-copy {
    bottom: 232px;
  }
}

.button-rate {
  color: #8ff1e6;
  background: linear-gradient(180deg, rgba(31, 88, 80, 0.96), rgba(13, 55, 51, 0.96));
  border-color: rgba(97, 214, 200, 0.68);
  font-family: var(--sans);
}

.button-rate:hover {
  color: #d9fffa;
  background: linear-gradient(180deg, rgba(43, 117, 106, 0.98), rgba(18, 74, 68, 0.98));
}

.hero-tags .tag-query {
  font-family: var(--serif);
}

/* Section-local layers: color, glow and speed can be overridden on each layer. */
.ember-field {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.ember-field span {
  position: absolute;
  bottom: -12px;
  left: var(--x);
  width: var(--size);
  height: var(--size);
  opacity: 0;
  background: var(--ember-color, #ff3b30);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--ember-glow, rgba(255, 45, 30, 0.85));
  animation: emberFloat calc(var(--duration) * var(--ember-speed, 1)) linear var(--delay) infinite;
}

/* Layered flame particles: bright core, tapered trail and gentle glow. */
.ember-field--flame-particles { z-index: 3; }

.ember-field--flame-particles span {
  top: calc(100% + 24px);
  bottom: auto;
  width: var(--size);
  height: var(--size);
  background: none;
  box-shadow: none;
  border-radius: 0;
  animation: flameParticleRise calc(var(--duration) * var(--ember-speed, 1)) linear var(--delay) infinite;
}

.ember-field--flame-particles span::before,
.ember-field--flame-particles span::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.ember-field--flame-particles span::before {
  top: 18%;
  left: -18%;
  width: 136%;
  height: var(--tail);
  border-radius: 35% 50% 75% 30% / 15% 25% 85% 75%;
  background:
    radial-gradient(ellipse at 48% 10%, var(--flame-core), var(--flame-middle) 22%, transparent 65%),
    linear-gradient(to bottom, var(--flame-middle), var(--flame-edge) 38%, transparent 95%);
  filter: blur(.7px);
  transform-origin: 50% 0;
  animation: flameParticleBreathe var(--pulse) ease-in-out var(--delay) infinite alternate;
}

.ember-field--flame-particles span::after {
  inset: -10% 0 -25%;
  border-radius: 45% 55% 55% 45%;
  background: radial-gradient(ellipse at 45% 28%, var(--flame-core) 8%, var(--flame-middle) 38%, var(--flame-edge) 58%, transparent 82%);
  box-shadow: 0 0 5px var(--flame-middle);
  filter: drop-shadow(0 0 4px var(--flame-edge));
}

@keyframes flameParticleRise {
  0% { top: calc(100% + 24px); opacity: 0; transform: translateX(0) scale(.65); }
  15% { opacity: var(--brightness); }
  32% { transform: translateX(calc(var(--drift) * .22 + 7px)) scale(1); }
  56% { transform: translateX(calc(var(--drift) * .53 - 7px)) scale(.9); }
  65% { opacity: var(--brightness); }
  80% { transform: translateX(calc(var(--drift) * .78 + 4px)) scale(.75); }
  100% { top: -40px; opacity: 0; transform: translateX(var(--drift)) scale(.3); }
}

@keyframes flameParticleBreathe {
  0% { opacity: .48; transform: rotate(var(--lean)) skewX(-7deg) scale(.85, .7); }
  50% { opacity: .75; transform: rotate(0deg) skewX(3deg) scale(1.08, .95); }
  100% { opacity: .9; transform: rotate(calc(var(--lean) * -1)) skewX(7deg) scale(.9, 1.12); }
}

@media (max-width: 760px) {
  .ember-field span:nth-child(n + 13) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ember-field {
    display: none;
  }
}

.section {
  position: relative;
  overflow: hidden;
  padding: 100px 0;
  background: #0d0a09;
  border-top: 1px solid rgba(198, 149, 57, 0.1);
}

.section-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.section-pattern {
  background-color: #110d0b;
  background-image:
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(182, 135, 56, 0.018) 22px 23px),
    linear-gradient(180deg, rgba(100, 29, 18, 0.08), transparent 45%);
}

.section-ink {
  background-color: #090c0d;
  background-image: linear-gradient(90deg, rgba(28, 61, 57, 0.12), transparent 35%, rgba(94, 31, 19, 0.1));
}

.section-dark {
  background: #090909;
}

.section-red {
  background-color: #170a08;
  background-image: linear-gradient(180deg, rgba(86, 20, 13, 0.34), rgba(12, 8, 7, 0.92));
}

.section-contact {
  background-color: #0a0f0e;
  background-image: repeating-linear-gradient(45deg, transparent 0 35px, rgba(57, 160, 142, 0.022) 35px 36px);
}

.section-heading {
  max-width: 680px;
  margin: 0 auto 54px;
  text-align: center;
}

.section-heading > span {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 12px;
  letter-spacing: 4px;
}

.section-heading h2 {
  margin: 9px 0;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1.25;
}

.section-heading i {
  display: block;
  position: relative;
  width: 150px;
  height: 1px;
  margin: 16px auto 17px;
  background: rgba(198, 149, 57, 0.4);
}

.section-heading i::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: translate(-50%, -50%) rotate(45deg);
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(198, 149, 57, 0.2);
  border: 1px solid rgba(198, 149, 57, 0.2);
}

.feature-item {
  min-height: 210px;
  padding: 38px 30px;
  background: #100d0c;
  text-align: center;
  transition: background 0.2s ease;
}

.feature-item:hover {
  background: #18110e;
}

.feature-item b {
  display: block;
  min-height: 38px;
  font-size: 29px;
}

.feature-item h3 {
  margin: 16px 0 9px;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 18px;
}

.feature-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.class-card {
  position: relative;
  min-height: 252px;
  padding: 29px 17px 24px;
  text-align: center;
  background: rgba(14, 17, 17, 0.88);
  border: 1px solid rgba(198, 149, 57, 0.23);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.class-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: var(--red);
}

.class-card:hover {
  transform: translateY(-6px);
  border-color: rgba(198, 149, 57, 0.68);
}

.class-card div {
  font-size: 38px;
  filter: saturate(0.8);
}

.class-card h3 {
  margin: 18px 0 10px;
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 22px;
}

.class-card p {
  min-height: 45px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.class-card span {
  display: inline-block;
  margin-top: 17px;
  padding-top: 12px;
  color: #6ac7ba;
  border-top: 1px solid rgba(56, 198, 178, 0.24);
  font-size: 11px;
}

.settings-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.settings-panel,
.settings-wide {
  background: #11100e;
  border: 1px solid rgba(198, 149, 57, 0.24);
  border-radius: 7px;
}

.settings-panel {
  padding: 27px;
}

.panel-title,
.dungeon-panel header,
.contact-panel header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.panel-title > span,
.dungeon-panel header > span,
.contact-panel header > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  background: #24160d;
  border: 1px solid #6c471a;
  border-radius: 50%;
  font-size: 22px;
}

.panel-title h3,
.dungeon-panel h3,
.contact-panel h3 {
  margin: 0;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 20px;
}

.panel-title p,
.dungeon-panel header p,
.contact-panel header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.settings-panel dl {
  margin: 18px 0 0;
}

.settings-panel dl div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-panel dl div:last-child {
  border-bottom: 0;
}

.settings-panel dt {
  color: var(--muted);
}

.settings-panel dd {
  margin: 0;
  color: #e0c898;
  text-align: right;
  font-weight: 700;
}

.settings-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 190px 1fr;
  align-items: center;
  gap: 30px;
  padding: 22px 28px;
  border-color: rgba(187, 44, 34, 0.36);
}

.settings-wide strong {
  color: #e6a796;
  font-family: var(--serif);
  font-size: 17px;
}

.settings-wide p {
  margin: 0;
  color: #a99b89;
  line-height: 1.8;
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.package-card {
  position: relative;
  min-height: 356px;
  padding: 34px 25px 25px;
  display: flex;
  flex-direction: column;
  background: #130e0c;
  border: 1px solid rgba(198, 149, 57, 0.27);
  border-radius: 7px;
  overflow: hidden;
}

.package-featured {
  border-color: #b98126;
  box-shadow: inset 0 3px 0 #c68f2e, 0 18px 40px rgba(0, 0, 0, 0.28);
}

.ribbon {
  position: absolute;
  top: 15px;
  right: -33px;
  width: 120px;
  padding: 5px 0;
  color: #fff4d0;
  background: var(--red);
  text-align: center;
  font-size: 11px;
  transform: rotate(40deg);
}

.ribbon-teal {
  background: #147b72;
}

.price {
  margin: 0;
  color: var(--gold-bright);
  font-family: Georgia, serif;
  font-size: 42px;
}

.price small {
  margin-right: 4px;
  color: var(--gold);
  font-size: 16px;
}

.package-card h3 {
  margin: 15px 0 19px;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 23px;
}

.package-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.package-card li {
  padding: 10px 0 10px 17px;
  color: #a99b89;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
  line-height: 1.5;
}

.package-card li::before {
  content: "◆";
  display: inline-block;
  margin-left: -17px;
  margin-right: 9px;
  color: var(--red-bright);
  font-size: 7px;
  vertical-align: 2px;
}

.package-card button {
  min-height: 44px;
  margin-top: 24px;
  color: #f7e6bd;
  background: #6b1d16;
  border: 1px solid #b74837;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
}

.fair-note {
  margin: 22px 0 0;
  padding: 16px 20px;
  color: #a99a84;
  background: rgba(9, 8, 8, 0.55);
  border-left: 3px solid var(--gold);
}

.fair-note strong {
  margin-right: 12px;
  color: var(--gold-bright);
}

.equipment-path {
  display: grid;
  grid-template-columns: repeat(9, auto);
  align-items: stretch;
  justify-content: center;
  gap: 11px;
}

.equipment-path article {
  width: 190px;
  min-height: 210px;
  padding: 28px 17px;
  background: #101313;
  border: 1px solid rgba(198, 149, 57, 0.25);
  border-radius: 6px;
  text-align: center;
}

.equipment-path article b {
  font-size: 35px;
}

.equipment-path article h3 {
  margin: 17px 0 10px;
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 18px;
}

.equipment-path article p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.equipment-path > span {
  align-self: center;
  color: #7f5e2d;
  font-size: 35px;
}

.equipment-note {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: center;
  gap: 25px;
  margin-top: 25px;
  padding: 22px 25px;
  background: rgba(22, 12, 8, 0.8);
  border: 1px solid rgba(184, 55, 38, 0.36);
  border-radius: 6px;
}

.equipment-note strong {
  color: #e19a82;
  font-family: var(--serif);
}

.equipment-note p {
  margin: 0;
  color: #aa9b88;
  line-height: 1.8;
}

.activity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.activity-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  min-height: 186px;
  padding: 25px;
  background: #110e0c;
  border: 1px solid rgba(198, 149, 57, 0.22);
  border-radius: 6px;
}

.activity-card > b {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  background: #25150d;
  border: 1px solid #65401a;
  border-radius: 50%;
  font-size: 28px;
}

.activity-card h3 {
  margin: 2px 0 10px;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 19px;
}

.activity-card p {
  min-height: 56px;
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.activity-card span {
  color: #58c8b9;
  font-size: 12px;
  font-weight: 700;
}

.boss-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.boss-card {
  min-height: 270px;
  padding: 24px;
  background: #11100e;
  border: 1px solid rgba(198, 149, 57, 0.25);
  border-radius: 6px;
}

.boss-card header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.boss-card header > span {
  font-size: 34px;
}

.boss-card em {
  color: #df6d57;
  font-size: 10px;
  font-style: normal;
}

.boss-card h3 {
  margin: 3px 0 0;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 18px;
}

.boss-card p {
  margin: 17px 0;
  color: #a39787;
  font-size: 13px;
  line-height: 1.6;
}

.boss-card p b {
  display: inline-block;
  width: 45px;
  color: #cfad70;
}

.boss-card footer {
  margin-top: 18px;
  padding-top: 15px;
  color: #55c6b7;
  border-top: 1px solid rgba(56, 198, 178, 0.18);
  font-size: 12px;
  font-weight: 700;
}


.guide-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: start;
}

.timeline {
  position: relative;
  padding-left: 16px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 108px;
  width: 1px;
  background: rgba(198, 149, 57, 0.38);
}

.timeline article {
  position: relative;
  display: grid;
  grid-template-columns: 95px 1fr;
  gap: 25px;
  min-height: 125px;
}

.timeline article > span {
  padding-top: 6px;
  color: var(--teal);
  font-size: 12px;
  text-align: right;
}

.timeline article > div {
  position: relative;
  padding: 0 0 25px 22px;
}

.timeline article > div::before {
  content: "";
  position: absolute;
  top: 8px;
  left: -17px;
  width: 9px;
  height: 9px;
  background: var(--gold);
  border: 3px solid #0b0d0d;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--gold);
}

.timeline h3 {
  margin: 0 0 9px;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 19px;
}

.timeline p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.dungeon-panel,
.contact-panel {
  padding: 25px;
  background: #101312;
  border: 1px solid rgba(56, 198, 178, 0.26);
  border-radius: 7px;
}

.dungeon-panel > div {
  display: grid;
  grid-template-columns: 115px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.dungeon-panel > div:last-child {
  border-bottom: 0;
}

.dungeon-panel > div b {
  color: #dbc493;
  font-size: 13px;
}

.dungeon-panel > div span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.tips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(198, 149, 57, 0.16);
  border: 1px solid rgba(198, 149, 57, 0.16);
}

.tip-item {
  min-height: 135px;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 18px;
  padding: 25px;
  background: #0e0d0c;
}

.tip-item > b {
  color: #713a2b;
  font-family: Georgia, serif;
  font-size: 31px;
}

.tip-item h3 {
  margin: 2px 0 9px;
  color: #dcc594;
  font-family: var(--serif);
  font-size: 16px;
}

.tip-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.community-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: stretch;
}

.qr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.qr-card {
  padding: 24px;
  background: #101312;
  border: 1px solid rgba(56, 198, 178, 0.22);
  border-radius: 7px;
  text-align: center;
}

.qr-card h3 {
  margin: 0 0 17px;
  color: var(--cream);
  font-family: var(--serif);
}

.qr-button {
  position: relative;
  width: min(100%, 240px);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 8px;
  background: #e7e7e7;
  border: 1px solid #5b715e;
  border-radius: 4px;
  cursor: zoom-in;
  overflow: hidden;
}

.qr-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qr-button span {
  position: absolute;
  inset: auto 8px 8px;
  padding: 7px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.qr-button:hover span {
  opacity: 1;
}

.qr-card p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.contact-panel {
  display: flex;
  flex-direction: column;
}

.contact-row {
  min-height: 62px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.contact-row > span {
  color: var(--muted);
  font-size: 13px;
}

.contact-row strong {
  color: #e0c899;
}

.contact-row button {
  min-width: 46px;
  height: 28px;
  color: #5fd2c3;
  background: transparent;
  border: 1px solid rgba(56, 198, 178, 0.35);
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
}

.contact-button {
  width: 100%;
  margin-top: auto;
}

.warning-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 22px;
  padding: 17px 21px;
  background: rgba(86, 24, 17, 0.44);
  border-left: 3px solid var(--red);
}

.warning-bar strong {
  color: #e5907e;
}

.warning-bar span {
  color: #aa9985;
  font-size: 13px;
}

.site-footer {
  padding: 25px 0;
  color: #7f7466;
  background: #050505;
  border-top: 1px solid rgba(198, 149, 57, 0.16);
  font-size: 12px;
}

.site-footer > div {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 25px;
}

.site-footer nav {
  display: flex;
  gap: 24px;
}

.site-footer a:hover {
  color: var(--gold-bright);
}

.back-to-top {
  position: fixed;
  z-index: 800;
  right: 22px;
  bottom: 22px;
  width: 42px;
  height: 42px;
  color: var(--gold-bright);
  background: #18110d;
  border: 1px solid #7f5b27;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.modal {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  padding: 38px;
  color: var(--text);
  background: #15100e;
  border: 1px solid #7d5623;
  border-radius: 7px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  text-align: center;
  transform: translateY(14px);
  transition: transform 0.2s ease;
}

.modal.open .modal-panel {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  color: #b9a78d;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 26px;
}

.modal-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  color: #fff;
  background: var(--red);
  border: 1px solid #e15f4d;
  border-radius: 50%;
  font-size: 28px;
  font-weight: 800;
}

.modal-icon-gold {
  color: #2a1705;
  background: var(--gold);
  border-color: var(--gold-bright);
}

.modal h2 {
  margin: 0 0 12px;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 27px;
}

.modal p {
  margin: 0 0 23px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.modal small {
  display: block;
  margin-top: 18px;
  color: #746a5f;
  line-height: 1.6;
}

.download-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.download-options a {
  padding: 13px;
  color: #f1deb1;
  background: #621b15;
  border: 1px solid #a53d30;
  border-radius: 4px;
  font-weight: 700;
}

.sponsor-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.sponsor-summary span {
  padding: 11px 8px;
  color: #d9be88;
  background: #0e0c0b;
  border: 1px solid rgba(198, 149, 57, 0.2);
  font-size: 12px;
}

.modal-action {
  width: 100%;
}

.qr-modal .modal-panel {
  width: min(570px, 100%);
}

.qr-modal img {
  width: min(430px, 100%);
  aspect-ratio: 1;
  margin: 18px auto 0;
  object-fit: cover;
  background: #fff;
}

.toast {
  position: fixed;
  z-index: 3000;
  left: 50%;
  bottom: 28px;
  padding: 11px 18px;
  color: #e9f7f4;
  background: #173c37;
  border: 1px solid #3aa796;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes emberFloat {
  0% { opacity: 0; transform: translate3d(0, 0, 0); }
  12% { opacity: 0.75; }
  75% { opacity: 0.55; }
  100% { opacity: 0; transform: translate3d(var(--drift), calc(-100vh - 24px), 0); }
}

@keyframes cueMove {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

@media (max-width: 1240px) {
  .site-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    padding: 0 24px;
  }

  .desktop-nav {
    gap: 6px;
  }

  .desktop-nav a {
    font-size: 11px;
  }

  .header-actions .button-gold {
    display: none;
  }

  .hero-inner {
    grid-template-columns: 1fr 420px;
    gap: 45px;
  }

  .class-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .equipment-path {
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
  }

  .equipment-path article {
    width: auto;
  }

  .equipment-path > span {
    display: none;
  }
}

@media (max-width: 980px) {
  :root {
    --header-height: 68px;
  }

  .mobile-header-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(230px, calc(100% - 132px));
    height: 56px;
    transform: translate(-50%, -50%);
  }

  .mobile-header-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .5));
  }

  .mobile-header-logo:focus-visible {
    outline: 2px solid #f1d48d;
    outline-offset: 2px;
    border-radius: 4px;
  }

  .site-header {
    grid-template-columns: 1fr auto auto;
  }

  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .mobile-menu {
    position: fixed;
    z-index: 1200;
    top: 0;
    right: 0;
    width: min(360px, 88vw);
    height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: max(26px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
    background: radial-gradient(ellipse at top left, rgba(217, 190, 141, .08), transparent 55%), linear-gradient(165deg, #292934, #1b1c25 70%);
    border-left: 1px solid rgba(218, 199, 160, .24);
    box-shadow: -16px 0 48px rgba(0, 0, 0, .35);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(105%);
    transition: transform 0.25s ease;
  }

  .mobile-menu.open {
    transform: translateX(0);
  }

  .mobile-menu-title {
    flex-shrink: 0;
    margin: 0;
    padding: 4px 52px 20px 2px;
    color: #f0dfbb;
    border-bottom: 1px solid rgba(218, 199, 160, .2);
    font: 700 24px/1.3 var(--serif);
    letter-spacing: .12em;
  }

  .mobile-menu-close {
    position: absolute;
    top: 16px;
    right: 17px;
    width: 40px;
    height: 40px;
    color: #e7d5af;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(218, 199, 160, .22);
    border-radius: 12px;
    cursor: pointer;
    font-size: 25px;
  }

  .mobile-menu nav {
    display: grid;
    flex-shrink: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 10px;
  }

  .mobile-menu nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    padding: 14px 6px;
    color: #e6dece;
    background: linear-gradient(145deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
    border: 1px solid rgba(218, 199, 160, .18);
    border-radius: 12px;
    font: 700 clamp(16px, 4.5vw, 19px)/1.4 var(--serif);
    transition: color .18s ease, background .18s ease, border-color .18s ease;
  }

  .mobile-menu nav a:is(:hover, :focus-visible, .active) {
    color: #fff0cb;
    background: linear-gradient(135deg, rgba(210, 183, 132, .2), rgba(210, 183, 132, .07));
    border-color: rgba(226, 203, 161, .55);
    box-shadow: inset 0 1px rgba(255, 236, 192, .08);
  }

  .mobile-menu-actions {
    display: grid;
    flex-shrink: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: auto;
    padding-top: 22px;
    border-top: 1px solid rgba(218, 199, 160, .2);
  }

  .mobile-menu-actions .button {
    min-width: 0;
    min-height: 48px;
    gap: 6px;
    padding: 10px 4px;
    color: #ead4a7;
    background: #25252f;
    border: 1px solid rgba(218, 199, 160, .28);
    border-radius: 12px;
    box-shadow: inset 0 1px rgba(255, 236, 192, .1);
    font: 700 clamp(16px, 4.3vw, 18px)/1.3 var(--serif);
    white-space: nowrap;
    text-shadow: none;
  }

  .mobile-menu-actions .button-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
  }

  .mobile-menu-actions .mobile-menu-contact {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 50px;
    color: #28232a;
    background: linear-gradient(110deg, #ddc49a, #eee0c1 50%, #ddc49a);
    border-color: #e6d1ac;
    box-shadow: inset 0 1px rgba(255, 255, 255, .35), 0 4px 14px rgba(0, 0, 0, .15);
    font-size: 19px;
  }

  .mobile-menu-actions .button:is(:hover, :focus-visible) {
    color: #fff0cb;
    background: #36343d;
    border-color: rgba(226, 203, 161, .65);
    transform: none;
  }

  .mobile-menu-actions .mobile-menu-contact:is(:hover, :focus-visible) {
    color: #28232a;
    background: linear-gradient(110deg, #ead2a8, #fff0d0 50%, #ead2a8);
    border-color: #f3dfb8;
  }

  .mobile-menu :is(a, button):focus-visible {
    outline: 2px solid #f1d48d;
    outline-offset: 3px;
  }

  .menu-backdrop {
    position: fixed;
    z-index: 1100;
    inset: 0;
    display: block;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .menu-backdrop.open {
    opacity: 1;
    visibility: visible;
  }

  .hero {
    min-height: auto;
  }

  .hero-image {
    background-position: 60% center;
  }

  .hero-inner {
    width: min(720px, calc(100% - 40px));
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 42px;
    padding: 145px 0 105px;
  }

  .hero-copy {
    max-width: 620px;
  }

  .hero-notices {
    max-width: 680px;
  }

  .package-grid {
    grid-template-columns: 1fr 1fr;
  }

  .boss-grid {
    grid-template-columns: 1fr 1fr;
  }

  .guide-layout,
  .community-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 0 16px;
  }

  .brand-seal {
    width: min(64vw, 200px);
    height: 58px;
  }

  .brand strong {
    font-size: 16px;
  }

  .brand small {
    font-size: 9px;
  }

  .header-actions .button {
    min-height: 40px;
    padding: 0 16px;
  }

  .hero-image {
    background-position: 68% top;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(5, 5, 7, 0.82), rgba(5, 5, 7, 0.15)),
      linear-gradient(0deg, #080707 0%, rgba(5, 5, 7, 0.14) 70%, rgba(0, 0, 0, 0.32) 100%);
  }

  .hero-inner {
    width: calc(100% - 40px);
    padding-top: 130px;
  }

  .hero-brand-logo {
    width: min(100%, 480px);
    margin-bottom: 18px;
  }

  .online-status {
    max-width: 100%;
    min-height: 58px;
    gap: 11px;
    padding: 0 20px;
    font-size: 22px;
  }

  .online-status > span {
    width: 11px;
    height: 11px;
    flex-basis: 11px;
  }

  .online-status strong {
    font-size: inherit;
  }

  .hero-kicker {
    margin-top: 20px;
    font-size: 17px;
  }

  .hero h1 {
    font-size: 76px;
  }

  .hero-subtitle {
    font-size: 32px;
  }

  .hero-tags {
    flex-wrap: nowrap;
    margin-right: -20px;
    padding-right: 20px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .hero-tags::-webkit-scrollbar {
    display: none;
  }

  .hero-description {
    font-size: 14px;
  }

  .hero-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .button-large {
    min-height: 52px;
    padding: 0 3px;
    font-size: 11px;
    line-height: 1.25;
    white-space: normal;
  }

  .notice-row {
    grid-template-columns: 1fr;
  }

  .scroll-cue {
    display: none;
  }

  .section {
    padding: 78px 0;
  }

  .section-inner {
    width: calc(100% - 36px);
  }

  .section-heading {
    margin-bottom: 40px;
  }

  .section-heading h2 {
    font-size: 30px;
  }

  .feature-grid,
  .class-grid,
  .settings-layout,
  .package-grid,
  .activity-grid,
  .boss-grid,
  .tips-grid,
  .qr-grid {
    grid-template-columns: 1fr;
  }

  .feature-item {
    min-height: 175px;
  }

  .class-card {
    min-height: 220px;
  }

  .settings-wide {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .settings-panel dl div {
    grid-template-columns: 100px 1fr;
  }

  .package-card {
    min-height: 330px;
  }

  .equipment-path {
    grid-template-columns: 1fr 1fr;
  }

  .equipment-path article:last-of-type {
    grid-column: 1 / -1;
  }

  .equipment-note {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .activity-card {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 20px;
  }

  .activity-card > b {
    width: 52px;
    height: 52px;
    font-size: 23px;
  }


  .timeline {
    padding-left: 0;
  }

  .timeline::before {
    left: 7px;
  }

  .timeline article {
    grid-template-columns: 1fr;
    gap: 6px;
    padding-left: 26px;
  }

  .timeline article > span {
    text-align: left;
  }

  .timeline article > div {
    padding-left: 0;
  }

  .timeline article > div::before {
    left: -26px;
  }

  .dungeon-panel > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .tip-item {
    grid-template-columns: 48px 1fr;
  }

  .contact-row {
    grid-template-columns: 1fr auto;
  }

  .contact-row button {
    grid-column: 1 / -1;
    width: 100%;
    margin-bottom: 10px;
  }

  .warning-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .site-footer > div {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .modal-panel {
    padding: 32px 22px;
  }
}

@media (max-width: 560px) {
  .site-header {
    display: flex;
    justify-content: space-between;
    padding-right: 72px;
  }

  .brand {
    gap: 8px;
    max-width: calc(100vw - 92px);
  }

  .brand-seal {
    width: min(40vw, 140px);
    height: 48px;
  }

  .brand strong {
    font-size: 12px;
  }

  .brand small {
    font-size: 7px;
    letter-spacing: 1px;
  }

  .header-actions {
    display: none;
  }

  .menu-button {
    position: absolute;
    top: 13px;
    right: 16px;
    display: block !important;
    z-index: 2;
  }

  .hero h1 {
    font-size: 68px;
  }

  .hero-subtitle {
    font-size: 28px;
  }

  .live-status {
    padding: 0 12px;
    font-size: 12px;
  }

  .hero-brand-logo {
    width: 100%;
    margin-bottom: 15px;
  }

  .online-status {
    min-height: 50px;
    gap: 8px;
    padding: 0 14px;
    font-size: 17px;
  }

  .online-status > span {
    width: 9px;
    height: 9px;
    flex-basis: 9px;
  }

  .online-status strong {
    font-size: inherit;
  }

  .equipment-path {
    grid-template-columns: 1fr;
  }

  .equipment-path article:last-of-type {
    grid-column: auto;
  }

  .download-options,
  .sponsor-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .online-status {
    min-height: 46px;
    gap: 7px;
    padding: 0 11px;
    border-radius: 23px;
    font-size: 15px;
  }

  .online-status > span {
    width: 8px;
    height: 8px;
    flex-basis: 8px;
  }
}

@media (max-width: 360px) {
  .online-status {
    min-height: 42px;
    gap: 6px;
    padding: 0 9px;
    border-radius: 21px;
    font-size: 13px;
  }

  .online-status > span {
    width: 7px;
    height: 7px;
    flex-basis: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Use the same display face for every title on the home page. */
:where(h1, h2, h3, h4, h5, h6),
.brand strong,
.hero-kicker,
.hero-subtitle,
.section-heading > span {
  font-family: var(--serif);
}

/* Full-screen adaptive section update */
:root {
  --serif: "STKaiti", KaiTi, "Songti SC", SimSun, serif;
}

html {
  min-width: 320px;
  scroll-snap-type: y mandatory;
  scroll-padding-top: 0;
}

body {
  background: #080707;
}

.site-header {
  background: linear-gradient(180deg, rgba(4, 4, 5, 0.76) 0%, rgba(4, 4, 5, 0.28) 100%);
  backdrop-filter: none;
}

.site-header.scrolled {
  background: linear-gradient(180deg, rgba(4, 4, 5, 0.92) 0%, rgba(4, 4, 5, 0.42) 100%);
}

.hero,
main > .section {
  min-height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hero {
  display: flex;
  align-items: center;
}

.hero-image {
  background-image: url("assets/官方首页.webp");
  background-position: center;
  background-size: cover;
  animation: backgroundDrift 18s ease-in-out infinite alternate;
}

.hero-inner {
  min-height: 100dvh;
  padding: calc(var(--header-height) + 46px) 0 68px;
}

main > .section {
  display: flex;
  align-items: center;
  isolation: isolate;
  padding: calc(var(--header-height) + 34px) 0 54px;
  background: #080707;
}

main > .section::before,
main > .section::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

main > .section::before {
  z-index: 0;
  background-position: center;
  background-size: cover;
  opacity: 0.82;
  transform: scale(1.018);
  animation: backgroundDrift 20s ease-in-out infinite alternate;
}

main > .section::after {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(4, 5, 7, 0.88) 0%, rgba(4, 5, 7, 0.52) 46%, rgba(4, 5, 7, 0.86) 100%),
    linear-gradient(180deg, rgba(8, 7, 7, 0.18) 0%, rgba(8, 7, 7, 0.42) 72%, rgba(8, 7, 7, 0.86) 100%);
}

#classes::before { background-image: url("assets/游戏设定.webp"); }
#settings::before { background-image: url("assets/游戏设定.webp"); }
#equipment::before { background-image: url("assets/游戏设定.webp"); }
#activities::before { background-image: url("assets/精彩活动.webp"); }
#guide::before { background-image: url("assets/游戏攻略.webp"); }
#community::before { background-image: url("assets/玩家社区.webp"); }

.section-inner {
  max-height: calc(100dvh - var(--header-height) - 52px);
  overflow-y: auto;
  scrollbar-color: rgba(198, 149, 57, 0.56) rgba(10, 7, 10, 0.42);
  scrollbar-width: thin;
}

.section-inner::-webkit-scrollbar {
  width: 6px;
}

.section-inner::-webkit-scrollbar-thumb {
  background: rgba(198, 149, 57, 0.56);
  border-radius: 999px;
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading > span {
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 2px;
}

.section-heading h2 {
  color: var(--cream);
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 600;
  text-shadow: 0 2px 0 #7e4a18, 0 12px 32px rgba(204, 83, 24, 0.3);
}

.section-heading p {
  color: #d9cab1;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 2px;
}

.section-heading i {
  overflow: hidden;
}

.section-heading i::before {
  content: "";
  position: absolute;
  top: 0;
  left: -45%;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  animation: headingLineSweep 2.6s ease-in-out infinite;
}

.feature-item {
  min-height: 154px;
  padding: 26px 24px;
  background: rgba(16, 13, 12, 0.86);
}

.class-card {
  min-height: 202px;
  padding: 24px 15px 20px;
  background: rgba(14, 17, 17, 0.84);
}

.package-card {
  min-height: 312px;
  background: rgba(19, 14, 12, 0.86);
}

.settings-panel,
.settings-wide,
.boss-card,
.dungeon-panel,
.contact-panel,
.qr-card,
.tip-item,
.activity-card,
.equipment-path article {
  background-color: rgba(14, 12, 11, 0.82);
  backdrop-filter: blur(4px);
}

.activity-card {
  min-height: 150px;
}

.boss-card {
  min-height: 230px;
}

.equipment-path article {
  min-height: 168px;
}


@keyframes backgroundDrift {
  0% {
    background-position: center center;
    transform: scale(1.018);
  }
  100% {
    background-position: 52% 48%;
    transform: scale(1.045);
  }
}

@keyframes headingLineSweep {
  0%, 36% {
    left: -45%;
    opacity: 0;
  }
  48% {
    opacity: 1;
  }
  72%, 100% {
    left: 100%;
    opacity: 0;
  }
}

@media (max-height: 820px) and (min-width: 761px) {
  .section-heading {
    margin-bottom: 20px;
  }

  .section-heading h2 {
    font-size: 38px;
  }

  .hero h1 {
    font-size: 88px;
  }

  .hero-subtitle {
    font-size: 36px;
  }

  .notice-card,
  .settings-panel,
  .boss-card,
  .dungeon-panel,
  .contact-panel,
  .qr-card {
    padding: 18px;
  }

  .package-card {
    min-height: 276px;
    padding: 26px 20px 20px;
  }
}

@media (max-width: 980px) {
  .hero-inner {
    min-height: 100dvh;
  }
}

@media (max-width: 760px) {
  html {
    scroll-snap-type: none;
  }

  .hero,
  main > .section {
    min-height: auto;
    scroll-snap-align: none;
  }

  .hero-inner {
    min-height: 0;
  }

  main > .section {
    padding: 78px 0;
  }

  .section-inner {
    max-height: none;
    overflow: visible;
  }

  .section-heading > span,
  .section-heading p {
    font-size: 16px;
  }

  .section-heading h2 {
    font-size: 34px;
  }
}

/* Keep the top navigation translucent; adjust only the section background layers. */
main > .section:not(.section-sect-fullscreen) {
  opacity: 1;
  background-image: none !important;
}

main > .section.section-pattern:not(.section-sect-fullscreen) { background-color: #110d0b !important; }
main > .section.section-ink:not(.section-sect-fullscreen) { background-color: #090c0d !important; }
main > .section.section-dark:not(.section-sect-fullscreen) { background-color: #090909 !important; }
main > .section.section-red:not(.section-sect-fullscreen) { background-color: #170a08 !important; }
main > .section.section-contact:not(.section-sect-fullscreen) { background-color: #0a0f0e !important; }

/* Remove the foreground dark mask from every content section. */
main > .section::after {
  opacity: 0;
}

/* Phone-only fixes for the official home hero. */
@media (max-width: 560px) {
  #home {
    overflow-x: clip;
  }

  #home .hero-inner {
    width: calc(100% - 32px);
    padding: calc(var(--header-height) + 28px) 0 52px;
    gap: 28px;
  }

  #home .hero-copy,
  #home .hero-notices {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  #home .hero-brand-logo {
    width: 100%;
    max-width: 100%;
    margin-bottom: 14px;
  }

  #home .hero-brand-logo + .online-status {
    margin-bottom: 20px;
  }

  #home .hero-tags {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-right: 0;
    margin-bottom: 17px;
    padding-right: 0;
    overflow: visible;
  }

  #home .hero-tags span {
    min-width: 0;
    justify-content: center;
    padding: 0 7px;
    font-size: 12px;
  }

  #home .hero-description {
    font-size: 13px;
    line-height: 1.75;
  }

  #home .hero-actions {
    gap: 6px;
    margin-top: 21px;
  }

  #home .button-large {
    min-width: 0;
    min-height: 52px;
    padding: 0 3px;
    font-size: 11px;
    line-height: 1.25;
    white-space: normal;
  }

  #home .hero-notices,
  #home .notice-row {
    gap: 10px;
  }

  #home .notice-card {
    padding: 15px 16px;
    border-radius: 6px;
  }

  #home .notice-card h2 {
    margin-bottom: 8px;
    padding-bottom: 8px;
    font-size: 15px;
  }

  #home .notice-card li,
  #home .notice-card p {
    margin: 6px 0;
    font-size: 12px;
    line-height: 1.5;
  }

  .menu-button {
    box-sizing: border-box;
    flex: 0 0 42px;
    opacity: 1;
    visibility: visible;
    background: rgba(5, 5, 6, 0.58);
    pointer-events: auto;
  }

  .menu-button span {
    position: static;
    width: 100%;
    height: 2px;
    margin: 4px 0;
    border-radius: 0;
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-image,
  main > .section::before,
  .section-heading i::before {
    animation: none !important;
  }
}

/* Page order: home, settings, activities, sect preview, guide, equipment, community. */
main {
  display: flex;
  flex-direction: column;
}

main > #home { order: 0; }
main > #settings { order: 10; }
main > #activities { order: 20; }
main > #classes { order: 30; }
main > #guide { order: 40; }
main > #equipment { order: 50; }
main > #advanced { order: 55; }
main > #community { order: 60; }

/* Desktop header: keep branding and actions separate from the 12-section navigation. */
@media (min-width: 981px) {
  :root {
    --header-height: 112px;
  }

  .site-header {
    height: var(--header-height);
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: 72px 40px;
    gap: 0 20px;
    padding: 0 3vw;
    transition: height 0.3s ease, grid-template-rows 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  }

  .site-header.scrolled {
    height: 74px;
    grid-template-rows: 34px 40px;
  }

  .site-header.scrolled .brand-seal {
    width: 96px;
    height: 34px;
  }

  .site-header.scrolled .brand small {
    display: none;
  }

  .site-header.scrolled .brand strong {
    font-size: 15px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .header-actions {
    grid-column: 3;
    grid-row: 1;
  }

  .desktop-nav {
    position: relative;
    left: 0;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    height: 40px;
    gap: 16px;
    padding: 0 4vw;
  }

  .desktop-nav a {
    height: 40px;
    color: #ead9b5;
    font-size: 13px;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.96);
  }

  .desktop-nav a:hover,
  .desktop-nav a.active {
    color: #ffe08a;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 1), 0 0 10px rgba(240, 189, 78, 0.85);
  }

  .desktop-nav a.active::after {
    box-shadow: 0 0 10px rgba(240, 189, 78, 0.9), 0 0 22px rgba(240, 189, 78, 0.45);
  }

  .desktop-nav a:nth-child(5)::before,
  .desktop-nav a:nth-child(9)::before {
    display: none;
  }
}

@media (min-width: 1501px) {
  .desktop-nav a {
    font-size: 14px;
  }
}

/* 尊重系统的"减少动态效果"偏好:关闭动画/过渡与平滑滚动。 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* Home footer-style navigation dock. */
#home {
  padding-bottom: 0;
}

#home .hero-inner {
  padding-bottom: 220px;
}

#home .hero-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-bottom-dock {
  position: absolute;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 0;
  padding-top: 58px;
}

.home-nav {
  min-height: 126px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
  padding: 48px max(28px, 6vw) 18px;
  background: rgba(25, 31, 43, 0.82);
  border-top: 1px solid rgba(240, 205, 118, 0.24);
  backdrop-filter: blur(12px);
  box-shadow: 0 -14px 40px rgba(0, 0, 0, 0.3);
}

.home-nav a {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 4px;
  color: #f4ead5;
  text-align: center;
  white-space: nowrap;
  transition: color 0.2s ease, transform 0.2s ease;
}

.home-nav a span {
  font-family: var(--serif);
  font-size: clamp(15px, 1.35vw, 21px);
  font-weight: 800;
}

.home-nav a small {
  color: #c9c4bd;
  font-family: var(--sans);
  font-size: 11px;
}

.home-nav a::after {
  content: "";
  position: absolute;
  right: 22%;
  bottom: 3px;
  left: 22%;
  height: 2px;
  background: var(--gold-bright);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.home-nav a:hover,
.home-nav a.active {
  color: #ffe59d;
  transform: translateY(-2px);
}

.home-nav a:hover::after,
.home-nav a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.home-download-stack {
  position: absolute;
  z-index: 2;
  top: -58px;
  left: 50%;
  width: 128px;
  height: 146px;
  transform: translateX(-50%);
}

.home-download-button {
  width: 128px;
  height: 128px;
  padding: 20px;
  color: #3f2309;
  background: radial-gradient(circle at 50% 35%, #fff4a6 0%, #f4c348 48%, #d78a12 100%);
  border: 4px solid rgba(255, 234, 139, 0.94);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(143, 84, 11, 0.48), 0 0 28px rgba(255, 204, 70, 0.72), 0 14px 28px rgba(0, 0, 0, 0.38);
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 900;
  line-height: 1.15;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.home-download-button:hover,
.home-download-button:focus-visible {
  filter: brightness(1.08);
  transform: translateY(-3px);
  outline: none;
}

.home-next-arrow {
  position: absolute;
  z-index: 3;
  bottom: 0;
  left: 50%;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff8d5;
  background: #a9650f;
  border: 2px solid #ffe384;
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.36);
  font-size: 25px;
  line-height: 1;
  transform: translateX(-50%);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.home-next-arrow:hover,
.home-next-arrow:focus-visible {
  filter: brightness(1.14);
  transform: translateX(-50%) translateY(2px);
  outline: none;
}

@media (min-width: 981px) {
  :root {
    --header-height: 72px;
  }

  .site-header,
  .site-header.scrolled {
    height: var(--header-height);
    grid-template-columns: auto 1fr;
    grid-template-rows: var(--header-height);
    gap: 18px;
    padding: 0 3vw;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }
}

@media (max-width: 980px) {
  #home .hero-inner {
    padding-bottom: 220px;
  }

  .home-bottom-dock {
    padding-top: 48px;
  }

  .home-nav {
    min-height: 116px;
    display: flex;
    gap: 4px;
    padding: 43px 12px 12px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .home-nav::-webkit-scrollbar {
    display: none;
  }

  .home-nav a {
    flex: 0 0 112px;
    scroll-snap-align: center;
  }

  .home-nav a span {
    font-size: 15px;
  }

  .home-download-stack {
    top: -45px;
    width: 104px;
    height: 126px;
  }

  .home-download-button {
    width: 104px;
    height: 104px;
    padding: 16px;
    border-width: 3px;
    font-size: 21px;
  }

  .home-next-arrow {
    width: 34px;
    height: 34px;
    font-size: 22px;
  }
}

@media (max-width: 560px) {
  #home .hero-inner {
    padding-bottom: 210px;
  }

  .home-nav {
    min-height: 108px;
    padding-top: 39px;
  }

  .home-nav a {
    flex-basis: 104px;
  }

  .home-nav a span {
    font-size: 14px;
  }

  .home-nav a small {
    font-size: 10px;
  }
}

/* Restore the site navigation to the top of the page. */
:root {
  --header-height: 72px;
}

.site-header {
  display: grid !important;
}

#home .hero-inner {
  padding-bottom: 68px;
}

#home .hero-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 640px;
  gap: 12px;
}

#home .hero-actions .button-large {
  width: 100%;
  min-height: 52px;
  aspect-ratio: auto;
  padding: 0 14px;
  color: #fff5d6;
  background-position: 0 0;
  background-size: 190% 100%;
  border: 1px solid rgba(255, 231, 168, 0.36);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(12, 9, 6, 0.28), inset 0 1px rgba(255, 236, 192, 0.12);
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(18px, 1.25vw, 20px);
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, filter 180ms ease;
}

#home .hero-actions .button-red,
#home .hero-actions .button-gold,
#home .hero-actions .button-dark,
#community .community-contact-panel .contact-button {
  color: #f1d48d;
  background: rgba(8, 8, 9, 0.78);
  border-color: rgba(224, 210, 176, 0.32);
}

#home .hero-actions .button-rate {
  background-image: linear-gradient(105deg, #176b68 0%, #268f88 46%, #176b68 100%);
}

#home .hero-actions .button-large:hover,
#home .hero-actions .button-large:focus-visible {
  color: #f1d48d;
  background-position: 100% 0;
  background: rgba(37, 35, 31, 0.92);
  border-color: rgba(218, 194, 142, 0.75);
  box-shadow: 0 9px 20px rgba(12, 9, 6, 0.34), inset 0 1px rgba(255, 236, 192, 0.18);
  transform: translateY(-2px);
}

#home .hero-actions .button-large:active {
  transform: translateY(0);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.3), inset 0 2px 6px rgba(0, 0, 0, 0.2);
  transition-duration: 80ms;
}

#home .hero-brand-logo {
  margin-bottom: 12px;
}

#home .hero-brand-logo + .online-status {
  margin-top: 0;
  margin-bottom: 24px;
}

@media (min-width: 981px) {
  :root {
    --header-height: 112px;
  }

  .site-header,
  .site-header.scrolled {
    height: var(--header-height);
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: 72px 40px;
    gap: 0 20px;
    padding: 0 3vw;
  }
}

@media (max-width: 980px) {
  :root {
    --header-height: 68px;
  }

  #home .hero-inner {
    padding-bottom: 105px;
  }

  #home .hero-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  #home .hero-actions .button-large {
    width: 100%;
    min-height: 48px;
    padding: 0 3px;
    border-width: 1px;
    box-shadow: 0 6px 16px rgba(12, 9, 6, 0.28), inset 0 1px rgba(255, 236, 192, 0.12);
    font-size: clamp(14px, 4vw, 18px);
  }
}

@media (max-width: 560px) {
  .site-header {
    display: flex !important;
  }

  #home .hero-inner {
    padding-bottom: 82px;
  }
}

/* Keep the navigation compact and centered after removing the header branding. */
.site-header > .brand {
  display: none !important;
}

@media (min-width: 981px) {
  :root {
    --header-height: 72px;
  }

  .site-header,
  .site-header.scrolled {
    height: var(--header-height);
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: var(--header-height);
    gap: 0 18px;
    padding: 0 3vw;
  }

  .desktop-nav {
    grid-column: 1;
    grid-row: 1;
    height: var(--header-height);
    justify-content: center;
    gap: clamp(10px, 1.8vw, 28px);
    padding: 0;
  }

  .desktop-nav a {
    height: var(--header-height);
  }

  .desktop-nav a::after {
    bottom: 9px;
  }
}

/* Home actions and official contacts in the community section. */
#home .hero-inner {
  align-items: center;
  justify-items: center;
  padding-top: calc(var(--header-height) + 20px);
  padding-bottom: 52px;
}

#home .hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
  max-width: 640px;
}

#home .hero-brand-logo {
  width: min(100%, 440px);
  margin-bottom: 8px;
  object-position: center;
}

#home .hero-brand-logo + .online-status {
  margin-bottom: 14px;
}

#home .hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 0;
  margin-bottom: 0;
}

#home .hero-actions {
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
}

#community .community-contact-panel {
  width: 100%;
  min-width: 0;
  margin-top: 0;
  padding: 20px;
  text-align: left;
}

#community .community-contact-panel header {
  padding-bottom: 12px;
}

#community .community-contact-panel h3 {
  font-size: 18px;
  line-height: 1.5;
}

#community .community-contact-panel .contact-row {
  min-height: 48px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
}

#community .community-contact-panel .contact-row strong {
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

#community .community-contact-panel .contact-row button {
  grid-column: auto;
  width: auto;
  min-width: 40px;
  height: 32px;
  margin-bottom: 0;
  padding-inline: 10px;
  border-radius: 999px;
  color: #f1d48d;
  font-size: clamp(14px, 0.85vw, 15px);
  line-height: 1.2;
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(224, 210, 176, 0.25);
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

#community .community-contact-panel .contact-button {
  min-height: 44px;
  margin-top: 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: clamp(17px, 1.2vw, 20px);
  line-height: 1.4;
  box-shadow: 0 6px 16px rgba(12, 9, 6, 0.28), inset 0 1px rgba(255, 236, 192, 0.12);
}

#community .community-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  width: min(100%, 1180px);
  margin-inline: auto;
}

@media (min-width: 981px) {
  #home .online-status {
    min-height: 58px;
    padding-inline: 20px;
    gap: 10px;
    font-size: clamp(20px, 1.8vw, 26px);
  }
}

@media (max-width: 980px) {
  #home .hero-inner {
    padding-top: calc(var(--header-height) + 16px);
    gap: 28px;
  }

  #home .hero-brand-logo {
    width: min(100%, 320px);
  }

  #community .community-contact-panel {
    padding: 16px;
  }

  #community .community-contact-panel h3 {
    font-size: 16px;
  }

  #community .community-contact-panel .contact-row strong {
    font-size: clamp(12px, 3.6vw, 16px);
  }
}

#home .tutorial-link {
  max-width: 100%;
  min-height: 26px;
  padding: 3px 12px;
  gap: 8px;
  color: #f1d48d;
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(224, 210, 176, 0.25);
  border-radius: 999px;
  box-shadow: none;
  font-weight: 600;
  font-size: clamp(14px, 0.85vw, 15px);
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}

#home .tutorial-link:hover,
#home .tutorial-link:focus-visible {
  color: #f1d48d;
  background: rgba(37, 35, 31, 0.92);
  border-color: rgba(218, 194, 142, 0.75);
}

#home .tutorial-link::after {
  content: "↗";
  transition: transform 180ms ease;
}

#home .tutorial-link:hover::after {
  transform: translate(1px, -1px);
}

#community .community-contact-panel .contact-row button:hover {
  color: #f1d48d;
  background: rgba(37, 35, 31, 0.92);
  border-color: rgba(218, 194, 142, 0.75);
  transform: translateY(-1px);
}

#home .button-icon {
  width: 1.1em;
  height: 1.1em;
  flex: 0 0 auto;
}

#home :is(.button, .contact-row button, .page-next):focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

#home :is(.button, .contact-row button):active {
  transform: translateY(0) scale(0.98);
}

@media (max-width: 560px) {
  #home .hero-actions .button-large {
    gap: 6px;
  }
}

@media (pointer: coarse) {
  #home .tutorial-link {
    min-height: 32px;
  }
}

/* Neutral translucent surfaces let the background artwork carry the color. */
#home .notice-card,
#community .community-contact-panel {
  background: rgba(0, 0, 0, 0.72);
  border-color: rgba(224, 210, 176, 0.18);
}

#home .notice-red h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #f1d48d;
  border-color: rgba(198, 149, 57, 0.25);
}

#home .online-status {
  background: rgba(0, 0, 0, 0.62);
  border-color: rgba(218, 194, 142, 0.5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

#home .hero-tags span {
  color: #ded7ca;
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(224, 210, 176, 0.22);
}

#home .hero-actions .button-large,
#community .community-contact-panel .contact-button,
#home .tutorial-link,
#community .community-contact-panel .contact-row button {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: none;
}

#community .community-contact-panel .contact-button:hover,
#community .community-contact-panel .contact-button:focus-visible {
  color: #f1d48d;
}

#home .hero-tags .tag-restriction {
  gap: 6px;
}

#home .restriction-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: #ff3b30;
}

/* Expand server settings naturally instead of using a nested scroll area. */
#settings {
  padding-bottom: 86px;
}

#settings .section-inner {
  max-height: none;
  overflow: visible;
}

#settings .settings-panel,
#settings .settings-wide {
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(3px);
  border-color: rgba(224, 210, 176, 0.24);
}

#settings .settings-panel dt {
  color: #d2c6b2;
}

/* Center server rules and give each group a full-width divider. */
#settings .settings-panel,
#settings .settings-wide {
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .85);
}

#settings .panel-title {
  justify-content: center;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(224, 210, 176, .3);
}

#settings .settings-panel dl { margin: 4px 0 0; }
#settings .settings-panel dl > div {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 17px 0;
  border-bottom: 1px solid rgba(224, 210, 176, .18);
}
#settings .settings-panel dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
#settings .settings-panel :is(dt, dd) { text-align: center; line-height: 1.65; }

#settings .settings-wide {
  display: block;
  padding: 24px 28px;
}
#settings .settings-wide h3 {
  margin: 0;
  color: #e6c6aa;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.5;
}
#settings .settings-wide hr {
  height: 0;
  margin: 17px 0;
  border: 0;
  border-top: 1px solid rgba(224, 210, 176, .3);
}
#settings .settings-wide .settings-payment { color: #e2d7c9; line-height: 1.9; }
#settings .settings-wide .settings-reminder {
  color: #a8e1dc;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.9;
  letter-spacing: .06em;
}
@media (max-width: 760px) {
  #settings .settings-wide { padding: 22px 18px; }
  #settings .settings-panel dl > div { gap: 8px; }
  #settings .settings-wide .settings-reminder { font-size: 16px; }
}

/* Activity content expands with the page; particles stay behind its text. */
#activities { padding-bottom: 86px; }
#activities > .section-inner {
  max-height: none;
  overflow: visible;
}

#activities .activity-card {
  min-width: 0;
  background: rgba(0, 0, 0, .38);
  backdrop-filter: blur(3px);
  border-color: rgba(240, 210, 155, .28);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .95);
}
#activities .activity-card > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
#activities .activity-card h3 {
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(240, 210, 155, .34);
  color: #ffe5ac;
  font-size: 23px;
  line-height: 1.5;
}
#activities .activity-card p {
  min-height: 0;
  margin: 0 0 18px;
  color: #f2e9db;
  font-size: 15px;
  line-height: 1.95;
  overflow-wrap: anywhere;
}
#activities .activity-card span {
  display: block;
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid rgba(240, 210, 155, .28);
  color: #b4ebe1;
  font-size: 14px;
  line-height: 1.7;
}

/* Desktop overview: eight complete activity descriptions in two compact rows. */
@media (min-width: 1200px) {
  main > #activities {
    min-height: 100dvh;
    padding: calc(var(--header-height) + 12px) 0 54px;
  }
  #activities > .section-inner {
    width: min(1800px, calc(100% - 64px));
  }
  
  
  
  
  #activities .activity-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
  }
  #activities .activity-card { min-height: 0; padding: 14px; gap: 0; }
  #activities .activity-card h3 {
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 9px;
    padding-bottom: 9px;
  }
  #activities .activity-card p {
    font-size: clamp(13px, 1vw, 14px);
    line-height: 1.55;
    margin-bottom: 10px;
  }
  #activities .activity-card span { font-size: 12px; line-height: 1.5; padding-top: 9px; }
}
@media (min-width: 1200px) and (max-height: 800px) {
  main > #activities { padding-top: calc(var(--header-height) + 8px); }
  
  
  
  
  #activities .activity-grid { gap: 10px; }
  #activities .activity-card { padding: 9px 11px; }
  #activities .activity-card h3 { font-size: 19px; margin-bottom: 7px; padding-bottom: 7px; }
  #activities .activity-card p { font-size: 13px; line-height: 1.5; margin-bottom: 8px; }
  #activities .activity-card span { padding-top: 7px; }
}

@media (min-width: 1200px) and (max-height: 740px) {
  main > #activities { padding-top: calc(var(--header-height) + 4px); padding-bottom: 48px; }
  
  
  
  
  #activities > .section-inner { width: min(1800px, calc(100% - 40px)); }
  #activities .activity-card { padding: 7px 9px; }
  #activities .activity-card p { line-height: 1.4; }
}

/* Shared section titles, subtitles and animated gold divider. */
.section-heading { margin-bottom: 20px; }
.section-heading h2 {
  margin: 0;
  color: #fff0c8;
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .06em;
  text-shadow: 0 2px 4px #180d07, 0 0 16px rgba(0, 0, 0, .6);
}
.section-heading p {
  margin: 0;
  color: #ffe3a0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .08em;
  text-shadow: 0 2px 4px #100907, 0 0 12px rgba(0, 0, 0, .8);
}
.section-heading i {
  width: 200px;
  height: 3px;
  margin: 8px auto;
  background: linear-gradient(90deg, transparent, rgba(222, 172, 75, .8) 30%, rgba(222, 172, 75, .8) 70%, transparent);
  box-shadow: 0 0 8px rgba(198, 149, 57, .2);
}
.section-heading i::after { width: 9px; height: 9px; }
@media (min-width: 1200px) {
  #activities .section-heading { margin-bottom: 12px; }
}
@media (min-width: 981px) and (max-height: 800px) {
  .section-heading h2 { font-size: 44px; }
  .section-heading p { font-size: 20px; }
  .section-heading i { margin: 6px auto; }
  #activities .section-heading { margin-bottom: 8px; }
}
@media (min-width: 981px) and (max-height: 740px) {
  .section-heading h2 { font-size: 40px; }
  .section-heading p { font-size: 19px; }
  .section-heading i { margin: 4px auto; }
}
@media (max-width: 980px) {
  .section-heading h2 { font-size: 36px; }
  .section-heading p { font-size: 18px; }
  .section-heading i { width: 180px; }
}
@media (min-width: 1200px) and (max-height: 740px) {
  #activities .activity-card h3 { margin-bottom: 5px; padding-bottom: 5px; }
  #activities .activity-card p { line-height: 1.35; margin-bottom: 6px; }
}

/* Readable route panels; full content flows with the page. */
#guide { padding-bottom: 86px; }
#guide > .section-inner { max-height: none; overflow: visible; }
#guide .guide-layout { align-items: stretch; }
#guide .timeline,
#guide .dungeon-panel {
  min-width: 0;
  background: rgba(0, 0, 0, .64);
  border: 1px solid rgba(173, 217, 242, .28);
  border-radius: 7px;
  backdrop-filter: blur(3px);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
}
#guide .timeline {
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  gap: 18px;
  padding: 24px;
}
#guide .timeline::before {
  top: 34px;
  bottom: 34px;
  left: 113px;
  width: 2px;
  background: rgba(156, 221, 255, .45);
}
#guide .timeline article {
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 24px;
  min-height: 0;
  align-content: start;
}
#guide .timeline article > span {
  color: #b9e9ff;
  font-size: 14px;
  font-weight: 700;
}
#guide .timeline article > div { min-width: 0; padding: 0 0 0 20px; }
#guide .timeline article > div::before {
  left: -17px;
  background: #b9e9ff;
  border-color: #162736;
  box-shadow: 0 0 0 1px #9cddff;
}
#guide .timeline h3 {
  margin-bottom: 8px;
  color: #fff0cc;
  font-size: 23px;
  line-height: 1.4;
}
#guide .timeline p {
  color: #f1f6fa;
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
#guide .dungeon-panel > div span { color: #e2edf5; font-size: 14px; line-height: 1.8; }
#guide .dungeon-panel > div b { color: #fff0cc; font-size: 14px; }
@media (max-width: 760px) {
  #guide .timeline { padding: 20px 18px; gap: 24px; grid-template-rows: none; }
  #guide .timeline::before { left: 20px; top: 30px; bottom: 30px; }
  #guide .timeline article { grid-template-columns: minmax(0, 1fr); gap: 6px; padding-left: 24px; }
  #guide .timeline article > span { text-align: left; }
  #guide .timeline article > div { padding-left: 0; }
  #guide .timeline article > div::before { left: -26px; }
}

/* A shared axis places each route node exactly over its connecting line. */
#guide > .section-inner { width: min(1640px, calc(100% - 48px)); }
#guide .timeline { --route-axis: 90px; }
#guide .timeline::before,
#guide .timeline article > div::before { display: none; }
#guide .timeline article::before,
#guide .dungeon-panel > div::before {
  content: "";
  position: absolute;
  left: var(--route-axis);
  width: 2px;
  background: rgba(156, 221, 255, .5);
  transform: translateX(-50%);
  pointer-events: none;
}
#guide .timeline article::after,
#guide .dungeon-panel > div::after {
  content: "";
  position: absolute;
  top: 16px;
  left: var(--route-axis);
  width: 12px;
  height: 12px;
  border: 3px solid #162736;
  border-radius: 50%;
  background: #b9e9ff;
  box-shadow: 0 0 0 1px #9cddff;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
#guide .timeline article::before { top: 0; bottom: -18px; }
#guide .timeline article:first-child::before { top: 16px; }
#guide .timeline article:last-child::before { bottom: calc(100% - 16px); }
#guide .dungeon-panel header {
  padding-left: 0;
}
#guide .dungeon-panel header h3 { font-size: 23px; line-height: 1.4; }
#guide .dungeon-panel > div {
  --route-axis: 60px;
  --route-node-y: 26.6px;
  position: relative;
  padding-left: 78px;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 14px;
}
#guide .dungeon-panel > div::before { top: 0; bottom: -1px; }
#guide .dungeon-panel > div:first-of-type::before { top: var(--route-node-y); }
#guide .dungeon-panel > div:last-child::before { bottom: calc(100% - var(--route-node-y)); }
#guide .dungeon-panel > div::after { top: var(--route-node-y); }
#guide .dungeon-panel > div b { line-height: 1.8; }
#guide .dungeon-level {
  position: absolute;
  top: 14px;
  left: 0;
  width: 42px;
  color: #b9e9ff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.8;
  text-align: right;
  white-space: nowrap;
}
@media (min-width: 981px) {
  #guide > .section-inner { width: min(1640px, calc(100% - 72px)); }
  #guide .guide-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 760px) {
  #guide > .section-inner { width: calc(100% - 32px); }
  #guide .timeline { --route-axis: 12px; }
  #guide .timeline article::before { bottom: -24px; }
  #guide .timeline article:last-child::before { bottom: calc(100% - 16px); }
  #guide .dungeon-panel > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}


/* Main categories on the left; chapter tabs stay above the scrolling article. */
#equipment { padding: calc(var(--header-height) + 24px) 0 62px; }
#equipment > .section-inner {
  display: flex;
  flex-direction: column;
  width: calc(100% - 16px);
  height: calc(100dvh - var(--header-height) - 96px);
  min-height: 540px;
  max-height: none;
  overflow: visible;
}
#equipment .section-heading { flex: 0 0 auto; width: 100%; margin-bottom: 16px; }
.equipment-workspace {
  --equipment-menu-width: clamp(128px, 9vw, 156px);
  display: grid;
  grid-template-columns: var(--equipment-menu-width) minmax(0, 1560px) var(--equipment-menu-width);
  justify-content: center;
  gap: clamp(8px, .7vw, 14px);
  flex: 1 1 auto;
  min-height: 0;
}
.equipment-menu-shell { position: relative; padding: 30px 12px; min-height: 0; }
.equipment-menu-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.equipment-tabs {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #b58a54 #fff4df;
}
.equipment-tabs button {
  position: relative;
  display: block;
  flex: 1 0 auto;
  width: 100%;
  min-height: 32px;
  padding: 4px 0 9px;
  border: 0;
  border-radius: 0;
  color: #765124;
  background: transparent;
  font-family: var(--serif);
  font-size: clamp(18px, 1.1vw, 21px);
  line-height: 1.35;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s;
}
.equipment-tabs button::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: calc(50% - 11px);
  width: 22px;
  height: 1px;
  background: #b58a54;
}
.equipment-tabs button:last-child::after { display: none; }
.equipment-tabs button:hover,
.equipment-tabs button[aria-selected="true"] { color: #b72c16; }
.equipment-tabs button[aria-selected="true"] { font-weight: 700; }
.equipment-tabs button:focus-visible,
.equipment-subtabs button:focus-visible,
.equipment-subpage:focus-visible { outline: 2px solid #d9a351; outline-offset: -2px; }
.equipment-pages {
  grid-column: 2;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(225, 185, 99, .3);
  border-radius: 7px;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(3px);
}
.equipment-page { display: flex; flex-direction: column; height: 100%; min-height: 0; color: #f2e9db; text-shadow: 0 1px 3px #000; }
.equipment-page[hidden], .equipment-subpage[hidden] { display: none; }
.equipment-page-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 24px;
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(225, 185, 99, .3);
}
.equipment-page-title {
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: 28px;
  color: #ffe5ac;
}
.equipment-subtabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
  padding: 4px;
  flex: 0 1 760px;
  border: 1px solid rgba(225, 185, 99, .2);
  border-radius: 8px;
  background: rgba(0, 0, 0, .22);
}
.equipment-subtabs button {
  position: relative;
  min-width: 0;
  min-height: 40px;
  padding: 7px 12px 9px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #e0c994;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.equipment-subtabs button::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 28%;
  right: 28%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #e7c883, transparent);
  opacity: 0;
  transform: scaleX(.5);
  transition: opacity .2s, transform .2s;
}
.equipment-subtabs button:hover {
  color: #ffedc4;
  background: rgba(225, 185, 99, .09);
}
.equipment-subtabs button[aria-selected="true"] {
  color: #ffe5ac;
  background: linear-gradient(180deg, rgba(225, 185, 99, .16), rgba(225, 185, 99, .05));
  border-color: rgba(225, 185, 99, .4);
  box-shadow: inset 0 1px 0 rgba(255, 235, 192, .12), 0 2px 6px rgba(0, 0, 0, .18);
}
.equipment-subtabs button[aria-selected="true"]::after { opacity: 1; transform: scaleX(1); }
.equipment-subtabs button:active { background: rgba(225, 185, 99, .2); }
@media (prefers-reduced-motion: reduce) {
  .equipment-subtabs button, .equipment-subtabs button::after { transition: none; }
}
.equipment-body-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  scrollbar-color: #cba452 rgba(0, 0, 0, .4);
}
.equipment-body-scroll::-webkit-scrollbar { width: 9px; }
.equipment-body-scroll::-webkit-scrollbar-track { background: rgba(0, 0, 0, .4); }
.equipment-body-scroll::-webkit-scrollbar-thumb { background: #cba452; border: 2px solid #292017; border-radius: 8px; }
.equipment-subpage { padding: 22px 24px; }
.equipment-subpage-title { margin: 0 0 20px; color: #ffe5ac; font-family: var(--serif); font-size: 24px; }
.equipment-guide-entry + .equipment-guide-entry { margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(225, 185, 99, .18); }
.equipment-guide-entry h4 { margin: 0 0 10px; color: #ffe5ac; font-family: var(--serif); font-size: 23px; }
.equipment-guide-entry p, .equipment-pending { margin: 0; font-size: 16px; line-height: 1.9; overflow-wrap: anywhere; }
.equipment-pending { color: #ded1b9; }
/* Reference guides reuse the existing chapter panels and scrolling body. */
#equipment .guide-server-label {
  margin: 0 0 14px;
  color: #ffe5ac;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .08em;
}
#equipment .guide-reference-note {
  margin: 0 0 20px;
  padding: 10px 12px;
  border-left: 2px solid #b99558;
  color: #d7c7b1;
  background: rgba(0, 0, 0, .18);
  font-size: 14px;
  line-height: 1.75;
  text-align: left;
}
#equipment .equipment-guide-entry + .guide-reference-note { margin-top: 24px; }
#equipment .guide-reference-entry { text-align: left; }
#equipment .guide-reference-entry h4 { font-size: clamp(18px, 1.4vw, 22px); line-height: 1.5; }
#equipment .guide-reference-entry p { color: #eee2cf; }
#equipment .guide-source-links,
#equipment .guide-source-directory {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid rgba(225, 185, 99, .2);
  text-align: left;
  font-size: 15px;
  line-height: 1.7;
}
#equipment .guide-source-links strong { color: #d7c7b1; font-weight: 500; }
#equipment :is(.guide-source-links, .guide-source-directory) ul { margin: 6px 0 0; padding: 0; list-style: none; }
#equipment :is(.guide-source-links, .guide-source-directory) a {
  display: block;
  padding: 8px 2px;
  color: #f0d19a;
  line-height: 1.7;
  text-decoration: underline;
  text-decoration-color: rgba(240, 209, 154, .4);
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}
#equipment :is(.guide-source-links, .guide-source-directory) a:hover { color: #fff0cd; text-decoration-color: currentColor; }
#equipment :is(.guide-source-links, .guide-source-directory) a:focus-visible,
#equipment .guide-source-directory summary:focus-visible { outline: 2px solid #f0d19a; outline-offset: 3px; border-radius: 3px; }
#equipment .guide-source-directory summary { padding: 8px 0; color: #f0d19a; cursor: pointer; }
#equipment .guide-source-directory li + li { border-top: 1px solid rgba(225, 185, 99, .1); }
#equipment .guide-source-directory li > span { display: block; padding: 0 2px 8px; color: #c7bba9; font-size: 13px; }
@media (max-width: 1100px) {
  .equipment-page-header { flex-wrap: wrap; gap: 12px; }
  .equipment-subtabs { flex-basis: 100%; }
}
@media (max-width: 980px) {
  #equipment > .section-inner { width: calc(100% - 24px); min-height: 620px; }
  .equipment-workspace { grid-template-columns: 122px minmax(0, 1fr); gap: 10px; }
  .equipment-menu-shell { padding: 24px 12px; }
  .equipment-tabs button { font-size: 18px; }
  .equipment-page-header { padding: 16px 12px; }
  .equipment-page-title { font-size: 25px; }
  .equipment-subtabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #947c4d transparent;
  }
  .equipment-subtabs button { flex: 0 0 auto; min-height: 38px; font-size: 18px; padding: 7px 12px 9px; }
  .equipment-subpage { padding: 18px 12px; }
}
@media (max-width: 380px) {
  .equipment-workspace { grid-template-columns: 105px minmax(0, 1fr); gap: 8px; }
  .equipment-tabs button { font-size: 16px; }
}

/* Four advanced guides share a readable two-column layout. */
#advanced .advanced-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
#advanced .activity-card { min-width: 0; padding: 22px 24px; background: rgba(0, 0, 0, .56); }
#advanced .activity-card > div { display: flex; flex-direction: column; }
#advanced .activity-card h3 {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(225, 185, 99, .3);
  color: #ffe5ac;
  font-size: 24px;
}
#advanced .activity-card p { min-height: 0; margin: 0 0 16px; color: #f2e9db; font-size: 16px; line-height: 1.85; }
#advanced .activity-card span { margin-top: auto; color: #e5c989; font-size: 14px; line-height: 1.6; }
@media (max-width: 760px) {
  #advanced .advanced-grid { grid-template-columns: minmax(0, 1fr); }
  #advanced .activity-card { padding: 18px; }
}


/* Highlight the existing fraud reminder alongside the official contact details. */
#community .community-contact-panel .contact-button { margin-top: auto; }
#community .community-contact-panel :is(button, a):focus-visible { outline: 2px solid #f1d48d; outline-offset: 3px; }
#community .warning-bar {
  width: min(100%, 1180px);
  margin: 22px auto 0;
  padding: 20px 24px;
  gap: 22px;
  border: 1px solid rgba(255, 100, 81, .65);
  border-left: 5px solid #ff6451;
  border-radius: 7px;
  background: rgba(37, 8, 8, .88);
  box-shadow: 0 0 22px rgba(199, 46, 32, .12);
}
#community .warning-bar strong {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: #ff8171;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.5;
}
#community .community-warning-icon { width: 28px; height: 28px; flex: 0 0 28px; }
#community .warning-bar span { color: #fff0df; font-size: 17px; line-height: 1.8; }
#community .warning-bar span b { color: #ffae9f; }
@media (max-width: 980px) {
  #community .community-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  #community .warning-bar { padding: 16px; gap: 8px; }
  #community .warning-bar strong { font-size: 22px; }
  #community .warning-bar span { font-size: 16px; }
}

/* Current server notices fill the former contact panel position. */
#home .home-announcements {
  width: 100%;
  min-width: 0;
  margin-top: 20px;
  padding: 20px;
  border: 1px solid rgba(224, 210, 176, .22);
  border-radius: 7px;
  background: rgba(0, 0, 0, .72);
  text-align: left;
}
#home .home-announcements h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(225, 185, 99, .3);
  color: #ffe5ac;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.4;
}
#home .home-announcements h3 svg { width: 22px; height: 22px; flex: 0 0 22px; color: #e5c989; }
#home .home-announcements ul { list-style: none; margin: 0; padding: 0; }
#home .home-announcements li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 13px 0;
}
#home .home-announcements li + li { border-top: 1px solid rgba(224, 210, 176, .1); }
#home .home-announcements li:last-child { padding-bottom: 0; }
#home .home-announcements li > span {
  padding: 2px 7px;
  border: 1px solid rgba(225, 185, 99, .25);
  border-radius: 3px;
  background: rgba(225, 185, 99, .07);
  color: #f1d48d;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.6;
  white-space: nowrap;
}
#home .home-announcements p { margin: 0; color: #e9dfcc; font-size: 14px; line-height: 1.85; }
@media (max-width: 760px) {
  #home .home-announcements { padding: 16px; }
  #home .home-announcements h3 { font-size: 22px; }
  #home .home-announcements li { gap: 8px; }
}

/* Home emphasis stays below the actions, with announcements alongside it. */
#home .hero-copy > .notice-red {
  width: 100%;
  margin-top: 18px;
  text-align: left;
}
#home .hero-notices > .home-announcements { margin-top: 0; }
@media (min-width: 981px) {
  #home .hero-inner {
    width: min(1400px, calc(100% - 64px));
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: clamp(24px, 3vw, 48px);
  }
  #home .hero-notices { width: 100%; min-width: 0; }
  #home .hero-actions .button-large {
    min-width: 0;
    padding-inline: clamp(4px, .65vw, 12px);
    font-size: clamp(16px, 1.25vw, 20px);
    gap: 5px;
  }
  #home .hero-actions .button-icon { flex: 0 0 18px; width: 18px; height: 18px; }
}

#downloadModal .modal-panel {
  width: min(720px, 100%);
  height: min(780px, calc(100dvh - 40px));
  padding: 48px 28px 24px;
}
.download-modal-body { position: relative; height: 100%; overflow-y: auto; }
#downloadModal .download-tutorial {
  margin-top: 20px;
  padding: 18px;
  text-align: left;
  background: rgba(0, 0, 0, .35);
  border-color: rgba(224, 210, 176, .25);
  backdrop-filter: none;
}
#downloadModal .download-tutorial h3 {
  margin: 0 0 12px;
  padding-bottom: 12px;
  color: #f1d48d;
  border-bottom: 1px solid rgba(224, 210, 176, .25);
  font: 700 23px/1.4 var(--serif);
}
#downloadModal .download-tutorial li { color: #e2d5bf; font-size: 14px; line-height: 1.7; }
#downloadModal .tutorial-link,
#downloadModal .download-options a {
  color: #f1d48d;
  background: rgba(0, 0, 0, .4);
  border: 1px solid rgba(224, 210, 176, .32);
  border-radius: 8px;
  font: 700 18px/1.4 var(--serif);
}
#downloadModal .tutorial-link { min-height: 36px; padding: 6px 16px; }
#downloadModal :is(.tutorial-link, .download-options a):is(:hover, :focus-visible) {
  color: #fff0cb;
  background: #363029;
  border-color: #cdb280;
}
@media (max-width: 980px) {
  #downloadModal { padding: 12px; }
  #downloadModal .modal-panel {
    height: calc(100dvh - 24px);
    padding: 46px 16px 16px;
  }
  #downloadModal .download-tutorial { margin-top: 14px; padding: 12px; }
}
