/* ============================================
   GLOBAL RESET
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: "Inter", sans-serif;
    background: #fff;
    color: #000;
}



/* ============================================
   PRESENTATION SCREEN
   Fullscreen display shown to the audience.
   Dark theme matching the original reveal.js
   design: #250422 bg, Inter font, card-based.
   ============================================ */

/* --- Main Screen Container --- */
.screen {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 4%;
    background: linear-gradient(225deg, #250422, #340d53);
    color: #ffffff;
    overflow: hidden;
    filter: saturate(0.88);
}

/* Vignette */
.screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
    z-index: 9998;
}

/* Scanlines */
.screen::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.05) 2px,
        rgba(0, 0, 0, 0.05) 3px
    );
    pointer-events: none;
    z-index: 9999;
}

.screen:has(.complication-wheel-screen) {
    padding: 0;
}

/* --- Game Title (persistent header) --- */
.screen > .title {
    flex-shrink: 0;
}

.screen > .title h1 {
    font-weight: 600;
    font-size: 1.2em;
    color: #ffffff;
    text-align: left;
    overflow-wrap: break-word;
}

/* --- Content Area (HTMX-swapped) --- */
.screen > #content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


/* ============================================
   WAITING STATE
   Centered large text, like the original
   "welcome" slide with 800-weight type.
   ============================================ */
.waiting {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.waiting h2 {
    font-weight: 800;
    color: #ffffff;
    font-size: 8vw;
    line-height: 1.1;
    overflow-wrap: break-word;
}

.waiting p {
    font-weight: 400;
    font-size: 1.5vw;
    color: #ffffff;
    opacity: 0.6;
    margin-top: 2vh;
}

.waiting .timestamp {
    margin-top: 4vh;
    font-size: 1vw;
    opacity: 0.25;
    font-variant-numeric: tabular-nums;
}


/* ============================================
   SHOW OPENER SCREEN
   ============================================ */
.show-opener {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.show-opener-center {
    position: relative;
    width: min(50vw, 75vh);
    height: min(50vw, 75vh);
    display: flex;
    align-items: center;
    justify-content: center;
}

.show-opener-qr {
    position: absolute;
    width: 38%;
    z-index: 1;
    mix-blend-mode: screen;
}

.show-opener-qr img {
    display: block;
    width: 100%;
    height: auto;
}

.show-opener-url {
    position: absolute;
    top: 74%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.1vw;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    z-index: 1;
}

.show-opener-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: show-opener-rotate 25s linear infinite;
    transform-origin: center center;
}

.show-opener-ring-text {
    font-size: 55px;
    font-weight: 900;
    fill: #ffffff;
    text-transform: uppercase;
}

.show-opener-ring-dot {
    fill: var(--player-color-yellow);
}

.show-opener-ring-text--pink .show-opener-ring-dot,
.show-opener-ring-text--blue .show-opener-ring-dot {
    fill: inherit;
}

.show-opener-ring-text--pink {
    fill: var(--player-color-pink);
    animation: opener-ring-pink 11s ease-in-out infinite;
}

.show-opener-ring-text--blue {
    fill: var(--player-color-blue);
    animation: opener-ring-blue 17s ease-in-out infinite;
}

@keyframes opener-ring-pink {
    0%   { transform: translate(2px, -1px); }
    18%  { transform: translate(-1.5px, -2px); }
    35%  { transform: translate(-2px, 0.5px); }
    52%  { transform: translate(1px, 2px); }
    71%  { transform: translate(2px, 1px); }
    88%  { transform: translate(-0.5px, -1.5px); }
    100% { transform: translate(2px, -1px); }
}

@keyframes opener-ring-blue {
    0%   { transform: translate(-1px, 2px); }
    22%  { transform: translate(2px, 1.5px); }
    41%  { transform: translate(1.5px, -2px); }
    60%  { transform: translate(-2px, -1px); }
    78%  { transform: translate(-1.5px, 2px); }
    91%  { transform: translate(0.5px, -2px); }
    100% { transform: translate(-1px, 2px); }
}

@keyframes show-opener-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.show-stage {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
    gap: 4vh;
    padding: 4vw;
    color: #ffffff;
}

.show-stage-kicker {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(1rem, 1.3vw, 1.6rem);
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.show-stage-title {
    max-width: 12ch;
    margin: 0;
    color: #ffffff;
    font-size: clamp(1rem, 4vw, 6rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: 0;
    overflow-wrap: break-word;
}

.show-stage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2vw;
    align-items: stretch;
}

.show-stage-grid-compact {
    max-width: 86vw;
}

.show-stage-card {
    min-height: 22vh;
    padding: 2vw;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: #2d2d2d;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2vh;
}

.show-stage-card-number {
    color: rgba(255, 255, 255, 0.55);
    font-size: clamp(1.5rem, 2vw, 2.5rem);
    font-weight: 800;
}

.show-stage-card h3 {
    margin: 0;
    font-size: clamp(1.8rem, 2.7vw, 3.6rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    overflow-wrap: break-word;
}

.show-stage-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(1rem, 1.35vw, 1.6rem);
    line-height: 1.35;
}

.show-team {
    align-items: center;
    text-align: center;
}

.team-feature-card {
    width: min(72vw, 980px);
    min-height: 48vh;
    padding: clamp(2rem, 5vw, 5rem);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.team-feature-card h2 {
    margin: 0;
    font-size: clamp(3rem, 8vw, 8.8rem);
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.team-intro-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.8rem, 1.4vw, 1.6rem);
}


.stage-ad-break {
    align-items: center;
    text-align: center;
}

.stage-ad-break .show-stage-title {
    max-width: 10ch;
}

.stage-ad-break-cues {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1vw;
}

.stage-ad-break-cues span {
    padding: 1rem 1.4rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.78);
    font-size: clamp(1rem, 1.3vw, 1.5rem);
    font-weight: 800;
}

@media (max-width: 760px) {
    .show-stage {
        gap: 3vh;
        padding: 8vw 5vw;
    }

    .show-stage-grid {
        grid-template-columns: 1fr;
    }

    .show-stage-card,
    .team-feature-card {
        min-height: 0;
    }

    .team-feature-card {
        width: 100%;
    }
}


/* ============================================
   GAME OVER SCREEN
   ============================================ */
.game-over {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.game-over-content {
    max-width: 80%;
}

.game-over-title {
    font-size: 10vw;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 3vh;
}

.game-over-message {
    font-size: 2.5vw;
    font-weight: 300;
    color: #ffffff;
    margin-bottom: 1.5vh;
}

.game-over-farewell {
    font-size: 2vw;
    font-weight: 500;
    color: #ffffff;
    opacity: 0.7;
    margin-bottom: 5vh;
}

.game-over-decoration {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 4vh;
}

.game-over-decoration .star {
    font-size: 3vw;
    animation: twinkle 2s ease-in-out infinite;
}

.game-over-decoration .star:nth-child(1) { animation-delay: 0s; }
.game-over-decoration .star:nth-child(2) { animation-delay: 0.3s; }
.game-over-decoration .star:nth-child(3) { animation-delay: 0.6s; }

.game-over--worlds {
    align-items: stretch;
    justify-content: stretch;
    padding: 6vh 6vw;
    text-align: left;
}

.game-over-worlds-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    min-width: 0;
    gap: 4vh;
}

.game-over-worlds-kicker {
    margin: 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-weight: 700;
    letter-spacing: 5px;
    text-transform: uppercase;
}

.game-over-worlds-body {
    width: 100%;
}

.game-over-worlds-text {
    width: 100%;
}

.game-over-worlds-empty {
    max-width: 900px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(2rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

@keyframes twinkle {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
}


/* ============================================
   ROUND INTRO
   Supertitle + player cards in a row,
   matching the original scoreboard layout.
   ============================================ */
.round-intro {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.round-intro .supertitle {
    font-weight: 600;
    font-size: 1.2em;
    color: #ffffff;
    text-align: left;
    flex-shrink: 0;
}

.round-intro .round-name {
    font-weight: 800;
    color: #ffffff;
    font-size: 8vw;
    line-height: 1.1;
    flex-grow: 0;
    margin-top: 2vh;
    text-align: left;
}

.round-intro .players-row {
    display: flex;
    gap: 40px;
    align-self: stretch;
    flex-grow: 1;
    align-items: center;
    margin-top: 4vh;
}

.round-intro .player-card {
    flex: 1 1 0;
    padding: 40px;
    background: #2D2D2D;
    border-radius: 10px;
    border: 1px solid #3F3D3D;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.round-intro .player-card .player-order {
    font-size: 2vw;
    font-weight: 300;
    color: #ffffff;
    opacity: 0.5;
}

.round-intro .player-card .player-name {
    font-size: 3vw;
    font-weight: 700;
    color: #ffffff;
}


/* ============================================
   PRESENTATION PHASE LAYOUT
   Opening statement header
   ============================================ */
.presentation-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 2vh;
    overflow: hidden;
}

.presentation-layout .unified-title {
    width: 100%;
    text-align: center;
    font-size: 2vw;
    opacity: 1;
}

.presentation-title-row {
    flex-shrink: 0;
    text-align: center;
}

.presentation-title-row h2 {
    font-size: 3vw;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 4px;
    opacity: 0.8;
}

.opening-prompt {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: clamp(1rem, 4vh, 4rem) 0;
}

.opening-prompt-text {
    display: -webkit-box;
    max-width: min(100%, 1200px);
    overflow: hidden;
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(2rem, 5vw, 5.5rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.08;
    text-align: center;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
}

/* ============================================
   SHARED PHASE TOP ROW COMPONENT
   Used by both debate and selection phases
   ============================================ */
.phase-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4vw;
    align-items: center;
    flex-shrink: 0;
}

.phase-round-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1vh;
}

.phase-round-number {
    font-size: 8vw;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.phase-label {
    font-size: 1em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
    opacity: 0.5;
}

.phase-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1vh;
}

.phase-time {
    font-size: 8vw;
    font-weight: 300;
    color: #ffffff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.phase-time.urgent {
    color: #ff4444;
    animation: pulse-urgent 1s infinite;
}

.phase-seconds {
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.4;
}

.phase-waiting,
.phase-complete {
    font-size: 1.5vw;
    font-weight: 600;
    color: #ffffff;
    opacity: 0.7;
}

.phase-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1vh;
}

.phase-qr img {
    width: 12vw;
    height: auto;
}

.phase-qr-url {
    font-size: 1vw;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Courier New', monospace;
}

/* ============================================
   DEBATE PHASE LAYOUT
   Title row + horizontal bar chart showing vote percentages
   ============================================ */
.debate-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 2vh;
    overflow: visible;
}

