/* =========================================================
   CROWD CONTROL — guest site styles
   Every size/position below comes from the Figma frames
   (393px-wide phone artboard). The artboard is scaled to the
   phone's width with CSS zoom (see js/ui.js → fitStage).
   ========================================================= */

:root {
  --bg: #130d0f;
  --pink: #ffbbc5;
  --pink-2: #f6b5bf;
  --pink-3: #f3ccd1;
  --pink-4: #ecb4be;
  --timer-bg: #b5a4a7;
  --timer-fill: #f8b6bf;
  --green: rgba(74, 177, 115, 0.43);
  --glass: rgba(243, 204, 209, 0.064); /* Figma: rgba(243,204,209,.2) @ 32% opacity */
  --field: rgba(207, 157, 163, 0.25); /* Figma: rgba(207,157,163,.5) @ 50% opacity */
  --mono: "Intel One Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --dot: "Doto", "Intel One Mono", monospace;
  --z: 1;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  font-family: var(--mono);
  color: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100dvh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input { font: inherit; }

/* ---------- artboard ---------- */
.stage {
  position: relative;
  width: 393px;
  margin: 0 auto;
  zoom: var(--z);
  overflow: hidden;
}
.stage.h850 { height: 850px; }
.stage.h890 { height: 890px; }
.stage.h1212 { height: 1212px; }
.abs { position: absolute; }
.cx { left: 50%; transform: translateX(-50%); }
.screen[hidden] { display: none !important; }

/* ---------- shared pieces ---------- */
.logo-circle {
  position: absolute; left: 157px; top: 85px;
  width: 80px; height: 81px; border-radius: 49px; overflow: hidden; display: block;
}
.logo-circle img {
  position: absolute; left: -10%; top: -8.05%; width: 122.5%; height: 117.33%; max-width: none;
}

.title {
  position: absolute; top: 186px; left: 0; right: 0; margin: 0;
  text-align: center; font-weight: 300; font-size: 27px; line-height: normal;
  color: var(--pink); white-space: nowrap;
}
.title.bold { font-weight: 700; }

/* stacked translucent panels (Figma stacks several of these) */
.glass {
  position: absolute; border-radius: 30px;
  background: var(--glass);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.13),
    inset 0 1px 18px rgba(255, 255, 255, 0.035);
}
.glass.x2 { background: rgba(243, 204, 209, 0.124); }
.glass.x3 { background: rgba(243, 204, 209, 0.18); }
.glass.x4 { background: rgba(243, 204, 209, 0.233); }

/* ---------- green Doto button ---------- */
.gbtn {
  position: absolute; display: block; width: 250px; height: 75px; border-radius: 30px;
  isolation: isolate;
}
.gbtn .lbl-clip {
  position: absolute; inset: 0; border-radius: 30px; overflow: hidden;
}
.gbtn .lbl {
  position: absolute; left: 0; right: 0; top: 8px; margin: 0;
  font-family: var(--dot); font-weight: 700; font-size: 48px; line-height: normal;
  font-variation-settings: "ROND" 0;
  text-align: center; color: #dcf7e6; white-space: nowrap;
  /* faint dotted rows peeking in at the top/bottom edges (from the Figma) + a soft glow */
  text-shadow: 0 -49px 0 rgba(255, 236, 130, 0.45), 0 51px 0 rgba(255, 236, 130, 0.45), 0 0 10px rgba(150, 255, 195, 0.35);
}
/* frosted-glass green: tinted glass behind the label, glossy highlight on top */
.gbtn::before {
  content: ""; position: absolute; inset: 0; border-radius: 30px; z-index: -1;
  background: linear-gradient(180deg, rgba(110, 205, 150, 0.40) 0%, rgba(52, 140, 90, 0.30) 100%);
  -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 14px rgba(160, 255, 200, 0.14),
    0 8px 22px rgba(0, 0, 0, 0.35);
}
.gbtn::after {
  content: ""; position: absolute; inset: 1px; border-radius: 29px; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.20) 0%, rgba(255, 255, 255, 0.05) 44%, rgba(255, 255, 255, 0) 52%);
}
.gbtn:active { transform: scale(0.98); }
.gbtn[disabled] { opacity: 0.55; cursor: default; }
.gbtn.cx:active { transform: translateX(-50%) scale(0.98); }

