@font-face {
  font-family: "Permanent Marker";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/permanent-marker.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --ink: #1a1a1a;
  --paper: #fffef6;
  --yellow: #ffe14a;
  --grass: #5ea838;
  --sky: #8fd0f2;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  font-family: "Permanent Marker", "Comic Sans MS", cursive;
  font-size: 18px;
  line-height: 1.35;
  color: var(--ink);
  background: var(--sky);
}

img,
svg {
  max-width: 100%;
  height: auto;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 20;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
}

.skip:focus {
  top: 8px;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.sky {
  position: relative;
  padding: 28px 0 8px;
  background: linear-gradient(#c5ecff 0%, #8fd0f2 58%, var(--grass) 100%);
  overflow: hidden;
}

.sign-wrap {
  position: relative;
  width: min(920px, calc(100% - 28px));
  margin: 8px auto 0;
}

.rope {
  position: absolute;
  top: -26px;
  width: 4px;
  height: 34px;
  background: #5c4630;
}

.rope.left { left: 18%; }
.rope.right { right: 18%; }

.sign {
  position: relative;
  isolation: isolate;
  background: var(--paper);
  border: 5px solid var(--ink);
  border-radius: 18px 22px 16px 24px;
  box-shadow: 7px 8px 0 rgba(0, 0, 0, 0.25);
  text-align: center;
  padding: 14px 16px 16px;
  transform: rotate(-1.5deg);
}

.sign h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(46px, 12vw, 88px);
  line-height: 0.9;
  font-weight: 400;
}

.sign h1::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8% -1% 4%;
  background: var(--yellow);
  border-radius: 40% 55% 46% 54%;
  transform: rotate(-1.5deg);
}

.banner-note {
  width: min(640px, calc(100% - 32px));
  margin: 14px auto 0;
  text-align: center;
  font-size: 18px;
}

.sky-ghosts {
  display: flex;
  justify-content: space-between;
  width: min(560px, calc(100% - 20px));
  margin: 4px auto 0;
}

.sky-ghosts svg {
  width: 64px;
  height: 64px;
}

.jump-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #17324a;
  border-bottom: 4px solid var(--ink);
}

.jump {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px;
  scroll-snap-type: x proximity;
}

.jump a {
  flex: 0 0 auto;
  scroll-snap-align: start;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  white-space: nowrap;
  font-size: 16px;
}

.zone {
  padding: 28px 0 36px;
}

.wrap {
  width: min(1040px, calc(100% - 28px));
  margin-inline: auto;
}

.wrap.narrow {
  width: min(720px, calc(100% - 28px));
}

.zone.grass {
  background-color: var(--grass);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Crect width='90' height='90' fill='%235ea838'/%3E%3Ccircle cx='16' cy='20' r='12' fill='%234e942c'/%3E%3Ccircle cx='70' cy='58' r='16' fill='%2374c44e'/%3E%3Cpath d='M30 78q6-24 2-36' stroke='%233e7d24' stroke-width='3' fill='none'/%3E%3Cpath d='M48 80q8-28 0-40' stroke='%238ed85a' stroke-width='3' fill='none'/%3E%3C/svg%3E");
}

.zone.stone {
  background-color: #8e98a3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='120'%3E%3Crect width='180' height='120' fill='%238e98a3'/%3E%3Cpath d='M6 8h52v34H6z' fill='%23c5ced6' stroke='%235e6770' stroke-width='3'/%3E%3Cpath d='M64 6h50v36H64z' fill='%23b7c1c9' stroke='%235e6770' stroke-width='3'/%3E%3Cpath d='M120 10h54v30h-54z' fill='%23d5dde3' stroke='%235e6770' stroke-width='3'/%3E%3Cpath d='M8 50h40v32H8z' fill='%23aeb8c0' stroke='%235e6770' stroke-width='3'/%3E%3Cpath d='M54 48h62v36H54z' fill='%23c9d2d8' stroke='%235e6770' stroke-width='3'/%3E%3Cpath d='M122 50h50v32h-50z' fill='%23b3bdc5' stroke='%235e6770' stroke-width='3'/%3E%3Cpath d='M20 90h70v22H20z' fill='%23d0d8de' stroke='%235e6770' stroke-width='3'/%3E%3Cpath d='M96 88h74v24H96z' fill='%23c0c9d0' stroke='%235e6770' stroke-width='3'/%3E%3C/svg%3E");
}

