:root {
  --bg: #0c111b;
  --surface: #161f2f;
  --surface-alt: #1d283c;
  --track: #0a0f18;
  --border: #2f3e56;
  --ink: #f4f6fa;
  --muted: #a6b4c8;
  --primary: #b54d0c;
  --primary-hover: #963e08;
  --accent: #f5b82e;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --font-display: "Rubik", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--ink);
}

h1 {
  font-size: 36px;
  font-weight: 800;
}

h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
}

h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

p {
  margin: 0 0 16px;
  max-width: 70ch;
  color: var(--muted);
}

p:last-child {
  margin-bottom: 0;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-coin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--accent);
  color: var(--bg);
  font-size: 16px;
  font-weight: 800;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.nav-link:hover {
  color: var(--ink);
  text-decoration: none;
}

/* Hero & HUD Game Stage */
.hero-section {
  padding: 24px 0 48px;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius);
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.hud-stage {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.hud-stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background-color: var(--surface-alt);
}

.hud-stage-label {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hud-tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: var(--radius);
  background-color: var(--accent);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hud-sub {
  font-size: 14px;
  color: var(--muted);
}

.hud-meter {
  width: 160px;
  height: 8px;
  border-radius: var(--radius);
  background-color: var(--track);
  border: 1px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
}

.hud-meter-fill {
  display: block;
  width: 38%;
  height: 100%;
  background-color: var(--accent);
}

.stage-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--track);
}

.stage-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.stage-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-color: var(--track);
}

.stage-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stage-launch-dock {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px;
  padding: 12px 16px;
  background-color: rgba(22, 31, 47, 0.94);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.launch-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.launch-pill {
  padding: 4px 12px;
  border-radius: var(--radius);
  background-color: var(--primary);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.launch-hint {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
}

.stage-loader {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-color: var(--bg);
}

.stage-loader[hidden],
.stage-cover[hidden] {
  display: none;
}

.loader-box {
  width: 100%;
  max-width: 360px;
  padding: 24px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.loader-title {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.loader-track {
  width: 100%;
  height: 12px;
  border-radius: var(--radius);
  background-color: var(--track);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 12px;
}

.loader-bar {
  width: 45%;
  height: 100%;
  background-color: var(--accent);
  border-radius: var(--radius);
  animation: sand-sweep 1.4s ease-in-out infinite;
}

@keyframes sand-sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(240%); }
}

.loader-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.stage-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background-color: var(--surface);
  flex-wrap: wrap;
}

.action-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.share-msg {
  font-size: 14px;
  color: var(--accent);
}

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  text-decoration: none;
}

.btn-secondary {
  background-color: var(--surface-alt);
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 0 16px;
  font-size: 14px;
}

.btn-secondary:hover {
  border-color: var(--accent);
}

.btn-secondary[data-gf-liked],
.btn-secondary[aria-pressed="true"] {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.btn-link {
  background: none;
  border: 0;
  padding: 4px 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Content Sections */
.content-section {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.section-lead {
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 24px;
}

/* Section 1: Asymmetric Split */
.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.split-aside {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.media-card {
  margin: 0;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.media-card figcaption {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.specs-card {
  padding: 24px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.specs-list {
  margin: 12px 0 0;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.spec-row:last-child {
  border-bottom: 0;
}

.spec-row dt {
  color: var(--muted);
}

.spec-row dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}

/* Section 2: Numbered 4-step strip + Controls Table */
.step-strip {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.step-card {
  padding: 24px 16px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.step-num {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
}

.controls-panel {
  padding: 24px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.controls-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 12px;
}

.controls-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.controls-table th,
.controls-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.controls-table th {
  color: var(--muted);
  font-weight: 600;
}

.controls-table td {
  color: var(--ink);
}

.keycap {
  display: inline-block;
  padding: 4px 8px;
  border-radius: var(--radius);
  background-color: var(--track);
  border: 1px solid var(--border);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
}

/* Section 3: Progression Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-items: start;
}

.timeline-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: var(--radius);
  background-color: var(--track);
  border: 1px solid var(--border);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
}

/* Section 4: 2x2 Tips Grid */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.tip-card {
  padding: 24px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* Section 5: FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 820px;
}

.faq-item {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
}

.faq-q {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q::after {
  content: "+";
  color: var(--accent);
  font-size: 22px;
  flex-shrink: 0;
}

.faq-item[open] .faq-q::after {
  content: "−";
}

.faq-a {
  margin-top: 12px;
  color: var(--muted);
}

/* Section 6: Comments */
.comments-shell {
  max-width: 820px;
}

.comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.comments-count-badge {
  font-size: 14px;
  color: var(--muted);
}

.comment-form {
  padding: 24px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.reply-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  margin-bottom: 16px;
  background-color: var(--track);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
}

.comment-form[data-gf-replying] .reply-banner {
  display: flex;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.form-row label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--track);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.comment-msg {
  font-size: 14px;
  color: var(--accent);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-list[data-gf-empty]::before {
  content: "No comments yet. Share how quickly you escaped the soup spoon phase or which buried relic surprised you most.";
  display: block;
  padding: 24px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
}

.comment-item {
  padding: 16px 24px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.comment-item[data-gf-owner] {
  border-color: var(--accent);
  background-color: var(--surface-alt);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.comment-author {
  color: var(--ink);
  font-size: 14px;
}

.comment-owner-badge {
  padding: 4px 8px;
  border-radius: var(--radius);
  background-color: var(--accent);
  color: var(--bg);
  font-size: 12px;
  font-weight: 700;
}

.comment-owner-badge[hidden] {
  display: none;
}

.comment-time {
  font-size: 12px;
  color: var(--muted);
}

.comment-body {
  color: var(--ink);
  margin-bottom: 8px;
}

.comment-to {
  color: var(--accent);
  font-weight: 600;
  margin-right: 8px;
}

.comment-replies {
  margin-top: 12px;
  padding-left: 24px;
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Inner / Legal Pages */
.doc-section {
  padding: 32px 0 64px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--muted);
}

.doc-card {
  padding: 32px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 820px;
}

.doc-card h1 {
  margin-bottom: 24px;
}

.prose h2 {
  font-size: 22px;
  margin-top: 32px;
  margin-bottom: 12px;
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 24px;
  color: var(--muted);
}

.prose li {
  margin-bottom: 8px;
}

.notfound-card .hud-tag {
  margin-bottom: 16px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background-color: var(--surface);
  padding: 32px 0 48px;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-tagline {
  margin-top: 12px;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 14px;
}

.footer-copy {
  font-size: 12px;
  color: var(--muted);
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-link {
  font-size: 14px;
  color: var(--muted);
}

.footer-link:hover {
  color: var(--ink);
}

/* Mobile */
@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 22px;
  }

  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .site-nav {
    gap: 12px;
    width: 100%;
    overflow-x: auto;
  }

  .hud-stage-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .hud-meter {
    width: 100%;
  }

  .stage-launch-dock {
    flex-direction: column;
    align-items: stretch;
    margin: 8px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .action-group {
    width: 100%;
  }

  .split-layout,
  .step-strip,
  .tips-grid,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .doc-card {
    padding: 24px 16px;
  }
}
