.cp-audience { position: relative; isolation: isolate; min-height: 100svh; padding: 32px 40px 48px; display: flex; flex-direction: column; gap: 32px; background: linear-gradient(115deg, #fff9df, #fffcf4 45%, #effaff 80%, #f6f0ff); color: #111827; }
.cp-backdrop { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.cp-backdrop::before, .cp-backdrop::after { content: ''; position: absolute; inset: 15% 65% 0 -10%; background: #cde9fb; transform: rotate(-14deg); }
.cp-backdrop::after { inset: 15% -10% 0 65%; background: #e4d8fa; transform: rotate(14deg); }
.cp-surface { width: min(100%, 1080px); margin: auto; padding: 36px 40px; border: 2px solid white; border-radius: 8px; background: #ffffffed; box-shadow: 0 16px 48px #4338a51c; }
:is(.cp-audience, .cp-dialog) :is(h2, h3, p, ol, ul) { margin: 0; letter-spacing: 0; }
:is(.cp-audience, .cp-dialog) h2 { font-size: 36px; line-height: 1.18; text-align: center; text-wrap: balance; overflow-wrap: anywhere; }
:is(.cp-audience, .cp-dialog) .cp-kicker { margin-bottom: 10px; color: #4145ad; text-align: center; font-size: 16px; font-weight: 750; }
.cp-rules ol { list-style: none; counter-reset: rules; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; margin-top: 32px; padding: 0; }
.cp-rules li { counter-increment: rules; position: relative; padding-left: 48px; min-width: 0; }
.cp-rules li::before { content: counter(rules); position: absolute; top: 0; left: 0; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #ede7ff; color: #4145ad; font-weight: 850; font-size: 20px; }
.cp-rules strong { display: block; margin-bottom: 6px; font-size: 25px; color: #34318c; }
.cp-rules li > span { display: block; font-size: 20px; line-height: 1.5; overflow-wrap: anywhere; }
.cp-teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 24px; margin-top: 28px; align-items: start; }
.cp-team { min-width: 0; border-top: 6px solid var(--cp-team); background: color-mix(in srgb, var(--cp-team) 18%, white); border-radius: 8px; padding: 20px; }
.cp-team h3 { text-align: center; font-size: 28px; line-height: 1.2; overflow-wrap: anywhere; }
.cp-slots { display: grid; gap: 14px; margin-top: 20px; }
.cp-slot { min-width: 0; text-align: center; }
:is(.cp-audience, .cp-dialog, .cp-phone) .cp-role-label { margin-bottom: 6px; color: #34318c; font-size: 16px; font-weight: 750; }
.cp-reel { --cp-row: 64px; position: relative; display: grid; place-items: center; height: var(--cp-row); overflow: hidden; border: 2px solid #ddd8ed; border-radius: 8px; background: #fff; box-shadow: inset 0 6px 12px #4338a50b; animation: cp-slot-land 420ms ease-out var(--cp-stop) both; }
.cp-reel-long { --cp-row: 128px; }
.cp-reel-long :is(.cp-reel-name, .cp-reel-rolling > span) { font-size: 20px; }
.cp-reel-name { padding: 8px 12px; font-size: 28px; line-height: 1.18; text-align: center; overflow-wrap: anywhere; animation: cp-land var(--cp-stop) linear both; }
.cp-reel-rolling { position: absolute; inset: 0; pointer-events: none; animation: cp-roll var(--cp-stop) cubic-bezier(.12,.5,.45,1) both; }
.cp-reel-rolling > span { height: var(--cp-row); display: grid; place-items: center; padding: 8px 12px; font-size: 24px; font-weight: 750; line-height: 1.18; text-align: center; overflow-wrap: anywhere; }
.cp-selected { display: block; margin-top: 4px; min-height: 18px; color: #34318c; font-size: 13px; font-weight: 750; animation: cp-land var(--cp-stop) linear both; }
.cp-draw-status { margin-top: 14px !important; text-align: center; color: #34318c; font-size: 16px; font-weight: 750; animation: cp-ready var(--cp-duration, 5200ms) linear both; }
.cp-landed :is(.cp-reel-name, .cp-selected, .cp-reel, .cp-draw-status, .cp-phone-result) { animation: none; }
.cp-landed .cp-reel { border-color: #8f7bcb; }
.cp-landed .cp-reel-rolling { display: none; }
.cp-phone { min-height: 100svh; padding: 40px 24px; display: flex; flex-direction: column; justify-content: center; color: #111827; background: linear-gradient(145deg, color-mix(in srgb, var(--cp-team) 28%, white), #fffcf4 70%); }
.cp-phone h1 { margin: 0; font-size: 32px; line-height: 1.16; text-align: center; overflow-wrap: anywhere; }
.cp-phone .cp-kicker { margin: 0 0 12px; text-align: center; color: #34318c; font-weight: 750; font-size: 18px; }
.cp-phone .cp-slots { width: min(100%, 440px); margin: 28px auto 0; gap: 20px; }
.cp-phone.cp-landed .cp-slot-self .cp-reel { background: #fff9df; border-color: #8a6b18; box-shadow: 0 0 0 3px #ffed9e; }
.cp-phone-result { margin: 24px auto 0; text-align: center; max-width: 440px; animation: cp-ready var(--cp-duration, 5200ms) linear both; }
.cp-phone-result h2 { margin: 0 0 10px; font-size: 30px; line-height: 1.2; color: #34318c; overflow-wrap: anywhere; }
.cp-phone-result p { margin: 0; font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
.cp-phone-result .cp-phone-wait { margin-top: 12px; font-size: 16px; }
[data-pregame-display="draw"].cp-audience { padding: 24px 32px 32px; gap: 20px; }
[data-pregame-display="draw"] .cp-surface { padding: 24px 32px; }
.cp-dialog { width: min(880px, calc(100% - 32px)); max-height: calc(100svh - 40px); margin: auto; padding: 32px; border: 2px solid #ddd8ed; border-top: 6px solid #8c87f0; border-radius: 8px; color: #111827; background: linear-gradient(110deg, #fff, #f8f5ff); box-shadow: 0 20px 80px #11182740; }
.cp-dialog::backdrop { background: #17132d8c; }
.cp-dialog h2 { font-size: 28px; }
.cp-dialog .cp-rules li > span { font-size: 17px; }
.cp-dialog .cp-rules strong { font-size: 22px; }
.cp-dialog .cp-copy { margin-top: 16px; text-align: center; font-size: 18px; }
.cp-host-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.cp-host-actions .button { min-height: 48px; border-radius: 8px; }
.cp-host-actions .button-primary { background: #5755bf; color: white; }
.cp-host-actions .button-secondary { background: white; color: #34318c; border-color: #6553c7; }
.cp-host-actions button:focus-visible { outline: 3px solid #5755bf; outline-offset: 3px; }
@keyframes cp-roll { 0% { transform: translateY(0); opacity: 1; } 99% { opacity: 1; } 100% { transform: translateY(calc(var(--cp-row) * -12)); opacity: 0; } }
@keyframes cp-land { 0%, 97% { opacity: 0; transform: translateY(8px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes cp-ready { 0%, 96% { opacity: 0; transform: translateY(8px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes cp-slot-land { from { border-color: #ddd8ed; } 40% { border-color: #b89528; box-shadow: 0 0 0 4px #fff0ab; transform: scale(1.035); } to { border-color: #8f7bcb; transform: scale(1); } }
@media (max-width: 700px) {
  .cp-audience { padding: 24px 16px 32px; gap: 24px; }
  [data-pregame-display="draw"].cp-audience { padding: 24px 16px 32px; }
  [data-pregame-display="draw"] .cp-surface { padding: 24px 16px; }
  .cp-surface { padding: 24px 20px; }
  :is(.cp-audience, .cp-dialog) h2 { font-size: 28px; }
  .cp-rules ol { grid-template-columns: 1fr; gap: 22px; margin-top: 24px; }
  .cp-rules strong { font-size: 22px; }
  .cp-rules li > span { font-size: 18px; }
  .cp-dialog { padding: 24px 16px; }
  .cp-teams { gap: 20px; }
  .cp-team { padding: 16px; }
  .cp-team h3 { font-size: 24px; }
  .cp-reel-name, .cp-reel-rolling > span { font-size: 20px; }
}
@media (max-height: 740px) and (min-width: 701px) {
  [data-pregame-display="draw"].cp-audience { padding: 12px 24px 16px; gap: 12px; }
  [data-pregame-display="draw"] .cp-surface { padding: 16px 24px; }
  [data-pregame-display="draw"] h2 { font-size: 30px; }
  [data-pregame-display="draw"] .cp-kicker { margin-bottom: 6px; font-size: 14px; }
  [data-pregame-display="draw"] .cp-teams { gap: 16px; margin-top: 16px; }
  [data-pregame-display="draw"] .cp-team { padding: 14px; }
  [data-pregame-display="draw"] .cp-team h3 { font-size: 22px; }
  [data-pregame-display="draw"] .cp-slots { gap: 8px; margin-top: 12px; }
  [data-pregame-display="draw"] .cp-role-label { margin-bottom: 2px; font-size: 14px; }
  [data-pregame-display="draw"] .cp-reel { --cp-row: 50px; }
  [data-pregame-display="draw"] .cp-reel-name,
  [data-pregame-display="draw"] .cp-reel-rolling > span { font-size: 21px; }
  [data-pregame-display="draw"] .cp-selected { min-height: 16px; font-size: 12px; }
  [data-pregame-display="draw"] .cp-draw-status { margin-top: 8px !important; font-size: 14px; }
}
@media (max-width: 420px) { .cp-reel-long { --cp-row: 152px; } }
@media (prefers-reduced-motion: reduce) {
  :is(.cp-reel-name, .cp-selected, .cp-reel, .cp-draw-status, .cp-phone-result) { animation: none; }
  .cp-reel-rolling { display: none; }
}
