/* The public homepage and its local season catalogue share the site's theme. */
body.landing-visible > .site-shell { display: none; }
:is(.portal-ui, .site-settings-popover, .portal-season-popover) {
  --home-base: #131313;
  --home-surface: #1c1b1a;
  --home-raised: #252321;
  --home-line: #3c3833;
  --home-ink: #f4f0e9;
  --home-muted: #b9b0a5;
  --home-accent: #edbe89;
  --home-on-accent: #231a12;
  --home-grid: rgb(232 182 128 / .15);
  --home-radius: 16px;
}
.portal-ui {
  --button-highlight: color-mix(in srgb, var(--home-accent) 15%, var(--home-surface));
  --button-pressed: color-mix(in srgb, var(--home-accent) 27%, var(--home-surface));
  --button-highlight-ink: var(--home-accent);
  color: var(--home-ink);
  font: 400 15px/1.55 var(--font-body);
}
.portal-home {
  --portal-gutter: 48px;
  --portal-hero-clearance: clamp(36px, 9vh, 96px);
  --portal-title-gap: clamp(12px, 1.4vw, 20px);
  --portal-summary-gap: clamp(12px, 1.4vw, 20px);
  --portal-actions-gap: clamp(24px, 2.2vw, 32px);
  min-height: calc(100dvh - var(--site-mast-height, 70px));
  display: grid;
  background: var(--home-base);
}
html[data-theme="launch-keynote"] :is(.portal-ui, .site-settings-popover, .portal-season-popover) {
  --home-base: var(--canvas);
  --home-surface: var(--surface);
  --home-raised: var(--raised);
  --home-line: var(--line);
  --home-ink: var(--text);
  --home-muted: var(--secondary);
  --home-accent: #86c4ff;
  --home-on-accent: #08182d;
  --home-grid: rgb(134 196 255 / .19);
  --home-radius: 22px;
}
.portal-ui[hidden], .portal-ui [hidden] { display: none !important; }
.portal-ui a { color: inherit; text-decoration: none; }
.portal-ui button { color: inherit; font: inherit; }
.portal-ui :is(a, button, summary, select, input):focus-visible {
  outline: 2px solid var(--home-accent);
  outline-offset: 3px;
}
.portal-ui :is(svg, i[data-lucide]) { width: 18px; height: 18px; flex: none; }
.portal-ui i[data-lucide]:empty { display: none; }
.portal-wrap { width: min(1200px, calc(100% - 2 * var(--portal-gutter))); margin-inline: auto; }

