:root {
    --hot-seat-ink: var(--text-main, #172033);
    --hot-seat-muted: var(--text-sub, #667085);
    --hot-seat-border: var(--border, rgba(42, 64, 96, 0.14));
    --hot-seat-blue: var(--primary, #2f6df6);
    --hot-seat-green: var(--success, #13a064);
    --hot-seat-warn: var(--danger, #ef6b4a);
    --hot-seat-bg: var(--bg-main, #eef6ff);
    --hot-seat-page-bg: var(--bg-grad, linear-gradient(180deg, #eaf7ff 0%, #fffaf0 100%));
    --hot-seat-panel-bg: var(--card-bg, rgba(255, 255, 255, 0.92));
    --hot-seat-field-bg: var(--input-bg, #ffffff);
    --hot-seat-soft: var(--primary-soft, rgba(47, 109, 246, 0.12));
    --hot-seat-success-soft: var(--success-soft, rgba(19, 160, 100, 0.12));
    --hot-seat-warn-soft: var(--danger-soft, rgba(239, 107, 74, 0.14));
    --hot-seat-shadow: var(--glass-shadow, 0 18px 48px rgba(31, 50, 80, 0.12));
    --hot-seat-on-accent: var(--bg-main, #ffffff);
}

body {
    color: var(--hot-seat-ink);
}

.hot-seat-root,
.hot-seat-student-root {
    min-height: 100vh;
    padding: 28px;
    background: var(--hot-seat-page-bg);
}

.hot-seat-guard {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: var(--hot-seat-page-bg);
    padding: 24px;
}

.hot-seat-guard__card,
.hot-seat-panel,
.hot-seat-hero,
.hot-seat-stage {
    background: var(--hot-seat-panel-bg);
    border: 1px solid var(--hot-seat-border);
    box-shadow: var(--hot-seat-shadow);
}

.hot-seat-guard__card {
    width: min(460px, 100%);
    border-radius: 24px;
    padding: 34px;
    text-align: center;
}

.hot-seat-guard__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: var(--accent-soft, var(--hot-seat-soft));
    font-size: 34px;
}

.hot-seat-guard__card h1,
.hot-seat-hero h1,
.hot-seat-stage h1 {
    margin: 0;
    letter-spacing: 0;
}

.hot-seat-guard__card p,
.hot-seat-hero p,
.hot-seat-stage p,
.hot-seat-section-head p {
    margin: 8px 0 0;
    color: var(--hot-seat-muted);
    line-height: 1.5;
}

.hot-seat-hero,
.hot-seat-stage {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-radius: 28px;
    padding: 28px 32px;
    margin-bottom: 22px;
}

.hot-seat-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: var(--hot-seat-blue);
    font-weight: 800;
    font-size: 13px;
}

.hot-seat-hero__meta,
.hot-seat-character-card {
    min-width: 220px;
    border-radius: 20px;
    padding: 18px;
    background: var(--hot-seat-field-bg);
    border: 1px solid var(--hot-seat-border);
}

.hot-seat-hero__meta span,
.hot-seat-character-card span {
    display: block;
    color: var(--hot-seat-muted);
    font-size: 13px;
    font-weight: 700;
}

.hot-seat-hero__meta strong,
.hot-seat-character-card strong {
    display: block;
    margin-top: 4px;
    font-size: 20px;
}

.hot-seat-grid {
    display: grid;
    gap: 18px;
}

.hot-seat-root--setup .hot-seat-grid--run,
.hot-seat-root--run .hot-seat-grid--admin,
.hot-seat-root--run .hot-seat-panel--logs {
    display: none;
}

.hot-seat-grid--admin {
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
}

.hot-seat-grid--run {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    margin-top: 18px;
}

.hot-seat-root--run .hot-seat-grid--run {
    grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.75fr);
    align-items: start;
    margin-top: 0;
}

.hot-seat-run-side {
    display: grid;
    gap: 18px;
    align-content: start;
}

.hot-seat-student-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
    gap: 18px;
}

.hot-seat-student-grid--questions {
    grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
}

.hot-seat-panel {
    border-radius: 24px;
    padding: 22px;
}

.hot-seat-panel--logs {
    margin-top: 18px;
}

.hot-seat-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.hot-seat-section-head h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: 0;
}

.hot-seat-form {
    display: grid;
    gap: 14px;
}

.hot-seat-form label,
.hot-seat-text-form {
    display: grid;
    gap: 7px;
}

.hot-seat-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hot-seat-form span {
    color: var(--hot-seat-ink);
    font-weight: 800;
    font-size: 13px;
}

.hot-seat-form input,
.hot-seat-form textarea,
.hot-seat-form select,
.hot-seat-text-form input {
    width: 100%;
    border: 1px solid var(--hot-seat-border);
    border-radius: 14px;
    padding: 12px 14px;
    background: var(--hot-seat-field-bg);
    color: var(--hot-seat-ink);
    font: inherit;
}

.hot-seat-form textarea {
    resize: vertical;
}

.hot-seat-voice-field {
    min-width: 0;
}

.hot-seat-voice-select-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.hot-seat-voice-preview-btn {
    min-height: 44px;
    white-space: nowrap;
}

.hot-seat-voice-profile,
.hot-seat-voice-status {
    margin: 0;
    color: var(--hot-seat-muted);
    font-size: 12px;
    line-height: 1.45;
}

.hot-seat-voice-status[data-tone="error"] {
    color: var(--hot-seat-warn);
}

.hot-seat-voice-status[data-tone="success"] {
    color: var(--hot-seat-blue);
}

.hot-seat-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
}

.hot-seat-actions--wrap {
    flex-wrap: wrap;
    justify-content: flex-start;
}

.hot-seat-actions--center {
    justify-content: center;
}

.hot-seat-btn,
.hot-seat-mini-btn {
    border: 0;
    border-radius: 14px;
    background: var(--hot-seat-blue);
    color: var(--hot-seat-on-accent);
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.hot-seat-btn {
    padding: 12px 18px;
}

.hot-seat-mini-btn {
    padding: 9px 12px;
    background: var(--hot-seat-soft);
    color: var(--hot-seat-blue);
}

.hot-seat-btn:hover,
.hot-seat-mini-btn:hover {
    transform: translateY(-1px);
}

.hot-seat-btn:disabled,
.hot-seat-mini-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.hot-seat-btn--ghost {
    color: var(--hot-seat-blue);
    background: var(--hot-seat-soft);
}

.hot-seat-btn--warn {
    background: var(--hot-seat-warn);
}

.hot-seat-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.hot-seat-back-manage {
    display: inline-flex;
    align-items: center;
}

.hot-seat-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 6px 12px;
    background: var(--hot-seat-soft);
    color: var(--hot-seat-blue);
    font-weight: 800;
    font-size: 13px;
    white-space: nowrap;
}

.hot-seat-status-pill--open {
    border-color: color-mix(in srgb, var(--hot-seat-green) 38%, var(--hot-seat-border));
    background: var(--hot-seat-success-soft);
    color: var(--hot-seat-green);
}

.hot-seat-status-pill--draft {
    border-color: color-mix(in srgb, var(--hot-seat-warn) 34%, var(--hot-seat-border));
    background: var(--hot-seat-warn-soft);
    color: var(--hot-seat-warn);
}

.hot-seat-status-pill--closed {
    border-color: color-mix(in srgb, var(--hot-seat-muted) 34%, var(--hot-seat-border));
    background: color-mix(in srgb, var(--hot-seat-muted) 12%, var(--hot-seat-field-bg));
    color: var(--hot-seat-muted);
}

.hot-seat-status-pill--muted {
    border-color: var(--hot-seat-border);
    background: color-mix(in srgb, var(--hot-seat-muted) 10%, var(--hot-seat-field-bg));
    color: var(--hot-seat-muted);
}

.hot-seat-run-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.hot-seat-status-notice {
    margin: 0 0 14px;
    border: 1px solid var(--hot-seat-border);
    border-radius: 14px;
    padding: 11px 13px;
    background: var(--hot-seat-field-bg);
    color: var(--hot-seat-ink);
    font-weight: 800;
    line-height: 1.45;
}

.hot-seat-status-notice[data-status="open"] {
    border-color: color-mix(in srgb, var(--hot-seat-green) 36%, var(--hot-seat-border));
    background: var(--hot-seat-success-soft);
    color: var(--hot-seat-green);
}

.hot-seat-status-notice[data-status="draft"] {
    border-color: color-mix(in srgb, var(--hot-seat-warn) 36%, var(--hot-seat-border));
    background: var(--hot-seat-warn-soft);
    color: var(--hot-seat-warn);
}

.hot-seat-status-notice[data-status="closed"] {
    border-color: color-mix(in srgb, var(--hot-seat-muted) 34%, var(--hot-seat-border));
    background: color-mix(in srgb, var(--hot-seat-muted) 12%, var(--hot-seat-field-bg));
    color: var(--hot-seat-muted);
}

.hot-seat-question-tools {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.hot-seat-question-stats {
    color: var(--hot-seat-green);
    font-weight: 800;
    line-height: 1.45;
}

.hot-seat-question-tool-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(180px, 0.75fr) minmax(130px, 0.4fr);
    gap: 10px;
    align-items: end;
}

.hot-seat-segmented {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hot-seat-chip {
    min-height: 38px;
    border: 1px solid color-mix(in srgb, var(--hot-seat-blue) 24%, transparent);
    border-radius: 999px;
    padding: 8px 12px;
    background: var(--hot-seat-soft);
    color: var(--hot-seat-blue);
    font-weight: 800;
    cursor: pointer;
}

.hot-seat-chip.is-active {
    background: var(--hot-seat-blue);
    color: var(--hot-seat-on-accent);
    border-color: var(--hot-seat-blue);
}

.hot-seat-compact-field {
    display: grid;
    gap: 6px;
}

.hot-seat-compact-field span {
    color: var(--hot-seat-ink);
    font-size: 12px;
    font-weight: 800;
}

.hot-seat-compact-field input,
.hot-seat-compact-field select {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--hot-seat-border);
    border-radius: 12px;
    padding: 8px 10px;
    background: var(--hot-seat-field-bg);
    color: var(--hot-seat-ink);
    font: inherit;
}

.hot-seat-list,
.hot-seat-log-list,
.hot-seat-transcript-list {
    display: grid;
    gap: 12px;
}

.hot-seat-activity-card,
.hot-seat-log-card,
.hot-seat-transcript-card,
.hot-seat-question-card {
    border: 1px solid var(--hot-seat-border);
    border-radius: 18px;
    padding: 15px;
    background: var(--hot-seat-field-bg);
}

.hot-seat-activity-card.is-active,
.hot-seat-question-card--selected {
    border-color: color-mix(in srgb, var(--hot-seat-green) 48%, var(--hot-seat-border));
    background: var(--hot-seat-success-soft);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hot-seat-green) 20%, transparent);
}

.hot-seat-activity-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.hot-seat-activity-card__status-text {
    font-weight: 800;
}

.hot-seat-activity-card--open .hot-seat-activity-card__status-text {
    color: var(--hot-seat-green);
}

.hot-seat-activity-card--draft .hot-seat-activity-card__status-text {
    color: var(--hot-seat-warn);
}

.hot-seat-activity-card--closed .hot-seat-activity-card__status-text {
    color: var(--hot-seat-muted);
}

.hot-seat-question-card.is-muted {
    opacity: 0.65;
    background: color-mix(in srgb, var(--hot-seat-field-bg) 78%, var(--hot-seat-bg));
}

.hot-seat-question-card.is-focused {
    border-color: color-mix(in srgb, var(--hot-seat-blue) 48%, var(--hot-seat-border));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hot-seat-blue) 20%, transparent), var(--hot-seat-shadow);
}