.debate-title-row {
    flex-shrink: 0;
    text-align: center;
}

.debate-title-row h2 {
    font-size: 3vw;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 4px;
    opacity: 0.8;
}

.debate-votes-row {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 2vh;
    min-height: 0;
    padding-top: clamp(2rem, 8vh, 6rem);
}

.debate-bar-chart {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    height: clamp(140px, 48vh, 420px);
    border-radius: 2vh;
    overflow: hidden;
    outline: 4px solid #250422;
}

.debate-bar-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.8s ease;
    position: relative;
    min-width: 10%;
}

.debate-bar-segment--preview {
    opacity: 1;
}

.debate-bar-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5vh;
    padding: 1vh;
}

.debate-bar-name {
    font-size: 1.5vw;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.debate-vote-total {
    font-size: 1.5vw;
    font-weight: 600;
    color: #ffffff;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.debate-worlds-strip {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    width: 100%;
    overflow: visible;
    padding-bottom: 24px;
    padding-right: 12px;
}

.debate-world {
    min-width: 0;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.debate-world-team {
    display: none;
}

.debate-world-text {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: inherit;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.25;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    text-align: center;
}

/* --- Debate Rainbow Title --- */
.debate-rainbow-title {
    position: relative;
    flex-shrink: 0;
    text-align: center;
    font-size: 5vw;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.2;
    color: #ffffff;
    text-shadow:
        -1px -1px 0 #340d53,
         1px -1px 0 #340d53,
        -1px  1px 0 #340d53,
         1px  1px 0 #340d53;
    z-index: 3;
}

.debate-rainbow-title::before,
.debate-rainbow-title::after {
    content: "DEBATE";
    position: absolute;
    top: 0;
    width: 100%;
    text-align: center;
    font-size: 5vw;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-shadow: none;
    animation: debate-rainbow 3s ease-in-out infinite;
}

.debate-rainbow-title::before {
    color: var(--player-color-pink);
    left: 0;
    z-index: -1;
    animation-delay: 0s;
}

.debate-rainbow-title::after {
    color: var(--player-color-blue);
    left: 0;
    z-index: -2;
    animation-name: debate-rainbow-after;
    animation-delay: 0.2s;
}

@keyframes debate-rainbow {
    0%, 100% { transform: translateY(0.3rem); }
    50%       { transform: translateY(-0.3rem); }
}

@keyframes debate-rainbow-after {
    0%, 100% { transform: translateY(0.45rem); }
    50%       { transform: translateY(-0.45rem); }
}

/* --- Standings Rainbow Title (mirrors debate style) --- */
.round-standings .round-name {
    position: relative;
    flex-shrink: 0;
    text-align: center;
    font-size: 5vw;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.2;
    color: #ffffff;
    text-shadow:
        -1px -1px 0 #340d53,
         1px -1px 0 #340d53,
        -1px  1px 0 #340d53,
         1px  1px 0 #340d53;
    z-index: 3;
}

.round-standings .round-name::before,
.round-standings .round-name::after {
    content: "STANDINGS";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 5vw;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-shadow: none;
    animation: debate-rainbow 3s ease-in-out infinite;
}

.round-standings .round-name::before {
    color: var(--player-color-pink);
    z-index: -1;
    animation-delay: 0s;
}

.round-standings .round-name::after {
    color: var(--player-color-blue);
    z-index: -2;
    animation-name: debate-rainbow-after;
    animation-delay: 0.4s;
}

/* --- Audience Choice Rainbow Title --- */
.audience-choice-title {
    position: relative;
    flex-shrink: 0;
    text-align: center;
    font-size: 5vw;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.2;
    color: #ffffff;
    text-shadow:
        -1px -1px 0 #340d53,
         1px -1px 0 #340d53,
        -1px  1px 0 #340d53,
         1px  1px 0 #340d53;
    z-index: 3;
}

.audience-choice-title::before,
.audience-choice-title::after {
    content: "AUDIENCE CHOICE";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 5vw;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-shadow: none;
    animation: debate-rainbow 3s ease-in-out infinite;
}

.audience-choice-title::before {
    color: var(--player-color-pink);
    z-index: -1;
    animation-delay: 0s;
}

.audience-choice-title::after {
    color: var(--player-color-blue);
    z-index: -2;
    animation-name: debate-rainbow-after;
    animation-delay: 0.4s;
}

/* ============================================
   SELECTION PHASE LAYOUT
   Title row + custom three-row layout for selection phase
   ============================================ */
.selection-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 0;
    overflow: hidden;
}

.selection-layout .unified-title {
    display: none;
}

.selection-title-row {
    flex-shrink: 0;
    text-align: center;
}

.selection-title-row h2 {
    font-size: 3vw;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 4px;
    opacity: 0.8;
}

.selection-round-row {
    flex-shrink: 0;
}

.selection-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4vw;
    align-items: center;
    flex-shrink: 0;
}

.selection-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.selection-title h2 {
    font-size: 3vw;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 4px;
    opacity: 0.8;
    margin: 0;
}

.selection-round-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1vh;
}

.selection-round-label {
    font-size: 1em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
    opacity: 0.5;
}

.selection-label {
    font-size: 1em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
    opacity: 0.5;
}

.selection-round-title {
    font-size: 1.5vw;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    opacity: 0.7;
    line-height: 1;
}

.selection-round-number {
    font-size: 8vw;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.selection-player-name {
    font-size: 2vw;
    font-weight: 600;
    color: #ffffff;
    opacity: 0.8;
    margin-top: 1vh;
}

.selection-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1vh;
}

.selection-qr img {
    width: 12vw;
    height: auto;
}

.selection-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1vh;
}

.selection-time {
    font-size: 8vw;
    font-weight: 300;
    color: #ffffff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.selection-time.urgent {
    color: #ff4444;
    animation: pulse-urgent 1s infinite;
}

.selection-seconds {
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.4;
}

.selection-bar {
    width: 100%;
    height: 6px;
    background: #3F3D3D;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 1vh;
}

.selection-bar-fill {
    height: 100%;
    background: #ffffff;
    border-radius: 3px;
    transition: width 1s linear;
}

.selection-complete,
.selection-waiting {
    font-size: 1.5vw;
    font-weight: 600;
    color: #ffffff;
    opacity: 0.7;
}

.selection-body {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 3vw;
    min-height: 0;
    overflow: hidden;
}

.selection-body-qr {
    flex-shrink: 0;
    width: 16vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1vh;
}

.selection-body-qr img {
    display: block;
    width: 100%;
    height: auto;
    mix-blend-mode: screen;
}

.selection-qr-url {
    font-size: 1.6vw;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Courier New', monospace;
}

.selection-body-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.selection-progress-row {
    width: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 2vw;
}

.selection-timer-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5vh;
    flex-shrink: 0;
}

.selection-timer-bottom .selection-time {
    font-size: 3vw;
    font-weight: 300;
    color: #ffffff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.selection-timer-bottom .selection-seconds {
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.4;
}

.selection-timer-bottom .selection-complete,
.selection-timer-bottom .selection-waiting {
    font-size: 1vw;
    font-weight: 600;
    color: #ffffff;
    opacity: 0.7;
}

/* ============================================
   PHASE DISPLAY
   The main phase view: supertitle, player
   name, prompt card, and timer.
   ============================================ */
.phase {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 2vh;
}

/* --- Phase Header (type + player + round info) --- */
.phase .info {
    flex-shrink: 0;
    text-align: left;
    border-bottom: none;
    padding-bottom: 0;
}

.phase .info h2 {
    font-weight: 600;
    font-size: 1.2em;
    color: #ffffff;
    text-transform: uppercase;
}

.phase .info h3 {
    font-weight: 800;
    color: #ffffff;
    font-size: 6vw;
    line-height: 1.1;
    margin-top: 1vh;
}

.phase .info .meta {
    font-weight: 400;
    font-size: 1em;
    color: #ffffff;
    opacity: 0.5;
    margin-top: 0.5vh;
}

