:root {
  color-scheme: dark;
  /* Match the background rectangle in the supplied studio SVG. */
  --bg: #0a0a0a;
  --panel: #131313;
  --fg: #f5f5f5;
  --muted: #aaa;
  --line: #303030;
  --accent: #dc92f4;
  --button: #bd66de;
  --button-text: #16091d;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--fg);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fafafa;
  --panel: #fff;
  --fg: #202020;
  --muted: #606060;
  --line: #d5d5d5;
  --accent: #78339b;
  --button: #78339b;
  --button-text: #fff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
[hidden] {
  display: none !important;
}
a {
  color: var(--accent);
  text-underline-offset: 4px;
}
a:hover {
  text-decoration-thickness: 2px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  background: var(--fg);
  color: var(--bg);
  padding: 14px;
  z-index: 10;
}
.skip-link:focus {
  top: 12px;
}
.site-header {
  border-bottom: 1px solid var(--line);
}
nav {
  width: min(1040px, calc(100% - 48px));
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
  gap: 16px;
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 32px;
}
.nav-links a {
  color: var(--fg);
  text-decoration: none;
  padding: 12px 0;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 7px;
}
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px;
  background: none;
  border: 0;
  color: var(--fg);
  font-size: 0.85rem;
  line-height: 1;
}
.theme-icon {
  display: block;
  flex: 0 0 20px;
}
.theme-label {
  display: block;
  line-height: 20px;
}
.hero {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px;
}
.hero-inner {
  text-align: center;
}
.studio-logo {
  display: block;
  width: clamp(200px, 38svh, 360px);
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 650;
  line-height: 1.2;
  margin: 0 0 36px;
}
.hero h1 {
  margin: 8px 0 16px;
}
.slogan {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin: 0 0 32px;
}
p {
  line-height: 1.75;
}
.page {
  flex: 1;
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0;
}
.reading-page {
  max-width: 720px;
}
.reading-page p {
  color: var(--muted);
}
.reading-page h2 {
  font-size: 1.25rem;
  margin: 32px 0 12px;
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
}
.game-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.game-art {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
  margin: 0 0 28px;
}
.game-content {
  width: 100%;
}
.game-content h2 {
  margin: 0 0 16px;
  font-size: 1.5rem;
}
.game-content > p {
  color: var(--muted);
  margin: 0 0 24px;
  min-height: 3.5em;
}
.game-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.game-content .link-note {
  min-height: 0;
  margin: 14px 0 0;
  font-size: 0.8rem;
}
.support-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  align-items: start;
  gap: 64px;
}
.support-intro p {
  color: var(--muted);
  margin: 0 0 20px;
}
.support-intro a {
  overflow-wrap: anywhere;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 20px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--fg);
  border-radius: 3px;
  padding: 12px;
  margin-top: 8px;
  min-height: 44px;
}
textarea {
  resize: vertical;
  min-height: 150px;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.3;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: var(--button);
  color: var(--button-text);
  padding: 12px 22px;
  font-weight: 600;
}
.button-secondary {
  background: var(--panel);
  color: var(--fg);
  border-color: var(--line);
}
.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
a.button:hover {
  filter: brightness(1.12);
  text-decoration: none;
}
.about-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-copy > p {
  color: var(--muted);
  max-width: 480px;
  font-size: 1.1rem;
}
.about-github {
  border-top: 1px solid var(--line);
  margin-top: 36px;
  padding-top: 24px;
}
.about-github h2 {
  font-size: 1.1rem;
  margin: 0 0 20px;
}
.github-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.github-link svg {
  flex-shrink: 0;
}
.about-studio {
  margin: 0;
  text-align: center;
}
.about-studio img {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  margin: auto;
}
.about-studio figcaption {
  font-size: 1.2rem;
  margin-top: 16px;
  font-weight: 600;
}
.form-note {
  color: var(--muted);
  font-size: 0.8rem;
}
.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
#form-result {
  color: var(--accent);
  font-size: 0.9rem;
}
#form-result:empty {
  margin: 0;
}
footer {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  justify-content: center;
  color: var(--muted);
  text-align: center;
  gap: 24px;
  padding: 20px 0;
  font-size: 0.8rem;
}
footer small {
  font-size: inherit;
}
.privacy-notice {
  position: fixed;
  bottom: 16px;
  left: 16px;
  width: min(420px, calc(100% - 32px));
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 20px;
  z-index: 5;
}
.privacy-notice strong {
  font-size: 0.9rem;
}
.privacy-notice p {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 8px 0 12px;
}
.privacy-notice button {
  border: 0;
  background: none;
  color: var(--accent);
  padding: 8px 0;
  min-height: 40px;
}
@media (max-width: 700px) {
  nav,
  .page,
  footer {
    width: calc(100% - 32px);
  }
  .nav-links {
    gap: 0 12px;
    font-size: 0.9rem;
  }
  nav {
    gap: 8px;
  }
  .theme-label {
    display: none;
  }
  .theme-toggle {
    min-width: 44px;
    justify-content: center;
  }
  .page {
    padding: 40px 0;
  }
  .game-grid,
  .support-layout,
  .about-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  /* Stacked cards: no column alignment to preserve, so drop the desktop spacing aids. */
  .game-card + .game-card {
    border-top: 1px solid var(--line);
    padding-top: 32px;
  }
  .game-art {
    align-self: center;
    width: 160px;
    margin-bottom: 20px;
  }
  .game-content h2 {
    margin-bottom: 8px;
  }
  .game-content > p {
    min-height: 0;
    margin-bottom: 20px;
  }
  .game-actions .button {
    flex: 1 1 auto;
  }
  .studio-logo {
    width: min(280px, 65vw);
  }
  .hero h1 {
    font-size: 2rem;
  }
}
@media (max-width: 380px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  nav {
    gap: 4px;
  }
  .nav-links {
    gap: 0 5px;
    font-size: 0.8rem;
  }
}
