/* Screens, title, prologue, crowd, tray, visitor card, finale */
#app { max-width: 560px; margin: 0 auto; height: 100%; }
.screen {
  min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px; padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  animation: in .5s ease both;
}
@keyframes in { from { opacity: 0; transform: translateY(10px); } }

/* ----- Title ----- */
.title-card { text-align: center; }
.kicker { font-family: var(--hand); font-size: 1.6rem; color: var(--accent); margin: 0; }
.logo {
  font-family: var(--display); font-weight: 800; font-size: clamp(2.8rem, 13vw, 4.2rem); line-height: .9;
  margin: 4px 0 12px; color: var(--ink); letter-spacing: -.02em;
  text-shadow: 0 2px 0 var(--paper), 0 6px 18px var(--wash-1);
}
.logo span { display: block; font-style: italic; font-weight: 400; color: var(--accent); font-size: .72em; }
.sub { max-width: 30ch; margin: 0 auto; color: var(--ink-soft); line-height: 1.45; }
.pick-label { margin: 8px 0 -6px; font-family: var(--hand); font-size: 1.5rem; }
.seasons { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; }
.season-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 10px 18px;
  border: 0; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow);
  transition: transform .15s;
}
.season-card:active { transform: scale(.96); }
.season-card[data-pick="fall"] { background: linear-gradient(160deg, #fbe7cc, #f3c99a); }
.season-card[data-pick="xmas"] { background: linear-gradient(160deg, #f6e1df, #d8e6dc); }
.season-art { font-size: 2.6rem; filter: drop-shadow(0 4px 6px rgba(0,0,0,.15)); }
.season-card strong { font-family: var(--display); font-size: 1.25rem; }
.season-card em { font-size: .85rem; color: var(--ink-soft); }

/* ----- Prologue ----- */
#s-prologue .page { width: 100%; min-height: 46vh; display: flex; align-items: center; }
#prologue-text { font-family: var(--display); font-size: 1.35rem; line-height: 1.5; margin: 0; }
.dots { display: flex; gap: 8px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--accent); }

/* ----- Crowd ----- */
.crowd-screen { justify-content: flex-start; gap: 10px; height: 100%; min-height: 0; padding-bottom: 0; }
.crowd-head { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.count b { font-family: var(--display); font-size: 2.3rem; font-weight: 800; color: var(--accent); display: block; line-height: 1; font-variant-numeric: tabular-nums; }
.count span { font-size: .85rem; color: var(--ink-soft); }
.count.bump b { animation: bump .4s ease; }
@keyframes bump { 50% { transform: scale(1.15); } }
.zoom { display: flex; gap: 8px; }
.chips { width: 100%; display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }
.chips span {
  font-size: .8rem; padding: 5px 10px; border-radius: 999px; background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line); animation: in .4s ease both;
}
.chips span::before { content: '✓ '; color: var(--leaf); font-weight: 700; }
.crowd {
  width: 100%; flex: 1; min-height: 0; border-radius: var(--radius); overflow: hidden;
  background: rgba(255, 250, 240, .5); box-shadow: inset 0 0 0 1px var(--line); position: relative;
}
.crowd-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; touch-action: pan-y; }
.crowd-canvas { position: absolute; inset: 0; display: block; pointer-events: none; }
.crowd-spacer { width: 1px; }

/* Clue tray: the next clue as a card you can apply */
.tray { width: calc(100% + 32px); padding: 14px 16px max(16px, env(safe-area-inset-bottom)); }
.clue {
  background: var(--paper); border-radius: var(--radius) var(--radius) 18px 18px; box-shadow: var(--shadow);
  padding: 16px 18px; animation: rise .45s cubic-bezier(.2, .9, .3, 1.2) both;
}
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.clue small { font-family: var(--hand); font-size: 1.15rem; color: var(--accent); }
.clue h3 { font-family: var(--display); margin: 2px 0 6px; font-size: 1.2rem; }
.clue p { margin: 0 0 6px; color: var(--ink-soft); line-height: 1.4; font-size: .95rem; }
.clue .rule { color: var(--ink); font-weight: 700; margin-bottom: 12px; }
.clue .btn { width: 100%; }

/* ----- Visitor card ----- */
.sheet { position: fixed; inset: 0; background: rgba(40, 25, 15, .35); display: flex; align-items: flex-end; justify-content: center; z-index: 10; animation: in .25s ease both; }
.sheet-card {
  width: min(560px, 100%); background: var(--paper); border-radius: 26px 26px 0 0; box-shadow: var(--shadow);
  padding: 20px 20px max(20px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start;
  animation: rise .3s ease both;
}
.sheet-card canvas { width: 120px; height: 120px; border-radius: 18px; background: var(--paper-2); }
.sheet-card h3 { font-family: var(--display); margin: 2px 0; }
.sheet-card .status { margin: 0 0 6px; font-weight: 700; font-size: .9rem; }
.sheet-card .status.out { color: var(--ink-soft); }
.sheet-card .status.in { color: var(--accent); }
.sheet-card ul { margin: 0; padding: 0; list-style: none; font-size: .9rem; color: var(--ink-soft); columns: 2; column-gap: 12px; }
.sheet-card li { break-inside: avoid; padding: 2px 0; }
.sheet-card .btn { grid-column: 1 / -1; }

/* ----- Finale ----- */
.finale { text-align: center; width: 100%; }
.finale canvas { width: 160px; height: 160px; border-radius: 50%; background: var(--paper-2); box-shadow: 0 0 0 6px var(--glow); }
.finale h2 { font-family: var(--display); font-size: 1.8rem; margin: 14px 0 6px; color: var(--accent); }
.finale blockquote { font-family: var(--hand); font-size: 1.45rem; margin: 12px 0; color: var(--accent-2); }
.finale p { line-height: 1.5; }
.unmask { animation: unmask 1.2s ease both; }
@keyframes unmask { 0% { transform: rotate(0); } 20% { transform: rotate(-8deg) scale(1.05); } 40% { transform: rotate(8deg); } 60% { transform: rotate(-4deg); } 100% { transform: none; } }

/* Season cards with their painted covers */
.season-card { position: relative; overflow: hidden; min-height: 230px; justify-content: flex-end; }
.season-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.season-cover ~ * { position: relative; }
.season-cover ~ .season-art { display: none; }
.season-card:has(.season-cover)::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(30, 18, 10, .78)); }
.season-card:has(.season-cover) strong, .season-card:has(.season-cover) em { position: relative; z-index: 1; color: #fffaf0; }

/* Another Crowd */
.another { text-align: center; }
.another .pick-label small { display: block; font-family: var(--body); font-size: .85rem; color: var(--ink-soft); }
.another-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.clue .cookies { float: right; font-size: 1rem; }
.clue .btn + .btn { margin-top: 8px; }

/* Prologue over a painting: the art fills the screen, the words sit on a paper card at the bottom */
#s-prologue.has-art { justify-content: flex-end; }
#s-prologue.has-art::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--art) center top / cover no-repeat; } /* full-bleed on every screen */
#s-prologue.has-art .page { min-height: 0; background: rgba(251, 244, 230, .93); backdrop-filter: blur(3px); }
#s-prologue.has-art #prologue-text { font-size: 1.2rem; }
#s-prologue.has-art .dots i { background: rgba(255, 250, 240, .6); }
#s-prologue.has-art .dots i.on { background: var(--accent); }

/* Another Crowd: the last three, side by side */
.finalists { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.finalist { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 14px; background: var(--paper-2); text-align: center; transition: opacity .3s; }
.finalist canvas { width: 56px; height: 56px; border-radius: 50%; background: var(--paper); }
.finalist b { font-family: var(--display); font-size: .9rem; }
.finalist ul { list-style: none; margin: 0; padding: 0; font-size: .72rem; line-height: 1.3; color: var(--ink-soft); }
.finalist .btn { width: 100%; min-height: 38px; padding: 0 6px; margin-top: auto; }
.finalist.wrong { opacity: .4; }
.finalist.wrong b { text-decoration: line-through; }
.clue .how { font-size: .9rem; }

/* Coupon gift */
.gift { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; max-width: 528px; padding: 18px; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--paper), #fff3d6); box-shadow: var(--shadow), inset 0 0 0 2px var(--glow); color: var(--ink); text-decoration: none; text-align: center; }
.gift-tag { font-family: var(--hand); font-size: 1.3rem; color: var(--accent); }
.gift b { font-family: var(--display); font-size: 1.3rem; }
.gift-code { font-family: 'Courier New', monospace; font-weight: 700; font-size: 1.3rem; letter-spacing: .12em; padding: 6px 14px; border: 2px dashed var(--accent); border-radius: 10px; margin: 4px 0; }
.gift small { color: var(--ink-soft); line-height: 1.35; }
.gift-go { margin-top: 6px; font-weight: 700; color: var(--accent-2); }
.clue .gift { margin-top: 10px; box-shadow: inset 0 0 0 2px var(--glow); }
