:root {
  color-scheme: dark;
  --ground: #101613;
  --panel: #17201a;
  --text: #f6edd8;
  --muted: #c3c2b1;
  --gold: #e2bf80;
  --line: #4c4738;
  --display: 'Cormorant Garamond', Georgia, serif;
  --title: Cinzel, Georgia, serif;
  --body: 'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); scroll-behavior: smooth; }
body { margin: 0; color: var(--text); font-family: var(--body); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, p, figure { margin: 0; }
p { line-height: 1.68; }
.shell { width: min(100% - 7rem, 1240px); margin-inline: auto; }
.skip-link { position: absolute; z-index: 8; left: 1rem; top: .75rem; padding: .65rem 1rem; color: var(--ground); background: var(--gold); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header { background: #121813; border-bottom: 1px solid #3e3d2e; }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-inner { min-height: 72px; }
.wordmark { display: inline-flex; align-items: center; gap: .85rem; white-space: nowrap; font: 600 1.02rem/1 var(--title); letter-spacing: .11em; }
.seal { display: grid; place-items: center; width: 2.05rem; height: 2.05rem; color: var(--gold); border: 1px solid #a88654; border-radius: 1px 1px 8px 8px; font-size: 1.09rem; letter-spacing: 0; }
.site-nav { display: flex; align-items: center; gap: clamp(.9rem, 2.8vw, 2.45rem); color: var(--muted); font-size: .88rem; font-weight: 600; }
.site-nav > a:hover, .footer-inner > a:hover { color: var(--gold); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .75rem; min-height: 3.125rem; padding: .65rem 1.25rem; border: 1px solid transparent; border-radius: 2px; color: var(--text); background: transparent; font-weight: 700; font-size: .9rem; line-height: 1.25; cursor: pointer; transition: background-color .18s, border-color .18s, color .18s; }
.button span { font-size: 1.15em; }
.button-gold { background: var(--gold); color: #201b13; border-color: var(--gold); }
.button-gold:hover { background: #f2d59d; border-color: #f2d59d; }
.button-glass { border-color: #b59c70; background: #121a15b8; }
.button-glass:hover { background: #30372a; border-color: var(--gold); }
.button-outline { color: var(--gold); border-color: #a08657; }
.button-outline:hover { color: var(--text); border-color: var(--gold); background: #2a2c20; }
.button:disabled { opacity: .55; cursor: default; }
.header-play { min-height: 39px; padding: .45rem 1.1rem; }

.hero, .closing { position: relative; isolation: isolate; overflow: hidden; }
.hero { min-height: clamp(580px, 55vw, 760px); display: grid; align-items: center; border-bottom: 1px solid var(--line); }
.hero-art, .closing > img, .account-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-art { object-position: 55% 52%; }
.hero::before, .closing::before, .account-page::before { content: ''; position: absolute; inset: 0; z-index: -1; }
.hero::before { background: linear-gradient(90deg, #0c1411ee 0%, #0c1411c7 26%, #0c141140 58%, transparent 76%), linear-gradient(0deg, #101613 0%, #10161352 14%, transparent 42%); }
.hero-inner { padding-block: 4rem 5.8rem; }
.eyebrow { color: var(--gold); font-size: .72rem; line-height: 1.4; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.hero h1 { margin: .9rem 0 1.35rem; font-family: var(--title); font-size: clamp(4.15rem, 8.4vw, 7.8rem); font-weight: 500; line-height: .88; letter-spacing: -.037em; }
.title-and { color: var(--gold); font-size: .72em; }
.hero-line { font-family: var(--display); font-size: clamp(1.5rem, 2.8vw, 2.3rem); font-weight: 700; line-height: 1.06; }
.hero-copy { max-width: 31ch; margin-top: .85rem; color: var(--muted); font-size: .99rem; }
.actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.hero .actions { margin-top: 1.65rem; }
.art-credit { position: absolute; bottom: 1.05rem; right: max(1.1rem, calc((100% - 1240px) / 2)); color: #ddd0b4; font-size: .69rem; letter-spacing: .13em; text-transform: uppercase; }

.feature { display: grid; grid-template-columns: minmax(240px, .78fr) minmax(0, 1.22fr); align-items: center; gap: clamp(2rem, 6vw, 6.5rem); padding-block: clamp(4rem, 8vw, 7.2rem); }
.feature h2, .combat h2, .closing h2 { margin: .5rem 0 .85rem; font-family: var(--display); font-size: clamp(3rem, 5.45vw, 5.15rem); font-weight: 600; line-height: .92; letter-spacing: -.035em; }
.feature-copy > p:not(.eyebrow), .combat-heading > p { color: var(--muted); font-size: .98rem; }
.feature-copy > p + p { margin-top: .65rem; }
.screenshot { min-width: 0; }
.screenshot-link { position: relative; display: block; background: #0a100c; border: 1px solid #766746; aspect-ratio: 16 / 9; overflow: hidden; transition: border-color .18s; }
.screenshot-link:hover { border-color: var(--gold); }
.screenshot-link img { width: 100%; height: 100%; object-fit: cover; }
.expand { position: absolute; right: .75rem; bottom: .75rem; display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border: 1px solid #ad966e; color: var(--text); background: #111912df; font-size: 1.15rem; }
.screenshot figcaption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem .75rem; padding-top: .6rem; }
.screenshot figcaption strong { font-family: var(--display); font-size: 1.33rem; font-weight: 700; }
.screenshot figcaption span { font-size: .67rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.combat { padding-block: clamp(3.75rem, 7vw, 6.4rem); background: #19221a; border-block: 1px solid #373e31; }
.combat-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .68fr); gap: 2rem; align-items: end; margin-bottom: 1.55rem; }
.combat-heading h2 { margin-bottom: 0; }
.fight-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.35rem, 3vw, 2.5rem); }
.closing { display: grid; place-items: center; min-height: 490px; text-align: center; border-bottom: 1px solid var(--line); }
.closing > img { object-position: 54% 58%; }
.closing::before { background: radial-gradient(ellipse at center, #0b1412c7 4%, #10191556 56%, #11191525 80%), linear-gradient(0deg, #0d1410c5 0%, transparent 40%); }
.closing-inner { padding-block: 4rem; }
.closing-inner p { margin: 0 auto 1.35rem; color: var(--text); }
.site-footer { padding-block: 1.65rem; color: var(--muted); font-size: .87rem; }

.gallery { max-width: min(90vw, 1100px); max-height: 90vh; padding: 0; border: 1px solid #867354; color: var(--text); background: #121914; overflow: auto; }
.gallery::backdrop { background: #090d0bed; }
.gallery img { width: 100%; height: auto; max-height: 72vh; object-fit: contain; }
.gallery p { padding: .55rem 1rem; color: var(--muted); }
.gallery-close { position: absolute; z-index: 1; top: .65rem; right: .65rem; min-height: 2.5rem; padding: .45rem .7rem; background: #121914ee; }
body:has(.gallery[open]) { overflow: hidden; }

.account-page { position: relative; isolation: isolate; min-height: 100svh; display: grid; grid-template-rows: auto 1fr; }
.account-art { object-position: 53% 50%; }
.account-page::before { background: linear-gradient(90deg, #1016134d, #101613ad), linear-gradient(0deg, #101613 0%, transparent 88%); }
.account-page .site-header { background: #121813ef; }
.account-main { display: grid; place-items: center; padding: 2.25rem 1rem; }
.account-panel { width: min(100%, 460px); padding: clamp(1.4rem, 6vw, 2.45rem); background: #151e18f5; border: 1px solid #766746; box-shadow: 0 15px 50px #09110a78; }
.account-panel h1 { font: 600 clamp(2.65rem, 8vw, 3.6rem)/.95 var(--display); margin: .45rem 0 .85rem; }
.account-panel h2 { font: 700 1.65rem/1 var(--display); margin-bottom: .45rem; }
.account-panel p:not(.eyebrow) { color: var(--muted); font-size: .91rem; }
.account-panel [role=status] { margin-bottom: .9rem; }
.account-panel .actions { margin-top: 1rem; }
.character-form > p { margin: 0 0 .85rem; }
.character-form > label { display: block; margin-bottom: .35rem; font-weight: 600; font-size: .9rem; }
.character-form input[type=text], .character-form select { width: 100%; min-height: 2.85rem; padding: .6rem .7rem; border: 1px solid #8f815d; border-radius: 2px; background: #202c23; color: var(--text); }
.character-form fieldset { margin: .9rem 0; padding: 0; border: 0; }
.character-form fieldset legend { padding: 0; font-weight: 600; font-size: .9rem; }
.character-form fieldset label { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .75rem .25rem 0; }
.character-form input[type=radio] { accent-color: var(--gold); }
.character-form button { width: 100%; margin-top: 1rem; }

.auth-page::before {
  background: linear-gradient(90deg, #101613bf, #10161352 48%, #101613ab), linear-gradient(0deg, #101613 0%, #1016130d 70%);
}
.auth-main { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(2rem, 8vw, 8rem); align-items: center; padding-block: 3rem; }
.auth-intro { max-width: 27rem; text-shadow: 0 2px 20px #0a110ddd; }
.auth-tagline { margin: .55rem 0 .85rem; font: 600 clamp(3rem, 6vw, 5.7rem)/.93 var(--display); letter-spacing: -.035em; }
.auth-intro > p:last-child { color: var(--muted); max-width: 32ch; }
.auth-panel { min-width: 0; }
.auth-status { padding: 1.15rem; background: #17201a; border: 1px solid #766746; color: var(--muted); }
.auth-panel .auth-clerk-root, .auth-panel .auth-clerk-cardbox, .auth-panel .auth-clerk-card { width: 100%; max-width: 100%; }
.auth-panel .auth-clerk-cardbox { border: 1px solid #766746; box-shadow: 0 18px 54px #080e0bb5; }
.auth-panel .auth-clerk-card { background: #17201a; box-shadow: none; }
.auth-panel .auth-clerk-title { font: 700 clamp(1.75rem, 4vw, 2.15rem)/1.08 var(--display); color: var(--text); }
.auth-panel .auth-clerk-footer { color: var(--muted); background: #131b16; border-top: 1px solid #514a38; }
.auth-panel .auth-clerk-input { border: 1px solid #7d7155; font-size: 1rem; }
.auth-panel .auth-clerk-social { border: 1px solid #7d7155; color: var(--text); }
.auth-panel .auth-clerk-social:hover { border-color: var(--gold); background: #252e24; }

@media (max-width: 850px) {
  .shell { width: calc(100% - 3.2rem); }
  .feature { gap: 1.75rem; }
  .hero::before { background: linear-gradient(90deg, #0c1411e5, #0c1411a0 48%, #0c141129 76%), linear-gradient(0deg, #101613 0%, transparent 45%); }
}
@media (max-width: 730px) {
  .auth-main { grid-template-columns: minmax(0, 440px); justify-content: center; padding-block: 2rem; }
  .auth-intro { display: none; }
  .auth-page::before { background: linear-gradient(0deg, #101613, #1016136e); }
}
@media (max-width: 590px) {
  .shell { width: calc(100% - 2rem); }
  .header-inner { min-height: 62px; }
  .wordmark { gap: .55rem; font-size: .83rem; letter-spacing: .07em; }
  .seal { width: 1.7rem; height: 1.75rem; font-size: .9rem; }
  .site-nav { gap: .75rem; font-size: .79rem; }
  .site-nav a[href^="#"] { display: none; }
  .header-play { min-height: 35px; padding-inline: .75rem; font-size: .82rem; }
  .hero { min-height: min(680px, max(580px, 87svh)); align-items: end; }
  .hero-art { object-position: 80% 36%; }
  .hero::before { background: linear-gradient(0deg, #101613 0%, #101613e8 18%, #1016138f 61%, #10161326 100%), linear-gradient(90deg, #1016136e, transparent); }
  .hero-inner { padding-block: 5rem 3.5rem; }
  .hero h1 { font-size: clamp(3.65rem, 15vw, 5.15rem); }
  .hero-copy { font-size: .92rem; }
  .hero-line { line-height: 1.12; }
  .hero .button { padding-inline: .95rem; }
  .feature, .combat-heading, .fight-grid { grid-template-columns: minmax(0, 1fr); }
  .combat-heading { gap: .7rem; }
  .closing { min-height: 380px; }
  .closing::before { background: #1119157d; }
  .account-page .site-nav a { display: inline-flex; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

.player-page {
  max-width: 48rem;
  padding-block: clamp(2rem, 7vw, 6rem);
}
.player-page h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
.player-page h2 { font-size: 1.8rem; margin-block: 1.65rem .4rem; }
.player-page p, .player-page li { line-height: 1.65; }
.player-page a { text-decoration: underline; text-underline-offset: .2em; }
.account-deletion-form { margin-top: 1.25rem; }
.account-deletion-form button { margin-top: .75rem; }
.account-deletion-form .account-action { background: #843e32; color: #fff5e5; }
