@font-face {
  font-family: Poppins;
  src: url('/live-polls/assets/fonts/Poppins-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Poppins;
  src: url('/live-polls/assets/fonts/Poppins-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Poppins;
  src: url('/live-polls/assets/fonts/Poppins-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --blue: #1faaff;
  --cyan: #009fff;
  --violet: #7650ff;
  --ink: #050e2e;
  --surface: #081431;
  --pale: rgba(134, 167, 255, .2);
  --muted: #b4bfda;
  --text: #fafafb;
  --gradient: linear-gradient(110deg, #1faaff, #009fff 33%, #7650ff);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100svh;
  color: var(--text);
  background-color: var(--ink);
  background-image: linear-gradient(rgba(2, 10, 34, .3), rgba(2, 10, 34, .3)), url('/live-polls/assets/event/background.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  font-family: Poppins, Arial, sans-serif;
  font-weight: 300;
  line-height: 1.6;
}
header {
  min-height: 88px;
  padding: 24px 5vw;
  display: flex;
  align-items: center;
  gap: 36px;
  border-bottom: 1px solid rgba(150, 176, 255, .12);
}
header .organizer-logo { width: 254px; height: 28px; object-fit: contain; }
.header-event { font-size: 15px; letter-spacing: .5px; }
.header-event b { color: var(--blue); margin-left: 6px; font-weight: 400; }
#connection { margin-left: auto; font-size: 12px; font-weight: 400; white-space: nowrap; }
.connected { color: #9de7db; }
.disconnected { color: #ffd494; }
main { max-width: 1600px; margin: auto; padding: 28px 5vw 24px; }
.eyebrow { display: flex; justify-content: space-between; gap: 20px; color: var(--blue); font-size: 10px; font-weight: 400; letter-spacing: 2px; margin-bottom: 32px; }
.eyebrow span { color: var(--muted); text-align: right; }
h1 { font-size: clamp(32px, 3.8vw, 66px); line-height: 1.2; font-weight: 700; letter-spacing: -1.3px; margin: 20px 0; }
h2 { font-size: 25px; line-height: 1.4; letter-spacing: -.4px; font-weight: 700; }
h3 { font-weight: 700; }
a { color: #9edbff; text-underline-offset: 4px; }
button, a { touch-action: manipulation; }
button {
  font: 400 14px Poppins, Arial, sans-serif;
  cursor: pointer;
  min-height: 48px;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: white;
  background: var(--gradient);
  box-shadow: 0 6px 24px rgba(0, 35, 135, .12);
  transition: filter .2s, border-color .2s;
}
button:hover { filter: brightness(1.16); }
button:disabled { opacity: .5; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
button.quiet { color: #b5dfff; border-color: var(--pale); background: rgba(8, 20, 49, .65); box-shadow: none; }
.experience { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5vw; align-items: center; min-height: 58vh; }
#stage { min-width: 0; }
#welcome, #waiting, #idle, #ended { text-align: center; }
.event-mark {
  --mark-scale: .5;
  width: calc(910.86px * var(--mark-scale));
  height: calc(492px * var(--mark-scale));
  max-width: 100%;
  margin: 0 auto;
}
.event-mark-art { position: relative; width: 910.86px; height: 492px; transform: scale(var(--mark-scale)); transform-origin: top left; }
.event-mark-art span { position: absolute; top: 0; left: 5.1px; color: #fafafb; font-size: 83px; font-weight: 300; line-height: 1.63; }
.event-mark-art img { position: absolute; display: block; max-width: none; }
.mark-accent { left: 165.807px; top: 216.252px; }
.mark-word { left: 0; top: 133.229px; }
.mark-edition { left: 664.43px; top: 450px; }
.event-divider { width: 100px; height: 2px; border-radius: 2px; background: var(--gradient); margin: 26px auto; }
#welcome h1 { font-size: clamp(20px, 2vw, 28px); font-weight: 300; letter-spacing: -.4px; margin: 20px 0 8px; }
.lead { font-size: clamp(17px, 1.55vw, 24px); color: #d1d9ed; font-weight: 300; max-width: 720px; }
#welcome .lead, #waiting .lead, #idle .lead, #ended .lead { margin: 12px auto; }
#join { min-width: 230px; margin-top: 18px; text-align: left; font-size: 16px; }
#join span { float: right; margin-left: 30px; }
.event-theme { font-size: 13px; color: #a5b2d2; margin: 28px auto 0; max-width: 550px; }
.event-theme strong { color: #d7def1; font-weight: 700; }
#waiting .event-mark, #idle .event-mark, #ended .event-mark { --mark-scale: .4; }
#waiting h1, #idle h1, #ended h1 { font-size: clamp(28px, 3vw, 48px); font-weight: 300; letter-spacing: -.5px; }
.kicker { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; font-weight: 400; color: #85cdff; }
#voting-status { color: #b7c7e8; font-size: 14px; }
.panel { padding: 26px; margin: 22px 0; border: 1px solid rgba(129, 158, 255, .22); border-radius: 12px; background: rgba(5, 14, 40, .94); }
.controls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.controls button { padding: 12px 16px; }
.manual-controls { gap: 8px; margin: 18px 0; }
.manual-controls button { min-height: 36px; padding: 7px 12px; font-size: 12px; }
label { display: block; color: #dce3f4; font-weight: 400; font-size: 13px; }
input:not([type=radio]), select { font: 400 14px Poppins, Arial, sans-serif; padding: 14px; border: 1px solid #384b77; border-radius: 8px; background: #0a1839; color: var(--text); min-height: 50px; max-width: 100%; }
label select { display: block; margin-top: 6px; }
#question { max-width: 420px; }
#vote-form { max-width: 750px; margin: 24px 0; }
#vote-form > input { width: 100%; font-size: 20px; }
#vote-form > button { width: 100%; margin-top: 12px; }
.option { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 18px; margin: 12px 0; border: 1px solid #3a5489; border-radius: 9px; background: rgba(5, 16, 48, .88); font-size: 17px; font-weight: 300; cursor: pointer; }
.option:hover { border-color: #68b9ff; }
.option:has(input:checked) { border: 2px solid #52b9ff; background: rgba(30, 76, 145, .7); padding: 17px; }
.option input { width: 22px; height: 22px; flex-shrink: 0; accent-color: var(--blue); }
.bar-row { margin: 18px 0; }
.bar-label { display: flex; justify-content: space-between; gap: 20px; font-size: clamp(16px, 1.35vw, 24px); margin-bottom: 8px; }
.bar-label strong { color: #86cfff; font-weight: 400; white-space: nowrap; }
.track { height: 13px; border-radius: 5px; overflow: hidden; background: rgba(149, 173, 235, .18); }
.bar { height: 100%; min-width: 0; border-radius: 5px; background: var(--gradient); transform-origin: left; animation: bar-grow .65s ease; transition: width .7s ease; }
.count { color: #87ccff; font-weight: 400; }
.muted { color: var(--muted); font-size: 13px; }
.word-cloud { width: 100%; height: clamp(240px, 38vh, 500px); display: block; overflow: visible; }
.cloud-word { fill: currentColor; font-weight: 700; animation: arrive .5s ease; transition: x .5s ease, y .5s ease, font-size .5s ease; }
.color-0 { color: #4fc2ff; }
.color-1 { color: #fafafb; }
.color-2 { color: #b69aff; }
#message { color: #ffd1c0; min-height: 24px; font-size: 14px; }
#message:empty { min-height: 0; margin: 0; }
footer { display: flex; justify-content: space-between; gap: 24px; padding: 20px 5vw; margin-top: 20px; border-top: 1px solid rgba(129, 158, 255, .16); font-size: 10px; color: #a0afcf; letter-spacing: .5px; }
footer p { max-width: 450px; margin: 0; letter-spacing: 0; font-size: 10px; }
body::after { content: ''; display: block; height: 3px; background: var(--gradient); }
.admin-title { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.admin-title h1 { font-size: 40px; font-weight: 300; }
.admin-title a { font-size: 13px; white-space: nowrap; }
.fullscreen-hint { margin: -8px 0 20px; color: var(--muted); font-size: 12px; }
.fullscreen-hint kbd { padding: 2px 6px; border: 1px solid #384b77; border-radius: 4px; background: #0a1839; color: var(--text); font: inherit; white-space: nowrap; }
#admin-status { color: #a5d7ff; font-size: 13px; }
#admin-results .quiet { margin: 5px; }
#restore { display: flex; gap: 10px; flex-wrap: wrap; }
[data-command=close], [data-command=end], [data-command=hide], [data-command=pause], #previous, #next { background: #142650; border-color: #384d7e; box-shadow: none; }
[data-command=reset] { background: transparent; border-color: #966780; color: #ffd2db; box-shadow: none; }
[hidden] { display: none !important; }
body[data-mode=participant] main { max-width: 980px; }
body[data-mode=participant] #results { display: none; }
body[data-mode=participant] .experience { min-height: 61vh; }
body[data-mode=admin] main { max-width: 1500px; }
body[data-mode=presentation] .experience { grid-template-columns: minmax(0, 1fr); min-height: calc(100vh - 255px); }
body[data-mode=presentation] header { min-height: 76px; padding-top: 20px; padding-bottom: 20px; }
body[data-mode=presentation] main { padding-top: 20px; padding-bottom: 0; }
body[data-mode=presentation] .eyebrow { margin-bottom: 20px; }
body[data-mode=presentation] h1 { font-size: clamp(28px, 3vw, 55px); margin: 16px 0; }
body[data-mode=presentation] .bar-row { margin: clamp(8px, 1.6vh, 18px) 0; }
body[data-mode=presentation] .bar-label { font-size: clamp(15px, 1.35vw, 24px); margin-bottom: 6px; }
body[data-mode=presentation] .track { height: 12px; }
body[data-mode=presentation] .count { margin: 12px 0; }
body[data-mode=presentation] #waiting .event-mark { --mark-scale: .38; }
body[data-mode=presentation] #waiting h1 { font-size: clamp(27px, 2.5vw, 45px); }
@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 900px) {
  header { gap: 20px; }
  .header-event { display: none; }
  header .organizer-logo { width: 220px; height: auto; }
  .event-mark { --mark-scale: .42; }
  footer { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  header { min-height: 76px; padding: 22px 6vw; gap: 12px; }
  header .organizer-logo { width: 192px; height: auto; }
  #connection { font-size: 10px; }
  main { padding: 22px 6vw; }
  .eyebrow { font-size: 8px; letter-spacing: 1px; margin-bottom: 28px; gap: 14px; }
  .eyebrow span { max-width: 220px; }
  .experience { min-height: 57vh; }
  .event-mark, #waiting .event-mark, #idle .event-mark, #ended .event-mark { --mark-scale: .31; }
  #welcome h1 { font-size: 21px; line-height: 1.5; }
  .event-divider { margin: 24px auto; width: 75px; }
  .event-theme { font-size: 11px; }
  h1 { font-size: 31px; letter-spacing: -.6px; }
  .lead { font-size: 17px; }
  #join { width: 100%; max-width: 340px; }
  .controls { display: grid; grid-template-columns: minmax(0, 1fr); }
  .controls label, .controls select, #question { width: 100%; max-width: 100%; }
  .panel { padding: 18px; }
  .admin-title { display: block; }
  .admin-title h1 { font-size: 32px; }
  .bar-label { font-size: 15px; gap: 12px; }
  .option { font-size: 16px; padding: 16px; }
  .option:has(input:checked) { padding: 15px; }
  footer { flex-direction: column; gap: 12px; padding: 20px 6vw; }
  body[data-mode=presentation] .experience { grid-template-columns: minmax(0, 1fr); }
  body[data-mode=presentation] #waiting .event-mark { --mark-scale: .31; }
}
@media (max-width: 360px) {
  header .organizer-logo { width: 165px; }
  .event-mark, #waiting .event-mark, #idle .event-mark, #ended .event-mark, body[data-mode=presentation] #waiting .event-mark { --mark-scale: .28; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  header, footer { display: none; }
  body { background: white; color: black; }
}
