@font-face {
  font-family: "Showclick";
  src: url("fonts/Showclick-2v5RX.otf") format("opentype"),
       url("fonts/Showclick-vn7LL.ttf") format("truetype");
  font-display: swap;
}

:root {
  --paper: #fff8ea;
  --surface: #fffefd;
  --ink: #27221f;
  --muted: #716861;
  --line: #27221f;
  --orange: #e65f3f;
  --orange-dark: #bb472f;
  --mint: #8fd14f;
  --lemon: #ffd95c;
  --rose: #f5b3bd;
  --blue: #9dc9e8;
  --shadow: 5px 5px 0 #27221f;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100svh;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(39, 34, 31, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(39, 34, 31, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 36px 36px;
  color: var(--ink);
  font-family: "Trebuchet MS", Verdana, system-ui, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

img {
  max-width: 100%;
}

.top-strip,
.bottom-strip {
  flex: 0 0 auto;
  overflow: hidden;
  background: var(--orange);
  color: white;
}

.top-strip {
  border-bottom: 3px solid var(--line);
}

.bottom-strip {
  border-top: 3px solid var(--line);
}

.bottom-strip .marquee-row {
  animation-direction: reverse;
}

.marquee-row {
  display: flex;
  width: max-content;
  animation: marquee 22s linear infinite;
  font-size: 0.86rem;
  font-weight: 800;
}

.marquee-content {
  display: flex;
  gap: 1.5rem;
  padding: 0.55rem 1.5rem 0.55rem 0;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 70px;
  padding: 0.75rem clamp(1rem, 4vw, 2rem);
  border-bottom: 3px solid var(--line);
  background: rgba(255, 254, 253, 0.96);
  backdrop-filter: blur(12px);
}

.header-logo {
  display: inline-flex;
  width: 116px;
  flex: 0 0 auto;
}

.header-logo img,
.logo {
  display: block;
  height: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 3vw, 1.6rem);
  color: var(--muted);
  font-weight: 800;
}

.main-nav a {
  border-bottom: 2px solid transparent;
  padding-bottom: 0.12rem;
}

.main-nav a[aria-current="page"],
.main-nav a:hover {
  color: var(--ink);
  border-color: var(--orange);
}

.nav-disabled {
  border-bottom: 2px solid transparent;
  color: rgba(113, 104, 97, 0.58);
  cursor: default;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.guest-pill,
.status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.58rem;
  font-size: 0.76rem;
  font-weight: 900;
}

.guest-pill {
  background: #fffdf8;
  color: var(--ink);
  white-space: nowrap;
}

.status-badge.playable {
  background: var(--mint);
}

.status-badge.quiet {
  background: #fffdf8;
  color: var(--muted);
}

.status-badge.disabled {
  background: #ece8df;
  color: #857c75;
  border-color: rgba(39, 34, 31, 0.38);
}

.home-shell,
.page-shell {
  width: calc(100% - 2rem);
  max-width: 1180px;
  margin: 0 auto;
  flex: 1 0 auto;
}

.home-shell {
  display: grid;
  place-items: center;
  padding: clamp(2rem, 7vw, 5rem) 0;
}

.signup-card,
.panel,
.game-card {
  min-width: 0;
  border: 3px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.signup-card {
  width: min(100%, 470px);
  padding: clamp(1.25rem, 6vw, 2rem);
}

.logo-wrap {
  display: flex;
  width: min(240px, 75%);
  margin: 0 auto 1.4rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--orange-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.signup-card h1 {
  font-size: clamp(2rem, 8vw, 3.25rem);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

h3 {
  margin-bottom: 0.35rem;
  font-size: 1.12rem;
  line-height: 1.15;
}

.lede {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.guest-mode-note {
  border: 2px solid rgba(39, 34, 31, 0.28);
  border-radius: 8px;
  background: #fffdf8;
  margin: 1.1rem 0;
  padding: 0.8rem;
}

.guest-mode-note strong {
  display: block;
  margin-bottom: 0.2rem;
}

.guest-mode-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.4;
}

.form-stack {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.38rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: #fffdf8;
  color: var(--ink);
  padding: 0.65rem 0.75rem;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(230, 95, 63, 0.16);
}

.checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  color: var(--ink);
}

.checkbox-row input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--orange);
}

.button-primary,
.button-quiet,
.button-danger {
  min-height: 42px;
  border-radius: 6px;
  border: 2px solid var(--line);
  padding: 0.65rem 1rem;
  font-weight: 900;
}

