:root {
  --bg: #070707;
  --panel: #0f0d0a;
  --panel-2: #12100c;
  --gold: #8b6b3f;
  --gold-dark: #5a4328;
  --text: #d8cbb7;
  --muted: #8f8373;
  --blood: #7a1f1f;
  --purple: #6f4db8;
  --line: rgba(139, 107, 63, 0.34);
  --line-soft: rgba(139, 107, 63, 0.14);
  --asset-hero-primary: url("assets/optimized/hero/hero-primary.jpg");
  --asset-hero-secondary: url("assets/optimized/hero/hero-secondary.jpg");
  --asset-background-codex: url("assets/optimized/backgrounds/codex-background.jpg");
  --asset-texture-parchment: url("assets/optimized/textures/parchment.jpg");
  --asset-texture-metal: url("assets/optimized/textures/metal-texture.jpg");
  --asset-texture-dust: url("assets/optimized/textures/dust-grain-overlay.png");
  --asset-frame-sheet: url("assets/optimized/frames/frame-sheet.jpg");
  --asset-rune-sheet: url("assets/optimized/runes/rune-sheet.jpg");
  --asset-particle-dust: url("assets/optimized/particles/dust.png");
  --asset-icon-sheet: url("assets/optimized/icons/icon-sheet.jpg");
  --asset-ornament-sheet: url("assets/optimized/ornaments/ornament-sheet.jpg");
  --asset-location-stormwind: url("assets/optimized/locations/stormwind.jpg");
  --asset-location-northrend: url("assets/optimized/locations/northrend.jpg");
  --asset-location-dark-portal: url("assets/optimized/locations/dark-portal.jpg");
  --asset-location-naxxramas: url("assets/optimized/locations/naxxramas.jpg");
  --asset-location-outland: url("assets/optimized/locations/outland.jpg");
  --asset-location-default: var(--asset-location-stormwind);
  --asset-portrait-default: none;
}

.asset-bg-cover,
.asset-bg-contain {
  background-position: center;
  background-repeat: no-repeat;
}

.asset-bg-cover { background-size: cover; }
.asset-bg-contain { background-size: contain; }
.asset-hero-primary { background-image: var(--asset-hero-primary); }
.asset-hero-secondary { background-image: var(--asset-hero-secondary); }
.asset-background-codex { background-image: var(--asset-background-codex); }
.asset-texture-parchment { background-image: var(--asset-texture-parchment); }
.asset-texture-metal { background-image: var(--asset-texture-metal); }
.asset-texture-dust { background-image: var(--asset-texture-dust); }
.asset-frame-sheet { background-image: var(--asset-frame-sheet); }
.asset-rune-sheet { background-image: var(--asset-rune-sheet); }
.asset-particle-dust { background-image: var(--asset-particle-dust); }
.asset-icon-sheet { background-image: var(--asset-icon-sheet); }
.asset-ornament-sheet { background-image: var(--asset-ornament-sheet); }

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 52% -10%, rgba(216, 203, 183, 0.09), transparent 34rem),
    radial-gradient(circle at 84% 18%, rgba(139, 107, 63, 0.14), transparent 28rem),
    radial-gradient(circle at 15% 18%, rgba(111, 77, 184, 0.055), transparent 24rem),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 4px),
    var(--bg);
  font-family: Georgia, "Times New Roman", serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.45;
  background:
    linear-gradient(rgba(7, 7, 7, 0.66), rgba(7, 7, 7, 0.9)),
    var(--asset-background-codex),
    linear-gradient(rgba(216, 203, 183, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 203, 183, 0.028) 1px, transparent 1px);
  background-position: center, center, 0 0, 0 0;
  background-size: auto, cover, 56px 56px, 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), transparent 82%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 38%, rgba(0, 0, 0, 0.68) 100%),
    radial-gradient(circle at 12% 16%, rgba(216, 203, 183, 0.06), transparent 16rem),
    radial-gradient(circle at 84% 80%, rgba(122, 31, 31, 0.08), transparent 18rem),
    repeating-radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
  opacity: 0.68;
}

a,
button {
  position: relative;
  z-index: 20;
  color: inherit;
  font: inherit;
  pointer-events: auto;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease, text-shadow 180ms ease;
}

button {
  cursor: pointer;
}

.card-hit {
  position: absolute;
  inset: 0;
  z-index: 28;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.card-hit:focus-visible,
.character-card:focus-visible,
.location-list > a:focus-visible,
.modal-close:focus-visible,
.next-session button:focus-visible,
.panel-head a:focus-visible,
.nav a:focus-visible {
  outline: 1px solid rgba(216, 203, 183, 0.7);
  outline-offset: 3px;
}

.page-frame {
  position: fixed;
  inset: 10px;
  z-index: 35;
  pointer-events: none;
  border: 1px solid rgba(139, 107, 63, 0.5);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.85);
}

.page-frame::before,
.page-frame::after {
  content: "";
  position: absolute;
  pointer-events: none;
  left: 26px;
  right: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 107, 63, 0.5), transparent);
}

.page-frame::before { top: 26px; }
.page-frame::after { bottom: 26px; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 36;
  pointer-events: none;
  opacity: 0.085;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.45) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.28) 0 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(139, 107, 63, 0.32) 0 1px, transparent 1px);
  background-position: 0 0, 0 0, 0 0;
  background-size: 7px 7px, 11px 11px, 17px 17px;
  mix-blend-mode: screen;
}

.age-overlay {
  position: fixed;
  inset: 0;
  z-index: 37;
  pointer-events: none;
  opacity: 0.13;
  background:
    radial-gradient(ellipse at 18% 24%, rgba(216, 203, 183, 0.07), transparent 9rem),
    radial-gradient(ellipse at 72% 18%, rgba(90, 67, 40, 0.12), transparent 12rem),
    radial-gradient(ellipse at 80% 76%, rgba(216, 203, 183, 0.045), transparent 10rem),
    repeating-linear-gradient(7deg, rgba(216, 203, 183, 0.018) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(91deg, rgba(90, 67, 40, 0.025) 0 1px, transparent 1px 13px);
  background-position: center, center, center, 0 0, 0 0;
  background-size: auto, auto, auto, auto, auto;
  mix-blend-mode: soft-light;
}

.scratch-overlay {
  position: fixed;
  inset: 0;
  z-index: 38;
  pointer-events: none;
  opacity: 0.09;
  background:
    linear-gradient(102deg, transparent 0 17%, rgba(216, 203, 183, 0.11) 17.1% 17.2%, transparent 17.3% 100%),
    linear-gradient(78deg, transparent 0 42%, rgba(216, 203, 183, 0.08) 42.1% 42.2%, transparent 42.3% 100%),
    linear-gradient(96deg, transparent 0 63%, rgba(90, 67, 40, 0.12) 63.1% 63.2%, transparent 63.3% 100%),
    repeating-linear-gradient(174deg, transparent 0 34px, rgba(216, 203, 183, 0.05) 35px 36px, transparent 37px 92px);
  mix-blend-mode: overlay;
}

.smoke-overlay {
  position: fixed;
  inset: -12%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.3;
  background:
    radial-gradient(ellipse at 18% 78%, rgba(216, 203, 183, 0.08), transparent 26rem),
    radial-gradient(ellipse at 68% 24%, rgba(139, 107, 63, 0.07), transparent 30rem),
    radial-gradient(ellipse at 88% 68%, rgba(0, 0, 0, 0.42), transparent 28rem);
  filter: blur(18px);
  animation: smokeDrift 24s ease-in-out infinite alternate;
}

@keyframes smokeDrift {
  from { transform: translate3d(-1.5%, 0, 0) scale(1); }
  to { transform: translate3d(1.5%, -1%, 0) scale(1.03); }
}

.embers {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.embers::before {
  content: "";
  position: absolute;
  inset: -8%;
  pointer-events: none;
  opacity: 0.075;
  background-image: var(--asset-particle-dust);
  background-position: center bottom;
  background-size: cover;
  mix-blend-mode: screen;
  filter: blur(0.4px) saturate(0.72);
  animation: emberHaze 18s ease-in-out infinite alternate;
}

.embers i {
  position: absolute;
  pointer-events: none;
  bottom: -20px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(196, 176, 135, 0.7);
  box-shadow: 0 0 10px rgba(139, 107, 63, 0.42);
  animation: ember 9s linear infinite;
}

.embers i:nth-child(1) { left: 12%; animation-delay: 0s; }
.embers i:nth-child(2) { left: 24%; animation-delay: 2s; }
.embers i:nth-child(3) { left: 38%; animation-delay: 4s; }
.embers i:nth-child(4) { left: 51%; animation-delay: 1s; }
.embers i:nth-child(5) { left: 67%; animation-delay: 5s; }
.embers i:nth-child(6) { left: 75%; animation-delay: 3s; }
.embers i:nth-child(7) { left: 84%; animation-delay: 6s; }
.embers i:nth-child(8) { left: 92%; animation-delay: 2.6s; }
.embers i:nth-child(9) { left: 18%; animation-delay: 7.4s; width: 1px; height: 1px; }
.embers i:nth-child(10) { left: 44%; animation-delay: 6.8s; width: 1px; height: 1px; }
.embers i:nth-child(11) { left: 59%; animation-delay: 8.2s; width: 1px; height: 1px; }
.embers i:nth-child(12) { left: 88%; animation-delay: 9.1s; width: 1px; height: 1px; }

@keyframes ember {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 0.45; }
  100% { transform: translateY(-110vh); opacity: 0; }
}

@keyframes emberHaze {
  from { transform: translate3d(-1%, 0, 0) scale(1); }
  to { transform: translate3d(1%, -1%, 0) scale(1.025); }
}

.depth-lines {
  position: fixed;
  inset: 12px;
  z-index: 3;
  pointer-events: none;
  opacity: 0.3;
  background:
    linear-gradient(90deg, transparent 0 278px, rgba(139, 107, 63, 0.16) 278px 279px, transparent 279px calc(100% - 348px), rgba(139, 107, 63, 0.13) calc(100% - 348px) calc(100% - 347px), transparent calc(100% - 347px)),
    linear-gradient(180deg, transparent 0 94px, rgba(139, 107, 63, 0.08) 94px 95px, transparent 95px);
  box-shadow:
    inset 0 0 120px rgba(0, 0, 0, 0.72),
    inset 0 0 18px rgba(139, 107, 63, 0.08);
}

.foreground-ornaments {
  position: fixed;
  inset: 0;
  z-index: 39;
  pointer-events: none;
}

.foreground-ornaments span {
  position: absolute;
  pointer-events: none;
  top: 48%;
  width: 118px;
  height: 260px;
  opacity: 0.17;
  background:
    linear-gradient(rgba(7, 7, 7, 0.36), rgba(7, 7, 7, 0.54)),
    var(--asset-ornament-sheet),
    radial-gradient(circle at 50% 10%, rgba(139, 107, 63, 0.55) 0 2px, transparent 3px),
    linear-gradient(90deg, transparent 48%, rgba(139, 107, 63, 0.42) 49% 51%, transparent 52%),
    repeating-linear-gradient(180deg, transparent 0 26px, rgba(139, 107, 63, 0.28) 27px 28px, transparent 29px 54px);
  background-position: center, 7% 52%, center, center, center;
  background-size: auto, 520px auto, auto, auto, auto;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}

.ornament-left {
  left: 16px;
}

.ornament-right {
  right: 16px;
  transform: scaleX(-1);
}

.layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr) 348px;
  gap: 14px;
  min-height: 100vh;
  padding: 10px;
  isolation: isolate;
}

.codex-panel {
  position: relative;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 18% 0%, rgba(216, 203, 183, 0.03), transparent 12rem),
    radial-gradient(ellipse at 80% 100%, rgba(90, 67, 40, 0.08), transparent 14rem),
    repeating-linear-gradient(0deg, rgba(216, 203, 183, 0.012) 0 1px, transparent 1px 5px),
    linear-gradient(135deg, rgba(139, 107, 63, 0.07) 0 1px, transparent 1px 30px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(0, 0, 0, 0.2)),
    rgba(12, 10, 8, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.78),
    inset 0 1px 0 rgba(216, 203, 183, 0.06),
    inset 0 -28px 60px rgba(0, 0, 0, 0.56),
    inset 0 0 72px rgba(0, 0, 0, 0.58),
    0 1px 0 rgba(216, 203, 183, 0.045),
    0 18px 34px rgba(0, 0, 0, 0.44),
    0 36px 110px rgba(0, 0, 0, 0.74);
}

.codex-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.075;
  background:
    radial-gradient(circle at 22% 18%, rgba(216, 203, 183, 0.08), transparent 3rem),
    radial-gradient(circle at 78% 74%, rgba(216, 203, 183, 0.04), transparent 4rem),
    repeating-radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 6px);
  background-position: center, center, 0 0;
  background-size: auto, auto, auto;
  mix-blend-mode: soft-light;
}

.codex-panel::after {
  content: "";
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border: 1px solid rgba(0, 0, 0, 0.55);
  box-shadow:
    inset 0 0 20px rgba(139, 107, 63, 0.05),
    inset 0 0 90px rgba(0, 0, 0, 0.42);
}

.codex-panel > * {
  position: relative;
  z-index: 1;
}

.codex-panel a,
.codex-panel button {
  z-index: 24;
}

.codex-panel .corner::before,
.codex-panel .corner::after {
  box-shadow: 0 0 8px rgba(139, 107, 63, 0.18);
}

.corner {
  position: absolute;
  width: 28px;
  height: 28px;
  pointer-events: none;
}

.corner::before,
.corner::after {
  content: "";
  position: absolute;
  background: var(--gold);
}

.corner::before {
  width: 100%;
  height: 1px;
}

.corner::after {
  width: 1px;
  height: 100%;
}

.corner-tl { left: 8px; top: 8px; }
.corner-br { right: 8px; bottom: 8px; transform: rotate(180deg); }

