:root {
  --rail-width: 76px;
  --drawer-width: 244px;
  --drawer-transition: 260ms cubic-bezier(.2, .8, .2, 1);
  --drawer-close-transition: 360ms cubic-bezier(.2, .8, .2, 1);
  --navy: #081323;
  --navy-2: #111c2e;
  --navy-3: #1f2b3d;
  --gold: #d0b36b;
  --gold-dim: #9a8656;
  --cream: #f2f1d9;
  --text: #f7f9ff;
  --ink: #091326;
  --muted: #a9b1c0;
  --line: rgba(208, 179, 107, 0.32);
  --card: rgba(8, 19, 35, 0.76);
}

@font-face {
  font-family: "Solidarite Ancient";
  src: url("/assets/solidarite-ancient.ttf?v=4") format("truetype");
  /* Keep Ancient Elvish at the same visual baseline as the site serif.
     Compact controls are handled locally instead of shrinking page text. */
  /* The glyph artwork has a larger optical body than the serif UI. This
     calibrated face scale keeps the visible character height aligned without
     changing any surrounding control dimensions. */
  size-adjust: 82%;
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Solidarite Ancient Digits";
  src: url("/assets/veilglyph26-bracket-token-hex-design-v2.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

* {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

/* Interface chrome is not selectable or draggable. Long-form content opts
   back into selection below so readers can copy the actual text. */
input,
textarea,
[contenteditable="true"],
.copyable-text,
.copyable-text * {
  user-select: text;
  -webkit-user-select: text;
}

main .content-page > h1,
main .content-page > h2,
main .content-page > p,
main .content-page > ul,
main .content-page .content-card > h1,
main .content-page .content-card > h2,
main .content-page .content-card > p,
main .content-page .content-card > ul,
main .content-page .content-card .news-full,
main .content-page .content-card .news-full *,
main .content-page .content-card .news-title,
main .content-page .content-card .news-excerpt,
main .content-page .religion-book-layout,
main .content-page .religion-book-layout *,
main .content-page .resonance-book,
main .content-page .resonance-book *,
main .content-page .religion-hero-copy,
main .content-page .religion-hero-copy *,
main .content-page .religion-section > *,
main .content-page .religion-section article,
main .content-page .event-card,
main .content-page .event-card *,
main .content-page .diplomacy-card,
main .content-page .diplomacy-card *,
main .content-page .registry-card,
main .content-page .registry-card *,
main .content-page .reading-room-intro h1,
main .content-page .reading-room-intro p,
main .content-page .reading-room-section-heading h2,
main .content-page .reading-room-section-heading p,
main .content-page .reading-room-item-body h3,
main .content-page .reading-room-item-body p {
  user-select: text;
  -webkit-user-select: text;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
.overview-second::-webkit-scrollbar,
.drawer-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--navy);
  color: var(--ink);
  font-family: "SimSun", "宋体", "STSong", "Noto Serif CJK SC", serif;
  cursor: none;
}

/* Keep the browser arrow from flashing before the animated pointer mounts. */
html,
html body,
html body * {
  cursor: none !important;
}

html.language-ancient-elvish,
html.language-ancient-elvish body {
  font-family: "Solidarite Ancient", "SimSun", "宋体", serif;
  /* The display font uses near-square glyph metrics. Tight tracking keeps a
     line with the same character count from becoming materially wider than
     its English counterpart without changing the language UI's box sizes. */
  letter-spacing: -0.08em;
  font-feature-settings: "liga" 1;
  font-variant-ligatures: common-ligatures;
}

html.language-ancient-elvish .language-switcher,
html.language-ancient-elvish .language-switcher * {
  font-family: "SimSun", "宋体", "STSong", serif !important;
  letter-spacing: 0;
}

.language-switcher .ancient-language-option {
  /* The language selector is a navigation control, never translated into
     the display script. It must remain readable in every selected language. */
  font-family: "SimSun", "瀹嬩綋", "STSong", serif !important;
  font-size: 13px !important;
  letter-spacing: 0 !important;
  line-height: 1;
  white-space: nowrap;
}

html.language-ancient-elvish .language-switcher .ancient-language-option {
  font-family: "SimSun", "瀹嬩綋", "STSong", serif !important;
  font-size: 13px !important;
  letter-spacing: 0 !important;
}

/* Guard against page-wide decorative overlays. The timeline owns its own
   keyword layer; unrelated dot grids and constellation overlays are noise. */
body::before,
body::after,
body > .star-field,
body > .particle-field,
body > .ambient-stars,
body > .constellation-overlay,
body > .cosmic-overlay {
  content: none !important;
  display: none !important;
}

/* Do not allow legacy page-wide atmosphere layers to reappear from an old
   cached mirror. Timeline keywords remain scoped to the timeline section. */
body > [class*="star"],
body > [class*="particle"],
body > [class*="constellation"],
body > [class*="cosmic"],
body > [class*="dot-grid"],
body > [class*="dot-field"] {
  display: none !important;
  pointer-events: none !important;
}

/* Functional account and mail controls must keep their readable UI face;
   the ancient glyph treatment belongs to the page language content. */
html.language-ancient-elvish .mail-link,
html.language-ancient-elvish .mail-link *,
html.language-ancient-elvish .top-brand small,
html.language-ancient-elvish .account-link,
html.language-ancient-elvish .account-modal,
html.language-ancient-elvish .account-modal * {
  font-family: "SimSun", "宋体", "STSong", serif !important;
  letter-spacing: 0;
}

/* Official English names stay readable while surrounding prose uses the
   ancient display face. The underlying text remains the same for copying. */
html.language-ancient-elvish .ancient-readable-name {
  font-family: "SimSun", "宋体", "STSong", serif !important;
  letter-spacing: 0;
}

html.language-ancient-elvish .ancient-number {
  display: inline-block;
  font-family: "Solidarite Ancient Digits", "SimSun", "宋体", serif !important;
  font-size: 0.82em;
  font-variant-ligatures: common-ligatures;
  font-feature-settings: "liga" 1;
  line-height: 1;
  letter-spacing: 0;
  vertical-align: baseline;
}

html.language-ancient-elvish .ancient-readable-name,
html.language-ancient-elvish .ancient-number {
  letter-spacing: 0;
}

a,
button {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
  cursor: none;
}

button {
  cursor: none;
}

input,
textarea,
select,
summary,
.top-brand,
.top-brand * {
  cursor: none;
}

.top-brand {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.top-brand img {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 18px;
  height: 18px;
  border: 3px solid var(--gold);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.85;
  transform: translate3d(var(--cursor-x, -100px), var(--cursor-y, -100px), 0) translate(-50%, -50%);
  transition:
    width 160ms ease,
    height 160ms ease,
    opacity 180ms ease,
    border-color 180ms ease,
    filter 180ms ease;
  animation: cursor-breathe 1.8s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(208, 179, 107, 0.38));
}

.custom-cursor span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #efd384;
  box-shadow: 0 0 10px rgba(239, 211, 132, 0.7);
  transform-origin: 0 0;
  animation: cursor-orbit 1.35s linear infinite;
}

.custom-cursor span:nth-child(2) {
  width: 4px;
  height: 4px;
  opacity: 0.7;
  animation-duration: 2.15s;
  animation-direction: reverse;
}

.custom-cursor::before {
  content: "";
  position: absolute;
  inset: -11px;
  border: 1px solid rgba(208, 179, 107, 0.36);
  border-radius: 50%;
  animation: cursor-halo 1.8s ease-in-out infinite;
}

.custom-cursor::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.68;
  box-shadow: 0 0 8px rgba(239, 211, 132, 0.48);
  transform-origin: center;
  will-change: transform, opacity;
  animation: cursor-orbit-tail 2.25s ease-in-out infinite;
}

body.cursor-hover .custom-cursor {
  width: 26px;
  height: 26px;
  opacity: 1;
  border-color: #f1d88a;
  filter: drop-shadow(0 0 14px rgba(241, 216, 138, 0.56));
}

body.cursor-magnet .custom-cursor {
  width: 22px;
  height: 22px;
  border-color: #f5dc91;
  filter: drop-shadow(0 0 16px rgba(111, 244, 255, 0.46));
}

body.cursor-magnetic-lock .custom-cursor {
  width: 28px;
  height: 28px;
  border-width: 3px;
  border-color: #fff0aa;
  filter:
    drop-shadow(0 0 12px rgba(111, 244, 255, 0.76))
    drop-shadow(0 0 22px rgba(208, 179, 107, 0.5));
}

body.cursor-pope-near .custom-cursor {
  width: 30px;
  height: 30px;
  border-color: #f4d886;
  filter: drop-shadow(0 0 18px rgba(208, 179, 107, 0.58));
}

body.cursor-active .custom-cursor {
  width: 14px;
  height: 14px;
  opacity: 1;
}

@keyframes cursor-breathe {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(208, 179, 107, 0.12);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(208, 179, 107, 0.08);
  }
}

@keyframes cursor-halo {
  0%, 100% {
    transform: scale(0.92);
    opacity: 0.45;
  }

  50% {
    transform: scale(1.18);
    opacity: 0.88;
  }
}

@keyframes cursor-orbit {
  from {
    transform: rotate(0deg) translateX(17px) rotate(0deg);
  }

  to {
    transform: rotate(360deg) translateX(17px) rotate(-360deg);
  }
}

@keyframes cursor-orbit-tail {
  from {
    opacity: 0.3;
    transform: translate(-50%, -50%) rotate(18deg) translateX(23px) scale(0.78);
  }

  22% {
    opacity: 0.78;
    transform: translate(-50%, -50%) rotate(98deg) translateX(23px) scale(1);
  }

  58% {
    opacity: 0.92;
    transform: translate(-50%, -50%) rotate(228deg) translateX(23px) scale(1.04);
  }

  to {
    opacity: 0.3;
    transform: translate(-50%, -50%) rotate(378deg) translateX(23px) scale(0.78);
  }
}

.cursor-trail {
  position: fixed;
  z-index: 9998;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(239, 211, 132, 0.58);
  box-shadow: 0 0 14px rgba(239, 211, 132, 0.36);
  transform: translate(-50%, -50%);
  animation: trail-fade 520ms ease-out forwards;
}

@keyframes trail-fade {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.28);
  }
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 82px;
  padding: 0 30px 0 38px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.04) 0 8%, transparent 8% 18%, rgba(255,255,255,0.035) 18% 23%, transparent 23% 72%, rgba(255,255,255,0.035) 72% 96%, transparent 96%),
    var(--navy-2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: opacity 420ms ease, transform 420ms ease;
}

.topbar a,
.topbar button,
.rail-menu,
.group-toggle,
.group-links a,
.server-link,
.button,
.back-top,
.footer-links a,
.search-panel button {
  transition:
    opacity 160ms ease,
    filter 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.topbar a:hover,
.topbar button:hover,
.rail-menu:hover,
.group-toggle:hover,
.group-links a:hover,
.server-link:hover,
.button:hover,
.back-top:hover,
.footer-links a:hover,
.search-panel button:hover {
  opacity: 0.96;
  filter: brightness(1.22);
}

.topbar a:active,
.topbar button:active,
.rail-menu:active,
.group-toggle:active,
.group-links a:active,
.server-link:active,
.button:active,
.back-top:active,
.footer-links a:active,
.search-panel button:active {
  transform: translateY(1px) scale(0.985);
  filter: brightness(0.92);
}

.top-brand,
.mail-link {
  display: inline-flex;
  align-items: center;
}

.top-brand {
  gap: 18px;
}

.top-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.top-brand strong {
  display: block;
  color: var(--gold);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.05;
}

.top-brand small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 15px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #dce2ed;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
  word-spacing: 0;
}

.language-switcher {
  display: inline-flex;
  width: 252px;
  flex-shrink: 0;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(208, 179, 107, 0.2);
  border-radius: 999px;
  background: rgba(8, 19, 35, 0.24);
}

.language-switcher.is-ancient-unlocked {
  width: 336px;
}

.language-switcher button {
  display: inline-flex;
  width: auto;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 0 8px;
  color: rgba(220, 226, 237, 0.72);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  word-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
}

.language-switcher button.active {
  background: var(--gold);
  color: #081323;
}

.search-icon {
  display: block;
  width: 23px;
  height: 23px;
  border: 5px solid #dce2ed;
  border-radius: 50%;
  position: relative;
}

.search-link {
  border: 0;
  background: transparent;
  padding: 0;
}

.search-icon::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: -8px;
  width: 15px;
  height: 5px;
  border-radius: 3px;
  background: #dce2ed;
  transform: rotate(45deg);
}

.mail-link {
  gap: 12px;
}

.mail-icon {
  width: 24px;
  height: 17px;
  border-radius: 3px;
  background:
    linear-gradient(145deg, transparent 46%, var(--navy-2) 48% 52%, transparent 54%),
    linear-gradient(215deg, transparent 46%, var(--navy-2) 48% 52%, transparent 54%),
    #dce2ed;
}

.rail {
  position: fixed;
  top: 82px;
  bottom: 0;
  left: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--rail-width);
  background: var(--navy);
  border-right: 0;
  pointer-events: none;
  transition: opacity 420ms ease, transform 420ms ease;
}

.menu-drawer .rail-menu {
  position: absolute !important;
  top: calc(36px - var(--drawer-scroll-offset, 0px)) !important;
  left: calc((var(--rail-width) - 46px) / 2);
  z-index: 2;
  display: grid;
  gap: 6px;
  width: 46px;
  height: 46px;
  margin-top: 0;
  place-content: center;
  border: 0;
  background: transparent;
  pointer-events: auto;
  transform-origin: center;
  transition:
    left var(--drawer-transition),
    transform 210ms cubic-bezier(.2, .8, .2, 1);
}

.rail-menu span {
  display: block;
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: #cfd6e1;
}

.menu-drawer {
  position: fixed;
  inset: 82px auto 0 0;
  /* Keep the moving control below the top bar instead of letting it bleed
     into the header when the drawer content is scrolled upward. */
  z-index: 71;
  width: var(--rail-width);
  /* The toggle is reparented into the drawer so it can travel with the
     panel. Keep the closed drawer hit-testable; otherwise its own button
     cannot receive the click that opens it. The viewport stays disabled
     until `.is-open`, so the page remains unobstructed while closed. */
  pointer-events: auto;
  overflow: hidden;
  background: var(--navy);
  transition: width var(--drawer-transition);
}

.drawer-viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.menu-drawer.is-open .drawer-viewport {
  pointer-events: auto;
}

.drawer-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: var(--drawer-width);
  min-width: var(--drawer-width);
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 24px 22px;
  background: var(--navy);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateX(0);
  box-shadow: 18px 0 42px rgba(0, 0, 0, 0.28);
}

body.drawer-opening .drawer-panel {
  overflow: hidden;
}

.drawer-panel > *:not(.rail-menu) {
  opacity: 0;
  transform: translateX(-10px);
  transition:
    opacity 150ms ease,
    transform 180ms ease;
}

/* The menu control must remain visible while the drawer content is closed. */
.drawer-panel > .rail-menu {
  opacity: 1;
  transform: none;
}

.menu-drawer.is-open {
  pointer-events: auto;
  width: var(--drawer-width);
}

/* Keep the closed-state fill until the drawer itself starts expanding. */
body.drawer-expanded .rail {
  background: transparent;
}

.menu-drawer.is-open .drawer-panel > *:not(.rail-menu) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 150ms;
}

.menu-drawer.is-closing {
  pointer-events: none;
  width: var(--rail-width);
  transition: width var(--drawer-close-transition);
}

.menu-drawer.is-closing .drawer-panel > *:not(.rail-menu) {
  opacity: 0;
  transform: translateX(-10px);
  transition-delay: 0ms;
  transition-duration: 180ms;
}

.menu-drawer.is-closing .drawer-panel > .rail-menu {
  opacity: 1;
  transform: none;
  transition: none;
}

.menu-drawer.is-closing .rail-menu {
  transition: left var(--drawer-close-transition);
}

body.drawer-resetting .menu-drawer .rail-menu {
  transition:
    left var(--drawer-close-transition),
    transform 210ms cubic-bezier(.2, .8, .2, 1);
}

body.drawer-closing .menu-drawer .rail-menu {
  position: absolute !important;
  top: calc(36px - var(--drawer-scroll-offset, 0px)) !important;
  z-index: 2;
}

/* Keep the menu control inside the scrollable sidebar content. */
.menu-drawer .rail-menu,
body.drawer-icon-open .menu-drawer .rail-menu,
body.drawer-open .menu-drawer .rail-menu {
  position: absolute !important;
  top: calc(36px - var(--drawer-scroll-offset, 0px)) !important;
  z-index: 2;
}

