/* Layout: one narrow column of paper notes taped onto a yellow gingham tablecloth, like the stand in Chapter 5. */
@font-face { font-family: "Patrick Hand"; src: url("assets/fonts/patrick-hand.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Permanent Marker"; src: url("assets/fonts/permanent-marker.woff2") format("woff2"); font-display: swap; }
:root {
  --cloth: #fff6cf;
  --check: rgba(240, 196, 40, 0.30);
  --paper: #fffdf7;
  --ink: #26231e;
  --ink-soft: #5e584d;
  --lemon: #f5cd2f;
  --lemon-dark: #8a6a00;
  --tape: rgba(232, 219, 178, 0.92);
  --shadow: rgba(60, 48, 10, 0.20);
  --focus: #1f6f8b;
  --font-sign: "Permanent Marker", "Marker Felt", "Comic Sans MS", cursive;
  --font-hand: "Patrick Hand", "Chalkboard SE", "Comic Sans MS", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background-color: var(--cloth);
  background-image:
    linear-gradient(90deg, var(--check) 50%, transparent 50%),
    linear-gradient(var(--check) 50%, transparent 50%);
  background-size: 48px 48px;
  color: var(--ink);
  font-family: var(--font-hand);
  font-size: 1.2rem;
  line-height: 1.4;
}
.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 28px 40px;
  display: grid;
  gap: 30px;
}
.note {
  position: relative;
  background: var(--paper);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 10px 22px var(--shadow);
  padding: 26px 22px 22px;
}
.note::before, .note::after {
  content: "";
  position: absolute;
  top: -12px;
  width: 92px;
  height: 26px;
  background: var(--tape);
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.note::before { left: -14px; transform: rotate(-24deg); }
.note::after { right: -14px; transform: rotate(22deg); }
.note.one-tape::after { display: none; }
.note.one-tape::before { left: calc(50% - 46px); transform: rotate(-3deg); }
h1, h2 { font-family: var(--font-sign); font-weight: 400; line-height: 1.05; margin: 0; text-wrap: balance; }
h2 { font-size: 1.7rem; }
p { margin: 0; }
.block { display: block; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.muted { color: var(--ink-soft); }

/* the sign */
.sign { transform: rotate(-1.2deg); text-align: center; padding-top: 30px; }
.sign h1 { font-size: clamp(3.2rem, 15vw, 5.2rem); letter-spacing: 0.02em; }
.sign .stars { justify-content: center; margin: 10px 0 14px; }
.sign .stars svg { width: 50px; height: 50px; }
.sign .who { font-size: 1.35rem; }
.sign .price { font-family: var(--font-sign); font-size: 1.5rem; margin-top: 4px; }
.teddy-note { font-size: 1rem; color: var(--ink-soft); margin-top: 10px; }

.stars { display: flex; gap: 2px; align-items: center; }
.stars svg { width: 22px; height: 22px; flex: none; }
.star-shape { stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; fill: var(--paper); }
.star-shape.on { fill: var(--lemon); }

/* photo */
.photo { padding: 12px 12px 10px; transform: rotate(1.4deg); }
.photo img { display: block; width: 100%; height: auto; }
.photo figcaption { text-align: center; color: var(--ink-soft); padding-top: 8px; font-size: 1.05rem; }
figure { margin: 0; }

/* rating form */
.rate { display: grid; gap: 14px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-family: var(--font-sign); font-size: 1.7rem; padding: 0; margin-bottom: 4px; }
.pick { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pick label { cursor: pointer; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; }
.pick label svg { width: 48px; height: 48px; transition: transform .12s ease; }
.pick label:hover svg { transform: scale(1.08) rotate(-4deg); }
.pick input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.special-tag { font-size: 1rem; color: var(--ink-soft); transform: rotate(-4deg); }
textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  font: inherit;
  color: var(--ink);
  background: repeating-linear-gradient(var(--paper), var(--paper) 31px, #cfe0ea 32px);
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 6px 10px;
  line-height: 32px;
}
textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
button {
  font: inherit;
  cursor: pointer;
  color: var(--ink);
  background: var(--lemon);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 8px 18px;
  box-shadow: 3px 3px 0 var(--ink);
}
button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.count { color: var(--ink-soft); font-size: 1rem; margin-left: auto; font-variant-numeric: tabular-nums; }
.error { color: #9b1c1c; }
.reply {
  border-left: 4px solid var(--lemon);
  background: #fffbe6;
  padding: 10px 14px;
  font-size: 1.25rem;
}

/* reviews */
.reviews { display: grid; gap: 18px; }
.when-label { font-size: 1.05rem; color: var(--ink-soft); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs button {
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--ink);
  padding: 4px 12px;
  font-size: 1.05rem;
}
.tabs button[aria-selected="true"] { background: var(--lemon); }
.avg { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.avg .num { font-family: var(--font-sign); font-size: 3rem; line-height: 1; font-variant-numeric: tabular-nums; }
.avg .txt { font-size: 1.3rem; }
.spoiler { font-size: 1rem; color: var(--ink-soft); }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.feed li { border-top: 2px dashed #d9cfae; padding-top: 12px; display: grid; gap: 4px; }
.feed li:first-child { border-top: 0; padding-top: 0; }
.feed .meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--ink-soft); font-size: 1rem; }
.feed .text { font-size: 1.3rem; }
.feed .owner { font-size: 1.05rem; color: var(--ink-soft); padding-left: 14px; }
.feed .owner b { color: var(--ink); font-weight: 400; text-decoration: underline; text-decoration-color: var(--lemon); text-decoration-thickness: 4px; }
.feed li.you { background: #fffbe6; margin-inline: -10px; padding-inline: 10px; padding-bottom: 8px; border-radius: 4px; }

/* sunday extras */
.extras { display: grid; gap: 30px; }
.menu ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.menu li { display: flex; gap: 8px; align-items: baseline; font-size: 1.35rem; }
.menu li .dots { flex: 1; border-bottom: 3px dotted var(--ink-soft); transform: translateY(-5px); min-width: 20px; }
.menu .fine { margin-top: 10px; font-size: 1rem; color: var(--ink-soft); }
.loyal { transform: rotate(-1deg); }
.punches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; max-width: 330px; }
.punches span { aspect-ratio: 1; border: 2px dashed var(--ink-soft); border-radius: 50%; display: grid; place-items: center; font-size: 1rem; color: var(--ink-soft); }
.punches span.stamped { border-style: solid; border-color: var(--ink); background: var(--lemon); color: var(--ink); }
.team ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.team li { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: 10px; }
.team li b { font-weight: 400; text-decoration: underline; text-decoration-color: var(--lemon); text-decoration-thickness: 4px; }

footer { display: grid; gap: 10px; font-size: 1.05rem; color: var(--ink-soft); padding: 4px 6px 0; }
footer .grownups { font-size: .98rem; }
footer a { color: var(--ink); }

.special-tag .up { display: none; }
@media (max-width: 480px) {
  .note::before { left: -4px; }
  .note::after { right: -4px; }
  .note.one-tape::before { left: calc(50% - 46px); }
  .special-tag { flex-basis: 100%; text-align: right; padding-right: 6px; margin-top: -4px; }
  .special-tag .left { display: none; }
  .special-tag .up { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .pick label svg, button { transition: none; }
  .pick label:hover svg { transform: none; }
}
