:root {
  --bg: #FBF8F3;
  --bg-glass: rgba(251, 248, 243, 0.94);
  --surface: #FFFFFF;
  --surface-soft: #F3EDE2;
  --border: #E3DAC9;
  --ink: #182420;
  --muted: #53615B;
  --scrim-top: rgba(24, 36, 32, 0.18);
  --scrim-bottom: rgba(24, 36, 32, 0.72);
  --accent: #BA3E24;
  --accent-dark: #9B2E17;
  --accent-soft: #FDECE8;
  --sage: #1F6E58;
  --sage-soft: #E5F3EE;
  --gold: #F5B041;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(24, 36, 32, 0.06);
  --cta-shadow: 0 5px 0 #9B2E17, 0 14px 28px rgba(24, 36, 32, 0.24);
  --cta-shadow-active: 0 2px 0 #9B2E17;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.mp-site-body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.65;
  overflow-x: hidden;
}
body.mp-embed-body {
  margin: 0;
  background: var(--bg);
  height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--sage); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--surface);
  padding: 8px 14px;
  z-index: 999;
}
.skip-link:focus { left: 10px; top: 10px; }

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border-bottom: 1.5px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 18px; letter-spacing: -0.02em; }
.brand-text small { font-size: 12px; color: var(--muted); font-weight: 600; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  transition: background 0.14s ease, color 0.14s ease;
}
.site-nav a:hover { background: var(--surface-soft); text-decoration: none; }
.site-nav a.active {
  background: var(--ink);
  color: var(--surface);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* Hero & Player */
.hero-section {
  padding: 18px 0 10px;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--muted); font-weight: 600; }
.hero-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.hero-head h1 {
  margin: 0;
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.hero-sub {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--muted);
}
.hero-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tag-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--ink);
}
.tag-pill.sage {
  background: var(--sage-soft);
  border-color: var(--sage);
  color: var(--sage);
}

/* GFS Game Player Frame */
.player-shell {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.stage-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 460px;
  max-height: 620px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
}
.stage-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.stage-cover {
  position: absolute;
  inset: 0;
  cursor: pointer;
  z-index: 3;
}
.stage-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--scrim-top) 0%, var(--scrim-bottom) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  gap: 14px;
}
.cover-badge {
  background: var(--bg-glass);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}
.play-cta {
  appearance: none;
  border: 2px solid var(--accent-dark);
  background: var(--accent);
  color: var(--surface);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 800;
  padding: 15px 32px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--cta-shadow);
  transition: transform 0.12s ease, background 0.14s ease;
}
.play-cta:hover { background: var(--accent-dark); transform: translateY(-1px); }
.play-cta:active { transform: translateY(2px); box-shadow: var(--cta-shadow-active); }
.cover-meta {
  color: var(--surface);
  font-size: 13px;
  font-weight: 600;
}

.stage-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--bg);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
}
.stage-frame[data-gf-state="loading"] .stage-loader {
  display: flex;
}
.pomi-grid-loader {
  display: grid;
  grid-template-columns: repeat(3, 18px);
  gap: 6px;
}
.pomi-grid-loader span {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--accent);
  animation: mpPulse 1s infinite ease-in-out;
}
.pomi-grid-loader span:nth-child(2n) { background: var(--sage); animation-delay: 0.18s; }
.pomi-grid-loader span:nth-child(3n) { background: var(--gold); animation-delay: 0.34s; }
@keyframes mpPulse {
  0%, 100% { transform: scale(0.75); opacity: 0.45; }
  50% { transform: scale(1.05); opacity: 1; }
}

/* Action Bar */
.player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 4px 2px;
}
.player-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.action-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 11px;
  border: 1.5px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.action-btn:hover { background: var(--border); }
.action-btn[data-gf-liked], .action-btn[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.share-status {
  font-size: 13px;
  font-weight: 600;
  color: var(--sage);
}
.player-tip {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* Game Catalog Cards */
.section-block {
  padding: 28px 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.section-head h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.02em;
}
.section-head a {
  font-size: 14px;
  font-weight: 700;
}
.games-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.game-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  color: var(--ink);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.game-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
  text-decoration: none;
}
.game-card-thumb {
  aspect-ratio: 16 / 9;
  background: var(--surface-soft);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.game-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.game-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.game-card-cat {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sage);
}
.game-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}
.game-card-desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

/* Editorial Prose + Facts Sidebar */
.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
}
.prose-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 28px 32px;
}
.prose-card h2 {
  margin: 28px 0 10px;
  font-size: 22px;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.prose-card h2:first-child { margin-top: 0; }
.prose-card h3 {
  margin: 20px 0 8px;
  font-size: 17px;
  color: var(--ink);
}
.prose-card p {
  margin: 0 0 14px;
  color: var(--ink);
  max-width: 72ch;
}
.prose-card ul, .prose-card ol {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--ink);
}
.prose-card li { margin-bottom: 7px; }