.portal-mast {
  --portal-bar-width: min(calc(100% - 36px), clamp(920px, calc(75% - 27px), 1320px));
  position: sticky; top: 0; z-index: 45; padding: 12px 0 8px;
  background: var(--home-base);
  display: grid; align-items: center; row-gap: 4px;
  grid-template-columns: minmax(0, 1fr) var(--portal-bar-width) minmax(0, 1fr);
}
.portal-bar {
  --portal-nav-size: 15px;
  grid-column: 2; min-width: 0;
  min-height: 50px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: clamp(12px, 1.4vw, 20px);
  padding: 2px 14px;
  border: 1px solid transparent;
  border-radius: max(20px, calc(var(--home-radius) + 8px));
  background: var(--home-surface);
  box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--home-line) 75%, transparent), 0 12px 32px rgb(0 0 0 / .15);
}
@supports (backdrop-filter: blur(14px)) {
  .portal-bar {
    background: color-mix(in srgb, var(--home-surface) 90%, transparent);
    backdrop-filter: blur(14px);
  }
}
.edition-switch:not([hidden]) {
  display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 6px;
  border: 0; border-radius: 6px; background: transparent; color: var(--home-muted, var(--secondary));
  font: 650 15px/1.2 var(--font-body); white-space: nowrap; cursor: pointer;
}
.portal-edition-switch:not([hidden]) {
  grid-column: 2; justify-self: start; max-inline-size: 100%;
  padding-inline: 10px; text-align: start; white-space: normal; overflow-wrap: anywhere;
}
@media (min-width: 1200px) {
  .portal-bar { grid-row: 1; }
  .portal-edition-switch:not([hidden]) {
    grid-column: 1; grid-row: 1; justify-self: end;
    margin-inline: 12px; max-inline-size: calc(100% - 24px);
  }
}
.site-shell .edition-switch:is(:hover, [aria-expanded="true"]) { color: var(--home-ink, var(--text)); }
.edition-switch:focus-visible { outline: 2px solid var(--home-accent, var(--blue)); outline-offset: -2px; }
.edition-switch :is(svg, i[data-lucide]) { width: 15px; height: 15px; }
.edition-switch[aria-expanded="true"] svg { transform: rotate(180deg); }
.site-settings-popover.edition-popover {
  --edition-width: min(190px, calc(100vw - 24px));
  width: var(--edition-width); padding: 5px; right: auto;
  left: clamp(12px, var(--settings-trigger-left, 12px), calc(100vw - var(--edition-width) - 12px));
}
.edition-popover a {
  display: flex; gap: 12px; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 10px;
  border-radius: 8px; color: var(--home-ink); text-decoration: none; font: 650 15px/1.3 var(--font-body);
}
.edition-popover a:is(:hover, :focus-visible) { background: var(--home-raised); color: var(--home-accent); }
.edition-popover a:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
.edition-popover svg { width: 15px; height: 15px; }
.portal-brand {
  display: flex; flex: none; align-items: center; justify-self: start; gap: 10px; min-width: 44px; min-height: 44px;
  border-radius: calc(var(--home-radius) - 3px);
  white-space: nowrap; font-size: 17px; font-weight: 740; letter-spacing: .02em;
}
.portal-brand b {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: calc(var(--home-radius) - 3px);
  border: 1px solid color-mix(in srgb, var(--home-accent) 53%, var(--home-line));
  color: var(--home-accent);
  background: color-mix(in srgb, var(--home-accent) 10%, var(--home-surface));
  font-size: 21px;
  line-height: 1;
}
.portal-nav, .portal-season-nav, .portal-feature-nav { display: flex; align-items: center; gap: 8px; }
.portal-season-nav { flex-wrap: wrap; justify-content: flex-end; }
.portal-nav, .portal-feature-nav { justify-content: flex-end; }
.portal-nav { gap: 6px; }
.portal-bar .portal-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: max(5px, calc(var(--home-radius) - 5px));
  background: transparent;
  color: var(--home-muted);
  font-size: var(--portal-nav-size);
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}
.portal-nav .portal-icon-control { flex: 0 0 44px; width: 44px; padding: 0; }
:is(.portal-nav, .portal-feature-nav) :is(svg, i[data-lucide]) {
  width: var(--portal-nav-size); height: var(--portal-nav-size);
}
.site-settings-popover.portal-feature-popover { width: min(216px, calc(100% - 24px)); padding: 12px 16px; }
.portal-feature-popover h2 { margin: 0; color: var(--settings-ink); font: 700 16px/1.4 var(--font-body); }
.portal-feature-popover p { margin: 4px 0 0; color: var(--settings-muted); }
.portal-season-nav .portal-season-trigger {
  min-width: 44px;
  border: 0;
}
.portal-season-label { position: relative; line-height: 1.1; }
.portal-season-spatula {
  position: absolute; top: 100%; left: 50%;
  width: 13px; height: 13px;
  transform: translateX(-50%);
  background: currentColor;
  mask: url("/assets/landing/season-spatula.svg") center / contain no-repeat;
  pointer-events: none;
}
.portal-season-badge { font-weight: 400; }
.portal-season-chevron {
  display: grid; place-items: center; flex: none;
  width: var(--portal-nav-size); height: var(--portal-nav-size);
}
.portal-season-chevron::before {
  content: ""; width: 7px; height: 7px;
  border: solid currentColor; border-width: 0 1px 1px 0;
  transform: translateY(-1px) rotate(45deg);
}
.portal-tools { display: contents; }
.portal-bar :is(.portal-compact-season, .portal-menu-toggle), .portal-menu-label { display: none; }
.portal-season-choices {
  display: flex; justify-content: center; margin-bottom: 4px;
  border-bottom: 1px solid var(--home-line);
}
.public-navigation .main-shell { margin-inline-start: 0; }
.public-navigation .context-header { top: var(--site-mast-height); }
.public-navigation .context-header .context-main-row { min-height: 0; padding-block: 6px; }
.public-navigation .context-copy { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; }
.public-navigation .builder-side { top: calc(var(--site-mast-height) + var(--site-context-height, 88px) + 8px); }
html:has(.public-navigation) { scroll-padding-top: calc(var(--site-mast-height) + var(--site-context-height, 0px)); }
:is(.portal-season-trigger, [data-my-entry])[aria-expanded="true"] .portal-season-chevron::before { transform: translateY(2px) rotate(225deg); }
.portal-season-popover {
  position: fixed; inset: auto; margin: 0;
  width: min(176px, calc(100% - 24px)); overflow: auto; overscroll-behavior: contain;
  padding: 8px;
  border: 1px solid var(--home-line); border-radius: calc(var(--home-radius) + 2px);
  background: var(--home-surface);
  color: var(--home-ink);
  font: 400 14px/1.45 var(--font-body);
  box-shadow: 0 18px 52px rgb(0 0 0 / .43);
}
.portal-season-popover:has(.portal-game-choices) { width: min(224px, calc(100% - 24px)); }
.site-settings-popover.portal-player-popover { inset: var(--settings-top, 70px) var(--settings-right, 12px) auto auto; }
.portal-player-popover [hidden] { display: none; }
.portal-season-heading { padding: 6px 8px 10px; border-bottom: 1px solid var(--home-line); margin-bottom: 4px; }
.portal-season-heading h2 { margin: 0; color: var(--home-ink); font: 700 15px/1.4 var(--font-body); }
.portal-season-context { margin: 0 0 4px; color: var(--home-muted); font-size: 12px; }
.portal-season-popover :is(a, button):where(:not([data-season-choice])) {
  display: flex; align-items: center; gap: 10px; min-height: 44px;
  padding: 5px 8px; border: 1px solid transparent; border-radius: max(3px, calc(var(--home-radius) - 7px));
  background: transparent; color: var(--home-ink); font: inherit; text-align: start; text-decoration: none; cursor: pointer;
}
.portal-season-popover :is(a, button):where(:not([data-season-choice])):is(:hover, :active) { background: var(--home-raised); color: var(--home-accent); }
.portal-season-popover :is(a, button):where(:not([data-season-choice])):focus-visible { outline: 2px solid var(--home-accent); outline-offset: -2px; }
.portal-module-list { display: grid; }
.portal-module-list > :is(a, button) > span:not([aria-hidden]) { min-width: 0; overflow-wrap: anywhere; }
.portal-module-arrow { margin-inline-start: auto; padding-inline: 4px; color: var(--home-muted); }
.portal-season-popover svg { width: 16px; height: 16px; flex: none; color: var(--home-accent); }
.portal-season-popover i[data-lucide]:empty { display: none; }
.portal-game-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-block: 9px 2px; }
.portal-game-choices a {
  justify-content: center; text-align: center; overflow-wrap: anywhere;
  border-color: var(--home-line);
}
.portal-season-popover .portal-season-back { width: 100%; margin-top: 4px; color: var(--home-muted); font-size: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .portal-season-popover :is(a, button):where(:not([data-season-choice])) { transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease; }
}