.hot-seat-question-card {
    cursor: pointer;
}

.hot-seat-activity-card h3,
.hot-seat-log-card h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.hot-seat-activity-card p,
.hot-seat-log-card p,
.hot-seat-transcript-card p,
.hot-seat-question-card p {
    margin: 4px 0;
    color: var(--hot-seat-muted);
    line-height: 1.5;
}

.hot-seat-question-card__text {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.hot-seat-activity-card__actions,
.hot-seat-question-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.hot-seat-question-form {
    display: grid;
    gap: 10px;
}

.hot-seat-question-form textarea {
    width: 100%;
    min-height: 124px;
    border: 1px solid var(--hot-seat-border);
    border-radius: 16px;
    padding: 13px 14px;
    background: var(--hot-seat-field-bg);
    color: var(--hot-seat-ink);
    font: inherit;
    resize: vertical;
}

.hot-seat-question-list {
    display: grid;
    gap: 12px;
}

.hot-seat-root--run .hot-seat-question-list {
    max-height: calc(100vh - 300px);
    min-height: 420px;
    overflow: auto;
    padding-right: 4px;
}

.hot-seat-selected-question {
    margin-bottom: 18px;
}

.hot-seat-selected-teacher-question {
    border: 1px solid color-mix(in srgb, var(--hot-seat-green) 42%, var(--hot-seat-border));
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 14px;
    background: var(--hot-seat-success-soft);
}

.hot-seat-selected-teacher-question strong,
.hot-seat-selected-teacher-question span,
.hot-seat-question-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.hot-seat-selected-teacher-question p {
    margin: 8px 0;
    line-height: 1.55;
}

.hot-seat-selected-teacher-question span,
.hot-seat-question-card__meta span {
    color: var(--hot-seat-muted);
    font-size: 13px;
    font-weight: 800;
}

.hot-seat-question-card__meta strong {
    color: var(--hot-seat-green);
    font-size: 13px;
}

.hot-seat-question-detail {
    display: grid;
    gap: 12px;
}

.hot-seat-question-detail__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--hot-seat-muted);
    font-size: 13px;
    font-weight: 800;
}

