:root {
  color-scheme: dark;
  --background: #090d13;
  --panel: #111822;
  --ink: #f6f0e7;
  --muted: #b5becb;
  --gold: #efbc70;
  --teal: #83dddc;
  --border: #303945;
  --serif: Georgia, 'Times New Roman', serif;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--background);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body { margin: 0; line-height: 1.6; }
body:has(.lightbox[open]) { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 5px; }
h1, h2, h3, p, dl, dd { margin: 0; }
h2, h3 { line-height: 1.1; }
h2 { font-size: clamp(2.2rem, 4.4vw, 4.25rem); letter-spacing: -.055em; font-weight: 650; }
h3 { font-size: 1.55rem; letter-spacing: -.035em; font-weight: 650; }
.wrap { width: min(1280px, calc(100% - 10vw)); margin-inline: auto; }
.section { padding-block: clamp(60px, 8vw, 104px); }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 5; translate: 0 -150%; background: var(--gold); color: var(--background); padding: .55rem 1rem; }
.skip-link:focus { translate: 0; }
.eyebrow { color: var(--gold); font-size: .71rem; font-weight: 720; text-transform: uppercase; letter-spacing: .19em; margin-bottom: .7rem; }

.site-header { background: #0b1119; border-bottom: 1px solid #353342; }
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 80px; }
.studio-brand { display: block; flex-shrink: 0; width: fit-content; }
.studio-brand img { width: 108px; }
.header-inner nav { display: flex; gap: clamp(16px, 3vw, 45px); color: var(--muted); font-size: .88rem; font-weight: 600; }
.header-inner nav a:hover, .back-top:hover { color: var(--gold); }
.header-release { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--border); padding: .43rem .8rem; white-space: nowrap; font-size: .83rem; }
.header-release:hover { border-color: var(--gold); }

