:root {
  --paper: #f3eadb;
  --card: #fffaf1;
  --ink: #2b2420;
  --soft: #6d6158;
  --line: #d9cbb5;
  --rust: #c2502b;
  --sage: #4f7a5a;
  --mustard: #d9a23b;
  --tape: rgba(230, 210, 160, .75);
  --hand: "Caveat", cursive;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Work Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 17px/1.6 var(--sans);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .2 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 20% 0%, #fbf4e7 0%, transparent 60%), var(--paper);
}
a { color: var(--rust); text-underline-offset: 3px; }
.page { max-width: 1040px; margin: 0 auto; padding: 28px 24px 80px; }
.page.narrow { max-width: 620px; }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }
.brand { font: 600 22px var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand em { font-style: italic; color: var(--rust); }
.account { display: flex; gap: 14px; align-items: center; font-size: 14px; color: var(--soft); flex-wrap: wrap; }
.account a, .account button {
  font: 500 14px var(--sans); color: var(--ink); background: none; border: 1.5px solid var(--ink);
  border-radius: 999px; padding: 4px 14px; cursor: pointer; text-decoration: none;
}
.account a:hover, .account button:hover { background: var(--ink); color: var(--card); }

.hello { font: var(--hand); font-size: 30px; color: var(--rust); margin: 0; transform: rotate(-2deg); display: inline-block; }
h1 { font: 500 clamp(40px, 7vw, 76px)/1.02 var(--serif); letter-spacing: -.03em; margin: 6px 0 18px; font-variation-settings: "SOFT" 100; }
h1 .scribble { position: relative; font-style: italic; white-space: nowrap; }
h1 .scribble svg { position: absolute; left: -4%; bottom: -.18em; width: 108%; height: .4em; overflow: visible; }
.lede { max-width: 560px; color: var(--soft); font-size: 19px; margin: 0 0 56px; }

.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 44px; }
.choice {
  position: relative; display: block; background: var(--card); color: var(--ink); text-decoration: none;
  padding: 40px 34px 34px; border-radius: 4px 6px 5px 3px;
  box-shadow: 0 1px 0 var(--line), 0 18px 30px -18px rgba(60, 40, 20, .35);
  background-image: repeating-linear-gradient(transparent 0 31px, #ece0cc 31px 32px);
  background-position: 0 92px; transition: transform .25s ease, box-shadow .25s ease;
}
.choice:nth-child(1) { transform: rotate(-1.4deg); }
.choice:nth-child(2) { transform: rotate(1.1deg); }
.choice:hover { transform: rotate(0) translateY(-6px); box-shadow: 0 1px 0 var(--line), 0 28px 40px -20px rgba(60, 40, 20, .45); }
.choice::before {
  content: ""; position: absolute; top: -13px; left: 50%; width: 112px; height: 28px; margin-left: -56px;
  background: var(--tape); transform: rotate(-3deg); box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.choice:nth-child(2)::before { transform: rotate(4deg); background: rgba(183, 205, 184, .8); }
.choice .num { font: 600 15px var(--mono); color: var(--rust); }
.choice h2 { font: 500 34px/1.1 var(--serif); margin: 6px 0 12px; letter-spacing: -.02em; }
.choice p { margin: 0 0 22px; color: var(--soft); }
.choice .go { font: 700 26px var(--hand); color: var(--rust); }
.choice .go::after { content: " →"; display: inline-block; transition: transform .2s; }
.choice:hover .go::after { transform: translateX(6px); }
.choice svg.doodle { position: absolute; right: 22px; top: 26px; width: 64px; height: 64px; opacity: .9; }

.footnote { margin-top: 72px; font: 22px var(--hand); color: var(--soft); text-align: center; }

/* Panels & forms on the paper pages */
.sheet { background: var(--card); border-radius: 6px; padding: 34px; box-shadow: 0 1px 0 var(--line), 0 18px 30px -20px rgba(60, 40, 20, .35); }
.sheet h1 { font-size: clamp(34px, 5vw, 48px); }
.tabs { display: flex; gap: 6px; margin-bottom: 24px; border-bottom: 1.5px solid var(--line); }
.tabs button { font: 500 16px var(--sans); background: none; border: 0; padding: 10px 14px; cursor: pointer; color: var(--soft); border-bottom: 3px solid transparent; margin-bottom: -1.5px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--rust); }
label.f { display: block; margin-bottom: 16px; font-weight: 500; font-size: 15px; }
label.f input, label.f textarea {
  display: block; width: 100%; margin-top: 6px; font: 17px var(--sans); color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 6px; padding: 11px 13px;
}
label.f input:focus, label.f textarea:focus, .code-input:focus { outline: none; border-color: var(--ink); box-shadow: 3px 3px 0 var(--mustard); }
.btn {
  font: 600 16px var(--sans); color: var(--card); background: var(--ink); border: 0; border-radius: 999px;
  padding: 12px 26px; cursor: pointer; box-shadow: 3px 3px 0 var(--rust); transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--rust); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.ghost { background: none; color: var(--ink); border: 1.5px solid var(--ink); box-shadow: none; }
.btn.sage { box-shadow: 3px 3px 0 var(--sage); }
.linkish { background: none; border: 0; color: var(--rust); font: inherit; cursor: pointer; text-decoration: underline; padding: 0; }
.msg { margin: 14px 0 0; font-size: 15px; min-height: 1em; }
.msg.err { color: #a3361a; }
.msg.ok { color: var(--sage); }
.muted { color: var(--soft); }

.code-input {
  width: 100%; font: 600 30px var(--mono); letter-spacing: .12em; text-transform: uppercase; text-align: center;
  padding: 16px; border: 2px dashed var(--ink); border-radius: 8px; background: #fff; color: var(--ink);
}
.result { margin-top: 28px; }
.stamp {
  display: inline-block; font: 700 15px var(--mono); letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 14px; border: 2.5px solid currentColor; border-radius: 6px; transform: rotate(-4deg);
}
.stamp.pending { color: var(--mustard); }
.stamp.approved { color: var(--sage); }
.stamp.rejected { color: #a3361a; }
.ticket { display: flex; gap: 18px; align-items: flex-start; padding: 18px 0; border-top: 1.5px dashed var(--line); }
.ticket:first-child { border-top: 0; }
.ticket img { width: 96px; height: 64px; object-fit: cover; border-radius: 4px; background: var(--line); flex: none; }
.ticket h3 { font: 500 22px/1.2 var(--serif); margin: 0 0 4px; }
.ticket .meta { font-size: 14px; color: var(--soft); }
.ticket .code { font: 600 14px var(--mono); }
.ticket .body { flex: 1; min-width: 0; }
.note { margin-top: 8px; padding: 8px 12px; background: #f6efe3; border-left: 3px solid var(--mustard); font-size: 15px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filters button { font: 500 14px var(--sans); border: 1.5px solid var(--ink); background: none; border-radius: 999px; padding: 5px 14px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--card); }
details.more { margin-top: 10px; font-size: 15px; }
details.more summary { cursor: pointer; color: var(--rust); }
details.more dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0; }
details.more dt { color: var(--soft); }
details.more dd { margin: 0; word-break: break-word; white-space: pre-wrap; }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.actions-row textarea { flex: 1 1 240px; font: 15px var(--sans); border: 1.5px solid var(--line); border-radius: 6px; padding: 8px 10px; min-height: 42px; }
.hidden { display: none !important; }

@media (max-width: 600px) {
  .choice { transform: none !important; }
  .sheet { padding: 24px 20px; }
  .ticket { flex-direction: column; }
}

.btn.google { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--card); color: var(--ink); border: 1.5px solid var(--ink); }
.or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--soft); font: 500 14px var(--sans); }
.or::before, .or::after { content: ""; flex: 1; border-top: 1.5px dashed var(--line); }