.sidebar {
  position: sticky;
  top: 10px;
  height: calc(100vh - 20px);
  padding: 24px 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 10%, rgba(111, 77, 184, 0.075), transparent 11rem),
    radial-gradient(circle at 50% 48%, rgba(139, 107, 63, 0.05), transparent 12rem),
    linear-gradient(90deg, rgba(216, 203, 183, 0.035), transparent 8%, rgba(0, 0, 0, 0.28) 48%, rgba(90, 67, 40, 0.08)),
    repeating-linear-gradient(8deg, rgba(216, 203, 183, 0.018) 0 1px, transparent 1px 11px),
    repeating-linear-gradient(90deg, transparent 0 24px, rgba(139, 107, 63, 0.025) 25px 26px, transparent 27px 52px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.24), transparent 40%, rgba(139, 107, 63, 0.05)),
    rgba(15, 13, 10, 0.92);
}

.sidebar::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 18px;
  bottom: 18px;
  pointer-events: none;
  border-left: 1px solid rgba(139, 107, 63, 0.18);
  border-right: 1px solid rgba(139, 107, 63, 0.12);
  box-shadow:
    inset 16px 0 22px rgba(0, 0, 0, 0.18),
    inset -16px 0 22px rgba(139, 107, 63, 0.025);
}

.emblem {
  position: relative;
  display: grid;
  width: 150px;
  height: 150px;
  margin: 0 auto 14px;
  place-items: center;
}

.emblem-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    linear-gradient(45deg, transparent 48%, rgba(139, 107, 63, 0.45) 49% 51%, transparent 52%),
    linear-gradient(-45deg, transparent 48%, rgba(139, 107, 63, 0.28) 49% 51%, transparent 52%),
    conic-gradient(from 20deg, transparent 0 10%, rgba(139, 107, 63, 0.46) 10% 11%, transparent 11% 25%, rgba(111, 77, 184, 0.24) 25% 26%, transparent 26% 100%),
    radial-gradient(circle, transparent 0 46%, rgba(139, 107, 63, 0.25) 47% 48%, transparent 49%);
}

.emblem-star {
  color: var(--purple);
  font-size: 60px;
  text-shadow: 0 0 24px rgba(111, 77, 184, 0.82);
  animation: runePulse 4.6s ease-in-out infinite;
}

@keyframes runePulse {
  0%, 100% { opacity: 0.7; text-shadow: 0 0 9px rgba(111, 77, 184, 0.42); }
  50% { opacity: 1; text-shadow: 0 0 24px rgba(111, 77, 184, 0.86); }
}

.brand {
  text-align: center;
  text-transform: uppercase;
}

.brand strong {
  display: block;
  color: var(--text);
  font-size: 44px;
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.1em;
}

.brand span {
  display: block;
  margin-top: 8px;
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 0.5em;
}

.divider {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 24px;
  color: var(--gold);
}

.divider span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(139, 107, 63, 0.34);
  border-radius: 50%;
  color: var(--gold);
  background: #0b0907;
  text-shadow: 0 0 14px rgba(139, 107, 63, 0.62);
  box-shadow:
    0 0 18px rgba(139, 107, 63, 0.16),
    inset 0 0 14px rgba(0, 0, 0, 0.8);
  animation: runePulse 5.4s ease-in-out infinite;
}

.hero .divider span,
.quote .divider span {
  color: var(--purple);
  text-shadow: 0 0 14px rgba(111, 77, 184, 0.68);
}

.divider.small {
  max-width: 420px;
  margin: 28px 0;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background:
    radial-gradient(circle at 100% 50%, rgba(139, 107, 63, 0.8) 0 2px, transparent 3px),
    linear-gradient(90deg, transparent, rgba(139, 107, 63, 0.5), transparent);
}

.divider::after {
  transform: scaleX(-1);
}

.nav {
  display: grid;
  gap: 6px;
  position: relative;
  z-index: 20;
  padding: 2px 0;
}

.nav::before,
.nav::after {
  content: "";
  position: absolute;
  pointer-events: none;
  left: 4px;
  right: 4px;
  height: 1px;
  background:
    radial-gradient(circle at 0 50%, rgba(139, 107, 63, 0.7) 0 2px, transparent 3px),
    radial-gradient(circle at 100% 50%, rgba(139, 107, 63, 0.7) 0 2px, transparent 3px),
    linear-gradient(90deg, transparent, rgba(139, 107, 63, 0.32), transparent);
}

.nav::before {
  top: -10px;
}

.nav::after {
  bottom: -10px;
}

.nav a {
  position: relative;
  z-index: 21;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  min-height: 46px;
  border: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  transition: color 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease, transform 220ms ease;
  background:
    linear-gradient(90deg, rgba(139, 107, 63, 0.035), transparent 64%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent);
  box-shadow:
    inset 0 1px 0 rgba(216, 203, 183, 0.025),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.nav a::before {
  content: "";
  position: absolute;
  pointer-events: none;
  left: 6px;
  right: 6px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(90, 67, 40, 0.38), transparent);
  transition: background 220ms ease, opacity 220ms ease;
}

.nav b {
  color: var(--gold);
  font-size: 21px;
  font-weight: 400;
  text-align: center;
}

.nav span {
  font-size: 14px;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  transform: translateX(1px);
  border-color: rgba(111, 77, 184, 0.34);
  background: linear-gradient(90deg, rgba(111, 77, 184, 0.2), rgba(111, 77, 184, 0.055) 72%, transparent);
  box-shadow:
    inset 3px 0 0 rgba(111, 77, 184, 0.84),
    inset 0 1px 0 rgba(216, 203, 183, 0.045),
    0 0 20px rgba(111, 77, 184, 0.13);
}

.nav a:hover::before,
.nav a.active::before {
  background: linear-gradient(90deg, transparent, rgba(139, 107, 63, 0.55), transparent);
}

.nav a:hover b,
.nav a.active b {
  color: var(--text);
  text-shadow: 0 0 12px rgba(111, 77, 184, 0.68), 0 0 8px rgba(139, 107, 63, 0.28);
}

.nav a.active::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 28px;
  background: rgba(111, 77, 184, 0.22);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.codex-search {
  position: relative;
  z-index: 35;
  margin: -8px 0 18px;
}

.codex-search label {
  display: grid;
  gap: 7px;
}

.codex-search span {
  color: rgba(143, 131, 115, 0.78);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.codex-search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(139, 107, 63, 0.28);
  border-radius: 0;
  padding: 0 11px;
  color: rgba(216, 203, 183, 0.88);
  background:
    linear-gradient(90deg, rgba(139, 107, 63, 0.08), rgba(0, 0, 0, 0.12)),
    rgba(4, 4, 4, 0.42);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.72),
    inset 0 -10px 16px rgba(0, 0, 0, 0.32);
}

.codex-search input::placeholder {
  color: rgba(143, 131, 115, 0.58);
}

.codex-search input:focus {
  border-color: rgba(111, 77, 184, 0.46);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.72),
    0 0 18px rgba(111, 77, 184, 0.12);
}

.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 7px);
  max-height: 360px;
  overflow: auto;
  border: 1px solid rgba(139, 107, 63, 0.32);
  background:
    var(--asset-texture-parchment),
    linear-gradient(180deg, rgba(18, 16, 12, 0.98), rgba(7, 7, 7, 0.98));
  background-blend-mode: soft-light, normal;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.82),
    0 18px 36px rgba(0, 0, 0, 0.72);
}

.search-results a,
.search-results p {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 11px 12px;
  border-bottom: 1px solid rgba(139, 107, 63, 0.14);
  color: rgba(216, 203, 183, 0.78);
  text-decoration: none;
  font-family: "Segoe UI", Arial, sans-serif;
}

.search-results a:hover,
.search-results a.selected {
  background: rgba(111, 77, 184, 0.14);
  color: var(--text);
}

.search-results small {
  color: rgba(139, 107, 63, 0.92);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.search-results strong {
  color: rgba(216, 203, 183, 0.92);
  font-family: "Cinzel", Georgia, serif;
  font-size: 13px;
  font-weight: 400;
}

.search-results em {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(143, 131, 115, 0.86);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.edit-panel {
  position: relative;
  z-index: 34;
  display: grid;
  gap: 8px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(139, 107, 63, 0.22);
}

.content-create-grid {
  display: none;
  gap: 6px;
}

body.edit-mode .content-create-grid {
  display: grid;
}

.edit-panel button,
.add-entry-button,
.edit-entry-button,
.edit-form-actions button {
  border: 1px solid rgba(139, 107, 63, 0.34);
  color: rgba(216, 203, 183, 0.82);
  background:
    linear-gradient(90deg, rgba(139, 107, 63, 0.14), rgba(0, 0, 0, 0.16)),
    rgba(7, 7, 7, 0.42);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: 180ms ease;
}

.edit-panel button {
  min-height: 34px;
}

.edit-panel [data-export-content],
.edit-panel [data-import-content],
.edit-panel [data-edit-reset] {
  display: none;
}

body.edit-mode .edit-panel [data-export-content],
body.edit-mode .edit-panel [data-import-content],
body.edit-mode .edit-panel [data-edit-reset] {
  display: block;
}

.edit-panel button:hover,
.edit-panel button.active,
.add-entry-button:hover,
.edit-entry-button:hover,
.edit-form-actions button:hover {
  border-color: rgba(111, 77, 184, 0.44);
  color: var(--text);
  box-shadow: 0 0 16px rgba(111, 77, 184, 0.1);
}

.add-entry-button,
.edit-entry-button {
  display: none;
}

body.edit-mode .add-entry-button,
body.edit-mode .edit-entry-button {
  display: inline-grid;
  place-items: center;
}

.panel-head .add-entry-button {
  min-height: 30px;
  padding: 0 9px;
  margin-left: 8px;
}

.edit-entry-button {
  position: absolute;
  z-index: 42;
  right: 8px;
  top: 8px;
  min-height: 27px;
  padding: 0 8px;
  font-size: 9px;
  background:
    linear-gradient(90deg, rgba(7, 7, 7, 0.84), rgba(139, 107, 63, 0.12)),
    rgba(7, 7, 7, 0.82);
}

.codex-list > .edit-entry-button {
  position: relative;
  right: auto;
  top: auto;
  justify-self: start;
  margin-bottom: 5px;
}

.edit-form {
  display: grid;
  gap: 13px;
}

.edit-form label {
  display: grid;
  gap: 6px;
}

.image-upload-field {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(139, 107, 63, 0.28);
  padding: 12px;
  background:
    var(--asset-texture-metal),
    linear-gradient(180deg, rgba(18, 16, 12, 0.86), rgba(5, 5, 5, 0.64));
  background-blend-mode: soft-light, normal;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.72),
    inset 0 16px 32px rgba(0, 0, 0, 0.24);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.image-upload-field.is-dragging {
  border-color: rgba(196, 176, 135, 0.56);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.72),
    0 0 20px rgba(139, 107, 63, 0.12);
}

.image-upload-field > div:first-child {
  display: grid;
  gap: 3px;
}

.image-upload-field small,
.image-upload-field p {
  margin: 0;
  color: rgba(143, 131, 115, 0.76);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 11px;
}

.image-upload-field p.is-error {
  color: rgba(196, 91, 82, 0.86);
}

.image-preview-frame {
  position: relative;
  width: 100%;
  min-height: 170px;
  border: 1px solid rgba(90, 67, 40, 0.72);
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 22%, rgba(216, 203, 183, 0.08), transparent 5rem),
    linear-gradient(180deg, rgba(15, 13, 10, 0.82), rgba(0, 0, 0, 0.74));
  cursor: pointer;
}

.image-preview-frame::before,
.image-preview-frame::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.image-preview-frame::before {
  left: 7px;
  top: 7px;
  border-left: 1px solid rgba(196, 176, 135, 0.62);
  border-top: 1px solid rgba(196, 176, 135, 0.62);
}

.image-preview-frame::after {
  right: 7px;
  bottom: 7px;
  border-right: 1px solid rgba(196, 176, 135, 0.62);
  border-bottom: 1px solid rgba(196, 176, 135, 0.62);
}

.image-preview-frame img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  filter: grayscale(0.22) sepia(0.08) saturate(0.74) brightness(0.82) contrast(1.12);
}

.image-preview-frame span span,
.image-preview-frame span i {
  display: block;
  position: absolute;
}

.image-preview-frame span span {
  left: 50%;
  top: 34%;
  width: 58px;
  height: 58px;
  transform: translateX(-50%);
  border: 1px solid rgba(139, 107, 63, 0.38);
  border-radius: 50%;
  background: rgba(139, 107, 63, 0.08);
}

.image-preview-frame span i {
  left: 50%;
  bottom: 24px;
  width: 96px;
  height: 62px;
  transform: translateX(-50%);
  border: 1px solid rgba(139, 107, 63, 0.32);
  border-radius: 48% 48% 0 0;
  background: rgba(139, 107, 63, 0.06);
}

.image-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.edit-form label span {
  color: rgba(196, 176, 135, 0.78);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.edit-form input,
.edit-form textarea {
  width: 100%;
  border: 1px solid rgba(139, 107, 63, 0.28);
  border-radius: 0;
  padding: 10px 11px;
  color: rgba(216, 203, 183, 0.9);
  background:
    var(--asset-texture-parchment),
    linear-gradient(180deg, rgba(18, 16, 12, 0.84), rgba(4, 4, 4, 0.58));
  background-blend-mode: soft-light, normal;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  outline: none;
}

.edit-form textarea {
  resize: vertical;
  min-height: 92px;
}

.edit-form input:focus,
.edit-form textarea:focus {
  border-color: rgba(111, 77, 184, 0.48);
  box-shadow: 0 0 16px rgba(111, 77, 184, 0.1);
}

.edit-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.edit-form-actions button {
  min-height: 36px;
  padding: 0 14px;
}

.edit-form p {
  margin: 0;
  color: rgba(143, 131, 115, 0.78);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12px;
}

.sidebar-runes {
  position: absolute;
  left: 38px;
  right: 38px;
  bottom: 30px;
  display: flex;
  justify-content: space-between;
  color: rgba(139, 107, 63, 0.75);
  font-size: 19px;
}

.sidebar-runes span {
  position: relative;
  text-shadow: 0 0 12px rgba(139, 107, 63, 0.28);
}

.sidebar-runes span:nth-child(2) {
  color: var(--purple);
  animation: runePulse 4.8s ease-in-out infinite;
}

.sidebar-seal {
  position: absolute;
  left: 50%;
  bottom: 80px;
  width: 44px;
  height: 44px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  border: 1px solid rgba(139, 107, 63, 0.26);
  border-radius: 50%;
  color: rgba(111, 77, 184, 0.72);
  background:
    radial-gradient(circle, rgba(111, 77, 184, 0.12), transparent 58%),
    #0a0806;
  text-shadow: 0 0 16px rgba(111, 77, 184, 0.7);
  box-shadow:
    0 0 22px rgba(0, 0, 0, 0.7),
    inset 0 0 20px rgba(0, 0, 0, 0.72);
  animation: runePulse 6s ease-in-out infinite;
}

.sidebar-seal::before,
.sidebar-seal::after {
  content: "";
  position: absolute;
  pointer-events: none;
  top: 50%;
  width: 62px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 107, 63, 0.4));
}

