/* ========================================================================
   GENERIC QUARK2 HEADER ACTIONS + FOOTER
   Scope: only styles the custom additions in navigation.html.twig and
   footer.html.twig. All class names and variables are brand/domain agnostic.
   ======================================================================== */

/* ===== CUSTOM ADDITION START: shared design tokens ===== */
:root {
    --site-accent: #f2ad17;
    --site-accent-light: #ffd66b;
    --site-accent-dark: #d78f00;
    --site-accent-ink: #1b0b0e;

    --site-nav-secondary-bg: rgba(20, 11, 14, 0.06);
    --site-nav-secondary-border: rgba(35, 21, 25, 0.18);
    --site-nav-secondary-text: #2c1b20;

    --site-footer-bg: #13090c;
    --site-footer-border: rgba(255, 255, 255, 0.10);
    --site-footer-text: #cfc2c5;
    --site-footer-muted: #998a8e;
    --site-footer-strong: #ffffff;
}

html[data-theme="dark"] {
    --site-nav-secondary-bg: rgba(255, 255, 255, 0.07);
    --site-nav-secondary-border: rgba(255, 255, 255, 0.18);
    --site-nav-secondary-text: #f7f1f3;

    --site-footer-bg: #0d0709;
    --site-footer-border: rgba(255, 255, 255, 0.11);
    --site-footer-text: #d8cdd0;
    --site-footer-muted: #a8999d;
    --site-footer-strong: #ffffff;
}
/* ===== CUSTOM ADDITION END ===== */


/* ========================================================================
   HEADER - ONLY THE TWO APPENDED NAVIGATION ACTIONS
   ======================================================================== */

/* ===== CUSTOM ADDITION START: navigation action buttons ===== */
.navigation > .site-nav-action {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.navigation > .site-nav-action--secondary {
    margin-left: 12px;
}

.navigation > .site-nav-action--primary {
    margin-left: 8px;
}

.navigation .site-nav-button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 17px;
    border: 1px solid transparent;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.01em;
    text-decoration: none !important;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease;
}

.navigation .site-nav-button::before,
.navigation .site-nav-button::after {
    display: none !important;
    content: none !important;
}

.navigation .site-nav-button--secondary {
    color: var(--site-nav-secondary-text) !important;
    background: var(--site-nav-secondary-bg) !important;
    border-color: var(--site-nav-secondary-border) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.navigation .site-nav-button--secondary:hover,
.navigation .site-nav-button--secondary:focus-visible {
    color: var(--site-nav-secondary-text) !important;
    background: rgba(242, 173, 23, 0.09) !important;
    border-color: rgba(242, 173, 23, 0.55) !important;
    transform: translateY(-1px);
}

.navigation .site-nav-button--primary {
    color: var(--site-accent-ink) !important;
    background: linear-gradient(135deg, var(--site-accent-light), var(--site-accent)) !important;
    border-color: rgba(215, 143, 0, 0.55) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 8px 22px rgba(242, 169, 0, 0.25);
}

.navigation .site-nav-button--primary:hover,
.navigation .site-nav-button--primary:focus-visible {
    color: var(--site-accent-ink) !important;
    background: linear-gradient(135deg, #ffe18a, #f5b51f) !important;
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.65),
        0 11px 28px rgba(242, 169, 0, 0.34);
}

.navigation .site-nav-button:focus-visible {
    outline: 3px solid rgba(242, 173, 23, 0.34);
    outline-offset: 3px;
}

@media (max-width: 960px) {
    .navigation > .site-nav-action--secondary,
    .navigation > .site-nav-action--primary {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
    }

    .navigation > .site-nav-action--primary {
        margin-top: 6px;
    }

    .navigation .site-nav-button {
        width: 100%;
        min-height: 44px;
        padding: 11px 16px;
    }
}
/* ===== CUSTOM ADDITION END ===== */


/* ========================================================================
   FOOTER
   ======================================================================== */

/* ===== CUSTOM ADDITION START: footer shell ===== */
#footer {
    position: relative;
    overflow: hidden;
    margin-top: 48px;
    padding: 52px 0 26px;
    color: var(--site-footer-text);
    background:
        radial-gradient(circle at 10% -20%, rgba(242, 173, 23, 0.12), transparent 32%),
        radial-gradient(circle at 92% 110%, rgba(201, 21, 44, 0.10), transparent 28%),
        var(--site-footer-bg);
    border-top: 1px solid var(--site-footer-border);
}

#footer > .container {
    position: relative;
    z-index: 1;
}

