/* THE HOLLOW COVENANT — Briarcombe. gothic magic: arched windows, sigils, drifting mist and ember-light. */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=Cinzel:wght@500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap');

:root {
  --bg: #0b080e;
  --panel: #140e18;
  --panel-2: #1a1220;
  --border: rgba(212, 175, 106, 0.22);
  --accent: #d4af6a;
  --accent-2: #d9667f;
  --text: #ece0e4;
  --muted: #a8949f;
  --line-rgb: 212, 175, 106;
  --ember-a: 232, 181, 106;
  --ember-b: 217, 102, 127;
  --glow-c: 90, 60, 130;
  --card-bg: #130d17;
  --title-1: #fbefd2;
  --title-2: #d4af6a;
  --title-3: #c4566e;
  --font-heading: 'Cinzel', serif;
  --font-display: 'Cinzel Decorative', 'Cinzel', serif;
  --font-body: 'Cormorant Garamond', serif;

  /* per-house values (overridden by .duskryn / .serevain / .kharrow / .elarith) */
  --h-c1: #3a2440;
  --h-c2: #8a5a7a;
  --h-c3: #d9c2cf;
  --h-bright: #d9c2cf;
  --h-glow: rgba(217, 102, 127, 0.35);
  --h-tint: rgba(90, 50, 100, 0.25);
  --page-glow-a: rgba(232, 160, 100, 0.13);
  --page-glow-b: rgba(201, 84, 108, 0.12);
}

/* ---------- Official house palettes ---------- */
.duskryn {
  --bg: #0b0a11; --panel: #12111a; --panel-2: #181624; --card-bg: #101018;
  --border: rgba(166,168,187,0.24); --line-rgb: 166, 168, 187;
  --ember-a: 166, 168, 187; --ember-b: 150, 105, 165; --glow-c: 104, 70, 111;
  --title-1: #f2f2f9; --title-2: #A6A8BB; --title-3: #8d5f99;
  --text: #e8e8f0; --muted: #9496ab;
  --h-c1: #171820; --h-c2: #68466F; --h-c3: #A6A8BB;
  --h-bright: #A6A8BB; --h-tint: rgba(104,70,111,0.30); --h-glow: rgba(135,95,145,0.55);
  --page-glow-a: rgba(104,70,111,0.24); --page-glow-b: rgba(166,168,187,0.08);
  --accent: #A6A8BB; --accent-2: #b595bd;
}
.serevain {
  --bg: #120a0d; --panel: #1b0f14; --panel-2: #24131a; --card-bg: #170d11;
  --border: rgba(198,162,105,0.28); --line-rgb: 198, 162, 105;
  --ember-a: 198, 162, 105; --ember-b: 214, 90, 120; --glow-c: 104, 29, 50;
  --title-1: #fdf3df; --title-2: #C6A269; --title-3: #b03a58;
  --text: #f4e8d6; --muted: #b39d8c;
  --h-c1: #681D32; --h-c2: #C6A269; --h-c3: #F0E0C7;
  --h-bright: #C6A269; --h-tint: rgba(104,29,50,0.50); --h-glow: rgba(198,162,105,0.45);
  --page-glow-a: rgba(198,162,105,0.14); --page-glow-b: rgba(104,29,50,0.32);
  --accent: #C6A269; --accent-2: #F0E0C7;
}
.kharrow {
  --bg: #080d14; --panel: #0e1621; --panel-2: #131e2c; --card-bg: #0b121c;
  --border: rgba(131,149,165,0.28); --line-rgb: 131, 149, 165;
  --ember-a: 160, 182, 205; --ember-b: 131, 149, 165; --glow-c: 37, 59, 83;
  --title-1: #f6f9fb; --title-2: #8395A5; --title-3: #4f7396;
  --text: #e3e9ee; --muted: #8b9cab;
  --h-c1: #253B53; --h-c2: #8395A5; --h-c3: #D0D5D8;
  --h-bright: #8395A5; --h-tint: rgba(37,59,83,0.60); --h-glow: rgba(131,149,165,0.50);
  --page-glow-a: rgba(37,59,83,0.45); --page-glow-b: rgba(131,149,165,0.10);
  --accent: #8395A5; --accent-2: #D0D5D8;
}
.elarith {
  --bg: #0b0f0e; --panel: #121817; --panel-2: #181f23; --card-bg: #0f1514;
  --border: rgba(213,202,231,0.28); --line-rgb: 213, 202, 231;
  --ember-a: 213, 202, 231; --ember-b: 168, 189, 170; --glow-c: 130, 120, 160;
  --title-1: #fffdf8; --title-2: #D5CAE7; --title-3: #A8BDAA;
  --text: #eeeee9; --muted: #9ba9a0;
  --h-c1: #A8BDAA; --h-c2: #D5CAE7; --h-c3: #F1EEE8;
  --h-bright: #D5CAE7; --h-tint: rgba(168,189,170,0.14); --h-glow: rgba(213,202,231,0.50);
  --page-glow-a: rgba(213,202,231,0.14); --page-glow-b: rgba(168,189,170,0.12);
  --accent: #A8BDAA; --accent-2: #D5CAE7;
}

