@import url("/static/css/fonts/clear-sans.css");
:root {
  --paper: #f8f6f0;
  --ink: #242c28;
  --muted: #687169;
  --line: #dddcd2;
  --orange: #e9a33c;
  --green: #254e3d;
  --white: #fff;
  --radius: 16px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 30px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.55 "Clear Sans",
    system-ui,
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #b26507;
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0 0 16px;
}
h1,
h2,
h3 {
  line-height: 1.13;
  letter-spacing: -0.035em;
}
h1 {
  font-size: 48px;
}
h2 {
  font-size: 34px;
}
h3 {
  font-size: 21px;
}
p {
  line-height: 1.65;
}
img {
  max-width: 100%;
  display: block;
}
section {
  margin-bottom: 64px;
}
.site-header,
.page,
.site-footer,
.products {
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
}
.site-header {
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 24px;
  padding: 0 4px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -1px;
}
.brand-light {
  font-weight: 400;
}
.brand-tile {
  background: var(--orange);
  border-radius: 10px;
  padding: 12px 8px;
  font-size: 18px;
  letter-spacing: -1px;
  transform: rotate(-5deg);
}
nav {
  display: flex;
  gap: 26px;
  align-items: center;
}
nav a {
  font-size: 15px;
  font-weight: 600;
}
.page {
  padding: 48px 4px 0;
  min-height: 50vh;
}
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 80px;
  align-items: center;
  padding: 28px 0 70px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--muted);
  display: block;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(56px, 6vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.065em;
  margin-bottom: 25px;
}
.accent {
  color: var(--green);
}
.hero-copy {
  font-size: 19px;
  color: var(--muted);
  margin-bottom: 28px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 48px;
  padding: 12px 21px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid transparent;
  text-decoration: none !important;
  line-height: 1.3;
}
.primary {
  background: var(--green);
  color: white;
}
.primary:hover {
  background: #183a2b;
}
.secondary {
  background: transparent;
  border-color: #b9bcb3;
  color: var(--ink);
}
.secondary:hover {
  background: #eeece3;
}
.micro {
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
}
.hero-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  padding: 14px;
  background: #dcd7c9;
  border-radius: 18px;
  transform: rotate(4deg);
  box-shadow: 16px 20px 0 #e9e6db;
  position: relative;
  max-width: 420px;
}
.hero-board > span {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: #f1ebdf;
  border-radius: 9px;
  font-weight: bold;
  font-size: 30px;
  color: #7a715f;
}
.hero-board .hero-photo {
  background: #fff9ed;
  font-size: 42px;
}
.hero-board .hero-final {
  background: #e9a33c;
  color: #242c28;
  font-size: 25px;
}
.board-caption {
  position: absolute;
  background: #254e3d;
  color: white;
  bottom: -24px;
  left: 40px;
  transform: rotate(-8deg);
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 6px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.section-heading h2,
.section-heading h1 {
  margin: 0;
}
.section-heading .eyebrow {
  margin-bottom: 10px;
}
.pill {
  font-size: 12px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 30px;
  display: inline-block;
  color: var(--muted);
}
.muted {
  color: var(--muted);
  font-size: 14px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.game-card {
  min-width: 0;
}
.game-card > a {
  display: block;
}
.card-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 9px;
  background: #e5e0d5;
  border-radius: 14px;
  aspect-ratio: 1;
}
.card-tiles img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: 7px;
}
.card-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  gap: 12px;
}
.card-caption h3 {
  font-size: 18px;
  overflow-wrap: anywhere;
  margin-bottom: 6px;
}
.card-caption p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.play-circle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 13px;
}
.game-card:hover .play-circle {
  background: var(--green);
  color: white;
}
.empty-state {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 40px;
  background: #efede4;
  border: 1px dashed #c8c8bc;
  border-radius: 16px;
}
.empty-state p {
  color: var(--muted);
}
.empty-tile {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--orange);
  width: 110px;
  height: 110px;
  border-radius: 12px;
  font-size: 30px;
  font-weight: bold;
  transform: rotate(-5deg);
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
.steps span {
  font-size: 14px;
  color: var(--muted);
  display: block;
  margin-bottom: 22px;
}
.steps p {
  color: var(--muted);
}
.products {
  border-top: 1px solid var(--line);
  padding: 48px 4px;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 64px;
}
.products h2 {
  font-size: 29px;
}
.products p {
  font-size: 14px;
  color: var(--muted);
}
.product-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px 35px;
}
.product-links a {
  display: block;
}
.product-links strong {
  display: flex;
  justify-content: space-between;
  font-size: 17px;
}
.product-links small {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}
.site-footer {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 4px 40px;
  font-size: 13px;
}
.site-footer > span {
  color: var(--muted);
}
.site-footer nav {
  gap: 16px;
}
.site-footer nav a {
  font-size: 13px;
}
.text-button {
  border: 0;
  background: none;
  color: inherit;
  padding: 6px 0;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.owner-tools {
  padding: 16px 0 28px;
  font-size: 13px;
}
.owner-tools .actions {
  gap: 16px;
}
.owner-tools p {
  margin-top: 10px;
  margin-bottom: 8px;
}
.owner-tools form {
  margin: 0;
}
.pagination {
  justify-content: center;
  padding: 40px;
}
.prose {
  max-width: 800px;
}
.prose h1 {
  font-size: 42px;
}
.prose a {
  text-decoration: underline;
}
.prose li {
  margin-bottom: 15px;
}
.prose summary {
  cursor: pointer;
  font-weight: bold;
  padding: 15px 0;
}
.prose details {
  border-bottom: 1px solid var(--line);
}
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 7px;
}
input:not([type="checkbox"]):not([type="file"]),
textarea,
select {
  width: 100%;
  background: white;
  border: 1px solid #c8ccc2;
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}
input[type="file"] {
  max-width: 100%;
  font-size: 13px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px;
  max-width: min(620px, calc(100vw - 24px));
  width: 620px;
  color: var(--ink);
  background: var(--paper);
  max-height: 90dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #17241bcc;
  backdrop-filter: blur(3px);
}
.dialog-close {
  position: absolute;
  right: 18px;
  top: 12px;
  border: 0;
  background: none;
  font-size: 28px;
}
.share-preview {
  border-radius: 12px;
  width: 100%;
  margin: 24px 0;
}
.copy-row {
  display: flex;
  gap: 8px;
}
.copy-row .button {
  flex-shrink: 0;
}
.share-buttons,
.download-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.share-buttons .button,
.download-row .button {
  font-size: 13px;
  padding: 10px 14px;
}
.ready {
  max-width: 760px;
  margin: 0 auto 70px;
}
.ready-art {
  border-radius: 18px;
  width: 100%;
  margin: 32px 0;
}
.notice,
[role="alert"]:not(:empty) {
  padding: 16px;
  background: #fff2d7;
  border: 1px solid #d6b276;
  border-radius: 8px;
  margin-bottom: 20px;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: white;
  padding: 10px;
  z-index: 1000;
}
.skip-link:focus {
  top: 10px;
}
.recent-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.recent-links a {
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.editor-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
}
.editor-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
  background: #fffdf8;
}
.editor-panel h2 {
  font-size: 24px;
}
.editor-field {
  margin-bottom: 20px;
}
.form-text,
.helptext {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 0;
}
.tile-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.tile-slot {
  min-width: 0;
  background: #f2efe5;
  border-radius: 10px;
  padding: 12px;
  position: relative;
}
.tile-slot img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
  border-radius: 7px;
  margin-bottom: 10px;
  background: #e4dfd1;
}
.tile-slot label {
  font-size: 13px;
}
.tile-slot input {
  font-size: 11px;
  width: 100%;
}
.tile-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.tile-actions button {
  font-size: 12px;
}
.editor-aside {
  align-self: start;
  position: sticky;
  top: 30px;
}
.editor-aside h2 {
  font-size: 24px;
}
.editor-aside p {
  font-size: 14px;
  color: var(--muted);
}
.editor-status {
  font-size: 14px;
  color: var(--green);
  margin-top: 14px;
}
.template-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.check-field {
  display: flex;
  gap: 10px;
  align-items: start;
  margin-bottom: 18px;
}
.check-field label {
  font-weight: 400;
}
.upload-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.upload-bar input {
  max-width: 260px;
}
.crop-canvas {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  background: #e5e0d5;
}
.crop-controls {
  display: grid;
  gap: 16px;
  margin: 20px 0;
}
.crop-controls input {
  width: 100%;
}
#preview-frame {
  width: 100%;
  height: 600px;
  border: 0;
  border-radius: 12px;
}
#preview-dialog {
  width: 650px;
}
.errorlist {
  color: #9d2920;
}
.game-description {
  font-size: 14px;
  margin: 12px 0;
}
.game-description summary {
  cursor: pointer;
}
.game-description p {
  overflow-wrap: anywhere;
}
.btn {
  display: inline-block;
  padding: 10px 16px;
  background: var(--green);
  color: white;
  border: 0;
  border-radius: 8px;
}
.btn-danger {
  background: #9d2920;
}
@media (max-width: 1200px) {
  .site-header,
  .page,
  .site-footer,
  .products {
    margin-left: 32px;
    margin-right: 32px;
  }
  .hero {
    gap: 48px;
  }
  .hero-board {
    max-width: 380px;
  }
}
@media (max-width: 850px) {
  .hero {
    gap: 30px;
  }
  .hero-board .hero-photo {
    font-size: 30px;
  }
  .hero-board > span {
    font-size: 24px;
  }
  .hero h1 {
    font-size: 60px;
  }
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .products {
    gap: 30px;
  }
  .site-footer {
    flex-wrap: wrap;
  }
  .site-footer > span {
    display: none;
  }
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .editor-aside {
    position: static;
  }
  .steps {
    gap: 25px;
  }
}
@media (max-width: 600px) {
  .site-header,
  .page,
  .site-footer,
  .products {
    margin-left: 20px;
    margin-right: 20px;
  }
  .site-header {
    height: auto;
    min-height: 88px;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 0;
  }
  .brand {
    font-size: 21px;
  }
  .site-header nav {
    gap: 18px;
  }
  .site-header nav a {
    font-size: 14px;
  }
  .page {
    padding-top: 30px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 0;
    gap: 48px;
  }
  .hero h1 {
    font-size: 66px;
  }
  .hero-copy {
    font-size: 17px;
  }
  .hero-board {
    width: 85%;
    max-width: 330px;
    justify-self: center;
    margin-bottom: 20px;
  }
  .hero-board .hero-photo {
    font-size: 34px;
  }
  h1 {
    font-size: 36px;
  }
  h2 {
    font-size: 27px;
  }
  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 12px;
  }
  .card-grid {
    gap: 16px;
  }
  .card-caption h3 {
    font-size: 16px;
  }
  .card-caption p {
    font-size: 12px;
  }
  .empty-state {
    padding: 24px;
    gap: 20px;
    align-items: start;
    flex-direction: column;
  }
  .empty-tile {
    width: 70px;
    height: 70px;
    font-size: 24px;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .steps span {
    margin-bottom: 10px;
  }
  .products {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 32px;
  }
  .products h2 {
    font-size: 26px;
  }
  .product-links {
    gap: 24px;
  }
  .site-footer nav {
    flex-wrap: wrap;
  }
  .tile-editor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .editor-panel {
    padding: 20px;
  }
  .copy-row {
    flex-direction: column;
  }
  dialog {
    padding: 28px 20px;
  }
  .download-row .button {
    width: 100%;
  }
  section {
    margin-bottom: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

[hidden] {
  display: none !important;
}
.fallback-tile {
  display: grid;
  place-items: center;
  background: #e9a33c;
  border-radius: 8px;
  font-size: 30px;
  font-weight: 700;
  aspect-ratio: 1;
}
.merge-demo {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 24px 0;
}
.merge-demo span {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 10px;
  background: #e9a33c;
  font-size: 26px;
  font-weight: bold;
}
.merge-demo b {
  font-size: 20px;
}