#footer .site-footer__main {
    display: grid;
    grid-template-columns: minmax(280px, 1.1fr) minmax(320px, 0.9fr);
    align-items: start;
    gap: 44px;
    padding-bottom: 34px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--site-footer-border);
}

#footer .site-footer__brand {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    max-width: 560px;
}

#footer .site-footer__brand-mark {
    flex: 0 0 52px;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: var(--site-accent-ink);
    background: linear-gradient(145deg, #ffe397, var(--site-accent));
    border-radius: 15px;
    font-size: 0.92rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.62),
        0 8px 22px rgba(242, 169, 0, 0.20);
}

#footer .site-footer__brand-copy {
    min-width: 0;
    padding-top: 2px;
}

#footer .site-footer__brand-name {
    display: block;
    margin: 0 0 7px;
    color: var(--site-footer-strong);
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0.08em;
}

#footer .site-footer__brand-copy p {
    margin: 0;
    color: var(--site-footer-muted);
    font-size: 0.88rem;
    line-height: 1.7;
}

#footer .site-footer__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-content: flex-start;
    gap: 10px 22px;
    padding-top: 5px;
}

#footer .site-footer__nav a {
    position: relative;
    color: var(--site-footer-text) !important;
    font-size: 0.84rem;
    font-weight: 750;
    line-height: 1.4;
    text-decoration: none !important;
    transition: color 0.18s ease, transform 0.18s ease;
}

#footer .site-footer__nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -4px;
    height: 1px;
    background: var(--site-accent);
    transition: right 0.18s ease;
}

#footer .site-footer__nav a:hover,
#footer .site-footer__nav a:focus-visible {
    color: var(--site-accent-light) !important;
    transform: translateY(-1px);
}

#footer .site-footer__nav a:hover::after,
#footer .site-footer__nav a:focus-visible::after {
    right: 0;
}

#footer > .container > p:not(.site-footer__notice) {
    margin: 0;
    color: #857579;
    font-size: 0.76rem;
    line-height: 1.6;
}

#footer > .container > p:not(.site-footer__notice) a {
    color: #bcaeb2 !important;
    font-weight: 700;
    text-decoration: none;
}

#footer > .container > p:not(.site-footer__notice) a:hover {
    color: var(--site-accent-light) !important;
}

#footer .site-footer__notice {
    margin: 7px 0 0;
    color: #857579;
    font-size: 0.76rem;
    line-height: 1.65;
}

#footer .site-footer__notice strong {
    color: #e8c15d;
    font-weight: 850;
}

@media (max-width: 820px) {
    #footer {
        margin-top: 38px;
        padding: 42px 0 24px;
    }

    #footer .site-footer__main {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-bottom: 28px;
    }

    #footer .site-footer__nav {
        justify-content: flex-start;
        gap: 12px 20px;
    }
}

@media (max-width: 540px) {
    #footer {
        padding-top: 36px;
    }

    #footer .site-footer__brand {
        gap: 12px;
    }

    #footer .site-footer__brand-mark {
        flex-basis: 46px;
        width: 46px;
        height: 46px;
        border-radius: 13px;
        font-size: 0.82rem;
    }

    #footer .site-footer__brand-name {
        font-size: 0.98rem;
    }

    #footer .site-footer__brand-copy p {
        font-size: 0.82rem;
    }

    #footer .site-footer__nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 18px;
    }
}
/* ===== CUSTOM ADDITION END ===== */
/* =========================================================
   PAGE CONTENT STYLES — Editorial Utility / Field Guide system
   Header, navigation and footer are intentionally untouched.
   ========================================================= */

/* Quark2 page-body design: wide editorial layout, light/dark safe */
:root {
  --page-bg: #f4f1ea;
  --page-panel: #fffaf1;
  --page-panel-2: #f9e7cf;
  --page-text: #172017;
  --page-muted: #5f665a;
  --page-soft: #eef1e4;
  --page-line: rgba(36, 49, 32, .16);
  --page-strong: #1d3b2b;
  --page-accent: #d97924;
  --page-accent-2: #16745b;
  --page-ink: #111712;
  --page-invert: #fffaf1;
  --page-radius-lg: 34px;
  --page-radius-md: 22px;
  --page-radius-sm: 14px;
  --page-shadow: 0 30px 80px rgba(58, 45, 25, .14);
  --page-shadow-soft: 0 16px 38px rgba(58, 45, 25, .10);
  --page-gutter: clamp(18px, 4vw, 68px);
}

