:root {
  --bg: #0d0716;
  --surface: rgba(31, 18, 47, 0.82);
  --surface-strong: #231634;
  --surface-soft: #181021;
  --line: rgba(255, 255, 255, 0.09);
  --text: #fbf7ff;
  --muted: #a99eb8;
  --faint: #71657c;
  --purple: #a855f7;
  --purple-light: #d08aff;
  --cyan: #43e4eb;
  --orange: #ff9b61;
  --danger: #ff6e87;
  --green: #5eea9b;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 48% -20%, #42205f 0, transparent 33rem), radial-gradient(circle at 95% 45%, rgba(23, 151, 191, 0.12), transparent 24rem), var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
input, select, textarea { width: 100%; color: var(--text); background: #120b1b; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; outline: none; transition: border .2s, box-shadow .2s; }
input, select { height: 42px; padding: 0 12px; }
textarea { padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(168,85,247,.16); }
select { appearance: auto; }
input::placeholder, textarea::placeholder { color: #6c6077; }

.app-shell { max-width: 1780px; margin: 0 auto; padding: 0 28px 36px; }
.topbar { height: 92px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.auth-gate { display: grid; min-height: calc(100vh - 128px); place-items: center; padding: 48px 0; }
.auth-card { width: min(100%, 480px); position: relative; overflow: hidden; padding: 42px; text-align: center; border: 1px solid rgba(213,171,255,.28); border-radius: 22px; background: radial-gradient(circle at 50% 0, rgba(182,87,255,.24), transparent 44%), linear-gradient(145deg, rgba(42,25,62,.96), rgba(18,10,29,.92)); box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.auth-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; border: 1px solid rgba(255,255,255,.04); border-radius: inherit; }
.auth-icon { width: 60px; height: 60px; display: grid; place-items: center; margin: 0 auto 22px; color: #2c113e; border-radius: 18px; background: linear-gradient(135deg, #e99aff, #8f55f1); box-shadow: 0 12px 32px rgba(184,91,251,.32); }
.auth-icon svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.auth-card .eyebrow { margin-bottom: 10px !important; }
.auth-card h1 { margin: 0; color: var(--text); font-size: 25px; letter-spacing: -.7px; }
.auth-card > p:not(.eyebrow) { max-width: 340px; margin: 13px auto 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.auth-connect { width: 100%; margin-top: 25px; font-size: 13px; }
.auth-card > span { display: block; margin-top: 12px; color: var(--faint); font-size: 11px; }
.brand { min-height: 37px; text-decoration: none; color: var(--text); font-size: 26px; font-weight: 500; display: flex; gap: 11px; align-items: center; letter-spacing: -.5px; white-space: nowrap; }
.brand strong { color: var(--purple-light); font-weight: 800; line-height: 1; }
.avatar.brand-avatar { width: 36px; height: 36px; display: grid; flex: 0 0 36px; place-items: center; }
.channel-chip { margin-left: auto; border: 1px solid var(--line); border-radius: 999px; padding: 9px 11px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; background: rgba(18, 10, 29, .45); }
.channel-name { color: var(--text); font-weight: 700; margin-left: 0; }
.live-dot { width: 7px; height: 7px; display: block; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.live-dot.is-auth-required { animation: auth-required-pulse 2.5s ease-in-out infinite; }
@keyframes auth-required-pulse { 50% { opacity: .28; box-shadow: 0 0 3px rgba(255,211,90,.35); } }
.header-actions { display: flex; align-items: center; gap: 10px; }
.avatar { color: #20102f; font-weight: 900; width: 37px; height: 37px; padding: 0; overflow: hidden; border: 0; border-radius: 50%; background: linear-gradient(135deg, var(--cyan), #8e62ff); }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.brand-avatar #profile-avatar-fallback { width: 18px; height: 18px; display: grid; place-items: center; color: #241030; }
.brand-avatar #profile-avatar-fallback svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.avatar.has-profile-image { overflow: visible; border-radius: 0; background: transparent; }
.avatar.has-profile-image img { object-fit: contain; }

.dashboard { display: grid; grid-template-columns: minmax(280px, 340px) minmax(460px, 1fr) minmax(280px, 340px); gap: 22px; padding-top: 26px; align-items: start; }
.controls-column, .participants-column, .stage-column { display: grid; gap: 22px; }
.panel { position: relative; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(145deg, rgba(41,25,59,.9), rgba(21,12,31,.83)); box-shadow: var(--shadow); }
.settings-panel, .chat-panel, .participants-panel, .history-panel { padding: 22px; }
.settings-panel .panel-title-row { margin-bottom: 18px; }
.settings-panel #draw-form { display: grid; gap: 16px; }
.settings-panel .field-hint { margin: -8px 0 0; }
.settings-panel .switch-list { gap: 12px; padding: 0; }
.settings-panel .full-width { margin-top: 0; }
.settings-panel .button-primary { font-size: 13px; }
.settings-panel #start-button { font-size: 13px; font-weight: 760; }
.settings-panel #start-button, .settings-panel #choose-button { display: inline-flex; align-items: center; justify-content: center; }
.settings-panel #start-button .play-icon, .settings-panel #choose-button span { display: inline-flex; align-items: center; height: 16px; margin-right: 6px; font-size: 16px; line-height: 16px; }
.panel-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 18px; }
.panel-title-row.compact { margin-bottom: 14px; }
.panel h1, .panel h2, .panel p { margin-top: 0; }
.panel h1 { margin-bottom: 0; font-size: 20px; letter-spacing: -.6px; }
.panel h2 { margin: 0; font-size: 17px; letter-spacing: -.35px; }
.eyebrow { margin-bottom: 5px !important; color: var(--purple-light); font-size: 10px; font-weight: 800; line-height: 1.2; letter-spacing: 1.35px; text-transform: uppercase; }
.state-badge, .test-pill { padding: 5px 8px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.04); font-size: 10px; font-weight: 700; white-space: nowrap; }
.state-badge.is-collecting { color: #132817; border-color: transparent; background: var(--green); }
.state-badge.is-locked { color: #372208; border-color: transparent; background: #ffc475; }
.state-badge.is-finished { color: #261436; border-color: transparent; background: #d892ff; }
.test-pill { color: #0c2d30; border-color: transparent; background: var(--cyan); }

.field-label { display: block; margin: 15px 0 7px; color: #d8cfdf; font-size: 11px; font-weight: 750; }
.field-label span { color: var(--faint); font-weight: 500; }
.field-label em { color: var(--danger); font-style: normal; }
.phrase-wrap { position: relative; }
.phrase-wrap input { padding-right: 38px; font-weight: 700; letter-spacing: .2px; }
.phrase-icon { position: absolute; right: 13px; top: 9px; color: var(--purple-light); }
.field-hint, .panel-description { margin: 7px 0 0; color: var(--faint); font-size: 11px; line-height: 1.45; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two-fields .field-label, .two-fields label .field-label { margin-top: 15px; }
.is-hidden { display: none !important; }
.switch-list { display: grid; gap: 11px; padding: 18px 0 2px; }
.switch-row { display: flex; align-items: center; gap: 9px; color: #cec4d5; font-size: 12px; cursor: pointer; user-select: none; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch { width: 28px; height: 16px; padding: 2px; background: #34273f; border-radius: 999px; transition: background .2s; }
.switch::after { content: ""; display: block; width: 12px; height: 12px; background: #998da3; border-radius: 50%; transition: transform .2s, background .2s; }
.switch-row input:checked + .switch { background: #7e39ba; }
.switch-row input:checked + .switch::after { transform: translateX(12px); background: #f6e9ff; }
.button { min-height: 42px; padding: 0 14px; color: var(--text); border: 1px solid transparent; border-radius: 10px; font-size: 12px; font-weight: 760; letter-spacing: -.1px; transition: transform .16s, box-shadow .16s, background .16s; }
.button:not(:disabled):hover { transform: translateY(-1px); }
.button-primary { color: #1c0a2b; background: linear-gradient(110deg, #d07dff, #9b57f5); box-shadow: 0 10px 25px rgba(168,85,247,.26); }
.button-secondary { color: #062a2d; background: linear-gradient(110deg, #66eceb, #41bbc6); }
.button-ghost { color: #e6ddee; background: rgba(255,255,255,.055); border-color: rgba(255,255,255,.12); }
.button-danger { color: #ffbdc9; background: rgba(255,110,135,.10); border-color: rgba(255,110,135,.22); }
.button-choose { color: #210a31; min-width: 188px; background: linear-gradient(105deg, #ee96ff, #a858f3); box-shadow: 0 10px 32px rgba(194,91,255,.38); font-size: 13px; }
.button-choose span { font-size: 16px; margin-right: 6px; }
.small { min-height: 34px; padding: 0 10px; font-size: 11px; }
.full-width { width: 100%; margin-top: 19px; }
.play-icon { font-size: 10px; margin-right: 4px; }
.text-button { padding: 0; color: var(--purple-light); border: 0; background: transparent; font-size: 11px; font-weight: 750; }
.text-button:hover { color: #f2d8ff; text-decoration: underline; }
.chat-panel { display: grid; gap: 10px; padding: 18px; background: linear-gradient(145deg, rgba(30,31,58,.92), rgba(17,24,40,.84)); }
.test-chat-toggle { display: flex; align-items: center; width: 100%; min-height: 28px; padding: 0; color: var(--purple-light); border: 0; background: transparent; font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.test-mode-icon { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.test-chat-label { margin-left: 8px; }
.test-chat-chevron { font-size: 18px; line-height: .7; transition: transform .18s ease; }
.test-chat-toggle .test-chat-chevron { margin-left: auto; }
.chat-panel:not(.is-collapsed) .test-chat-chevron { transform: rotate(180deg); }
.chat-panel.is-collapsed { width: fit-content; display: grid; justify-self: start; gap: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.chat-panel.is-collapsed .test-chat-toggle { width: auto; height: 34px; min-height: 0; padding: 0 9px 0 0; border: 1px solid rgba(213,171,255,.28); border-radius: 7px; background: rgba(255,255,255,.035); }
.chat-panel.is-collapsed .test-mode-icon { box-sizing: border-box; width: 34px; height: 34px; margin-right: 8px; padding: 8px; border-radius: 6px; background: rgba(213,171,255,.07); }
.chat-panel.is-collapsed .test-chat-label { display: inline; margin-left: 0; color: var(--purple-light); font-size: 10px; }
.chat-panel.is-collapsed .test-chat-chevron { display: none; }
.test-chat-content { display: grid; gap: 10px; max-height: 380px; overflow: hidden; opacity: 1; transition: max-height .3s ease, opacity .2s ease, margin .3s ease; }
.chat-panel.is-collapsed .test-chat-content { max-height: 0; margin: 0; opacity: 0; pointer-events: none; }
.test-chat-form { display: grid; gap: 10px; margin: 0; }
.test-chat-form .field-label { margin: 0 0 6px; }
.test-chat-form .button { margin-top: 2px; }
.test-chat-content .text-button { width: fit-content; display: block; margin: 0; line-height: 1.25; text-align: left; }
.test-chat-content .history-clear { color: #ff9daf; }
.twitch-chat-panel { min-height: 604px; padding: 22px; }
.twitch-chat-empty { padding: 18px 0; color: var(--faint); font-size: 12px; line-height: 1.45; text-align: center; }
.twitch-chat-list { display: grid; gap: 10px; max-height: 700px; margin: 0; overflow-y: auto; padding: 0 2px 4px 0; list-style: none; }
.twitch-chat-list li { display: flex; align-items: flex-start; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.twitch-chat-avatar { width: 28px; height: 28px; display: grid; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 50%; color: #1a0930; background: var(--purple-light); font-size: 12px; font-weight: 900; }
.twitch-chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.twitch-chat-entry { min-width: 0; flex: 1; }
.twitch-chat-entry > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.twitch-chat-entry strong { min-width: 0; overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.twitch-chat-entry time { flex: 0 0 auto; color: var(--faint); font-size: 10px; }
.twitch-chat-entry p { margin: 3px 0 0; overflow-wrap: anywhere; color: #d7cddd; font-size: 12px; line-height: 1.4; }
.chat-feedback { margin: 10px 0 0; min-height: 30px; color: var(--faint); font-size: 11px; line-height: 1.4; }
.chat-feedback.good { color: var(--green); }
.chat-feedback.bad { color: var(--orange); }

.selection-panel { min-height: 360px; padding: 28px 30px 22px; overflow: hidden; background: radial-gradient(circle at 50% 42%, rgba(116,54,162,.15), transparent 33%), linear-gradient(145deg, rgba(43,25,63,.95), rgba(21,12,32,.92)); }
.selection-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; position: relative; z-index: 2; }
.selection-meta > div { width: 100%; }
.selection-meta h2 { text-align: center; }
.selection-meta h2 { font-size: 22px; }
.participant-counter { color: var(--muted); font-size: 12px; border: 1px solid var(--line); padding: 9px 11px; border-radius: 9px; background: rgba(10,6,17,.23); white-space: nowrap; }
.participant-counter strong { color: var(--text); font-size: 16px; margin: 0 3px; }
.settings-participant-counter { justify-self: stretch; text-align: center; }
.people-icon { color: var(--cyan); }
.selection-preview { min-height: 174px; display: grid; place-content: center; gap: 9px; margin: 28px auto 16px; padding: 24px; text-align: center; border: 1px solid rgba(213,171,255,.2); border-radius: 16px; background: radial-gradient(circle at 50% 0, rgba(166,83,245,.25), transparent 62%), rgba(9,5,15,.2); }
.selection-preview p { max-width: 360px; margin: 0; color: #ded0e6; font-size: 14px; line-height: 1.5; }
.selection-icon { color: var(--purple-light); font-size: 34px; filter: drop-shadow(0 0 14px rgba(208,138,255,.65)); }
.winner-messages-section { margin: 16px 0 0; }
.winner-messages-heading { margin-bottom: 8px !important; text-align: center; }
.winner-messages { min-height: 70px; padding: 14px; border: 1px solid rgba(213,171,255,.2); border-radius: 13px; background: rgba(9,5,15,.18); }
.winner-messages-list { display: grid; gap: 8px; max-height: 150px; overflow-y: auto; }
.winner-message-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 8px; background: rgba(255,255,255,.045); color: #f4eafa; font-size: 12px; line-height: 1.35; }
.winner-message-item span { min-width: 0; overflow-wrap: anywhere; }
.winner-message-item time { flex: 0 0 auto; color: var(--faint); font-size: 10px; }
.command-message-reveal { min-height: 26px; padding: 4px 9px; color: #efd7ff; border: 1px solid rgba(205,133,255,.42); border-radius: 7px; background: rgba(175,91,244,.12); font: inherit; font-weight: 700; line-height: 1.2; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.command-message-reveal:hover { border-color: rgba(224,166,255,.85); background: rgba(175,91,244,.24); transform: translateY(-1px); }
.command-message-reveal:focus-visible { outline: 2px solid var(--purple-light); outline-offset: 2px; }
.revealed-command-message { min-width: 0; overflow-wrap: anywhere; }
.stage-actions { display: flex; justify-content: center; gap: 11px; margin-top: 10px; }

.selection-preview:has(.winner-card:not(.is-hidden)) { display: block; padding: 24px 30px; }
.winner-card { position: relative; width: 100%; margin: 0; padding: 0 0 12px; overflow: visible; text-align: left; border: 0; border-radius: 0; background: transparent; }
.winner-card.is-revealing { animation: winner-reveal .52s cubic-bezier(.2,.85,.25,1) both; }
.winner-card.is-revealing::before { content: ""; position: absolute; z-index: -1; top: 50%; left: 50%; width: 80px; height: 80px; border-radius: 50%; background: rgba(209,126,255,.38); filter: blur(14px); transform: translate(-50%, -50%); animation: winner-flash .8s ease-out both; }
.winner-card.is-revealing .winner-avatar { animation: winner-avatar-reveal .62s cubic-bezier(.18,.9,.28,1.25) .08s both; }
.winner-card.is-revealing .winner-content > div { animation: winner-name-reveal .42s ease-out .2s both; }
.winner-card.is-revealing .winner-message { animation: winner-message-reveal .42s ease-out .16s both; }
.winner-card.is-revealing .winner-actions { animation: winner-actions-reveal .38s ease-out .3s both; }
@keyframes winner-reveal { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes winner-avatar-reveal { from { opacity: 0; transform: scale(.45) rotate(-14deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes winner-name-reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes winner-message-reveal { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: translateX(0); } }
@keyframes winner-actions-reveal { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes winner-flash { from { opacity: 0; transform: translate(-50%, -50%) scale(.2); } 35% { opacity: .9; } to { opacity: 0; transform: translate(-50%, -50%) scale(4.5); } }
@media (prefers-reduced-motion: reduce) { .winner-card.is-revealing, .winner-card.is-revealing::before, .winner-card.is-revealing .winner-avatar, .winner-card.is-revealing .winner-content > div, .winner-card.is-revealing .winner-message, .winner-card.is-revealing .winner-actions { animation: none; } }
.winner-layout { display: block; }
.winner-content { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; position: relative; margin-top: 12px; }
.winner-content > div { text-align: center; }
.winner-avatar { flex: 0 0 auto; width: 52px; height: 52px; display: grid; place-items: center; border: 3px solid rgba(255,255,255,.55); border-radius: 50%; color: #2a0d3f; background: linear-gradient(135deg, #7bf4e8, #d782ff); font-size: 23px; font-weight: 900; }
.winner-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.winner-content h2 { margin-bottom: 7px; font-size: 22px; }
.winner-picked-at { display: inline-block; margin: 0; padding: 5px 9px; color: #cfc3d6; border: 1px solid rgba(213,171,255,.2); border-radius: 7px; background: rgba(9,5,15,.18); font-size: 11px; text-align: center; }
.winner-message { position: absolute; top: 0; left: 0; width: min(190px, 38%); min-width: 0; padding: 10px 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: rgba(8,4,14,.18); }
.winner-message span { display: block; margin-bottom: 5px; color: var(--purple-light); font-size: 9px; font-weight: 800; letter-spacing: .8px; }
.winner-message p { display: -webkit-box; margin: 0; overflow: hidden; color: #f4eafa; font-size: 12px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.winner-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.winner-card .winner-actions { justify-content: center; margin: 16px auto 0; }
.winner-card .button-danger { color: #321607; border-color: transparent; background: linear-gradient(105deg, #ffbd70, #f58232); box-shadow: 0 7px 18px rgba(245,130,50,.22); }

.history-panel { padding: 14px 16px 10px; }
.history-panel .panel-title-row.compact { margin-bottom: 8px; }
.history-empty { color: var(--faint); font-size: 11px; padding: 7px 0 4px; }
.winner-history-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.winner-history-list li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.history-avatar { width: 27px; height: 27px; display: grid; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 50%; color: #1a0930; background: var(--purple-light); font-size: 11px; font-weight: 900; }
.history-avatar img { width: 100%; height: 100%; object-fit: cover; }
.history-entry-info { min-width: 0; }
.winner-history-list strong, .winner-history-list span { display: block; }
.winner-history-list strong { color: var(--text); font-size: 11px; }
.winner-history-list span { margin-top: 1px; color: var(--faint); font-size: 9px; }
.history-delete { width: 22px; height: 22px; display: grid; flex: 0 0 auto; place-items: center; padding: 0; color: #a8a1ad; border: 1px solid rgba(168,161,173,.38); border-radius: 5px; background: rgba(255,255,255,.02); opacity: .5; transition: color .16s, opacity .16s, transform .16s, border-color .16s, background .16s; }
.history-delete svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.history-delete:hover { color: #ff617e; border-color: rgba(255,97,126,.75); background: rgba(255,97,126,.09); opacity: 1; transform: scale(1.08); }

.participants-panel { min-height: 617px; padding-bottom: 15px; }
.count-bubble { min-width: 27px; height: 27px; display: grid; place-items: center; padding: 0 7px; color: #321646; border-radius: 999px; background: var(--purple-light); font-size: 12px; font-weight: 900; }
.search-wrap { height: 39px; display: flex; gap: 6px; align-items: center; padding: 0 10px; color: var(--faint); border: 1px solid var(--line); border-radius: 9px; background: rgba(11,7,19,.35); }
.search-wrap input { height: 100%; padding: 0; border: 0; background: transparent; box-shadow: none !important; }
.participants-list { max-height: 453px; overflow-y: auto; display: grid; gap: 5px; padding: 14px 1px 4px; }
.participant { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px; border-radius: 9px; background: rgba(255,255,255,.035); }
.participant:hover { background: rgba(255,255,255,.065); }
.participant-avatar { flex: 0 0 auto; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: #1a0930; background: var(--participant-color, var(--purple-light)); font-size: 12px; font-weight: 900; }
.participant-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.participant-copy { min-width: 0; flex: 1; }
.participant-name { display: block; overflow: hidden; text-overflow: ellipsis; color: var(--text); font-size: 12px; font-weight: 700; white-space: nowrap; }
.participant-login { display: block; overflow: hidden; text-overflow: ellipsis; color: var(--faint); font-size: 10px; white-space: nowrap; }
.role-label { color: var(--cyan); font-size: 9px; }
.remove-participant { width: 22px; height: 22px; color: var(--faint); border: 0; border-radius: 5px; background: transparent; font-size: 16px; line-height: 1; }
.remove-participant:hover { color: var(--danger); background: rgba(255,110,135,.1); }
.list-empty { margin: 40px 0; color: var(--faint); text-align: center; font-size: 12px; line-height: 1.55; }
.legend { display: flex; gap: 11px; padding-top: 12px; color: var(--faint); border-top: 1px solid var(--line); font-size: 10px; }
.legend span { display: flex; align-items: center; gap: 4px; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; }
.legend-dot.violet { background: var(--purple-light); }
.legend-dot.cyan { background: var(--cyan); }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 22px; max-width: min(90vw, 520px); padding: 11px 15px; color: var(--text); border: 1px solid rgba(255,255,255,.17); border-radius: 10px; background: rgba(20,11,30,.94); box-shadow: var(--shadow); transform: translate(-50%, 90px); opacity: 0; transition: opacity .23s, transform .23s; font-size: 12px; pointer-events: none; }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 1100px) { .dashboard { grid-template-columns: minmax(270px, 330px) minmax(0, 1fr); } .twitch-chat-panel { grid-column: 1 / -1; min-height: 0; } .twitch-chat-list { max-height: 360px; } .participants-column { grid-column: 1 / -1; } .participants-panel { min-height: 0; } .participants-list { max-height: 300px; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 850px) { .app-shell { padding: 0 16px 24px; } .topbar { height: auto; min-height: 74px; padding: 12px 0; flex-wrap: wrap; } .channel-chip { order: 3; width: 100%; margin-left: 0; justify-content: center; } .dashboard { grid-template-columns: 1fr; padding-top: 16px; } .controls-column { display: contents; } .settings-panel { order: 1; } .stage-column { order: 2; } .chat-panel { order: 3; } .twitch-chat-panel { grid-column: auto; order: 4; } .participants-column { order: 5; } .selection-panel { min-height: auto; padding: 22px 15px 20px; } .participants-list { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .winner-message { position: static; width: 100%; margin-top: 14px; } .winner-content { margin-top: 12px; } }
@media (max-width: 520px) { .header-actions .button { display: none; } .topbar { gap: 8px; } .brand { font-size: 16px; } .two-fields { grid-template-columns: 1fr; } .selection-meta { align-items: center; } .selection-meta h2 { font-size: 18px; } .participant-counter { padding: 7px; font-size: 10px; } .stage-actions { flex-direction: column; } .button-choose { width: 100%; } .winner-layout { grid-template-columns: 1fr; gap: 14px; } .winner-content { flex-wrap: wrap; } .winner-actions { width: 100%; margin-left: 0; justify-content: flex-start; } }