.button-primary {
  background: var(--orange);
  color: white;
  box-shadow: 3px 3px 0 var(--line);
}

.button-primary:hover {
  background: var(--orange-dark);
}

.button-quiet {
  background: #fffdf8;
  color: var(--ink);
}

.button-danger {
  background: #ffe8e8;
  color: #9f1f22;
}

.small {
  min-height: 34px;
  padding: 0.45rem 0.75rem;
  font-size: 0.86rem;
}

.form-message {
  min-height: 1.25rem;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.form-message.success {
  color: #276516;
}

.form-message.error,
.empty-state.error {
  color: #9f1f22;
}

.turnstile-shell {
  display: grid;
  gap: 0.35rem;
  min-height: 86px;
  min-width: 0;
}

#turnstile-widget {
  min-height: 65px;
}

.turnstile-shell iframe {
  max-width: 100%;
}

.turnstile-shell p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.card-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font-weight: 800;
}

.card-links a:hover {
  color: var(--ink);
}

.cookie-panel {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 20;
  display: grid;
  gap: 0.8rem;
  width: min(360px, calc(100% - 2rem));
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.cookie-panel[hidden] {
  display: none;
}

.cookie-panel p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.cookie-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.page-shell {
  padding: clamp(1.5rem, 5vw, 3rem) 0 2rem;
}

.page-heading {
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.page-heading.compact {
  margin-bottom: 1.4rem;
}

.section-title-row,
.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.search-box {
  width: min(320px, 100%);
}

.compact-search {
  width: min(260px, 100%);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.game-card {
  overflow: hidden;
}

.game-card[href]:focus-visible {
  outline: 4px solid var(--orange);
  outline-offset: 4px;
}

.no-image-poster {
  display: grid;
  place-items: center;
  min-height: 156px;
  border-bottom: 3px solid var(--line);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.9), transparent 28%),
    linear-gradient(135deg, var(--lemon), var(--rose) 48%, var(--blue));
}

.poster-fruit {
  font-size: 4rem;
  line-height: 1;
  filter: drop-shadow(3px 4px 0 rgba(39, 34, 31, 0.18));
}

.poster-label {
  margin-top: -0.9rem;
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  padding: 0.25rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 1000;
}

.game-card-body {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.creator,
.admin-details p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.playing-count {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 900;
}

.tag {
  display: inline-flex;
  width: fit-content;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 900;
}

.tag.web {
  background: var(--mint);
}

.tag.native {
  background: var(--lemon);
}

.experience-page {
  display: grid;
  gap: clamp(1.4rem, 4vw, 2.2rem);
}

.experience-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 340px);
  gap: clamp(1rem, 4vw, 2rem);
  align-items: start;
  padding: clamp(1.2rem, 4vw, 1.6rem) 0 0;
}