html[data-theme="dark"],
html.dark,
body.dark {
  --page-bg: #0c100d;
  --page-panel: #141b16;
  --page-panel-2: #1b251d;
  --page-text: #f4f7ee;
  --page-muted: #b5c0ae;
  --page-soft: #101711;
  --page-line: rgba(255, 255, 255, .14);
  --page-strong: #a5efc8;
  --page-accent: #f2a14d;
  --page-accent-2: #55d3a4;
  --page-ink: #050806;
  --page-invert: #f7fbf0;
  --page-shadow: 0 30px 90px rgba(0, 0, 0, .42);
  --page-shadow-soft: 0 16px 42px rgba(0, 0, 0, .30);
}

.mast79-page {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow-x: clip;
  background:
    radial-gradient(circle at 92% 5%, color-mix(in srgb, var(--page-accent) 18%, transparent), transparent 30rem),
    radial-gradient(circle at 5% 24%, color-mix(in srgb, var(--page-accent-2) 16%, transparent), transparent 28rem),
    linear-gradient(180deg, var(--page-bg), color-mix(in srgb, var(--page-bg) 82%, var(--page-panel-2)) 58%, var(--page-bg));
  color: var(--page-text);
  font-size: 16px;
  line-height: 1.7;
  isolation: isolate;
}

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

.mast79-page a {
  color: inherit;
}

.mast79-page p {
  margin: 0 0 1rem;
  color: var(--page-muted);
}

.mast79-page h1,
.mast79-page h2,
.mast79-page h3 {
  margin: 0 0 1rem;
  color: var(--page-text);
  font-weight: 850;
  letter-spacing: -.045em;
  line-height: .98;
}

.mast79-page h1 {
  font-size: clamp(2.45rem, 7vw, 6.8rem);
  max-width: 13ch;
}

.mast79-page h2 {
  font-size: clamp(1.95rem, 4vw, 4.35rem);
  max-width: 12ch;
}

.mast79-page h3 {
  font-size: clamp(1.08rem, 1.8vw, 1.35rem);
  line-height: 1.14;
  letter-spacing: -.025em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.15rem !important;
  color: var(--page-accent-2) !important;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.game-hero,
.directory-hero,
.editorial-hero,
.plain-hero,
.content-section,
.game-section,
.article-shell {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
}

.game-hero {
  min-height: clamp(620px, 86vh, 900px);
  padding-top: clamp(58px, 8vw, 110px);
  padding-bottom: clamp(42px, 7vw, 92px);
  display: grid;
  align-items: stretch;
  gap: clamp(28px, 5vw, 70px);
  border-bottom: 1px solid var(--page-line);
}

.game-hero--split {
  grid-template-columns: minmax(0, 1.02fr) minmax(300px, .98fr);
}

.game-hero-content {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: clamp(18px, 4vw, 42px) 0;
}

.game-hero-content > p:not(.eyebrow) {
  max-width: 720px;
  font-size: clamp(1.04rem, 1.45vw, 1.28rem);
}

.game-hero-actions,
.directory-hero-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 30px;
}

.game-hero-actions span,
.directory-hero-actions span {
  color: var(--page-muted);
  font-weight: 700;
}

.game-download-button,
.button-primary,
.button-secondary,
.article-download-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 22px;
  text-decoration: none !important;
  font-weight: 900;
  letter-spacing: -.01em;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

.game-download-button,
.button-primary,
.article-download-link {
  color: #fff !important;
  background: linear-gradient(135deg, var(--page-accent-2), var(--page-accent));
  box-shadow: 0 18px 38px color-mix(in srgb, var(--page-accent) 30%, transparent);
}

.button-secondary,
.game-card-details {
  color: var(--page-text) !important;
  background: color-mix(in srgb, var(--page-panel) 80%, transparent);
  border-color: var(--page-line);
}

.game-download-button:hover,
.button-primary:hover,
.article-download-link:hover,
.button-secondary:hover,
.game-card-action:hover,
.game-card-details:hover {
  transform: translateY(-2px);
}

.game-hero-visual {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 0 0 0 clamp(70px, 9vw, 150px);
  border: 1px solid var(--page-line);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--page-strong) 92%, black), color-mix(in srgb, var(--page-accent-2) 54%, var(--page-ink))),
    var(--page-panel);
  box-shadow: var(--page-shadow);
}

.game-hero-visual::before,
.game-hero-visual::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.game-hero-visual::before {
  width: 420px;
  height: 420px;
  left: -150px;
  top: -120px;
  background: color-mix(in srgb, var(--page-accent) 42%, transparent);
}

