:root {
  --paper: #f6f1e8;
  --ink: #241c16;
  --ink-soft: #5c5146;
  --moss: #1f4334;
  --moss-deep: #173328;
  --honey: #f0b429;
  --clay: #c46b4a;
  --line: #e4d8c4;
  --card: #fffdf8;
  --ok: #e7f3ea;
  --shadow: 0 22px 50px rgba(55, 36, 18, 0.08);
  --header: 76px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(240, 180, 41, 0.28), transparent 60%),
    radial-gradient(700px 380px at 100% 0%, rgba(47, 125, 96, 0.16), transparent 55%),
    var(--paper);
  font-family: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
.logo-word {
  font-family: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

p {
  margin: 0;
}

button,
input {
  font: inherit;
}

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  transform: translateY(-150%);
  background: var(--ink);
  color: white;
  padding: 8px 12px;
  z-index: 40;
}

.skip-link:focus {
  transform: none;
}

:focus-visible {
  outline: 3px solid var(--honey);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header);
  display: flex;
  align-items: center;
  background: rgba(246, 241, 232, 0.88);
  backdrop-filter: blur(14px);
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 rgba(36, 28, 22, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.logo svg {
  width: 36px;
  height: 36px;
  flex: none;
}

.logo-word {
  font-size: 1.35rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.site-nav a[aria-current="page"] {
  color: var(--moss);
  box-shadow: inset 0 -2px 0 var(--honey);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 0;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  position: relative;
  margin: 0 auto;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.hero {
  position: relative;
  isolation: isolate;
  padding: 28px 0 20px;
}

.hero::before {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: 4%;
  top: 10px;
  border-radius: 50%;
  background: rgba(240, 180, 41, 0.28);
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: 42px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--moss);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.5rem, 5.4vw, 4.5rem);
  max-width: 11em;
}

.hero h1 em {
  font-style: italic;
  font-weight: 560;
  color: var(--moss);
}

.lede {
  max-width: 38rem;
  color: var(--ink-soft);
  font-size: 1.12rem;
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.platforms li {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 0.92rem;
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
}

.button-primary {
  background: var(--moss);
  color: #f7f3ea;
}

.button-primary:hover {
  background: var(--moss-deep);
}

.button-ghost {
  border-color: var(--moss);
  color: var(--moss);
}

.button-ghost:hover {
  background: rgba(31, 67, 52, 0.06);
}

.studio,
.note-card,
.policy-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.studio {
  padding: 22px 22px 26px;
}

.switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.switch {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}

.switch.is-selected {
  background: var(--moss);
  border-color: var(--moss);
  color: #f6f1e8;
}

.studio-panel h2 {
  margin: 0 0 8px;
  font-size: 1.9rem;
}

.studio-panel p,
.note-card p,
.project-card p {
  color: var(--ink-soft);
}

.project-list {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
}

.project-card,
.note-card {
  border-radius: 28px;
  padding: 28px;
  min-height: 240px;
}

.project-card {
  background:
    radial-gradient(circle at 90% 10%, rgba(240, 180, 41, 0.28), transparent 36%),
    var(--moss);
  color: #f6f1e8;
}

.project-card .eyebrow {
  color: var(--honey);
}

.project-card h3,
.note-card h3 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.project-card p {
  color: rgba(246, 241, 232, 0.86);
  max-width: 36rem;
}

.project-card a {
  display: inline-block;
  margin-top: 18px;
  color: var(--honey);
  font-weight: 600;
}

.note-card {
  box-shadow: none;
}

.note-card .eyebrow {
  color: var(--moss);
}

.board {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 22px 20px 18px;
}

.board h2 {
  margin: 0 0 6px;
  font-size: 1.8rem;
}

.board-status {
  min-height: 1.6em;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.board-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.column-label {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.token-list {
  display: grid;
  gap: 10px;
}

.token {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
}

.token:hover:not(:disabled) {
  border-color: #c9b89a;
}

.token-art {
  width: 58px;
  height: 58px;
  flex: none;
  display: grid;
  place-items: center;
}

.token-art svg {
  width: 58px;
  height: 58px;
}

.token-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.token-label {
  font-weight: 600;
}

.token-state {
  color: var(--moss);
  font-size: 0.78rem;
  font-weight: 600;
}

.token-state:empty {
  display: none;
}

.token.is-selected {
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(31, 67, 52, 0.16);
}

.token.is-matched {
  background: var(--ok);
  border-color: #8fb59a;
  cursor: default;
}

.token.is-wrong {
  border-color: var(--clay);
  animation: shake 0.4s ease;
}

.board-reset {
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: var(--moss);
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@keyframes shake {
  0%,
  100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.section {
  padding: 56px 0;
}

.section h2 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.section-intro {
  max-width: 40rem;
  color: var(--ink-soft);
  margin-bottom: 28px;
}

.game-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.game-card-visual {
  background:
    radial-gradient(circle at 20% 20%, rgba(240, 180, 41, 0.35), transparent 40%),
    var(--moss);
  color: #f6f1e8;
  padding: 36px 32px;
  position: relative;
}

.game-card-visual .eyebrow {
  color: var(--honey);
}

.game-card-visual h2 {
  color: #f6f1e8;
  max-width: 8em;
}

.game-card-visual p {
  max-width: 22rem;
  color: rgba(246, 241, 232, 0.86);
}

.sticker {
  position: absolute;
  right: 24px;
  bottom: 24px;
  transform: rotate(-8deg);
  background: var(--honey);
  color: var(--ink);
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.game-card-body {
  padding: 36px 32px;
}

.facts {
  display: grid;
  gap: 14px;
  margin: 22px 0 8px;
  padding: 0;
  list-style: none;
}

.facts li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
}

.fact-index {
  font-family: "Fraunces", Georgia, serif;
  color: var(--clay);
  font-size: 1.3rem;
}

.facts strong {
  display: block;
}

.facts span {
  color: var(--ink-soft);
}

.text-link {
  color: var(--moss);
  font-weight: 600;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.work-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px 22px 26px;
  min-height: 220px;
}

.work-card span {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.8rem;
  color: var(--clay);
  margin-bottom: 18px;
}

.work-card h3 {
  margin: 0 0 8px;
  font-size: 1.55rem;
}

.work-card p {
  color: var(--ink-soft);
}

.about-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: start;
}

.about-panel p + p {
  margin-top: 14px;
}

.mail-card {
  background: var(--ink);
  color: #f6f1e8;
  border-radius: 24px;
  padding: 24px;
}

.mail-card a {
  color: var(--honey);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.7rem;
  text-decoration: none;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.mail-card p {
  margin-top: 10px;
  color: rgba(246, 241, 232, 0.78);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 22px;
}

.policy-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
}

.policy-box p {
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.url-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.url-row input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 12px;
  color: var(--ink);
}

.site-footer {
  padding: 28px 0 40px;
  color: var(--ink-soft);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.site-footer a {
  color: var(--moss);
  font-weight: 600;
}

.policy-page {
  padding: 20px 0 72px;
}

.policy-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.policy-toc {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
}

.policy-toc a {
  color: var(--ink-soft);
  text-decoration: none;
}

.policy-toc a:hover {
  color: var(--moss);
}

.policy h1 {
  margin: 0 0 8px;
  font-size: clamp(2.3rem, 4vw, 3.8rem);
}

.policy .updated {
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.summary {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 12px 22px 18px 2rem;
  margin: 18px 0 8px;
}

.policy ul,
.policy ol {
  padding-left: 1.25rem;
}

.policy .summary {
  padding-left: 2rem;
}

.summary li,
.policy li {
  margin: 8px 0;
}

.policy h2 {
  margin: 2rem 0 0.6rem;
  font-size: 1.7rem;
  scroll-margin-top: 96px;
}

.policy h3,
.policy-box h3 {
  margin: 1.35rem 0 0.45rem;
  font-size: 1.35rem;
}

.policy-box h3 {
  margin-top: 0;
  font-size: 1.7rem;
}

caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  padding: 14px 14px 4px;
}

.policy a {
  color: var(--moss);
  overflow-wrap: anywhere;
}

.policy p,
.policy li {
  max-width: 70ch;
}

.table-wrap {
  overflow-x: auto;
  margin: 16px 0 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 980px) {
  .hero-grid,
  .game-card,
  .about-panel,
  .contact-grid,
  .project-list,
  .policy-layout {
    grid-template-columns: 1fr;
  }

  .policy-toc {
    position: static;
    grid-template-columns: 1fr 1fr;
  }

  .sticker {
    position: static;
    display: inline-block;
    margin-top: 18px;
  }
}

@media (max-width: 800px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(var(--header) - 8px);
    right: 20px;
    left: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
    padding: 10px 8px;
  }

  .url-row {
    flex-direction: column;
    align-items: stretch;
  }

  .policy-toc {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .board-columns {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .token.is-wrong {
    animation: none;
  }
}

@media print {
  .site-header,
  .policy-toc,
  .site-footer,
  .button {
    display: none;
  }

  body {
    background: white;
  }

  .policy a {
    text-decoration: underline;
  }
}