.experience-copy h1 {
  margin-bottom: 0.8rem;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.play-panel,
.server-panel {
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.mode-kicker {
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.play-now {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

.guest-note {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.4;
}

.experience-section {
  display: grid;
  gap: 1rem;
}

.split-section {
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  align-items: start;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.mode-card {
  display: grid;
  gap: 0.65rem;
  min-height: 186px;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 3px 3px 0 var(--line);
  padding: 1rem;
}

.mode-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.42;
}

.mode-card.unavailable {
  border-color: rgba(39, 34, 31, 0.32);
  background: #f2eee6;
  box-shadow: none;
  color: #81786f;
}

.mode-card.unavailable h3,
.mode-card.unavailable p {
  color: #81786f;
}

.mode-action {
  align-self: end;
  width: fit-content;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: var(--orange);
  color: white;
  padding: 0.42rem 0.7rem;
  font-weight: 900;
}

.mode-action.disabled {
  border-color: rgba(39, 34, 31, 0.3);
  background: #ddd7cc;
  color: #82796f;
}

.empty-server strong {
  display: block;
  margin-bottom: 0.3rem;
}

.empty-server p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.notes-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notes-list li {
  border-left: 5px solid var(--orange);
  background: rgba(255, 253, 248, 0.78);
  padding: 0.7rem 0.8rem;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.42;
}

.build-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0;
}

.build-table div {
  border: 2px solid rgba(39, 34, 31, 0.24);
  border-radius: 6px;
  background: rgba(255, 253, 248, 0.82);
  padding: 0.7rem;
}

.build-table dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.build-table dd {
  margin: 0.22rem 0 0;
  overflow-wrap: anywhere;
  font-weight: 900;
}

.report-section {
  grid-template-columns: minmax(240px, 0.38fr) minmax(0, 1fr);
  align-items: start;
  border-top: 3px solid rgba(39, 34, 31, 0.16);
  padding-top: 1.2rem;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.launch-prompt {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(39, 34, 31, 0.38);
}

.launch-prompt[hidden] {
  display: none;
}

.launch-dialog {
  position: relative;
  width: min(430px, calc(100vw - 2rem));
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 7px 7px 0 var(--line);
  padding: 1.2rem;
  overflow-wrap: anywhere;
}

.launch-dialog h2 {
  margin-bottom: 0.65rem;
}

.launch-dialog p {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.42;
}

.prompt-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 34px;
  height: 34px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: #fffdf8;
  font-weight: 900;
}

.prompt-modes {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.prompt-modes span {
  border: 2px solid rgba(39, 34, 31, 0.28);
  border-radius: 6px;
  background: #f2eee6;
  color: #81786f;
  padding: 0.5rem 0.65rem;
  font-size: 0.86rem;
  font-weight: 900;
}

.empty-state {
  border: 3px dashed rgba(39, 34, 31, 0.35);
  border-radius: var(--radius);
  margin: 0;
  padding: 1rem;
  color: var(--muted);
  font-weight: 900;
}

.admin-shell {
  max-width: 1240px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 1.25rem;
  align-items: start;
}

.panel {
  padding: clamp(0.9rem, 2.4vw, 1.15rem);
}

.roster-panel {
  min-width: 0;
}

.admin-list {
  display: grid;
  gap: 0.8rem;
}

.admin-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: #fffdf8;
  padding: 0.75rem;
}

.admin-marker {
  display: grid;
  place-items: center;
  width: 52px;
  aspect-ratio: 1;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(135deg, var(--lemon), var(--blue));
  font-size: 1.8rem;
}

.admin-details {
  min-width: 0;
}

.admin-details h3,
.admin-details p {
  overflow-wrap: anywhere;
}

.admin-actions {
  display: flex;
  gap: 0.45rem;
}

.site-footer {
  flex: 0 0 auto;
  margin-top: auto;
  border-top: 3px solid var(--line);
  background: var(--orange);
  color: white;
  padding: 0.9rem clamp(1rem, 4vw, 2rem);
}

.footer-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
}

.footer-brand {
  font-family: "Showclick", "Cooper Black", "Trebuchet MS", system-ui, sans-serif;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: 2px 2px 0 var(--line);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.88rem;
  font-weight: 800;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-copy {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 800;
}

@media (max-width: 820px) {
  .section-title-row,
  .footer-inner {
    align-items: stretch;
  }

  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem 1rem;
    padding: 0.7rem 1rem;
  }

  .header-logo {
    width: 110px;
  }

  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: start;
    gap: 1.4rem;
    overflow-x: auto;
    padding-top: 0.1rem;
  }

  .site-header > .button-primary,
  .site-header > .button-quiet,
  .header-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .section-title-row,
  .admin-grid,
  .footer-inner {
    grid-template-columns: 1fr;
    display: grid;
  }

  .admin-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .experience-hero,
  .split-section,
  .report-section,
  .mode-grid,
  .build-table {
    grid-template-columns: 1fr;
  }

  .admin-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

@media (max-width: 520px) {
  .home-shell,
  .page-shell,
  .admin-shell {
    width: min(358px, calc(100% - 2rem));
    margin-left: 1rem;
    margin-right: 0;
  }

  .site-header {
    grid-template-columns: minmax(0, min(358px, calc(100vw - 2rem)));
    justify-content: start;
  }

  .site-header > .button-primary,
  .site-header > .button-quiet,
  .header-actions {
    grid-column: 1;
    grid-row: 3;
    justify-self: stretch;
  }

  .header-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .main-nav {
    grid-column: 1;
    grid-row: 2;
  }

  .signup-card,
  .panel,
  .game-card {
    box-shadow: 2px 2px 0 var(--line);
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .game-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .cookie-panel {
    left: 1rem;
    right: auto;
    width: min(358px, calc(100% - 2rem));
  }

  .cookie-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .admin-grid {
    gap: 1rem;
  }

  .form-stack {
    gap: 0.8rem;
  }

  .launch-dialog {
    width: min(330px, calc(100vw - 4rem));
    padding: 0.95rem;
    box-shadow: 2px 2px 0 var(--line);
  }

  .launch-dialog h2 {
    padding-right: 2.2rem;
  }

  .launch-dialog .play-now {
    width: 100%;
  }

  input,
  select {
    min-height: 40px;
  }
}