/* ---------- Atmosphere: night glow, scattered embers, low mist (static: keeps scrolling light) ---------- */
body {
  font-size: 18px;
  background:
    radial-gradient(circle 1.6px at 12% 18%, rgba(var(--ember-a),0.8), transparent),
    radial-gradient(circle 1.2px at 28% 62%, rgba(var(--ember-b),0.7), transparent),
    radial-gradient(circle 1.8px at 47% 34%, rgba(var(--ember-a),0.6), transparent),
    radial-gradient(circle 1.1px at 63% 78%, rgba(255,230,190,0.7), transparent),
    radial-gradient(circle 1.5px at 78% 24%, rgba(var(--ember-b),0.6), transparent),
    radial-gradient(circle 1.2px at 91% 56%, rgba(var(--ember-a),0.7), transparent),
    radial-gradient(circle 1.4px at 8% 88%, rgba(255,230,190,0.6), transparent),
    radial-gradient(circle 1px at 38% 92%, rgba(var(--ember-a),0.7), transparent),
    radial-gradient(ellipse at 50% -10%, var(--page-glow-a), transparent 55%),
    radial-gradient(ellipse at 10% 108%, var(--page-glow-b), transparent 52%),
    radial-gradient(ellipse at 95% 55%, rgba(var(--glow-c),0.14), transparent 50%),
    var(--bg);
  background-size: 520px 520px, 520px 520px, 520px 520px, 520px 520px, 520px 520px, 520px 520px, 520px 520px, 520px 520px, auto, auto, auto, auto;
  background-repeat: repeat, repeat, repeat, repeat, repeat, repeat, repeat, repeat, no-repeat, no-repeat, no-repeat, no-repeat;
}

@keyframes hc-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hc-spin { to { transform: rotate(360deg); } }
@keyframes hc-spin-rev { to { transform: rotate(-360deg); } }

/* ---------- Header ---------- */
.u-title { font-weight: 600; letter-spacing: 4px; font-size: 40px; }
.u-title::after {
  content: "";
  display: block;
  width: 90px;
  height: 1px;
  margin-top: 14px;
  background: linear-gradient(to right, var(--accent), transparent);
}
.u-tagline { font-size: 19px; font-style: italic; }

.hc-header { text-align: center; }
.hc-header .back-link { display: block; text-align: left; }

.hc-banner {
  position: relative;
  max-width: 900px;
  margin: 8px auto 40px;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: 1px solid rgba(var(--line-rgb),0.30);
  outline-offset: 8px;
  overflow: hidden;
  box-shadow: 0 20px 56px rgba(0,0,0,0.6), 0 0 50px rgba(201,84,108,0.16);
}
.hc-banner img { display: block; width: 100%; height: auto; }
.hc-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 58%, rgba(11,8,14,0.75));
  pointer-events: none;
}

