/* Fonts, colors, bottom sheet and toast come from the shared kit: dv/dv.css (sync with npm run sync-kit). */

:root {
  --yellow: var(--dv-yellow);
  --black: var(--dv-night);
  --white: var(--dv-white);
  --bar: 78px;
  --font: var(--dv-futura);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--black); color: var(--white); }
body {
  font-family: var(--font);
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
}
button, select { font: inherit; color: inherit; text-transform: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

#app {
  max-width: 480px;
  margin: 0 auto;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: var(--black);
}

/* ---------- header (from the screen grabs) ---------- */
.bar {
  flex: 0 0 auto;
  height: calc(var(--bar) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 16px 0 12px;
  background: var(--yellow);
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.logo { background: none; border: 0; padding: 0; height: 56px; }
.logo img { height: 56px; width: auto; display: block; }
.bar-btn { background: none; border: 0; font-size: 20px; letter-spacing: .04em; padding: 10px 2px; color: var(--black); }
.bar-btn.boxed {
  background: var(--white); border-radius: 12px; padding: 12px 34px;
  box-shadow: 0 4px 0 rgba(0,0,0,.18), 0 6px 10px rgba(0,0,0,.15);
}
.bar-btn.dark { background: var(--black); color: var(--yellow); border-radius: 12px; padding: 12px 34px; }
.demo-badge { font-size: 11px; background: var(--black); color: var(--yellow); padding: 4px 8px; border-radius: 6px; letter-spacing: .06em; }

/* ---------- screens ---------- */
.screen {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 12px calc(6px + env(safe-area-inset-bottom));
  animation: fadeIn .25s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }
.kicker { margin: 0 0 10px; font-size: 15px; letter-spacing: .06em; }
.yellow-text { color: var(--yellow); font-size: 18px; }
.center { text-align: center; }

/* ---------- 1. vote: card + question ---------- */
.prompt { display: flex; gap: 22px; align-items: center; padding: 10px 12px 4px; }
.card {
  flex: 0 0 112px;
  height: 162px;
  background: var(--white);
  color: var(--black);
  border: 4px solid #c8c8c8;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(255,255,255,.08), 0 4px 10px rgba(0,0,0,.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 6px;
  touch-action: none;
  transition: background .25s, border-color .25s, transform .2s;
}
.card-slot { width: 74px; height: 74px; position: relative; }
.card-slot .sticker { position: absolute; left: 0; top: 0; margin: 0; transform: none; }
.card-text { font-size: 11px; line-height: 1.3; text-align: center; letter-spacing: .03em; }
.card.next { background: var(--yellow); border-color: var(--yellow); justify-content: center; }
.card.next .card-slot { display: none; }
.card.next .card-text { font-size: 20px; line-height: 1.12; }
.card.next:active { transform: scale(.96); }
.question h1 { margin: 0 0 12px; font-size: clamp(26px, 8vw, 34px); line-height: 1.05; letter-spacing: .03em; font-weight: normal; }
.dots { display: flex; gap: 7px; }
.dots button { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--white); background: none; padding: 0; }
.dots button.done { background: var(--yellow); border-color: var(--yellow); }
.dots button.now { background: var(--white); }

.matrix-wrap { flex: 1 1 auto; min-height: 300px; position: relative; touch-action: none; }

/* ---------- matrix ---------- */
.mx-svg { position: absolute; inset: 0; overflow: visible; }
.mx-board { fill: var(--white); }
.mx-lines line { stroke: var(--black); stroke-width: 1.3; }
.mx-label {
  position: absolute;
  font-size: 19px;
  letter-spacing: .06em;
  white-space: nowrap;
  color: var(--white);
  pointer-events: none;
}
.mx-top { transform: translate(-50%, -100%); }
.mx-bottom { transform: translate(-50%, 0); }
.mx-left { writing-mode: vertical-rl; transform: translate(-100%, -50%) rotate(180deg); }
.mx-right { writing-mode: vertical-rl; transform: translate(0, -50%); }
.mx-stickers { position: absolute; inset: 0; pointer-events: none; }
.mx-grow { transform-box: fill-box; transform-origin: center; animation: grow .7s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes grow { from { opacity: 0; transform: scale(.2); } }
.mx-pop { transform-box: fill-box; transform-origin: center; animation: grow .35s ease both; }

/* ---------- stickers: colored disc + Jen's ink ---------- */
.sticker {
  position: absolute;
  left: 0; top: 0;
  width: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  touch-action: none;
  z-index: 2;
  transition: transform .18s ease, opacity .2s;
}
.sticker-face {
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--c, var(--yellow));
  rotate: var(--tilt);
  box-shadow: 2px 4px 6px rgba(0,0,0,.45);
  overflow: hidden;
}
.sticker-face img { width: 100%; height: 100%; display: block; }
.sticker-label {
  margin-top: 3px;
  font-size: 17px;
  color: var(--black);
  letter-spacing: .05em;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 4px #fff;
}
.sticker.slap .sticker-face { animation: slap .35s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes slap { from { scale: 1.45; } }
.sticker.lifted { transition: none; z-index: 9; }
.sticker.lifted .sticker-face { scale: 1.15; box-shadow: 4px 14px 18px rgba(0,0,0,.4); }
.sticker.faded { opacity: .3; }
.drag-ghost { position: fixed; z-index: 50; pointer-events: none; }
.hint {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: var(--black); color: var(--yellow); padding: 6px 10px; border-radius: 8px;
  font-size: 14px; letter-spacing: .05em; text-align: center; pointer-events: none; white-space: nowrap;
  animation: breathe 1.8s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: .55; } }

/* ---------- dropdown pills (results + mashup) ---------- */
.pill {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--white);
  border-radius: 12px;
  padding: 8px 18px 8px 16px;
  margin: 0 4px 6px;
  position: relative;
  border-left: 8px solid var(--c, var(--white));
}
.pill strong { font-weight: normal; font-size: 22px; letter-spacing: .04em; line-height: 1; display: block; }
.pill small { font-size: 12px; letter-spacing: .05em; display: block; margin-top: 2px; }
.pill select { position: absolute; inset: 0; opacity: 0; width: 100%; font-size: 16px; }
.chev { width: 16px; height: 16px; border-right: 3px solid var(--white); border-bottom: 3px solid var(--white); rotate: 45deg; translate: 0 -5px; }
.mash-head { display: grid; gap: 0; }

.res-foot { display: flex; align-items: center; gap: 10px; padding: 4px 6px 0; }
.share-btn { flex: 0 0 auto; background: var(--yellow); color: var(--black); border: 0; border-radius: 10px; padding: 9px 12px; font-size: 14px; letter-spacing: .05em; }
.verdict { flex: 1; text-align: left !important; margin: 0; font-size: 13px; line-height: 1.35; letter-spacing: .04em; color: var(--yellow); text-align: center; min-height: 1.35em; }
.verdict b { color: var(--white); font-weight: normal; }

@media (min-width: 600px) {
  body { background: #1b1b1b; }
  #app { height: min(100dvh, 920px); margin-top: max(0px, calc((100dvh - 920px) / 2)); border-radius: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
}
@media (max-height: 700px) {
  .card { height: 128px; flex-basis: 96px; }
  .card-slot { width: 58px; height: 58px; }
  .bar { --bar: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