.hot-seat-question-detail__body {
    border: 1px solid var(--hot-seat-border);
    border-radius: 18px;
    padding: 16px;
    background: var(--hot-seat-field-bg);
    color: var(--hot-seat-ink);
    line-height: 1.6;
    white-space: pre-wrap;
}

.hot-seat-question-detail__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hot-seat-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    margin-top: 10px;
    border: 1px solid color-mix(in srgb, var(--hot-seat-blue) 28%, var(--hot-seat-border));
    border-radius: 999px;
    padding: 7px 12px;
    background: var(--hot-seat-soft);
    color: var(--hot-seat-blue);
    font-weight: 800;
    cursor: pointer;
}

.hot-seat-reaction-btn.is-active {
    background: var(--hot-seat-success-soft);
    color: var(--hot-seat-green);
    border-color: color-mix(in srgb, var(--hot-seat-green) 34%, var(--hot-seat-border));
}

.hot-seat-empty {
    border: 1px dashed color-mix(in srgb, var(--hot-seat-blue) 34%, var(--hot-seat-border));
    border-radius: 18px;
    padding: 20px;
    color: var(--hot-seat-muted);
    background: var(--hot-seat-soft);
}

.hot-seat-message {
    min-height: 22px;
    margin: 10px 0 0;
    color: var(--hot-seat-muted);
    font-weight: 700;
}