.hc-title-wrap { position: relative; isolation: isolate; padding: 22px 0 10px; }
.arcane {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(560px, 120%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: -1;
  pointer-events: none;
  color: var(--accent);
  opacity: 0.18;
}
.arcane svg { width: 100%; height: 100%; }
.arcane .a-outer { transform-box: fill-box; transform-origin: center; animation: hc-spin 120s linear infinite; }
.arcane .a-inner { transform-box: fill-box; transform-origin: center; animation: hc-spin-rev 160s linear infinite; }

.hc-header .u-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 46px;
  letter-spacing: 3px;
  color: var(--title-2);
  filter: drop-shadow(0 0 18px rgba(var(--line-rgb),0.28));
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hc-header .u-title {
    background: linear-gradient(180deg, var(--title-1) 0%, var(--title-2) 52%, var(--title-3) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
.hc-header .u-title::after {
  width: 200px;
  margin: 16px auto 0;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
}

.hc-eyebrow {
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 12px;
}
.hc-kicker {
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 6px 0 0;
}
.hc-quote {
  max-width: 580px;
  margin: 26px auto 0;
  padding: 16px 26px;
  border-left: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  background: linear-gradient(90deg, rgba(var(--line-rgb),0.08), rgba(var(--line-rgb),0.02) 50%, rgba(var(--line-rgb),0.08));
  font-style: italic;
  font-size: 23px;
  line-height: 1.55;
  color: var(--text);
  text-shadow: 0 0 22px rgba(var(--line-rgb),0.18);
}

/* ---------- Section headings: centered with fading rules ---------- */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 46px 0 24px;
  padding-bottom: 0;
  border-bottom: 0;
  text-align: center;
  font-size: 13px;
  letter-spacing: 5px;
}
.section-heading::before,
.section-heading::after {
  content: "";
  flex: 1;
  height: 1px;
}
.section-heading::before { background: linear-gradient(to right, transparent, var(--accent)); }
.section-heading::after  { background: linear-gradient(to left, transparent, var(--accent)); }

/* ---------- The Concordat: a sealed treaty ---------- */
.hc-treaty {
  position: relative;
  margin: 6px 0 52px;
  padding: 34px 36px 42px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(var(--line-rgb),0.09), transparent 60%),
    linear-gradient(180deg, #1a1220, #120c17);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 16px 44px rgba(0,0,0,0.5), inset 0 0 70px rgba(0,0,0,0.5);
}
.hc-treaty::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(var(--line-rgb),0.30);
  pointer-events: none;
}
.hc-treaty p { position: relative; margin: 0 0 14px; line-height: 1.85; }
.hc-treaty p:first-of-type::first-letter {
  float: left;
  margin: 6px 12px 0 0;
  font-family: var(--font-display);
  font-size: 3.4em;
  line-height: 0.8;
  color: var(--accent);
}
.hc-clause {
  position: relative;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-style: italic;
  font-size: 21px;
  color: var(--text);
}
.hc-clause strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--accent-2);
}
.hc-seal {
  position: absolute;
  right: 28px;
  bottom: -30px;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 3px double rgba(246,217,222,0.30);
  background: radial-gradient(circle at 34% 28%, #d4506a, #8a1a35 62%, #5a0f22);
  box-shadow: 0 8px 18px rgba(0,0,0,0.6), inset 0 -4px 8px rgba(0,0,0,0.35), inset 0 3px 6px rgba(255,255,255,0.18);
  color: #f6d9de;
  font-size: 28px;
  transform: rotate(-10deg);
}

/* ---------- House cards: arched windows with a glowing sigil ---------- */
.house-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 28px;
  margin: 8px 0 20px;
}
.house-card {
  position: relative;
  display: block;
  text-align: center;
  padding: 50px 22px 26px;
  border: 1.5px solid transparent;
  border-radius: 50% 50% 16px 16px / 130px 130px 16px 16px;
  background:
    linear-gradient(180deg, var(--h-tint), transparent 62%) padding-box,
    linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
    linear-gradient(165deg, var(--h-c1), var(--h-c2) 45%, var(--h-c3)) border-box;
  box-shadow: 0 14px 34px rgba(0,0,0,0.5), inset 0 0 44px rgba(0,0,0,0.35);
  transition: transform .22s ease, box-shadow .22s ease;
  animation: hc-rise .8s ease backwards;
}
.house-card:nth-child(2) { animation-delay: .12s; }
.house-card:nth-child(3) { animation-delay: .24s; }
.house-card:nth-child(4) { animation-delay: .36s; }
a.house-card:hover {
  transform: translateY(-8px);
  text-decoration: none;
  box-shadow: 0 0 38px var(--h-glow), 0 22px 46px rgba(0,0,0,0.55), inset 0 0 44px rgba(0,0,0,0.2);
}
a.house-card:hover .house-sigil { filter: drop-shadow(0 0 16px var(--h-glow)) brightness(1.15); }
a.house-card:hover .house-sigil .ring { animation-duration: 12s; }

