/* Layout idea: one narrow column of paper hang tags on a pool-green ground; the shirt print is the only loud object. */
:root {
  --pool: #0E4F52;
  --pool-deep: #093A3D;
  --tag: #FFF4DC;
  --ink: #17302F;
  --ink-soft: #4D6865;
  --hibiscus: #FF4D8D;
  --mustard: #FFC93C;
  --on-pool: #FFF4DC;
  --on-pool-soft: rgba(255, 244, 220, .78);
  --line: rgba(23, 48, 47, .22);
  --display: "Shrikhand", "Cooper Black", Georgia, serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--pool);
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 2px, transparent 2px 7px);
  color: var(--on-pool);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
}
.wrap { max-width: 560px; margin: 0 auto; padding: 22px 16px 48px; display: flex; flex-direction: column; gap: 18px; }

/* Hero */
.hero { display: flex; flex-direction: column; gap: 6px; }
.kicker { margin: 0; font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--mustard); }
h1 {
  margin: 0; font-family: var(--display); font-weight: 400;
  font-size: clamp(2.9rem, 15vw, 4.6rem); line-height: .92; letter-spacing: -.01em;
  color: var(--mustard); text-shadow: 3px 3px 0 var(--pool-deep); text-wrap: balance;
}
.hero-row { display: flex; align-items: center; gap: 14px; }
.lede { margin: 0; flex: 1; font-size: 1.02rem; color: var(--on-pool); max-width: 34ch; }
.shirt-btn {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: 0; padding: 4px; margin: 0; cursor: pointer; color: var(--on-pool-soft);
  font: 500 .72rem var(--body); border-radius: 12px;
}
.shirt-btn canvas { width: 132px; transform: rotate(-7deg); transition: transform .25s ease; }
.shirt-btn.wig canvas { animation: wig .45s ease; }
@keyframes wig { 0% { transform: rotate(-7deg) scale(1); } 40% { transform: rotate(6deg) scale(1.08); } 100% { transform: rotate(-7deg) scale(1); } }
canvas.shirt { display: block; aspect-ratio: 300 / 280; height: auto; }

/* Tabs */
.tabs { display: flex; gap: 8px; }
.tabs a {
  flex: 1; text-align: center; text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: 10px 12px; border-radius: 999px; border: 1.5px solid rgba(255,244,220,.45); color: var(--on-pool);
}
.tabs a[aria-current="page"] { background: var(--mustard); border-color: var(--mustard); color: var(--ink); }