/* Let the X settle back to the default height before the drawer retracts. */
body.drawer-resetting .menu-drawer .rail-menu {
  left: calc(var(--drawer-width) - 68px) !important;
}

.drawer-dust {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
  isolation: isolate;
  transform: translateZ(0);
  will-change: transform;
}

.drawer-glyph-piece {
  position: absolute;
  z-index: 9;
  display: block;
  margin: 0;
  padding: 0;
  pointer-events: none;
  opacity: 0;
  transform-origin: center;
  animation: drawer-text-split 900ms cubic-bezier(.22, .61, .36, 1) var(--fragment-delay) forwards;
}

.drawer-dust i {
  position: absolute;
  width: var(--dust-size);
  height: var(--dust-size);
  border-radius: 1px;
  background: #d0b36b;
  box-shadow: 0 0 4px rgba(208, 179, 107, 0.42);
  opacity: 0;
  animation: drawer-dust-drift 900ms cubic-bezier(.22, .61, .36, 1) var(--dust-delay) forwards;
}

.drawer-dust .shard {
  width: var(--shard-width);
  height: var(--shard-height);
  border: 1px solid rgba(244, 239, 216, 0.55);
  border-radius: 1px;
  box-shadow: 0 0 5px rgba(208, 179, 107, 0.36);
}

.drawer-dust .powder {
  border-radius: 50%;
}

.drawer-dust i:nth-child(3n) {
  background: rgba(235, 239, 244, 0.86);
  box-shadow: 0 0 4px rgba(235, 239, 244, 0.3);
}

@keyframes drawer-dust-drift {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.2) rotate(0deg);
  }
  8% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  }
  32% {
    opacity: 0.95;
    transform: translate3d(calc(var(--dust-x) * 0.28), calc(var(--dust-y) * 0.28), 0) scale(1.08) rotate(calc(var(--dust-rotate) * 0.35));
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--dust-x), var(--dust-y), 0) scale(0.08) rotate(var(--dust-rotate));
  }
}

@keyframes drawer-text-split {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  8% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  30% {
    opacity: 0.96;
    transform: translate3d(calc(var(--fragment-x) * 0.25), calc(var(--fragment-y) * 0.25), 0) rotate(calc(var(--fragment-rotate) * 0.3)) scale(1.02);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--fragment-x), var(--fragment-y), 0) rotate(var(--fragment-rotate)) scale(0.78);
  }
}

body.drawer-open .page {
  margin-left: var(--drawer-width);
}

body.drawer-icon-open .rail-menu {
  transform: rotate(180deg);
}

body.drawer-menu-moving .menu-drawer .rail-menu,
body.drawer-open .menu-drawer .rail-menu {
  left: calc(var(--drawer-width) - 68px);
}

/* Keep the X with the drawer while it retracts, then let the icon morph. */
body.drawer-closing .menu-drawer .rail-menu {
  left: calc((var(--rail-width) - 46px) / 2) !important;
}

body.drawer-icon-open .rail-menu span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

body.drawer-icon-open .rail-menu span:nth-child(2) {
  opacity: 0;
}

body.drawer-icon-open .rail-menu span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.rail-menu span {
  transition:
    transform 190ms cubic-bezier(.2, .8, .2, 1),
    opacity 150ms ease;
}

.drawer-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  gap: 12px;
  padding-left: 0;
  color: var(--gold);
  font-size: 16px;
  font-weight: 900;
}

.drawer-title > .rail-menu {
  position: static;
  z-index: auto;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  margin: 0;
}

.drawer-close {
  display: none;
}

.side-menu {
  display: grid;
  gap: 25px;
  padding-top: 28px;
}

.group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--gold);
  padding: 0;
  text-align: left;
  font-size: 18px;
  font-weight: 900;
}

.chevron {
  width: 12px;
  height: 12px;
  border-left: 4px solid #aab2c1;
  border-top: 4px solid #aab2c1;
}

.menu-group.is-open .chevron {
  transform: rotate(45deg);
}

.menu-group:not(.is-open) .chevron {
  transform: rotate(225deg);
}

.group-links {
  display: none;
  padding: 15px 0 0 14px;
}

.menu-group.is-open .group-links {
  display: grid;
  gap: 16px;
}

.group-links a {
  position: relative;
  color: #fff;
  font-size: 17px;
  min-height: 36px;
  display: flex;
  align-items: center;
  padding-left: 14px;
}

.group-links a.active {
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
}

.group-links a:hover {
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
}

.news-search {
  position: fixed;
  top: 82px;
  right: 34px;
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.news-search.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.audio-widget {
  position: fixed;
  right: 34px;
  bottom: 34px;
  z-index: 82;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(208, 179, 107, 0.28);
  border-radius: 999px;
  background: rgba(8, 19, 35, 0.82);
  color: #dce2ed;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

.audio-toggle {
  position: relative;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.audio-toggle::before,
.audio-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  border: 2px solid transparent;
  border-right-color: #dce2ed;
  border-radius: 50%;
  transform: translateY(-50%);
  opacity: 0.72;
}

.audio-toggle::before {
  right: 8px;
  width: 15px;
  height: 15px;
}

.audio-toggle::after {
  right: 3px;
  width: 25px;
  height: 25px;
  opacity: 0.42;
}

.speaker-icon {
  position: absolute;
  left: 12px;
  top: 14px;
  width: 9px;
  height: 14px;
  background: #dce2ed;
  clip-path: polygon(0 30%, 45% 30%, 100% 0, 100% 100%, 45% 70%, 0 70%);
}

.audio-widget.is-playing .audio-toggle {
  background: rgba(208, 179, 107, 0.18);
  box-shadow: 0 0 0 6px rgba(208, 179, 107, 0.08);
}

.audio-widget.is-playing .audio-toggle::before,
.audio-widget.is-playing .audio-toggle::after {
  animation: speaker-wave 1.1s ease-in-out infinite;
}

.audio-widget.is-muted .audio-toggle {
  opacity: 0.62;
}

.audio-widget.needs-gesture .audio-toggle,
.audio-widget.is-resume-queued .audio-toggle {
  animation: audio-nudge 1.1s ease-in-out infinite;
}

.volume-control {
  display: grid;
  grid-template-columns: 0fr 0fr;
  align-items: center;
  gap: 0;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transition:
    max-width 220ms ease,
    opacity 160ms ease,
    gap 160ms ease;
}

.audio-widget:hover .volume-control,
.audio-widget:focus-within .volume-control {
  grid-template-columns: auto 112px;
  gap: 10px;
  max-width: 170px;
  opacity: 1;
}

.volume-control span {
  color: var(--gold);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.volume-control input {
  width: 112px;
  accent-color: var(--gold);
}

@keyframes speaker-wave {
  0%, 100% {
    opacity: 0.38;
    transform: translateY(-50%) scale(0.92);
  }

  50% {
    opacity: 0.9;
    transform: translateY(-50%) scale(1.08);
  }
}

@keyframes audio-nudge {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(208, 179, 107, 0.08);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(208, 179, 107, 0.16);
  }
}

.search-panel {
  width: min(420px, calc(100vw - 40px));
  padding: 18px;
  border: 1px solid rgba(208, 179, 107, 0.24);
  background: rgba(8, 19, 35, 0.98);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.search-panel label {
  display: block;
  margin-bottom: 10px;
  color: var(--gold);
  font-weight: 900;
}

.search-panel div {
  display: flex;
  gap: 10px;
}

.search-panel input {
  min-width: 0;
  flex: 1;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.18);
  background: #fff;
  padding: 0 12px;
  color: #081323;
}

.search-panel button {
  height: 42px;
  border: 0;
  background: var(--gold);
  padding: 0 16px;
  color: #081323;
  font-weight: 900;
}

.server-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  margin-top: auto;
  color: rgba(208, 179, 107, 0.58);
  font-size: 14px;
}

.server-link::after {
  content: "↗";
  margin-left: 10px;
  color: rgba(208, 179, 107, 0.42);
}

.server-status-widget {
  display: block;
  margin-top: 24px;
  padding: 14px 2px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(229, 234, 240, 0.76);
  font-size: 12px;
}

.server-status-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.server-status-heading strong {
  margin-left: auto;
  font-weight: 800;
}

.server-status-heading strong {
  color: #79d58a;
}

.server-status-details {
  margin: 8px 0 0;
  color: rgba(229, 234, 240, 0.58);
  font-size: 0.76rem;
  line-height: 1.4;
}

.server-status-light {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #79d58a;
  box-shadow: 0 0 0 4px rgba(121, 213, 138, 0.12), 0 0 14px rgba(121, 213, 138, 0.5);
  transition: background-color 200ms ease, box-shadow 200ms ease;
}

.server-status-widget.is-crowded .server-status-heading strong {
  color: #d7b75d;
}

.server-status-widget.is-crowded .server-status-light {
  background: #d7b75d;
  box-shadow: 0 0 0 4px rgba(215, 183, 93, 0.12), 0 0 14px rgba(215, 183, 93, 0.5);
}

.server-status-widget.is-full .server-status-heading strong {
  color: #e17b76;
}

.server-status-widget.is-full .server-status-light {
  background: #e17b76;
  box-shadow: 0 0 0 4px rgba(225, 123, 118, 0.12), 0 0 14px rgba(225, 123, 118, 0.5);
}

.page {
  min-height: 100vh;
  margin-left: var(--rail-width);
  padding-top: 82px;
  transition: margin-left var(--drawer-transition);
}

.home-hero {
  position: relative;
  min-height: calc(100vh - 82px);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--navy);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url("/assets/mountain-founders.png") center / cover no-repeat;
  transition: filter 420ms ease;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 19, 35, 0.74), rgba(8, 19, 35, 0.88)),
    linear-gradient(90deg, rgba(8, 19, 35, 0.86), rgba(8, 19, 35, 0.36), rgba(8, 19, 35, 0.86));
  transition: opacity 420ms ease;
}

.hero-content {
  position: relative;
  width: min(820px, calc(100% - 36px));
  margin-top: 8px;
  text-align: center;
  transition: opacity 420ms ease, transform 420ms ease;
}

body.idle-home .hero-content {
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
}

body.idle-home .hero-bg::after {
  opacity: 0;
}

.hero-content h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(54px, 7vw, 92px);
  font-weight: 900;
  line-height: 1.02;
}

.gold-subtitle {
  margin: 14px 0 24px;
  color: var(--gold);
  font-size: clamp(22px, 2.3vw, 30px);
  font-weight: 800;
}

.hero-slogan {
  margin: 0;
  color: #eef2f8;
  font-size: clamp(18px, 1.8vw, 25px);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 42px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 178px;
  min-height: 58px;
  padding: 0 22px;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 19px;
  font-weight: 900;
}

.button.primary {
  background: var(--gold);
  color: #061225;
}

.button.gold-outline {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(8, 19, 35, 0.26);
}

.button.pale-outline {
  border-color: rgba(236, 241, 248, 0.44);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.overview-band {
  min-height: 300px;
  padding: 28px 48px 72px;
  background: var(--cream);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 20px;
}

.info-grid article {
  min-height: 88px;
  padding: 18px 20px;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(8, 19, 35, 0.12);
}

.info-grid span {
  display: block;
  margin-bottom: 8px;
  color: #63718a;
  font-size: 15px;
}

.info-grid strong {
  color: #031026;
  font-size: 19px;
}

.info-grid article.currency-entry {
  padding: 0;
  overflow: hidden;
}

.currency-link {
  display: grid;
  align-content: center;
  min-height: 124px;
  padding: 18px 20px;
  color: inherit;
  transition: background 180ms ease, transform 180ms ease;
}

.currency-link:hover,
.currency-link:focus-visible {
  background: #fffaf0;
  transform: translateY(-2px);
}

.currency-link em {
  margin-top: 9px;
  color: var(--gold-dim);
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
}

.section-inner {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.section-inner.narrow {
  width: min(1160px, calc(100% - 36px));
  text-align: center;
}

.about-section {
  padding: 88px 0 104px;
  background: #fff;
}

.about-section h2,
.features-section h2,
.timeline-section h2,
.join-section h2 {
  margin: 0 0 28px;
  color: #081323;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.15;
  text-align: center;
}

.about-section p,
.join-section p {
  margin: 0 auto;
  max-width: 1040px;
  color: #28364d;
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.6;
}

.overview-next {
  position: absolute;
  left: 50%;
  bottom: 30px;
  width: 66px;
  height: 70px;
  border: 0;
  background: transparent;
  opacity: 0.54;
  transform: translateX(-50%);
  animation: overview-next-bounce 1.65s ease-in-out infinite;
}

.overview-next::before,
.overview-next::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 30px;
  height: 30px;
  border-right: 5px solid rgba(8, 19, 35, 0.36);
  border-bottom: 5px solid rgba(8, 19, 35, 0.36);
  border-radius: 4px;
  background: transparent;
  box-shadow: 0 0 18px rgba(208, 179, 107, 0.28);
  transform: translateX(-50%) rotate(45deg);
}

.overview-next::before {
  top: 4px;
}

.overview-next::after {
  top: 24px;
}

.overview-next:hover {
  opacity: 0.86;
}

.overview-next:active {
  animation-play-state: paused;
  transform: translateX(-50%) translateY(7px) scale(0.96);
}

.sword-reveal {
  position: fixed;
  inset: 82px 0 0 var(--rail-width);
  z-index: 90;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, rgba(92, 239, 255, 0.14), rgba(8, 19, 35, 0.02) 44%, rgba(8, 19, 35, 0.48));
  transition: left var(--drawer-transition), opacity 420ms ease;
}

body.drawer-open .sword-reveal {
  left: var(--drawer-width);
}

.sword-reveal.is-active {
  animation: reveal-field 1380ms ease-out forwards;
}

.diamond-sword {
  position: absolute;
  width: 128px;
  height: 128px;
  opacity: 0;
  image-rendering: pixelated;
  background: url("/assets/diamond-sword.png") center / contain no-repeat;
  filter:
    drop-shadow(0 0 12px rgba(111, 244, 255, 0.8))
    drop-shadow(0 0 28px rgba(111, 244, 255, 0.34));
  transform: translate(-120px, 150px) rotate(9deg);
}

.diamond-sword.slash-b {
  width: 112px;
  height: 112px;
}

.diamond-sword.slash-c {
  width: 118px;
  height: 118px;
}

.sword-cut {
  position: absolute;
  width: min(72vw, 920px);
  height: 8px;
  border-radius: 999px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(236, 255, 255, 0.96), rgba(73, 230, 255, 0.82), transparent);
  box-shadow:
    0 0 24px rgba(113, 241, 255, 0.8),
    0 0 82px rgba(113, 241, 255, 0.36);
  transform: translateY(90px) rotate(-36deg) scaleX(0.2);
}

.sword-cut.cut-b {
  width: min(62vw, 780px);
  transform: translate(-40px, 44px) rotate(18deg) scaleX(0.18);
}

.sword-cut.cut-c {
  width: min(54vw, 700px);
  transform: translate(60px, -16px) rotate(-58deg) scaleX(0.18);
}

.sword-rain {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.sword-rain i {
  position: absolute;
  left: var(--x);
  bottom: -150px;
  width: 74px;
  height: 74px;
  opacity: 0;
  image-rendering: pixelated;
  background: url("/assets/diamond-sword.png") center / contain no-repeat;
  filter:
    drop-shadow(0 0 8px rgba(111, 244, 255, 0.7))
    drop-shadow(0 0 18px rgba(111, 244, 255, 0.28));
  transform: translateX(-50%) rotate(-45deg);
}

.sword-reveal.is-active .diamond-sword.slash-a {
  animation: sword-slash-a 420ms cubic-bezier(.16, .84, .22, 1) forwards;
}

.sword-reveal.is-active .diamond-sword.slash-b {
  animation: sword-slash-b 440ms 170ms cubic-bezier(.16, .84, .22, 1) forwards;
}

.sword-reveal.is-active .diamond-sword.slash-c {
  animation: sword-slash-c 450ms 330ms cubic-bezier(.16, .84, .22, 1) forwards;
}

.sword-reveal.is-active .sword-cut.cut-a {
  animation: sword-cut-a 520ms 80ms ease-out forwards;
}

.sword-reveal.is-active .sword-cut.cut-b {
  animation: sword-cut-b 520ms 240ms ease-out forwards;
}

.sword-reveal.is-active .sword-cut.cut-c {
  animation: sword-cut-c 520ms 390ms ease-out forwards;
}

.sword-reveal.is-active .sword-rain i {
  animation: sword-rain 720ms var(--delay) cubic-bezier(.12, .78, .24, 1) forwards;
  animation-delay: calc(610ms + var(--delay));
}

.overview-second.is-sword-pulled {
  animation: sword-page-pull 620ms cubic-bezier(.16, .84, .22, 1) both;
}

@keyframes reveal-field {
  0% {
    opacity: 0;
  }

  18%, 72% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes sword-slash-a {
  0% {
    opacity: 0;
    transform: translate(-190px, 155px) rotate(9deg) scale(1.02);
  }

  18% {
    opacity: 1;
  }

  76% {
    opacity: 1;
    transform: translate(138px, -120px) rotate(9deg) scale(1.2);
  }

  100% {
    opacity: 0;
    transform: translate(190px, -176px) rotate(9deg) scale(1.24);
  }
}

@keyframes sword-slash-b {
  0% {
    opacity: 0;
    transform: translate(190px, 124px) rotate(63deg) scale(1.02);
  }

  18%, 76% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(-168px, -102px) rotate(63deg) scale(1.2);
  }
}

@keyframes sword-slash-c {
  0% {
    opacity: 0;
    transform: translate(-78px, 184px) rotate(-13deg) scale(1.02);
  }

  18%, 76% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(96px, -188px) rotate(-13deg) scale(1.2);
  }
}