.hero { position: relative; isolation: isolate; display: grid; min-height: clamp(570px, 49vw, 765px); overflow: hidden; background: #080e18; border-bottom: 1px solid #654b2d; }
.hero-art, .hero::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art { z-index: -2; left: auto; width: 78%; object-fit: cover; object-position: 76% center; }
.hero::after { z-index: -1; content: ''; background: linear-gradient(90deg, #080e18 18%, #080e18ec 29%, #080e184d 55%, #080e1800 75%), linear-gradient(0deg, #07090f86, transparent 23%); }
.hero-inner { position: relative; display: flex; align-items: center; padding-block: 42px 60px; }
.hero-content { max-width: 550px; }
.hero h1 { width: min(38vw, 540px); line-height: 1; }
.hero h1 img { width: 100%; filter: drop-shadow(0 9px 16px #000b); }
.hero-tagline { margin-top: 16px; font: italic clamp(1.8rem, 3.1vw, 2.8rem)/1.2 var(--serif); letter-spacing: -.045em; }
.hero-description { margin-top: 14px; max-width: 385px; color: #d0d8e4; font-size: clamp(.99rem, 1.35vw, 1.13rem); }
.hero-actions, .table-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 15px; min-height: 46px; border: 1px solid transparent; padding: .62rem 1.05rem; border-radius: 3px; font-weight: 700; font-size: .91rem; line-height: 1.18; transition: background .2s, border-color .2s; }
.button-primary { color: #191107; background: var(--gold); border-color: var(--gold); }
.button-primary:hover:not(:disabled) { background: #ffcf88; }
.hero-actions { align-items: center; }
.hero-buy { min-width: min(100%, 230px); min-height: 64px; padding: .85rem 1.5rem; font-size: 1.2rem; box-shadow: 0 6px 24px #0006; }
.button-quiet { background: #101722b8; border-color: #788391; }
.button-quiet:hover:not(:disabled) { background: #202d3d; border-color: var(--teal); }
.button:disabled { opacity: .55; }
.hero-credit { position: absolute; right: 0; bottom: 18px; font-size: .71rem; color: #dde1e8; text-shadow: 0 1px 6px #000; }

.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; }
.section-heading > p { color: var(--muted); max-width: 268px; margin-bottom: 3px; }
.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(13px, 2vw, 25px); }
.mode-card { display: flex; flex-direction: column; background: var(--panel); min-width: 0; border: 1px solid var(--border); border-top: 2px solid var(--gold); }
.mode-hack { border-top-color: #75d3e4; }
.mode-classic { border-top-color: #cd9bb1; }
.mode-hack .eyebrow { color: #91ddea; }
.mode-classic .eyebrow { color: #e9b7cf; }
.screenshot { position: relative; display: block; width: 100%; aspect-ratio: 16/9; overflow: hidden; border: 0; padding: 0; background: #111a29; text-align: start; }
.screenshot:focus-visible { outline-offset: -3px; z-index: 1; }
.screenshot img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease, opacity .35s ease; }
.screenshot:hover img { transform: scale(1.035); opacity: .86; }
.screenshot::after { content: '+'; position: absolute; display: grid; place-items: center; right: 10px; bottom: 10px; width: 34px; height: 34px; border: 1px solid #bbc1cc9c; background: #0a101bed; color: var(--ink); border-radius: 3px; font-size: 1.2rem; line-height: 1; }
.screenshot:hover::after { color: var(--gold); border-color: var(--gold); }
.mode-description { display: flex; flex: 1; align-items: start; flex-direction: column; padding: clamp(16px, 2vw, 25px); }
.mode-description .eyebrow { letter-spacing: .13em; }
.mode-description > p:not(.eyebrow), .world-copy p, .section-copy { color: var(--muted); margin-top: .7rem; }
.image-note { margin-top: 14px; color: var(--muted); font-size: .83rem; }

.rules-section { background: radial-gradient(ellipse at 77% 61%, #132b36, #101822 53%, #0e151e 85%); border-block: 1px solid var(--border); }
.rules-layout { display: grid; grid-template-columns: 1fr minmax(0, 1fr); align-items: center; gap: clamp(26px, 6vw, 88px); }
.section-copy { max-width: 440px; }
.rules-list { color: var(--muted); padding-left: 1.4rem; margin-block: 1.15rem; }
.rules-list li { margin-block: .32rem; padding-inline-start: .28rem; }
.rules-list li::marker { color: var(--gold); font-weight: 700; }
.rules-list strong { color: var(--ink); }
.rankings { max-width: 440px; border-top: 1px solid #414c59; font-size: .92rem; }
.rankings summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding-block: .65rem; cursor: pointer; font-weight: 650; }
.rankings summary::-webkit-details-marker { display: none; }
.rankings summary span { color: var(--gold); font-size: 1.1rem; }
.rankings[open] summary span { transform: rotate(45deg); }
.rankings p { color: var(--muted); }
.roll-table { padding: clamp(16px, 3vw, 34px); border: 1px solid #58636a; border-radius: 4px; background: #0b121c; box-shadow: 0 18px 38px #0004; }
.table-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 25px; }
.table-header span { color: var(--teal); font: 700 .72rem/1.3 Consolas, monospace; letter-spacing: .09em; white-space: nowrap; }
.dice { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(5px, 1vw, 11px); }
.die { width: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; min-height: 53px; aspect-ratio: 1 / 1.08; gap: 2px; padding: 3px 2px 5px; border: 2px solid #dfc5a2; background: linear-gradient(140deg, #fff9e9, #d6c1a0); color: #152133; border-radius: 8px; box-shadow: inset 0 0 0 2px #fff9, 0 4px 5px #0006; }
.die-placeholder { align-self: center; font: bold clamp(1.08rem, 3.5vw, 2.05rem)/1 var(--serif); }
.die img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.die small { font: 750 clamp(.51rem, .9vw, .65rem)/1.2 'Segoe UI', sans-serif; }
.die:hover:not(:disabled), .die[aria-pressed='true'] { border-color: var(--teal); }
.die[aria-pressed='true'] { background: #b7e4dd; box-shadow: inset 0 0 0 2px #fff9, 0 0 13px #83dddc54; }
.roll-result { color: var(--muted); min-height: 3rem; font-size: .91rem; margin-top: 16px; }
.table-actions { margin-top: 12px; }

.world-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(16px, 3vw, 34px); }
.world-grid .screenshot { aspect-ratio: auto; height: clamp(190px, 24vw, 350px); border: 1px solid var(--border); }
.world-copy { padding-top: 16px; }
.world-copy p { max-width: 470px; }
.build-details > div { border-top: 1px solid var(--border); padding-block: 14px; }
.build-details dt { color: var(--ink); font-size: 1.08rem; font-weight: 700; }
.build-details dd { color: var(--muted); margin-top: .36rem; }
.steam-section { border-block: 1px solid var(--border); background: radial-gradient(ellipse at 50% 80%, #132633, #0d141e 70%); }
.steam-section .section { padding-block: clamp(50px, 7vw, 90px); }
.steam-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 32%); align-items: start; gap: clamp(14px, 3vw, 34px); }
.steam-grid figure { margin: 0; min-width: 0; }
.steam-grid .screenshot { aspect-ratio: 1232/706; border: 1px solid var(--border); }
.steam-grid .steam-cover .screenshot { aspect-ratio: 2/3; }
.steam-grid figcaption { color: var(--muted); margin-top: .65rem; font-size: .9rem; }
.release-section { border-block: 1px solid #57442e; background: linear-gradient(115deg, #171a22, #101720 60%); }
.release-inner { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: clamp(20px, 5vw, 65px); padding-block: clamp(35px, 5vw, 65px); }
.release-inner h2 { font-size: clamp(1.95rem, 4vw, 3.5rem); }
.release-inner p { color: var(--muted); margin-top: .8rem; }
.release-inner .button { margin-top: 1.3rem; }
.steam-brand { border-left: 1px solid var(--border); padding-left: clamp(18px, 3vw, 44px); }
.steam-brand img { width: clamp(120px, 17vw, 185px); }
.steam-brand p { max-width: 310px; font-size: .78rem; }
.contact-layout { display: grid; grid-template-columns: 1fr minmax(0, 1.1fr); gap: clamp(26px, 6vw, 86px); align-items: start; }
.contact-form { display: grid; gap: 16px; padding: clamp(16px, 3vw, 30px); background: var(--panel); border: 1px solid var(--border); border-radius: 4px; }
.contact-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.contact-form label { display: grid; gap: 5px; font-size: .9rem; font-weight: 650; min-width: 0; }
.contact-form input, .contact-form textarea { width: 100%; min-height: 44px; border: 1px solid #667486; border-radius: 3px; background: #0b121c; color: var(--ink); font: inherit; font-size: 1rem; font-weight: 400; padding: .55rem .7rem; }
.contact-form textarea { resize: vertical; }
.contact-form p { color: var(--muted); font-size: .9rem; }
.contact-form button { justify-self: start; }
.site-footer { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--border); }
.site-footer .studio-brand img { width: 96px; }

.lightbox { width: min(94vw, 1320px); max-width: none; max-height: calc(100dvh - 22px); border: 1px solid #5d6670; border-radius: 5px; background: #0c121a; color: var(--ink); padding: 0; }
.lightbox::backdrop { background: #03060be8; }
.lightbox-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 14px; font-size: .93rem; }
.lightbox-header button { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 3px; background: var(--panel); font-size: 1.4rem; line-height: 1; }
.lightbox-header button:hover { border-color: var(--gold); }
.lightbox img { width: 100%; max-height: 80dvh; object-fit: contain; }

@media (max-width: 990px) {
  .section-heading { align-items: start; flex-direction: column; gap: 10px; }
  .section-heading > p { max-width: 100%; }
  .hero h1 { width: min(46vw, 450px); }
  .rules-layout { gap: 28px; }
}

@media (max-width: 740px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { min-height: 0; padding-block: 12px 9px; display: grid; gap: 8px 12px; grid-template-columns: 1fr auto; }
  .header-inner .studio-brand img { width: 94px; }
  .header-inner nav { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; gap: 0; border-top: 1px solid var(--border); padding-block: 9px 3px; font-size: .81rem; }
  .header-inner nav a { padding-block: 3px; }
  .header-release { justify-self: end; }
  .hero { min-height: 630px; }
  .hero-art { width: 100%; object-position: 76% top; height: 54%; }
  .hero::after { background: linear-gradient(0deg, #080e18 46%, #080e1885 57%, #080e1800 82%); }
  .hero-inner { align-items: end; padding-block: 185px 56px; }
  .hero h1 { width: min(74vw, 360px); }
  .hero-tagline { margin-top: 10px; }
  .hero-description { margin-top: 9px; max-width: 330px; }
  .hero-actions { margin-top: 21px; }
  .hero-credit { bottom: 12px; }
  .mode-grid, .rules-layout, .world-grid, .release-inner, .contact-layout, .steam-grid { grid-template-columns: 1fr; }
  .mode-grid { gap: 15px; }
  .mode-description { padding: 17px 18px 22px; }
  .rules-layout, .world-grid { gap: 32px; }
  .table-header { margin-bottom: 16px; }
  .roll-result { min-height: 2.75rem; }
  .world-grid .screenshot { height: auto; aspect-ratio: 16/9; }
  .steam-cover { width: min(75%, 285px); justify-self: center; }
  .steam-brand { padding: 18px 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .site-footer { flex-wrap: wrap; padding-block: 16px; gap: 9px 16px; }
  .site-footer p { flex-basis: 100%; order: 1; }
}

@media (max-width: 365px) {
  .header-release { padding-inline: .55rem; font-size: .76rem; }
  .hero-actions .button { padding-inline: .65rem; gap: 8px; }
  .contact-fields { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
