:root {
  color-scheme: dark;
  --ink: #0b1016;
  --text: #f2ebdf;
  --muted: #c1c1c4;
  --gold: #f0c98b;
  --serif: Georgia, 'Times New Roman', serif;
  font: 100%/1.5 'Segoe UI', system-ui, sans-serif;
  background: var(--ink);
  color: var(--text);
}
* { box-sizing: border-box }
[hidden] { display: none !important }
body { margin: 0 }
h1,h2,h3,h4,p { margin: 0 }
h1,h2,h3,h4 { font-family: var(--serif); font-weight: 400 }
button, select { font: inherit; color: inherit }
button { cursor: pointer }
button:disabled { cursor: default }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid #ffe5b3; outline-offset: 4px }
a { color: var(--gold); text-underline-offset: 4px }
svg, img, canvas { display: block }
.svg-defs, .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip { position: fixed; transform: translateY(-150%); top: 12px; left: 12px; z-index: 8; background: var(--ink); padding: 10px 18px; border-radius: 24px }
.skip:focus { transform: none }
.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(20px, 3vh, 38px) 24px 70px;
  background:
    linear-gradient(180deg, #0c1015b8 0%, #0b101625 33%, #0b101625 56%, #0b1016e0 87%, var(--ink) 100%),
    url('theme/dungeon-entrance.webp') center 39% / cover no-repeat, #141d25;
}
.hero-heading { display: grid; justify-items: center; text-align: center; position: relative; z-index: 1 }
.epicrest-mark {
  width: clamp(65px, 8vw, 86px); height: auto;
  filter: drop-shadow(0 6px 14px #000c);
  margin-bottom: clamp(12px, 1.8vh, 24px);
}
h1 {
  font-size: clamp(2.1rem, 4.9vw, 4.8rem);
  line-height: .99;
  letter-spacing: -.052em;
  text-wrap: balance;
  text-shadow: 0 3px 22px #050609, 0 2px 4px #000;
}
h1 em { color: var(--gold); font-weight: 400 }
.forever {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 10px; color: #e3d9c9; font-size: .79rem; letter-spacing: .08em;
}
.forever img { width: 112px; height: 50px; object-fit: contain; filter: drop-shadow(0 2px 4px #0009) }
.sandbox { width: min(100%, 860px); margin: -2px auto 0 }
.stage-layout {
  display: grid; grid-template-columns: 124px minmax(0, 1fr) 124px;
  align-items: center; isolation: isolate;
}
.selector-rail { display: grid; gap: 8px; align-content: center; position: relative; z-index: 4 }
.rail-label { text-transform: uppercase; font-size: .65rem; font-weight: 700; letter-spacing: .2em; color: #f0d7b2; padding-left: 8px; text-shadow: 0 2px 8px #000 }
.icon-choices { display: grid; gap: 3px }
.choice {
  background: none; border: none; border-radius: 30px; padding: 2px 8px;
  display: flex; align-items: center; gap: 8px; min-height: 40px; height: auto;
  text-align: left; color: #ddd7cf; text-shadow: 0 2px 7px #000; font-size: .77rem;
}
.choice img, .name-icon {
  width: 33px; height: 33px; flex: 0 0 auto; border-radius: 50%;
  filter: saturate(.58) brightness(.8);
  box-shadow: 0 2px 5px #000c;
}
.choice:hover, .choice[aria-pressed="true"] { background: radial-gradient(ellipse at 26% 50%, #583b2bd0, #281e1a8c 64%, transparent 100%); color: #ffeacb }
.choice:hover img, .choice[aria-pressed="true"] img, .name-icon { filter: none }
.choice[aria-pressed="true"] { font-weight: 700 }
.choice[aria-pressed="true"] img { box-shadow: 0 0 12px #e8a35380, 0 2px 5px #000c }
.spec-rail { margin-left: 8px }
.crest-stage {
  display: grid; place-items: center; height: clamp(372px, 47vh, 506px);
  position: relative; isolation: isolate; min-width: 0;
}
.stage-light {
  position: absolute; inset: 2% -7% 3%; z-index: -1;
  background: radial-gradient(ellipse at 50% 49%, #1f4b6450 0%, #182b3d42 29%, transparent 67%);
  pointer-events: none;
}
.stage-light::after {
  content: ''; position: absolute; inset: 82% 20% 1%;
  background: radial-gradient(ellipse, #43728c6b, #8f563824 28%, transparent 69%);
  transform: rotate(-2deg);
}
.hero-art, #crest-canvas, .mage-art, .missing-hero {
  width: 96%; height: 94%; min-width: 0; position: absolute; inset: 3% 2%;
  z-index: 1; pointer-events: none;
}
.hero-art, #crest-canvas, .mage-art {
  object-fit: contain;
  filter: drop-shadow(0 11px 13px #02080bcb) drop-shadow(0 0 26px #21415795);
}
.hero-art.druid, #crest-canvas { filter: drop-shadow(0 12px 16px #000b) grayscale(.07) }
.hero-art.hovering, .card-art img.hovering { animation: hover 6s ease-in-out infinite }
.silhouette { opacity: .7; filter: drop-shadow(0 10px 15px #0007) }
.missing-hero .silhouette { width: 100%; height: 100% }
#missing-title { position: absolute; inset: auto 0 0; text-align: center }
.player { text-align: center; display: grid; justify-items: center; margin-top: -3px; position: relative; z-index: 3 }
#active-title { font-size: clamp(1.65rem, 4vw, 2.8rem); line-height: 1.12; display: flex; align-items: center; gap: .38em; margin-bottom: 10px }
#active-title .name-icon { width: .78em; height: .78em }
.status {
  --pill: #c0beca; --surface: #272733;
  display: inline-flex; align-items: center; justify-content: center; gap: .6ch; width: max-content; max-width: 100%;
  padding: 5px 12px; border-radius: 999px; color: var(--pill);
  background: linear-gradient(155deg, var(--surface), #15131add);
  font-size: .75rem; font-weight: 650; line-height: 1.35;
  box-shadow: inset 0 1px #ffffff16, 0 2px 7px #0005;
}
.status::before { content: ''; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--pill); box-shadow: 0 0 8px var(--pill) }
.status.unstarted::before { box-shadow: none; opacity: .63 }
.status.planned { --pill: #b5d4ef; --surface: #253a51 }
.status.artwork { --pill: #fbd397; --surface: #563c2c }
.status.animation { --pill: #e6c8ff; --surface: #472e5d }
.status.beta { --pill: #c0e8bf; --surface: #2a4734 }
.status.released { --pill: #ffe5a4; --surface: #5a442b }
.spell-controls {
  --spell-size: clamp(48px, 6vw, 56px);
  --spell-label-size: .73rem;
  width: 100%; display: grid; justify-items: center;
}
.spell-controls[inert] { visibility: hidden }
.spellbar {
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(4px,2vw,16px);
  width: min(100%, 375px); margin-top: 17px;
  /* Reserve space for the icon and two label lines, even on an empty stage. */
  min-height: calc(var(--spell-size) + 2.4 * var(--spell-label-size) + 6px);
}
.spell-slot { min-width: 0; display: grid; justify-items: center; align-content: start }
.spell {
  position: relative; isolation: isolate; border: 0; padding: 3px;
  width: var(--spell-size); aspect-ratio: 1; height: auto; border-radius: 50%;
  background: radial-gradient(ellipse at 55% 20%, #a07b58, #2b2323 60%, #16131a);
  box-shadow: 0 4px 15px #0009;
}
.spell img { width: 100%; height: 100%; object-fit: cover; border-radius: 50% }
.spell:hover:not(:disabled), .spell[aria-pressed="true"] { background: #d8b479; box-shadow: 0 0 18px #e4ab6a8c }
.spell:disabled { opacity: .48 }
.spell kbd { position: absolute; right: -2px; bottom: -2px; min-width: 19px; height: 19px; border-radius: 50%; background: #171421; font: 700 .68rem/19px system-ui; color: #ffe3b8 }
.spell-label { font-size: var(--spell-label-size); color: #f3e9d9; line-height: 1.2; padding-top: 6px; text-wrap: balance; overflow-wrap: anywhere }
.cast-track { width: min(94%,300px); height: 3px; border-radius: 999px; overflow: hidden; background: #f1ca8b20; margin: 13px 0 4px }
#cast-fill { display: block; width: 0; height: 100%; background: linear-gradient(90deg,#907150,#f4d991) }
.cast-state { min-height: 1.3em; font-size: .74rem; color: var(--gold) }
.playback-row { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; column-gap: 12px; color: #cbc3b7; font-size: .72rem }
.quiet-control { min-height: 32px; background: none; border: 0; padding: 4px 0; color: #e3ccaf; text-decoration: underline; text-underline-offset: 3px }
.quiet-control:not(:disabled):hover { color: #fff4d6 }
.quiet-control:disabled { opacity: .45 }
.playback-error { max-width: 360px; color: #ffd0ab; font-size: .85rem }
.retry { border: none; color: #ffdeae; background: #4a332b; border-radius: 24px; padding: .5em 1em; margin: 8px }
.lower-world {
  position: relative; isolation: isolate;
  background: linear-gradient(180deg, var(--ink), #0b101620 150px, #0b101659 630px, var(--ink) 1120px),
    url('theme/dungeon-depths.webp') center top / max(100%, 1050px) auto no-repeat;
  padding-top: 22px;
}
.chapter-ornament {
  width: 248px; height: 49px; background: url('theme/dungeon-ornament.webp') center / contain no-repeat;
  position: absolute; top: -27px; left: 50%; transform: translateX(-50%);
}
.section-wrap { width: min(calc(100% - 48px), 1050px); margin-inline: auto }
.project-progress { max-width: 750px; text-align: center; padding-block: 12px 53px }
.progress-summary { display: grid; gap: 6px; justify-items: center }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); letter-spacing: -.028em }
.progress-number { display: flex; align-items: baseline; justify-content: center; gap: 10px; color: var(--muted); font-size: .82rem }
.progress-number strong { color: #f1ca8b; font: 2rem var(--serif) }
.progress-number strong span { font-size: .65em }
.overall-track { height: 8px; overflow: hidden; background: #8b79973b; border-radius: 99px; margin: 12px 0 }
#overall-fill { display: block; height: 100%; width: 16.3%; border-radius: inherit; background: linear-gradient(90deg,#9f5d39,#f4cc91); box-shadow: 0 0 10px #ecaf65 }
.progress-bottom { color: var(--muted); font-size: .84rem }
details { color: var(--muted); font-size: .83rem }
details p { margin: 10px 0 }
summary { color: var(--gold); cursor: pointer }
.progress-bottom summary { width: fit-content; margin: 8px auto 0 }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px }
.library-filters { display: flex; flex-wrap: wrap; gap: 10px }
.library-filters label { font-size: .7rem; color: #e4cba7 }
.select-wrap { display: block; margin-top: 3px }
select { border: 0; border-radius: 25px; background: #232333; padding: 8px 14px; min-height: 44px }
.status-key { display: none }
.gallery-count { color: var(--muted); font-size: .83rem }
.class-group { padding: 32px 0 18px }
.class-heading { display: flex; align-items: center; gap: 11px }
.class-heading h3 { color: var(--gold); font-size: 1.6rem }
.crest-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(8px,2vw,36px) }
.crest-card { display: grid; min-width: 0; justify-items: center; align-content: start; text-align: center }
.card-art { display: grid; place-items: center; width: 100%; height: clamp(144px, 26vw, 264px); min-width: 0; background: radial-gradient(ellipse at 50% 57%, #37415348, transparent 67%) }
button.card-open { border: 0; min-width: 0; width: 100%; padding: 0; color: inherit; background: none; border-radius: 25% }
button.card-open:hover .card-art { background: radial-gradient(ellipse at 50% 57%, #644c6d62, transparent 67%) }
.card-art img, .card-art canvas { width: 95%; height: 92%; object-fit: contain; min-height: 0; filter: drop-shadow(0 8px 9px #0008) }
/* Match the Druid row's visible artwork height despite Restoration's extra transparent padding. */
.crest-card[data-crest="DRUID:restoration"] .card-art > :is(img, canvas) { scale: 1.145 }
.card-art .silhouette { width: min(78%, 215px); height: 100%; max-height: 68%; opacity: .35 }
.card-title { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 5px 0 7px; flex-wrap: wrap }
.card-title h4 { font-size: clamp(.98rem,2.5vw,1.3rem); line-height: 1.12; text-wrap: balance }
.card-title .name-icon { width: 22px; height: 22px }
.crest-updated { margin-top: 7px; color: var(--muted); font-size: .72rem; line-height: 1.35 }
.crest-updated time { white-space: nowrap }
.empty-gallery { display: grid; justify-items: center; gap: 9px; text-align: center; padding: 45px 0 }
#clear-filters { padding: 9px 15px; border: 0; border-radius: 24px; background: #332839; color: #f0d7b2 }
.updates { padding-top: 56px }
.notes-date,.note-kind { font-size: .75rem; color: #d4b88c }
.notes-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(20px,4vw,52px); padding: 14px 0 70px }
.note-kind { display: flex; gap: 10px; flex-wrap: wrap; font-weight: 650; letter-spacing: .04em }
.note-kind time { color: var(--muted); font-weight: 400 }
.notes-grid h3 { font-size: 1.5rem; line-height: 1.15; padding: 8px 0 }
.notes-grid article > p:not(.note-kind) { color: var(--muted); line-height: 1.65; margin-bottom: 12px }
footer { text-align: center; padding-block: 20px 34px; font-size: .8rem; color: #bdb8b6 }
footer details { margin-top: 6px }
.noscript { padding: 15px; text-align: center }
@keyframes hover { 50% { transform: translateY(-7px) } }
.motion-paused .hovering { animation-play-state: paused !important }
@media (prefers-reduced-motion: reduce) { .hovering { animation: none !important } }
@media (max-width: 650px) {
  .hero { padding: 18px 10px 56px; background-position: center, center top }
  h1 { font-size: clamp(2rem,7vw,3rem) }
  .forever img { width: 98px; height: 40px }
  .stage-layout { grid-template-columns: 45px minmax(0,1fr) 45px }
  .icon-choices { gap: 0 }
  .choice { min-height: 40px; padding: 1px 6px; justify-content: center }
  .choice span { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden }
  .choice img { width: 30px; height: 30px }
  .rail-label { padding: 0; text-align: center; font-size: .56rem; letter-spacing: .09em }
  .spec-rail { margin: 0 }
  .crest-stage { height: max(360px, 40vh) }
  .player { margin-top: 5px }
  #active-title { font-size: clamp(1.2rem, 6vw, 1.65rem) }
  .section-wrap { width: calc(100% - 28px) }
  .notes-grid { grid-template-columns: 1fr; gap: 30px }
  .card-title .name-icon { width: 17px; height: 17px }
  .crest-card .status { padding-inline: 7px; font-size: .65rem }
}