@keyframes sword-cut-a {
  0% {
    opacity: 0;
    transform: translateY(90px) rotate(-36deg) scaleX(0.12);
  }

  32% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-86px) rotate(-36deg) scaleX(1);
  }
}

@keyframes sword-cut-b {
  0% {
    opacity: 0;
    transform: translate(-40px, 44px) rotate(18deg) scaleX(0.12);
  }

  32% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(20px, -36px) rotate(18deg) scaleX(1);
  }
}

@keyframes sword-cut-c {
  0% {
    opacity: 0;
    transform: translate(60px, -16px) rotate(-58deg) scaleX(0.12);
  }

  32% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(-18px, -96px) rotate(-58deg) scaleX(1);
  }
}

@keyframes sword-rain {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) rotate(-45deg) scale(0.76);
  }

  16% {
    opacity: 1;
  }

  78% {
    opacity: 0.92;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -118vh) rotate(-45deg) scale(1.1);
  }
}

@keyframes sword-page-pull {
  from {
    transform: translateY(100%) scaleY(0.96);
    filter: brightness(1.25);
  }

  to {
    transform: translateY(0) scaleY(1);
    filter: brightness(1);
  }
}

@keyframes overview-next-bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

.overview-second {
  position: fixed;
  top: 82px;
  right: 0;
  bottom: 0;
  left: var(--rail-width);
  z-index: 54;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  pointer-events: none;
  opacity: 0;
  background: var(--cream);
  transform: translateY(100%);
  transition:
    left var(--drawer-transition),
    transform 420ms cubic-bezier(.2, .8, .2, 1),
    opacity 260ms ease;
}

.overview-second.is-open {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

body.drawer-open .overview-second {
  left: var(--drawer-width);
}

body.overview-second-open {
  overflow: hidden;
}

.features-section {
  position: relative;
  padding: 92px 0;
  background: var(--cream);
}

.features-section:has(.overview-next) {
  padding-bottom: 132px;
}

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

.feature-grid article {
  padding: 32px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(8, 19, 35, 0.1);
}

.feature-grid h3 {
  margin: 0 0 12px;
  color: #081323;
  font-size: 22px;
}

.feature-grid p {
  margin: 0;
  color: #4b5b74;
  font-size: 17px;
  line-height: 1.55;
}

.timeline-section {
  position: relative;
  overflow: hidden;
  padding: 92px 0 calc(50vh + 104px);
  background:
    radial-gradient(circle at 50% 20%, rgba(208, 179, 107, 0.16), transparent 22%),
    var(--navy);
}

.timeline-section .section-inner {
  position: relative;
  z-index: 2;
}

.timeline-keywords {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.timeline-keywords span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  color: rgba(255, 255, 255, 0.16);
  font-size: clamp(22px, 4.2vw, 74px);
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow: 0 0 26px rgba(255, 255, 255, 0.12);
  transform: translate(-50%, -50%);
  animation: floating-keyword var(--duration) ease-in-out var(--delay) infinite;
}

@keyframes floating-keyword {
  0%, 100% {
    opacity: 0.06;
    transform: translate(-50%, -50%) translate3d(-28px, 32px, 0) scale(0.94) rotate(-1deg);
  }

  45% {
    opacity: 0.22;
    transform: translate(-50%, -50%) translate3d(34px, -42px, 0) scale(1.04) rotate(1.5deg);
  }

  70% {
    opacity: 0.12;
    transform: translate(-50%, -50%) translate3d(14px, -12px, 0) scale(0.98) rotate(0deg);
  }
}

.timeline-section h2 {
  color: #fff;
}

.history-timeline {
  position: relative;
  display: grid;
  gap: 0;
  min-height: var(--timeline-height, 980px);
}

.history-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 5px;
  background: rgba(208, 179, 107, 0.42);
  transform: translateX(-50%);
}

.timeline-event {
  position: absolute;
  top: var(--event-top);
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px minmax(0, 1fr);
  align-items: center;
  min-height: 0;
  transform: translateY(-50%);
}

.timeline-event.left .event-card {
  grid-column: 1;
}

.timeline-event.right .event-card {
  grid-column: 3;
}

.timeline-event.left .event-card,
.timeline-event.right .event-card {
  grid-row: 1;
  align-self: center;
  height: fit-content;
  margin-block: 0;
  transform: translateY(0);
}

.timeline-event .timeline-node {
  grid-row: 1;
}

.event-card {
  padding: 24px 30px;
  border: 1px solid rgba(208, 179, 107, 0.22);
  border-radius: 8px;
  background: rgba(8, 19, 35, 0.3);
  color: rgba(245, 247, 251, 0.38);
  text-align: right;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
  opacity: 0.42;
  backdrop-filter: blur(2px);
  transition:
    opacity 220ms ease,
    background-color 220ms ease,
    color 220ms ease,
    transform 220ms ease,
    border-color 220ms ease;
}

.timeline-event:has(.timeline-node:hover) .event-card,
.timeline-event:has(.timeline-node:focus-visible) .event-card,
.timeline-event:has(.timeline-node.is-magnetic) .event-card {
  opacity: 1;
  color: rgba(245, 247, 251, 0.86);
  background: rgba(8, 19, 35, 0.78);
  border-color: rgba(208, 179, 107, 0.42);
  transform: translateY(-2px);
}

.timeline-event.right .event-card {
  text-align: left;
}

.event-card h2 {
  margin: 0 0 16px;
  color: rgba(208, 179, 107, 0.66);
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.2;
}

.timeline-event:has(.timeline-node:hover) .event-card h2,
.timeline-event:has(.timeline-node:focus-visible) .event-card h2,
.timeline-event:has(.timeline-node.is-magnetic) .event-card h2 {
  color: var(--gold);
}

.event-card p {
  margin: 0;
  font-size: clamp(15px, 1.45vw, 19px);
  font-weight: 700;
  line-height: 1.5;
}

.timeline-node {
  position: relative;
  z-index: 2;
  grid-column: 2;
  justify-self: center;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
  box-shadow:
    0 0 0 9px #081323,
    0 0 0 13px rgba(208, 179, 107, 0.2);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.timeline-node.is-magnetic {
  transform: scale(1.2);
  filter: brightness(1.18);
  box-shadow:
    0 0 0 9px #081323,
    0 0 0 13px rgba(208, 179, 107, 0.34),
    0 0 28px rgba(208, 179, 107, 0.34);
}

.date-tooltip {
  position: absolute;
  top: 50%;
  white-space: nowrap;
  padding: 8px 12px;
  border: 1px solid rgba(208, 179, 107, 0.5);
  border-radius: 4px;
  background: rgba(8, 19, 35, 0.94);
  color: var(--gold);
  font-size: 14px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 160ms ease;
}

html.language-ancient-elvish .date-tooltip {
  font-family: "Solidarite Ancient", "SimSun", "宋体", serif;
  letter-spacing: 0;
  font-variant-numeric: normal;
}

.timeline-event.left .date-tooltip {
  left: 42px;
}

.timeline-event.right .date-tooltip {
  right: 42px;
}

.timeline-node:hover .date-tooltip,
.timeline-node:focus-visible .date-tooltip,
.timeline-node.is-magnetic .date-tooltip {
  opacity: 1;
}

.join-section {
  padding: 88px 0;
  background: #fff;
}

.join-section .button {
  margin-top: 34px;
}

.content-page {
  min-height: calc(100vh - 88px);
  padding: 76px 40px 90px;
  background: #fff;
}

.content-card {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 46px;
  border-top: 8px solid var(--gold);
  background: #fff;
  box-shadow: 0 12px 34px rgba(8, 19, 35, 0.1);
}

.content-card.content-card-wide {
  width: min(1240px, 100%);
}

.currency-page {
  min-height: calc(100vh - 88px);
  padding: 72px 40px 96px;
  background: linear-gradient(180deg, #f8f6e6 0%, #fff 58%);
}

.currency-wrap {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.currency-wrap h1 {
  margin: 0;
  color: #081323;
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1.08;
  text-align: center;
}

.currency-intro {
  max-width: 760px;
  margin: 22px auto 46px;
  color: #4b5c75;
  font-size: 19px;
  line-height: 1.7;
  text-align: center;
}

.currency-display {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(280px, 0.72fr);
  gap: 30px;
  align-items: center;
  padding: 30px;
  border: 1px solid rgba(189, 162, 99, 0.42);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 44px rgba(8, 19, 35, 0.12);
}

.currency-display figure {
  margin: 0;
}

.currency-display img {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  border: 8px solid #d6c49b;
  box-shadow: 0 10px 22px rgba(8, 19, 35, 0.16);
}

.currency-details {
  display: grid;
  gap: 18px;
}

.currency-details h2 {
  margin: 0;
  color: #081323;
  font-size: 32px;
}

.currency-details p {
  margin: 0;
  color: #344158;
  font-size: 18px;
  line-height: 1.7;
}

.currency-facts {
  display: grid;
  gap: 12px;
  margin: 0;
}

.currency-facts div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(8, 19, 35, 0.1);
}

.currency-facts dt {
  color: #6d7890;
}

.currency-facts dd {
  margin: 0;
  color: #081323;
  font-weight: 900;
  text-align: right;
}

.content-card h1 {
  margin: 0 0 22px;
  color: #081323;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.15;
}

.content-card p,
.content-card li {
  color: #2b3950;
  font-size: 18px;
  line-height: 1.7;
}

.content-card ul {
  margin: 24px 0 0;
  padding-left: 24px;
}

.content-card .org-list,
.content-card .news-tabs,
.content-card .news-grid {
  margin-top: 30px;
}

.organization-page,
.news-page {
  min-height: calc(100vh - 82px);
  padding: 54px 42px 92px;
  background: #fff;
}

.organization-wrap,
.news-wrap {
  width: min(1180px, calc(100% - 34px));
  margin: 0 auto;
}

.organization-wrap h1,
.news-wrap h1 {
  margin: 0 0 42px;
  color: #081323;
  font-size: clamp(42px, 5vw, 62px);
  line-height: 1.08;
  text-align: center;
}

.org-list {
  display: grid;
  gap: 20px;
}

.org-item {
  border: 1px solid rgba(208, 179, 107, 0.28);
  border-radius: 8px;
  background: var(--cream);
  box-shadow: 0 8px 22px rgba(8, 19, 35, 0.06);
  overflow: hidden;
}

.org-item summary {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 100px;
  padding: 24px 72px 24px 30px;
  list-style: none;
}

.org-item summary::-webkit-details-marker {
  display: none;
}

.org-item summary::after {
  content: "";
  position: absolute;
  right: 34px;
  top: 50%;
  width: 16px;
  height: 16px;
  border-right: 4px solid #bda263;
  border-bottom: 4px solid #bda263;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 180ms ease;
}

.org-item[open] summary::after {
  transform: translateY(-35%) rotate(225deg);
}

.org-item h2 {
  margin: 0;
  color: #031026;
  font-size: 25px;
  line-height: 1.2;
}

.org-item summary span {
  color: #28364d;
  font-size: 18px;
}

.org-detail {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 0 30px 28px;
  color: #26344a;
  font-size: 17px;
  line-height: 1.7;
}

.org-detail strong {
  color: var(--gold-dim);
  font-size: 20px;
}

.diplomacy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 34px;
}

.diplomacy-card {
  display: grid;
  align-content: start;
  min-height: 280px;
  padding: 26px 24px 24px;
  border: 1px solid rgba(8, 19, 35, 0.1);
  border-top: 5px solid var(--gold);
  border-radius: 8px;
  background: #fbfaf2;
  box-shadow: 0 10px 24px rgba(8, 19, 35, 0.07);
}

.diplomacy-card.diplomacy-open {
  border-top-color: #6d9d78;
}

.diplomacy-card.diplomacy-watch {
  border-top-color: #c39f53;
}

.diplomacy-card.diplomacy-restricted {
  border-top-color: #a9645b;
}

.diplomacy-status {
  color: #6c7890;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.diplomacy-card h2 {
  margin: 12px 0 14px;
  color: #081323;
  font-size: 26px;
}

.diplomacy-card p {
  margin: 0;
  color: #344158;
  font-size: 17px;
  line-height: 1.65;
}

.diplomacy-card strong {
  align-self: end;
  margin-top: 24px;
  color: #7c6740;
  font-size: 14px;
  line-height: 1.5;
}

.diplomacy-actions {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}

.diplomatic-registry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 34px;
}

.registry-card {
  display: grid;
  align-content: start;
  min-height: 250px;
  padding: 24px;
  border: 1px solid rgba(8, 19, 35, 0.1);
  border-radius: 8px;
  background: #fbfaf2;
  box-shadow: 0 10px 24px rgba(8, 19, 35, 0.07);
}

.registry-card em {
  color: #6d9d78;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.registry-card h2 {
  margin: 12px 0 14px;
  color: #081323;
  font-size: 25px;
}

.registry-card p {
  margin: 0;
  color: #344158;
  font-size: 16px;
  line-height: 1.65;
}

.diplomatic-registry-sections {
  display: grid;
  gap: 30px;
  margin-top: 34px;
}

.registry-section {
  padding: 26px;
  border: 1px solid rgba(8, 19, 35, 0.1);
  border-radius: 8px;
  background: rgba(251, 250, 242, 0.82);
}

.registry-section--hostile {
  background: rgba(255, 248, 246, 0.88);
}

.registry-section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.registry-section-header > div {
  display: flex;
  align-items: center;
  gap: 13px;
}

.registry-section-header .eyebrow {
  margin-bottom: 5px;
}

.registry-section-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
}

.registry-status-marker,
.registry-card-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #5fbd77;
  box-shadow: 0 0 0 5px rgba(95, 189, 119, 0.14);
}

.registry-section--hostile .registry-status-marker,
.registry-card--hostile .registry-card-dot {
  background: #d2605a;
  box-shadow: 0 0 0 5px rgba(210, 96, 90, 0.14);
}

.registry-section-rule {
  height: 1px;
  flex: 1;
  background: rgba(8, 19, 35, 0.12);
}

.registry-section .diplomatic-registry-grid {
  margin-top: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.registry-card {
  display: flex;
  flex-direction: column;
  min-height: 430px;
}

.registry-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.registry-card--hostile {
  border-color: rgba(210, 96, 90, 0.24);
  background: #fffafa;
}

.registry-card--hostile em {
  color: #b6514b;
}

.registry-card h3 {
  margin: 12px 0 14px;
  min-height: 32px;
  color: #081323;
  font-size: 25px;
}

.registry-card-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 0 0 160px;
  height: 160px;
  margin: 16px 0 18px;
  overflow: hidden;
  border: 1px solid rgba(8, 19, 35, 0.08);
  border-radius: 6px;
  background: rgba(8, 19, 35, 0.035);
}

.registry-card-image {
  width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  object-fit: contain;
}

.registry-card-placeholder {
  color: #8c98aa;
  font-size: 14px;
  letter-spacing: 0;
}

.registry-card p {
  flex: 1 1 auto;
}

.registry-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: #6e7c90;
}

.transport-list {
  display: grid;
  gap: 22px;
  margin-top: 34px;
}

.transport-record {
  padding: 24px;
  border: 1px solid rgba(8, 19, 35, 0.1);
  border-radius: 8px;
  background: #fbfaf2;
  box-shadow: 0 10px 24px rgba(8, 19, 35, 0.07);
}