.sidebar-seal::before {
  right: 48px;
}

.sidebar-seal::after {
  left: 48px;
  transform: scaleX(-1);
}

.main {
  min-width: 0;
  padding-top: 14px;
  position: relative;
}

.main::before {
  content: "";
  position: absolute;
  inset: 54px -10px -10px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(139, 107, 63, 0.05), transparent 32rem),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.48));
  border: 1px solid rgba(139, 107, 63, 0.08);
  box-shadow:
    inset 0 0 90px rgba(0, 0, 0, 0.58),
    0 28px 90px rgba(0, 0, 0, 0.48);
}

.top-marks {
  display: flex;
  justify-content: flex-end;
  gap: 26px;
  min-height: 28px;
  padding-right: 24px;
  color: var(--muted);
  letter-spacing: 0.2em;
}

.hero {
  min-height: 520px;
  overflow: hidden;
  background: #070706;
  isolation: isolate;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.8),
    inset 0 0 0 2px rgba(139, 107, 63, 0.12),
    inset 0 0 210px rgba(0, 0, 0, 0.82),
    inset 0 -180px 210px rgba(0, 0, 0, 0.9),
    inset -120px 0 170px rgba(0, 0, 0, 0.58),
    inset 0 0 90px rgba(216, 203, 183, 0.075),
    0 52px 160px rgba(0, 0, 0, 0.92),
    0 0 118px rgba(139, 107, 63, 0.11);
  z-index: 3;
}

.hero.codex-panel::before {
  z-index: 10;
  opacity: 0.1;
  background:
    var(--asset-texture-dust),
    radial-gradient(circle at 58% 31%, rgba(216, 203, 183, 0.12), transparent 13rem),
    radial-gradient(ellipse at 44% 66%, rgba(139, 107, 63, 0.055), transparent 19rem),
    repeating-linear-gradient(90deg, rgba(216, 203, 183, 0.01) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, rgba(216, 203, 183, 0.02), rgba(0, 0, 0, 0.16));
  background-position: center, center, center, 0 0, center;
  background-size: cover, auto, auto, auto, auto;
  mix-blend-mode: soft-light;
}

.hero.codex-panel::after {
  z-index: 11;
  inset: 2px;
  border-color: rgba(139, 107, 63, 0.2);
  box-shadow:
    inset 0 0 18px rgba(139, 107, 63, 0.12),
    inset -110px 0 150px rgba(0, 0, 0, 0.56),
    inset 0 0 120px rgba(0, 0, 0, 0.66),
    inset 0 -108px 140px rgba(0, 0, 0, 0.74),
    inset 0 0 0 1px rgba(216, 203, 183, 0.035);
}

.hero-ornaments {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.crest-watermark {
  position: absolute;
  left: 32%;
  top: 44%;
  width: 360px;
  height: 360px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  color: rgba(139, 107, 63, 0.08);
  font-size: 190px;
  text-shadow: 0 0 26px rgba(139, 107, 63, 0.08);
}

.crest-watermark::before,
.crest-watermark::after {
  content: "";
  position: absolute;
  inset: 34px;
  border: 1px solid rgba(139, 107, 63, 0.07);
  border-radius: 50%;
}

.crest-watermark::after {
  inset: 82px;
  transform: rotate(45deg);
  border-radius: 0;
}

.rune-circle {
  position: absolute;
  right: 18%;
  top: 49%;
  width: 430px;
  height: 430px;
  transform: translateY(-50%);
  border: 1px solid rgba(139, 107, 63, 0.09);
  border-radius: 50%;
  background:
    conic-gradient(from 12deg, transparent 0 7%, rgba(139, 107, 63, 0.08) 7.2% 7.6%, transparent 7.8% 18%, rgba(139, 107, 63, 0.06) 18.2% 18.6%, transparent 18.8% 100%),
    radial-gradient(circle, transparent 0 55%, rgba(139, 107, 63, 0.05) 55.3% 55.8%, transparent 56.2%);
  opacity: 0.86;
}

.rune-circle::before {
  content: "ᚱ ᚨ ᚾ ᛟ ᚦ ᛉ ᛟ ᚱ ᚨ";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  transform: translate(-50%, -50%) rotate(-8deg);
  color: rgba(139, 107, 63, 0.08);
  font-size: 13px;
  letter-spacing: 1.2em;
  text-align: center;
}

.guide {
  position: absolute;
  top: 34px;
  bottom: 34px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(139, 107, 63, 0.12), transparent);
}

.guide::before,
.guide::after {
  content: "";
  position: absolute;
  left: -3px;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(139, 107, 63, 0.16);
  transform: rotate(45deg);
}

.guide::before { top: 22%; }
.guide::after { bottom: 18%; }
.guide-one { left: 42%; }
.guide-two { left: 58%; opacity: 0.7; }
.guide-three { left: 74%; opacity: 0.5; }

.mid-fog {
  position: relative;
  z-index: 2;
  height: 38px;
  margin: -22px 18px -16px;
  pointer-events: none;
  opacity: 0.26;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(216, 203, 183, 0.12), transparent 28%),
    radial-gradient(ellipse at 52% 50%, rgba(216, 203, 183, 0.1), transparent 32%),
    radial-gradient(ellipse at 82% 50%, rgba(216, 203, 183, 0.08), transparent 28%);
  filter: blur(14px);
  animation: midFogDrift 18s ease-in-out infinite alternate;
}

@keyframes midFogDrift {
  from { transform: translate3d(-0.45%, 0, 0); }
  to { transform: translate3d(0.45%, -1px, 0); }
}

.hero-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 1;
  background-image: var(--asset-hero-primary);
  background-position: center right;
  background-size: cover;
  background-repeat: no-repeat;
  filter: sepia(0.14) grayscale(0.035) contrast(1.14) brightness(0.91) saturate(0.8);
  transform: scale(1.005);
  animation: heroDepthDrift 32s ease-in-out infinite alternate;
}

@keyframes heroDepthDrift {
  from { background-position: center right; }
  to { background-position: 52% 50%; }
}

.hero-art * {
  pointer-events: none;
}

.hero-art .fog-back::before,
.hero-art .fog-front::before {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: -18px 4%;
  background:
    radial-gradient(ellipse at 28% 60%, rgba(216, 203, 183, 0.028), transparent 28%),
    radial-gradient(ellipse at 54% 58%, rgba(216, 203, 183, 0.052), transparent 32%),
    radial-gradient(ellipse at 72% 44%, rgba(139, 107, 63, 0.032), transparent 26%);
  filter: blur(34px);
  animation: heroFogDrift 24s ease-in-out infinite alternate;
}

@keyframes heroFogDrift {
  from { transform: translate3d(-0.7%, 0, 0); opacity: 0.92; }
  to { transform: translate3d(0.7%, -1px, 0); opacity: 1; }
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(216, 203, 183, 0.014) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(8deg, rgba(90, 67, 40, 0.012) 0 1px, transparent 1px 22px),
    radial-gradient(ellipse at 60% 35%, transparent 0 24%, rgba(0, 0, 0, 0.16) 58%, rgba(0, 0, 0, 0.74) 100%),
    radial-gradient(ellipse at 60% 31%, rgba(216, 203, 183, 0.065), transparent 18%),
    linear-gradient(90deg, rgba(7, 7, 7, 0.96), rgba(7, 7, 7, 0.74) 20%, rgba(7, 7, 7, 0.2) 46%, rgba(7, 7, 7, 0.3) 66%, rgba(7, 7, 7, 0.68)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), transparent 34%, rgba(0, 0, 0, 0.86) 100%),
    radial-gradient(ellipse at 34% 42%, rgba(0, 0, 0, 0.4), transparent 19rem),
    radial-gradient(circle at 79% 82%, rgba(139, 107, 63, 0.075), transparent 16rem);
  z-index: 8;
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background:
    var(--asset-particle-dust),
    var(--asset-texture-dust),
    radial-gradient(circle at 25% 16%, rgba(216, 203, 183, 0.1), transparent 13rem),
    radial-gradient(ellipse at 60% 34%, rgba(216, 203, 183, 0.13), transparent 10rem),
    radial-gradient(ellipse at 54% 53%, rgba(216, 203, 183, 0.062), transparent 15rem),
    radial-gradient(ellipse at 69% 78%, rgba(139, 107, 63, 0.09), transparent 18rem),
    linear-gradient(165deg, transparent 0 24%, rgba(216, 203, 183, 0.045) 36%, transparent 56%),
    linear-gradient(180deg, transparent 0 48%, rgba(7, 7, 7, 0.1) 82%, rgba(7, 7, 7, 0.3)),
    repeating-linear-gradient(0deg, rgba(216, 203, 183, 0.008) 0 1px, transparent 1px 7px);
  background-position: center bottom, center, center, center, center, center, center, center, 0 0;
  background-size: cover, cover, auto, auto, auto, auto, auto, auto, auto;
  mix-blend-mode: soft-light;
  opacity: 0.16;
}

.castle,
.skyline,
.mountains,
.ruined-city,
.moon,
.ravens,
.adventurers {
  display: none;
}

.moon {
  position: absolute;
  pointer-events: none;
  right: 34%;
  top: 42px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 44% 42%, rgba(216, 203, 183, 0.5), rgba(216, 203, 183, 0.16) 34%, rgba(122, 31, 31, 0.12) 52%, transparent 72%);
  filter: blur(1px) sepia(0.15);
  opacity: 0.16;
  z-index: 5;
  mix-blend-mode: screen;
}

.moon::before {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: -58px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 203, 183, 0.22), transparent 68%);
  filter: blur(18px);
}

.moon::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 24px 18px 18px 34px;
  border-radius: 50%;
  background: rgba(7, 7, 7, 0.18);
  filter: blur(14px);
}

.ravens {
  position: absolute;
  pointer-events: none;
  right: 36%;
  top: 76px;
  width: 260px;
  height: 120px;
  z-index: 9;
  opacity: 0.24;
}

.ravens span {
  position: absolute;
  pointer-events: none;
  width: 18px;
  height: 8px;
  border-top: 2px solid rgba(5, 5, 4, 0.88);
  border-radius: 50%;
  transform: rotate(-10deg);
  filter: blur(0.2px);
}

.ravens span::after {
  content: "";
  position: absolute;
  pointer-events: none;
  left: 8px;
  top: -2px;
  width: 18px;
  height: 8px;
  border-top: 2px solid rgba(5, 5, 4, 0.88);
  border-radius: 50%;
  transform: rotate(24deg);
}

.ravens span:nth-child(1) { left: 20px; top: 18px; transform: scale(0.7) rotate(-8deg); }
.ravens span:nth-child(2) { left: 72px; top: 42px; transform: scale(0.52) rotate(10deg); }
.ravens span:nth-child(3) { left: 130px; top: 16px; transform: scale(0.62) rotate(-18deg); }
.ravens span:nth-child(4) { left: 190px; top: 58px; transform: scale(0.46) rotate(8deg); }
.ravens span:nth-child(5) { left: 224px; top: 28px; transform: scale(0.38) rotate(-12deg); }

.skyline {
  position: absolute;
  left: 42%;
  right: 5%;
  bottom: 168px;
  height: 190px;
  opacity: 0.18;
  background:
    linear-gradient(180deg, transparent 0 18%, rgba(19, 17, 13, 0.82) 18% 100%),
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(34, 29, 22, 0.9) 34px 44px, transparent 44px 70px);
  clip-path: polygon(0 100%, 0 72%, 5% 72%, 5% 48%, 8% 48%, 8% 68%, 12% 68%, 12% 35%, 15% 35%, 15% 66%, 20% 66%, 20% 52%, 24% 52%, 24% 76%, 30% 76%, 30% 44%, 35% 44%, 35% 70%, 42% 70%, 42% 38%, 45% 38%, 45% 72%, 53% 72%, 53% 50%, 58% 50%, 58% 76%, 65% 76%, 65% 40%, 69% 40%, 69% 76%, 76% 76%, 76% 58%, 81% 58%, 81% 74%, 88% 74%, 88% 46%, 92% 46%, 92% 76%, 100% 76%, 100% 100%);
  z-index: 5;
  filter: blur(0.4px);
}

.skyline-near {
  left: 50%;
  right: 8%;
  bottom: 140px;
  height: 170px;
  opacity: 0.22;
  transform: scaleX(1.08);
}

.mountains {
  position: absolute;
  inset: auto 0 0;
  height: 360px;
  opacity: 0.22;
  mix-blend-mode: multiply;
}