.hot-seat-stage {
    align-items: stretch;
}

.hot-seat-stage__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hot-seat-character-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 330px;
}

.hot-seat-character-card__avatar {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: var(--accent-soft, var(--hot-seat-soft));
    font-size: 36px;
}

.hot-seat-mic-ring {
    width: 180px;
    height: 180px;
    margin: 26px auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle, var(--hot-seat-panel-bg) 0 45%, var(--hot-seat-soft) 46% 100%);
    border: 8px solid color-mix(in srgb, var(--hot-seat-blue) 26%, var(--hot-seat-border));
    box-shadow: var(--hot-seat-shadow);
    font-size: 62px;
}

.hot-seat-mic-ring.is-live {
    animation: hotSeatPulse 1.4s ease-in-out infinite;
    border-color: color-mix(in srgb, var(--hot-seat-blue) 62%, var(--hot-seat-border));
}

.hot-seat-root--run .hot-seat-mic-ring {
    width: 140px;
    height: 140px;
    margin: 18px auto;
    font-size: 50px;
}

.hot-seat-text-form {
    grid-template-columns: 1fr auto;
    margin-top: 18px;
}

.hot-seat-transcript-card strong {
    display: block;
    color: var(--hot-seat-blue);
}

.hot-seat-transcript-card em {
    display: block;
    margin-top: 8px;
    color: var(--hot-seat-green);
    font-style: normal;
    font-weight: 700;
}

.hidden {
    display: none !important;
}

@keyframes hotSeatPulse {
    0%, 100% {
        box-shadow: var(--hot-seat-shadow);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 20px 60px color-mix(in srgb, var(--hot-seat-blue) 34%, transparent);
        transform: scale(1.03);
    }
}

@media (max-width: 980px) {
    .hot-seat-root,
    .hot-seat-student-root {
        padding: 16px;
    }

    .hot-seat-hero,
    .hot-seat-stage,
    .hot-seat-grid--admin,
    .hot-seat-grid--run,
    .hot-seat-student-grid,
    .hot-seat-question-tool-row {
        grid-template-columns: 1fr;
        display: grid;
    }

    .hot-seat-form__row,
    .hot-seat-text-form {
        grid-template-columns: 1fr;
    }

    .hot-seat-voice-select-row {
        grid-template-columns: 1fr;
    }

    .hot-seat-run-status,
    .hot-seat-activity-card__head {
        justify-content: flex-start;
    }

    .hot-seat-character-card {
        min-width: 0;
    }
}