.house-sigil {
  width: 92px;
  height: 92px;
  margin: 0 auto 16px;
  color: var(--h-bright);
  filter: drop-shadow(0 0 10px var(--h-glow));
  transition: filter .22s ease;
}
.house-sigil svg { display: block; width: 100%; height: 100%; }
.house-sigil .ring { transform-box: fill-box; transform-origin: center; animation: hc-spin 50s linear infinite; }

.house-name {
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text);
}
.house-epithet { margin: 2px 0 4px; font-size: 19px; font-style: italic; color: var(--h-bright); }
.house-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 68%;
  margin: 10px auto 12px;
  font-size: 9px;
  color: var(--h-bright);
}
.house-rule::before,
.house-rule::after { content: ""; flex: 1; height: 1px; }
.house-rule::before { background: linear-gradient(to right, transparent, var(--h-bright)); }
.house-rule::after  { background: linear-gradient(to left, transparent, var(--h-bright)); }
.house-domain {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9em;
  margin-bottom: 8px;
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text);
}
.house-vibe { min-height: 1.3em; margin-bottom: 16px; font-size: 17px; font-style: italic; color: var(--muted); }
.house-lord { margin-bottom: 20px; font-size: 18px; color: var(--text); }
.house-lord small {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-heading);
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--muted);
}
.house-enter {
  font-family: var(--font-heading);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--h-bright);
}

/* ---------- Creators note + stamp ---------- */
.hc-creator {
  padding: 20px 24px;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  background: rgba(var(--line-rgb),0.05);
}
.hc-creator p { margin: 0 0 12px; line-height: 1.75; }
.hc-creator p:last-child { margin-bottom: 0; font-size: 16px; color: var(--muted); }

.hc-stamp {
  margin-top: 52px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.hc-stamp .hc-line { font-size: 20px; font-style: italic; line-height: 1.6; color: var(--muted); }
.hc-stamp .hc-brand {
  margin-top: 16px;
  font-family: var(--font-heading);
  font-size: 11px;
  letter-spacing: 5px;
  color: var(--accent);
}

/* ---------- House pages ---------- */
.house-hero { position: relative; isolation: isolate; }
.house-hero::before {
  content: "";
  position: absolute;
  left: -40px; top: 50%;
  width: 380px; height: 260px;
  transform: translateY(-50%);
  z-index: -1;
  background: radial-gradient(ellipse, var(--h-glow), transparent 68%);
  opacity: 0.45;
  pointer-events: none;
}
.house-hero { display: flex; align-items: center; gap: 28px; margin-top: 6px; }
.house-hero .house-sigil { width: 118px; height: 118px; margin: 0; flex-shrink: 0; }
.house-hero .hc-eyebrow { margin-bottom: 6px; }
.house-hero .u-title { margin: 0 0 4px; }
body[class] .house-hero .u-title { font-family: var(--font-display); font-weight: 700; color: var(--title-2); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  body[class] .house-hero .u-title {
    background: linear-gradient(180deg, var(--title-1) 0%, var(--title-2) 55%, var(--title-3) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.house-facts {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  max-width: 660px;
}
.house-facts li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding: 12px 2px;
  border-bottom: 1px dotted rgba(var(--line-rgb),0.28);
}
.fact-label {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--accent);
}
.fact-value { text-align: right; color: var(--text); }

.palette { display: flex; flex-wrap: wrap; gap: 26px; margin: 4px 0 18px; }
.palette-item { width: 118px; text-align: center; }
.orb {
  width: 76px;
  height: 76px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.28);
  background:
    radial-gradient(circle at 32% 26%, rgba(255,255,255,0.42), transparent 40%),
    var(--c);
  box-shadow: 0 0 26px -4px var(--c), inset 0 -10px 18px rgba(0,0,0,0.38);
}
.palette-name { font-family: var(--font-heading); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--text); }
.palette-hex { margin-top: 3px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--muted); }
.palette-note { max-width: 660px; margin: 0; font-style: italic; color: var(--muted); }