.portal-hero {
  position: relative; isolation: isolate;
  display: grid; place-items: center;
  min-height: 400px;
  padding-block: 40px clamp(64px, 11vh, 112px);
  overflow: hidden;
}
.portal-hero-paper {
  position: absolute; z-index: -2; inset: 15px 0 0;
  background: radial-gradient(ellipse at 50% 26%, color-mix(in srgb, var(--home-accent) 9%, transparent), transparent 65%);
}
.portal-hero-paper::before {
  content: ""; position: absolute; inset: -28% -12% -20%;
  background-image: linear-gradient(var(--home-grid) 1px, transparent 1px), linear-gradient(90deg, var(--home-grid) 1px, transparent 1px);
  background-size: 47px 47px;
  transform: perspective(900px) rotateX(31deg) rotateZ(-9deg);
  mask-image: radial-gradient(ellipse 57% 49% at 50% 54%, transparent 23%, #000 62%, transparent 99%);
}
.portal-hero-paper::after {
  content: ""; position: absolute; inset: 11% 9% 12%;
  background:
    linear-gradient(var(--home-grid),var(--home-grid)) left top / 52px 1px no-repeat,
    linear-gradient(var(--home-grid),var(--home-grid)) left top / 1px 52px no-repeat,
    linear-gradient(var(--home-grid),var(--home-grid)) right bottom / 52px 1px no-repeat,
    linear-gradient(var(--home-grid),var(--home-grid)) right bottom / 1px 52px no-repeat;
}
.portal-hero-video { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; pointer-events: none; object-fit: cover; opacity: .32; mask-image: linear-gradient(0deg, transparent, #000 30%, #000 73%, transparent); }
.portal-hero-copy { display: grid; justify-items: center; min-width: 0; text-align: center; }
.portal-edition {
  display: flex; justify-content: center; align-items: center; gap: 9px;
  min-height: 22px; margin: 0;
  color: var(--home-accent); font-size: 13px; font-weight: 650; letter-spacing: .04em;
}
.portal-edition:not(:empty)::before { content: ""; width: 16px; height: 1px; background: currentColor; }
.portal-hero h1 {
  margin: var(--portal-title-gap) 0 0;
  color: var(--home-ink);
  font: 800 clamp(58px, 7.7vw, 110px)/1.05 var(--font-body);
  letter-spacing: -.065em;
}
.portal-subtitle { margin: var(--portal-summary-gap) 0 0; color: var(--home-muted); font-size: clamp(15px, 1.6vw, 20px); }
.portal-actions { display: flex; justify-self: stretch; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: var(--portal-actions-gap); }
.portal-actions .portal-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  min-width: 0; max-width: 100%; padding: 8px 18px;
  border: 1px solid transparent; border-radius: calc(var(--home-radius) + 6px);
  font-weight: 750; white-space: normal; overflow-wrap: anywhere; cursor: pointer;
}
.portal-actions .portal-cta-main {
  --button-highlight: color-mix(in srgb, var(--home-accent) 70%, white);
  --button-pressed: color-mix(in srgb, var(--home-accent) 85%, black);
  --button-highlight-ink: var(--home-on-accent);
  color: var(--home-on-accent); background: var(--home-accent);
}
.portal-actions .portal-cta-alt { border-color: var(--home-line); background: var(--home-surface); }
.portal-hero-motion {
  position: absolute; bottom: 12px; inset-inline-end: 18px; border: 1px solid var(--home-line);
  border-radius: 7px; padding: 5px 9px; min-height: 44px;
  background: var(--home-surface); color: var(--home-ink); cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .portal-ui :is(a, button):hover {
    background-color: var(--button-highlight); color: var(--button-highlight-ink);
  }
}
.portal-ui :is(a, button):is(:focus-visible, [aria-expanded="true"]),
.portal-ui :where(.portal-feature-nav) :is(a, button)[aria-current="page"] {
  background-color: var(--button-highlight); color: var(--button-highlight-ink);
}
.portal-ui :is(a, button):is(:active, [data-touch-pressed]) {
  background-color: var(--button-pressed); color: var(--button-highlight-ink);
  transition-duration: 0s;
}
@media (prefers-reduced-motion: no-preference) {
  .portal-ui :is(a, button) { transition: background-color 140ms ease, color 140ms ease; }
}

@media (1080px < width <= 1360px) {
  .portal-bar { column-gap: 10px; padding-inline: 10px; }
  .portal-nav, .portal-feature-nav { gap: 4px; }
  .portal-bar .portal-control:not(.portal-icon-control) { padding-inline: 7px; }
}
@media (1080px < width < 1200px) {
  .portal-mast { grid-template-columns: auto minmax(0,1fr); column-gap: 12px; padding-inline: 18px; }
  .portal-edition-switch:not([hidden]) { grid-column: 1; grid-row: 1; max-inline-size: 168px; }
  .portal-bar { grid-row: 1; }
  .portal-edition-switch[hidden] + .portal-bar { grid-column: 1 / -1; }
}
@media (max-width: 1080px) {
  .portal-home { --portal-gutter: 18px; --portal-hero-clearance: 32px; }
  .portal-mast { grid-template-columns: auto minmax(0,1fr); padding: 8px 12px; gap: 8px; }
  .portal-edition-switch:not([hidden]) { grid-column: 1; grid-row: 1; padding-inline: 2px; max-width: min(34vw, 160px); }
  .portal-edition-switch[hidden] + .portal-bar { grid-column: 1 / -1; }
  .portal-bar { grid-row: 1; grid-template-columns: minmax(0,1fr) auto auto; gap: 4px; padding-inline: 8px; }
  .portal-season-nav { display: none; }
  .portal-bar :is(.portal-compact-season,.portal-menu-toggle) { display: inline-flex; min-width: 44px; padding-inline: 6px; }
  .portal-tools[popover],
  .public-navigation:has(#portalTools:popover-open) #siteSettingsPopover {
    inset: var(--site-mast-height) 12px auto auto;
    max-height: calc(100dvh - var(--site-mast-height) - 12px);
  }
  .portal-tools[popover] {
    position: fixed; margin: 0;
    width: min(216px,calc(100vw - 24px)); padding: 6px; overflow-y: auto;
    background: var(--home-surface); color: var(--home-ink); border: 1px solid var(--home-line);
    border-radius: max(8px,var(--home-radius)); box-shadow: 0 8px 24px rgb(0 0 0 / .16);
  }
  .portal-tools:not(:popover-open) { display: none; }
  .portal-tools:popover-open, .portal-tools :is(.portal-nav,.portal-feature-nav) { display: grid; }
  .portal-tools :is(.portal-nav,.portal-feature-nav) { justify-content: stretch; gap: 2px; }
  .portal-tools .portal-nav { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--home-line); }
  .portal-tools .portal-control { width: 100%; justify-content: flex-start; padding-inline: 12px; white-space: normal; text-align: start; }
  .portal-menu-label { display: inline; }
}
@media (max-width: 700px) {
  .portal-home { --portal-hero-clearance: 20px; }
  .portal-hero { min-height: 0; align-items: start; padding-block: clamp(64px, 15vh, 128px) 40px; }
  .portal-actions { gap: 8px; }
  .portal-actions .portal-cta { min-height: 44px; padding-inline: 10px; font-size: 14px; }
  .portal-actions .portal-cta svg { width: 16px; height: 16px; }
}
@media (max-width: 600px) {
  .portal-home { --portal-gutter: 12px; }
  .portal-brand { gap: 6px; font-size: 14px; }
  .portal-brand b { width: 31px; height: 31px; font-size: 18px; }
  .portal-season-chevron { width: 10px; }
  .portal-hero h1 { font-size: clamp(48px, 12.6vw, 75px); }
  .portal-hero-paper::before { background-size: 36px 36px; }
  .portal-actions .portal-cta { flex: 1 1 auto; }
}
@media (max-width: 480px) {
  .portal-brand span { display: none; }
}
@media (max-width: 360px) {
  .portal-mast { grid-template-columns: fit-content(31vw) minmax(0,1fr); padding-inline: 8px; gap: 6px; }
  .portal-edition-switch:not([hidden]) { min-inline-size: 0; max-inline-size: 100%; }
  .portal-bar { padding-inline: 5px; column-gap: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-hero-video { display: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .portal-bar { background: var(--home-surface); backdrop-filter: none; }
}


/* The game switch is scoped to the season displayed in the workspace. */
.context-heading { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; }
.context-copy:has(:is(.zone-switch, .context-game-label):not([hidden])) :is(#contextGame, .context-game-divider) { display:none; }
.context-game-label { color:var(--secondary); font-size:13px; }
.zone-switch:not([hidden]) { display:inline-flex; align-items:center; gap:2px; max-width:100%; padding:3px; border:1px solid var(--line); border-radius:11px; background:var(--canvas); }
.zone-switch a { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:0 12px; border-radius:7px; color:var(--secondary); text-decoration:none; font:600 14px/1.2 var(--font-body); white-space:nowrap; }
.zone-switch a:hover { background:var(--raised); color:var(--text); }
.zone-switch a[aria-current] { background:var(--raised); color:var(--text); box-shadow:inset 0 -2px var(--gold); }
.zone-switch a:focus-visible { outline:2px solid var(--blue); outline-offset:1px; }
.zone-switch a:active { background:var(--line); }
html[data-theme="launch-keynote"] .zone-switch { border-radius:99px; }
html[data-theme="launch-keynote"] .zone-switch a { border-radius:99px; }
html[data-theme="launch-keynote"] .zone-switch a[aria-current] { background:var(--text); color:var(--canvas); box-shadow:none; }

.context-main-row { flex-wrap:wrap; }
.context-main-row #seasonSelect { min-height:44px; }
.context-header .game-workspace-control,.context-header .game-select-control,.sidebar-library-links[hidden] { display:none!important; }
@media (min-width:701px) and (max-width:1200px) {
  .context-main-row .global-controls { grid-template-columns:auto auto auto minmax(110px,1fr); flex:0 1 auto; margin-inline-start:auto; }
}

@media (max-width:600px) {
  .zone-switch a { padding-inline:10px; font-size:13px; }
  .context-main-row .zone-switch a { min-width:0; white-space:normal; text-align:center; }
  .context-main-row .context-copy { min-width:0; }
}