/* Submit game form */
.game-form h2 { font: 500 28px/1.15 var(--serif); letter-spacing: -.02em; margin: 44px 0 18px; padding-top: 28px; border-top: 1.5px dashed var(--line); }
.game-form h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.game-form h2 .num { font: 600 15px var(--mono); color: var(--rust); vertical-align: middle; margin-right: 6px; }
.game-form h2 .opt { font: 700 22px var(--hand); color: var(--soft); margin-left: 4px; }
.game-form .section-note { margin: -8px 0 20px; font-size: 15px; }
.game-form .field { margin-bottom: 22px; }
.game-form .lbl { display: block; font-weight: 500; font-size: 15px; margin-bottom: 6px; }
.game-form input[type="text"], .game-form input[type="url"], .game-form input[type="email"], .game-form textarea, .game-form select {
  display: block; width: 100%; font: 17px var(--sans); color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 6px; padding: 11px 13px;
}
.game-form input::placeholder, .game-form textarea::placeholder { color: #a99c8f; }
.game-form input:focus, .game-form textarea:focus, .game-form select:focus { outline: none; border-color: var(--ink); box-shadow: 3px 3px 0 var(--mustard); }
.game-form textarea { resize: vertical; min-height: 130px; }
.game-form select { width: auto; min-width: 200px; cursor: pointer; }
.game-form .hint { color: var(--soft); font-size: 14px; margin-top: 6px; }
.game-form .row { display: grid; gap: 12px; }
.game-form .row.tags { grid-template-columns: repeat(3, 1fr); }
.game-form .stack { display: grid; gap: 8px; }
.game-form .agree + .field { margin-top: 28px; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0; cursor: pointer; line-height: 1.45; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--rust); flex-shrink: 0; }
.game-form .actions, .done .actions { display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.form-error { text-align: right; }
.done .actions a.btn { text-decoration: none; display: inline-block; }
.tracking {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 26px 0 18px; padding: 20px 22px; border: 2px dashed var(--ink); border-radius: 8px; background: #fff;
}
.tracking .lbl { width: 100%; font: 700 22px var(--hand); color: var(--rust); }
.tracking output { font: 600 30px var(--mono); letter-spacing: .12em; color: var(--ink); }
@media (max-width: 600px) { .game-form .row.tags { grid-template-columns: 1fr; } }
