@font-face {
  font-family: "Display";
  src: url("../fonts/cinzel-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Body";
  src: url("../fonts/inter-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Body";
  src: url("../fonts/inter-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "UI";
  src: url("../fonts/montserrat-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #F4EFE6;
  --bg-2: #E7DFD2;
  --card: #FFFBF5;
  --accent: #5C2D91;
  --accent-2: #1F7A4D;
  --text: #1C140F;
  --muted: #5E5146;
  --line: #D5C8B6;
  --danger: #ffb4a8;
  --ok: #d7ecc8;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --header: 4.5rem;
  --radius: 0;
  --on-accent: #FFFFFF;
  --display: "Display", "Times New Roman", serif;
  --body: "Body", "Segoe UI", sans-serif;
  --ui: "UI", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1100px 420px at 88% -12%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 62%),
    var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  min-width: 0;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-2); }
h1, h2, h3, .wordmark {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
  overflow-wrap: anywhere;
  color: var(--text);
}
h1 { font-size: clamp(2.1rem, 5vw, 4.4rem); margin: 0 0 0.6rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0 0 0.7rem; }
h3 { font-size: 1.25rem; margin: 0 0 0.4rem; }
p { margin: 0 0 0.8rem; color: var(--muted); }
p strong, li strong { color: var(--text); }
.skip {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  background: var(--accent);
  color: var(--bg);
  padding: 0.4rem 0.7rem;
}
.skip:focus { top: 0.5rem; z-index: 80; }
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(17, 16, 14, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header);
  padding: 0.6rem 1.25rem;
  max-width: 1180px;
  margin: 0 auto;
}
.wordmark {
  color: var(--text);
  text-decoration: none;
  font-size: 1.45rem;
  display: flex;
  flex-direction: column;
  line-height: 1;
  flex: 0 0 auto;
}
.wordmark span {
  font-family: var(--ui);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 0.28rem;
}
.desk-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  min-width: 0;
}
.desk-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
}
.desk-nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.bar-tools { margin-left: auto; display: flex; align-items: center; gap: 0.7rem; flex: 0 0 auto; }
.balance { font-variant-numeric: tabular-nums; text-decoration: none; color: var(--accent); }
.text-link { color: var(--text); text-decoration: none; }
.burger {
  display: none;
  font-family: var(--ui);
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 0.45rem 0.7rem;
}
.nav-panel {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 0.5rem 1.25rem 1rem;
}
.nav-panel a { display: block; padding: 0.55rem 0; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }

.btn, button, .btn-ghost {
  font-family: var(--ui);
  font-weight: 600;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  background: var(--accent);
  color: #1a140c;
}
.btn:hover, button:hover { background: #e3c56a; color: #1a140c; }
.btn-ghost, .chips button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover, .chips button:hover { background: var(--bg-2); color: var(--text); }
.btn-small { min-height: 2.35rem; padding: 0.35rem 0.75rem; font-size: 0.92rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

main { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1.25rem 6.5rem; min-width: 0; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2rem;
  align-items: end;
  padding: 2.2rem 0 1.4rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}
.hero-frame {
  min-height: 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.hero-frame img {
  display: block;
  width: 100%;
  height: 420px;
  object-fit: cover;
}
.hero-frame::before, .hero-frame::after { content: none; }
.stock-note, .photo-break figcaption {
  margin: 0;
  padding: 0.55rem 0.75rem 0.65rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
  background: var(--bg-2);
}
.photo-break { margin: 0 0 1.4rem; }
.photo-break img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--radius);
}
.section { margin: 0 0 2.4rem; min-width: 0; }
.cards, .steps, .split, .game-grid, .foot-grid {
  display: grid;
  gap: 0.9rem;
}
.cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card, .step, .panel, .game-card, .empty, form.stack, .gate-card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1rem 1rem 0.9rem;
  min-width: 0;
}
.card a, .step { color: inherit; text-decoration: none; display: block; }
.card h3, .step h3 { color: var(--text); }
.num {
  font-family: var(--display);
  color: var(--accent);
  display: block;
  margin-bottom: 0.35rem;
}
.split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.lobby .filters, .stack, .acc-layout { min-width: 0; }
.filters {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.8fr) auto;
  gap: 0.7rem;
  align-items: end;
  margin: 0.8rem 0;
}
label { display: grid; gap: 0.3rem; color: var(--muted); font-size: 0.92rem; min-width: 0; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 0.65rem 0.7rem;
  font: inherit;
}
textarea { min-height: 8rem; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0 0 1rem; }
.chips button { min-height: 2.2rem; }
.chips button[aria-current="true"] { border-color: var(--accent); color: var(--accent); }
.empty { color: var(--muted); }
.game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.game-card a { display: grid; gap: 0.2rem; color: inherit; text-decoration: none; }
.poster {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #0c0b09;
  border: 1px solid var(--line);
  margin-bottom: 0.45rem;
}
.poster-letter {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 2rem;
  color: var(--accent);
}
.studio-row { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.studio-row a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 7.2rem;
  height: 3.2rem;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
}
.studio-row a.tone-paper { background: #fff; }
.studio-row a.tone-ink { background: #14120f; }
.studio-row img { max-height: 2.1rem; max-width: 8.4rem; width: auto; height: auto; object-fit: contain; }
.game-hero { width: min(100%, 420px); height: auto; display: block; background: #0c0b09; border: 1px solid var(--line); }
.game-name { color: var(--text); }
.game-meta { color: var(--muted); font-size: 0.92rem; }
.faq details, .prose details {
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0;
}
.faq summary, details summary { cursor: pointer; color: var(--text); }
.err { color: var(--danger); margin: 0.25rem 0 0; }
.flash { max-width: 1180px; margin: 0.8rem auto 0; padding: 0.7rem 1rem; border: 1px solid var(--line); }
.flash-error { color: var(--danger); }
.flash-ok { color: var(--ok); }
.flash-info { color: var(--muted); }
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.check { display: flex; gap: 0.55rem; align-items: flex-start; }
.check input { width: auto; margin-top: 0.25rem; }
.acc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.2rem; }
.acc-nav { display: grid; align-content: start; gap: 0.15rem; }
.acc-nav a { color: var(--muted); text-decoration: none; padding: 0.35rem 0; border-bottom: 1px solid transparent; }
.acc-nav a[aria-current="page"] { color: var(--accent); }
table { width: 100%; border-collapse: collapse; min-width: 0; }
th, td { text-align: left; padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
.dob { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.prose h2 { margin-top: 1.6rem; }
.prose ul { padding-left: 1.1rem; color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 2rem 1.25rem 6rem;
}
.foot-grid { max-width: 1180px; margin: 0 auto; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1fr); }
.site-footer a { display: inline-block; margin: 0 0.8rem 0.45rem 0; }
.site-footer nav { min-width: 0; }
.legal-note p { font-size: 0.95rem; }
.reg-block { max-width: 1180px; margin: 1.1rem auto 0; }
.reg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.1rem; list-style: none; padding: 0; margin: 0; }
.reg-row a { display: inline-flex; align-items: center; margin: 0; }
.reg-row img { height: 42px; width: auto; max-width: 150px; object-fit: contain; }
.reg-caption { color: var(--muted); font-size: 0.85rem; margin: 0.4rem 0 0; }

.mobile-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 35;
  background: #16130f;
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.mobile-nav a {
  color: var(--muted);
  text-decoration: none;
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  padding: 0.45rem 0.2rem 0.55rem;
  font-size: 0.68rem;
  text-align: center;
  min-width: 0;
}
.mobile-nav a[aria-current="page"] { color: var(--accent); }
.mobile-nav .i { width: 1.25rem; height: 1.25rem; }
.i { width: 1.1rem; height: 1.1rem; display: inline-block; }

.gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(8, 7, 6, 0.72);
  display: grid;
  place-items: center;
  padding: 1rem;
}
.gate-card { max-width: 36rem; width: min(100%, 36rem); }
.cookie {
  position: fixed;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.8rem;
  z-index: 60;
  background: var(--card);
  border: 1px solid var(--accent-2);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow);
  max-width: 760px;
}
.cookie details { margin-top: 0.6rem; }