.zone.fire {
  background-color: #ef3b32;
  background-image:
    radial-gradient(circle at 18% 30%, rgba(255, 120, 70, 0.85) 0 14%, transparent 15%),
    radial-gradient(circle at 82% 70%, rgba(180, 10, 10, 0.55) 0 18%, transparent 19%),
    radial-gradient(circle at 46% 88%, rgba(255, 90, 60, 0.7) 0 12%, transparent 13%);
}

.zone.book {
  background: #d9d3c5;
}

.paper-sign {
  display: inline-block;
  max-width: 100%;
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 16px 20px 14px 18px;
  padding: 10px 14px 12px;
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.18);
  transform: rotate(-1.2deg);
  margin: 0 0 16px;
}

.paper-sign h2,
.pay-board h2 {
  margin: 0;
  font-size: clamp(32px, 8vw, 52px);
  font-weight: 400;
  line-height: 1;
}

.lede,
.paper-sign p {
  margin: 6px 0 0;
}

.creator-layout {
  display: grid;
  gap: 14px;
  align-items: center;
}

.chair-slot svg {
  width: min(220px, 70%);
  display: block;
  margin-inline: auto;
}

.creator-signs {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin: 0;
  padding: 8px 14px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  font-size: 18px;
}

.pill.yt {
  background: #1a1a1a;
  color: #fff;
  transform: rotate(-2deg);
}

.pill.yt:focus-visible {
  outline-color: var(--yellow);
}

.pill.tt {
  transform: rotate(1.5deg);
}

.play {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ff2a2a;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.play::before {
  content: "";
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #fff;
  margin-left: 2px;
}

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
}

.card {
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 18px;
  padding: 12px;
  box-shadow: 5px 6px 0 rgba(0, 0, 0, 0.2);
  min-width: 0;
}

.card-limited {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0 0 8px;
}

.crate {
  background: #f4f4f4;
  padding: 8px;
  border-radius: 12px;
  box-shadow: 6px 8px 0 rgba(0, 0, 0, 0.25);
}