.mountains-back {
  background:
    linear-gradient(135deg, transparent 0 34%, #171612 35% 48%, transparent 49%),
    linear-gradient(45deg, transparent 0 28%, #272219 29% 47%, transparent 48%),
    linear-gradient(115deg, transparent 0 40%, #11100d 41% 54%, transparent 55%);
  background-size: 460px 360px, 560px 360px, 720px 360px;
  filter: blur(0.2px);
  z-index: 3;
}

.mountains-front {
  background:
    linear-gradient(120deg, transparent 0 38%, #11100d 39% 56%, transparent 57%),
    linear-gradient(60deg, transparent 0 36%, #0d0c0a 37% 54%, transparent 55%);
  background-size: 500px 310px, 660px 310px;
  opacity: 0.28;
  z-index: 4;
}

.ruined-city {
  position: absolute;
  left: 43%;
  right: 12%;
  bottom: 104px;
  height: 110px;
  z-index: 6;
  opacity: 0.24;
  background:
    linear-gradient(180deg, transparent 0 30%, rgba(10, 9, 7, 0.94) 31% 100%),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(18, 15, 11, 0.95) 18px 24px, transparent 24px 42px);
  clip-path: polygon(0 100%, 0 78%, 4% 78%, 4% 52%, 7% 52%, 7% 86%, 12% 86%, 12% 62%, 16% 62%, 16% 100%, 22% 100%, 22% 44%, 25% 44%, 25% 76%, 30% 76%, 30% 58%, 34% 58%, 34% 100%, 42% 100%, 42% 66%, 46% 66%, 46% 90%, 52% 90%, 52% 48%, 55% 48%, 55% 100%, 62% 100%, 62% 72%, 67% 72%, 67% 100%, 74% 100%, 74% 56%, 77% 56%, 77% 100%, 86% 100%, 86% 70%, 90% 70%, 90% 100%, 100% 100%);
  filter: blur(0.55px);
}

.ruined-city::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 100%, rgba(216, 203, 183, 0.08), transparent 36%),
    radial-gradient(ellipse at 70% 90%, rgba(216, 203, 183, 0.07), transparent 34%);
  mix-blend-mode: screen;
}

.castle {
  position: absolute;
  right: 12%;
  bottom: 86px;
  width: 560px;
  height: 420px;
  filter: drop-shadow(0 32px 48px rgba(0, 0, 0, 0.94));
  opacity: 0.95;
  z-index: 5;
}

.castle span {
  position: absolute;
  bottom: 0;
  background:
    linear-gradient(90deg, #100e0b, #4c4335 44%, #0b0a08),
    repeating-linear-gradient(90deg, transparent 0 12px, rgba(216, 203, 183, 0.04) 12px 13px);
  border: 1px solid rgba(216, 203, 183, 0.12);
}

.wall { left: 64px; width: 420px; height: 78px; }
.tower-left { left: 80px; width: 92px; height: 210px; clip-path: polygon(10% 100%, 10% 22%, 30% 22%, 30% 8%, 50% 0, 70% 8%, 70% 22%, 90% 22%, 90% 100%); }
.tower-right { right: 64px; width: 110px; height: 270px; clip-path: polygon(10% 100%, 10% 20%, 30% 20%, 30% 6%, 50% 0, 70% 6%, 70% 20%, 90% 20%, 90% 100%); }
.keep { left: 198px; width: 184px; height: 318px; clip-path: polygon(8% 100%, 8% 18%, 28% 18%, 28% 0, 72% 0, 72% 18%, 92% 18%, 92% 100%); }
.spire { left: 288px; width: 44px; height: 410px; clip-path: polygon(50% 0, 70% 20%, 70% 100%, 30% 100%, 30% 20%); }
.bridge { left: -82px; width: 360px; height: 40px; bottom: -8px; transform: skewX(-18deg); opacity: 0.72; }

.fog {
  position: absolute;
  left: -10%;
  right: -10%;
  height: 170px;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 18% 50%, rgba(216, 203, 183, 0.09), transparent 28%),
    radial-gradient(ellipse at 48% 46%, rgba(216, 203, 183, 0.115), transparent 30%),
    radial-gradient(ellipse at 78% 52%, rgba(139, 107, 63, 0.08), transparent 28%);
  filter: blur(24px);
}

.fog-back {
  bottom: 160px;
  opacity: 0.2;
  z-index: 7;
}

.fog-front {
  bottom: 26px;
  height: 200px;
  opacity: 0.24;
  z-index: 9;
  filter: blur(30px);
}

.adventurers {
  position: absolute;
  pointer-events: none;
  left: 48%;
  bottom: 54px;
  width: 310px;
  height: 120px;
  z-index: 10;
  opacity: 0.36;
  filter: drop-shadow(0 18px 16px rgba(0, 0, 0, 0.9)) blur(0.25px);
}

.hero-figure {
  position: absolute;
  pointer-events: none;
  bottom: 0;
  width: 24px;
  height: 74px;
  background: #050504;
  border-radius: 45% 45% 12% 12%;
}

.hero-figure::before {
  content: "";
  position: absolute;
  pointer-events: none;
  left: 50%;
  top: -13px;
  width: 18px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #050504;
}

.hero-figure::after {
  content: "";
  position: absolute;
  pointer-events: none;
  left: 50%;
  bottom: 38px;
  width: 86px;
  height: 4px;
  transform-origin: left center;
  background: #050504;
}

.figure-one { left: 24px; height: 82px; }
.figure-one::after { transform: rotate(-32deg); width: 82px; }
.figure-two { left: 86px; height: 66px; transform: scaleX(0.86); }
.figure-two::after { transform: rotate(20deg); width: 56px; }
.figure-three { left: 152px; height: 92px; width: 30px; }
.figure-three::after { transform: rotate(-82deg); width: 92px; }
.figure-four { left: 220px; height: 60px; transform: scaleX(0.8); }
.figure-four::after { transform: rotate(36deg); width: 54px; }

.hero-copy {
  position: relative;
  z-index: 12;
  max-width: 650px;
  padding: 78px 72px;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.92));
}

.hero h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(54px, 5.8vw, 92px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow:
    0 3px 0 rgba(0, 0, 0, 0.8),
    0 0 40px rgba(0, 0, 0, 0.98),
    0 0 20px rgba(139, 107, 63, 0.1);
}

.hero p {
  max-width: 520px;
  margin: 0;
  color: rgba(216, 203, 183, 0.9);
  font-size: 18px;
  line-height: 1.62;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.95);
}

.content-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 9px;
  margin-top: 6px;
  opacity: 0.82;
  position: relative;
  z-index: 1;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 0.95fr 0.9fr 1.15fr;
  gap: 9px;
  margin-top: 9px;
  opacity: 0.78;
  position: relative;
  z-index: 0;
}

.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 9px;
  opacity: 0.78;
}

.codex-placeholder {
  min-height: 168px;
  padding: 22px 24px;
  background-color: rgba(8, 7, 6, 0.94);
}

.codex-placeholder h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.codex-placeholder p {
  margin: 0;
  color: rgba(216, 203, 183, 0.66);
  line-height: 1.55;
}

.codex-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.codex-list.compact {
  gap: 5px;
  margin: 10px 0 0;
}

.codex-list p {
  margin: 0;
  padding: 7px 9px;
  border-left: 1px solid rgba(139, 107, 63, 0.28);
  background: linear-gradient(90deg, rgba(139, 107, 63, 0.08), rgba(0, 0, 0, 0.1));
  color: rgba(216, 203, 183, 0.66);
  line-height: 1.38;
}

.codex-list b {
  color: rgba(216, 203, 183, 0.88);
  font-weight: 400;
}

.party,
.chronicles,
.locations,
.plot,
.timeline-page,
.fate-page,
.sessions-page,
.notes {
  padding: 22px 24px;
  background-color: rgba(8, 7, 6, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.76),
    inset 0 -22px 54px rgba(0, 0, 0, 0.5),
    0 1px 0 rgba(216, 203, 183, 0.035),
    0 18px 58px rgba(0, 0, 0, 0.54),
    0 38px 110px rgba(0, 0, 0, 0.34);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease, filter 200ms ease;
  will-change: transform;
}

.party:hover,
.chronicles:hover,
.locations:hover,
.plot:hover,
.timeline-page:hover,
.fate-page:hover,
.sessions-page:hover,
.notes:hover {
  transform: translateY(-1px);
  border-color: rgba(139, 107, 63, 0.42);
  filter: brightness(0.96) contrast(1.02);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.76),
    inset 0 1px 0 rgba(216, 203, 183, 0.065),
    inset 0 -22px 54px rgba(0, 0, 0, 0.48),
    0 1px 0 rgba(216, 203, 183, 0.045),
    0 20px 62px rgba(0, 0, 0, 0.58),
    0 0 28px rgba(139, 107, 63, 0.045);
}

.party::before,
.chronicles::before,
.locations::before,
.plot::before,
.timeline-page::before,
.fate-page::before,
.sessions-page::before,
.notes::before {
  background-position: center;
  pointer-events: none;
}

.party {
  border-color: rgba(196, 176, 135, 0.32);
  background:
    linear-gradient(90deg, rgba(216, 203, 183, 0.04), transparent 16%, rgba(0, 0, 0, 0.2) 72%),
    linear-gradient(120deg, rgba(216, 203, 183, 0.045), transparent 18%, rgba(0, 0, 0, 0.2)),
    repeating-linear-gradient(90deg, rgba(216, 203, 183, 0.018) 0 1px, transparent 1px 18px),
    radial-gradient(circle at 28% 18%, rgba(139, 107, 63, 0.075), transparent 12rem),
    rgba(8, 7, 6, 0.92);
}

.party::before {
  opacity: 0.11;
  background:
    var(--asset-texture-metal),
    radial-gradient(ellipse at 30% 8%, rgba(216, 203, 183, 0.08), transparent 12rem),
    linear-gradient(90deg, rgba(216, 203, 183, 0.035), transparent 24%, rgba(0, 0, 0, 0.16)),
    repeating-linear-gradient(90deg, rgba(139, 107, 63, 0.022) 0 1px, transparent 1px 20px);
  background-size: cover, auto, auto, auto;
  mix-blend-mode: soft-light;
}

.chronicles {
  border-color: rgba(139, 107, 63, 0.28);
  background:
    radial-gradient(ellipse at 28% 18%, rgba(216, 203, 183, 0.075), transparent 14rem),
    linear-gradient(180deg, rgba(216, 203, 183, 0.04), rgba(90, 67, 40, 0.035)),
    repeating-linear-gradient(0deg, rgba(216, 203, 183, 0.032) 0 1px, transparent 1px 17px),
    repeating-linear-gradient(92deg, rgba(90, 67, 40, 0.025) 0 1px, transparent 1px 23px),
    radial-gradient(circle at 12% 12%, rgba(216, 203, 183, 0.035), transparent 9rem),
    rgba(17, 14, 10, 0.94);
}

.chronicles::before {
  opacity: 0.13;
  background:
    var(--asset-texture-parchment),
    radial-gradient(ellipse at 25% 14%, rgba(216, 203, 183, 0.09), transparent 13rem),
    repeating-linear-gradient(0deg, rgba(90, 67, 40, 0.035) 0 1px, transparent 1px 19px),
    linear-gradient(180deg, rgba(216, 203, 183, 0.035), rgba(0, 0, 0, 0.16));
  background-size: cover, auto, auto, auto;
  mix-blend-mode: soft-light;
}

.timeline-page {
  min-height: 640px;
  border-color: rgba(139, 107, 63, 0.3);
}

.timeline-intro {
  margin: -4px 0 14px;
  max-width: 680px;
  border-left: 1px solid rgba(139, 107, 63, 0.36);
  padding-left: 14px;
}

.timeline-intro small {
  display: block;
  margin-bottom: 6px;
  color: rgba(139, 107, 63, 0.88);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.timeline-intro p {
  margin: 0;
  color: rgba(216, 203, 183, 0.72);
  line-height: 1.6;
}

.timeline-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 18px;
  border-top: 1px solid rgba(139, 107, 63, 0.22);
  border-bottom: 1px solid rgba(139, 107, 63, 0.18);
  padding: 10px 0;
}

.timeline-filters button {
  min-height: 32px;
  border: 1px solid rgba(90, 67, 40, 0.52);
  padding: 0 12px;
  color: rgba(216, 203, 183, 0.72);
  background:
    var(--asset-texture-metal),
    linear-gradient(180deg, rgba(18, 16, 12, 0.84), rgba(5, 5, 5, 0.68));
  background-blend-mode: soft-light, normal;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.timeline-filters button:hover,
.timeline-filters button.active {
  border-color: rgba(139, 107, 63, 0.82);
  color: rgba(216, 203, 183, 0.94);
  box-shadow:
    inset 0 0 18px rgba(139, 107, 63, 0.08),
    0 0 16px rgba(139, 107, 63, 0.08);
}

.timeline-archive {
  display: grid;
  gap: 18px;
}

.timeline-month {
  position: relative;
  padding-left: 18px;
}

.timeline-month::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 34px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(139, 107, 63, 0.64), rgba(139, 107, 63, 0.12));
  box-shadow: 0 0 10px rgba(139, 107, 63, 0.08);
}