.transport-record-heading h2 { margin: 8px 0 14px; color: var(--ink); }
.transport-record-cover { width: min(100%, 520px); max-height: 300px; object-fit: cover; border-radius: 6px; margin: 4px 0 16px; }
.transport-record-coordinate { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; color: #5f6d7f; margin: 0 0 10px; }
.transport-record-coordinate strong { color: var(--gold-dark); font-weight: 700; }
.transport-record-album { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 20px; }
.transport-record-album figure { margin: 0; }
.transport-record-album img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.transport-record-album figcaption { margin-top: 5px; color: #6e7c90; font-size: 13px; }
.transport-empty { color: #6e7c90; }

.admin-transport-record { margin-top: 18px; padding: 20px; border: 1px solid rgba(8, 19, 35, 0.12); border-radius: 8px; background: rgba(251, 250, 242, 0.8); }
.admin-transport-photos { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(8, 19, 35, 0.1); }
.admin-transport-photo-row { display: grid; grid-template-columns: 0.8fr 1fr 1.2fr 1.2fr auto; gap: 10px; align-items: end; margin-top: 10px; }
.admin-transport-photo-row label { min-width: 0; }


.registry-submission {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  margin-top: 28px;
  padding: 24px;
  border: 1px solid rgba(95, 189, 119, 0.35);
  border-radius: 8px;
  background: rgba(244, 251, 245, 0.9);
}

.registry-submission h2 {
  margin: 0 0 8px;
  color: var(--ink);
}

.registry-submission p {
  color: #52637a;
}

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

.registry-submission-form[hidden],
.diplomatic-create-field[hidden],
.diplomatic-bound-summary[hidden],
.diplomatic-pending-notice[hidden] {
  display: none;
}

.diplomatic-bound-summary,
.diplomatic-pending-notice {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(201, 174, 107, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.diplomatic-bound-summary h3,
.diplomatic-pending-notice h3 {
  margin: 0;
  color: var(--ink);
}

.diplomatic-bound-summary p,
.diplomatic-pending-notice p,
.diplomatic-bound-summary small {
  margin: 0;
  color: #52637a;
}

.registry-edit-button {
  justify-self: start;
  margin-top: 14px;
  padding-left: 0;
}

.admin-diplomatic-permissions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
  margin: 22px 0;
}

.admin-diplomatic-permissions .admin-subpanel {
  display: grid;
  align-content: start;
  gap: 12px;
}

.admin-diplomatic-permissions .admin-team-form {
  grid-template-columns: 1fr;
  align-items: start;
}

.admin-diplomatic-permissions .admin-team-form .button {
  justify-self: start;
  width: min(220px, 100%);
}

.admin-diplomatic-permissions .admin-team-row {
  align-items: flex-start;
  flex-wrap: wrap;
}

.admin-diplomatic-team-entry {
  margin-top: 30px;
  border: 1px solid rgba(8, 19, 35, 0.14);
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}

.admin-diplomatic-team-entry > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}

.admin-diplomatic-team-entry > summary::-webkit-details-marker {
  display: none;
}

.admin-diplomatic-team-entry-title {
  display: grid;
  gap: 5px;
}

.admin-diplomatic-team-entry-title strong {
  color: var(--ink);
  font-size: 1.15rem;
}

.admin-diplomatic-team-entry-title small {
  color: var(--muted);
}

.admin-diplomatic-team-entry > summary .chevron {
  flex: 0 0 auto;
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.admin-diplomatic-team-entry[open] > summary .chevron {
  transform: rotate(225deg);
}

.admin-diplomatic-team-settings {
  padding: 0 18px 18px;
}

.admin-subpanel,
.admin-diplomatic-section {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(8, 19, 35, 0.12);
  border-radius: 8px;
  background: #f8fafc;
}

.admin-subpanel h3,
.admin-diplomatic-section h3 {
  margin: 0;
  color: var(--ink);
}

.admin-diplomatic-section {
  margin-top: 18px;
}

.admin-diplomatic-section--formal {
  border-left: 4px solid #5fbd77;
}

.admin-diplomatic-section--hostile {
  border-left: 4px solid #d2605a;
}

.admin-diplomatic-records {
  display: grid;
  gap: 14px;
}

.admin-diplomatic-record {
  padding: 16px;
  border: 1px solid rgba(8, 19, 35, 0.1);
  border-radius: 7px;
  background: #fff;
}

.admin-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.admin-diplomatic-image-source {
  display: grid;
  grid-template-columns: minmax(140px, 0.55fr) minmax(0, 1.45fr);
  gap: 10px;
  grid-column: 1 / -1;
}

.diplomatic-submission-record-list {
  display: grid;
  gap: 12px;
}

.diplomatic-submission-record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(8, 19, 35, 0.12);
  border-radius: 8px;
  background: #fff;
}

.diplomatic-submission-record strong {
  color: var(--ink);
}

.diplomatic-submission-record p {
  margin: 6px 0 0;
  color: #52637a;
  white-space: pre-wrap;
}

.diplomatic-submission-locked {
  margin: 28px 0;
  padding: 24px;
  border: 1px solid rgba(210, 96, 90, 0.25);
  border-radius: 8px;
  background: #fff9f8;
}

.diplomatic-submission-locked h2 {
  margin: 0 0 8px;
  color: var(--ink);
}

.diplomatic-submission-locked p {
  margin: 0;
  color: #52637a;
}

.admin-diplomatic-proposal-list {
  display: grid;
  gap: 12px;
}

.admin-diplomatic-proposal {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(210, 96, 90, 0.25);
  border-radius: 7px;
  background: #fff;
}

.admin-diplomatic-proposal img {
  width: 100%;
  max-height: 180px;
  border-radius: 5px;
  object-fit: cover;
}

.admin-diplomatic-proposal-body {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.admin-diplomatic-proposal-body strong,
.admin-diplomatic-proposal-body p,
.admin-diplomatic-proposal-body small {
  overflow-wrap: anywhere;
}

.proposal-badge {
  justify-self: start;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(201, 174, 107, 0.18);
  color: #967b32;
  font-size: 0.88rem;
  font-weight: 700;
}

.admin-diplomatic-proposal p {
  margin: 7px 0;
  color: #52637a;
  white-space: pre-wrap;
}

.admin-diplomatic-proposal small {
  color: #7b8799;
}

.news-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: -18px 0 48px;
}

.news-tabs a {
  min-width: 86px;
  padding: 12px 20px;
  border-radius: 7px;
  background: #f3f4f6;
  color: #26344a;
  font-size: 17px;
  text-align: center;
}

.news-tabs a.active {
  background: var(--navy);
  color: #fff;
}

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

.news-card[hidden],
.news-empty[hidden] {
  display: none;
}

.news-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 72px 24px;
  border: 1px dashed rgba(8, 19, 35, 0.18);
  background: #f7f8fa;
  color: #76839a;
  font-size: 18px;
  text-align: center;
}

.news-grid.news-grid-expandable {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.admin-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 48px;
  padding-bottom: 80px;
}

.admin-heading {
  margin-bottom: 26px;
}

.admin-heading h1,
.admin-panel h2 {
  margin: 0;
  color: var(--ink);
}

.admin-heading p:last-child,
.admin-panel > p {
  color: #5f6e84;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold-dim) !important;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.admin-panel {
  margin-bottom: 26px;
  padding: 28px;
  border: 1px solid rgba(8, 19, 35, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(8, 19, 35, 0.08);
}

.admin-draft-box {
  margin-bottom: 20px;
  padding: 22px 24px;
  border: 1px solid rgba(200, 171, 104, 0.42);
  border-radius: 8px;
  background: #fbfaf4;
  box-shadow: 0 12px 24px rgba(8, 19, 35, 0.06);
}

.admin-draft-box h2 {
  margin: 0;
  color: var(--ink);
}

.admin-draft-box > p {
  margin: 10px 0 18px;
  color: #5f6e84;
}

.admin-draft-list {
  display: grid;
  gap: 14px;
}

.admin-draft-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-draft-tab {
  border: 1px solid rgba(8, 19, 35, 0.12);
  border-radius: 6px;
  padding: 10px 14px;
  background: #fff;
  color: #52637a;
  font: inherit;
  font-weight: 900;
  cursor: none;
}

.admin-draft-tab.has-draft {
  border-color: rgba(200, 171, 104, 0.72);
  color: var(--gold-dim);
}

.admin-draft-tab.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.admin-draft-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid rgba(8, 19, 35, 0.1);
  border-radius: 6px;
  background: #fff;
}

.admin-draft-row span,
.admin-draft-row strong {
  display: block;
}

.admin-draft-row span {
  color: var(--ink);
  font-weight: 900;
}

.admin-draft-row strong {
  margin-top: 8px;
  color: #6a7586;
  font-size: 12px;
  line-height: 1.45;
}

.admin-draft-row.has-draft {
  border-color: rgba(200, 171, 104, 0.72);
  background: #fffaf0;
}

.admin-draft-row.has-draft strong {
  color: var(--gold-dim);
}

.admin-draft-actions {
  display: grid;
  gap: 8px;
}

.admin-draft-actions .button {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 6px;
  border: 1px solid rgba(8, 19, 35, 0.1);
  border-radius: 8px;
  background: #f8fafc;
}

.admin-workspace-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.admin-editor-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid rgba(200, 171, 104, 0.34);
  border-radius: 8px;
  background: #fbfaf4;
}

.admin-tab {
  flex: 0 1 auto;
  border: 0;
  border-radius: 6px;
  padding: 10px 18px;
  background: transparent;
  color: #52637a;
  font: inherit;
  font-weight: 800;
  cursor: none;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.admin-tab:hover,
.admin-tab:focus-visible {
  background: rgba(200, 171, 104, 0.16);
  color: var(--ink);
  outline: none;
}

.admin-tab:active {
  transform: translateY(1px);
}

.admin-tab.is-active {
  background: var(--navy);
  color: #fff;
}

[data-admin-section][hidden] {
  display: none;
}

.admin-login-panel,
.diplomatic-login-panel {
  max-width: 840px;
}

.admin-login-panel .admin-login-form,
.diplomatic-login-panel .diplomatic-login-form {
  grid-template-columns: minmax(0, 1fr) 304px;
  column-gap: 24px;
  row-gap: 22px;
}

.admin-login-panel .button,
.diplomatic-login-panel .button {
  width: 304px;
  min-height: 58px;
  padding: 12px 18px;
  font-size: 22px;
  line-height: 1.15;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
}

.admin-login-panel [data-send-admin-code],
.diplomatic-login-panel [data-send-diplomatic-key] {
  align-self: end;
}

.admin-panel-header,
.admin-news-item-header,
.admin-team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-login-form,
.admin-team-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.admin-form label,
.admin-team-form label {
  display: grid;
  gap: 7px;
  color: #52637a;
  font-size: 14px;
  font-weight: 700;
}

.admin-form input,
.admin-form textarea,
.admin-form select,
.admin-team-form input {
  width: 100%;
  border: 1px solid #d5dbe4;
  border-radius: 6px;
  padding: 10px 12px;
  background: #f8fafc;
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.admin-wide-field {
  grid-column: 1 / -1;
}

.admin-cover-source {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid #e0e5ec;
  border-radius: 6px;
  background: #f3f6fa;
}

.admin-cover-source label {
  display: grid;
  gap: 7px;
  color: #52637a;
  font-size: 13px;
  font-weight: 800;
}

.admin-cover-source select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d5dbe4;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.admin-cover-source [hidden],
.admin-cover-manual[hidden] {
  display: none;
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-news-editor {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.admin-news-item {
  padding: 20px;
  border: 1px solid #e0e5ec;
  border-radius: 7px;
  background: #f8fafc;
}

.admin-news-form {
  margin-top: 18px;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid #d8dee7;
  border-radius: 50%;
  background: #fff;
  color: #9b4e4e;
}

.admin-status {
  min-height: 1.4em;
  color: #597568 !important;
}

.admin-status.is-error {
  color: #a44848 !important;
}

.admin-team-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.admin-team-row {
  padding: 13px 15px;
  border: 1px solid #e0e5ec;
  border-radius: 6px;
  background: #f8fafc;
}

.admin-team-row span {
  display: grid;
  gap: 3px;
}

.admin-team-row small {
  color: #76839a;
}

.admin-account-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.admin-account-search label {
  display: grid;
  gap: 7px;
  color: #52637a;
  font-size: 14px;
  font-weight: 700;
}

.admin-account-search input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d5dbe4;
  border-radius: 6px;
  padding: 8px 12px;
  background: #f8fafc;
  color: var(--ink);
  font: inherit;
}

.admin-account-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.admin-account-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(180px, 280px) auto;
  gap: 14px;
  align-items: end;
  padding: 14px;
  border: 1px solid #e0e5ec;
  border-radius: 6px;
  background: #f8fafc;
}

.admin-account-identity {
  display: grid;
  gap: 4px;
}

.admin-account-identity small {
  color: #76839a;
  overflow-wrap: anywhere;
}

.admin-account-row label {
  display: grid;
  gap: 5px;
  color: #52637a;
  font-size: 13px;
  font-weight: 700;
}

.admin-account-row input {
  min-height: 40px;
  border: 1px solid #d5dbe4;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.admin-empty {
  color: #76839a;
}

.admin-resource-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
}

.admin-resource-upload label {
  display: grid;
  gap: 7px;
  color: #52637a;
  font-size: 14px;
  font-weight: 700;
}

.admin-resource-upload input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d5dbe4;
  border-radius: 6px;
  padding: 8px 12px;
  background: #f8fafc;
  color: var(--ink);
  font: inherit;
}

.admin-resource-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.admin-resource-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid #e0e5ec;
  border-radius: 7px;
  background: #f8fafc;
}

.admin-resource-preview {
  display: grid;
  min-height: 104px;
  place-items: center;
  overflow: hidden;
  border-radius: 5px;
  background: #e5e9ef;
}

.admin-resource-preview img,
.admin-resource-preview video {
  display: block;
  width: 100%;
  height: 104px;
  object-fit: cover;
}

.admin-resource-preview audio {
  width: 116px;
}