.game-hero-visual::after {
  width: 300px;
  height: 300px;
  right: -90px;
  bottom: -80px;
  border: 42px solid color-mix(in srgb, white 14%, transparent);
}

.hero-logo-card {
  position: relative;
  z-index: 2;
  width: 292px;
  height: 292px;
  display: grid;
  place-items: center;
  border-radius: 46px;
  background: color-mix(in srgb, var(--page-panel) 94%, white);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .24);
  transform: rotate(-2deg);
}

.game-app-logo {
  width: 240px;
  height: 240px;
  display: block;
  object-fit: cover;
  border-radius: 34px;
}

.hero-status {
  position: absolute;
  z-index: 3;
  left: clamp(18px, 4vw, 40px);
  right: clamp(18px, 4vw, 40px);
  bottom: clamp(18px, 4vw, 38px);
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  color: var(--page-text);
  background: color-mix(in srgb, var(--page-panel) 88%, transparent);
  border: 1px solid color-mix(in srgb, white 42%, transparent);
  border-radius: var(--page-radius-md);
  backdrop-filter: blur(16px);
}

.hero-status strong {
  color: var(--page-strong);
}

.hero-status span {
  color: var(--page-muted);
  text-align: right;
}

.content-section {
  padding-top: clamp(54px, 7vw, 110px);
  padding-bottom: clamp(54px, 7vw, 110px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(280px, .7fr) auto;
  gap: clamp(18px, 4vw, 46px);
  align-items: end;
  margin-bottom: clamp(28px, 5vw, 54px);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--page-line);
}

.section-heading p {
  max-width: 660px;
  margin-bottom: 0;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--page-accent-2) !important;
  font-weight: 900;
  text-decoration: none !important;
  white-space: nowrap;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
}

.mast79-home .game-grid .game-card:first-child {
  grid-column: span 2;
}

.mast79-home .game-grid .game-card:first-child .game-card-media {
  min-height: 240px;
}

.game-card {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--page-line);
  border-radius: var(--page-radius-lg);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--page-panel) 98%, white), var(--page-panel));
  box-shadow: var(--page-shadow-soft);
}

.game-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% 18%;
  height: 120px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--page-accent) 10%, transparent);
  pointer-events: none;
}

.game-card-media {
  position: relative;
  min-height: 190px;
  display: grid;
  place-items: center;
  margin: 12px;
  overflow: hidden;
  border-radius: 26px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--page-soft) 88%, var(--page-panel)), color-mix(in srgb, var(--page-panel-2) 72%, var(--page-panel)));
}

.game-card-media img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  display: block;
  border-radius: 26px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .18);
}

.game-rank,
.game-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 950;
}

.game-rank {
  left: 12px;
  color: #fff;
  background: var(--page-ink);
}

.game-badge {
  right: 12px;
  color: #291000;
  background: #ffd261;
}

.game-card-body {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 14px 22px 12px;
}

.game-rating {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  color: #f59d13;
  font-size: .92rem;
}

.game-rating strong {
  color: var(--page-text);
}

.game-card-body p {
  font-size: .96rem;
}

.game-card-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 18px 18px;
}

.game-card-action,
.game-card-details {
  flex: 1 1 auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none !important;
  font-weight: 900;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.game-card-action {
  color: #fff !important;
  background: var(--page-ink);
  box-shadow: 0 14px 24px rgba(0, 0, 0, .16);
}

.game-card-details {
  border: 1px solid var(--page-line);
}

.feature-grid,
.contact-grid,
.tips-grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}

.feature-grid,
.contact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card,
.contact-card,
.toc-card,
.policy-copy,
.prose {
  border: 1px solid var(--page-line);
  border-radius: var(--page-radius-lg);
  background: color-mix(in srgb, var(--page-panel) 96%, transparent);
  box-shadow: var(--page-shadow-soft);
}

.feature-card,
.contact-card,
.toc-card {
  padding: clamp(20px, 3vw, 34px);
  text-decoration: none !important;
}

.feature-card span {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--page-accent-2), var(--page-accent));
  font-weight: 950;
}

.guide-card-link {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .2s ease, border-color .2s ease;
}

.guide-card-link:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--page-accent-2) 50%, var(--page-line));
}

.game-section {
  position: relative;
  margin: 0;
  padding-top: clamp(52px, 6vw, 92px);
  padding-bottom: clamp(52px, 6vw, 92px);
  border-top: 1px solid var(--page-line);
}

