/* Game zones — each game's section has its own chrome and palette.
   The default theme is derived from --z-hue (set per game on <body>); a game can restyle
   everything by overriding these tokens in static/zones/<slug>/theme.css under .zone-<slug>. */

.zone {
  --shell: hsl(var(--z-hue) 60% 38%);
  --shell-hi: hsl(var(--z-hue) 72% 64%);
  --shell-lo: hsl(var(--z-hue) 70% 26%);
  --shell-ink: #ffffff;
  --cursor: hsl(var(--z-hue) 85% 50%);
  --cursor-2: hsl(var(--z-hue) 90% 70%);
  --glow: hsl(var(--z-hue) 85% 50% / .35);
  --link: hsl(var(--z-hue) 72% 32%);
  --bg: hsl(var(--z-hue) 30% 95%);
  --bg-stripe: hsl(var(--z-hue) 40% 99% / .7);
  --z-display: var(--font);
  --z-header-bg: linear-gradient(135deg, hsl(var(--z-hue) 62% 44%), hsl(calc(var(--z-hue) + 35) 60% 26%));
  --z-header-ink: #ffffff;
  --z-nav-bg: hsl(var(--z-hue) 30% 99% / .9);
  --z-footer-bg: hsl(var(--z-hue) 32% 15%);
  --z-footer-ink: hsl(var(--z-hue) 25% 88%);
}
@media (prefers-color-scheme: dark) {
  .zone {
    --link: hsl(var(--z-hue) 85% 72%);
    --bg: hsl(var(--z-hue) 22% 8%);
    --bg-stripe: hsl(var(--z-hue) 30% 50% / .03);
    --card: hsl(var(--z-hue) 14% 13%);
    --card-2: hsl(var(--z-hue) 14% 17%);
    --line: hsl(var(--z-hue) 12% 22%);
    --btn-top: hsl(var(--z-hue) 14% 18%);
    --btn-bot: hsl(var(--z-hue) 14% 14%);
    --title-top: hsl(var(--z-hue) 14% 18%);
    --title-bot: hsl(var(--z-hue) 14% 14%);
    --z-nav-bg: hsl(var(--z-hue) 18% 10% / .9);
    --z-footer-bg: hsl(var(--z-hue) 25% 6%);
  }
}

/* Header */
.zone-header { position: relative; overflow: hidden; color: var(--z-header-ink); background: var(--z-header-bg); }
.zone-header::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(255, 255, 255, .2) 0 1.5px, transparent 2px) 0 0 / 20px 20px; pointer-events: none; }
.zone-header > * { position: relative; }
.zone-banner { width: min(1180px, 100% - 32px); margin: 0 auto; padding: 26px 0 22px; display: flex; align-items: center; gap: 20px; }
.zone-brand { display: flex; align-items: center; gap: 16px; min-width: 0; margin-right: auto; color: inherit; text-decoration: none; }
.zone-brand .gicon { width: 68px; height: 68px; font-size: 25px; border: 3px solid rgba(255, 255, 255, .85); border-radius: 19px; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .45); }
.zone-brand-text { display: grid; gap: 2px; min-width: 0; }
.zone-kicker { font-size: .74rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.zone-title { margin: 0; font-family: var(--z-display); font-size: clamp(1.45rem, 3.2vw, 2.3rem); font-weight: 900; line-height: 1.1; letter-spacing: -.015em; text-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.zone-summary { width: min(1180px, 100% - 32px); margin: -6px auto 0; padding: 0 0 24px 84px; font-size: 1.05rem; opacity: .92; }
.zone-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.zone-exit { color: inherit; font-size: .8rem; font-weight: 800; text-decoration: none; opacity: .8; }
.zone-exit:hover { opacity: 1; text-decoration: underline; }

.zone-search { display: flex; align-items: center; width: min(320px, 36vw); height: 40px; padding: 0 4px 0 16px; border-radius: 99px; background: rgba(255, 255, 255, .95); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .15); }
.zone-search:focus-within { box-shadow: 0 0 0 3px rgba(255, 255, 255, .55); }
.zone-search input[type="search"] { flex: 1; min-width: 0; border: 0; background: transparent; color: #2a2f35; font: inherit; font-size: .95rem; outline: none; }
.zone-search input::placeholder { color: #8a939c; }
.zone-search button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--shell); color: var(--shell-ink); cursor: pointer; }

/* Section navigation */
.zone-nav { position: sticky; top: 0; z-index: 50; background: var(--z-nav-bg); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.zone-nav-inner { width: min(1180px, 100% - 32px); height: 54px; margin: 0 auto; display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.zone-nav-inner::-webkit-scrollbar { display: none; }
.zone-nav a { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 8px 15px; border-radius: 99px; color: var(--ink-2); font-weight: 800; font-size: .93rem; text-decoration: none; }
.zone-nav a:hover { background: var(--card-2); color: var(--ink); }
.zone-nav a[aria-current] { background: var(--shell); color: var(--shell-ink); }
.zone-nav-search { margin-left: auto; }

.zone .crumbs a { max-width: 46vw; }
.zone .toc-col, .zone .side-col { top: 70px; }
html:has(.zone) { scroll-padding-top: 70px; }

/* Footer */
.zone-footer { margin-top: 40px; color: var(--z-footer-ink); background: var(--z-footer-bg); }
.zone-footer a { color: inherit; }
.zone-footer-inner { width: min(1180px, 100% - 32px); margin: 0 auto; padding: 30px 0 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 22px 40px; }
.zone-footer-brand { display: flex; gap: 14px; max-width: 520px; }
.zone-footer-brand strong { font-family: var(--z-display); font-size: 1.1rem; }
.zone-footer-brand p { margin: 4px 0 0; opacity: .75; font-size: .92rem; }
.zone-footer-links { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px 20px; font-weight: 800; font-size: .92rem; }
.zone-footer-links a { text-decoration: none; }
.zone-footer-links a:hover { text-decoration: underline; }
.zone-footer-base { width: min(1180px, 100% - 32px); margin: 0 auto; padding: 14px 0 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .84rem; opacity: .8; }
.zone-footer-base a { font-weight: 800; }

@media (max-width: 640px) {
  .zone-banner { padding: 18px 0 16px; gap: 12px; }
  .zone-brand .gicon { width: 52px; height: 52px; font-size: 19px; border-radius: 15px; }
  .zone-search { display: none; }
  .zone-summary { padding-left: 0; margin-top: 0; padding-bottom: 18px; font-size: .98rem; }
  .zone-nav-inner { height: 50px; }
}