@keyframes shake { 0%,100% { translate: 0 } 25% { translate: -6px } 75% { translate: 6px } }
.shake { animation: shake 0.25s 2; }

/* ---------- timer bar ---------- */
.timer {
  position: fixed; left: 0; right: 0; bottom: 0; height: calc(21px * var(--z));
  background: var(--timer-bg); z-index: 5;
}
.timer > i { display: block; height: 100%; width: 0; background: var(--timer-fill); }
.timer[hidden] { display: none; }

/* ---------- pill (change vote / add song) ---------- */
.pill-wrap { position: absolute; }
.pill {
  position: absolute; display: block; border-radius: 30px;
  background: var(--field);
  box-shadow: 0 0 4px 3px rgba(255, 255, 255, 0.125);
}
.pill-text {
  position: absolute; left: 0; right: 0; margin: 0; text-align: center;
  font-weight: 300; font-size: 20px; line-height: normal; color: rgba(255, 255, 255, 0.75);
 pointer-events: none; white-space: nowrap;
}

/* ===================== HOME ===================== */
.home-m {
  position: absolute; left: 176px; top: 67px; width: 42px; height: 39px; overflow: hidden; display: block;
}
.home-m img, .about-m img {
  position: absolute; left: -8.22%; top: 4.23%; width: 116.44%; height: 100%; max-width: none;
}
.home-m::after, .about-m::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.2); }
.disc {
  position: absolute; left: -6px; top: 93px; width: 406px; height: 423px;
  border-radius: 148px; overflow: hidden;
  touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
  will-change: transform;
}
.disc.dragging { cursor: grabbing; }
.disc img { pointer-events: none; -webkit-user-drag: none; }
.disc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.small-caps {
  position: absolute; left: 0; right: 0; margin: 0; text-align: center;
  font-weight: 300; font-size: 12px; line-height: normal; color: var(--pink-3);
}
.presented {
  position: absolute; left: 0; right: 0; top: 768px; margin: 0; text-align: center;
  color: var(--pink-3); font-weight: 300; font-size: 12px; letter-spacing: 0.24px; line-height: 1;

}
.presented b { font-weight: 600; font-size: 20px; letter-spacing: 0.4px; }
.tagline {
  position: absolute; left: 42px; width: 308px; top: 815px; margin: 0; text-align: center;
  font-size: 12px; line-height: normal; color: var(--pink-4);
}
.find-more {
  position: absolute; left: 97px; top: 996px; width: 197px; height: 23px; display: block;
}
.find-more span {
  position: absolute; left: 0; right: 0; top: 2px; text-align: center;
  font-size: 12px; line-height: normal; color: var(--pink-4);
}
.find-more::after { content: ""; position: absolute; inset: 0; border-radius: 30px; background: rgba(74, 177, 115, 0.18); }

.icon-link { position: absolute; display: block; color: #fff; }
.icon-link svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 0 1.5px rgba(255,255,255,.35)); }

/* ===================== ABOUT ===================== */
.about-body {
  position: absolute; left: 35px; width: 324px; top: 230px; margin: 0;
  text-align: center; font-weight: 500; font-size: 16px; line-height: normal; color: #fff;
}
.about-body p { margin: 0; }
.about-body p + p { margin-top: 19px; }
.about-m {
  position: absolute; left: 102px; top: 565px; width: 190px; height: 176px; overflow: hidden; display: block;
}