.game-section:not(.game-section--dark) {
  background: color-mix(in srgb, var(--page-bg) 80%, var(--page-panel));
}

.game-section--dark {
  color: #fff;
  background:
    radial-gradient(circle at 86% 18%, color-mix(in srgb, var(--page-accent) 26%, transparent), transparent 24rem),
    linear-gradient(135deg, #101511, #203026 62%, #122018);
}

.game-section--dark h2,
.game-section--dark h3 {
  color: #fff;
}

.game-section--dark p,
.game-section--dark li {
  color: rgba(255, 255, 255, .78);
}

.content-grid,
.article-layout,
.editorial-hero-grid {
  display: grid;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.content-grid {
  grid-template-columns: .85fr 1.15fr;
}

.directory-hero {
  min-height: 540px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, .72fr);
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
  padding-top: clamp(58px, 7vw, 100px);
  padding-bottom: clamp(48px, 6vw, 88px);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--page-panel-2) 42%, transparent), transparent 72%),
    var(--page-bg);
  border-bottom: 1px solid var(--page-line);
}

.directory-hero-copy p:not(.eyebrow) {
  max-width: 780px;
  font-size: clamp(1.04rem, 1.5vw, 1.23rem);
}

.directory-preview {
  min-height: 300px;
  display: grid;
  place-items: center;
  padding: 26px;
  text-align: center;
  border: 1px solid var(--page-line);
  border-radius: var(--page-radius-lg);
  background: var(--page-panel);
  box-shadow: var(--page-shadow);
}

.preview-stack {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.preview-stack img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  display: block;
  margin-left: -10px;
  border: 3px solid var(--page-panel);
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, .16);
}

.preview-stack img:first-child {
  margin-left: 0;
}

.new-game-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.new-game-grid .game-card-actions {
  padding-top: 4px;
}

.editorial-hero {
  padding-top: clamp(58px, 7vw, 100px);
  padding-bottom: clamp(34px, 5vw, 70px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--page-soft) 70%, transparent), transparent);
}

.editorial-hero-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  color: var(--page-muted);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.editorial-hero-grid {
  grid-template-columns: 1.08fr .92fr;
  align-items: end;
}

.editorial-hero-lead {
  font-size: clamp(1.08rem, 1.5vw, 1.28rem);
  max-width: 760px;
}

.article-layout {
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
}

.toc-card {
  position: sticky;
  top: 24px;
  align-self: start;
  display: grid;
  gap: 10px;
}

.toc-card strong {
  color: var(--page-text);
}

.toc-card a {
  color: var(--page-muted);
  text-decoration: none !important;
  font-weight: 750;
}

.toc-card a:hover {
  color: var(--page-accent-2);
}

.article-body .game-section {
  border: 1px solid var(--page-line);
  border-radius: var(--page-radius-lg);
  padding: clamp(26px, 4vw, 50px);
  margin-bottom: 22px;
  background: var(--page-panel);
  box-shadow: var(--page-shadow-soft);
}

.tips-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tips-grid p,
.check-list li {
  position: relative;
}

.tips-grid p {
  margin: 0;
  padding: 18px 18px 18px 46px;
  border-radius: 18px;
  background: var(--page-soft);
}

.tips-grid p::before {
  content: "✓";
  position: absolute;
  left: 16px;
  top: 16px;
  color: var(--page-accent-2);
  font-weight: 950;
}

.check-list {
  padding-left: 1.1rem;
  color: var(--page-muted);
}

.check-list li {
  margin-bottom: .65rem;
}

.plain-hero {
  min-height: 400px;
  display: grid;
  align-content: center;
  padding-top: clamp(58px, 7vw, 100px);
  padding-bottom: clamp(46px, 6vw, 88px);
  border-bottom: 1px solid var(--page-line);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--page-panel-2) 40%, transparent), transparent 68%),
    var(--page-bg);
}

.plain-hero h1 {
  max-width: 14ch;
}

.plain-hero p:not(.eyebrow) {
  max-width: 820px;
  font-size: clamp(1.04rem, 1.45vw, 1.23rem);
}

.contact-grid .contact-card:nth-child(2) {
  background: linear-gradient(180deg, color-mix(in srgb, var(--page-panel) 78%, var(--page-panel-2)), var(--page-panel));
}

.policy-copy {
  width: calc(100% - (var(--page-gutter) * 2));
  margin-left: var(--page-gutter);
  margin-right: var(--page-gutter);
  padding: clamp(28px, 5vw, 64px);
}

