:root {
  --paper: #f3ead2;
  --ink: #1b140e;
  --muted: #5c5146;
  --red: #c23b22;
  --blue: #2a62c9;
  --yellow: #ffe36a;
  --hole: #1a120c;
  --tape: #f6d36b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--paper);
  background-image: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      rgba(40, 70, 160, 0.07) 28px
    ),
    radial-gradient(circle at 20% 10%, rgba(255, 220, 160, 0.5), transparent 28%),
    linear-gradient(180deg, #efe4c4 0%, var(--paper) 180px);
  font-family: Georgia, "Times New Roman", serif;
  overflow-x: hidden;
}

.page-stain {
  pointer-events: none;
  position: fixed;
  width: 180px;
  height: 180px;
  right: 18%;
  top: 42%;
  background: radial-gradient(circle, rgba(90, 50, 20, 0.18), transparent 68%);
  transform: rotate(12deg);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 18px 88px 8px 42px;
  border-bottom: 3px solid #111;
  background: #fff8e4;
  transform: rotate(-0.4deg);
  margin: 10px 12px 0;
}

.logo {
  margin: 0;
  font-family: Impact, "Arial Black", sans-serif;
  letter-spacing: 0.5px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  text-shadow: 3px 3px 0 #ffd24a;
}

.logo-old {
  margin: 0;
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  color: var(--blue);
  font-size: 0.85rem;
  text-decoration: underline;
}