.timeline-month h3 {
  margin: 0 0 10px;
  color: rgba(196, 176, 135, 0.92);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-ledger {
  display: grid;
  gap: 10px;
}

.timeline-entry {
  position: relative;
  display: grid;
  grid-template-columns: 82px 34px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid rgba(139, 107, 63, 0.22);
  padding: 13px 14px 13px 12px;
  overflow: hidden;
  background:
    var(--asset-texture-parchment),
    linear-gradient(90deg, rgba(139, 107, 63, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(18, 16, 12, 0.86), rgba(5, 5, 5, 0.68));
  background-blend-mode: soft-light, normal, normal;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.72),
    inset 0 -18px 32px rgba(0, 0, 0, 0.36),
    0 12px 24px rgba(0, 0, 0, 0.28);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.timeline-entry:hover {
  transform: translateY(-1px);
  border-color: rgba(139, 107, 63, 0.44);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.72),
    inset 0 -18px 32px rgba(0, 0, 0, 0.36),
    0 16px 30px rgba(0, 0, 0, 0.36);
}

.timeline-entry time {
  position: relative;
  z-index: 2;
  color: rgba(139, 107, 63, 0.9);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
}

.timeline-entry > i {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(139, 107, 63, 0.5);
  color: rgba(216, 203, 183, 0.72);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 14px rgba(139, 107, 63, 0.08);
}

.timeline-entry.is-death > i {
  color: rgba(122, 31, 31, 0.92);
}

.timeline-entry.is-discovery > i,
.timeline-entry.is-artifact > i {
  color: rgba(111, 77, 184, 0.82);
}

.timeline-entry div {
  position: relative;
  z-index: 2;
}

.timeline-entry small {
  display: block;
  margin-bottom: 4px;
  color: rgba(143, 131, 115, 0.82);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.timeline-entry strong {
  display: block;
  margin-bottom: 5px;
  color: rgba(216, 203, 183, 0.94);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
}

.timeline-entry p {
  margin: 0 0 9px;
  color: rgba(216, 203, 183, 0.68);
  line-height: 1.55;
}

.timeline-relations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 8px;
}

.timeline-relations span {
  color: rgba(143, 131, 115, 0.78);
  font-size: 12px;
}

.timeline-relations b {
  color: rgba(139, 107, 63, 0.88);
  font-weight: 500;
}

.timeline-relations a {
  position: relative;
  z-index: 3;
  color: rgba(216, 203, 183, 0.78);
  text-decoration: none;
}

.timeline-relations a:hover {
  color: rgba(216, 203, 183, 0.96);
}

.fate-page {
  min-height: 690px;
  border-color: rgba(139, 107, 63, 0.32);
  background:
    radial-gradient(ellipse at 52% 38%, rgba(111, 77, 184, 0.075), transparent 20rem),
    radial-gradient(ellipse at 36% 20%, rgba(139, 107, 63, 0.09), transparent 16rem),
    repeating-linear-gradient(0deg, rgba(216, 203, 183, 0.02) 0 1px, transparent 1px 22px),
    rgba(7, 7, 6, 0.96);
}

.fate-page::before {
  opacity: 0.12;
  background:
    var(--asset-texture-metal),
    radial-gradient(circle at 50% 42%, rgba(111, 77, 184, 0.12), transparent 18rem),
    repeating-linear-gradient(45deg, rgba(139, 107, 63, 0.025) 0 1px, transparent 1px 18px);
  background-size: cover, auto, auto;
  mix-blend-mode: soft-light;
}

.fate-intro {
  max-width: 740px;
  margin: -4px 0 16px;
  border-left: 1px solid rgba(139, 107, 63, 0.36);
  padding-left: 14px;
}

.fate-intro small {
  display: block;
  margin-bottom: 6px;
  color: rgba(139, 107, 63, 0.88);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fate-intro p {
  margin: 0;
  color: rgba(216, 203, 183, 0.72);
  line-height: 1.6;
}

.fate-map {
  position: relative;
  min-height: 600px;
  border: 1px solid rgba(139, 107, 63, 0.26);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(111, 77, 184, 0.08), transparent 32%),
    radial-gradient(circle at 28% 22%, rgba(139, 107, 63, 0.12), transparent 12rem),
    linear-gradient(180deg, rgba(15, 13, 10, 0.88), rgba(3, 3, 3, 0.72));
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.78),
    inset 0 0 72px rgba(0, 0, 0, 0.72),
    0 20px 48px rgba(0, 0, 0, 0.42);
}

.fate-map::before,
.fate-map::after {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  z-index: 2;
}

.fate-map::before {
  border: 1px solid rgba(139, 107, 63, 0.22);
  box-shadow: inset 0 0 28px rgba(139, 107, 63, 0.035);
}

.fate-map::after {
  background:
    radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.6) 100%),
    repeating-linear-gradient(90deg, rgba(216, 203, 183, 0.015) 0 1px, transparent 1px 36px);
  mix-blend-mode: soft-light;
}

.fate-svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 600px;
}

.fate-grid path,
.fate-grid circle {
  fill: none;
  stroke: rgba(139, 107, 63, 0.12);
  stroke-width: 0.16;
  vector-effect: non-scaling-stroke;
}

.fate-edge {
  stroke: rgba(139, 107, 63, 0.34);
  stroke-width: 0.28;
  vector-effect: non-scaling-stroke;
  transition: stroke 140ms ease, stroke-opacity 140ms ease, stroke-width 140ms ease;
}

.fate-edge.is-muted {
  stroke-opacity: 0.12;
}

.fate-edge.is-active {
  stroke: rgba(111, 77, 184, 0.78);
  stroke-width: 0.55;
  filter: url(#fateSoftGlow);
}

.fate-node {
  outline: none;
  cursor: pointer;
  text-decoration: none;
}

.fate-node circle {
  fill: url(#fateNodeGlow);
  stroke: rgba(216, 203, 183, 0.7);
  stroke-width: 0.34;
  vector-effect: non-scaling-stroke;
  transition: opacity 140ms ease, r 140ms ease, stroke 140ms ease;
}

.fate-node text {
  fill: rgba(216, 203, 183, 0.78);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.1px;
  letter-spacing: 0.02em;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.82);
  stroke-width: 0.42;
  stroke-linejoin: round;
  transition: fill 140ms ease, opacity 140ms ease;
  pointer-events: none;
}

.fate-node.is-characters circle {
  stroke: rgba(216, 203, 183, 0.82);
}

.fate-node.is-locations circle {
  stroke: rgba(139, 107, 63, 0.92);
}

.fate-node.is-chronicles circle {
  stroke: rgba(196, 176, 135, 0.72);
}

.fate-node.is-artifacts circle,
.fate-node.is-npc circle {
  stroke: rgba(111, 77, 184, 0.78);
}

.fate-node.is-muted {
  opacity: 0.24;
}

.fate-node.is-related circle,
.fate-node.is-active circle {
  stroke: rgba(216, 203, 183, 0.96);
  filter: url(#fateSoftGlow);
}

.fate-node.is-active text,
.fate-node.is-related text {
  fill: rgba(216, 203, 183, 0.96);
}

.fate-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 12px;
  border-top: 1px solid rgba(139, 107, 63, 0.2);
  padding-top: 12px;
}

.fate-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(216, 203, 183, 0.68);
  font-size: 12px;
}

.fate-legend i {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(139, 107, 63, 0.68);
  background: radial-gradient(circle, rgba(216, 203, 183, 0.82), rgba(111, 77, 184, 0.22));
}

.fate-legend i.is-locations {
  background: radial-gradient(circle, rgba(139, 107, 63, 0.86), rgba(0, 0, 0, 0.2));
}

.fate-legend i.is-artifacts,
.fate-legend i.is-npc {
  background: radial-gradient(circle, rgba(111, 77, 184, 0.82), rgba(0, 0, 0, 0.2));
}

.sessions-page {
  min-height: 640px;
  border-color: rgba(139, 107, 63, 0.32);
}

.sessions-page::before {
  opacity: 0.11;
  background:
    var(--asset-texture-parchment),
    radial-gradient(ellipse at 32% 16%, rgba(139, 107, 63, 0.1), transparent 14rem),
    repeating-linear-gradient(0deg, rgba(216, 203, 183, 0.03) 0 1px, transparent 1px 20px);
  background-size: cover, auto, auto;
  mix-blend-mode: soft-light;
}

.sessions-content,
.session-group {
  display: grid;
  gap: 16px;
}

.session-group h3 {
  margin: 0;
  color: rgba(196, 176, 135, 0.9);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.session-card {
  position: relative;
  border: 1px solid rgba(139, 107, 63, 0.24);
  padding: 18px;
  background:
    var(--asset-texture-parchment),
    linear-gradient(180deg, rgba(18, 16, 12, 0.88), rgba(5, 5, 5, 0.68));
  background-blend-mode: soft-light, normal;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.72),
    inset 0 -18px 34px rgba(0, 0, 0, 0.38),
    0 14px 28px rgba(0, 0, 0, 0.3);
}

.session-card small,
.session-prep-meta {
  color: rgba(143, 131, 115, 0.82);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.session-card h3 {
  margin: 8px 0 12px;
  color: rgba(216, 203, 183, 0.94);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 500;
}

.session-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.session-card dt {
  color: rgba(139, 107, 63, 0.88);
  font-size: 10px;
  text-transform: uppercase;
}

.session-card dd {
  margin: 2px 0 0;
  color: rgba(216, 203, 183, 0.78);
}

.session-card p,
.session-description {
  color: rgba(216, 203, 183, 0.68);
  line-height: 1.55;
}

.session-card button {
  width: 100%;
  min-height: 38px;
  margin: 12px 0 0;
  border: 1px solid rgba(139, 107, 63, 0.42);
  color: var(--text);
  background: linear-gradient(90deg, rgba(139, 107, 63, 0.2), rgba(139, 107, 63, 0.06));
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.session-progress {
  display: grid;
  gap: 7px;
  margin: 12px 0;
}

.session-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  color: rgba(143, 131, 115, 0.82);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.session-archive-link {
  display: inline-block;
  margin-top: 12px;
  color: rgba(196, 176, 135, 0.78);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.session-archive-link:hover {
  color: rgba(216, 203, 183, 0.94);
}

.session-prep {
  display: grid;
  gap: 14px;
}

.session-prep p {
  margin: 0;
}

.session-prep-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.session-task-list {
  display: grid;
  gap: 8px;
}

.session-task {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid rgba(139, 107, 63, 0.22);
  padding: 10px;
  background: rgba(7, 7, 7, 0.38);
}

.session-task input {
  accent-color: #8b6b3f;
  margin-top: 2px;
}

.session-task span {
  color: rgba(216, 203, 183, 0.82);
  line-height: 1.45;
}

.session-task input:checked + span {
  color: rgba(143, 131, 115, 0.78);
  text-decoration: line-through;
}

.master-notes {
  border-left: 1px solid rgba(139, 107, 63, 0.34);
  padding-left: 12px;
}

.master-notes b {
  color: rgba(196, 176, 135, 0.86);
  font-weight: 500;
}

.master-notes ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.master-notes li {
  color: rgba(216, 203, 183, 0.68);
  line-height: 1.45;
}

.locations,
.plot,
.notes {
  filter: brightness(0.92);
}

.locations {
  border-color: rgba(88, 78, 62, 0.46);
  background:
    radial-gradient(circle at 18% 20%, rgba(216, 203, 183, 0.025), transparent 8rem),
    radial-gradient(circle at 50% 0%, rgba(216, 203, 183, 0.025), transparent 10rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.32) 0 2px, transparent 2px 18px),
    repeating-linear-gradient(-35deg, rgba(216, 203, 183, 0.012) 0 1px, transparent 1px 26px),
    rgba(7, 7, 6, 0.96);
}

.locations::before {
  opacity: 0.08;
  background:
    var(--asset-location-outland),
    var(--asset-texture-metal),
    radial-gradient(circle at 50% 18%, rgba(216, 203, 183, 0.055), transparent 10rem),
    repeating-linear-gradient(45deg, rgba(216, 203, 183, 0.022) 0 1px, transparent 1px 15px),
    linear-gradient(135deg, rgba(90, 67, 40, 0.08), rgba(0, 0, 0, 0.16));
  background-position: 48% 42%, center, center, 0 0, center;
  background-size: 150% auto, cover, auto, auto, auto;
  mix-blend-mode: soft-light;
}

.plot {
  border-color: rgba(139, 107, 63, 0.34);
  background:
    radial-gradient(ellipse at 36% 18%, rgba(216, 203, 183, 0.07), transparent 10rem),
    repeating-linear-gradient(0deg, rgba(216, 203, 183, 0.034) 0 1px, transparent 1px 19px),
    radial-gradient(circle at 76% 70%, rgba(90, 67, 40, 0.07), transparent 7rem),
    linear-gradient(180deg, rgba(90, 67, 40, 0.06), rgba(0, 0, 0, 0.14)),
    rgba(16, 13, 9, 0.95);
}

.plot::before {
  opacity: 0.09;
  background:
    var(--asset-texture-parchment),
    radial-gradient(ellipse at 62% 48%, rgba(139, 107, 63, 0.08), transparent 12rem),
    linear-gradient(90deg, transparent, rgba(216, 203, 183, 0.025) 45%, transparent),
    repeating-linear-gradient(0deg, rgba(216, 203, 183, 0.025) 0 1px, transparent 1px 18px);
  background-size: cover, auto, auto, auto;
  mix-blend-mode: soft-light;
}

.notes {
  border-color: rgba(90, 67, 40, 0.48);
  background:
    linear-gradient(90deg, rgba(216, 203, 183, 0.025), transparent 5%, rgba(0, 0, 0, 0.24) 55%, rgba(90, 67, 40, 0.08)),
    linear-gradient(90deg, rgba(90, 67, 40, 0.12), transparent 18%, rgba(0, 0, 0, 0.26)),
    repeating-linear-gradient(7deg, rgba(216, 203, 183, 0.022) 0 1px, transparent 1px 10px),
    repeating-linear-gradient(96deg, rgba(90, 67, 40, 0.028) 0 1px, transparent 1px 15px),
    rgba(13, 10, 7, 0.96);
}

.notes::before {
  opacity: 0.12;
  background:
    var(--asset-texture-parchment),
    radial-gradient(circle at 18% 16%, rgba(216, 203, 183, 0.07), transparent 9rem),
    linear-gradient(90deg, rgba(90, 67, 40, 0.12), transparent 28%, rgba(0, 0, 0, 0.2)),
    repeating-linear-gradient(7deg, rgba(90, 67, 40, 0.032) 0 1px, transparent 1px 12px);
  background-size: cover, auto, auto, auto;
  mix-blend-mode: soft-light;
}

.party::after,
.chronicles::after,
.locations::after,
.plot::after,
.notes::after {
  box-shadow:
    inset 0 1px 0 rgba(216, 203, 183, 0.065),
    inset 0 -1px 0 rgba(0, 0, 0, 0.62),
    inset 0 0 22px rgba(139, 107, 63, 0.04),
    inset 0 0 105px rgba(0, 0, 0, 0.48);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  position: relative;
  z-index: 20;
}

.panel-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.82);
}

.panel-head a {
  position: relative;
  z-index: 25;
  color: var(--muted);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.13em;
  text-decoration: none;
  text-transform: uppercase;
}

.panel-head a:hover {
  color: rgba(216, 203, 183, 0.9);
  text-shadow: 0 0 10px rgba(139, 107, 63, 0.28);
}

.filter-bar {
  position: relative;
  z-index: 26;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -4px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(139, 107, 63, 0.14);
}