.controls-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 20px;
  font-size: 14px;
}
.controls-table th, .controls-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.controls-table th {
  background: var(--surface-soft);
  font-weight: 800;
  color: var(--ink);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.faq-item {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  padding: 12px 16px;
}
.faq-item summary {
  font-weight: 800;
  cursor: pointer;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.faq-item summary::after { content: "+"; font-size: 18px; color: var(--accent); }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 10px 0 0; font-size: 14.5px; color: var(--muted); }

/* Sidebar Quick Facts */
.side-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  position: sticky;
  top: 82px;
}
.side-card h3 { margin: 0 0 12px; font-size: 17px; }
.fact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.fact-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}
.fact-list li span { color: var(--muted); }
.fact-list li strong { color: var(--ink); text-align: right; }

/* Comments */
.comments-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 26px 30px;
  margin-top: 24px;
}
.comments-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.comments-head h2 { margin: 0; font-size: 21px; }
.comment-count-badge {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 13px;
  font-weight: 800;
}
.comment-invite {
  margin: 0 0 14px;
  padding: 12px 15px;
  border-radius: 12px;
  background: var(--bg);
  border: 1.5px dashed var(--border);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.comments-card:has(.comment-item) .comment-invite,
.comments-card:has([data-gf-comments][data-gf-off]) .comment-invite {
  display: none;
}
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
}
.comment-form-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 10px;
}
.comment-form input, .comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
}
.comment-form textarea { min-height: 78px; resize: vertical; }
.comment-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-submit {
  appearance: none;
  border: 1.5px solid var(--accent-dark);
  background: var(--accent);
  color: var(--surface);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 800;
  padding: 9px 18px;
  border-radius: 10px;
  cursor: pointer;
}
.btn-submit:hover { background: var(--accent-dark); }
.reply-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--sage);
  background: var(--sage-soft);
  padding: 6px 10px;
  border-radius: 8px;
}
[data-gf-comment-form][data-gf-replying] .reply-banner { display: flex; }

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
[data-gf-comments][data-gf-off]::after {
  content: "Comments are currently closed on this page.";
  display: block;
  color: var(--muted);
  font-size: 14px;
}
.comment-item {
  border: 1.5px solid var(--border);
  border-radius: 13px;
  padding: 13px 15px;
  background: var(--bg);
}
.comment-item[data-gf-owner], .reply-item[data-gf-owner] {
  background: var(--sage-soft);
  border-color: var(--sage);
}
.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  margin-bottom: 5px;
}
.comment-name { font-weight: 800; color: var(--ink); }
.owner-badge {
  font-size: 12px;
  font-weight: 800;
  background: var(--sage);
  color: var(--surface);
  padding: 2px 7px;
  border-radius: 999px;
}
.comment-time { color: var(--muted); font-size: 12px; }
.comment-text { margin: 0; font-size: 14.5px; color: var(--ink); white-space: pre-wrap; }
.reply-btn {
  margin-top: 7px;
  background: none;
  border: none;
  padding: 0;
  color: var(--sage);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.replies-box {
  margin-top: 10px;
  padding-left: 14px;
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reply-item {
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}

/* Standard Pages & Index Pages */
.page-hero {
  padding: 28px 0 12px;
}
.page-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.4vw, 36px);
  letter-spacing: -0.02em;
}
.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 68ch;
}
.article-wrap {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 28px 34px;
  margin: 14px 0 36px;
  max-width: 820px;
}
.article-wrap h2 { margin-top: 24px; font-size: 21px; }
.article-wrap h2:first-child { margin-top: 0; }
.article-wrap p { color: var(--ink); }
.list-guide { margin-top: 28px; }
.guide-list li { margin-bottom: 9px; color: var(--ink); }
.guide-list a { font-weight: 700; }

/* Footer */
.site-footer {
  margin-top: 32px;
  border-top: 1.5px solid var(--border);
  background: var(--surface);
  padding: 36px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 28px;
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.brand-row strong { font-size: 18px; }
.footer-pill {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--sage-soft);
  color: var(--sage);
}
.footer-brand p { margin: 0; font-size: 14px; color: var(--muted); max-width: 34ch; }
.footer-col h3 { margin: 0 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.footer-col a { font-size: 14px; color: var(--ink); font-weight: 600; }
.footer-bottom {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 960px) {
  .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-layout { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    background: var(--surface);
    border-bottom: 1.5px solid var(--border);
    flex-direction: column;
    padding: 12px 20px;
    align-items: stretch;
  }
  .site-nav.open { display: flex; }
  .stage-frame {
    aspect-ratio: auto;
    height: 520px;
    min-height: 480px;
  }
  .player-shell { padding: 8px; border-radius: 16px; }
  .prose-card, .comments-card, .article-wrap { padding: 20px 18px; }
  .comment-form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 440px) {
  .games-grid { grid-template-columns: 1fr; }
}