.admin-resource-document {
  padding: 10px;
  color: var(--gold-dim);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.admin-resource-meta {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 5px;
}

.admin-resource-meta strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-resource-meta small,
.admin-resource-meta code {
  overflow-wrap: anywhere;
  color: #76839a;
  font-size: 12px;
}

.admin-resource-actions {
  display: flex;
  grid-column: 1 / -1;
  align-items: end;
  gap: 8px;
}

.admin-resource-actions label {
  display: grid;
  flex: 1 1 auto;
  gap: 5px;
  color: #52637a;
  font-size: 12px;
  font-weight: 800;
}

.admin-resource-actions select {
  min-width: 0;
  min-height: 38px;
  border: 1px solid #d5dbe4;
  border-radius: 6px;
  padding: 7px 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.text-button {
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: #a04848;
}

.news-card {
  display: flex;
  flex-direction: column;
  min-height: 410px;
  border: 1px solid #e1e4ea;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 26px rgba(8, 19, 35, 0.08);
}

.news-card-expandable {
  display: block;
}

.news-card-expandable summary {
  display: flex;
  flex-direction: column;
  list-style: none;
  cursor: none;
}

.news-card-expandable summary::-webkit-details-marker {
  display: none;
}

.news-card img,
.news-cover-placeholder {
  width: 100%;
  height: 178px;
  object-fit: cover;
  background: #f0f1f4;
}

.news-cover-placeholder {
  display: grid;
  place-items: center;
  color: #a2aaba;
  font-size: 22px;
}

.news-body {
  display: grid;
  gap: 14px;
  padding: 28px 30px 26px;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #627088;
  font-size: 16px;
}

.news-meta span {
  padding: 6px 12px;
  border-radius: 5px;
  background: rgba(208, 179, 107, 0.14);
  color: #b38f42;
}

.news-card h2 {
  margin: 0;
  color: #031026;
  font-size: 23px;
  line-height: 1.35;
}

.news-title {
  color: #031026;
  font-size: 23px;
  font-weight: 900;
  line-height: 1.35;
}

.news-card p,
.news-excerpt {
  margin: 0;
  color: #344158;
  font-size: 17px;
  line-height: 1.55;
}

.news-more {
  margin-top: auto;
  color: #b38f42;
  font-size: 18px;
  font-weight: 800;
}

.news-card-expandable[open] .news-more {
  color: #6f5b32;
}

.news-card-expandable[open] .news-more::before {
  content: attr(data-open-label);
}

.news-card-expandable[open] .news-more {
  font-size: 0;
}

.news-card-expandable[open] .news-more::before {
  font-size: 18px;
}

.news-full {
  display: grid;
  gap: 16px;
  padding: 0 30px 30px;
  color: #344158;
  font-size: 17px;
  line-height: 1.65;
}

.news-full p {
  margin: 0;
}

.site-footer {
  padding: 60px 42px 48px;
  background: var(--navy);
  color: #d9e1ef;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.9fr;
  gap: 58px;
  max-width: 1280px;
  margin: 0 auto;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 22px;
  color: #fff;
  line-height: 1.15;
}

.site-footer h2 {
  color: var(--gold);
  font-size: 30px;
}

.site-footer h3 {
  font-size: 23px;
}

.site-footer p,
.footer-links a {
  color: #c8d4e7;
  font-size: 18px;
  line-height: 1.55;
}

.footer-links {
  display: grid;
  gap: 14px;
}

.back-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 142px;
  min-height: 46px;
  margin-top: 20px;
  border-radius: 7px;
  background: var(--gold);
  color: #081323;
  font-size: 17px;
  font-weight: 900;
}

.back-top span {
  font-size: 28px;
  line-height: 1;
}

.footer-bottom {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 1280px;
  margin: 38px auto 0;
  padding-top: 38px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: #c8d4e7;
}

.footer-bottom p {
  margin: 0;
}

.thanks-mark {
  display: inline-block;
  width: 34px;
  height: 34px;
  margin-right: 12px;
  vertical-align: middle;
  border-radius: 50%;
  background: url("/assets/sheralle-avatar.jpg") center / cover no-repeat;
  box-shadow: 0 0 0 2px rgba(208, 179, 107, 0.32);
}

.site-footer a:not(.back-top) {
  color: #d8bc79;
}

.reading-room-page {
  min-height: calc(100vh - 82px);
  padding: 72px 42px 96px;
  background:
    radial-gradient(circle at 82% 12%, rgba(208, 179, 107, 0.16), transparent 26%),
    linear-gradient(180deg, #f7f8f7 0%, #fff 52%, #f4f1df 100%);
}

.reading-room-intro,
.reading-room-tabs,
.reading-room-page > [data-reading-room-content],
.reading-room-status {
  width: min(1180px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.reading-room-intro {
  text-align: center;
}

.reading-room-intro h1 {
  margin: 0;
  color: #081323;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.08;
}

.reading-room-subtitle {
  margin: 18px 0 8px;
  color: var(--gold-dim);
  font-size: 23px;
  font-weight: 800;
}

.reading-room-description {
  max-width: 760px;
  margin: 0 auto;
  color: #5f6e84;
  font-size: 18px;
  line-height: 1.7;
}

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

.reading-room-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 16px 22px;
  border: 1px solid rgba(8, 19, 35, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: #344158;
  box-shadow: 0 10px 24px rgba(8, 19, 35, 0.06);
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.reading-room-tab:hover,
.reading-room-tab:focus-visible {
  border-color: rgba(189, 162, 99, 0.7);
  transform: translateY(-2px);
  outline: none;
}

.reading-room-tab.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.reading-room-tab span {
  font-size: 22px;
  font-weight: 900;
}

.reading-room-tab small {
  color: var(--gold-dim);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.reading-room-tab.is-active small {
  color: #dec681;
}

.reading-room-status {
  min-height: 24px;
  margin-top: 22px;
  color: #6d7890;
  text-align: center;
}

.reading-room-section-heading {
  margin: 28px 0 24px;
}

.reading-room-section-heading h2 {
  margin: 0 0 10px;
  color: #081323;
  font-size: 36px;
}

.reading-room-section-heading > p:last-child {
  max-width: 780px;
  margin: 0;
  color: #5f6e84;
  font-size: 17px;
  line-height: 1.7;
}

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

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

.reading-room-item {
  overflow: hidden;
  border: 1px solid rgba(8, 19, 35, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(8, 19, 35, 0.1);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.reading-room-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 42px rgba(8, 19, 35, 0.16);
}

.reading-room-item--tour {
  transform: perspective(1000px) rotateX(var(--tour-rotate-x, 0deg)) rotateY(var(--tour-rotate-y, 0deg));
  transform-style: preserve-3d;
}

.reading-room-item--tour:hover {
  transform: perspective(1000px) rotateX(var(--tour-rotate-x, 0deg)) rotateY(var(--tour-rotate-y, 0deg)) translateY(-5px);
}

.reading-room-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #dfe4e9;
}

.reading-room-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease, filter 420ms ease;
}

.reading-room-item:hover .reading-room-media img {
  transform: scale(1.045);
  filter: saturate(1.08) contrast(1.04);
}

.reading-room-media.is-empty {
  display: grid;
  place-items: center;
  color: #8b98ab;
  font-size: 17px;
}

.reading-room-depth-mark {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 0 0 12px rgba(8, 19, 35, 0.12), inset 0 0 0 24px rgba(255, 255, 255, 0.08);
  transform: translateZ(22px) rotateX(2deg) rotateY(-5deg);
  pointer-events: none;
}

.reading-room-item-body {
  padding: 22px 24px 24px;
}

.reading-room-item-body h3 {
  margin: 0 0 10px;
  color: #081323;
  font-size: 24px;
}

.reading-room-item-body p {
  min-height: 56px;
  margin: 0;
  color: #5f6e84;
  font-size: 16px;
  line-height: 1.7;
}

.reading-room-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--gold-dim);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.reading-room-link span {
  font-size: 22px;
  line-height: 1;
}

.reading-room-document-toggle {
  margin-top: 4px;
}

.reading-room-document-body {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(190, 151, 85, 0.24);
}

.reading-room-document-body p {
  min-height: 0;
  margin: 0 0 10px;
  color: #425168;
  font-size: 14px;
  line-height: 1.8;
}

.reading-room-document-body p:last-child {
  margin-bottom: 0;
}

.reading-room-empty {
  padding: 42px;
  border: 1px dashed rgba(8, 19, 35, 0.18);
  color: #6d7890;
  text-align: center;
}

.reading-room-upload-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr);
  gap: 22px 34px;
  align-items: end;
  margin: 28px 0 34px;
  padding: 24px 28px;
  border: 1px solid rgba(189, 162, 99, 0.38);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 12px 28px rgba(8, 19, 35, 0.07);
}

.reading-room-upload-panel h3 {
  margin: 0 0 8px;
  color: #081323;
  font-size: 24px;
}

.reading-room-upload-panel p {
  margin: 0;
  color: #5f6e84;
  line-height: 1.6;
}

.reading-room-upload-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.reading-room-upload-form label {
  display: grid;
  gap: 6px;
  color: #344158;
  font-size: 13px;
  font-weight: 800;
}

.reading-room-upload-form input,
.reading-room-upload-form select {
  min-width: 0;
  height: 42px;
  border: 1px solid rgba(8, 19, 35, 0.16);
  border-radius: 5px;
  padding: 0 10px;
  background: #fff;
  color: #081323;
}

.reading-room-upload-form button,
.reading-room-upload-note {
  grid-column: 1 / -1;
}

.reading-room-upload-note {
  font-size: 13px !important;
}

.photo-agreement-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 12, 24, 0.78);
  backdrop-filter: blur(8px);
}

.olotis-tour-page {
  display: grid;
  gap: 14px;
  width: min(1280px, calc(100vw - 96px));
  margin: 0 auto;
}

.olotis-tour-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.olotis-tour-header h1 {
  margin: 6px 0 8px;
  color: var(--ink);
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 1;
  word-break: keep-all;
  overflow-wrap: normal;
}

.olotis-tour-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(194, 164, 91, 0.28);
  background: rgba(255, 255, 255, 0.72);
}

.olotis-tour-beta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
  color: rgba(23, 35, 57, 0.68);
  font-size: 0.95rem;
  line-height: 1.5;
}

.olotis-tour-beta strong {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border: 1px solid rgba(194, 164, 91, 0.45);
  background: rgba(194, 164, 91, 0.18);
  color: var(--gold-dark);
  font-size: 0.88rem;
  letter-spacing: 0;
}

.olotis-tour-beta span {
  min-width: min(100%, 280px);
}

.olotis-tour-controls label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid rgba(194, 164, 91, 0.42);
  background: rgba(255, 255, 255, 0.82);
  color: rgba(23, 35, 57, 0.72);
  font-size: 0.92rem;
  white-space: nowrap;
}

.olotis-tour-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid rgba(8, 19, 35, 0.12);
  background: rgba(255, 255, 255, 0.66);
  color: rgba(23, 35, 57, 0.72);
  font-size: 0.92rem;
  white-space: nowrap;
}

.olotis-tour-mode strong {
  margin-left: 6px;
  color: var(--ink);
}

.olotis-tour-mode small {
  margin-left: 8px;
  color: rgba(23, 35, 57, 0.52);
  font-size: 0.72rem;
}

.olotis-tour-controls select,
.olotis-tour-controls input {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.olotis-tour-controls input[type="range"] {
  width: min(210px, 34vw);
  accent-color: var(--gold);
}

.olotis-tour-controls select {
  min-width: 70px;
}

.olotis-tour-check input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  accent-color: var(--gold);
}

.olotis-tour-controls label:has([data-tour-clip]) {
  flex: 1 1 300px;
}

.olotis-tour-controls .button {
  flex: 0 0 auto;
  width: auto;
  min-width: 118px;
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.95rem;
}

html.language-ancient-elvish .olotis-tour-page,
html.language-ancient-elvish .olotis-tour-page * {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  letter-spacing: 0 !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
}

.olotis-tour-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 14px;
  align-items: stretch;
}

.olotis-tour-stage {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  height: min(72vh, 760px);
  border: 1px solid rgba(194, 164, 91, 0.38);
  background: #0b1220;
  box-shadow: 0 22px 70px rgba(14, 29, 52, 0.22);
  touch-action: none;
}

.olotis-tour-sidebar {
  min-height: 620px;
  height: min(72vh, 760px);
  overflow: auto;
  padding: 18px 16px;
  border: 1px solid rgba(194, 164, 91, 0.34);
  background: rgba(255, 255, 255, 0.82);
}

.olotis-tour-sidebar h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.2rem;
}

.olotis-tour-sidebar p {
  margin: 0 0 14px;
  color: rgba(23, 35, 57, 0.64);
  font-size: 0.88rem;
  line-height: 1.6;
}

.olotis-tour-anchor-list {
  display: grid;
  gap: 8px;
}

.olotis-tour-cancel-lock {
  width: 100%;
  min-height: 34px;
  margin: 0 0 12px;
  padding: 6px 10px;
  border: 1px solid rgba(194, 164, 91, 0.58);
  background: rgba(11, 18, 32, 0.88);
  color: #f4db8f;
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
}

.olotis-tour-cancel-lock[hidden] {
  display: none;
}

.olotis-tour-anchor {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(194, 164, 91, 0.32);
  background: rgba(255, 255, 255, 0.76);
  color: rgba(23, 35, 57, 0.78);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.olotis-tour-anchor:hover,
.olotis-tour-anchor.is-active {
  border-color: rgba(194, 164, 91, 0.72);
  background: rgba(222, 199, 134, 0.22);
}

.olotis-tour-anchor strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.olotis-tour-stage::before,
.olotis-tour-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.olotis-tour-stage::before {
  box-shadow: inset 0 0 95px rgba(5, 12, 24, 0.72);
}

.olotis-tour-stage::after {
  background:
    radial-gradient(ellipse at center, transparent 52%, rgba(11, 18, 32, 0.24) 74%, rgba(11, 18, 32, 0.58) 100%),
    linear-gradient(180deg, rgba(11, 18, 32, 0.08), transparent 28%, rgba(11, 18, 32, 0.12));
}

.olotis-tour-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.olotis-tour-callout {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  --tour-callout-scale: 1;
  width: max-content;
  min-width: 168px;
  max-width: min(320px, calc(100% - 40px));
  pointer-events: none;
  perspective: none;
  transform-style: flat;
  transform: translate(0, -50%) scale(var(--tour-callout-scale));
  transform-origin: left center;
  will-change: left, top;
}

.olotis-tour-callout[hidden] {
  display: none;
}

.olotis-tour-callout-svg {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  perspective: none;
  transform: none;
  transform-style: flat;
}

.olotis-tour-callout-svg[hidden] {
  display: none;
}

.olotis-tour-callout-svg polyline,
.olotis-tour-callout-svg circle {
  fill: none;
  stroke: #f4db8f;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 7px rgba(244, 219, 143, 0.7));
}

.olotis-tour-callout-svg circle {
  fill: rgba(11, 18, 32, 0.42);
}

.olotis-tour-callout article {
  position: relative;
  width: max-content;
  min-width: 168px;
  max-width: min(320px, calc(100vw - 88px));
  padding: 12px 16px;
  border: 1px solid rgba(222, 199, 134, 0.72);
  background: rgba(11, 18, 32, 0.82);
  color: rgba(245, 239, 219, 0.92);
  box-shadow: 0 18px 45px rgba(5, 12, 24, 0.34);
  backdrop-filter: blur(10px);
}

.olotis-tour-callout strong {
  display: block;
  color: #f4db8f;
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.olotis-tour-callout p {
  margin: 6px 0 0;
  color: rgba(245, 239, 219, 0.78);
  font-size: 0.84rem;
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
}

.olotis-tour-callout small {
  display: block;
  margin-top: 8px;
  color: rgba(244, 219, 143, 0.72);
  font-size: 0.74rem;
  line-height: 1.45;
}

.olotis-tour-callout.is-left {
  transform: translate(-100%, -50%) scale(var(--tour-callout-scale));
  transform-origin: right center;
}

.olotis-tour-loading {
  position: absolute;
  inset: auto 18px 18px;
  z-index: 1;
  margin: 0;
  padding: 10px 14px;
  background: rgba(12, 18, 31, 0.72);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
  line-height: 1.6;
}

.olotis-tour-progress {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 72px;
  z-index: 2;
  max-width: 520px;
  padding: 12px 14px;
  background: rgba(12, 18, 31, 0.78);
  border: 1px solid rgba(210, 180, 100, 0.42);
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.olotis-tour-progress[hidden] {
  display: none;
}

.olotis-tour-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
  font-size: 0.88rem;
}

.olotis-tour-progress-head strong {
  color: #d9bf72;
  font-size: 0.92rem;
  white-space: nowrap;
}

.olotis-tour-progress-track {
  height: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
}

.olotis-tour-progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #b59a4e, #e7d18d);
  transition: width 0.18s ease;
}

.olotis-tour-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: rgba(23, 35, 57, 0.68);
  font-size: 0.95rem;
}

.olotis-tour-meta strong,
.olotis-tour-meta a {
  color: var(--ink);
}

.olotis-tour-meta a {
  text-decoration: none;
}

.olotis-tour-mobile-bar,
.olotis-tour-mobile-settings {
  display: none;
}

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

.photo-agreement-dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 34px;
  border: 1px solid rgba(189, 162, 99, 0.62);
  border-radius: 8px;
  background: #111d32;
  color: #eaf0f8;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.photo-agreement-dialog h2 {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(28px, 4vw, 42px);
}

.photo-agreement-dialog .photo-agreement-copy {
  max-height: 360px;
  overflow: auto;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
}

.photo-agreement-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

.photo-agreement-dialog .photo-agreement-timer {
  margin: 18px 0 10px !important;
  color: #f0d487 !important;
}

.photo-agreement-dialog .photo-agreement-check {
  color: #eaf0f8;
}

.photo-agreement-confirm {
  width: 100%;
  margin-top: 18px;
}

.album-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 26px;
  background: rgba(5, 12, 24, 0.76);
  backdrop-filter: blur(8px);
}

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

.album-dialog {
  position: relative;
  width: min(980px, 100%);
  max-height: min(820px, 90vh);
  overflow: auto;
  padding: 40px;
  border: 1px solid rgba(208, 179, 107, 0.58);
  border-radius: 12px;
  background: #f9faf8;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.album-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(8, 19, 35, 0.2);
  border-radius: 50%;
  background: transparent;
  color: #081323;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.album-dialog h2 {
  margin: 0 0 10px;
  color: #081323;
  font-size: clamp(30px, 4vw, 48px);
}

.album-dialog-description {
  margin: 0 0 24px;
  color: #5f6e84;
  line-height: 1.7;
}

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

.album-photo {
  margin: 0;
  overflow: hidden;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(8, 19, 35, 0.1);
}

.album-photo-view {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: none;
}

.album-photo-view:hover,
.album-photo-view:focus-visible {
  outline: 3px solid rgba(208, 179, 107, 0.7);
  outline-offset: -3px;
  filter: brightness(1.06);
}

.album-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 125;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(3, 9, 19, 0.88);
  backdrop-filter: blur(8px);
}

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

.photo-lightbox-dialog {
  position: relative;
  display: grid;
  place-items: center;
  width: min(1200px, 100%);
  height: min(860px, 92vh);
}

.photo-lightbox-dialog img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 1px solid rgba(242, 241, 217, 0.42);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.photo-lightbox-close {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(242, 241, 217, 0.45);
  border-radius: 50%;
  background: rgba(8, 19, 35, 0.86);
  color: #f7f9ff;
  font-size: 28px;
  line-height: 1;
  cursor: none;
}