.filter-bar button,
.tag-link {
  border: 1px solid rgba(139, 107, 63, 0.26);
  color: rgba(216, 203, 183, 0.66);
  background:
    linear-gradient(180deg, rgba(216, 203, 183, 0.035), rgba(7, 7, 7, 0.2)),
    rgba(7, 7, 7, 0.42);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.filter-bar button {
  padding: 6px 9px;
}

.filter-bar button:hover,
.filter-bar button.active,
.tag-link:hover,
.tag-link:focus-visible {
  border-color: rgba(139, 107, 63, 0.54);
  color: rgba(216, 203, 183, 0.92);
  box-shadow: 0 0 14px rgba(139, 107, 63, 0.08);
}

.filter-bar button.active {
  background:
    linear-gradient(180deg, rgba(139, 107, 63, 0.16), rgba(7, 7, 7, 0.32)),
    rgba(7, 7, 7, 0.48);
}

.tag-list {
  position: relative;
  z-index: 32;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin: 8px 7px 0;
}

.tag-link {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 4px 6px;
  line-height: 1;
}

.filter-empty {
  position: relative;
  z-index: 25;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(139, 107, 63, 0.18);
  color: rgba(216, 203, 183, 0.68);
  background: rgba(7, 7, 7, 0.28);
  font-family: "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.04em;
}

.codex-empty-state {
  position: relative;
  z-index: 25;
  display: grid;
  gap: 11px;
  min-height: 116px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(139, 107, 63, 0.28);
  background:
    linear-gradient(135deg, rgba(139, 107, 63, 0.1), transparent 44%),
    radial-gradient(circle at 50% 0%, rgba(216, 203, 183, 0.055), transparent 9rem),
    rgba(8, 7, 6, 0.74);
  color: rgba(216, 203, 183, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.78),
    inset 0 1px 0 rgba(216, 203, 183, 0.055),
    inset 0 -22px 34px rgba(0, 0, 0, 0.44),
    0 12px 26px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.codex-empty-state::before,
.codex-empty-state::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  opacity: 0.72;
  pointer-events: none;
}

.codex-empty-state::before {
  left: 8px;
  top: 8px;
  border-left: 1px solid rgba(139, 107, 63, 0.5);
  border-top: 1px solid rgba(139, 107, 63, 0.5);
}

.codex-empty-state::after {
  right: 8px;
  bottom: 8px;
  border-right: 1px solid rgba(139, 107, 63, 0.5);
  border-bottom: 1px solid rgba(139, 107, 63, 0.5);
}

.codex-empty-state > i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(139, 107, 63, 0.36);
  color: rgba(111, 77, 184, 0.72);
  font-style: normal;
  text-shadow: 0 0 14px rgba(111, 77, 184, 0.22);
  background: rgba(0, 0, 0, 0.24);
}

.codex-empty-state p {
  margin: 0;
  max-width: 44rem;
  color: rgba(216, 203, 183, 0.78);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.55;
}

.codex-empty-state small {
  color: rgba(143, 131, 115, 0.8);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  line-height: 1.45;
}

.empty-state-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.empty-state-fields span {
  min-height: 48px;
  padding: 8px 9px;
  border-left: 1px solid rgba(139, 107, 63, 0.32);
  background:
    linear-gradient(90deg, rgba(139, 107, 63, 0.09), rgba(0, 0, 0, 0.08)),
    rgba(0, 0, 0, 0.12);
}

.empty-state-fields b,
.empty-state-fields em {
  display: block;
  font-family: "Segoe UI", Arial, sans-serif;
  font-style: normal;
}

.empty-state-fields b {
  margin-bottom: 3px;
  color: rgba(196, 176, 135, 0.78);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.empty-state-fields em {
  color: rgba(216, 203, 183, 0.72);
  font-size: 12px;
  line-height: 1.35;
}

.codex-empty-state.is-compact {
  min-height: 76px;
  padding: 14px 16px;
}

.codex-empty-state.is-portrait {
  grid-column: 1 / -1;
  min-height: 156px;
  align-content: center;
  padding-left: 142px;
}

.codex-empty-state.is-portrait > i {
  position: absolute;
  left: 24px;
  top: 50%;
  width: 78px;
  height: 104px;
  transform: translateY(-50%);
  border-color: rgba(139, 107, 63, 0.42);
  background:
    radial-gradient(circle at 50% 25%, rgba(216, 203, 183, 0.12), transparent 2.6rem),
    linear-gradient(180deg, rgba(139, 107, 63, 0.12), rgba(0, 0, 0, 0.34));
  color: rgba(216, 203, 183, 0.28);
}

.codex-empty-state.is-npc,
.codex-empty-state.is-artifact,
.codex-empty-state.is-bestiary,
.codex-empty-state.is-notes {
  margin-top: 4px;
}

.codex-entry-thumb {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 1;
  width: 78px;
  height: 92px;
  margin: 0;
  border: 1px solid rgba(139, 107, 63, 0.38);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.38);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.72),
    0 10px 22px rgba(0, 0, 0, 0.34);
}

.codex-entry-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.28) sepia(0.08) saturate(0.68) brightness(0.78) contrast(1.16);
}

.codex-entry-thumb + p,
.codex-entry-thumb ~ .empty-state-fields,
.codex-entry-thumb ~ small {
  margin-left: 104px;
}

.characters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.character-card {
  display: block;
  position: relative;
  min-height: 236px;
  border: 1px solid rgba(139, 107, 63, 0.42);
  background:
    var(--asset-texture-metal),
    linear-gradient(135deg, rgba(139, 107, 63, 0.08) 0 1px, transparent 1px 18px),
    radial-gradient(circle at 50% 0%, rgba(216, 203, 183, 0.05), transparent 7rem),
    rgba(0, 0, 0, 0.34);
  background-position: center, 0 0, center, center;
  background-size: cover, auto, auto, auto;
  background-blend-mode: soft-light, normal, normal, normal;
  overflow: hidden;
  transition: 180ms ease;
  color: inherit;
  text-decoration: none;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.82),
    inset 0 1px 0 rgba(216, 203, 183, 0.06),
    inset 0 0 18px rgba(139, 107, 63, 0.055),
    inset 0 -22px 38px rgba(0, 0, 0, 0.65),
    inset 0 0 28px rgba(0, 0, 0, 0.7),
    0 10px 16px rgba(0, 0, 0, 0.38),
    0 18px 42px rgba(0, 0, 0, 0.5);
}

.character-card::before,
.character-card::after {
  content: "";
  position: absolute;
  z-index: 4;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.character-card::before {
  left: 5px;
  top: 5px;
  border-left: 1px solid rgba(196, 176, 135, 0.78);
  border-top: 1px solid rgba(196, 176, 135, 0.78);
}

.character-card::after {
  right: 5px;
  bottom: 5px;
  border-right: 1px solid rgba(196, 176, 135, 0.78);
  border-bottom: 1px solid rgba(196, 176, 135, 0.78);
}

.character-card:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 107, 63, 0.68);
  filter: contrast(1.025);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.82),
    inset 0 1px 0 rgba(216, 203, 183, 0.08),
    inset 0 0 32px rgba(139, 107, 63, 0.12),
    0 0 24px rgba(139, 107, 63, 0.16),
    0 18px 42px rgba(0, 0, 0, 0.6),
    0 30px 72px rgba(0, 0, 0, 0.46);
}

.character-card.featured {
  border-color: rgba(196, 176, 135, 0.62);
  background:
    var(--asset-texture-metal),
    linear-gradient(135deg, rgba(139, 107, 63, 0.11) 0 1px, transparent 1px 18px),
    radial-gradient(circle at 50% 0%, rgba(216, 203, 183, 0.11), transparent 7rem),
    rgba(0, 0, 0, 0.34);
  background-position: center, 0 0, center, center;
  background-size: cover, auto, auto, auto;
  background-blend-mode: soft-light, normal, normal, normal;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.82),
    inset 0 1px 0 rgba(216, 203, 183, 0.1),
    inset 0 -22px 42px rgba(0, 0, 0, 0.62),
    inset 0 0 36px rgba(139, 107, 63, 0.12),
    0 0 28px rgba(139, 107, 63, 0.18),
    0 22px 52px rgba(0, 0, 0, 0.58);
}

.character-card.featured::before {
  width: 24px;
  height: 24px;
  border-color: rgba(216, 203, 183, 0.9);
}

.character-card.featured::after {
  width: 24px;
  height: 24px;
  border-color: rgba(216, 203, 183, 0.9);
}

.character-card.featured .portrait {
  filter: brightness(1.12) contrast(1.08) sepia(0.08);
  box-shadow:
    inset 0 -20px 32px rgba(0, 0, 0, 0.62),
    0 0 28px rgba(139, 107, 63, 0.14);
}

.character-card.featured .portrait i {
  border-color: rgba(111, 77, 184, 0.5);
  box-shadow: 0 0 24px rgba(111, 77, 184, 0.18);
}

.character-card.featured .card-rune {
  color: var(--purple);
  border-color: rgba(111, 77, 184, 0.5);
  text-shadow: 0 0 16px rgba(111, 77, 184, 0.78);
  animation: featuredRune 4.2s ease-in-out infinite;
}

@keyframes featuredRune {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 14px rgba(111, 77, 184, 0.18), inset 0 0 14px rgba(0, 0, 0, 0.7);
  }
  50% {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 0 24px rgba(111, 77, 184, 0.32), inset 0 0 14px rgba(0, 0, 0, 0.7);
  }
}

.portrait {
  position: relative;
  height: 146px;
  border-bottom: 1px solid rgba(139, 107, 63, 0.18);
  overflow: hidden;
  box-shadow: inset 0 -24px 34px rgba(0, 0, 0, 0.72);
}

.portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    radial-gradient(circle at 50% 28%, transparent 0 26%, rgba(0, 0, 0, 0.28) 58%, rgba(0, 0, 0, 0.82) 100%),
    linear-gradient(180deg, transparent 0 45%, rgba(0, 0, 0, 0.8) 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px);
  background-position: center, center, 0 0;
  background-size: auto, auto, auto;
  mix-blend-mode: overlay;
  opacity: 0.72;
}

.portrait::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 4;
  border: 1px solid rgba(139, 107, 63, 0.22);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.portrait span {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: -18px;
  width: 98px;
  height: 138px;
  transform: translateX(-50%);
  border-radius: 42% 42% 14% 14%;
  background: #5a4328;
  filter: sepia(0.2) contrast(1.1) brightness(0.82);
}

.portrait img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.18) sepia(0.08) saturate(0.72) brightness(0.72) contrast(1.08);
}

.portrait span::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -28px;
  width: 54px;
  height: 54px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: inherit;
}

.portrait span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 34px;
  width: 128px;
  height: 84px;
  transform: translateX(-50%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: rgba(0, 0, 0, 0.28);
}

.portrait i {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 16px;
  width: 120px;
  height: 120px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid rgba(139, 107, 63, 0.34);
  background:
    linear-gradient(45deg, transparent 48%, rgba(139, 107, 63, 0.28) 49% 51%, transparent 52%),
    linear-gradient(-45deg, transparent 48%, rgba(139, 107, 63, 0.2) 49% 51%, transparent 52%),
    radial-gradient(circle, transparent 0 58%, rgba(139, 107, 63, 0.18) 59% 60%, transparent 61%);
}