.char-card {
  border: 1.5px solid transparent;
  border-radius: 50% 50% 14px 14px / 90px 90px 14px 14px;
  background:
    linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
    linear-gradient(165deg, var(--h-c1), var(--h-c2) 45%, var(--h-c3)) border-box;
}
.char-card .char-body { text-align: center; }
.char-card .char-tags { justify-content: center; }
.char-card .char-link { align-self: center; }

/* ---------- World link (hub) + topic chips (world page) ---------- */
.hc-worldlink {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0 0 52px;
  overflow: hidden;
  background: linear-gradient(180deg, #1a1220, #120c17);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 44px rgba(0,0,0,0.5);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.hc-worldlink:hover { transform: translateY(-4px); text-decoration: none; border-color: var(--accent); box-shadow: 0 0 34px rgba(var(--line-rgb),0.22), 0 18px 44px rgba(0,0,0,0.5); }
.hc-worldlink img { width: 46%; min-height: 200px; object-fit: cover; display: block; border-right: 1px solid var(--border); }
.hc-worldlink-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px 30px; }
.hc-worldlink-eyebrow { font-family: var(--font-heading); font-size: 11px; letter-spacing: 5px; color: var(--accent-2); }
.hc-worldlink-title { margin: 6px 0 10px; font-family: var(--font-display); font-size: 26px; color: #f1deb4; }
.hc-worldlink-desc { margin-bottom: 16px; font-size: 18px; font-style: italic; line-height: 1.55; color: var(--muted); }
.hc-worldlink .house-enter { color: var(--accent); }

.hc-topics { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 6px 0 12px; }
.hc-topic {
  padding: 8px 16px;
  border: 1px dashed rgba(var(--line-rgb),0.40);
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.8;
}

/* ---------- Lore accordion (world page) ---------- */
.lore-toolbar { display: flex; justify-content: flex-end; gap: 10px; margin: -6px 0 14px; }
.lore-btn {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.lore-btn:hover { color: var(--accent); border-color: var(--accent); }

.lore-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 26px; }
.lore-item {
  position: relative;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(var(--line-rgb), 0.07), transparent 60%),
    linear-gradient(180deg, #1a1220, #120c17);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.lore-item::before {
  content: "";
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, transparent, var(--accent), var(--accent-2), transparent);
  opacity: 0.35;
  transition: opacity .25s ease;
}
.lore-item[open] { border-color: rgba(var(--line-rgb), 0.5); box-shadow: 0 0 34px rgba(var(--line-rgb), 0.12), 0 12px 34px rgba(0,0,0,0.5); }
.lore-item[open]::before { opacity: 1; }
.lore-item summary {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
}
.lore-item summary::-webkit-details-marker { display: none; }
.lore-item summary:hover .lore-title { color: #f6e6c0; }

.lore-num {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--line-rgb), 0.10), inset 0 0 14px rgba(var(--line-rgb), 0.18);
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--accent);
}
.lore-head { flex: 1; min-width: 0; }
.lore-title { display: block; font-family: var(--font-heading); font-size: 17px; letter-spacing: 3px; text-transform: uppercase; color: var(--text); transition: color .2s ease; }
.lore-tag { display: block; margin-top: 3px; font-size: 17px; font-style: italic; color: var(--accent-2); }
.lore-chev {
  flex-shrink: 0;
  width: 11px;
  height: 11px;
  margin-right: 4px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .3s ease;
}
.lore-item[open] .lore-chev { transform: rotate(225deg) translateY(-2px); }

