:root {
  --gf-ink: #101c35;
  --gf-ink-soft: #5f587c;
  --gf-purple: #5724dd;
  --gf-purple-dark: #2b0d95;
  --gf-violet: #9d55ff;
  --gf-magenta: #d000f4;
  --gf-yellow: #ffc94a;
  --gf-mint: #1ee0b2;
  --gf-cloud: #f5f3fb;
  --gf-line: #e5dff2;
  --gf-white: #fff;
  --gf-danger: #d9365b;
  --gf-stage: linear-gradient(120deg, #140091 0%, #6b00f5 54%, #d000f4 100%);
  --gf-stage-soft: linear-gradient(145deg, #4520bb, #7a2aec);
  --gf-radius-sm: 10px;
  --gf-radius: 18px;
  --gf-radius-lg: 28px;
  --gf-shadow: 0 18px 46px rgba(43, 13, 149, .14);
  --gf-shadow-hover: 0 24px 56px rgba(43, 13, 149, .22);

  --ast-global-color-0: var(--gf-purple);
  --ast-global-color-1: var(--gf-purple-dark);
  --ast-global-color-2: var(--gf-ink);
  --ast-global-color-3: var(--gf-ink);
  --ast-global-color-4: var(--gf-white);
  --ast-global-color-5: var(--gf-cloud);
  --ast-global-color-6: #ebe7f5;
  --ast-global-color-7: #f9f8fc;
  --ast-global-color-8: var(--gf-ink);
}

html { scroll-behavior: smooth; }

body {
  color: var(--gf-ink);
  background:
    radial-gradient(circle at 100% 0, rgba(157, 85, 255, .09), transparent 31rem),
    var(--gf-cloud);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title {
  color: var(--gf-ink);
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 750;
  letter-spacing: -.025em;
}

h1, .entry-content h1 { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.03; }
h2, .entry-content h2 { font-size: clamp(1.7rem, 3.5vw, 2.65rem); line-height: 1.13; }
h3, .entry-content h3 { font-size: clamp(1.18rem, 2.4vw, 1.55rem); line-height: 1.25; }

a { color: var(--gf-purple); text-underline-offset: .16em; }
a:hover, a:focus { color: var(--gf-purple-dark); }

::selection { color: var(--gf-white); background: var(--gf-purple); }

.site-header {
  position: relative;
  z-index: 20;
  background: var(--gf-stage);
  box-shadow: 0 10px 30px rgba(31, 0, 115, .18);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 78% 15%, rgba(255,255,255,.14) 0 9rem, transparent 9.1rem);
}

.site-header .site-title a,
.site-header .site-description,
.site-header .main-header-menu > .menu-item > .menu-link,
.site-header .ast-header-social-wrap a,
.site-header .ast-menu-toggle,
.site-header .ast-mobile-menu-trigger-minimal {
  color: var(--gf-white) !important;
}

.site-header .custom-logo-link img {
  filter: drop-shadow(0 8px 16px rgba(20, 0, 90, .28));
}

.site-header .main-header-menu > .menu-item > .menu-link {
  border-radius: 999px;
  font-weight: 700;
  transition: background .2s ease, transform .2s ease;
}

.site-header .main-header-menu > .menu-item > .menu-link:hover,
.site-header .main-header-menu > .menu-item > .menu-link:focus,
.site-header .main-header-menu > .current-menu-item > .menu-link,
.site-header a[aria-current="page"] {
  color: var(--gf-white) !important;
  background: rgba(255,255,255,.16) !important;
  transform: translateY(-1px);
}

.gamefinder-welcome-banner a {
  color: #342300 !important;
  background: var(--gf-yellow) !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: 0 8px 20px rgba(255, 201, 74, .26);
}

.gamefinder-secondary-menu {
  border: 0 !important;
  background: rgba(22, 4, 88, .94) !important;
}

.gamefinder-secondary-menu-inner { min-height: 48px; align-items: center; }

.gamefinder-secondary-menu a {
  padding: 5px 11px;
  color: rgba(255,255,255,.76) !important;
  border-radius: 999px;
  font-size: .9rem;
}

.gamefinder-secondary-menu a:hover,
.gamefinder-secondary-menu a:focus,
.gamefinder-secondary-menu a[aria-current="page"] {
  color: var(--gf-white) !important;
  background: rgba(255,255,255,.12);
}

.site-content { padding-block: clamp(36px, 6vw, 84px); }
.ast-container { max-width: 1200px; }

.ast-plain-container .ast-article-single,
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post,
.error404 .site-main {
  padding: clamp(25px, 5vw, 58px);
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(91, 33, 182, .09);
  border-radius: var(--gf-radius-lg);
  box-shadow: var(--gf-shadow);
}

.entry-header { margin-bottom: clamp(24px, 4vw, 44px); }

.entry-title {
  position: relative;
  margin: 0;
  padding-top: 16px;
}

.entry-title::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 62px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gf-yellow), var(--gf-mint));
}