.paladin .portrait {
  background:
    radial-gradient(circle at 50% 22%, rgba(196, 176, 135, 0.22), transparent 4rem),
    linear-gradient(135deg, #15130f, #514634);
}
.ranger .portrait {
  background:
    radial-gradient(circle at 50% 22%, rgba(80, 117, 143, 0.2), transparent 4rem),
    linear-gradient(135deg, #0d120d, #243323);
}
.orc .portrait {
  background:
    radial-gradient(circle at 50% 22%, rgba(122, 31, 31, 0.2), transparent 4rem),
    linear-gradient(135deg, #100c0a, #3b4c34);
}
.warlock .portrait {
  background:
    radial-gradient(circle at 50% 22%, rgba(111, 77, 184, 0.22), transparent 4rem),
    linear-gradient(135deg, #0b0710, #2b1742);
}
.priest .portrait {
  background:
    radial-gradient(circle at 50% 22%, rgba(216, 203, 183, 0.18), transparent 4rem),
    linear-gradient(135deg, #11100d, #4e4638);
}
.paladin .portrait span { background: #74533c; }
.ranger .portrait span { background: #5e5044; }
.orc .portrait span { background: #58724e; }
.warlock .portrait span { background: #5d4d7a; }
.priest .portrait span { background: #765c45; }

.paladin .portrait span::after { box-shadow: 0 -20px 0 #292923 inset; }
.ranger .portrait span::after { box-shadow: 0 -20px 0 #172318 inset; }
.orc .portrait span::after { box-shadow: 0 -20px 0 #352015 inset; }
.warlock .portrait span::after { box-shadow: 0 -20px 0 #18101f inset; }
.priest .portrait span::after { box-shadow: 0 -20px 0 #2c281f inset; }

.card-rune {
  display: grid;
  width: 28px;
  height: 28px;
  margin: -14px auto 5px;
  place-items: center;
  position: relative;
  z-index: 5;
  border: 1px solid rgba(139, 107, 63, 0.36);
  border-radius: 50%;
  color: var(--gold);
  background: #0c0a08;
  text-shadow: 0 0 12px rgba(139, 107, 63, 0.55);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.8);
}

.warlock .card-rune,
.paladin .card-rune {
  color: var(--purple);
  text-shadow: 0 0 12px rgba(111, 77, 184, 0.62);
}

.character-card strong {
  display: block;
  margin: 2px 8px 4px;
  color: var(--text);
  font-weight: 400;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.character-card em {
  display: block;
  color: rgba(216, 203, 183, 0.62);
  font-size: 13px;
  font-style: normal;
  line-height: 1.35;
  text-align: center;
}

.party-progress {
  display: flex;
  justify-content: space-between;
  margin-top: 13px;
  color: var(--muted);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.progress-line {
  height: 4px;
  margin-top: 8px;
  background: rgba(90, 67, 40, 0.42);
}

.progress-line i {
  display: block;
  width: 58%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #c4b087);
  box-shadow: 0 0 18px rgba(139, 107, 63, 0.42);
}

.timeline {
  position: relative;
  display: grid;
  gap: 16px;
  padding-left: 34px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: linear-gradient(rgba(111, 77, 184, 0.58), rgba(139, 107, 63, 0.46), transparent);
}

.timeline article {
  position: relative;
  padding: 2px 0 2px 2px;
  transition: transform 180ms ease, filter 180ms ease;
}

.timeline article:hover {
  transform: translateX(1px);
  filter: contrast(1.03);
}

.timeline article::before {
  content: "✧";
  position: absolute;
  left: -34px;
  top: 0;
  color: var(--purple);
  text-shadow: 0 0 12px rgba(111, 77, 184, 0.62);
}

.timeline time {
  display: block;
  color: rgba(216, 203, 183, 0.58);
  font-size: 14px;
}

.timeline strong {
  display: block;
  margin-top: 4px;
  color: rgba(216, 203, 183, 0.92);
  font-size: 18px;
  font-weight: 400;
}

.timeline p,
.plot p {
  margin: 4px 0 0;
  color: rgba(216, 203, 183, 0.7);
  line-height: 1.55;
}

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

.location-list > a {
  display: block;
  position: relative;
  min-height: 124px;
  border: 1px solid rgba(139, 107, 63, 0.2);
  overflow: hidden;
  isolation: isolate;
  background:
    var(--asset-texture-metal),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78)),
    radial-gradient(circle at 50% 20%, rgba(139, 107, 63, 0.2), transparent 5rem),
    #16140f;
  background-position: center, center, center, center;
  background-size: cover, auto, auto, auto;
  background-blend-mode: soft-light, normal, normal, normal;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(216, 203, 183, 0.052),
    inset 0 -26px 34px rgba(0, 0, 0, 0.62),
    0 12px 26px rgba(0, 0, 0, 0.38);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  color: inherit;
  text-decoration: none;
}

.location-list > a::before {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: 2;
  pointer-events: none;
  border: 1px solid rgba(139, 107, 63, 0.2);
  box-shadow:
    inset 0 0 14px rgba(0, 0, 0, 0.48),
    inset 0 0 0 1px rgba(216, 203, 183, 0.022),
    0 0 14px rgba(139, 107, 63, 0.045);
}

.location-list > a::after {
  content: "";
  position: absolute;
  inset: -8px;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse at var(--location-focal, 50% 38%), transparent 0 32%, rgba(0, 0, 0, 0.32) 70%, rgba(0, 0, 0, 0.68) 100%),
    linear-gradient(180deg, rgba(7, 7, 7, 0.08), rgba(7, 7, 7, 0.13) 40%, rgba(7, 7, 7, 0.72) 100%),
    linear-gradient(90deg, rgba(7, 7, 7, 0.4), transparent 45%, rgba(7, 7, 7, 0.38)),
    radial-gradient(ellipse at 52% 22%, rgba(216, 203, 183, 0.085), transparent 42%),
    var(--location-art);
  background-position: center, center, center, center, var(--location-crop, center);
  background-size: auto, auto, auto, auto, var(--location-size, 210% auto);
  background-repeat: no-repeat;
  filter: grayscale(0.34) sepia(0.1) saturate(0.58) brightness(0.7) contrast(1.22);
  transform: scale(1);
  transition: filter 200ms ease, transform 240ms ease;
}

.location-list > a:nth-child(1) {
  --location-art: var(--asset-location-northrend);
  --location-crop: 69% 43%;
  --location-focal: 68% 34%;
  --location-size: 235% auto;
}

.location-list > a:nth-child(2) {
  --location-art: var(--asset-location-stormwind);
  --location-crop: 54% 45%;
  --location-focal: 55% 33%;
  --location-size: 235% auto;
  background-color: #0d1113;
}

.location-list > a:nth-child(3) {
  --location-art: var(--asset-location-naxxramas);
  --location-crop: 52% 35%;
  --location-focal: 52% 32%;
  --location-size: 235% auto;
  background-color: #10130d;
}

.location-list > a:nth-child(4) {
  --location-art: var(--asset-location-dark-portal);
  --location-crop: 55% 47%;
  --location-focal: 52% 40%;
  --location-size: 220% auto;
  background-color: #0d1410;
}

.location-list > a:nth-child(5) {
  --location-art: var(--asset-location-outland);
  --location-crop: 50% 45%;
  --location-focal: 52% 38%;
  --location-size: 230% auto;
  background-color: #120e0d;
}

.location-list > a:hover {
  transform: translateY(-1px);
  border-color: rgba(139, 107, 63, 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(216, 203, 183, 0.055),
    inset 0 -28px 38px rgba(0, 0, 0, 0.62),
    0 0 24px rgba(139, 107, 63, 0.13),
    0 14px 30px rgba(0, 0, 0, 0.46);
}

.location-list > a:hover::after {
  filter: grayscale(0.3) sepia(0.1) saturate(0.62) brightness(0.76) contrast(1.26);
  transform: scale(1.045) translateY(-1px);
}

.location-list span {
  position: absolute;
  inset: 18px 20px 44px;
  z-index: 1;
  border: 1px solid rgba(216, 203, 183, 0.075);
  background:
    radial-gradient(ellipse at 50% 82%, rgba(216, 203, 183, 0.09), transparent 50%),
    radial-gradient(ellipse at 50% 24%, rgba(216, 203, 183, 0.045), transparent 42%),
    linear-gradient(135deg, transparent 0 35%, rgba(216, 203, 183, 0.085) 36% 38%, transparent 39%),
    linear-gradient(45deg, transparent 0 45%, rgba(139, 107, 63, 0.15) 46% 48%, transparent 49%);
  mix-blend-mode: screen;
  opacity: 0.46;
  transition: opacity 220ms ease, transform 260ms ease;
}

.location-list > a:hover span {
  opacity: 0.6;
  transform: translateY(-1px);
}

.location-list b {
  position: absolute;
  z-index: 3;
  left: 8px;
  right: 8px;
  bottom: 12px;
  padding: 6px 4px 5px;
  color: var(--text);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.58) 18%, rgba(0, 0, 0, 0.64) 82%, transparent);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 1), 0 0 10px rgba(0, 0, 0, 0.88);
}

.location-list .tag-list {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  z-index: 4;
  margin: 0;
}

.location-list .tag-link {
  background: rgba(7, 7, 7, 0.56);
}

.timeline .tag-list,
.note .tag-list,
.codex-list .tag-list {
  justify-content: flex-start;
  margin-left: 0;
  margin-right: 0;
}

.note .tag-list {
  z-index: 32;
}

.plot small {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.plot h3 {
  margin: 8px 0 10px;
  color: var(--text);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.note {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  margin-bottom: 14px;
  padding: 8px 10px 8px 8px;
  background:
    var(--asset-texture-parchment),
    linear-gradient(90deg, rgba(216, 203, 183, 0.026), transparent 48%, rgba(0, 0, 0, 0.2)),
    rgba(15, 12, 8, 0.22);
  background-position: center;
  background-size: cover, auto, auto;
  background-blend-mode: soft-light, normal, normal;
  border-left: 1px solid rgba(139, 107, 63, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(216, 203, 183, 0.035),
    inset 0 -1px 0 rgba(0, 0, 0, 0.42);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.note:hover {
  transform: translateY(-1px);
  border-left-color: rgba(139, 107, 63, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(216, 203, 183, 0.045),
    inset 0 -1px 0 rgba(0, 0, 0, 0.42),
    0 8px 20px rgba(0, 0, 0, 0.18);
}

.note::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 9px;
  bottom: 9px;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(139, 107, 63, 0.55), transparent);
  pointer-events: none;
}

.note i {
  color: var(--purple);
  font-style: normal;
  text-shadow: 0 0 14px rgba(111, 77, 184, 0.75);
}

.note p {
  margin: 0;
  color: rgba(216, 203, 183, 0.66);
  line-height: 1.45;
}

.note b {
  display: block;
  color: var(--text);
  font-weight: 400;
}

.right-column {
  position: sticky;
  top: 10px;
  display: grid;
  align-content: start;
  gap: 14px;
  height: calc(100vh - 20px);
  padding-top: 52px;
  overflow: hidden;
}

.next-session,
.quote {
  padding: 28px;
}

.next-session {
  border-color: rgba(139, 107, 63, 0.4);
  background:
    linear-gradient(90deg, rgba(216, 203, 183, 0.035), transparent 12%, rgba(0, 0, 0, 0.3)),
    linear-gradient(135deg, rgba(216, 203, 183, 0.035), transparent 22%, rgba(0, 0, 0, 0.28)),
    repeating-linear-gradient(0deg, rgba(216, 203, 183, 0.014) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(90deg, rgba(139, 107, 63, 0.018) 0 1px, transparent 1px 16px),
    radial-gradient(circle at 78% 16%, rgba(139, 107, 63, 0.12), transparent 9rem),
    rgba(8, 7, 6, 0.94);
}

.quote {
  border-color: rgba(90, 67, 40, 0.48);
  background:
    radial-gradient(ellipse at 24% 18%, rgba(216, 203, 183, 0.045), transparent 8rem),
    linear-gradient(100deg, rgba(90, 67, 40, 0.13), transparent 38%, rgba(0, 0, 0, 0.25)),
    repeating-linear-gradient(4deg, rgba(216, 203, 183, 0.02) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(90deg, rgba(90, 67, 40, 0.03) 0 1px, transparent 1px 18px),
    radial-gradient(circle at 68% 72%, rgba(196, 176, 135, 0.12), transparent 9rem),
    rgba(8, 7, 6, 0.94);
}

.next-session small {
  color: var(--muted);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.next-session h2 {
  margin: 16px 0 20px;
  color: var(--text);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.next-session dl {
  display: grid;
  gap: 11px;
  margin: 0 0 22px;
}

.next-session dl div {
  display: grid;
  grid-template-columns: 28px 1fr;
}

.next-session dt {
  color: var(--gold);
}

.next-session dd {
  margin: 0;
}

.next-session button {
  position: relative;
  z-index: 25;
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(139, 107, 63, 0.42);
  color: var(--text);
  background: linear-gradient(90deg, rgba(139, 107, 63, 0.22), rgba(139, 107, 63, 0.06));
  box-shadow: 0 0 22px rgba(139, 107, 63, 0.14);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.next-session button:hover {
  transform: translateY(-1px);
  border-color: rgba(139, 107, 63, 0.56);
  background: linear-gradient(90deg, rgba(139, 107, 63, 0.26), rgba(139, 107, 63, 0.08));
  box-shadow:
    0 0 20px rgba(139, 107, 63, 0.16),
    inset 0 1px 0 rgba(216, 203, 183, 0.045);
}

.quote {
  min-height: 398px;
  overflow: hidden;
}

.quote blockquote {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(216, 203, 183, 0.86);
  font-size: 18px;
  font-style: italic;
  line-height: 1.58;
}

.candle-scene {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 205px;
  background:
    radial-gradient(circle at 68% 28%, rgba(255, 204, 105, 0.38), transparent 4.5rem),
    radial-gradient(circle at 72% 62%, rgba(139, 107, 63, 0.16), transparent 7rem),
    linear-gradient(180deg, transparent 0 30%, rgba(0, 0, 0, 0.78) 100%);
  animation: candleWarmth 5.8s ease-in-out infinite;
}

@keyframes candleWarmth {
  0%, 100% { filter: brightness(1); opacity: 0.96; }
  45% { filter: brightness(1.035); opacity: 1; }
  72% { filter: brightness(0.985); opacity: 0.94; }
}

.book {
  position: absolute;
  right: 78px;
  bottom: 36px;
  width: 165px;
  height: 70px;
  transform: skewX(-18deg) rotate(-8deg);
  border: 1px solid rgba(139, 107, 63, 0.36);
  background: linear-gradient(135deg, #1f170f, #4b3521);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.6);
}

.candle {
  position: absolute;
  right: 76px;
  bottom: 96px;
  width: 20px;
  height: 78px;
  background: linear-gradient(90deg, #8d775c, #e0c18b, #6f573d);
}

.candle i {
  position: absolute;
  left: 50%;
  top: -42px;
  width: 38px;
  height: 54px;
  transform: translateX(-50%);
  border-radius: 50% 50% 48% 48%;
  background: radial-gradient(circle, rgba(255, 226, 143, 0.95), rgba(122, 31, 31, 0.2) 58%, transparent 70%);
  filter: blur(1px);
  animation: flicker 3.8s ease-in-out infinite;
}

@keyframes flicker {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.76; }
  35% { transform: translateX(-49%) translateY(-1px) scale(1.045); opacity: 0.92; }
  64% { transform: translateX(-52%) translateY(1px) scale(0.97); opacity: 0.68; }
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

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

.modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(139, 107, 63, 0.12), transparent 26rem),
    rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(4px);
}

.codex-modal {
  width: min(720px, 100%);
  max-height: min(680px, calc(100vh - 48px));
  overflow: auto;
  padding: 28px 30px 30px;
  background-color: rgba(12, 10, 8, 0.98);
  animation: modalReveal 180ms ease-out both;
}

@keyframes modalReveal {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.codex-modal small {
  display: block;
  margin-right: 42px;
  color: var(--muted);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.codex-modal h2 {
  margin: 10px 42px 16px 0;
  color: var(--text);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-body {
  color: rgba(216, 203, 183, 0.78);
  line-height: 1.58;
}

.modal-body p {
  margin: 0;
}

.modal-body ul {
  margin: 0;
  padding-left: 20px;
}

.modal-body li + li {
  margin-top: 8px;
}

.codex-entry {
  display: grid;
  gap: 14px;
}

.entry-subtitle {
  margin: -4px 0 0;
  color: rgba(143, 131, 115, 0.95);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.entry-art {
  position: relative;
  min-height: 190px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(139, 107, 63, 0.32);
  background: rgba(7, 7, 7, 0.64);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.72),
    inset 0 -34px 48px rgba(0, 0, 0, 0.58),
    0 14px 28px rgba(0, 0, 0, 0.38);
}

.entry-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 52% 38%, transparent 0 42%, rgba(0, 0, 0, 0.48) 100%),
    linear-gradient(180deg, rgba(7, 7, 7, 0.05), rgba(7, 7, 7, 0.6));
  pointer-events: none;
}

.entry-art img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  display: block;
  object-fit: cover;
  filter: grayscale(0.22) sepia(0.08) saturate(0.62) brightness(0.72) contrast(1.14);
}

.entry-text p {
  margin: 0;
  color: rgba(216, 203, 183, 0.78);
  line-height: 1.65;
}

.location-entry {
  gap: 16px;
}

.location-header {
  display: grid;
  gap: 8px;
}

.location-header h2 {
  margin-bottom: 0;
}

.location-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 0;
}

.location-kicker span {
  padding: 5px 8px;
  border: 1px solid rgba(139, 107, 63, 0.26);
  color: rgba(216, 203, 183, 0.72);
  background:
    linear-gradient(90deg, rgba(139, 107, 63, 0.08), rgba(7, 7, 7, 0.18)),
    rgba(7, 7, 7, 0.32);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.entry-divider {
  height: 1px;
  margin: 4px 0;
  background:
    linear-gradient(90deg, transparent, rgba(139, 107, 63, 0.42), rgba(216, 203, 183, 0.12), rgba(139, 107, 63, 0.42), transparent);
  box-shadow: 0 0 18px rgba(139, 107, 63, 0.08);
}

.location-meta-panel,
.location-lore,
.location-secrets {
  position: relative;
  padding: 14px;
  border: 1px solid rgba(139, 107, 63, 0.24);
  background:
    var(--asset-texture-parchment),
    linear-gradient(135deg, rgba(139, 107, 63, 0.08), rgba(7, 7, 7, 0.36)),
    rgba(15, 13, 10, 0.72);
  background-size: cover, auto, auto;
  background-blend-mode: soft-light, normal, normal;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.62),
    inset 0 18px 34px rgba(216, 203, 183, 0.018),
    inset 0 -22px 38px rgba(0, 0, 0, 0.36);
}

.location-meta-panel dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
}

.location-meta-panel div {
  display: grid;
  gap: 4px;
}

.location-meta-panel dt {
  color: rgba(143, 131, 115, 0.92);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.location-meta-panel dd {
  margin: 0;
  color: rgba(216, 203, 183, 0.78);
  line-height: 1.45;
}

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

.chronicle-chip,
.region-character {
  position: relative;
  min-height: 92px;
  padding: 12px;
  border: 1px solid rgba(139, 107, 63, 0.22);
  background:
    linear-gradient(180deg, rgba(216, 203, 183, 0.035), transparent),
    rgba(7, 7, 7, 0.34);
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.42),
    0 10px 22px rgba(0, 0, 0, 0.22);
}

.chronicle-chip time,
.region-character small {
  display: block;
  margin-bottom: 7px;
  color: rgba(143, 131, 115, 0.95);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.chronicle-chip strong,
.region-character strong {
  display: block;
  color: rgba(216, 203, 183, 0.9);
  font-weight: 400;
  letter-spacing: 0.06em;
}

.chronicle-chip p,
.region-character p,
.location-lore p {
  margin: 7px 0 0;
  color: rgba(216, 203, 183, 0.68);
  line-height: 1.55;
}

.region-character {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
}

.region-character::before {
  content: "";
  width: 42px;
  height: 56px;
  border: 1px solid rgba(139, 107, 63, 0.32);
  background:
    radial-gradient(circle at 50% 28%, rgba(216, 203, 183, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(139, 107, 63, 0.14), rgba(0, 0, 0, 0.58)),
    rgba(7, 7, 7, 0.54);
  box-shadow: inset 0 -14px 18px rgba(0, 0, 0, 0.55);
}

.location-lore h3,
.location-secrets h3 {
  margin: 0 0 10px;
  color: rgba(216, 203, 183, 0.9);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.location-secrets ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.location-secrets li {
  padding: 8px 10px;
  border-left: 1px solid rgba(139, 107, 63, 0.36);
  color: rgba(216, 203, 183, 0.72);
  background: linear-gradient(90deg, rgba(139, 107, 63, 0.08), transparent);
}

.character-entry {
  gap: 16px;
}

.character-header {
  display: grid;
  gap: 8px;
}

.character-header h2 {
  margin-bottom: 0;
}

.character-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.65fr) minmax(0, 1.35fr);
  gap: 14px;
  align-items: stretch;
}

.portrait-frame {
  position: relative;
  min-height: 292px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px solid rgba(139, 107, 63, 0.34);
  background:
    var(--asset-texture-metal),
    radial-gradient(circle at 50% 18%, rgba(216, 203, 183, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(139, 107, 63, 0.08), rgba(7, 7, 7, 0.62)),
    rgba(7, 7, 7, 0.58);
  background-size: cover, auto, auto, auto;
  background-blend-mode: soft-light, normal, normal, normal;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.78),
    inset 0 -34px 54px rgba(0, 0, 0, 0.62),
    0 16px 32px rgba(0, 0, 0, 0.34);
}

.portrait-frame::before,
.portrait-frame::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  pointer-events: none;
}

.portrait-frame::before {
  left: 8px;
  top: 8px;
  border-left: 1px solid rgba(196, 176, 135, 0.72);
  border-top: 1px solid rgba(196, 176, 135, 0.72);
}

.portrait-frame::after {
  right: 8px;
  bottom: 8px;
  border-right: 1px solid rgba(196, 176, 135, 0.72);
  border-bottom: 1px solid rgba(196, 176, 135, 0.72);
}

.portrait-placeholder {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.portrait-silhouette {
  width: 108px;
  height: 150px;
  border: 1px solid rgba(139, 107, 63, 0.38);
  background:
    radial-gradient(circle at 50% 28%, rgba(216, 203, 183, 0.16), transparent 18%),
    radial-gradient(ellipse at 50% 72%, rgba(216, 203, 183, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(111, 77, 184, 0.08), rgba(0, 0, 0, 0.68)),
    rgba(7, 7, 7, 0.56);
  box-shadow:
    inset 0 -28px 34px rgba(0, 0, 0, 0.62),
    0 0 26px rgba(139, 107, 63, 0.09);
}

.portrait-placeholder p {
  max-width: 190px;
  margin: 0;
  color: rgba(216, 203, 183, 0.68);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.5;
}

.character-dossier {
  position: relative;
  padding: 14px;
  border: 1px solid rgba(139, 107, 63, 0.24);
  background:
    var(--asset-texture-parchment),
    linear-gradient(135deg, rgba(139, 107, 63, 0.075), rgba(7, 7, 7, 0.42)),
    rgba(15, 13, 10, 0.72);
  background-size: cover, auto, auto;
  background-blend-mode: soft-light, normal, normal;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.62),
    inset 0 -22px 38px rgba(0, 0, 0, 0.36);
}

.character-dossier dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
}

.character-dossier dt {
  color: rgba(143, 131, 115, 0.92);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.character-dossier dd {
  margin: 4px 0 0;
  color: rgba(216, 203, 183, 0.78);
  line-height: 1.45;
}

.thread-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.thread-list li {
  padding: 9px 10px;
  border-left: 1px solid rgba(139, 107, 63, 0.36);
  color: rgba(216, 203, 183, 0.72);
  background: linear-gradient(90deg, rgba(139, 107, 63, 0.08), rgba(7, 7, 7, 0.1));
}

.location-link-card {
  display: block;
  min-height: 92px;
  padding: 12px;
  border: 1px solid rgba(139, 107, 63, 0.22);
  color: inherit;
  background:
    linear-gradient(180deg, rgba(216, 203, 183, 0.035), transparent),
    rgba(7, 7, 7, 0.34);
  text-decoration: none;
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.42),
    0 10px 22px rgba(0, 0, 0, 0.22);
}

.location-link-card:hover {
  border-color: rgba(139, 107, 63, 0.42);
}

.location-link-card small {
  display: block;
  margin-bottom: 7px;
  color: rgba(143, 131, 115, 0.95);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.location-link-card strong {
  display: block;
  color: rgba(216, 203, 183, 0.9);
  font-weight: 400;
  letter-spacing: 0.06em;
}

.location-link-card p {
  margin: 7px 0 0;
  color: rgba(216, 203, 183, 0.68);
  line-height: 1.55;
}

.related-records {
  display: grid;
  gap: 12px;
}

.related-section {
  display: grid;
  gap: 10px;
}

.related-section + .related-section {
  padding-top: 10px;
  border-top: 1px solid rgba(139, 107, 63, 0.16);
}

.related-records h3,
.related-group h4 {
  margin: 0;
  color: rgba(216, 203, 183, 0.9);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.related-records h3 {
  font-size: 16px;
}

.related-group {
  display: grid;
  gap: 8px;
}

.related-group h4 {
  color: rgba(143, 131, 115, 0.95);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 11px;
}

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

.related-card {
  display: block;
  min-height: 92px;
  padding: 12px;
  border: 1px solid rgba(139, 107, 63, 0.22);
  color: inherit;
  background:
    linear-gradient(180deg, rgba(216, 203, 183, 0.034), transparent),
    linear-gradient(135deg, rgba(139, 107, 63, 0.065), rgba(7, 7, 7, 0.22)),
    rgba(7, 7, 7, 0.34);
  text-decoration: none;
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.42),
    0 10px 22px rgba(0, 0, 0, 0.22);
}

.related-card:hover {
  border-color: rgba(139, 107, 63, 0.42);
  box-shadow:
    inset 0 0 20px rgba(139, 107, 63, 0.055),
    0 12px 26px rgba(0, 0, 0, 0.28);
}

.related-card small {
  display: block;
  margin-bottom: 7px;
  color: rgba(143, 131, 115, 0.95);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.related-card strong {
  display: block;
  color: rgba(216, 203, 183, 0.9);
  font-weight: 400;
  letter-spacing: 0.06em;
}

.related-card p {
  margin: 7px 0 0;
  color: rgba(216, 203, 183, 0.66);
  line-height: 1.5;
}

.entry-notes {
  padding-top: 4px;
}

.entry-notes h3 {
  margin: 0 0 8px;
  color: rgba(216, 203, 183, 0.88);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.entry-updated {
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid rgba(139, 107, 63, 0.2);
  color: rgba(143, 131, 115, 0.92);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.entry-full-link {
  justify-self: start;
  padding: 8px 12px;
  border: 1px solid rgba(139, 107, 63, 0.34);
  color: rgba(216, 203, 183, 0.86);
  background: rgba(7, 7, 7, 0.42);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.entry-full-link:hover {
  border-color: rgba(139, 107, 63, 0.52);
  color: var(--text);
}

.codex-entry-trigger {
  display: block;
  width: 100%;
  margin: 0;
  padding: 7px 9px;
  border: 0;
  border-left: 1px solid rgba(139, 107, 63, 0.28);
  color: rgba(216, 203, 183, 0.66);
  background: linear-gradient(90deg, rgba(139, 107, 63, 0.08), rgba(0, 0, 0, 0.1));
  font: inherit;
  line-height: 1.38;
  text-align: left;
  cursor: pointer;
}

.codex-entry-trigger b {
  color: rgba(216, 203, 183, 0.88);
  font-weight: 400;
}

.codex-entry-trigger:hover {
  color: rgba(216, 203, 183, 0.82);
  border-left-color: rgba(139, 107, 63, 0.42);
}

.modal-close {
  position: absolute;
  right: 18px;
  top: 16px;
  z-index: 4;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(139, 107, 63, 0.42);
  color: var(--text);
  background: rgba(7, 7, 7, 0.72);
  font-size: 24px;
  line-height: 1;
}

body.modal-open {
  overflow: hidden;
}

.bottom-runes {
  position: fixed;
  left: 50%;
  bottom: 15px;
  z-index: 38;
  display: flex;
  align-items: center;
  gap: 22px;
  transform: translateX(-50%);
  color: rgba(139, 107, 63, 0.56);
  pointer-events: none;
}

.bottom-runes span {
  width: 180px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 107, 63, 0.44), transparent);
}

.bottom-runes b {
  color: var(--gold);
  font-size: 30px;
  font-weight: 400;
  text-shadow: 0 0 18px rgba(139, 107, 63, 0.58);
}

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

  .right-column {
    display: none;
  }

  .hero-copy {
    padding: 52px 46px;
  }
}

@media (max-width: 920px) {
  .layout {
    display: block;
    padding: 10px;
  }

  .sidebar {
    position: relative;
    top: 0;
    height: auto;
    margin-bottom: 12px;
  }

  .sidebar-runes {
    position: static;
    margin-top: 26px;
  }

  .top-marks {
    display: none;
  }

  .content-grid,
  .bottom-grid,
  .placeholder-grid {
    grid-template-columns: 1fr;
  }

  .codex-empty-state.is-portrait {
    padding-left: 18px;
    padding-top: 136px;
  }

  .codex-empty-state.is-portrait > i {
    left: 18px;
    top: 18px;
    transform: none;
  }

  .empty-state-fields {
    grid-template-columns: 1fr;
  }

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

  .entry-card-grid,
  .related-grid,
  .location-meta-panel dl,
  .character-dossier dl,
  .session-grid,
  .thread-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline-entry {
    grid-template-columns: 72px 30px minmax(0, 1fr);
  }

  .fate-map {
    min-height: 520px;
  }

  .fate-svg {
    height: 520px;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 520px;
  }

  .hero-copy {
    padding: 44px 28px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .characters,
  .location-list {
    grid-template-columns: 1fr;
  }

  .timeline-entry {
    grid-template-columns: 1fr;
  }

  .timeline-entry > i {
    position: absolute;
    right: 12px;
    top: 12px;
  }

  .fate-map {
    min-height: 460px;
  }

  .fate-svg {
    height: 460px;
  }

  .fate-node text {
    font-size: 2.6px;
  }

  .entry-card-grid,
  .related-grid,
  .location-meta-panel dl,
  .location-secrets ul,
  .character-layout,
  .character-dossier dl,
  .session-grid,
  .session-card dl,
  .thread-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