.lore-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 4px 30px;
  align-items: start;
  padding: 4px 28px 26px 86px;
  animation: hc-unfurl .45s ease;
}
.lore-text { grid-column: 1; }
.lore-body p { margin: 0 0 14px; line-height: 1.85; }
.lore-art {
  grid-column: 2;
  grid-row: 1;
  margin: 4px 0 0;
}
.lore-art img {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
  border: 1.5px solid var(--accent);
  border-radius: 115px 115px 12px 12px / 90px 90px 12px 12px;
  box-shadow: 0 0 0 5px rgba(var(--line-rgb), 0.10), 0 14px 34px rgba(0,0,0,0.55), 0 0 30px rgba(var(--line-rgb), 0.12);
  transition: transform .25s ease, box-shadow .25s ease;
}
.lore-art img:hover { transform: translateY(-3px); box-shadow: 0 0 0 5px rgba(var(--line-rgb), 0.16), 0 18px 40px rgba(0,0,0,0.6), 0 0 38px rgba(var(--line-rgb), 0.28); }
.lore-callout {
  grid-column: 1 / -1;
  margin: 18px 0 4px !important;
  padding: 16px 20px;
  text-align: center;
  font-size: 21px;
  font-style: italic;
  line-height: 1.6 !important;
  color: var(--text);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, transparent, rgba(var(--line-rgb), 0.08), transparent);
}
.lore-callout strong { font-weight: 500; }
@keyframes hc-unfurl { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Realm map + compass ---------- */
.hc-map { margin: 0 0 26px; text-align: center; }
.hc-map img {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: 1px solid rgba(var(--line-rgb),0.30);
  outline-offset: 7px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.6), 0 0 44px rgba(var(--line-rgb),0.10);
}
.hc-map figcaption { margin-top: 18px; font-family: var(--font-heading); font-size: 10px; letter-spacing: 4px; text-transform: uppercase; color: var(--muted); }

.hc-compass { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.compass-item {
  display: block;
  padding: 16px 18px 18px;
  text-align: center;
  background: linear-gradient(180deg, var(--h-tint), transparent 70%), var(--card-bg);
  border: 1px solid var(--h-c2);
  border-radius: 10px;
  transition: transform .2s ease, box-shadow .2s ease;
}
a.compass-item:hover { transform: translateY(-4px); text-decoration: none; box-shadow: 0 0 26px var(--h-glow); }
.compass-center { grid-column: 1 / -1; --h-c2: rgba(var(--line-rgb),0.5); --h-tint: rgba(var(--line-rgb),0.10); }
.compass-dir { display: block; font-family: var(--font-heading); font-size: 10px; letter-spacing: 5px; color: var(--h-bright); }
.compass-center .compass-dir { color: var(--accent); }
.compass-place { display: block; margin: 5px 0 6px; font-family: var(--font-heading); font-size: 16px; letter-spacing: 2px; color: var(--text); }
.compass-desc { display: block; font-size: 16px; font-style: italic; line-height: 1.5; color: var(--muted); }

@media (max-width: 640px) {
  .lore-item summary { gap: 12px; padding: 14px 14px; }
  .lore-num { width: 38px; height: 38px; font-size: 12px; }
  .lore-title { font-size: 14px; letter-spacing: 2px; }
  .lore-tag { font-size: 15px; }
  .lore-body { display: block; padding: 2px 18px 22px 18px; }
  .lore-art { max-width: 230px; margin: 8px auto 18px; }
  .lore-callout { font-size: 19px; }

  .u-title { font-size: 26px; letter-spacing: 2px; }
  .hc-header .u-title { font-size: 28px; letter-spacing: 2px; }
  .hc-quote { font-size: 20px; }
  .hc-treaty { padding: 28px 22px 40px; }
  .hc-worldlink { flex-direction: column; }
  .hc-worldlink img { width: 100%; min-height: 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .house-hero { flex-direction: column; text-align: center; }
  .house-hero .u-title::after { margin-left: auto; margin-right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .lore-body, .house-card, .house-sigil .ring, .arcane .a-outer, .arcane .a-inner {
    animation: none !important;
  }
}
