/* Draw Together styles. Reuses the photobooth design tokens + base component classes
   (.scene, .btn, .code, .swatch, .eyebrow, #toast…) and adds only what's specific to the
   draw scenes. Pastel, near-sharp corners, the two cursor colors as identity. The PACK /
   ROUNDS blocks mirror the debate ones so selection.js works unchanged. */

.start-tagline { color: var(--ink-soft); font-size: 15px; text-align: center; max-width: 36ch; }

/* ============ PACK ============ */
.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--s2);
  width: 100%;
}
.pack-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: var(--s3) var(--s3) var(--s2);
  min-height: 150px;
  background: var(--paper-raised);
  border: 2px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-soft);
  transition: transform 140ms ease, border-color 140ms ease;
  text-align: left;
}
.pack-card:hover { transform: translateY(-3px); }
.pack-emoji { font-size: 30px; line-height: 1; }
.pack-title { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.pack-blurb { color: var(--ink-soft); font-size: 13px; line-height: 1.4; }
.pack-count { margin-top: auto; font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); letter-spacing: 0.04em; }

/* selection borders (mirror .layout-card so selection.js works as-is) */
.pack-card[data-pick-color="pink"] { border-color: var(--pink); }
.pack-card[data-pick-color="blue"] { border-color: var(--blue); }
.pack-card.is-pair { border-style: solid; }

/* ============ ROUNDS ============ */
.rounds-block { display: flex; flex-direction: column; align-items: center; gap: var(--s1); }
.seg { display: flex; gap: var(--s1); flex-wrap: wrap; justify-content: center; }
.seg-btn {
  border: 1px solid var(--line);
  background: var(--paper-raised);
  border-radius: var(--r-ctrl);
  padding: 12px 22px;
  font-size: 17px;
  font-weight: 700;
  font-family: var(--font-display);
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}
.seg-btn:hover { transform: translateY(-1px); }
.seg-btn.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ============ DRAW (the live round) ============ */
.scene.draw { gap: var(--s2); max-width: 760px; }

.draw-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  gap: var(--s2);
}
.draw-header .eyebrow { justify-self: start; }
.draw-prompt {
  justify-self: center;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 4vw, 30px);
  letter-spacing: -0.02em;
  text-align: center;
}
.draw-timer {
  justify-self: end;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  padding: 4px 12px;
  border-radius: var(--r-ctrl);
  background: var(--paper-raised);
  border: 1px solid var(--line);
}
.draw-timer.is-urgent { color: #fff; background: var(--pink); border-color: var(--pink); animation: pulse-dot 1s ease-in-out infinite; }

/* the two stacked pads (you on top, partner below) */
.draw-pads { display: flex; flex-direction: column; gap: var(--s2); width: 100%; }
.draw-pad {
  position: relative;
  width: 100%;
  border: 2px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.draw-pad--me { border-color: var(--ink); }
.draw-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  background: #fff;
}
.draw-pad--me .draw-canvas { cursor: crosshair; }
.draw-pad--peer .draw-canvas { pointer-events: none; }

/* name tag in the corner, tinted to the player's cursor color */
.draw-tag {
  position: absolute;
  left: 10px;
  top: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
}
.draw-tag[data-color="pink"] { background: var(--pink); }
.draw-tag[data-color="blue"] { background: var(--blue); }

/* idle: dim the pads slightly so the prompt + start button lead */
.scene.draw.is-idle .draw-pads { opacity: 0.5; }

/* tools */
.draw-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--s2);
  width: 100%;
}
.draw-swatches, .draw-sizes { display: flex; align-items: center; gap: 8px; }
.draw-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--c);
  transition: transform 120ms ease, border-color 120ms ease;
}
.draw-swatch:hover { transform: scale(1.12); }
.draw-swatch.is-on { border-color: var(--ink); transform: scale(1.12); }
.draw-size {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
  background: var(--paper-raised);
}
.draw-size.is-on { border-color: var(--ink); background: var(--paper); }
.draw-size-dot { display: block; border-radius: 50%; background: var(--ink); }
.draw-clear { padding: 8px 14px; font-size: 14px; }

/* footer controls */
.draw-controls { display: flex; flex-direction: column; align-items: center; gap: var(--s1); }
.draw-status { color: var(--ink-soft); font-size: 14px; min-height: 20px; }

/* ============ REVEAL ============ */
.scene.reveal { gap: var(--s2); max-width: 920px; }
.reveal-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s2);
  width: 100%;
}
.reveal-card {
  position: relative;
  border: 2px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.reveal-img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; background: #fff; }
.reveal-card .draw-tag { left: 10px; top: 10px; }

/* ============ RESULT (gallery) ============ */
.scene.result { gap: var(--s2); max-width: 1000px; }
.gallery-trophy { font-size: 44px; line-height: 1; }
.gallery-headline { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 5vw, 40px); letter-spacing: -0.02em; }
.gallery-grid { display: flex; flex-direction: column; gap: var(--s3); width: 100%; }
.gallery-empty { color: var(--ink-soft); }
.gallery-round { display: flex; flex-direction: column; gap: var(--s1); width: 100%; }
.gallery-prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}
.gallery-idx { font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); }
.gallery-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.gallery-fig {
  position: relative;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.gallery-img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; background: #fff; }
.gallery-fig .draw-tag { left: 8px; top: 8px; font-size: 11px; }

/* ============ responsive ============ */
@media (max-width: 560px) {
  .reveal-cards { grid-template-columns: 1fr; }
  .draw-header { grid-template-columns: auto 1fr; }
  .draw-header .draw-prompt { grid-column: 1 / -1; order: 3; }
}