.logo-sub {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.blink {
  animation: blink 1.1s steps(2, start) infinite;
  color: var(--red);
}

@keyframes blink {
  to {
    visibility: hidden;
  }
}

.nav {
  display: flex;
  gap: 18px;
  font-family: Verdana, sans-serif;
  font-size: 0.82rem;
  text-transform: uppercase;
  padding-bottom: 10px;
  margin-right: -20px;
}

.nav a {
  color: var(--blue);
}

.nav-broken {
  color: #999;
  border-bottom: 1px dashed #999;
}

.ticker {
  background: #111;
  color: #9cff7a;
  font-family: "Courier New", monospace;
  padding: 6px 0;
  margin: 8px 0 0;
}

.hero {
  max-width: 760px;
  padding: 38px 48px 10px 58px;
}

.sticky-note {
  display: inline-block;
  margin: 0 0 16px;
  padding: 10px 12px;
  background: var(--yellow);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  transform: rotate(-3deg);
}

.hero-title {
  font-size: clamp(2rem, 6vw, 4.2rem);
  line-height: 0.95;
  margin: 0 0 12px;
  font-family: "Arial Black", Impact, sans-serif;
}

.hero-copy {
  font-size: 1.15rem;
  max-width: 58ch;
}

.crooked {
  transform: rotate(1.2deg);
  margin-left: 28px;
}

.machine {
  display: flex;
  gap: 12px;
  padding: 10px 40px 40px 36px;
  align-items: flex-start;
}

.machine-frame {
  background: #fff;
  border: 4px solid #111;
  outline: 3px dashed #c23b22;
  outline-offset: 8px;
  padding: 22px 22px 18px;
  width: min(560px, 100%);
  box-shadow: 12px 12px 0 #111;
  transform: rotate(0.8deg);
}

.badge {
  display: inline-block;
  margin: 0 0 8px;
  background: var(--red);
  color: white;
  font-family: Verdana, sans-serif;
  font-size: 0.7rem;
  padding: 3px 8px;
  transform: rotate(-6deg);
}

.tiny-dev {
  color: #3c7a3c;
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
}

.form-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

.label-cell {
  font-family: Tahoma, sans-serif;
  font-size: 0.85rem;
  white-space: nowrap;
}

.hint {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: italic;
}

input[type="date"] {
  font: 1rem "Courier New", monospace;
  padding: 8px;
  border: 2px inset #bbb;
  background: #f7f7f0;
  width: 100%;
}

.pay-btn {
  margin-top: 10px;
  width: 92%;
  margin-left: 8%;
  border: 3px solid #111;
  background: linear-gradient(#ffe36a, #f0b429);
  font-family: Impact, sans-serif;
  font-size: 1.4rem;
  padding: 12px 10px 8px;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 #111;
}

.pay-btn small {
  display: block;
  font-family: Verdana, sans-serif;
  font-size: 0.85rem;
  font-weight: normal;
  text-transform: none;
  margin-top: 4px;
}

.pay-btn s {
  color: #7a2014;
  margin-right: 8px;
}

.pay-btn:hover {
  transform: translate(-1px, -1px);
}

.fine {
  font-size: 0.78rem;
  color: var(--muted);
}

.scribble {
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  color: #2a62c9;
  transform: rotate(7deg);
  margin-top: 70px;
  max-width: 180px;
}

.scribble-arrow {
  color: var(--red);
}

.result-section {
  margin: 0 70px 30px 50px;
  padding: 18px;
  background: #e9ffd9;
  border: 2px solid #2b6b2b;
}

.result-text {
  font-size: 1.8rem;
  font-family: Impact, sans-serif;
  margin: 0;
}

.result-extra {
  font-family: "Courier New", monospace;
}

.hole-section {
  padding: 20px 40px 50px;
}

.hole {
  position: relative;
  width: min(420px, 80vw);
  height: 220px;
  margin-left: 18%;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle at 50% 50%, #090704 0 58%, transparent 59%),
    repeating-conic-gradient(#333 0 25%, #111 0 50%);
  background-size: auto, 18px 18px;
  box-shadow: inset 0 0 0 10px var(--paper), 0 0 0 3px #111;
  transform: rotate(-2deg);
  color: #fff;
}

.hole-copy {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 100%;
  padding: 24px;
  font-family: Verdana, sans-serif;
  text-shadow: 0 2px 0 #000;
}

.hole-caption {
  margin-left: 18%;
  font-size: 0.8rem;
  color: var(--muted);
}

.faq {
  padding: 10px 90px 80px 48px;
  max-width: 720px;
}

.faq h3 {
  font-family: "Comic Sans MS", "Comic Sans", cursive;
}

dt {
  font-weight: 700;
  margin-top: 14px;
}

dd {
  margin: 4px 0 0 18px;
}

.unfinished-dd {
  background: repeating-linear-gradient(45deg, #fff, #fff 8px, #ffe9e2 8px, #ffe9e2 16px);
  padding: 10px;
  border: 2px dashed var(--red);
}

.inline-donate {
  display: inline-block;
  margin-top: 8px;
  background: white;
  border: 2px solid var(--red);
  color: var(--red);
  font-weight: 700;
  cursor: pointer;
  padding: 6px 10px;
}

.footer {
  border-top: 8px solid #111;
  background: #d7cba8;
  padding: 12px 20px 28px;
  font-family: "Courier New", monospace;
  overflow: hidden;
  white-space: nowrap;
}

.donate-amount-wrap {
  display: grid;
  gap: 6px;
  font-family: Verdana, sans-serif;
  font-size: 0.9rem;
  margin: 8px 0 12px;
}

.donate-amount-wrap[hidden] {
  display: none;
}

.donate-amount-wrap input {
  font: 1.1rem "Courier New", monospace;
  padding: 8px;
  border: 2px inset #bbb;
  background: #f7f7f0;
  width: 100%;
}

.donate-amount-wrap small {
  color: var(--muted);
}

.modal[hidden],
.result-section[hidden],
.pay-error[hidden],
.pay-status[hidden],
#age-price[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 0, 0.62);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 16px;
}

.modal-card {
  width: min(420px, 100%);
  background: #fffdf6;
  border: 4px solid #111;
  padding: 22px 20px 16px;
  position: relative;
  transform: rotate(-0.6deg);
  box-shadow: 10px 12px 0 #111;
}

.modal-x {
  position: absolute;
  right: 8px;
  top: 6px;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 8px 0;
}

.old-price {
  font-size: 1.6rem;
  color: #8a8a8a;
  text-decoration: line-through;
  font-family: Impact, sans-serif;
}

.new-price {
  font-size: 2.4rem;
  color: var(--red);
  font-family: Impact, sans-serif;
}

.discount-sticker {
  display: inline-block;
  background: #9cff7a;
  padding: 4px 8px;
  transform: rotate(2deg);
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  margin: 0 0 12px;
}

.pay-error {
  color: var(--red);
  font-family: Verdana, sans-serif;
  font-size: 0.85rem;
}

.pay-status {
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
}

.modal-pay {
  width: 100%;
  margin: 8px 0 0;
}

.wallet-note {
  font-size: 0.75rem;
  color: var(--muted);
}

@media (max-width: 800px) {
  .header,
  .machine {
    flex-direction: column;
  }

  .header,
  .hero,
  .machine,
  .faq {
    padding-left: 16px;
    padding-right: 16px;
    margin-left: 0;
  }

  .scribble {
    margin-top: 8px;
  }

  .hole,
  .hole-caption {
    margin-left: 8px;
  }
}