.admin-reading-room-editor {
  display: grid;
  gap: 22px;
}

.admin-room-meta,
.admin-room-section-form,
.admin-room-item-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-government-meta,
.admin-government-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-government-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.admin-government-item {
  padding: 18px;
  border: 1px solid rgba(8, 19, 35, 0.12);
  border-radius: 8px;
  background: #f8fafc;
}

.admin-room-sections {
  display: grid;
  gap: 18px;
}

.admin-room-section,
.admin-room-item {
  padding: 18px;
  border: 1px solid rgba(8, 19, 35, 0.12);
  border-radius: 8px;
  background: #f8fafc;
}

.admin-room-item {
  margin-top: 14px;
  background: #fff;
}

.admin-room-items {
  margin-bottom: 14px;
}

.admin-add-room-item {
  margin-top: 4px;
}

.admin-album-photos {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(8, 19, 35, 0.1);
  border-radius: 7px;
  background: #f8fafc;
}

.admin-album-photos > strong {
  color: #081323;
}

.admin-album-photo-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 6px;
  background: #fff;
}

.admin-album-photo-row img {
  width: 64px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
}

.admin-album-photo-row span {
  min-width: 0;
  color: #344158;
  font-size: 13px;
  font-weight: 800;
}

.admin-album-photo-row span small {
  display: block;
  margin-top: 3px;
  color: #7b8799;
  font-weight: 500;
}

.admin-album-resource-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(8, 19, 35, 0.1);
}

.admin-album-resource-add label {
  display: grid;
  gap: 6px;
  color: #344158;
  font-size: 13px;
  font-weight: 800;
}

.admin-album-resource-add select {
  min-height: 38px;
  border: 1px solid rgba(8, 19, 35, 0.16);
  border-radius: 5px;
  background: #fff;
}

.admin-photo-review {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid rgba(8, 19, 35, 0.12);
}

.admin-photo-review h3 {
  margin: 0;
  color: #081323;
  font-size: 24px;
}

.admin-photo-submission-list {
  display: grid;
  gap: 14px;
}

.admin-photo-submission {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(189, 162, 99, 0.35);
  border-radius: 8px;
  background: #fbfaf2;
}

.admin-photo-submission > img {
  width: 180px;
  height: 130px;
  border-radius: 5px;
  object-fit: cover;
}

.admin-photo-submission-body {
  display: grid;
  gap: 8px;
  align-content: start;
}

.admin-photo-submission-body > strong {
  color: #081323;
  font-size: 18px;
}

.admin-photo-submission-body p {
  margin: 0;
  color: #5f6e84;
  font-size: 14px;
  line-height: 1.55;
}

.admin-photo-submission-body label {
  display: grid;
  grid-template-columns: auto minmax(180px, 260px);
  gap: 10px;
  align-items: center;
  color: #344158;
  font-size: 13px;
  font-weight: 800;
}

.admin-photo-submission-body select {
  height: 36px;
  border: 1px solid rgba(8, 19, 35, 0.16);
  border-radius: 4px;
  background: #fff;
}

.admin-photo-log-list {
  display: grid;
  gap: 12px;
}

.admin-photo-log {
  border: 1px solid rgba(8, 19, 35, 0.14);
  border-radius: 8px;
  background: #fbfaf2;
}

.admin-photo-log details {
  padding: 12px 14px;
}

.admin-photo-log summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  color: #344158;
  font-size: 14px;
}

.admin-photo-log summary strong {
  overflow: hidden;
  color: #081323;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-photo-log-grid {
  display: grid;
  grid-template-columns: minmax(130px, 0.35fr) minmax(0, 1fr);
  gap: 8px 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(8, 19, 35, 0.12);
  color: #5f6e84;
  font-size: 14px;
  line-height: 1.5;
}

.admin-photo-log-grid strong,
.admin-photo-log-grid code {
  overflow-wrap: anywhere;
  color: #081323;
}

@media (max-width: 760px) {
  .admin-resource-upload,
  .admin-resource-list {
    grid-template-columns: 1fr;
  }

  .admin-resource-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .admin-resource-actions {
    flex-wrap: wrap;
  }

  .admin-album-resource-add {
    grid-template-columns: 1fr;
  }

  .reading-room-page {
    padding: 48px 20px 72px;
  }

  .reading-room-tabs,
  .reading-room-grid,
  .reading-room-grid-tour,
  .admin-room-meta,
  .admin-room-section-form,
  .admin-room-item-form {
    grid-template-columns: 1fr;
  }

  .reading-room-tab {
    min-height: 58px;
  }

  .reading-room-tab small {
    display: none;
  }

  .reading-room-section-heading h2 {
    font-size: 30px;
  }

  .reading-room-upload-panel {
    grid-template-columns: 1fr;
  }

  .olotis-tour-page {
    width: min(100%, calc(100vw - 28px));
  }

  .olotis-tour-header {
    grid-template-columns: 1fr;
  }

  .olotis-tour-controls {
    display: none;
  }

  .olotis-tour-view {
    position: relative;
    grid-template-columns: 1fr;
  }

  .olotis-tour-sidebar {
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(76px + env(safe-area-inset-bottom));
    z-index: 36;
    min-height: 0;
    height: auto;
    max-height: min(52vh, 420px);
    padding: 16px;
    overflow: auto;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 18px 50px rgba(5, 12, 24, 0.26);
    transform: translateY(calc(100% + 96px));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }

  .olotis-tour-sidebar.is-mobile-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .olotis-tour-sidebar p {
    display: none;
  }

  .olotis-tour-controls label,
  .olotis-tour-controls .button,
  .olotis-tour-mode {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }

  .olotis-tour-controls label:has([data-tour-clip]) {
    flex-basis: 100%;
  }

  .olotis-tour-stage {
    min-height: 430px;
    height: min(68vh, 620px);
  }

  .olotis-tour-mobile-bar {
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 38;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(194, 164, 91, 0.32);
    background: rgba(11, 18, 32, 0.9);
    box-shadow: 0 16px 42px rgba(5, 12, 24, 0.32);
    backdrop-filter: blur(12px);
  }

  .olotis-tour-mobile-bar button,
  .olotis-tour-mobile-sheet-head button {
    min-width: 0;
    min-height: 42px;
    border: 1px solid rgba(244, 219, 143, 0.34);
    background: rgba(255, 255, 255, 0.08);
    color: #f4db8f;
    font: inherit;
    font-size: 0.86rem;
    white-space: nowrap;
  }

  .olotis-tour-mobile-bar button.is-active {
    background: rgba(244, 219, 143, 0.22);
    border-color: rgba(244, 219, 143, 0.72);
    color: #fff6d7;
  }

  .olotis-tour-mobile-settings {
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(76px + env(safe-area-inset-bottom));
    z-index: 37;
    display: grid;
    gap: 10px;
    max-height: min(52vh, 420px);
    overflow: auto;
    padding: 14px;
    border: 1px solid rgba(194, 164, 91, 0.38);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 50px rgba(5, 12, 24, 0.26);
  }

  .olotis-tour-mobile-settings[hidden] {
    display: none;
  }

  .olotis-tour-mobile-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .olotis-tour-mobile-sheet-head strong {
    color: var(--ink);
    font-size: 1rem;
  }

  .olotis-tour-mobile-sheet-head button {
    min-height: 34px;
    padding: 0 12px;
    background: rgba(11, 18, 32, 0.88);
  }

  .olotis-tour-mobile-settings label {
    display: grid;
    gap: 6px;
    color: rgba(23, 35, 57, 0.72);
    font-size: 0.9rem;
  }

  .olotis-tour-mobile-settings select,
  .olotis-tour-mobile-settings input[type="range"] {
    width: 100%;
  }

  .olotis-tour-mobile-settings select {
    min-height: 38px;
    border: 1px solid rgba(194, 164, 91, 0.32);
    background: rgba(255, 255, 255, 0.86);
    color: var(--ink);
    font: inherit;
  }

  .olotis-tour-mobile-settings input[type="range"],
  .olotis-tour-mobile-settings input[type="checkbox"] {
    accent-color: var(--gold);
  }

  .olotis-tour-mobile-settings .button {
    width: 100%;
    min-height: 42px;
  }

  .olotis-tour-meta {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .album-dialog {
    padding: 30px 20px;
  }

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

  .admin-photo-submission {
    grid-template-columns: 1fr;
  }

  .admin-photo-submission > img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .admin-photo-log-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .admin-album-photo-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .admin-album-photo-row img {
    width: 52px;
    height: 42px;
  }

  .admin-album-photo-row button {
    grid-row: 2;
  }
}

@media (max-width: 980px), (hover: none) and (pointer: coarse) {
  .olotis-tour-page .olotis-tour-controls {
    display: none;
  }

  .olotis-tour-page .olotis-tour-view {
    position: relative;
    grid-template-columns: 1fr;
  }

  .olotis-tour-page .olotis-tour-stage {
    min-height: 430px;
    height: min(68vh, 620px);
  }

  .olotis-tour-page .olotis-tour-mobile-bar {
    position: fixed;
    left: max(calc(var(--rail-width) + 12px), env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(92px + env(safe-area-inset-bottom));
    z-index: 150;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(194, 164, 91, 0.36);
    background: rgba(11, 18, 32, 0.92);
    box-shadow: 0 16px 42px rgba(5, 12, 24, 0.34);
    backdrop-filter: blur(12px);
  }

  .olotis-tour-page .olotis-tour-mobile-bar button {
    min-width: 0;
    min-height: 42px;
    padding: 0 6px;
    border: 1px solid rgba(244, 219, 143, 0.34);
    background: rgba(255, 255, 255, 0.08);
    color: #f4db8f;
    font: inherit;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .olotis-tour-page .olotis-tour-mobile-bar button.is-active {
    background: rgba(244, 219, 143, 0.24);
    border-color: rgba(244, 219, 143, 0.76);
    color: #fff6d7;
  }

  .olotis-tour-page .olotis-tour-sidebar,
  .olotis-tour-page .olotis-tour-mobile-settings {
    position: fixed;
    left: max(calc(var(--rail-width) + 12px), env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(152px + env(safe-area-inset-bottom));
    z-index: 149;
    max-height: min(46vh, 420px);
  }

  .olotis-tour-page .olotis-tour-sidebar {
    min-height: 0;
    height: auto;
    padding: 16px;
    overflow: auto;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 50px rgba(5, 12, 24, 0.28);
    transform: translateY(calc(100% + 190px));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }

  .olotis-tour-page .olotis-tour-sidebar.is-mobile-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .olotis-tour-page .olotis-tour-mobile-settings {
    display: grid;
    gap: 10px;
    overflow: auto;
    padding: 14px;
    border: 1px solid rgba(194, 164, 91, 0.38);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 50px rgba(5, 12, 24, 0.28);
  }

  .olotis-tour-page .olotis-tour-mobile-settings[hidden] {
    display: none;
  }

  .olotis-tour-page .olotis-tour-meta {
    padding-bottom: calc(156px + env(safe-area-inset-bottom));
  }
}

.religion-page {
  padding-top: 72px;
  background:
    radial-gradient(circle at 80% 12%, rgba(208, 179, 107, 0.12), transparent 28%),
    #fff;
}

.religion-heading {
  width: min(980px, calc(100% - 36px));
  margin: 0 auto 54px;
  text-align: center;
}

.religion-heading h1 {
  margin: 10px 0 18px;
  color: var(--ink);
  font-size: clamp(48px, 7vw, 84px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.religion-heading > p:last-child {
  margin: 0 auto;
  max-width: 760px;
  color: #4b5b74;
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.7;
}

.eyebrow {
  margin: 0;
  color: var(--gold-dim);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.religion-hero {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(30px, 6vw, 86px);
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto 110px;
  padding: clamp(22px, 4vw, 48px);
  border: 1px solid rgba(208, 179, 107, 0.26);
  border-radius: 10px;
  background: var(--navy);
  color: #f5f7fb;
  box-shadow: 0 22px 54px rgba(8, 19, 35, 0.18);
}

.religion-portrait {
  margin: 0;
  text-align: center;
}

.religion-portrait img {
  display: block;
  width: 100%;
  max-height: 460px;
  border-radius: 8px;
  object-fit: cover;
}

.revered-portrait img {
  aspect-ratio: 0.76;
}

.religion-portrait figcaption {
  margin-top: 12px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 900;
}

.religion-hero-copy h2,
.religion-section-heading h2,
.religion-leader-copy h2 {
  margin: 10px 0 20px;
  color: inherit;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
}

.religion-hero-copy p:not(.eyebrow),
.religion-leader-copy p:not(.eyebrow) {
  color: #cbd4e1;
  font-size: 18px;
  line-height: 1.8;
}

.religion-hero-copy blockquote {
  margin: 28px 0 0;
  padding-left: 18px;
  border-left: 3px solid var(--gold);
  color: #fff0bd;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.6;
}

.religion-section {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto 104px;
}

.religion-section-heading {
  margin-bottom: 32px;
  text-align: center;
}

.religion-section-heading h2 {
  color: var(--ink);
}

.religion-book-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 28px;
  align-items: stretch;
}

.religion-book-layout > div:first-child,
.religion-quote-panel {
  padding: 34px;
  border: 1px solid rgba(8, 19, 35, 0.1);
  border-radius: 8px;
  background: var(--cream);
}

.religion-book-layout p {
  margin: 0 0 20px;
  color: #28364d;
  font-size: 18px;
  line-height: 1.8;
}

.religion-book-link {
  margin-top: 10px;
}

.religion-book-reader {
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid rgba(8, 19, 35, 0.14);
  border-radius: 8px;
  background: #e9e8d7;
  box-shadow: 0 14px 34px rgba(8, 19, 35, 0.12);
}

.religion-book-reader-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  background: var(--navy);
}

.religion-book-reader-head h3 {
  margin: 7px 0 0;
  color: #fff;
  font-size: 20px;
}

.religion-book-reader-head > span {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 14px;
  font-weight: 900;
}

.resonance-book {
  max-height: 920px;
  overflow: auto;
  padding: clamp(18px, 4vw, 50px);
  background:
    linear-gradient(120deg, rgba(208, 179, 107, 0.12), transparent 28%),
    #f5f3df;
}

.resonance-cover {
  display: grid;
  min-height: 280px;
  place-items: center;
  align-content: center;
  padding: 40px 24px;
  border: 1px solid rgba(208, 179, 107, 0.44);
  background:
    radial-gradient(circle at 50% 30%, rgba(208, 179, 107, 0.22), transparent 35%),
    var(--navy);
  color: #fff;
  text-align: center;
}

.resonance-cover h4 {
  margin: 12px 0 6px;
  color: #fff;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
}

.resonance-cover > p:not(.eyebrow) {
  margin: 0;
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
}

.resonance-cover blockquote {
  max-width: 600px;
  margin: 30px 0 0;
  color: #d7dfeb;
  font-size: 18px;
  line-height: 1.7;
}

.resonance-chapter {
  max-width: 820px;
  margin: 24px auto;
  padding: 30px clamp(22px, 4vw, 52px);
  border: 1px solid rgba(8, 19, 35, 0.12);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 26px rgba(8, 19, 35, 0.08);
}

.resonance-volume {
  max-width: 820px;
  margin: 34px auto 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(189, 162, 99, 0.56);
  border-bottom: 1px solid rgba(189, 162, 99, 0.56);
  text-align: center;
}

.resonance-volume .chapter-label {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.resonance-afterword {
  background: rgba(247, 244, 225, 0.92);
}

.resonance-signature {
  color: var(--gold-dim) !important;
  font-weight: 900;
  text-align: right;
}

.chapter-label {
  margin: 0 0 10px;
  color: var(--gold-dim);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.resonance-chapter h4 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: clamp(25px, 3.2vw, 38px);
  line-height: 1.2;
}

.resonance-chapter p,
.resonance-chapter li {
  color: #28364d;
  font-size: 17px;
  line-height: 1.85;
}

.resonance-chapter ul {
  margin: 16px 0;
  padding-left: 22px;
}

.resonance-practice-list {
  display: grid;
  gap: 14px;
}

.resonance-practice-list p {
  margin: 0;
  padding: 14px 16px;
  border-left: 3px solid var(--gold);
  background: rgba(242, 241, 217, 0.7);
}

.resonance-closing {
  color: var(--gold-dim) !important;
  font-weight: 900;
}

.religion-quote-panel {
  display: grid;
  align-content: center;
  background: var(--navy);
  color: #fff;
}

.religion-quote-panel strong {
  color: var(--gold);
  font-size: 25px;
}

.religion-quote-panel p {
  margin-top: 18px;
  color: #d4dce8;
}

.religion-principles {
  padding: 70px 0;
  border-top: 1px solid rgba(208, 179, 107, 0.22);
  border-bottom: 1px solid rgba(208, 179, 107, 0.22);
}

.religion-principle-grid,
.religion-practice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.religion-principle-grid article,
.religion-practice-grid article {
  min-height: 220px;
  padding: 28px;
  border: 1px solid rgba(8, 19, 35, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(8, 19, 35, 0.08);
}

.religion-principle-grid span {
  color: var(--gold-dim);
  font-size: 13px;
  font-weight: 900;
}

.religion-principle-grid h3,
.religion-practice-grid h3 {
  margin: 17px 0 12px;
  color: var(--ink);
  font-size: 24px;
}

.religion-principle-grid p,
.religion-practice-grid p {
  margin: 0;
  color: #4b5b74;
  font-size: 16px;
  line-height: 1.7;
}

.religion-practice-grid article {
  background: #f7f6e4;
}

.religion-leadership {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.7fr);
  gap: 56px;
  align-items: center;
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto 96px;
  padding: 54px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
}

.pope-portrait img {
  aspect-ratio: 0.88;
  object-fit: contain;
  background: radial-gradient(circle, rgba(208, 179, 107, 0.22), transparent 68%);
  transform: scale(var(--pope-scale, 1));
  transform-origin: center bottom;
  transition: opacity 380ms ease, transform 220ms ease, filter 220ms ease;
}

.pope-portrait {
  position: relative;
  transition: transform 220ms ease;
  outline: 0;
  overflow: visible;
}

.pope-strike-source {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.pope-strike-canvas {
  position: absolute;
  z-index: 2;
  display: block;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 0.8px rgba(235, 244, 255, 0.3));
  opacity: 0;
  pointer-events: none;
}

body.pope-easter-egg-active .pope-portrait > img {
  opacity: 0;
}

body.pope-easter-egg-active .pope-strike-canvas {
  opacity: 1;
}

body.pope-easter-egg-settling.pope-easter-egg-active .pope-portrait > img {
  opacity: 1;
}

body.pope-easter-egg-settling.pope-easter-egg-active .pope-strike-canvas {
  opacity: 0;
  transition: opacity 380ms ease;
}

.pope-magic-circle {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 1;
  width: min(76%, 270px);
  aspect-ratio: 2.65;
  border: 2px solid rgba(208, 179, 107, 0.9);
  border-radius: 50%;
  background:
    radial-gradient(ellipse, transparent 43%, rgba(208, 179, 107, 0.2) 45%, transparent 49%),
    conic-gradient(from 18deg, transparent, rgba(208, 179, 107, 0.62), transparent 18%, rgba(208, 179, 107, 0.52), transparent 42%, rgba(208, 179, 107, 0.6), transparent 68%);
  box-shadow: 0 0 0 5px rgba(208, 179, 107, 0.12), 0 0 28px rgba(208, 179, 107, 0.42);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) perspective(280px) rotateX(66deg) scale(0.12) rotateZ(-18deg);
}

.pope-magic-star {
  position: absolute;
  inset: 14%;
  display: block;
  background:
    linear-gradient(30deg, transparent 47%, rgba(239, 211, 132, 0.92) 48%, rgba(239, 211, 132, 0.92) 52%, transparent 53%),
    linear-gradient(150deg, transparent 47%, rgba(239, 211, 132, 0.92) 48%, rgba(239, 211, 132, 0.92) 52%, transparent 53%),
    linear-gradient(90deg, transparent 47%, rgba(239, 211, 132, 0.72) 48%, rgba(239, 211, 132, 0.72) 52%, transparent 53%);
  clip-path: polygon(50% 0%, 61% 36%, 100% 25%, 68% 50%, 100% 75%, 61% 64%, 50% 100%, 39% 64%, 0% 75%, 32% 50%, 0% 25%, 39% 36%);
  filter: drop-shadow(0 0 8px rgba(239, 211, 132, 0.65));
  opacity: 0;
  transform: scale(0.2) rotate(0deg);
}

.pope-magic-circle::before,
.pope-magic-circle::after {
  position: absolute;
  content: "";
  inset: 15%;
  border: 1px solid rgba(239, 211, 132, 0.84);
  border-radius: 50%;
}

.pope-magic-circle::after {
  inset: 28%;
  border-style: dashed;
  transform: rotate(28deg);
}

body.pope-easter-egg-active .pope-portrait img {
  animation: pope-staff-cast 1100ms cubic-bezier(.2, .85, .25, 1) both;
}

body.pope-easter-egg-active .pope-magic-circle {
  animation: pope-magic-circle 1800ms cubic-bezier(.16, .82, .24, 1) 120ms both;
}

body.pope-easter-egg-active .pope-magic-star {
  animation: pope-magic-star 820ms cubic-bezier(.16, .82, .24, 1) 160ms both;
}

.pope-proximity-ui {
  position: absolute;
  right: 10px;
  bottom: 42px;
  padding: 7px 10px;
  border: 1px solid rgba(208, 179, 107, 0.4);
  background: rgba(8, 19, 35, 0.78);
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}

body.cursor-pope-near .pope-portrait img {
  filter: brightness(1.08) drop-shadow(0 0 20px rgba(208, 179, 107, 0.34));
}

body.cursor-pope-near .pope-proximity-ui {
  opacity: 1;
  transform: translateY(0);
}

.pope-easter-egg-toast {
  position: fixed;
  left: 50%;
  bottom: 104px;
  z-index: 75;
  display: grid;
  gap: 4px;
  min-width: 230px;
  padding: 14px 18px;
  border: 1px solid rgba(208, 179, 107, 0.58);
  background: rgba(8, 19, 35, 0.92);
  color: #d7dfeb;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px) scale(0.96);
}

.pope-easter-egg-toast strong {
  color: var(--gold);
  font-size: 16px;
}

.pope-easter-egg-toast span {
  font-size: 13px;
}

body.pope-easter-egg-active .pope-easter-egg-toast {
  animation: pope-easter-egg-pop 2600ms ease both;
}

.pope-lottery-modal[hidden],
.pope-certificate[hidden],
.pope-lottery-form[hidden] {
  display: none;
}

.pope-lottery-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 12, 25, 0.72);
  backdrop-filter: blur(5px);
}

.pope-lottery-dialog {
  position: relative;
  width: min(460px, 100%);
  padding: 34px;
  border: 1px solid rgba(208, 179, 107, 0.68);
  border-radius: 10px;
  background: linear-gradient(145deg, #101c31, #071224);
  color: #eef3fa;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48), 0 0 0 6px rgba(208, 179, 107, 0.08);
}

.pope-lottery-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(222, 231, 241, 0.24);
  border-radius: 50%;
  background: transparent;
  color: #dce6f2;
  font-size: 23px;
  line-height: 1;
}

.pope-lottery-dialog h2 {
  margin: 10px 0 12px;
  color: #fff;
  font-size: clamp(26px, 4vw, 36px);
}

.pope-lottery-intro {
  margin: 0 0 24px;
  color: #c7d2df;
  line-height: 1.7;
}

.pope-lottery-form {
  display: grid;
  gap: 10px;
}

.pope-lottery-form label {
  color: var(--gold);
  font-weight: 900;
}

.pope-lottery-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(208, 179, 107, 0.44);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  outline: none;
}

.pope-lottery-form input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(208, 179, 107, 0.16);
}

.pope-lottery-error {
  margin: 0;
  color: #ffb7a9;
  font-size: 13px;
  line-height: 1.5;
}

.pope-lottery-error[hidden] {
  display: none;
}

.pope-lottery-form .button {
  width: 100%;
  margin-top: 8px;
}

.pope-certificate {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(208, 179, 107, 0.76);
  border-radius: 12px;
  background: #f5efd8;
  color: #17233a;
  box-shadow: inset 0 0 0 5px rgba(208, 179, 107, 0.14);
}

.pope-certificate-avatar {
  position: absolute;
  top: 22px;
  right: 104px;
  z-index: 2;
  width: 58px;
  height: 58px;
  border: 2px solid rgba(139, 99, 27, 0.7);
  border-radius: 50%;
  object-fit: cover;
}

.pope-certificate > *:not(.pope-certificate-pattern):not(.pope-certificate-seal):not(.pope-certificate-avatar) {
  position: relative;
  z-index: 1;
}

.pope-certificate h3 {
  margin: 10px 0 20px;
  color: #17233a;
  font-size: 24px;
}

.pope-certificate p {
  margin: 9px 0;
}

.pope-certificate code {
  color: #715a24;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.pope-certificate-note {
  padding-top: 14px;
  border-top: 1px solid rgba(113, 90, 36, 0.24);
  color: #5e6571;
  font-size: 13px;
}

.pope-certificate-seal {
  position: absolute;
  top: 18px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border: 2px solid rgba(139, 99, 27, 0.66);
  border-radius: 50%;
  color: #8b631b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
  transform: rotate(-12deg);
}

.pope-certificate-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(139, 99, 27, 0.28) 13px 14px, transparent 15px 28px);
  pointer-events: none;
}