@media (max-width: 1100px) {
  .desk-nav, .support-link { display: none; }
  .burger { display: inline-flex; }
  .cards, .steps, .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: 1fr; }
  .hero, .split, .acc-layout, .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .mobile-nav { display: grid; }
  .cookie { bottom: 4.6rem; }
}
@media (max-width: 640px) {
  .cards, .steps { grid-template-columns: minmax(0, 1fr); }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bar { padding-inline: 0.8rem; }
  main { padding-inline: 0.8rem; }
  h1 { font-size: 2rem; }
  .hero-frame img, .photo-break img { height: 240px; }
}

::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
html { scrollbar-color: var(--line) var(--bg); }
.btn, .card, .game-card, .panel, .gate-card, .cookie, .poster, input, select, textarea {
  border-radius: var(--radius);
}
.btn, button { color: var(--on-accent); }
.btn:hover, button:hover {
  background: color-mix(in srgb, var(--accent) 84%, #fff);
  color: var(--on-accent);
}
.btn-ghost, .chips button { background: transparent; color: var(--text); }
.btn-ghost:hover, .chips button:hover { background: var(--bg-2); color: var(--text); }
/* skin: light masthead, the name is the header */
body { background: var(--bg); }
.site-header { background: var(--bg); backdrop-filter: none; border-bottom: 0; position: relative; }
.mobile-nav { background: var(--bg-2); }
input, select, textarea { background: var(--card); }
.card, .step, .game-card, .panel, .empty, form.stack { background: transparent; }
@media (min-width: 1101px) {
  .bar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "mark tools" "nav nav";
    align-items: end;
    max-width: 1180px;
    border-bottom: 4px solid var(--text);
    padding-top: 1.1rem;
    padding-bottom: 0.45rem;
  }
  .wordmark { grid-area: mark; font-size: 4.4rem; letter-spacing: -0.03em; line-height: 0.86; }
  .bar-tools { grid-area: tools; margin: 0 0 0.4rem; }
  .desk-nav { grid-area: nav; padding-top: 0.7rem; gap: 0.4rem 1.3rem; }
  .hero { border-bottom: 4px solid var(--text); align-items: end; }
  .hero-frame { border-radius: 0; box-shadow: none; border-color: var(--text); }
  .hero-frame img { height: 380px; }
  .card, .step, .game-card { border: 0; border-top: 1px solid var(--text); padding-left: 0; padding-right: 0; }
  .cards { grid-template-columns: 1fr 1fr 1fr; }
}
