:root {
  color-scheme: dark;
  --base: #101613;
  --panel: #171f1a;
  --raised: #202a23;
  --line: #334139;
  --ink: #f3eee3;
  --muted: #afb9ae;
  --gold: #edcd89;
  --green: #a5cba3;
  --serif: Georgia, 'Times New Roman', serif;
  font-family: 'Segoe UI', Arial, sans-serif;
  line-height: 1.55;
  background: var(--base);
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
body > main { min-height: calc(100vh - 172px); }
[hidden] { display: none !important; }
a { color: var(--gold); text-underline-offset: 4px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.06; }
h1 { font-size: clamp(3.1rem, 7vw, 6.15rem); letter-spacing: -.063em; overflow-wrap: anywhere; }
h2 { font-size: clamp(2.1rem, 4.15vw, 3.65rem); letter-spacing: -.058em; }
h3 { font-size: clamp(1.55rem, 2.6vw, 2.3rem); letter-spacing: -.046em; }
p { color: var(--muted); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
.wrap { width: min(1320px, calc(100% - 112px)); margin-inline: auto; }
.icon { width: 1.2em; height: 1.2em; flex: none; vertical-align: middle; }
.skip { position: fixed; left: 12px; top: 12px; background: var(--base); padding: 12px; z-index: 10; transform: translateY(-150%); }
.skip:focus { transform: none; }
.site-header { z-index: 5; position: relative; background: #0e1512; border-bottom: 1px solid #303b32; }
.header-row, .site-menu, .site-menu nav, .account, .footer-row { display: flex; align-items: center; }
.header-row { min-height: 77px; gap: clamp(1.25rem, 4.1vw, 4.5rem); }
.site-menu { flex: 1; justify-content: space-between; gap: 1rem; }
.site-menu nav { gap: clamp(1.1rem, 2.5vw, 2.65rem); }
.site-menu nav a, .footer-link {
  color: #c4cdc2; text-decoration: none; font-size: .94rem; font-weight: 600; white-space: nowrap;
}
.site-menu nav a:hover, .site-menu nav a[aria-current], .footer-link:hover { color: var(--gold); }
.site-menu nav a[aria-current] { text-decoration: underline; text-underline-offset: 8px; }
.account { gap: .45rem; }
.account-name { max-width: 15ch; overflow: hidden; text-overflow: ellipsis; font-size: .9rem; white-space: nowrap; padding-inline: .45rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); text-decoration: none; white-space: nowrap; font-size: 1.31rem; font-weight: 750; letter-spacing: -.05em; }
.brand-mark { flex: none; border-radius: 9px; }
.brand-accent { color: var(--gold); }
.menu-toggle { margin-left: auto; }
.button {
  align-items: center; justify-content: center; display: inline-flex; gap: .55em; min-height: 48px;
  padding: .68rem 1.15rem; border: 1px solid transparent; border-radius: 8px; color: var(--ink);
  font-size: .98rem; font-weight: 680; text-decoration: none; line-height: 1.22; background: var(--raised);
  transition: background .18s, color .18s, border-color .18s, transform .18s;
}
.button:hover { transform: translateY(-1px); background: #2c392f; }
.button.small { min-height: 38px; padding: .53rem .87rem; font-size: .9rem; }
.button.primary { background: var(--gold); color: #252117; border-color: var(--gold); }
.button.primary:hover { background: #ffe1a2; border-color: #ffe1a2; }
.button.outline, .button.glass { background: transparent; border-color: #516052; }
.button.glass { background: #15211b9b; border-color: #a8b7a078; }
.button.outline:hover, .button.glass:hover { border-color: var(--gold); color: var(--gold); background: #283128; }
.button.quiet { background: transparent; color: #d7ddd4; }
.button.quiet:hover { color: var(--gold); }
.hero, .game-hero { position: relative; isolation: isolate; overflow: hidden; background: #13241e; }
.hero { min-height: clamp(540px, 49vw, 695px); display: grid; align-items: center; }
.hero picture, .hero picture img, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero picture img { object-fit: cover; object-position: 50% 48%; }
.hero-shade {
  background: linear-gradient(90deg, #0b1612f0, #0b1713ae 28%, #09131029 65%, transparent 86%),
    linear-gradient(0deg, #101613, #1016131f 29%, transparent 65%);
}
.hero-content { position: relative; padding-block: 5rem 6rem; }
.hero-content h1 { font-size: clamp(3.5rem, 8.55vw, 8.4rem); text-shadow: 0 3px 28px #070c0a80; }
.eyebrow { margin: 0 0 .76rem; color: var(--gold); font-size: .83rem; line-height: 1.4; font-weight: 730; letter-spacing: .14em; text-transform: uppercase; }
.hero-kicker { display: flex; gap: .75rem; align-items: center; margin-bottom: 1.25rem; }
.hero-kicker span { display: block; height: 1px; width: 34px; background: var(--gold); }
.hero-description { max-width: 31ch; color: #e1e8de; font-size: clamp(1.07rem, 2.1vw, 1.46rem); margin: 1.35rem 0 1.65rem; line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
.hero-meta, .game-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; color: #c5d0c3; font-size: .91rem; }
.hero-meta { margin-top: 1.3rem; }
.separator { display: inline-block; width: 1px; height: .9em; margin-inline: .2rem; background: #81918087; }
.art-credit { position: absolute; bottom: 22px; right: max(24px, calc((100% - 1320px) / 2)); color: #d2d9cf; font-size: .8rem; border-radius: 5px; background: #0e1713ac; padding: .25rem .55rem; }
.home-body { padding-top: 1.2rem; padding-bottom: 5rem; }
.home-section + .home-section { margin-top: clamp(3rem, 6vw, 5.5rem); }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.45rem; }
.section-title .eyebrow { margin-bottom: .42rem; }
.library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; }
.game-card, .studio-note, .panel, .empty, .news-list { border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.game-card { display: grid; min-height: 220px; grid-template-columns: minmax(0, .82fr) minmax(0, 1fr); overflow: hidden; }
.game-cover { display: block; min-height: 100%; position: relative; }
.game-cover img { width: 100%; height: 100%; object-fit: cover; position: absolute; transition: transform .35s; }
.game-cover { overflow: hidden; }
.game-cover:hover img { transform: scale(1.045); }
.game-cover:focus-visible { outline-offset: -4px; }
.card-body { padding: 1.45rem; align-self: center; }
.card-body h2, .card-body h3 { font-size: clamp(1.55rem, 2.6vw, 2.3rem); }
.card-body :is(h2, h3) a, .news-row h3 a { color: inherit; text-decoration: none; }
.card-body :is(h2, h3) a:hover, .news-row h3 a:hover { color: var(--gold); }
.card-body > p:not(.eyebrow) { margin-top: .74rem; }
.card-body .eyebrow { font-size: .74rem; letter-spacing: .09em; }
.card-body .game-meta { margin-top: 1.1rem; font-size: .84rem; }
.studio-note { display: flex; align-items: start; gap: 1.05rem; padding: clamp(1.35rem, 4vw, 2.65rem); background: radial-gradient(ellipse at 85% 0%, #2b392b, #19231b 68%); }
.studio-note img { flex: none; }
.studio-note p { margin-top: .77rem; max-width: 42ch; }
.news-list { overflow: hidden; }
.news-list > .empty { border: 0; }
.news-row { display: grid; grid-template-columns: minmax(9rem, .3fr) 1fr auto; align-items: center; gap: 1.35rem; padding: 1.45rem; }
.news-row + .news-row { border-top: 1px solid var(--line); }
.news-row h3 { font-size: 1.65rem; }
.news-row p { margin-top: .4rem; overflow-wrap: anywhere; }
.line-meta, .muted, small { color: var(--muted); font-size: .9rem; }
.next-grid, .detail-grid, .discussion-grid, .admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; }
.panel { padding: clamp(1.3rem, 3vw, 2.35rem); }
.panel > .icon { color: var(--gold); font-size: 1.5rem; margin-bottom: .8rem; }
.panel h2 { font-size: clamp(1.75rem, 3.1vw, 2.6rem); }
.panel > p, .panel > .button, .panel > .actions { margin-top: .85rem; }
.panel > .eyebrow { margin-top: 0; }
.site-footer { background: #0c120f; border-top: 1px solid var(--line); }
.footer-row { padding-block: 1.35rem; flex-wrap: wrap; gap: .85rem 1.5rem; }
.footer-row > span { color: var(--muted); font-size: .89rem; }
.footer-row nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: .5rem 1.3rem; }
.inner { padding-block: clamp(2.8rem, 7vw, 6.1rem); }
.page-head { margin-bottom: clamp(1.45rem, 4vw, 2.75rem); }
.page-head .lead, .game-hero .lead, .detail-grid .lead { margin-top: 1rem; }
.lead { font-size: clamp(1.05rem, 2vw, 1.28rem); max-width: 56ch; }
.game-hero {
  min-height: 470px; display: grid; align-items: center; padding-block: 3.6rem;
  background-image: linear-gradient(90deg, #101613f7, #1016134f 62%, transparent), linear-gradient(0deg, #101613, transparent 56%), url('/assets/frontier.webp');
  background-size: cover; background-position: center 47%;
}
.game-hero .lead { color: #e1e8de; max-width: 36ch; }
.game-hero .actions { margin-top: 1.3rem; }
.detail-grid { gap: clamp(1.6rem, 7vw, 7rem); align-items: start; }
.detail-grid.inner { padding-top: 2rem; }
.game-features { display: grid; gap: .4rem; padding-left: 1.25rem; color: var(--muted); }
.game-features li::marker { color: var(--gold); }
.download-panel .game-meta { margin-top: .6rem; }
.download-panel .button { width: 100%; }
details { color: var(--muted); font-size: .9rem; }
summary { cursor: pointer; color: var(--gold); }
.download-panel details { margin-top: 1rem; }
.checksum { display: block; margin-top: .5rem; overflow-wrap: anywhere; }
.prose { max-width: 900px; }
.back-link { display: inline-block; margin-bottom: 1.75rem; }
.article-content { max-width: 69ch; font-size: 1.1rem; }
.article-content p + p { margin-top: 1rem; }
.wallet { max-width: 710px; }
.wallet-address { margin-top: 1rem; display: flex; justify-content: space-between; align-items: center; gap: .75rem; background: #101713; border: 1px solid var(--line); border-radius: 8px; padding: .6rem; }
.wallet-address code { padding: .35rem; font-size: clamp(.81rem, 1.8vw, 1rem); overflow-wrap: anywhere; min-width: 0; }
.copy-status:empty { display: none; }
.discussion-bar { display: flex; align-items: end; gap: 1.25rem 2.9rem; margin-bottom: 1.65rem; flex-wrap: wrap; }
.game-select { display: flex; align-items: end; gap: .6rem; }
.game-select select { min-width: 190px; }
.tabs { display: flex; gap: .35rem; padding: 4px; background: #0b120e; border: 1px solid var(--line); border-radius: 9px; }
.tabs a { padding: .56rem .9rem; border-radius: 6px; color: var(--muted); font-weight: 650; text-decoration: none; }
.tabs a[aria-current], .tabs a:hover { background: var(--raised); color: var(--gold); }
.discussion-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.posts > h2 { font-size: 2rem; margin-bottom: .85rem; }
.empty { padding: 1.3rem; }
.post { padding: 1.25rem; margin-bottom: .8rem; }
.post header { display: flex; align-items: center; gap: .75rem; margin-bottom: .85rem; }
.post h3 { font-size: 1.65rem; }
.post-text, .reply p, .admin-row { overflow-wrap: anywhere; }
.avatar { display: grid; place-items: center; width: 41px; height: 41px; flex: none; border-radius: 50%; background: #2c3d30; color: var(--gold); font-weight: 750; }
.rating { margin-left: auto; color: var(--gold); white-space: nowrap; }
.tag { margin-left: .5rem; color: var(--green); font-size: .8rem; }
.replies { margin-top: .95rem; border-top: 1px solid var(--line); padding-top: .7rem; }
.reply, .replies form { margin: .65rem 0 0 1.15rem; border-left: 1px solid var(--line); padding-left: .75rem; }
.panel form label, .game-select label { display: grid; gap: .36rem; font-size: .95rem; font-weight: 620; }
.panel form > * + *:not([type="hidden"]) { margin-top: .9rem; }
.composer form, .auth-panel form, .admin-grid form { margin-top: 1.15rem; }
input, select, textarea {
  width: 100%; border: 1px solid #47574b; border-radius: 7px; color: var(--ink); background: #101713;
  padding: .65rem .75rem; min-height: 48px; accent-color: var(--gold);
}
select {
  appearance: none; padding-right: 2rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: right 15px center, right 10px center;
  background-size: 5px 5px; background-repeat: no-repeat;
}
textarea { resize: vertical; }
small { font-weight: 400; }
.auth-wrap { max-width: 900px; padding-block: clamp(2.1rem, 6vw, 5rem); display: grid; grid-template-columns: .9fr 1.1fr; }
.auth-art { background: linear-gradient(0deg, #0e1b15bd, transparent 68%), url('/assets/frontier-card.webp') 59% center / cover; border-radius: 14px 0 0 14px; }
.auth-panel { border-radius: 0 14px 14px 0; }
.auth-panel h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
.auth-panel form .button { width: 100%; }
.auth-panel .switch-form { font-size: .92rem; }
.form-message { padding: .7rem .9rem; color: #cbe6ce; background: #2b4131; border: 1px solid #45644b; border-radius: 7px; }
.form-message.error { color: #ffddd2; background: #442b26; border-color: #885448; }
.admin-nav, .admin-grid, .admin-list { margin-top: 1.25rem; }
.admin-grid { align-items: start; }
.admin-row { display: flex; justify-content: space-between; align-items: center; gap: .85rem; margin-top: .85rem; padding-top: .85rem; border-top: 1px solid var(--line); }
.admin-row .button { white-space: nowrap; }
@media (max-width: 1050px) {
  .wrap { width: calc(100% - 64px); }
  .header-row { flex-wrap: wrap; gap: .4rem 1rem; padding-block: .65rem; min-height: 66px; }
  .header-row .brand { margin-right: auto; }
  .site-menu { flex-basis: 100%; }
  .header-row .menu-toggle:not([hidden]) { display: inline-flex; }
  .hero { min-height: 565px; }
}
@media (max-width: 820px) {
  .library-grid, .next-grid, .discussion-grid, .admin-grid { grid-template-columns: 1fr; }
  .game-card { max-width: 635px; }
  .composer { grid-row: 1; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 660px) {
  .wrap { width: calc(100% - 36px); }
  .site-menu { align-items: start; flex-direction: column; border-top: 1px solid var(--line); padding-block: .5rem .35rem; }
  .site-menu nav { flex-wrap: wrap; gap: .55rem 1rem; }
  .hero { align-items: end; min-height: 590px; }
  .hero picture img { object-position: 53% center; }
  .hero-shade { background: linear-gradient(0deg, #101613 3%, #101613bd 37%, #1016130d 82%), linear-gradient(90deg, #0b161269, transparent); }
  .hero-content { padding-block: 9rem 4.55rem; }
  .hero-content h1 { font-size: clamp(2.75rem, 10.6vw, 4.65rem); }
  .hero-kicker { margin-bottom: .8rem; }
  .hero-description { margin-top: .85rem; }
  .art-credit { bottom: 11px; right: 18px; font-size: .74rem; }
  .section-title .button { text-align: center; }
  .game-card { grid-template-columns: 1fr; }
  .game-cover { min-height: 180px; }
  .game-cover img { object-position: center 44%; }
  .studio-note { flex-direction: column; }
  .news-row { grid-template-columns: 1fr; gap: .6rem; }
  .news-row > .button { justify-self: start; }
  .footer-row nav { margin-left: 0; }
  .game-hero {
    min-height: 420px; background-position: center, center, 67% center;
    background-image: linear-gradient(90deg, #101613dc, #10161332 95%), linear-gradient(0deg, #101613, transparent 79%), url('/assets/frontier-mobile.webp');
  }
  .wallet-address { align-items: stretch; flex-direction: column; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { min-height: 126px; border-radius: 12px 12px 0 0; background-position: center 40%; }
  .auth-panel { border-radius: 0 0 12px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