.pope-certificate-download {
  position: relative;
  z-index: 2;
  min-height: 42px;
  margin-top: 12px;
  padding: 0 16px;
  border: 1px solid rgba(113, 90, 36, 0.58);
  border-radius: 6px;
  background: #cdb16a;
  color: #17233a;
  font: inherit;
  font-weight: 900;
  cursor: none;
}

.pope-certificate-download:hover,
.pope-certificate-download:focus-visible {
  background: #e1c77e;
  box-shadow: 0 0 0 3px rgba(208, 179, 107, 0.2);
  outline: none;
}

.account-link {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(208, 179, 107, 0.58);
  border-radius: 6px;
  background: rgba(208, 179, 107, 0.1);
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.language-ancient-elvish .page,
html.language-ancient-elvish .content-page,
html.language-ancient-elvish .content-card,
html.language-ancient-elvish .top-actions,
html.language-ancient-elvish .account-dialog {
  min-width: 0;
}

html.language-ancient-elvish .page p,
html.language-ancient-elvish .page li,
html.language-ancient-elvish .page h1,
html.language-ancient-elvish .page h2,
html.language-ancient-elvish .page h3,
html.language-ancient-elvish .page .button,
html.language-ancient-elvish .page a {
  overflow-wrap: anywhere;
}

.account-link:hover,
.account-link:focus-visible {
  background: rgba(208, 179, 107, 0.2);
  box-shadow: 0 0 0 3px rgba(208, 179, 107, 0.12);
  outline: none;
}

.account-modal[hidden],
.account-email-panel[hidden],
.secure-register-form[hidden],
.secure-login-panel[hidden],
.account-bind-form[hidden],
.account-bound-panel[hidden],
.account-test-button[hidden] {
  display: none;
}

.account-modal {
  position: fixed;
  inset: 0;
  z-index: 92;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 12, 25, 0.74);
  backdrop-filter: blur(5px);
}

.account-dialog {
  position: relative;
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 34px;
  border: 1px solid rgba(208, 179, 107, 0.64);
  border-radius: 10px;
  background: linear-gradient(145deg, #101c31, #071224);
  color: #eef3fa;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.account-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(222, 231, 241, 0.24);
  border-radius: 50%;
  background: transparent;
  color: #dce6f2;
  font-size: 23px;
  line-height: 1;
}

.account-dialog h2 {
  margin: 10px 0 8px;
  color: #fff;
  font-size: clamp(26px, 4vw, 38px);
}

.account-status {
  margin: 0 0 20px;
  color: #cbd6e3;
}

.account-email-panel {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid rgba(208, 179, 107, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.account-email-panel strong {
  color: var(--gold);
  font-size: 20px;
}

.account-email-panel p,
.account-bind-form p,
.account-bound-panel p,
.account-rules p {
  color: #c1ccda;
  font-size: 14px;
  line-height: 1.7;
}

.account-email-form,
.account-code-form {
  display: grid;
  gap: 9px;
}

.account-email-form label,
.account-code-form label {
  color: var(--gold);
  font-weight: 900;
}

.account-email-form input,
.account-code-form input {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(208, 179, 107, 0.44);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  outline: none;
}

.account-email-form input:focus,
.account-code-form input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(208, 179, 107, 0.16);
}

.secure-register-form,
.secure-login-form {
  display: grid;
  gap: 9px;
}

.secure-register-form label,
.secure-login-form label {
  color: var(--gold);
  font-weight: 900;
}

.secure-register-form input,
.secure-login-form input {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(208, 179, 107, 0.44);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  outline: none;
}

.secure-register-form input:focus,
.secure-login-form input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(208, 179, 107, 0.16);
}

.secure-login-panel {
  margin-top: 20px;
}

.account-send-code {
  min-height: 44px;
}

.account-email-note {
  display: block;
  color: #9aa9bb;
  line-height: 1.5;
}

.account-email-note.is-error {
  color: #e08a8a;
}

.account-bind-form,
.account-bound-panel,
.account-rules {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(222, 231, 241, 0.14);
}

.account-bind-form {
  display: grid;
  gap: 10px;
}

.account-bind-form label {
  color: var(--gold);
  font-weight: 900;
}

.account-bind-form input {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(208, 179, 107, 0.44);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  outline: none;
}

.account-bind-form input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(208, 179, 107, 0.16);
}

.account-bound-panel {
  display: grid;
  gap: 7px;
}

.account-bound-panel strong {
  color: var(--gold);
}

.account-bound-id {
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.account-rules h3 {
  margin: 0 0 8px;
  color: #fff;
}

.account-rules p {
  margin: 6px 0;
}

.account-rules a {
  display: inline-block;
  margin-top: 8px;
  color: var(--gold);
  font-weight: 900;
}

.privacy-card {
  width: min(900px, calc(100% - 36px));
  margin: 64px auto;
}

.privacy-card h2 {
  margin: 34px 0 8px;
  color: var(--navy);
  font-size: 24px;
}

.privacy-card p {
  color: #4b5b74;
  line-height: 1.85;
}

.privacy-card a {
  color: #8b6a22;
  font-weight: 900;
}

.privacy-card .privacy-note {
  margin-top: 36px;
  padding: 16px 18px;
  border-left: 3px solid var(--gold);
  background: #f7f6e4;
  color: #5d6677;
  font-size: 14px;
}

@keyframes pope-staff-cast {
  0% {
    transform: translateY(0) rotate(0deg) scale(var(--pope-scale, 1));
    filter: brightness(1) drop-shadow(0 0 0 rgba(208, 179, 107, 0));
  }

  22% {
    transform: translateY(-18px) rotate(-3deg) scale(var(--pope-scale, 1));
    filter: brightness(1.12) drop-shadow(0 0 18px rgba(208, 179, 107, 0.48));
  }

  42% {
    transform: translateY(-24px) rotate(4deg) scale(var(--pope-scale, 1));
    filter: brightness(1.2) drop-shadow(0 0 28px rgba(208, 179, 107, 0.7));
  }

  58% {
    transform: translateY(10px) rotate(-1deg) scale(var(--pope-scale, 1.02));
    filter: brightness(1.26) drop-shadow(0 0 34px rgba(208, 179, 107, 0.88));
  }

  68%, 100% {
    transform: translateY(0) rotate(0deg) scale(var(--pope-scale, 1));
    filter: brightness(1) drop-shadow(0 0 0 rgba(208, 179, 107, 0));
  }
}

@keyframes pope-magic-circle {
  0% {
    opacity: 0;
    transform: translateX(-50%) perspective(280px) rotateX(66deg) scale(0.12) rotateZ(-18deg);
  }

  20% {
    opacity: 0.36;
    transform: translateX(-50%) perspective(280px) rotateX(66deg) scale(0.3) rotateZ(-6deg);
  }

  48% {
    opacity: 0.92;
    transform: translateX(-50%) perspective(280px) rotateX(66deg) scale(0.72) rotateZ(48deg);
  }

  100% {
    opacity: 0.72;
    transform: translateX(-50%) perspective(280px) rotateX(66deg) scale(1) rotateZ(180deg);
  }
}

@keyframes pope-magic-star {
  0% {
    opacity: 0;
    transform: scale(0.2) rotate(0deg);
  }

  22% {
    opacity: 1;
    transform: scale(1.08) rotate(12deg);
  }

  52% {
    opacity: 0.84;
    transform: scale(0.96) rotate(30deg);
  }

  100% {
    opacity: 0.44;
    transform: scale(0.84) rotate(78deg);
  }
}

@keyframes pope-easter-egg-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, 14px) scale(0.96);
  }

  14%, 78% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -8px) scale(0.98);
  }
}