/* ===================== SUBMISSION ===================== */
.field {
  position: absolute; left: 40px; width: 315px; height: 37px; border-radius: 30px;
  background: var(--field); box-shadow: 0 0 4px 3px rgba(255, 255, 255, 0.125);
  border: 0; outline: none; padding: 0 16px;
  font-family: var(--mono); font-weight: 300; font-size: 20px; text-align: center; color: #fff;
  -webkit-appearance: none; appearance: none;
}
.field::placeholder { font-style: italic; color: rgba(255, 255, 255, 0.75); }
.field:focus { box-shadow: 0 0 4px 3px rgba(255, 255, 255, 0.125), 0 0 0 1.5px rgba(255, 187, 197, 0.6); }
.field.bad { box-shadow: 0 0 4px 3px rgba(255, 255, 255, 0.125), 0 0 0 1.5px #ff7a8c; }

.pref-row { position: absolute; left: 0; top: 408px; width: 393px; height: 41px; }
.pref-row .t {
  position: absolute; top: 0; margin: 0; font-weight: 300; font-size: 20px; line-height: normal;
  color: #fff; text-align: center;
}
.pref-row label { cursor: pointer; }
.radio {
  position: absolute; top: 8px; width: 16px; height: 18px; border-radius: 30px;
  border: 1px solid #fff;
}
.radio::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--pink); opacity: 0; transition: opacity .15s;
}
.pref-row input { position: absolute; opacity: 0; pointer-events: none; }
.pref-row input:checked + .radio::after { opacity: 1; }
.pref-row input:focus-visible + .radio { outline: 1.5px solid var(--pink); outline-offset: 2px; }

/* songs card (from the "song / artist / time" row in the Figma) */
.songs-card { position: absolute; left: 27px; width: 344px; }
.songs-head {
  position: relative; display: grid; grid-template-columns: 1fr 1fr 16px; gap: 8px;
  padding: 14px 13px 0; font-weight: 300; font-size: 12px; color: rgba(255,255,255,.67); text-align: center;
}
.songs-list { position: relative; padding: 6px 13px 16px; display: grid; gap: 10px; }
.song-row { display: grid; grid-template-columns: 1fr 1fr 16px; gap: 8px; position: relative; align-items: center; }
.song-row .field {
  position: relative; left: auto; width: 100%; height: 33px; font-size: 14px; padding: 0 8px;
}
.song-row .field::placeholder { font-size: 14px; }
.song-row .rm {
  width: 16px; height: 33px; color: rgba(255,255,255,.45); font-size: 15px; line-height: 33px; text-align: center;
}
.song-row .field:focus { text-align: left; }
.add-song { position: relative; display: block; margin: 16px auto 0; width: 193px; height: 37px; }
.add-song .pill { inset: 0; }
.add-song .pill-text { top: 6px; font-size: 18px; }

.form-msg {
  position: relative; width: 100%; margin: 14px 0 0; padding: 0 24px; text-align: center;
  font-size: 14px; line-height: 1.35; color: var(--pink); min-height: 19px;
}
.notes-card { position: relative; left: 27px; width: 344px; height: 69px; margin-top: 19px; }
.notes-card .field { left: 13px; top: 16px; width: 318px; }

