/* The player reference uses the site's shared colors, typography, and navigation. */
.reference-page { line-height: 1.65; }
.reference-page h1, .reference-page h2, .reference-page h3, .reference-page p { overflow-wrap: anywhere; }
.reference-page .topbar { position: sticky; top: 0; z-index: 30; }
.reference-page .site-footer { border-top: 1px solid var(--line); }
.ref-icon { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; vertical-align: middle; }
.reference-layout { max-width: 1400px; margin: auto; padding: 0 4vw; display: grid; grid-template-columns: 215px minmax(0, 1fr); gap: 64px; }
.reference-sidebar { position: sticky; top: calc(var(--header-height) + 36px); align-self: start; padding: 8px 0 36px; margin-top: 40px; max-height: calc(100dvh - var(--header-height) - 36px); overflow-y: auto; }
.reference-home { display: block; color: var(--text); font-size: 18px; font-family: "Cormorant Garamond", Georgia, serif; text-decoration: none; margin-bottom: 20px; }
.reference-sidebar nav { display: grid; gap: 3px; }
.reference-sidebar nav p { font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 20px 12px 8px; }
.reference-sidebar nav a { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; font-size: 13px; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; }
.reference-sidebar nav a:hover, .reference-sidebar nav a[aria-current] { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.reference-sidebar nav a span { font-size: 11px; color: var(--muted); }
.reference-beginner { display: block; border-top: 1px solid var(--line); margin-top: 26px; padding: 20px 12px 0; text-decoration: none; font-size: 12px; }
.reference-beginner strong { display: block; color: var(--text); font-weight: 500; margin-bottom: 6px; }
.reference-beginner > span { display: flex; justify-content: space-between; gap: 10px; }
.reference-content { min-width: 0; }
.reference-section [tabindex="-1"]:focus { outline: none; }
.reference-section { padding: 48px 0 64px; border-bottom: 1px solid var(--line); }
.reference-enhanced .reference-section { min-height: calc(100dvh - var(--header-height)); border-bottom: 0; }
.reference-heading { margin-bottom: 32px; max-width: 740px; }
.reference-heading .eyebrow { margin-bottom: 14px; color: var(--accent); }
.reference-heading h1 { font-size: clamp(38px, 4.8vw, 62px); margin: 0 0 18px; }
.reference-heading > p:last-child { color: var(--muted); font-size: 16px; margin: 0; line-height: 1.8; max-width: 660px; }
.reference-filters { display: flex; align-items: end; gap: 12px; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.reference-filters > div { flex: 1; min-width: 0; }
.reference-filters .reference-search { flex: 2; }
.reference-filters label, .reference-picker label { display: block; color: var(--muted); font-size: 11px; margin-bottom: 8px; }
.reference-filters input, .reference-filters select, .reference-picker select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--field-line); border-radius: 3px; background: var(--bg); color: var(--text); font-size: 13px; }
.reference-filters input::placeholder { color: var(--muted); opacity: .8; }
.reference-filters button, .reference-empty button { min-height: 44px; padding: 8px 6px; border: 0; color: var(--accent); background: transparent; font-size: 12px; cursor: pointer; }
.reference-filters button:hover, .reference-empty button:hover { text-decoration: underline; }
.reference-results { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); margin: 20px 0 12px; }
.reference-results p { margin: 0; }
.reference-results p:first-child { color: var(--text); }
.reference-note { color: var(--muted); font-size: 12px; margin: 0 0 26px; line-height: 1.8; }
.reference-note a { white-space: normal; }
.spell-grid, .effect-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.spell-card { --school: var(--accent); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 24px; min-width: 0; }
.spell-card[data-school="fire"] { --school: #a32100; }
.spell-card[data-school="water"] { --school: #0059a3; }
.spell-card[data-school="earth"] { --school: #77512c; }
.spell-card[data-school="air"] { --school: #547f24; }
.spell-card[data-school="life"] { --school: #1c876d; }
.spell-card[data-school="death"] { --school: #5f1a89; }
.spell-card[data-school="time"] { --school: #976d0c; }
.spell-card[data-school="space"] { --school: #0015a3; }
.spell-card:target, .effect-card:target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.spell-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.school-emblem { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid color-mix(in srgb, var(--school) 35%, transparent); background: color-mix(in srgb, var(--school) 7%, transparent); border-radius: 6px; flex-shrink: 0; }
.school-emblem .ref-icon { width: 40px; height: 40px; }
.spell-school { margin: 0 0 4px; font-size: 11px; color: var(--school); }
.spell-school span { color: var(--muted); margin-left: 3px; }
.spell-heading h3 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 25px; font-weight: 400; line-height: 1.15; margin: 0; }
.spell-heading h3 a { color: var(--text); text-decoration: none; }
.spell-heading h3 a:hover { color: var(--school); }
.spell-properties { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 5px 12px; padding-bottom: 13px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.spell-properties > span:first-child { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); }
.spell-properties .ref-icon { width: 20px; height: 20px; }
.spell-description { color: var(--text); font-size: 14px; line-height: 1.8; margin: 16px 0; }
.spell-effects { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.spell-effects a { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; text-decoration: none; padding: 4px 8px 4px 4px; border-radius: 3px; border: 1px solid var(--line); }
.spell-effects a:hover { color: var(--text); border-color: var(--accent-line); }
.spell-effects .ref-icon { width: 23px; height: 23px; }
.signature-note { margin: 0 0 16px; font-size: 11px; }
.signature-note a { color: var(--accent); }
.spell-casting { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.cast-sequence { display: flex; align-items: start; gap: 7px; list-style: none; padding: 0; margin: 0; }
.cast-sequence li { display: flex; flex-direction: column; align-items: center; gap: 7px; flex: 0 1 60px; min-width: 0; }
.cast-sequence .ref-icon { width: 38px; height: 38px; padding: 3px; border: 1px solid var(--line); background: var(--bg); border-radius: 5px; }
.cast-sequence li > span { font-size: 10px; color: var(--muted); text-align: center; line-height: 1.4; }
.cast-sequence .channel-gesture .ref-icon { border-color: #0085a355; }
.cast-sequence .channel-gesture > span { color: #0085a3; }
.reference-empty { padding: 36px 24px; border: 1px solid var(--line); text-align: center; }
.reference-empty h2 { font-size: 30px; margin-bottom: 12px; }
.reference-empty p { color: var(--muted); }
.reference-picker { display: none; }
.reference-prose { max-width: 740px; margin-top: 36px; }
.reference-prose h2 { font-size: 32px; margin: 36px 0 16px; }
.reference-prose h3 { font-size: 18px; margin: 26px 0 10px; }
.reference-prose p { font-size: 15px; color: var(--muted); line-height: 1.85; margin: 0 0 16px; }
.reference-callout { border-left: 2px solid var(--accent-line); background: var(--accent-soft); padding: 18px 22px; margin: 26px 0; }
.reference-callout p { margin: 0; color: var(--muted); font-size: 14px; }
.reference-callout strong { color: var(--text); }
.status-key { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 11px; color: var(--muted); margin: 28px 0; }
.buff { color: #1e8567; }
.debuff { color: #a31f00; }
.resource { color: var(--accent); }
.effect-card { padding: 24px; border: 1px solid var(--line); background: var(--panel); border-radius: 7px; display: flex; flex-direction: column; }
.effect-card > header { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.effect-emblem { display: grid; place-items: center; flex-shrink: 0; width: 50px; height: 50px; border: 1px solid var(--line); background: var(--bg); border-radius: 6px; }
.effect-kind { font-size: 10px; margin: 0 0 5px; }
.effect-card h2 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 25px; margin: 0; }
.effect-card > p { font-size: 14px; color: var(--muted); line-height: 1.85; margin: 0 0 20px; }
.effect-sources { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.effect-sources > span { width: 100%; font-size: 10px; color: var(--muted); }
.effect-sources a { font-size: 12px; display: flex; align-items: center; gap: 5px; text-decoration: none; min-height: 32px; }
.effect-sources .ref-icon { width: 23px; height: 23px; }
.rune-board { display: grid; grid-template-columns: 1fr 1fr; max-width: 660px; margin-top: 24px; border: 1px solid var(--field-line); border-radius: 6px; overflow: hidden; background: var(--panel); }
.rune-board > div { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 8px 16px; padding: 24px; }
.rune-board > div:nth-child(odd) { border-right: 1px solid var(--line); }
.rune-board > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.rune-board .ref-icon { width: 32px; height: 32px; }
.rune-board strong, .rune-board span { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 15px; font-weight: 500; }
.rune-board small { color: var(--muted); font-size: 11px; font-weight: 400; }
.gesture-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.gesture-grid > div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 8px; border: 1px solid var(--line); background: var(--panel); border-radius: 5px; text-align: center; }
.gesture-grid strong { font-weight: 500; font-size: 12px; }
.gesture-grid span { color: var(--muted); font-size: 11px; }
.channel-times { display: flex; flex-wrap: wrap; gap: 24px; padding: 20px 0; border-block: 1px solid var(--line); }
.channel-times div { flex: 1 0 70px; }
.channel-times dt { font-size: 11px; color: var(--muted); }
.channel-times dd { margin: 6px 0 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: 26px; }
.spell-path { display: flex; align-items: center; gap: 12px; margin-top: 28px; }
.spell-path a { display: flex; align-items: center; gap: 10px; flex: 1; border: 1px solid var(--line); border-radius: 5px; padding: 16px; text-decoration: none; background: var(--panel); }
.spell-path a > span { color: var(--muted); font-size: 11px; }
.spell-path strong { display: block; font-size: 15px; font-weight: 500; color: var(--text); }
.spell-path > span { color: var(--muted); }
.reference-next { display: flex; justify-content: space-between; padding: 18px 0; border-block: 1px solid var(--line); margin-top: 32px; text-decoration: none; font-size: 14px; }
.trial-reference { display: grid; gap: 16px; }
.trial-reference article { padding: 26px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.trial-reference .eyebrow { font-size: 10px; color: var(--accent); margin-bottom: 12px; }
.trial-reference h2 { font-size: 30px; margin-bottom: 14px; }
.trial-reference p:not(.eyebrow), .trial-reference a { font-size: 14px; color: var(--muted); line-height: 1.8; }
.trial-reference a { color: var(--accent); }
.ancestry-reference, .arena-reference { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ancestry-reference article, .arena-reference article { padding: 26px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.ancestry-reference header { display: flex; align-items: center; gap: 18px; }
.ancestry-reference .ref-icon { width: 52px; height: 52px; }
.ancestry-reference h2 { font-size: 32px; margin: 0; }
.ancestry-reference p, .arena-reference p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.arena-reference h2 { font-size: 29px; }
.equipment-intro { display: flex; align-items: center; gap: 26px; padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.equipment-intro > .ref-icon { width: 90px; height: 90px; }
.equipment-intro h2 { font-size: 29px; margin: 0 0 12px; }
.equipment-intro p { margin: 0; color: var(--muted); font-size: 14px; }
.bonus-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bonus-table caption { text-align: left; color: var(--muted); font-size: 12px; margin: 8px 0 16px; }
.bonus-table td, .bonus-table th { text-align: left; padding: 16px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.bonus-table th { font-weight: 500; }
.bonus-table td { color: var(--muted); }
.bonus-table thead th { font-size: 11px; color: var(--muted); }
.bonus-table tbody th { width: 25%; }
.bonus-table .ref-icon { width: 24px; height: 24px; margin-right: 7px; }
.anchor-alias { display: block; }
.learn-page { max-width: 1100px; padding: 0 4vw; margin: auto; }
.learn-heading { max-width: 720px; padding: 64px 0 40px; }
.learn-heading .eyebrow { color: var(--accent); }
.learn-heading h1 { font-size: clamp(48px, 7vw, 80px); }
.learn-heading > p:not(.eyebrow) { color: var(--muted); font-size: 18px; max-width: 620px; }
.learn-page > section { border-top: 1px solid var(--line); padding: 48px 0; }
.learn-page > section p { color: var(--muted); font-size: 16px; line-height: 1.85; }
.learn-first, .learn-read { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; }
.learn-cast { padding: 24px; border: 1px solid var(--line); background: var(--panel); border-radius: 7px; }
.learn-quadrants { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--field-line); border-radius: 5px; overflow: hidden; }
.learn-quadrants > div { min-height: 100px; padding: 14px; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); }
.learn-quadrants > div:nth-child(odd) { border-right: 1px solid var(--line); }
.learn-quadrants > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.learn-quadrants .fire-selected { background: #a3210015; color: #a32100; box-shadow: inset 0 0 0 1px #a3210050; }
.learn-cast h3 { margin: 24px 0 16px; font-family: "Cormorant Garamond", Georgia, serif; font-size: 24px; font-weight: 400; }
.learn-turn { max-width: 760px; }
.learn-section-heading { max-width: 680px; }
.learn-spells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.learn-spells article { display: flex; flex-direction: column; padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.learn-spells header { display: flex; align-items: center; gap: 12px; }
.learn-spells h3 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 400; font-size: 25px; margin: 0; }
.learn-page .learn-spells p { font-size: 14px; margin-bottom: 24px; }
.learn-spells .cast-sequence { margin-top: auto; }
.learn-spells a { font-size: 12px; text-decoration: none; margin-top: 20px; }
.learn-badges { display: grid; gap: 18px; }
.learn-badges > div { display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); padding: 0 0 18px; }
.learn-badges .ref-icon { width: 48px; height: 48px; }
.learn-badges strong { display: block; font-size: 18px; font-weight: 500; color: var(--text); margin-bottom: 5px; }
.learn-badges span { font-size: 12px; color: var(--muted); }
.learn-next { max-width: 760px; }
.learn-next > div { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 28px; }
@media (min-width: 1550px) {
  .reference-layout { padding-inline: 40px; }
}
@media (max-width: 1150px) {
  .reference-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 30px; }
  .spell-card, .effect-card { padding: 20px; }
  .spell-heading h3 { font-size: 23px; }
  .spell-path a { flex-direction: column; align-items: start; padding: 12px; }
}
@media (max-width: 900px) {
  .reference-layout { display: block; padding-inline: 24px; }
  .reference-sidebar { position: static; max-height: none; margin: 24px 0 0; padding-bottom: 0; }
  .reference-sidebar nav { display: flex; flex-wrap: wrap; }
  .reference-sidebar nav p { display: none; }
  .reference-enhanced .reference-sidebar { display: none; }
  .reference-picker { display: flex; align-items: center; gap: 18px; position: sticky; top: var(--header-height); z-index: 15; padding: 12px 0; border-bottom: 1px solid var(--line); background: var(--bg); }
  .reference-picker label { margin: 0; font-size: 12px; flex-shrink: 0; color: var(--accent); }
  .reference-picker select { max-width: 380px; }
  html:has(.reference-enhanced) { scroll-padding-top: calc(var(--header-height) + 92px); }
  .reference-section { padding-top: 32px; }
  .reference-heading h1 { font-size: 48px; }
  .learn-first, .learn-read { gap: 30px; }
}
@media (max-width: 600px) {
  .reference-layout { padding-inline: 18px; }
  .reference-heading h1 { font-size: 40px; }
  .reference-heading > p:last-child { font-size: 15px; }
  .reference-filters { flex-wrap: wrap; gap: 12px; padding: 16px; }
  .reference-filters .reference-search { flex: 1 0 100%; }
  .reference-filters input, .reference-filters select, .reference-picker select { font-size: 16px; }
  .spell-grid, .effect-grid, .ancestry-reference, .arena-reference, .learn-spells { grid-template-columns: minmax(0, 1fr); }
  .spell-card, .effect-card { padding: 22px; }
  .reference-note { font-size: 12px; }
  .spell-heading h3 { font-size: 26px; }
  .spell-description { font-size: 15px; }
  .cast-sequence { gap: 8px; }
  .cast-sequence li { flex-basis: 62px; }
  .cast-sequence .ref-icon { width: 40px; height: 40px; }
  .reference-prose h2 { font-size: 29px; }
  .rune-board > div { padding: 18px 12px; gap: 8px; grid-template-columns: 28px 1fr; }
  .rune-board .ref-icon { width: 28px; height: 28px; }
  .rune-board strong, .rune-board span { flex-wrap: wrap; font-size: 13px; }
  .gesture-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spell-path { flex-direction: column; align-items: stretch; }
  .spell-path a { flex-direction: row; align-items: center; padding: 14px; }
  .spell-path > span { text-align: center; }
  .equipment-intro { padding: 20px; gap: 14px; }
  .equipment-intro > .ref-icon { width: 48px; height: 48px; }
  .equipment-intro h2 { font-size: 25px; }
  .bonus-table td, .bonus-table th { padding: 14px 6px; font-size: 12px; }
  .bonus-table .ref-icon { display: block; margin-bottom: 6px; }
  .learn-page { padding-inline: 22px; }
  .learn-heading { padding-top: 40px; }
  .learn-heading h1 { font-size: 54px; }
  .learn-heading > p:not(.eyebrow) { font-size: 16px; }
  .learn-first, .learn-read { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .learn-page h2 { font-size: 34px; }
  .learn-page > section { padding-block: 34px; }
}