.entry-content > h2:not(:first-child),
.entry-content > h3:not(:first-child) { margin-top: 1.65em; }

.entry-content > p,
.entry-content > ul,
.entry-content > ol { max-width: 76ch; }

.entry-content li { margin-bottom: .45em; }

.entry-content blockquote {
  margin-inline: 0;
  padding: 20px 24px;
  color: var(--gf-ink);
  background: #f0ebff;
  border: 0;
  border-left: 6px solid var(--gf-violet);
  border-radius: 0 var(--gf-radius) var(--gf-radius) 0;
}

button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.button,
.ast-button,
.wp-element-button,
.wp-block-button__link {
  min-height: 44px;
  padding: .72rem 1.35rem;
  color: #342300 !important;
  background: var(--gf-yellow) !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: 0 8px 20px rgba(255, 201, 74, .22);
  font-weight: 850;
  line-height: 1.2;
  text-decoration: none !important;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
.button:hover,
.ast-button:hover,
.wp-element-button:hover,
.wp-block-button__link:hover {
  color: #342300 !important;
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 12px 26px rgba(255, 201, 74, .32);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(30, 224, 178, .78) !important;
  outline-offset: 3px;
}

label { color: var(--gf-ink); font-size: .9rem; font-weight: 750; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: .7rem .88rem;
  color: var(--gf-ink);
  background: #f7f5fc;
  border: 1px solid var(--gf-line) !important;
  border-radius: var(--gf-radius-sm) !important;
  box-shadow: inset 0 1px 2px rgba(43, 13, 149, .035);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input:focus,
select:focus,
textarea:focus {
  background: var(--gf-white);
  border-color: var(--gf-violet) !important;
  box-shadow: 0 0 0 4px rgba(157, 85, 255, .13);
}

input[type="checkbox"],
input[type="radio"] { accent-color: var(--gf-purple); }

form > p,
.gamefinder-register-form form > div,
.gamefinder-code-login > div { margin-bottom: 18px; }

.gamefinder-register-form,
.gamefinder-code-login,
.gamefinder-login-required,
.gamefinder-calendar form,
.gamefinder-view-locations section,
[class*="gamefinder-"] form,
[class*="gamefinder-"] .gamefinder-card,
[class*="gamefinder-"] .game-card,
[class*="gamefinder-"] .location-card {
  padding: clamp(20px, 4vw, 32px);
  background: var(--gf-white);
  border: 1px solid var(--gf-line);
  border-radius: var(--gf-radius);
  box-shadow: 0 12px 32px rgba(43, 13, 149, .08);
}

.gamefinder-register-form,
.gamefinder-code-login,
.gamefinder-login-required { max-width: 620px; }

/* Plugin login gate used by Start Game, Join a Game, My Gamefinder and settings. */
.gamefinder-login-modal-backdrop {
  background:
    radial-gradient(circle at 78% 16%, rgba(157, 85, 255, .22), transparent 24rem),
    rgba(16, 4, 68, .82) !important;
  backdrop-filter: blur(5px);
}

.gamefinder-login-modal {
  width: min(calc(100vw - 32px), 470px) !important;
  padding: 30px !important;
  overflow: hidden;
  color: var(--gf-ink) !important;
  background: var(--gf-white) !important;
  border: 1px solid rgba(255, 255, 255, .4) !important;
  border-top: 10px solid var(--gf-purple) !important;
  border-radius: 24px !important;
  box-shadow: 0 28px 80px rgba(13, 0, 64, .48) !important;
}

.gamefinder-login-modal::before {
  content: "GAMEFINDER";
  display: block;
  margin-bottom: 8px;
  color: var(--gf-purple);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
}

.gamefinder-login-modal h1,
.gamefinder-login-modal h2,
.gamefinder-login-modal h3 {
  margin-top: 0 !important;
  color: var(--gf-ink) !important;
}

.gamefinder-login-modal form {
  margin: 18px 0 14px;
  padding: 22px !important;
  background: linear-gradient(145deg, #f9f7ff, #f2edff) !important;
  border: 1px solid var(--gf-line) !important;
  border-radius: 18px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 12px 30px rgba(43,13,149,.08) !important;
}

.gamefinder-login-modal input[type="submit"] {
  width: 100%;
  margin-top: 8px;
}

.gamefinder-login-modal a { font-weight: 700; }

/* Route-level application shells. These pages use plugin markup rather than
   ordinary WordPress article content when the visitor is signed in. */
body.page-id-35 .entry-content,
body.post-type-archive-gamefinder #primary,
body.post-type-archive-gamefinder .site-main {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
}

body.page-id-35 .entry-content > :is(div, section, form),
body.post-type-archive-gamefinder :is(.gamefinder-app, .gamefinder-games, .gamefinder-list, .gamefinder-filters, .gamefinder-game-card, .game-card),
.gamefinder-start-game,
.gamefinder-new-game,
.gamefinder-game-form,
.gamefinder-game-list,
.gamefinder-game-card,
.gamefinder-filters {
  color: var(--gf-ink);
}

.gamefinder-start-game,
.gamefinder-new-game,
.gamefinder-game-form,
.gamefinder-filters {
  padding: clamp(20px, 4vw, 32px) !important;
  background: var(--gf-white) !important;
  border: 1px solid var(--gf-line) !important;
  border-radius: var(--gf-radius) !important;
  box-shadow: var(--gf-shadow) !important;
}

.gamefinder-game-list,
.gamefinder-games,
body.post-type-archive-gamefinder .site-main {
  display: grid;
  gap: 20px;
}

.gamefinder-game-card,
body.post-type-archive-gamefinder article.gamefinder,
body.post-type-archive-gamefinder .type-gamefinder {
  padding: 22px !important;
  background: var(--gf-white) !important;
  border: 1px solid var(--gf-line) !important;
  border-radius: var(--gf-radius) !important;
  box-shadow: 0 12px 32px rgba(43, 13, 149, .09) !important;
  transition: transform .18s ease, box-shadow .18s ease;
}

.gamefinder-game-card:hover,
body.post-type-archive-gamefinder article.gamefinder:hover,
body.post-type-archive-gamefinder .type-gamefinder:hover {
  transform: translateY(-3px);
  box-shadow: var(--gf-shadow-hover) !important;
}

body.page-id-35 .site-content,
body.post-type-archive-gamefinder .site-content {
  background:
    radial-gradient(circle at 90% 8%, rgba(157,85,255,.12), transparent 24rem),
    var(--gf-cloud);
}

/* Authenticated application routes: use the explainer composition itself.
   The route is the purple stage; functional groups sit on white cards. */
body.page-id-35 .ast-article-single {
  position: relative;
  overflow: hidden;
  color: var(--gf-white);
  background:
    radial-gradient(circle at 86% 8%, rgba(255,255,255,.14) 0 12rem, transparent 12.1rem),
    var(--gf-stage) !important;
  border: 0 !important;
  box-shadow: 0 26px 70px rgba(17,0,91,.26) !important;
}

body.page-id-35 .ast-article-single > *,
body.page-id-35 .entry-content { position: relative; z-index: 1; }

body.page-id-35 .entry-title,
body.page-id-35 .entry-title::before,
body.page-id-35 .entry-content > h1,
body.page-id-35 .entry-content > h2,
body.page-id-35 .entry-content > h3,
body.page-id-35 .entry-content > p { color: var(--gf-white) !important; }

body.page-id-35 .entry-title::before { background: linear-gradient(90deg,var(--gf-yellow),var(--gf-mint)); }

body.page-id-35 .entry-content > :is(div, section, form, fieldset),
body.page-id-35 .entry-content > div > :is(section, form, fieldset),
body.page-id-35 .entry-content > div > div:not(:empty) {
  color: var(--gf-ink);
}

body.page-id-35 .entry-content :is(fieldset, .gamefinder-panel, .gamefinder-section, .gamefinder-status, .gamefinder-summary),
body.page-id-35 .entry-content > form,
body.page-id-35 .entry-content > section {
  padding: clamp(18px,3vw,28px) !important;
  background: rgba(255,255,255,.98) !important;
  border: 1px solid rgba(229,223,242,.95) !important;
  border-radius: var(--gf-radius) !important;
  box-shadow: 0 16px 38px rgba(20,0,90,.2) !important;
}

body.page-id-35 .entry-content legend {
  padding-inline: 8px;
  color: var(--gf-purple-dark);
  font-family: "Plus Jakarta Sans",Inter,sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
}

body.page-id-35 .entry-content :is(.status, [class*="needed"], [class*="summary"]) {
  border-radius: 16px !important;
}

body.post-type-archive-gamefinder #primary {
  position: relative;
  overflow: hidden;
  padding: clamp(24px,5vw,54px) !important;
  color: var(--gf-white);
  background:
    radial-gradient(circle at 86% 8%, rgba(255,255,255,.14) 0 12rem, transparent 12.1rem),
    var(--gf-stage) !important;
  border-radius: var(--gf-radius-lg);
  box-shadow: 0 26px 70px rgba(17,0,91,.26);
}

body.post-type-archive-gamefinder #primary :is(.page-title, .archive-title, .ast-archive-title),
body.post-type-archive-gamefinder #primary > h1,
body.post-type-archive-gamefinder .site-main > h1,
body.post-type-archive-gamefinder .site-main > h2,
body.post-type-archive-gamefinder .site-main > p { color: var(--gf-white) !important; }

body.post-type-archive-gamefinder #primary :is(form, fieldset, article, [class*="filter"], [class*="game-card"], [class*="game_item"], [class*="game-item"]) {
  color: var(--gf-ink);
  background: rgba(255,255,255,.98);
  border-color: var(--gf-line);
  border-radius: var(--gf-radius);
}

/* Start-game validation/status panel. */
body.page-id-35 .entry-content :is(form, fieldset, [class*="form"], [class*="panel"], [class*="section"]),
body.page-id-35 .entry-content .gf-neutral-border {
  border-color: #b9a3ff !important;
  border-style: solid !important;
  box-shadow: 0 0 0 3px rgba(157,85,255,.12) !important;
}

body.page-id-35 .entry-content .gf-app-surface,
body.post-type-archive-gamefinder #primary .gf-app-surface {
  color: var(--gf-ink) !important;
  background: linear-gradient(145deg,#fbf9ff,#eee8ff) !important;
  border-color: #d5c8f5 !important;
  box-shadow: 0 14px 34px rgba(20,0,90,.16) !important;
}

body.page-id-35 .entry-content .gf-stage-heading {
  color: var(--gf-white) !important;
  text-shadow: 0 4px 18px rgba(20,0,90,.28);
}

body.page-id-35 .gf-needs-panel {
  padding: 20px !important;
  background: linear-gradient(145deg,#fff,#f8f5ff) !important;
  border: 1px solid var(--gf-line) !important;
  border-left: 6px solid var(--gf-violet) !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 28px rgba(43,13,149,.11) !important;
}

body.page-id-35 .gf-needs-panel :is(h2,h3,h4,strong):first-child {
  color: var(--gf-purple-dark) !important;
}

body.page-id-35 .gf-need-chip {
  display: inline-flex !important;
  align-items: center;
  min-height: 38px;
  margin: 4px 6px 4px 0 !important;
  padding: 7px 14px !important;
  color: var(--gf-purple-dark) !important;
  background: #eee7ff !important;
  border: 1px solid #d7c8ff !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  font-size: .88rem !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
}

body.page-id-35 .gf-need-chip.is-complete {
  color: #075b47 !important;
  background: #cafff2 !important;
  border-color: #8aefd6 !important;
}

body.page-id-35 .entry-content [class*="optional"],
body.page-id-35 .entry-content [class*="complete"],
body.page-id-35 .entry-content [class*="valid"] {
  border-color: #b9a3ff !important;
  border-style: solid !important;
}

body.page-id-35 .entry-content :is(.gf-app-surface,fieldset,form) > :is(h2,h3,h4),
body.post-type-archive-gamefinder #primary .gf-app-surface :is(h2,h3,h4) {
  color: var(--gf-ink) !important;
}

.gamefinder-calendar form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px 20px;
  margin-bottom: 30px;
}