@media (max-width: 820px) {
  .religion-hero,
  .religion-book-layout,
  .religion-leadership {
    grid-template-columns: 1fr;
  }

  .religion-principle-grid,
  .religion-practice-grid {
    grid-template-columns: 1fr;
  }

  .religion-leadership {
    padding: 28px;
  }

  .religion-book-reader-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .resonance-book {
    max-height: 760px;
    padding: 14px;
  }

  .resonance-chapter {
    padding: 24px 20px;
  }
}

@media (max-width: 1180px) {
  .info-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .topbar {
    height: 82px;
  }

  .rail {
    top: 82px;
  }

  .page {
    padding-top: 82px;
  }

  .menu-drawer {
    inset: 82px auto 0 0;
  }
}

@media (max-width: 820px) {
  .topbar {
    position: relative;
    height: auto;
    min-height: 92px;
    padding: 14px 18px;
  }

  .top-actions {
    display: none;
  }

  .rail {
    position: sticky;
    top: 0;
    width: 100%;
    background: var(--navy);
    height: 64px;
    flex-direction: row;
    justify-content: space-between;
    padding: 0 18px;
  }

  .rail-menu {
    margin-top: 0;
  }

  .menu-drawer {
    inset: 156px 0 auto 0;
    width: 0;
  }

  .menu-drawer.is-open {
    width: 100%;
  }

  .drawer-panel {
    width: 100%;
    min-width: 0;
    height: auto;
    max-height: calc(100vh - 156px);
    overflow: auto;
  }

  .page {
    margin-left: 0;
    padding-top: 0;
  }

  body.drawer-open .page {
    margin-left: 0;
  }

  .home-hero {
    min-height: calc(100vh - 156px);
  }

  .info-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .currency-display {
    grid-template-columns: 1fr;
  }

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

  .diplomatic-registry-grid {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    padding: 28px 18px 56px;
  }

  .admin-panel {
    padding: 20px 16px;
  }

  .admin-draft-box {
    padding: 18px 14px;
  }

  .admin-draft-list {
    grid-template-columns: 1fr;
  }

  .admin-draft-row {
    grid-template-columns: 1fr;
  }

  .admin-form,
  .admin-login-form,
  .admin-team-form {
    grid-template-columns: 1fr;
  }

  .admin-account-search,
  .admin-account-row {
    grid-template-columns: 1fr;
  }

  .admin-panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-tabs {
    width: 100%;
  }

  .admin-tab {
    flex: 1 1 30%;
    padding-inline: 8px;
  }

  .admin-actions {
    justify-content: flex-start;
  }

  .history-timeline::before {
    left: 28px;
  }

  .timeline-event,
  .timeline-event.left,
  .timeline-event.right {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .timeline-event.left .event-card,
  .timeline-event.right .event-card {
    grid-column: 2;
    text-align: left;
  }

  .timeline-node {
    grid-column: 1;
  }

  .timeline-event.left .date-tooltip,
  .timeline-event.right .date-tooltip {
    left: 44px;
    right: auto;
  }

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

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

  .org-detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .top-brand {
    gap: 14px;
  }

  .top-brand img {
    width: 48px;
    height: 48px;
  }

  .top-brand strong {
    font-size: 24px;
  }

  .top-brand small {
    font-size: 15px;
  }

  .hero-actions .button,
  .button {
    width: min(100%, 280px);
    min-height: 58px;
    font-size: 18px;
  }

  .overview-band {
    padding: 24px 18px 64px;
  }

  .account-dialog {
    padding: 28px 20px;
  }

  .account-qq-panel {
    grid-template-columns: 1fr;
  }

  .qq-qr {
    margin: 0 auto;
  }
}

@media (max-width: 760px) {
  .registry-section .diplomatic-registry-grid,
  .admin-diplomatic-permissions,
  .registry-submission,
  .registry-submission-form {
    grid-template-columns: 1fr;
  }

  .registry-section {
    padding: 18px;
  }

  .registry-section-header {
    align-items: flex-start;
  }

  .registry-section-rule {
    display: none;
  }
}

.diplomatic-submission-entry {
  margin-top: 28px;
}

.submission-upload-field[hidden],
.submission-library-field[hidden] {
  display: none;
}

.registry-access-panel {
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
  padding: 28px 30px;
  border: 1px solid rgba(210, 96, 90, 0.3);
  border-left: 5px solid #d2605a;
  border-radius: 10px;
  background: linear-gradient(135deg, #fffaf8, #f9fbfd);
}

.registry-access-panel h2,
.registry-access-panel p {
  margin: 0;
}

.registry-access-panel .button {
  justify-self: start;
  margin-top: 8px;
}

.diplomatic-record-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.diplomatic-record-action,
.admin-proposal-action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid currentColor;
  border-radius: 7px;
  text-decoration: none;
  cursor: pointer;
}

.diplomatic-submission-record {
  align-items: flex-start;
}

.diplomatic-submission-record > div:first-child {
  min-width: 0;
}

.diplomatic-submission-record small {
  display: block;
  margin-top: 8px;
  color: #7b8799;
}

.diplomatic-edit-note {
  grid-column: 1 / -1;
  margin: 0;
  color: #6d7c91;
}

.diplomatic-separation-check {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #344158;
}

.diplomatic-separation-check input {
  width: 18px;
  height: 18px;
}

.admin-proposal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(112px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.admin-diplomatic-proposal .button {
  border-width: 1px;
  border-style: solid;
  min-height: 42px;
}

.registry-album-viewer {
  margin-top: 30px;
  padding: 26px;
  border: 1px solid rgba(201, 174, 107, 0.38);
  border-radius: 8px;
  background: #fbfaf2;
}

.registry-album-viewer .admin-panel-header {
  margin-bottom: 18px;
}

.registry-album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.registry-album-grid figure {
  margin: 0;
}

.registry-album-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: #eef0f4;
}

.registry-album-grid figcaption {
  margin-top: 6px;
  color: #6e7c90;
  font-size: 13px;
}

.registry-country-link {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 0;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: #0b1426;
  font: inherit;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.registry-album-button {
  align-self: flex-start;
  margin-top: 18px;
}

.registry-country-link:hover,
.registry-country-link:focus-visible {
  color: #9f813b;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.admin-tour-anchor-panel {
  margin-top: 26px;
}

.admin-tour-anchor-editor {
  display: grid;
  gap: 16px;
}

.admin-tour-anchor {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(201, 174, 107, 0.36);
  background: #fff;
}

.admin-tour-anchor-fields small {
  color: #7b8799;
  font-size: 12px;
}

.admin-tour-3d-editor {
  display: grid;
  gap: 8px;
}

.admin-tour-clip-control {
  display: grid;
  grid-template-columns: auto auto minmax(180px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(201, 174, 107, 0.34);
  background: rgba(255, 255, 255, 0.78);
  color: #52637a;
  font-weight: 800;
}

.admin-tour-clip-control span {
  color: #0b1426;
  font-family: "Courier New", monospace;
  font-weight: 900;
}

.admin-tour-clip-control input {
  width: 100%;
}

.admin-tour-axis-tools {
  display: grid;
  grid-template-columns: repeat(3, 64px);
  gap: 8px;
  align-items: center;
}

.admin-tour-axis-tools button {
  min-height: 38px;
  border: 1px solid rgba(8, 19, 35, 0.16);
  border-radius: 6px;
  background: #fff;
  color: #52637a;
  font-weight: 900;
  cursor: pointer;
}

.admin-tour-axis-tools button[data-tour-axis-select="x"].is-active {
  background: rgba(216, 75, 75, 0.16);
  border-color: #d84b4b;
  color: #9f2d2d;
}

.admin-tour-axis-tools button[data-tour-axis-select="y"].is-active {
  background: rgba(73, 180, 98, 0.16);
  border-color: #49b462;
  color: #2f7f43;
}

.admin-tour-axis-tools button[data-tour-axis-select="z"].is-active {
  background: rgba(75, 120, 216, 0.16);
  border-color: #4b78d8;
  color: #315bb5;
}

.admin-tour-3d-stage {
  position: relative;
  min-height: 360px;
  height: clamp(360px, 44vw, 560px);
  overflow: hidden;
  border: 1px solid rgba(194, 164, 91, 0.34);
  background: #0b1220;
}

.admin-tour-3d-stage canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.admin-tour-drag-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: grab;
  touch-action: none;
}

.admin-tour-drag-layer:active {
  cursor: grabbing;
}

/* Dual-endpoint responsive hardening. These rules only reshape existing
   surfaces; all controls and data flows remain owned by their original JS. */
img,
video,
canvas,
iframe {
  max-width: 100%;
}

input,
textarea,
select,
button {
  max-width: 100%;
}

@media (hover: none), (pointer: coarse) {
  body,
  html body *,
  a,
  button,
  input,
  textarea,
  select,
  summary {
    cursor: auto !important;
  }

  .custom-cursor,
  .cursor-trail {
    display: none !important;
  }
}

@media (max-width: 980px) {
  .content-page {
    width: min(100%, calc(100vw - 28px));
    padding-inline: 0;
  }

  .content-card,
  .content-card.content-card-wide,
  .privacy-card {
    width: 100%;
    margin-inline: auto;
    padding: 28px 22px;
  }

  .about-layout,
  .org-detail,
  .currency-display,
  .diplomacy-grid,
  .diplomatic-registry-grid,
  .registry-section .diplomatic-registry-grid,
  .registry-submission,
  .registry-submission-form,
  .transport-list,
  .reading-room-grid,
  .reading-room-grid-tour,
  .reading-room-upload-panel,
  .reading-room-upload-form,
  .admin-diplomatic-permissions,
  .admin-diplomatic-image-source,
  .admin-resource-list,
  .admin-account-row,
  .admin-photo-submission,
  .admin-government-meta,
  .admin-government-form,
  .admin-room-meta,
  .admin-room-section-form,
  .admin-room-item-form {
    grid-template-columns: 1fr;
  }

  .news-grid,
  .news-grid.news-grid-expandable {
    grid-template-columns: 1fr;
  }

  .reading-room-tabs,
  .album-photo-grid,
  .registry-album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-resource-card {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .admin-transport-photo-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  }

  .admin-transport-photo-row label {
    min-width: 0;
  }
}

@media (max-width: 820px) {
  :root {
    --rail-width: 60px;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    padding: 12px 14px;
  }

  .top-brand {
    min-width: 0;
  }

  .top-brand img {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
  }

  .top-brand strong,
  .top-brand small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top-actions {
    display: flex;
    width: 100%;
    max-width: 100%;
    gap: 10px;
    flex-wrap: wrap;
    overflow: visible;
  }

  .top-actions > * {
    flex: 0 1 auto;
  }

  .language-switcher,
  .language-switcher.is-ancient-unlocked {
    flex: 1 1 252px;
    width: min(100%, 336px);
  }

  .mail-link span:last-child {
    display: none;
  }

  .account-link {
    max-width: 168px;
  }

  .rail {
    top: 0;
    height: 58px;
    min-height: 58px;
    padding-inline: 10px;
  }

  .menu-drawer {
    inset: auto 0 0 0;
    top: auto;
    bottom: 0;
    width: 100%;
    height: 58px;
    background: transparent;
    pointer-events: none;
  }

  .menu-drawer .rail-menu,
  body.drawer-icon-open .menu-drawer .rail-menu,
  body.drawer-open .menu-drawer .rail-menu {
    position: fixed !important;
    top: auto !important;
    left: 14px !important;
    bottom: 10px !important;
    z-index: 88;
    border-radius: 50%;
    background: rgba(8, 19, 35, 0.92);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    pointer-events: auto;
  }

  .menu-drawer.is-open {
    height: 100vh;
    background: rgba(4, 12, 25, 0.42);
    pointer-events: auto;
  }

  .drawer-panel {
    position: absolute;
    left: 0;
    bottom: 0;
    width: min(86vw, 360px);
    min-width: 0;
    height: min(78vh, 680px);
    max-height: calc(100vh - 24px);
    padding: 24px 18px 78px;
    border-radius: 0 14px 0 0;
  }

  body.drawer-open .page,
  body.drawer-open .sword-reveal,
  body.drawer-open .overview-second {
    margin-left: 0;
    left: 0;
  }

  .page {
    padding-top: 0;
  }

  .home-hero {
    min-height: calc(100svh - 120px);
    padding-inline: 18px;
  }

  .hero-content {
    width: min(100%, 620px);
  }

  .hero-actions,
  .admin-actions,
  .diplomatic-record-actions {
    width: 100%;
    gap: 10px;
  }

  .hero-actions .button,
  .admin-actions .button,
  .diplomatic-record-actions .button,
  .diplomatic-record-action,
  .admin-proposal-action {
    flex: 1 1 160px;
  }

  .search-panel {
    width: min(100%, calc(100vw - 28px));
  }

  .search-panel > div {
    grid-template-columns: 1fr;
  }

  .admin-shell,
  .reading-room-page {
    padding-inline: 14px;
  }

  .admin-heading,
  .admin-panel,
  .registry-album-viewer,
  .reading-room-intro,
  .reading-room-upload-panel,
  .album-dialog,
  .account-dialog,
  .pope-lottery-dialog {
    padding: 22px 16px;
  }

  .admin-panel-header,
  .admin-news-item-header,
  .registry-section-header,
  .reading-room-section-heading,
  .religion-book-reader-head {
    align-items: flex-start;
    gap: 12px;
  }

  .admin-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .admin-tab {
    min-height: 44px;
    flex: none;
  }

  .admin-form,
  .admin-login-form,
  .admin-team-form,
  .admin-account-search,
  .admin-resource-upload,
  .admin-cover-source,
  .admin-album-resource-add,
  .account-email-form,
  .account-code-form,
  .secure-register-form,
  .secure-login-form,
  .account-bind-form,
  .pope-lottery-form {
    grid-template-columns: 1fr;
  }

  .admin-form input,
  .admin-form textarea,
  .admin-form select,
  .admin-team-form input,
  .admin-account-search input,
  .admin-resource-upload input,
  .account-email-form input,
  .account-code-form input,
  .secure-register-form input,
  .secure-login-form input,
  .account-bind-form input {
    min-height: 48px;
  }

  .admin-resource-actions {
    grid-template-columns: 1fr;
  }

  .admin-team-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-account-row {
    gap: 14px;
  }

  .admin-photo-submission-body label {
    grid-template-columns: 1fr;
  }

  .admin-proposal-actions {
    grid-template-columns: 1fr;
  }

  .diplomatic-bound-summary,
  .diplomatic-pending-notice {
    padding: 16px;
  }

  .diplomatic-submission-record {
    grid-template-columns: 1fr;
  }

  .reading-room-tab {
    min-height: 74px;
  }

  .reading-room-item--tour,
  .reading-room-item--tour:hover {
    transform: none;
  }

  .album-modal,
  .account-modal,
  .pope-lottery-modal {
    padding: 12px;
  }
}

@media (max-width: 560px) {
  .content-card,
  .content-card.content-card-wide,
  .privacy-card,
  .registry-section,
  .transport-record,
  .news-card,
  .reading-room-item,
  .admin-news-item,
  .admin-transport-record,
  .admin-room-section,
  .admin-room-item,
  .admin-government-item,
  .admin-diplomatic-record,
  .admin-subpanel,
  .admin-diplomatic-section {
    padding: 18px 14px;
  }

  .topbar {
    padding: 10px 12px;
  }

  .top-brand {
    gap: 10px;
  }

  .top-brand img {
    width: 34px;
    height: 34px;
  }

  .top-brand strong {
    font-size: 20px;
  }

  .top-brand small {
    font-size: 12px;
  }

  .language-switcher,
  .language-switcher.is-ancient-unlocked {
    width: 100%;
    min-width: 252px;
  }

  .button,
  .hero-actions .button,
  .admin-actions .button,
  .admin-resource-upload .button,
  .admin-team-form .button,
  .admin-account-search .button,
  .reading-room-upload-form button,
  .account-send-code {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
  }

  .content-card h1,
  .reading-room-intro h1,
  .admin-heading h1 {
    font-size: clamp(30px, 12vw, 44px);
  }

  .content-card p,
  .content-card li,
  .news-card p,
  .reading-room-item-body p,
  .transport-record p,
  .registry-card p {
    overflow-wrap: anywhere;
  }

  .reading-room-tabs,
  .album-photo-grid,
  .registry-album-grid,
  .transport-record-album {
    grid-template-columns: 1fr;
  }

  .admin-resource-card {
    grid-template-columns: 1fr;
  }

  .admin-resource-preview {
    min-height: 180px;
  }

  .admin-transport-photo-row,
  .admin-album-photo-row {
    grid-template-columns: 1fr;
  }

  .admin-album-photo-row img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .admin-album-photo-row button {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
  }

  .admin-photo-log-grid {
    grid-template-columns: 1fr;
  }

  .registry-country-link {
    font-size: 22px;
  }

  .footer-grid {
    gap: 24px;
  }
}