.policy-copy h2 {
  max-width: none;
  margin-top: 2rem;
  font-size: clamp(1.45rem, 2.2vw, 2.3rem);
}

.policy-copy h2:first-child {
  margin-top: 0;
}

.article-shell {
  max-width: none;
  padding-top: clamp(44px, 6vw, 84px);
  padding-bottom: clamp(56px, 7vw, 110px);
}

.hero-image {
  width: min(1120px, calc(100% - (var(--page-gutter) * 2)));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--page-line);
  border-radius: 0 44px 0 44px;
  background: var(--page-panel);
  box-shadow: var(--page-shadow);
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.prose {
  width: min(1040px, calc(100% - (var(--page-gutter) * 2)));
  margin: -34px auto 0;
  padding: clamp(28px, 5vw, 66px);
  position: relative;
  z-index: 2;
}

.prose .title time,
.prose .date {
  color: var(--page-muted);
  font-weight: 800;
}

.prose h1 {
  max-width: 15ch;
  font-size: clamp(2.1rem, 5vw, 5rem);
}

.prose h2 {
  max-width: none;
  margin-top: 2.1rem;
  font-size: clamp(1.45rem, 2.8vw, 2.7rem);
}

.prose ul {
  padding-left: 1.2rem;
  color: var(--page-muted);
}

.prose hr {
  border: 0;
  height: 1px;
  margin: 24px 0;
  background: var(--page-line);
}

.mast79-hidden-index .plain-hero {
  min-height: 60vh;
}

@media (max-width: 1180px) {
  .game-grid,
  .new-game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mast79-home .game-grid .game-card:first-child {
    grid-column: span 1;
  }

  .section-heading {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 940px) {
  .game-hero--split,
  .directory-hero,
  .editorial-hero-grid,
  .content-grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .game-hero {
    min-height: auto;
  }

  .game-hero-visual {
    min-height: 430px;
    border-radius: var(--page-radius-lg);
  }

  .feature-grid,
  .guide-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toc-card {
    position: static;
  }
}

@media (max-width: 720px) {
  :root {
    --page-gutter: 18px;
  }

  .mast79-page h1 {
    font-size: clamp(2.25rem, 12vw, 4rem);
  }

  .game-grid,
  .new-game-grid,
  .feature-grid,
  .guide-grid,
  .contact-grid,
  .tips-grid {
    grid-template-columns: 1fr;
  }

  .game-hero,
  .directory-hero,
  .editorial-hero,
  .plain-hero,
  .content-section,
  .game-section,
  .article-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-logo-card {
    width: 250px;
    height: 250px;
    border-radius: 38px;
  }

  .game-app-logo {
    width: 210px;
    height: 210px;
  }

  .hero-status {
    display: grid;
  }

  .hero-status span {
    text-align: left;
  }

  .game-card-actions {
    flex-direction: column;
  }

  .game-card-action,
  .game-card-details {
    width: 100%;
  }

  .policy-copy,
  .hero-image,
  .prose {
    width: calc(100% - 32px);
    margin-left: 16px;
    margin-right: 16px;
  }

  .prose {
    margin-top: 16px;
  }

  .editorial-hero-top {
    display: grid;
  }
}

/* Fix: article feature blocks must keep a readable contrast in Quark2 light mode.
   The article card rule appears later in the stylesheet and can override the
   dark feature block background, leaving pale text on a light panel. */
.mast79-page .article-body .game-section.game-section--dark {
  color: #fff !important;
  background:
    radial-gradient(circle at 88% 12%, color-mix(in srgb, var(--page-accent) 28%, transparent), transparent 24rem),
    linear-gradient(135deg, #101511, #203026 62%, #122018) !important;
  border-color: rgba(255, 255, 255, .18) !important;
  box-shadow: 0 22px 54px rgba(12, 25, 16, .24) !important;
}

.mast79-page .article-body .game-section.game-section--dark h2,
.mast79-page .article-body .game-section.game-section--dark h3,
.mast79-page .article-body .game-section.game-section--dark strong {
  color: #fff !important;
}

.mast79-page .article-body .game-section.game-section--dark p,
.mast79-page .article-body .game-section.game-section--dark li,
.mast79-page .article-body .game-section.game-section--dark .check-list {
  color: rgba(255, 255, 255, .86) !important;
}

.mast79-page .article-body .game-section.game-section--dark .check-list li::marker {
  color: var(--page-accent-2);
}