/* Tags (cards) */
#app { display: flex; flex-direction: column; gap: 14px; }
.tag { background: var(--tag); color: var(--ink); border-radius: 14px; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.step { display: flex; align-items: baseline; gap: 10px; }
.step .num { font-family: var(--display); font-size: 1.7rem; line-height: 1; color: var(--hibiscus); }
h2 { margin: 0; font-size: 1.15rem; font-weight: 700; text-wrap: balance; }
.step .count { margin-left: auto; font-size: .85rem; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.hint, .note { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.note { background: rgba(255, 201, 60, .35); border-radius: 8px; padding: 8px 10px; color: var(--ink); }

.fields { display: flex; flex-direction: column; gap: 12px; }
.pair { display: flex; gap: 10px; flex-wrap: wrap; }
.pair .field { flex: 1 1 140px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.field small { font-size: .8rem; color: var(--ink-soft); }
input[type="text"], input[type="url"], select, textarea {
  width: 100%; min-width: 0; font: 500 16px var(--body); color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px;
}
textarea { font: 500 14px/1.4 var(--mono); resize: vertical; }
select { padding-right: 6px; }
:focus-visible { outline: 3px solid var(--hibiscus); outline-offset: 2px; }
.hero :focus-visible, .tabs :focus-visible, .redo :focus-visible, .cta :focus-visible, .how :focus-visible, .wrap > a:focus-visible, footer :focus-visible { outline-color: var(--mustard); }

/* Crew */
.crew, .apart-list, .handout { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.crew-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 44px; gap: 8px; align-items: center; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid var(--line); background: transparent;
  color: var(--ink); font: 600 1.3rem/1 var(--body); cursor: pointer;
}
.apart-add { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 8px; align-items: center; }
.apart-add span { font-size: .9rem; color: var(--ink-soft); }
.apart-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 4px 4px 4px 12px; font-weight: 600; }
.apart-list .icon-btn { border: 0; width: 38px; height: 38px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--hibiscus); flex: none; }
.check strong { display: block; font-weight: 700; }
.check small { display: block; font-size: .88rem; color: var(--ink-soft); }

/* Buttons */
button { font-family: var(--body); }
.btn-primary {
  width: 100%; cursor: pointer; font-weight: 700; font-size: 1.1rem; color: var(--ink);
  background: var(--hibiscus); border: 2px solid var(--ink); border-radius: 999px; padding: 15px 20px;
  box-shadow: 0 4px 0 var(--ink); transition: transform .08s ease, box-shadow .08s ease;
}
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn-quiet {
  cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--ink); background: transparent;
  border: 1.5px solid var(--ink); border-radius: 999px; padding: 10px 14px;
}
.btn-quiet.done { background: var(--ink); color: var(--tag); }
.btn-on-pool {
  cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--on-pool); background: transparent;
  border: 1.5px solid rgba(255,244,220,.5); border-radius: 999px; padding: 10px 16px;
}
a.btn-on-pool { display: inline-block; text-decoration: none; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: inherit; text-decoration: underline; cursor: pointer; }
.go { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.error { margin: 0; font-weight: 600; font-size: .95rem; color: var(--ink); background: var(--mustard); border-radius: 10px; padding: 10px 12px; }
.error:empty { display: none; }

/* Drawn view */
.summary h2, .gate h2 { font-family: var(--display); font-weight: 400; font-size: 1.8rem; line-height: 1.05; color: var(--hibiscus); overflow-wrap: anywhere; }
.summary p, .gate p { margin: 0; }
.eyebrow { font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.handout li { border-top: 1.5px dashed var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.who strong { font-size: 1.08rem; overflow-wrap: anywhere; }
.size { font: 500 .78rem var(--mono); border: 1.5px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.pill { margin-left: auto; font-size: .76rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; border: 1.5px solid var(--line); color: var(--ink-soft); white-space: nowrap; }
.pill.sent { background: var(--mustard); border-color: var(--mustard); color: var(--ink); }
.pill.seen { background: var(--pool); border-color: var(--pool); color: var(--on-pool); }
.acts { display: flex; gap: 8px; flex-wrap: wrap; }
.acts button { flex: 1 1 150px; }
.redo, .cta { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; color: var(--on-pool-soft); font-size: .92rem; }
.redo p, .cta p { margin: 0; }
.redo .row, .cta .row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Reveal tag */
.reveal {
  position: relative; background: var(--tag); color: var(--ink); border-radius: 16px;
  padding: 34px 18px 20px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
}
.reveal::before { content: ""; position: absolute; top: 12px; left: 20px; width: 14px; height: 14px; border-radius: 50%; background: var(--pool); box-shadow: inset 0 2px 0 rgba(0,0,0,.25); }
.reveal-to { margin: 0; font-weight: 600; color: var(--ink-soft); }
.reveal-top { display: flex; align-items: center; gap: 12px; width: 100%; }
.reveal-top canvas { width: 118px; flex: none; transform: rotate(5deg); }
.reveal-name { margin: 0; min-width: 0; font-family: var(--display); font-size: clamp(2.2rem, 12vw, 3.4rem); line-height: .95; color: var(--hibiscus); text-shadow: 2px 2px 0 var(--ink); overflow-wrap: anywhere; }
.facts { margin: 0; width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.facts div { background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.facts dt { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.facts dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.brief { margin: 0; width: 100%; background: var(--mustard); border-radius: 10px; padding: 10px 12px; font-weight: 700; font-size: 1.05rem; }
.brief span { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; opacity: .75; }
.rules { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.shop { width: 100%; border-top: 1.5px dashed var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.shop h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.shop .acts a { flex: 1 1 88px; text-align: center; text-decoration: none; }
.shop .acts small { font-weight: 500; font-size: .78rem; white-space: nowrap; }

/* Pass-the-phone overlay */
#overlay { position: fixed; inset: 0; z-index: 10; background: var(--pool-deep); overflow-y: auto; padding: 24px 16px; }
#overlay[hidden] { display: none; }
.sheet { max-width: 520px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.sheet h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 10vw, 3rem); line-height: 1; color: var(--mustard); overflow-wrap: anywhere; }
.sheet > p { margin: 0; color: var(--on-pool); }

/* Rules page */
h1.long { font-size: clamp(2.2rem, 11vw, 3.4rem); line-height: 1; }
.kicker a { color: inherit; }
a.btn-primary { display: block; text-align: center; text-decoration: none; }
.prose ul, .prose ol { margin: 0; padding-left: 1.25em; display: flex; flex-direction: column; gap: 8px; }
.prose p { margin: 0; }
.prose a { color: inherit; font-weight: 700; }
.prose dl { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.prose dt { font-weight: 700; }
.prose dd { margin: 2px 0 0; color: var(--ink-soft); }

/* How it works + footer */
.how h2 { font-size: 1rem; color: var(--mustard); margin-bottom: 8px; }
.how ol { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; font-size: .92rem; color: var(--on-pool-soft); max-width: 60ch; }
footer { font-size: .85rem; color: var(--on-pool-soft); max-width: 60ch; }
footer p { margin: 0 0 6px; }
footer strong { color: var(--on-pool); }
.how p { margin: 10px 0 0; font-size: .92rem; }
.how a, footer a { color: var(--mustard); font-weight: 600; }

@media (min-width: 620px) {
  .wrap { padding-top: 40px; }
  .shirt-btn canvas { width: 170px; }
  .tag { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .shirt-btn.wig canvas { animation: none; }
  .btn-primary, .shirt-btn canvas { transition: none; }
}