/* --- Prompt Card --- */
.phase .prompt {
    background: #2D2D2D;
    border: 1px solid #3F3D3D;
    border-radius: 10px;
    padding: 40px;
    flex-shrink: 0;
}

.phase .prompt h4 {
    font-weight: 600;
    font-size: 1em;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.phase .prompt p {
    font-weight: 700;
    font-size: 3vw;
    line-height: 1.3;
    color: #ffffff;
    word-wrap: break-word;
    text-align: left;
}

/* --- Timer Section --- */
.phase .timer {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: none;
    padding: 0;
    margin-top: 0;
}

.phase .timer .label {
    font-weight: 600;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #ffffff;
    opacity: 0.5;
    margin-bottom: 2vh;
}

.phase .timer .time {
    font-size: 15vw;
    font-weight: 300;
    color: #ffffff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    font-family: "Inter", sans-serif;
}

.phase .timer .time.urgent {
    color: #ff4444;
    animation: pulse-urgent 1s infinite;
}

@keyframes pulse-urgent {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.phase .timer .seconds {
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.4;
    margin-top: 1vh;
}

/* --- Progress Bar --- */
.phase .timer .bar {
    width: 60%;
    height: 8px;
    background: #3F3D3D;
    border-radius: 4px;
    overflow: hidden;
    margin: 3vh auto 1vh;
    border: none;
    position: relative;
}

.phase .timer .bar .fill {
    height: 100%;
    background: #ffffff;
    border-radius: 4px;
    transition: width 1s linear;
}

.phase .timer .time-info {
    font-size: 0.9em;
    opacity: 0.3;
    margin-top: 0.5vh;
}

/* --- Phase Complete --- */
.phase .timer .complete {
    font-size: 3vw;
    font-weight: 600;
    color: #ffffff;
    opacity: 0.7;
}

/* --- Waiting to Start --- */
.phase .timer .waiting-start {
    font-size: 2vw;
    font-weight: 400;
    color: #ffffff;
    opacity: 0.5;
}

/* --- Debate Layout (side-by-side: votes + timer) --- */
.phase--debate {
    gap: 2vh;
}

.debate-body {
    flex: 1;
    display: flex;
    gap: 40px;
    align-items: center;
    min-height: 0;
}

.debate-votes {
    flex: 1 1 0;
    min-width: 0;
}

/* --- Vote Chart (pie + legend) --- */
.vc-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 16px 0 8px;
    flex-wrap: wrap;
}

.vc-pie {
    width: 280px;
    height: 280px;
    flex-shrink: 0;
    transform: rotate(-90deg);
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.25));
    border-radius: 50%;
    overflow: hidden;
}

.vc-slice {
    transition: stroke-dasharray 0.8s ease, stroke-dashoffset 0.8s ease;
}

.vc-slice--preview {
    opacity: 0.25;
}

.vc-legend {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 180px;
}

.vc-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vc-swatch {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.vc-name {
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex: 1;
    color: #ffffff;
}

.vc-pct {
    font-size: 2rem;
    font-weight: bold;
    min-width: 4ch;
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #ffffff;
}

.vc-footer {
    text-align: center;
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.45;
    padding-top: 8px;
    color: #ffffff;
}


/* ============================================
   ROUND RESULTS (winner + leaderboard)
   ============================================ */
.round-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5vh;
    height: 100%;
    padding: 4vh 4vw;
    animation: fadeIn 0.6s ease;
}

.winner-announcement {
    text-align: center;
}

.winner-announcement-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2vh 1.2vw;
}

.winner-label {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 600;
    letter-spacing: 6px;
    text-transform: uppercase;
    opacity: 0.6;
    color: #ffffff;
    margin-bottom: 1.5vh;
}

.winner-tie-list {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1.2rem, 3vw, 2.4rem);
    font-weight: 700;
    line-height: 1.25;
}

.winner-card {
    display: inline-flex;
    align-items: center;
    gap: 1.5vw;
    padding: 2vh 3vw;
    border-radius: 10px;
    animation: fadeIn 0.8s ease 0.3s both;
}

.audience-award-card {
    padding: 1.6vh 2.5vw;
}

.winner-name {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
}

.winner-points {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: 500;
    opacity: 0.85;
}

.winning-prompt {
    width: min(760px, 100%);
    margin: 0 auto;
    text-align: center;
}

.winning-prompt-label {
    margin: 0 0 1vh;
    color: rgba(255, 255, 255, 0.6);
    font-size: clamp(0.95rem, 1.8vw, 1.2rem);
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.winning-prompt-text {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.05rem, 6vw, 4rem);
    font-weight: 600;
    line-height: 1.25;
}

/* Leaderboard shared by round results + game over */
.leaderboard {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.leaderboard-title {
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-align: center;
    opacity: 0.5;
    color: #ffffff;
    margin-bottom: 2vh;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 1vh;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 1vw;
    padding: 1.5vh 2vw;
    animation: leaderboard-wave 3s ease-in-out infinite;
}

.leaderboard-list .leaderboard-row:nth-child(1) { animation-delay:    0s; }
.leaderboard-list .leaderboard-row:nth-child(2) { animation-delay: -0.5s; }
.leaderboard-list .leaderboard-row:nth-child(3) { animation-delay:   -1s; }
.leaderboard-list .leaderboard-row:nth-child(4) { animation-delay: -1.5s; }
.leaderboard-list .leaderboard-row:nth-child(5) { animation-delay:   -2s; }
.leaderboard-list .leaderboard-row:nth-child(6) { animation-delay: -2.5s; }
.leaderboard-list .leaderboard-row:nth-child(7) { animation-delay:   -3s; }
.leaderboard-list .leaderboard-row:nth-child(8) { animation-delay: -3.5s; }

@keyframes leaderboard-wave {
    0%, 100% { transform: translateX(-5px); }
    50%       { transform: translateX(5px); }
}

.leaderboard-row-live-vote {
    position: relative;
}

.leaderboard-row-live-vote > * {
    position: relative;
    z-index: 2;
}

.leaderboard-row-live-vote::before {
    content: "";
    position: absolute;
    inset: 0;
    width: 100%;
    background: rgba(122, 15, 15, 0.5);
    clip-path: inset(0 calc(100% - var(--vote-pct, 0%)) 0 0);
    z-index: 1;
    transition: clip-path 0.4s ease;
}

.leaderboard-row-live-vote.player-color-red::before    { background: rgba(122, 15, 15, 0.5); }
.leaderboard-row-live-vote.player-color-green::before  { background: rgba(2, 74, 51, 0.5); }
.leaderboard-row-live-vote.player-color-blue::before   { background: rgba(46, 110, 122, 0.5); }
.leaderboard-row-live-vote.player-color-pink::before   { background: rgba(122, 58, 69, 0.5); }
.leaderboard-row-live-vote.player-color-purple::before { background: rgba(61, 31, 120, 0.5); }
.leaderboard-row-live-vote.player-color-teal::before   { background: rgba(0, 107, 92, 0.5); }
.leaderboard-row-live-vote.player-color-orange::before { background: rgba(140, 68, 16, 0.5); }
.leaderboard-row-live-vote.player-color-yellow::before { background: rgba(122, 101, 0, 0.5); }

.leaderboard-first {
    border-color: rgba(255, 215, 0, 0.5);
}

.leaderboard-rank {
    font-size: clamp(1rem, 2vw, 1.6rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    min-width: 2.5vw;
    text-align: center;
}

.leaderboard-first .leaderboard-rank {
    color: #ffd700;
}

.leaderboard-color {
    width: clamp(12px, 1.5vw, 20px);
    height: clamp(12px, 1.5vw, 20px);
    border-radius: 50%;
    flex-shrink: 0;
}

.leaderboard-name {
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    font-weight: 500;
    color: #ffffff;
    flex: 1;
}

.leaderboard-vote-pct {
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(0.9rem, 1.8vw, 1.3rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 3.5rem;
    text-align: right;
}

.leaderboard-award {
    color: #ffffff;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    min-width: 3.5rem;
    text-align: right;
}

.leaderboard-score {
    font-size: clamp(1.2rem, 3vw, 2.2rem);
    font-weight: 700;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    min-width: 3vw;
    text-align: right;
}

.final-leaderboard {
    margin-top: 3vh;
    margin-bottom: 2vh;
}

.final-leaderboard .leaderboard-title {
    position: relative;
    flex-shrink: 0;
    text-align: center;
    font-size: 5vw;
    font-weight: 900;
    letter-spacing: 0.1em;
    line-height: 1.2;
    color: #ffffff;
    opacity: 1;
    margin-bottom: 3vh;
    text-shadow:
        -1px -1px 0 #340d53,
         1px -1px 0 #340d53,
        -1px  1px 0 #340d53,
         1px  1px 0 #340d53;
    z-index: 3;
}

.final-leaderboard .leaderboard-title::before,
.final-leaderboard .leaderboard-title::after {
    content: "FINAL STANDINGS";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 5vw;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-shadow: none;
    animation: debate-rainbow 3s ease-in-out infinite;
}

.final-leaderboard .leaderboard-title::before {
    color: var(--player-color-pink);
    z-index: -1;
    animation-delay: 0s;
}

.final-leaderboard .leaderboard-title::after {
    color: var(--player-color-blue);
    z-index: -2;
    animation-name: debate-rainbow-after;
    animation-delay: 0.4s;
}


/* ============================================
   IMPROV TIME (between rounds)
   ============================================ */
.improv-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 4vh 4vw;
    opacity: 0;
    animation: fadeIn 12s ease forwards;
}

.improv-winning-prompt {
    font-size: clamp(2rem, 5vw, 5rem);
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    max-width: 60vw;
    line-height: 1.2;
    letter-spacing: -0.02em;
}


.speed-round-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    gap: clamp(1.25rem, 4vh, 5vh);
    padding: 4vh 4vw;
    text-align: center;
}

.speed-round-kicker {
    flex-shrink: 0;
    margin: 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-weight: 700;
    letter-spacing: 5px;
    text-transform: uppercase;
}

.speed-round-prompt {
    flex: 0 1 auto;
    min-height: 0;
    width: min(100%, 1100px);
    max-width: 100%;
    margin: 0;
    color: #ffffff;
    font-size: clamp(2rem, 7vw, 6.5rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.08;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.speed-round-prompt--empty {
    color: rgba(255, 255, 255, 0.45);
}

.speed-round-timers {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    width: min(900px, 100%);
    gap: 12px;
}

.speed-round-section {
    width: min(900px, 100%);
}

.speed-round-time-table {
    width: 100%;
}

.speed-round-time-row .leaderboard-score {
    min-width: clamp(7rem, 16vw, 12rem);
    font-size: clamp(1.1rem, 2.5vw, 1.9rem);
}

.speed-round-team {
    display: grid;
    align-items: center;
    padding: 24px;
    color: #ffffff;
    text-align: center;
}

.speed-round-team--active {
    border-color: rgba(255, 215, 0, 0.75);
}


/* ============================================
   COMPLICATION WHEEL
   ============================================ */
.complication-wheel-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    padding: 3vh 4vw 5vh;
    gap: clamp(24px, 4vh, 48px);
    background: transparent;
    text-align: center;
}

.complication-wheel-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: min(100%, 1040px);
}

.complication-wheel-shell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(72vh, 72vw, 760px);
    aspect-ratio: 1;
    padding: clamp(14px, 2vw, 24px);
    border-radius: 50%;
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02) 62%, transparent 63%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.38),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.complication-wheel-pointer {
    position: absolute;
    top: 50%;
    right: -0.22em;
    transform: translateY(-50%) rotate(90deg);
    transform-origin: center;
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    z-index: 2;
}