.gamefinder-view-locations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.gamefinder-view-locations > h2,
.gamefinder-view-locations > p { grid-column: 1 / -1; }

.gf-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  margin-block: 24px;
  border: 1px solid var(--gf-line);
  border-radius: var(--gf-radius);
  box-shadow: 0 10px 30px rgba(43, 13, 149, .07);
}

.entry-content table { width: 100%; margin: 0; border: 0; background: var(--gf-white); }
.entry-content th { color: var(--gf-white); background: var(--gf-purple-dark); font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; }
.entry-content th, .entry-content td { padding: 14px 16px; border-color: var(--gf-line); }
.entry-content tbody tr:nth-child(even) { background: #f8f6fc; }

.gamefinder-notice,
.gamefinder-message,
.gamefinder-code-login-message,
.notice,
.alert {
  padding: 14px 17px;
  color: var(--gf-ink);
  background: #e9fff9;
  border: 1px solid rgba(30, 224, 178, .45);
  border-left: 5px solid var(--gf-mint);
  border-radius: var(--gf-radius-sm);
}

.gamefinder-error,
.error,
.alert-error {
  background: #fff0f4;
  border-color: rgba(217, 54, 91, .35);
  border-left-color: var(--gf-danger);
}

.pagination .page-numbers,
.nav-links .page-numbers {
  min-width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  margin: 3px;
  border-radius: 50%;
  background: var(--gf-white);
  box-shadow: 0 5px 16px rgba(43, 13, 149, .1);
}

.pagination .current,
.nav-links .current { color: var(--gf-white); background: var(--gf-purple); }

.site-footer { color: rgba(255,255,255,.74); background: #160458; }
.site-footer a { color: var(--gf-white); }

@media (max-width: 921px) {
  .site-header .ast-mobile-header-wrap .ast-primary-header-bar { background: transparent; }
  .ast-mobile-popup-drawer .ast-mobile-popup-inner { background: var(--gf-purple-dark); }
  .ast-mobile-popup-content .menu-link { color: var(--gf-white) !important; background: transparent !important; }
  .gamefinder-welcome-banner { text-align: left !important; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .site-content { padding-block: 22px; }
  .ast-container { padding-inline: 15px; }
  .ast-plain-container .ast-article-single,
  .ast-separate-container .ast-article-single,
  .ast-separate-container .ast-article-post { padding: 22px 18px; border-radius: 20px; }
  .gamefinder-view-locations { grid-template-columns: 1fr; }
  .gamefinder-view-locations > * { grid-column: 1; }
  .gamefinder-secondary-menu-inner { gap: 5px; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap !important; }
  .gamefinder-secondary-menu a { white-space: nowrap; }
  .gamefinder-login-modal { padding: 23px 18px !important; border-radius: 20px !important; }
  .gamefinder-login-modal form { padding: 18px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