.cage {
  position: relative;
  height: 150px;
  display: grid;
  place-items: end center;
  border: 8px solid #f7f7f7;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background:
    linear-gradient(#f4f4f4, #f4f4f4) 18% 0 / 8px 100% no-repeat,
    linear-gradient(#f4f4f4, #f4f4f4) 50% 0 / 8px 100% no-repeat,
    linear-gradient(#f4f4f4, #f4f4f4) 82% 0 / 8px 100% no-repeat,
    linear-gradient(#fff, #f3f3f3);
  box-shadow: inset 0 0 0 3px #dedede;
}

.doodle {
  position: relative;
  z-index: 1;
  width: min(170px, 78%);
  margin: 0 auto;
}

.doodle svg,
.doodle img,
.stage svg,
.decor svg,
.ember-row svg {
  display: block;
  width: 100%;
  height: auto;
}

.card-cat .doodle {
  width: min(210px, 72%);
}

.wood {
  text-align: center;
  color: #fffef8;
  text-shadow: 2px 2px 0 #1a1a1a, -1px 0 0 #1a1a1a, 1px 0 0 #1a1a1a;
  background: repeating-linear-gradient(
    90deg,
    #e7c48a 0 14px,
    #f3ddb0 14px 18px,
    #d7b074 18px 28px,
    #c99655 28px 32px
  );
  border: 4px solid #f4f4f4;
  padding: 8px 10px 12px;
}

.price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 6px 0;
}

.price-num {
  font-size: 40px;
  line-height: 1;
}

.coin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff4a8, #ffd84a 46%, #e2a514 82%);
  border: 2px solid #8a5a10;
  box-shadow: inset -2px -2px 0 #c48412;
  flex: 0 0 auto;
}

.bring {
  margin: 0;
  font-size: 28px;
  line-height: 0.9;
}

.item-name {
  margin: 8px 0 4px;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.1;
}

.blurb {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

.tag {
  display: inline-block;
  margin: 8px 0 0;
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 2px 8px;
  transform: rotate(-2deg);
}

.tag.chance {
  display: block;
  text-align: center;
  font-size: 26px;
  line-height: 1.15;
  background: #d6ff4a;
}

.stage {
  position: relative;
}

button,
.order-button {
  font-family: inherit;
  font-size: 20px;
  background: var(--yellow);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--ink);
  min-height: 48px;
  padding: 8px 14px;
  cursor: pointer;
}

.card .order-button,
#order-submit,
.owner-actions button {
  width: 100%;
}

button.secondary {
  background: #fff;
  width: auto;
}

button:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

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

.ember-row {
  display: flex;
  justify-content: space-around;
  margin-top: 12px;
}

.ember-row svg {
  width: 54px;
}

.pay-board {
  background: repeating-linear-gradient(
    90deg,
    #e7c48a 0 18px,
    #f0d7a4 18px 22px,
    #d7b074 22px 36px
  );
  border: 4px solid var(--ink);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 6px 8px 0 rgba(0, 0, 0, 0.25);
}

.pay-board h2,
.pay-board p,
.pay-board strong {
  color: var(--ink);
  text-shadow: none;
}

.pay-line {
  font-size: 22px;
}

.pay-label {
  display: inline-block;
  min-width: 6.2em;
}

.rules details {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0 0 10px;
}

.rules summary {
  cursor: pointer;
  font-size: 20px;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.rules a,
.text-link,
.site-foot a {
  color: inherit;
}

.site-foot {
  background: #1f4d12;
  color: #fffef8;
  text-align: center;
  padding: 22px 16px 32px;
}

.fine {
  font-size: 14px;
}

.empty,
.form-error {
  color: #9d1230;
}

.noscript-note {
  display: block;
}

dialog {
  width: min(440px, calc(100vw - 20px));
  max-height: min(92vh, 760px);
  overflow: auto;
  border: 4px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  padding: 14px;
  box-shadow: 8px 10px 0 rgba(0, 0, 0, 0.35);
}

dialog::backdrop {
  background: rgba(20, 16, 40, 0.55);
}

.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.dialog-top h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 400;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
}

input,
textarea {
  font-family: inherit;
  font-size: 18px;
  color: var(--ink);
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

input[readonly] {
  background: #fff3a8;
}

::placeholder {
  color: #5c5346;
  opacity: 1;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#thanks {
  margin-top: 8px;
}

#thanks:focus {
  outline: none;
}

.owner-page .list {
  display: grid;
  gap: 12px;
}

.order-card {
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 16px;
  padding: 12px;
}

.order-card.done {
  opacity: 0.75;
}

.order-card p {
  margin: 4px 0;
  overflow-wrap: anywhere;
}

.stamp {
  display: inline-block;
  border: 3px solid #1f7a32;
  color: #14612a;
  border-radius: 8px;
  padding: 2px 8px;
  transform: rotate(-6deg);
}

.stamp.new {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--yellow);
}

.gate,
.owner-tools {
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 14px;
}

.status {
  min-height: 1.3em;
}

@media (min-width: 720px) {
  .creator-layout {
    grid-template-columns: 220px 1fr;
  }

  .grid.two,
  .grid.fire-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .owner-actions button,
  .card .order-button {
    width: auto;
  }

  .card .order-button {
    width: 100%;
  }
}

@media (min-width: 980px) {
  .grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid.fire-grid {
    grid-template-columns: 1.35fr 0.75fr;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