.complication-wheel-canvas {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 18px 44px rgba(0, 0, 0, 0.35));
}

.complication-result-text {
    width: min(100%, 980px);
    font-size: clamp(2.4rem, 4.8vw, 4.8rem);
    font-weight: 800;
    line-height: 1.08;
    color: #ffffff;
    text-wrap: balance;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.complication-result-text--placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-weight: 600;
    text-shadow: none;
}


/* ============================================
   QR CODE DISPLAY
   ============================================ */

/* Prominent QR code - for show opener and selection phase */
.qr-prominent {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.qr-prominent-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.qr-prominent-code {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-prominent-code img {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.qr-prominent-url {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-family: 'Courier New', monospace;
}

/* Corner QR code - persistent but subtle */
.qr-corner {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 100;
    transition: all 0.3s ease;
}

.qr-corner:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.qr-corner-code {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-corner-code img {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.qr-corner-text {
    font-size: 0.75rem;
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    text-align: center;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ============================================
   HOST CONTROL PANEL STYLES
   ============================================ */

:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-success: #059669;
    --color-success-dark: #047857;
    --color-warning: #d97706;
    --color-warning-dark: #b45309;
    --color-danger: #dc2626;
    --color-danger-dark: #b91c1c;
    --color-secondary: #6b7280;
    --color-secondary-dark: #4b5563;
    --color-bg-light: #f9fafb;
    --color-bg-dark: #1f2937;
    --color-border: #e5e7eb;
    --color-text: #111827;
    --color-text-light: #6b7280;
    --player-color-red: #dc2626;
    --player-color-green: #059669;
    --player-color-blue: #7dd2e1;
    --player-color-pink: #ef7c8e;
    --player-color-purple: #8c66d8;
    --player-color-teal: #00C2A8;
    --player-color-orange: #FF8C42;
    --player-color-yellow: #f8d210;
    --player-color-ink: #18151f;
}

.player-color-red {
    background-color: var(--player-color-red) !important;
}

.player-color-green {
    background-color: var(--player-color-green) !important;
}

.player-color-blue {
    background-color: var(--player-color-blue) !important;
}

.player-color-pink {
    background-color: var(--player-color-pink) !important;
}

.player-color-purple {
    background-color: var(--player-color-purple) !important;
}

.player-color-teal {
    background-color: var(--player-color-teal) !important;
}

.player-color-orange {
    background-color: var(--player-color-orange) !important;
}

.player-color-yellow {
    background-color: var(--player-color-yellow) !important;
}

/* ============================================
   LONG SHADOW UTILITY
   Add .long-shadow alongside a .player-color-* class to get
   the diagonal dark-color shadow extending from the bottom-right.
   ============================================ */
.long-shadow {
    position: relative;
    isolation: isolate;
    overflow: visible;
}

.long-shadow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% + 100vmax);
    height: calc(100% + 100vmax);
    clip-path: polygon(
        calc(100% - 100vmax) 0%,
        100% 100vmax,
        100% 100%,
        100vmax 100%,
        0% calc(100% - 100vmax),
        calc(100% - 100vmax) calc(100% - 100vmax)
    );
    z-index: -1;
}

.long-shadow.player-color-red::after    { background: #7a0f0f; }
.long-shadow.player-color-green::after  { background: #024a33; }
.long-shadow.player-color-blue::after   { background: #2e6e7a; }
.long-shadow.player-color-pink::after   { background: #92395d; }
.long-shadow.player-color-purple::after { background: #3d1f78; }
.long-shadow.player-color-teal::after   { background: #006b5c; }
.long-shadow.player-color-orange::after { background: #8c4410; }
.long-shadow.player-color-yellow::after { background: #7a6500; }

.player-stroke-red {
    stroke: var(--player-color-red);
}

.player-stroke-green {
    stroke: var(--player-color-green);
}

.player-stroke-blue {
    stroke: var(--player-color-blue);
}

.player-stroke-pink {
    stroke: var(--player-color-pink);
}

.player-stroke-purple {
    stroke: var(--player-color-purple);
}

.player-stroke-teal {
    stroke: var(--player-color-teal);
}

.player-stroke-orange {
    stroke: var(--player-color-orange);
}

.player-stroke-yellow {
    stroke: var(--player-color-yellow);
}

.player-color-text-red,
.player-color-text-green,
.player-color-text-blue,
.player-color-text-pink,
.player-color-text-purple {
    color: #fff !important;
}

.player-color-text-yellow {
    color: var(--player-color-ink) !important;
}

.player-color-text-teal,
.player-color-text-orange {
    color: var(--player-color-ink) !important;
}

.host-panel {
    min-height: 100vh;
    background: var(--color-bg-light);
    color: var(--color-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    min-width: 0;
    overflow-x: hidden;
}

.host-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    padding: 24px 40px;
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 0;
}

.host-header h1 {
    font-size: 1.875rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.host-header .subtitle {
    margin: 8px 0 0 0;
    opacity: 0.9;
    font-size: 0.95rem;
    font-weight: 400;
}

.header-actions {
    display: flex;
    gap: 10px;
    margin-top: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    min-width: 0;
}

.host-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 40px;
    min-width: 0;
}

.host-dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}

.host-resources-panel {
    position: sticky;
    top: 24px;
    margin-bottom: 0;
}

.host-resources-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.host-resource-link {
    display: block;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    background: #fff;
}

.host-resource-link:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateX(2px);
}

.host-resource-link.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.host-resource-content {
    margin-bottom: 0;
}

.game-detail-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    min-width: 0;
}

.main-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.game-detail-container .host-section {
    margin-bottom: 0;
    padding: 24px;
    min-width: 0;
}

.host-section {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    min-width: 0;
    overflow: hidden;
}

.host-section h2 {
    font-size: 1.375rem;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    border-bottom: 3px solid var(--color-primary);
    padding-bottom: 12px;
    color: var(--color-text);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.section-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.section-header h2 {
    margin: 0;
    border: none;
    padding: 0;
}

.section-description {
    margin: 6px 0 0 0;
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-weight: normal;
}

.count-badge {
    background: var(--color-primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.prize-pot-threshold-alert {
    display: grid;
    gap: 10px;
    margin: 0 0 16px;
    padding: 14px 16px;
    background: #fffbeb;
    border: 1px solid #f59e0b;
    border-left: 4px solid #d97706;
    border-radius: 8px;
}

.prize-pot-threshold-label {
    color: #92400e;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.prize-pot-threshold-list {
    display: grid;
    gap: 6px;
}

.prize-pot-threshold-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
}

.prize-pot-threshold-name {
    overflow-wrap: anywhere;
}

.prize-pot-threshold-amount {
    flex: 0 0 auto;
    color: #92400e;
}

.create-game-section {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: var(--color-primary);
}

/* Buttons */
.host-btn {
    background: #fff;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    padding: 10px 20px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
    transition: all 0.2s ease;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.host-btn:hover {
    background: var(--color-bg-light);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.host-btn-primary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.host-btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.host-btn-success {
    background: var(--color-success);
    color: #fff;
    border-color: var(--color-success);
}

.host-btn-success:hover {
    background: var(--color-success-dark);
    border-color: var(--color-success-dark);
}

.host-btn-warning {
    background: var(--color-warning);
    color: #fff;
    border-color: var(--color-warning);
}

.host-btn-warning:hover {
    background: var(--color-warning-dark);
    border-color: var(--color-warning-dark);
}

.host-btn-danger {
    background: var(--color-danger);
    color: #fff;
    border-color: var(--color-danger);
}

.host-btn-danger:hover {
    background: var(--color-danger-dark);
    border-color: var(--color-danger-dark);
}

.host-btn-secondary {
    background: #fff;
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}

.host-btn-secondary:hover {
    background: var(--color-secondary);
    color: #fff;
    border-color: var(--color-secondary);
}

.host-btn-small {
    padding: 5px 10px;
    font-size: 0.9rem;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.2rem;
    width: 100%;
    margin-top: 10px;
}

/* Forms */
.host-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.host-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: #fff;
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.host-checkbox-input {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
}

.form-note {
    margin: 8px 0 0;
    font-size: 0.82rem;
    color: var(--color-text-light);
}

.round-config-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: min(100%, 920px);
    margin: 0 auto;
}

.round-config-collapse {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.round-config-collapse-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    text-align: left;
}

.round-config-collapse-header h4 {
    margin: 0;
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 800;
}

.round-config-collapse.is-collapsed .round-config-collapse-header {
    margin-bottom: 0;
}

.preshow-stage-panel {
    width: min(100%, 920px);
    margin: 0 auto 14px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
}

.preshow-stage-panel h4 {
    margin: 0 0 10px;
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 800;
}

.preshow-stage-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin: 0;
}

.round-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.round-config-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: #fff;
    color: var(--color-text);
    font-size: 0.86rem;
    font-weight: 700;
    text-transform: uppercase;
    text-align: left;
}

.round-config-grid .round-config-toggle {
    flex-direction: row;
    align-items: center;
    min-height: 46px;
    text-transform: none;
    font-size: 0.98rem;
    letter-spacing: 0;
}

.round-config-grid input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    accent-color: var(--color-primary);
}

.award-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.player-selection-group {
    margin-top: 14px;
}

.player-dropdown {
    margin-top: 8px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

.player-dropdown-summary {
    list-style: none;
    cursor: pointer;
    padding: 10px 12px;
    font-size: 0.95rem;
    color: var(--color-text-light);
    user-select: none;
}

.player-dropdown-summary::-webkit-details-marker {
    display: none;
}

.player-dropdown-summary::after {
    content: "▾";
    float: right;
    color: var(--color-text-light);
}

.player-dropdown[open] .player-dropdown-summary::after {
    content: "▴";
}

.player-dropdown-search-wrap {
    padding: 0 12px 10px;
    border-top: 1px solid var(--color-border);
}

.player-search-input {
    margin-top: 10px;
}

.player-dropdown-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    padding: 10px 12px 12px;
    border-top: 1px solid var(--color-border);
    max-height: 220px;
    overflow-y: auto;
}

.player-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

.player-dropdown-item:hover {
    border-color: var(--color-primary);
}

.player-color-select {
    width: 88px;
    min-height: 32px;
    margin-left: auto;
    padding: 4px 8px;
    font-size: 0.82rem;
}

.player-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.player-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 0.9rem;
}

.player-checkbox-item:hover {
    border-color: var(--color-primary);
}

@media (max-width: 768px) {
    .player-dropdown-list {
        grid-template-columns: 1fr;
    }
}

.add-form {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--color-bg-light);
    border-radius: 6px;
}

.add-form-group {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.add-form-group.vertical {
    flex-direction: column;
}

.add-form-group.vertical .form-row {
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.host-input,
.host-select,
.host-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    background: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.host-input:focus,
.host-select:focus,
.host-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.host-textarea {
    resize: vertical;
    min-height: 60px;
}

.inline-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

/* Game List */
.game-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.game-row {
    border: 1px solid var(--color-border);
    padding: 14px 16px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.game-row.active {
    background: rgba(37, 99, 235, 0.06);
    border-color: var(--color-primary);
}

.game-row-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.game-row-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-row h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.game-row-meta {
    margin: 0;
    font-size: 0.88rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

.meta-separator {
    display: inline-block;
    margin: 0 6px;
    color: var(--color-border);
}

.badge {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.badge-active {
    background: var(--color-success);
    color: #fff;
}

.game-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Status Box */
.status-box {
    border: 1px solid var(--color-border);
    padding: 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: var(--color-bg-light);
}

.status-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.status-row:last-child {
    border-bottom: none;
}

.status-label {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--color-text-light);
    letter-spacing: 0.5px;
}

.status-value {
    font-family: inherit;
    font-weight: 500;
}

.status-value.active {
    font-weight: 700;
    color: var(--color-success);
}

/* Item Lists */
.item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.player-prompt-section .section-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

.player-prompt-section .section-description {
    max-width: 34rem;
    line-height: 1.45;
}

.player-prompt-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.player-prompt-tab {
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-bg-light);
    color: var(--color-text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.player-prompt-tab:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.player-prompt-tab.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    transition: all 0.2s;
}

.item-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
}

.item-info {
    flex: 1;
}

.prompt-player-card {
    gap: 14px;
    padding: 14px 16px;
    align-items: flex-start;
}

.prompt-player-card .item-info {
    min-width: 0;
}

.prompt-player-card .prompt-text {
    overflow-wrap: anywhere;
}

.prompt-player-card.is-claimed-by-other {
    opacity: 0.5;
}

.prompt-player-card .host-btn {
    flex-shrink: 0;
}

.item-meta {
    display: block;
    margin-top: 2px;
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.resource-player-card {
    padding: 10px 14px;
}

.feedback-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feedback-card {
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: #fff;
}

.feedback-message {
    margin: 0;
    color: var(--color-text);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.feedback-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 10px;
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.form-error {
    color: var(--color-danger);
    margin: 12px 0 16px;
    font-weight: 600;
}

.subview-header {
    margin-top: 28px;
}

.item-name {
    font-weight: 600;
    font-size: 1rem;
}

/* Player Links Section */
.player-links-section {
    margin-top: 16px;
    border-top: 1px solid var(--color-border);
    padding-top: 12px;
}

.player-links-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

.player-links-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.player-link-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
}

.player-link-name {
    font-weight: 600;
    font-size: 0.85rem;
    min-width: 90px;
    flex-shrink: 0;
}

.player-link-url {
    flex: 1;
    font-size: 0.75rem;
    color: var(--color-primary);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: monospace;
}

.player-link-url:hover {
    text-decoration: underline;
}

.prompt-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.prompt-content {
    flex: 1;
}

.prompt-text {
    margin: 0 0 8px 0;
    line-height: 1.6;
    color: var(--color-text);
    font-size: 0.95rem;
}

.prompt-meta {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.prompt-card button {
    align-self: flex-end;
}

.host-section .prompts-list {
    gap: 8px;
}

.host-section .prompts-list .prompt-card {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-left: none;
    box-shadow: none;
    opacity: 1;
    animation: none;
    transform: none;
}

.host-section .prompts-list .prompt-card:hover {
    transform: none;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}

.host-section .prompts-list .prompt-content {
    margin-bottom: 0;
}

.host-section .prompts-list .prompt-text {
    margin: 0 0 3px 0;
    line-height: 1.35;
    font-size: 0.95rem;
}

.host-section .prompts-list .prompt-meta {
    display: block;
    font-size: 0.78rem;
}

.host-section .prompts-list .prompt-card button {
    align-self: center;
    margin-left: 6px;
    flex-shrink: 0;
}

.item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--color-border);
    transition: background 0.2s;
}

.item:hover {
    background: var(--color-bg-light);
}

.host-prompts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.host-prompt-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
}

.host-prompt-item:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}

.host-prompt-item-inactive {
    opacity: 0.7;
    border-style: dashed;
}

.host-prompt-content {
    min-width: 0;
    flex: 1;
}

.host-prompt-text {
    margin: 0 0 3px 0;
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.35;
    font-style: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.host-prompt-meta {
    display: block;
    color: var(--color-text-light);
    font-size: 0.78rem;
}

.host-prompt-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.host-prompt-badge-public {
    background: #e0f2fe;
    color: #075985;
}

.host-prompt-badge-in-house {
    background: #fef3c7;
    color: #92400e;
}

.host-prompt-delete,
.host-prompt-hide {
    flex-shrink: 0;
}

.curator-prompt-item {
    align-items: flex-start;
    border-left: 6px solid transparent;
}

.curator-prompt-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
    flex-shrink: 0;
    max-width: 190px;
}

.curation-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

.curation-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.curation-legend-item.curation-unreviewed {
    background: #e2e8f0;
    color: #334155;
}

.curation-legend-item.curation-reviewed_not_playable {
    background: #fee2e2;
    color: #991b1b;
}

.curation-legend-item.curation-nice_to_play {
    background: #dcfce7;
    color: #166534;
}

.curator-prompt-item.curation-unreviewed,
.prompt-player-card.curation-unreviewed {
    border-left-color: #94a3b8;
    background: linear-gradient(90deg, #f8fafc 0%, #ffffff 34%);
}

.curator-prompt-item.curation-reviewed_not_playable,
.prompt-player-card.curation-reviewed_not_playable {
    border-left-color: #ef4444;
    background: linear-gradient(90deg, #fef2f2 0%, #ffffff 34%);
}

.curator-prompt-item.curation-nice_to_play,
.prompt-player-card.curation-nice_to_play {
    border-color: #86efac;
    border-left-color: #16a34a;
    background: #f0fdf4;
    box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.08);
}

.curator-prompt-item-hidden {
    border-style: dashed;
    opacity: 0.78;
}

.host-prompt-badge-curation-unreviewed {
    background: #e2e8f0;
    color: #334155;
}

.host-prompt-badge-curation-reviewed_not_playable {
    background: #fee2e2;
    color: #991b1b;
}

.host-prompt-badge-curation-nice_to_play {
    background: #dcfce7;
    color: #166534;
}

.host-prompt-badge-hidden {
    background: #f1f5f9;
    color: #475569;
}

.curator-status-action.curation-unreviewed {
    border-color: #94a3b8;
}

.curator-status-action.curation-unreviewed.is-selected {
    background: #64748b;
    border-color: #64748b;
    color: #fff;
}

.curator-status-action.curation-reviewed_not_playable {
    border-color: #ef4444;
}

.curator-status-action.curation-reviewed_not_playable.is-selected {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.curator-status-action.curation-nice_to_play {
    border-color: #16a34a;
}

.curator-status-action.curation-nice_to_play.is-selected {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.curator-status-action {
    min-width: 40px;
    padding-inline: 8px;
}

.host-prompt-delete,
.host-prompt-hide {
    min-width: 40px;
    padding-inline: 8px;
}

.curation-badge {
    display: inline-block;
    width: fit-content;
    padding: 2px 8px;
    border-radius: 999px;
}

.curation-badge.curation-unreviewed {
    background: #e2e8f0;
    color: #334155;
}

.curation-badge.curation-reviewed_not_playable {
    background: #fee2e2;
    color: #991b1b;
}

.curation-badge.curation-nice_to_play {
    background: #dcfce7;
    color: #166534;
}

.host-prompt-source-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    margin-bottom: 14px;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 999px;
}

.host-source-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
}

.host-source-option:has(input:checked) {
    background: #dbeafe;
    color: #1e40af;
}

.host-source-option input {
    accent-color: var(--color-primary);
}

.item:last-child {
    border-bottom: none;
}

.item-name {
    font-weight: 600;
}

.prompt-item {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--color-border);
    margin-bottom: 12px;
    border-radius: 6px;
    background: #fff;
}

.prompt-item:hover {
    background: var(--color-bg-light);
}

.prompt-content {
    flex: 1;
    margin-bottom: 12px;
}

.prompt-text {
    margin: 0 0 8px 0;
    line-height: 1.5;
    color: var(--color-text);
}

.prompt-meta {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.prompt-origin {
    margin: 0 0 4px 0;
    font-size: 0.8rem;
    color: var(--color-primary-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.prompt-pool {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 12px;
    background: var(--color-bg-light);
}

.prompt-pool h4 {
    margin: 0 0 10px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text);
}

.prompt-pool--in-house {
    border-color: #f59e0b;
    background: #fffbeb;
}

.prompt-pool--public {
    border-color: #60a5fa;
    background: #eff6ff;
}

.prompt-pool-empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.selection-preview-stage {
    width: 100%;
    margin: 0;
}

.selection-preview-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    min-height: 21vw;
}

.selection-preview-line {
    margin: 0;
    font-size: 5.8vw;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.selection-preview-prefix {
    color: #f8d210;
}


.selection-preview-cursor {
    display: inline-block;
    color: rgba(255, 255, 255, 0.6);
    margin-left: 0.05em;
    animation: selection-cursor-blink 1s step-end infinite;
}

@keyframes selection-cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.selection-preview-selected {
    background-color: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
}

@media (max-width: 700px) {
    .selection-preview-stage {
        margin-bottom: 1rem;
    }

    .complication-wheel-shell {
        width: min(86vw, 620px);
    }

    .complication-result-card {
        padding: 24px;
    }
}

.prompt-item button {
    align-self: flex-end;
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    border-left: 4px solid;
}

.alert-success {
    background: #f0fdf4;
    border-color: var(--color-success);
    color: #065f46;
}

.alert-warning {
    background: #fffbeb;
    border-color: var(--color-warning);
    color: #92400e;
}

.alert-info {
    background: #eff6ff;
    border-color: var(--color-primary);
    color: #1e40af;
}

/* Round Status */
.round-status {
    border: 2px solid var(--color-primary);
    padding: 24px;
    border-radius: 8px;
    background: #fff;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.round-status h3 {
    margin: 0 0 20px 0;
    font-size: 1.5rem;
    text-transform: uppercase;
    color: var(--color-primary);
    font-weight: 700;
}

.phase-info {
    border: 1px solid var(--color-border);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: var(--color-bg-light);
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.phase-header h4 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    text-transform: uppercase;
    color: var(--color-text);
    font-weight: 600;
}

.player-name {
    margin: 5px 0 0 0;
    font-size: 1rem;
    color: var(--color-text-light);
}

.host-phase-timer {
    margin: 15px 0;
    padding: 16px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    text-align: center;
    border-radius: 8px;
}

.timer {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: inherit;
}

.phase-actions {
    margin-top: 15px;
}

.round-top-controls {
    position: sticky;
    top: 14px;
    z-index: 8;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.phase-progress.compact-flow {
    margin: 0;
    max-width: 100%;
    min-width: 0;
}

.phase-progress.compact-flow h4 {
    margin: 0 0 8px 0;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-light);
}

.phase-timeline-node-rail {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
}

.phase-timeline-nodes {
    display: inline-flex;
    align-items: center;
    gap: 0;
    min-width: 100%;
}

.phase-node {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
}

.phase-node-marker {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 2px solid var(--color-border);
    color: var(--color-text-light);
    background: #fff;
    flex-shrink: 0;
}

.phase-node-index {
    font-size: 0.82rem;
    font-weight: 700;
}

.phase-node-body {
    min-width: 0;
}

.phase-node-title {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-text);
    white-space: nowrap;
}

.phase-node-player {
    margin-left: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-text-light);
}

.phase-node-status {
    margin-top: 1px;
    font-size: 0.72rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.phase-node-connector {
    width: 26px;
    height: 2px;
    margin: 0 8px;
    background: var(--color-border);
    flex-shrink: 0;
}

.phase-node.done .phase-node-marker {
    border-color: var(--color-success);
    background: var(--color-success);
    color: #fff;
}

.phase-node.active .phase-node-marker {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

.phase-node.active .phase-node-title,
.phase-node.active .phase-node-status {
    color: var(--color-primary);
}

.phase-node-connector.done {
    background: var(--color-success);
}

.action-strip {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: center;
    max-width: 100%;
    min-width: 0;
}

.action-strip .host-btn {
    margin-top: 0;
    width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
}

.action-strip .timer-controls {
    display: flex;
    align-items: center;
    min-width: 0;
}

.action-strip .timer-controls .host-btn,
.action-strip .timer-controls .action-hint {
    width: 100%;
    margin: 0;
}

.phase-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.phase-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--color-border);
    gap: 12px;
    border-radius: 4px;
    transition: background 0.2s;
}

.phase-item.completed {
    opacity: 0.5;
    text-decoration: line-through;
    color: var(--color-text-light);
}

.phase-item.active {
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
}

.phase-order {
    font-weight: 600;
    min-width: 32px;
    color: var(--color-primary);
}

.phase-item.active .phase-order {
    color: #fff;
}

.phase-name {
    flex: 1;
}

.phase-status {
    font-size: 1.2rem;
}

.no-round {
    text-align: center;
    padding: 48px 20px;
}

.info-text {
    font-size: 1.1rem;
    margin-bottom: 24px;
    color: var(--color-text-light);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-light);
    background: var(--color-bg-light);
    border-radius: 6px;
}

.empty-state p:first-child {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}

.empty-hint {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.ready-message,
.completion-message {
    max-width: 500px;
    margin: 0 auto;
}

.ready-message h3,
.completion-message h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--color-text);
}

.completion-message {
    padding: 32px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border: 2px solid var(--color-success);
    border-radius: 8px;
}

.helper-text {
    margin-bottom: 24px;
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.start-round-container {
    margin-top: 20px;
}

.alert strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.alert p {
    margin: 0;
    font-size: 0.9rem;
}

/* Prompt Selection Interface */
.prompt-selection-section {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.prompt-selection-section h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: var(--color-text);
    font-weight: 600;
}

.section-hint {
    margin: 0 0 20px 0;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.player-prompt-assignments {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prompt-assignment-card {
    background: #fff;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    padding: 10px 12px;
    transition: all 0.2s;
}

.prompt-assignment-card.assigned {
    border-color: var(--color-success);
    background: #f8fffb;
}

.prompt-assignment-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.assignment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.compact-assignment {
    overflow: hidden;
}

.compact-summary {
    list-style: none;
    cursor: pointer;
    margin: 0;
}

.compact-summary::-webkit-details-marker {
    display: none;
}

.compact-summary::after {
    content: "▾";
    color: var(--color-text-light);
    font-size: 0.92rem;
    margin-left: 10px;
}

.compact-assignment[open] .compact-summary::after {
    content: "▴";
}

.assignment-row-meta {
    margin-bottom: 8px;
}

.compact-prompt-preview {
    margin: 0;
    font-size: 0.82rem;
    color: var(--color-text-light);
    line-height: 1.35;
}

.compact-link-row {
    margin-bottom: 8px;
}

.compact-assignment:not([open]) .compact-link-row,
.compact-assignment:not([open]) .prompt-assignment-form {
    display: none;
}

.player-name-large {
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--color-text);
}

.assignment-status {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.assignment-status.completed {
    background: var(--color-success);
    color: #fff;
}

.assignment-status.pending {
    background: var(--color-warning);
    color: #fff;
}

.assigned-prompt {
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    border-left: 3px solid var(--color-success);
}

.prompt-text-preview {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--color-text);
}

.prompt-assignment-form {
    margin-top: 8px;
}

.warning-hint {
    color: var(--color-warning);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
    padding: 12px;
    background: #fffbeb;
    border-radius: 6px;
    border-left: 3px solid var(--color-warning);
}

/* Responsive */
@media (max-width: 1024px) {
    .game-detail-container {
        grid-template-columns: 1fr;
    }

    .host-container {
        padding: 24px;
    }

    .game-detail-container .host-section {
        padding: 20px;
    }

    .phase-header {
        flex-direction: column;
        gap: 16px;
    }

    .phase-timer {
        width: 100%;
    }

    .round-top-controls {
        top: 10px;
    }

    .phase-timeline-node-rail {
        overflow-x: visible;
        padding-bottom: 0;
    }

    .phase-timeline-nodes {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 8px;
        min-width: 0;
        width: 100%;
    }

    .phase-node {
        min-width: 0;
        padding: 8px;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        background: #fff;
    }

    .phase-node-title {
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.2;
    }

    .phase-node-connector {
        display: none;
    }

    .action-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .host-container {
        padding: 20px;
    }

    .player-prompt-section {
        padding: 20px;
    }

    .player-prompt-section .section-header {
        margin-bottom: 16px;
    }

    .player-prompt-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .player-prompt-tab {
        width: 100%;
        padding: 0 8px;
        text-align: center;
    }

    .prompt-player-card {
        flex-direction: column;
        align-items: stretch;
    }

    .prompt-player-card .host-btn {
        width: 100%;
        justify-content: center;
    }

    .host-dashboard-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .host-resources-panel {
        position: static;
    }

    .host-resources-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .game-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .game-row-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 10px;
    }

    .meta-separator {
        display: none;
    }

    .game-row-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .header-actions {
        flex-direction: column;
    }

    .header-content {
        flex-direction: column;
        gap: 16px;
    }

    .form-row {
        flex-direction: column;
    }

    .add-form-group:not(.vertical) {
        flex-direction: column;
    }

    .timer-value {
        font-size: 1.75rem;
    }

    .round-top-controls {
        top: 8px;
        margin-left: -2px;
        margin-right: -2px;
        padding: 12px;
    }

    .game-detail-container .host-section,
    .round-status {
        padding: 18px;
    }

    .phase-info {
        padding: 14px;
    }

    .action-strip {
        gap: 8px;
    }

    .action-strip .host-btn {
        padding-inline: 12px;
    }

    .phase-node {
        gap: 7px;
        padding: 7px;
    }

    .phase-node-title {
        font-size: 0.76rem;
    }

    .phase-node-marker {
        width: 28px;
        height: 28px;
    }

    .phase-node-status {
        font-size: 0.68rem;
    }
}

/* ============================================
   HOST — SCORE CONTROLS
   ============================================ */
.score-controls {
    margin-top: 24px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.score-controls h4 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.score-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.score-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.score-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.score-player-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.95rem;
}

.score-value {
    font-weight: 700;
    font-size: 1rem;
    min-width: 50px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.score-actions {
    display: flex;
    gap: 6px;
}

.score-btn {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-weight: 700 !important;
    font-size: 1rem !important;
    border-radius: 6px !important;
}

/* ============================================
   AUDIENCE PAGE - minimal phone-first override
   ============================================ */

.audience-page {
    --aud-yellow: #FFE600;
    --aud-pink: var(--player-color-pink);
    --aud-purple: var(--player-color-purple);
    --aud-teal: var(--player-color-teal);
    --aud-orange: var(--player-color-orange);
    --aud-ink: var(--player-color-ink);
    --aud-muted: #443d4c;
    --aud-border: #18151f;
    --aud-surface: #fff;
    --aud-soft-yellow: #fff9b8;
    --aud-soft-pink: #ffe2ec;
    --aud-soft-purple: #f0e3ff;
    --aud-soft-teal: #dffff9;
    --aud-soft-orange: #fff0e6;
    --aud-mode: var(--aud-pink);
    --aud-mode-soft: var(--aud-soft-pink);
    --aud-mode-ink: #fff;
    --aud-font-body: "Public Sans", "Inter", system-ui, sans-serif;
    --aud-font-display: "Archivo Black", "Public Sans", "Inter", system-ui, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--aud-yellow);
    color: var(--aud-ink);
    font-family: var(--aud-font-body);
    padding: 24px 16px;
    animation: none;
}

.audience-page .floating-shapes,
.audience-page .sparkle,
.audience-page .subtitle-wrapper,
.audience-page .instruction-box,
.audience-page .recent-prompts,
.audience-page .recent-submissions,
.audience-page .audience-footer {
    display: none;
}

.audience-page .audience-container,
.audience-page .vote-container {
    width: min(100%, 520px);
    max-width: 520px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.audience-page .audience-container--waiting,
.audience-page .audience-container--ending {
    --aud-mode: var(--aud-orange);
    --aud-mode-soft: var(--aud-soft-orange);
    --aud-mode-ink: var(--aud-ink);
}

.audience-page .audience-container--submit {
    --aud-mode: var(--aud-pink);
    --aud-mode-soft: var(--aud-soft-pink);
    --aud-mode-ink: #fff;
}

.audience-page .audience-container--vote {
    --aud-mode: var(--aud-purple);
    --aud-mode-soft: var(--aud-soft-purple);
    --aud-mode-ink: #fff;
}

.audience-page .audience-container--feedback {
    --aud-mode: var(--aud-teal);
    --aud-mode-soft: var(--aud-soft-teal);
    --aud-mode-ink: var(--aud-ink);
}

.audience-page .audience-header {
    margin: 0 0 24px;
    color: var(--aud-ink);
    text-align: left;
}

.audience-page .audience-header::before {
    content: "";
    display: block;
    width: 52px;
    height: 6px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: var(--aud-mode);
}

.audience-page .audience-header h1,
.audience-page .aud-waiting h1,
.audience-page .vote-status h2,
.audience-page .submission-closed h2,
.audience-page .error-message h2,
.audience-page .success-message h2 {
    margin: 0;
    background: none;
    color: var(--aud-ink);
    font-family: var(--aud-font-display);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: 0;
    text-shadow: none;
    -webkit-text-fill-color: currentColor;
}

.audience-page .audience-header .subtitle,
.audience-page .aud-waiting p,
.audience-page .vote-status p,
.audience-page .submission-closed p,
.audience-page .error-message p,
.audience-page .success-message p,
.audience-page .vote-hint {
    margin: 10px 0 0;
    color: var(--aud-muted);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: 0;
    opacity: 1;
    text-transform: none;
}

.audience-page .audience-content,
.audience-page #submit-form-container,
.audience-page #vote-area {
    display: block;
    width: 100%;
}

.audience-page .audience-feedback-actions {
    margin: 0 0 20px;
}

.audience-page .audience-feedback-link {
    text-decoration: none;
}

.audience-page .audience-feedback-page {
    min-height: auto;
}

.audience-page .audience-worlds {
    margin: 0 0 28px;
}

.audience-page .audience-worlds h2 {
    margin: 0 0 12px;
    color: var(--aud-ink);
    font-family: var(--aud-font-display);
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: 0;
}

.audience-page .audience-world-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.audience-page .audience-world-card,
.audience-page .audience-world-empty {
    border: 2px solid var(--aud-border);
    border-left: 8px solid var(--aud-mode);
    border-radius: 8px;
    background: var(--aud-surface);
    padding: 16px;
    overflow-wrap: anywhere;
}

.audience-page .audience-world-text {
    margin: 0;
    color: var(--aud-ink);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.audience-page .audience-world-byline,
.audience-page .audience-world-empty p {
    margin: 8px 0 0;
    color: var(--aud-muted);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.audience-page #feedback-form-container {
    scroll-margin-top: 20px;
}

.audience-page .audience-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.audience-page .feedback-form {
    gap: 20px;
}

.audience-page .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.audience-page .form-group label {
    display: block;
    color: var(--aud-ink);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0;
}

.audience-page .form-group label span {
    color: var(--aud-muted);
    font-weight: 500;
}

.audience-page .form-error {
    color: #9f174f;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.35;
}

.audience-page .audience-textarea,
.audience-page .audience-input {
    width: 100%;
    border: 2px solid var(--aud-ink);
    border-radius: 8px;
    background: var(--aud-surface);
    color: var(--aud-ink);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.45;
    padding: 14px 16px;
    transform: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.audience-page .audience-textarea {
    min-height: 132px;
    resize: vertical;
}

.audience-page .audience-textarea:focus,
.audience-page .audience-input:focus {
    outline: none;
    border-color: var(--aud-mode);
    box-shadow: 0 0 0 3px var(--aud-mode-soft);
    transform: none;
}

.audience-page .audience-textarea--error,
.audience-page .audience-input--error {
    border-color: var(--aud-pink) !important;
    box-shadow: none !important;
}

/* Prefixed textarea box */
.audience-page .audience-textarea-box {
    display: flex;
    align-items: flex-start;
    width: 100%;
    min-height: 132px;
    border: 2px solid var(--aud-ink);
    border-radius: 8px;
    background: var(--aud-surface);
    padding: 14px 16px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.audience-page .audience-textarea-box:focus-within {
    border-color: var(--aud-mode);
    box-shadow: 0 0 0 3px var(--aud-mode-soft);
}

.audience-page .audience-textarea-box--error {
    border-color: var(--aud-pink) !important;
    box-shadow: none !important;
}

.audience-page .textarea-prefix {
    color: var(--aud-ink);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.45;
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
    pointer-events: none;
    opacity: 0.5;
}

.audience-page .audience-textarea-box {
    cursor: text;
}

.audience-page .audience-textarea-editable {
    flex: 1;
    min-height: 100px;
    border: none;
    background: transparent;
    color: var(--aud-ink);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.45;
    padding: 0;
    outline: none;
    word-break: break-word;
    white-space: pre-wrap;
}

.audience-page .audience-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    width: 100%;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--aud-font-display);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0;
    padding: 16px 20px;
    text-align: center;
    transform: none;
    transition: none;
    -webkit-tap-highlight-color: transparent;
}

.audience-page .audience-btn::before {
    display: none;
}

.audience-page .audience-btn-primary {
    background: var(--aud-mode);
    color: var(--aud-mode-ink);
    box-shadow: none;
}

.audience-page .audience-btn-secondary {
    background: var(--aud-orange);
    color: var(--aud-ink);
    box-shadow: none;
}

.audience-page .audience-btn:active,
.audience-page .vote-btn:active {
    transform: translateY(1px);
}

.audience-page .aud-waiting,
.audience-page .vote-status,
.audience-page .submission-closed,
.audience-page .error-message,
.audience-page .success-message {
    border: 2px solid var(--aud-border);
    border-radius: 8px;
    background: var(--aud-surface);
    border-left-color: var(--aud-mode);
    border-left-width: 8px;
    padding: 24px;
    text-align: left;
    box-shadow: none;
}

.audience-page .error-message {
    border-color: var(--aud-ink);
    border-left-color: var(--aud-pink);
    background: #fff7fa;
    margin-bottom: 18px;
}

.audience-page .error-message h2,
.audience-page .error-message .error-detail {
    color: #9f174f;
}

.audience-page .submission-closed {
    border-color: var(--aud-ink);
    border-left-color: var(--aud-orange);
    background: #fff9f4;
}

.audience-page .success-message {
    border-color: var(--aud-ink);
    border-left-color: var(--aud-teal);
    background: #f3fffc;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.audience-page .success-message h2 {
    color: #087f72;
}

.audience-page .vote-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
}

.audience-page .vote-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 72px;
    border: 2px solid var(--aud-ink);
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--aud-font-display);
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0;
    padding: 18px 16px;
    text-align: center;
    text-transform: none;
    overflow-wrap: anywhere;
    box-shadow: none;
    transition: none;
    -webkit-tap-highlight-color: transparent;
}

.audience-page .vote-btn.player-color-red {
    background: var(--player-color-red) !important;
    color: #fff !important;
}

.audience-page .vote-btn.player-color-green {
    background: var(--player-color-green) !important;
    color: #fff !important;
}

.audience-page .vote-btn.player-color-blue {
    background: var(--player-color-blue) !important;
    color: #fff !important;
}

.audience-page .vote-btn.player-color-pink {
    background: var(--player-color-pink) !important;
    color: #fff !important;
}

.audience-page .vote-btn.player-color-purple {
    background: var(--player-color-purple) !important;
    color: #fff !important;
}

.audience-page .vote-btn.player-color-teal {
    background: var(--player-color-teal) !important;
    color: var(--player-color-ink) !important;
}

.audience-page .vote-btn.player-color-orange {
    background: var(--player-color-orange) !important;
    color: var(--player-color-ink) !important;
}

.audience-page .vote-btn.player-color-yellow {
    background: var(--aud-yellow) !important;
    color: var(--player-color-ink) !important;
}

.audience-page .vote-btn-selected {
    border-color: var(--aud-ink);
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.78);
    transform: none;
}

.audience-page .vote-btn-name {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.audience-page .vote-btn-check {
    flex: 0 0 auto;
    font-size: 1.3rem;
    line-height: 1;
}

.audience-page .vote-hint {
    text-align: center;
}

@media (min-width: 640px) {
    .audience-page {
        padding: 40px 24px;
    }

    .audience-page .audience-header h1,
    .audience-page .aud-waiting h1,
    .audience-page .vote-status h2,
    .audience-page .submission-closed h2,
    .audience-page .error-message h2,
    .audience-page .success-message h2 {
        font-size: 2.25rem;
    }
}

/* ============= UNIFIED TOP ROW ============= */

.unified-top-row {
    display: flex;
    align-items: center;
    gap: 2vw;
    flex-shrink: 0;
    width: 100%;
}

.unified-title {
    font-size: 1.5vw;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    opacity: 0.7;
    line-height: 1;
    flex-shrink: 0;
}

.unified-progress-bar {
    flex: 1;
    height: 0.5vh;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.25vh;
    overflow: hidden;
}

.unified-progress-fill {
    height: 100%;
    background: #ffffff;
    transition: width 1s linear;
}

.unified-timer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5vh;
    flex-shrink: 0;
}

.unified-time {
    font-size: 3vw;
    font-weight: 200;
    color: #ffffff;
    line-height: 1;
}

.unified-time.urgent {
    color: #ff4444;
    animation: pulse 0.5s ease-in-out infinite;
}

.unified-seconds {
    font-size: 1vw;
    font-weight: 500;
    color: #ffffff;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.unified-complete,
.unified-waiting {
    font-size: 1.2vw;
    font-weight: 600;
    color: #ffffff;
    opacity: 0.8;
    text-transform: uppercase;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ============= PRIZE POT FULLSCREEN ============= */

.prize-pot-fullscreen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    text-align: center;
}

.prize-pot-fullscreen-label {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.68);
    font-size: clamp(2rem, 3vw, 3.6rem);
    font-weight: 400;
    line-height: 1.1;
}

.prize-pot-fullscreen-total {
    position: relative;
    color: #ffffff;
    font-size: clamp(6rem, 12vw, 12.5rem);
    font-weight: 800;
    line-height: 0.95;
    text-shadow:
        -2px -2px 0 #340d53,
         2px -2px 0 #340d53,
        -2px  2px 0 #340d53,
         2px  2px 0 #340d53;
    z-index: 3;
}

.prize-pot-fullscreen-total::before,
.prize-pot-fullscreen-total::after {
    content: attr(data-total);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: clamp(6rem, 12vw, 12.5rem);
    font-weight: 800;
    line-height: 0.95;
    text-shadow: none;
    animation: debate-rainbow 3s ease-in-out infinite;
}

.prize-pot-fullscreen-total::before {
    color: var(--player-color-pink);
    z-index: -1;
    animation-delay: 0s;
}

.prize-pot-fullscreen-total::after {
    color: var(--player-color-blue);
    z-index: -2;
    animation-name: debate-rainbow-after;
    animation-delay: 0.4s;
}

.prize-pot-contributors {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: clamp(2rem, 4vw, 4.5rem);
    min-width: min(34rem, 92vw);
}

.prize-pot-contributor-row {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) auto auto;
    align-items: baseline;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: clamp(1.7rem, 2.6vw, 3rem);
    font-weight: 400;
    line-height: 1.15;
    text-align: left;
}

.prize-pot-contributor-rank {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 700;
    text-align: right;
}

.prize-pot-contributor-row--first {
    font-size: clamp(2.3rem, 3.2vw, 4rem);
}

.prize-pot-contributor-row--first .prize-pot-contributor-rank {
    color: #f3b536;
}

.prize-pot-contributor-name,
.prize-pot-contributor-amount {
    overflow-wrap: anywhere;
}

.prize-pot-contributor-separator {
    color: rgba(255, 255, 255, 0.48);
}

@media (max-width: 640px) {
    .prize-pot-contributors {
        min-width: min(28rem, 94vw);
    }

    .prize-pot-contributor-row {
        grid-template-columns: 2.3rem minmax(0, 1fr) auto;
        gap: 0.4rem;
    }

    .prize-pot-contributor-separator {
        display: none;
    }
}

/* ============= PRIZE POT BADGE ============= */

.prize-pot-badge-content {
    color: #ffffff;
    font-size: 1rem;
    text-align: right;
}

.prize-pot-badge-total {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    line-height: 1;
    white-space: nowrap;
}

.prize-pot-badge-icon {
    line-height: 1;
}

.prize-pot-latest-payment {
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.75rem;
    line-height: 1.2;
    white-space: nowrap;
    animation: prize-pot-donation-fade 5.2s ease-in-out both;
}

@keyframes prize-pot-donation-fade {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }

    15%,
    76% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-6px);
    }
}