/* genre: three boxes on one row */
.genre-card {
  position: absolute; width: 344px; height: 87px; margin: 0; padding: 13px; border: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px;
}
.genre { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.genre input { position: absolute; opacity: 0; pointer-events: none; }
.genre span {
  display: flex; align-items: center; justify-content: center; height: 61px; border-radius: 24px;
  background: var(--field); box-shadow: 0 0 4px 3px rgba(255, 255, 255, 0.125);
  font-weight: 300; font-style: italic; font-size: 15px; line-height: 1.2; text-align: center;
  color: rgba(255, 255, 255, 0.75); transition: background .15s, box-shadow .15s, color .15s;
}
.genre input:checked + span {
  background: rgba(255, 255, 255, 0.30); color: #fff; font-style: normal;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.40), 0 0 12px rgba(255, 187, 197, 0.35);
}
.genre input:focus-visible + span { outline: 1.5px solid var(--pink); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===================== VOTE ===================== */
.vote-q {
  position: absolute; left: 57px; width: 281px; top: 266px; margin: 0;
  text-align: center; font-weight: 700; font-size: 27px; line-height: normal;
  color: var(--pink);
}
.pcard {
  position: absolute; top: 352px; height: 237px; border-radius: 30px; display: block; text-align: left;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), inset 0 1px 16px rgba(255,255,255,.03);
  transition: background .15s, box-shadow .15s;
}
.pcard.p1 { left: 40px; width: 150px; }
.pcard.p2 { left: 204px; width: 149px; }
.pcard .head {
  position: absolute; left: 0; top: 0; right: 0; height: 106px; border-radius: 30px;
  background: rgba(243, 204, 209, 0.124);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  transition: background .15s;
}
.pcard .name {
  position: absolute; left: 50%; top: 38px; transform: translate(-50%, 0);
  width: 130px; height: 58px; margin: 0; display: flex; align-items: flex-start; justify-content: center;
  text-align: center; font-weight: 300; font-size: 24px; line-height: 1.15; color: #fff;
  overflow-wrap: anywhere;
}
.pcard .songs {
  position: absolute; left: 14px; right: 6px; top: 116px; bottom: 12px; margin: 0; padding: 0 6px 6px 0;
  list-style: none; overflow-y: auto; overscroll-behavior: contain;
  font-weight: 300; font-size: 12px; line-height: normal; color: rgba(255,255,255,.67);
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(#000 80%, transparent);
          mask-image: linear-gradient(#000 80%, transparent);
}
.pcard .songs::-webkit-scrollbar { display: none; }
.pcard .songs li { margin: 0 0 6px; overflow-wrap: anywhere; }
/* VOTE SELECTION frame */
.pcard.sel {
  background: rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.32);
}
.pcard.sel .head { background: rgba(243, 204, 209, 0.54); box-shadow: none; }

/* POST VOTING */
.done-text {
  position: absolute; left: 0; right: 0; margin: 0; text-align: center;
  font-weight: 700; font-size: 40px; line-height: normal; color: var(--pink-2);
}

/* PRE VOTING (closed) */
.lock {
  position: absolute; left: 81px; top: 307px; width: 230px; height: 184px; opacity: 0.62;
}
.lock .body {
  position: absolute; left: 1px; top: 85px; width: 229px; height: 198px; border-radius: 36px;
  background: #fdb9c3; filter: blur(4px);
}
.lock .shackle { position: absolute; left: 24px; top: 0; width: 182px; height: 129px; }
.lock .shackle img {
  position: absolute; display: block; max-width: none;
  left: -16.69%; right: -17.23%; top: -21.71%; bottom: -21.71%;
  width: calc(100% + 33.92%); height: calc(100% + 43.42%);
}
.closed-text {
  position: absolute; left: 97px; width: 198px; top: 414px; margin: 0;
  text-align: center; font-weight: 700; font-size: 36px; line-height: normal;
  color: #fff;
}

/* ROUND WINNER */
.win-card { position: absolute; left: 30px; top: 243px; width: 344px; height: 134px; }
.win-card .glow {
  position: absolute; inset: 0; border-radius: 30px; background: rgba(243,204,209,.064);
  box-shadow: 0 0 11.9px 7px rgba(255, 255, 255, 0.32);
}
.win-card .pillshape {
  position: absolute; inset: 0; border-radius: 136px; background: rgba(243,204,209,.18);
  box-shadow: 0 4px 4px rgba(0,0,0,.25), inset 0 0 0 1px rgba(255,255,255,.14);
}
.win-card .wname {
  position: absolute; left: 20px; right: 20px; top: 0; bottom: 0; margin: 0;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-weight: 700; font-size: 40px; line-height: 1.05; color: #fff;
  overflow-wrap: anywhere;
}
.vs {
  position: absolute; left: 182px; top: 370px; width: 39px; margin: 0; text-align: center;
  font-weight: 300; font-size: 27px; line-height: normal; color: var(--pink);
}
.lose-card { position: absolute; left: 76px; top: 407px; width: 246px; height: 79px; }
.lose-card .lname {
  position: absolute; left: 14px; right: 14px; top: 0; bottom: 0; margin: 0;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-weight: 300; font-size: 24px; line-height: 1.1; color: #fff;
  overflow-wrap: anywhere;
}

/* small status line (demo mode, connection) */
.banner {
  position: fixed; left: 8px; right: 8px; top: 8px; z-index: 20; margin: 0 auto; max-width: 420px;
  padding: 6px 12px; border-radius: 14px; font-size: 11px; text-align: center;
  background: rgba(40, 26, 30, 0.85); color: var(--pink-3); box-shadow: 0 0 0 1px rgba(255,255,255,.1);
}
.banner[hidden] { display: none; }
.banner a { text-decoration: underline; }

/* ---------- email chooser (opens Gmail / Outlook / the phone's mail app) ---------- */
.mail-sheet {
  position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(10, 6, 8, 0.6); backdrop- -webkit-backdrop-
  padding: 16px; animation: sheetFade .15s ease;
}
.mail-sheet[hidden] { display: none; }
.mail-card {
  width: 100%; max-width: 380px; border-radius: 30px; padding: 22px 18px 18px;
  background: #241a1d; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 10px 40px rgba(0,0,0,.5);
  font-family: var(--mono); color: #fff; text-align: center; margin-bottom: max(8px, env(safe-area-inset-bottom));
}
.mail-card h2 { margin: 0; font-weight: 700; font-size: 20px; color: var(--pink); }
.mail-card .addr { margin: 6px 0 16px; font-weight: 300; font-size: 14px; color: rgba(255,255,255,.7); overflow-wrap: anywhere; }
.mail-card .opt {
  display: block; width: 100%; margin: 0 0 10px; padding: 11px 14px; border-radius: 30px; border: 0;
  background: rgba(207,157,163,.25); box-shadow: 0 0 4px 3px rgba(255,255,255,.1);
  font-family: var(--mono); font-weight: 300; font-size: 18px; color: rgba(255,255,255,.9); text-decoration: none; cursor: pointer;
}
.mail-card .opt:active { transform: scale(.98); }
.mail-card .close { background: none; box-shadow: none; color: rgba(255,255,255,.5); font-size: 15px; margin: 4px 0 0; }
@keyframes sheetFade { from { opacity: 0; } to { opacity: 1; } }

/* ===================== CURATOR OF THE NIGHT ===================== */
.final-wrap { position: absolute; left: 24px; top: 251px; width: 344px; padding: 16px 16px 18px; border-radius: 30px; }
.final-wrap > .glass { border-radius: 30px; }
.final-q {
  position: relative; margin: 0 0 14px; text-align: center;
  font-weight: 700; font-size: 22px; line-height: 1.2; color: var(--pink);
}
.final-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fcard {
  position: relative; height: 92px; padding: 10px 10px; border-radius: 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: rgba(243, 204, 209, 0.124);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), inset 0 1px 16px rgba(255, 255, 255, .03);
  transition: background .15s, box-shadow .15s;
}
.fcard .fname {
  display: block; width: 100%; max-height: 50px; overflow: hidden;
  font-weight: 300; font-size: 20px; line-height: 1.15; color: #fff; text-transform: uppercase;
  text-align: center; overflow-wrap: anywhere;
}
.fcard .fgenre { font-weight: 300; font-style: italic; font-size: 11px; color: rgba(255, 255, 255, .67); }
.fcard.sel {
  background: rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.32), 0 0 14px rgba(255, 187, 197, .3);
}
.crown-genre {
  position: absolute; left: 0; right: 0; top: 400px; margin: 0; text-align: center;
  font-weight: 300; font-style: italic; font-size: 18px; color: rgba(255, 255, 255, .75);
}
