/* =========================================================
    UNDERWATER STYLESHEET
    - Organized by page scope and shared foundations.
    - Page-specific selectors are prefixed with body classes:
      .page-welcome, .page-signin, .page-dashboard, .page-live
    - This prevents accidental cross-page style bleed.
    ========================================================= */

/* =========================
    SHARED FOUNDATION
    Used primarily by session_host_signup.html
    ========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #1a1a1a;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    padding: 40px 20px;
    min-height: 100vh;
}

.global-header,
.page-welcome header,
.page-signin header,
.page-dashboard header {
    background-color: #2d2d2d;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #4a4a4a;
}

.global-header {
    margin-bottom: 0;
}

.global-nav,
.page-welcome nav,
.page-signin nav {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

#headerWelcome {
    display: flex;
    align-items: center;
    margin-left: auto;
    padding-left: 40px;
    padding-right: 40px;
}

#headerAuthSection {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.header-welcome {
    color: #a0e7e5;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.global-nav a,
.page-welcome nav a,
.page-signin nav a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
    text-transform: lowercase;
    letter-spacing: 0.5px;
}

.global-nav a:hover,
.page-welcome nav a:hover,
.page-signin nav a:hover {
    color: #a0e7e5;
}

.global-header .logo,
.page-welcome .logo,
.page-signin .logo,
.page-dashboard .logo {
    font-size: 24px;
    font-weight: 700;
    color: #a0e7e5;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    letter-spacing: 2px;
}

.global-footer {
    border-top: 1px solid #4a4a4a;
    background-color: #2d2d2d;
    color: #b0b0b0;
    padding: 18px 20px;
    margin-top: 40px;
}

.app-dialog {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.app-dialog.is-hidden {
    display: none;
}

.app-dialog-closing .app-dialog-backdrop {
    animation: appDialogFadeOut 0.18s ease-in forwards;
}

.app-dialog-closing .app-dialog-panel {
    animation: appDialogPopOut 0.18s ease-in forwards;
}

@keyframes appDialogFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes appDialogPopIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes appDialogFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes appDialogPopOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
}

.app-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(2px);
    animation: appDialogFadeIn 0.18s ease-out;
}

.app-dialog-panel {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    background: #23272b;
    border: 1px solid #4a4a4a;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    padding: 24px;
    animation: appDialogPopIn 0.18s ease-out;
}

.app-dialog-title {
    color: #a0e7e5;
    font-size: 22px;
    margin-bottom: 12px;
    line-height: 1.2;
}

.app-dialog-message {
    color: #e0e0e0;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.app-dialog-details {
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #1b1f22;
    border: 1px solid #3c4449;
    color: #b8c0c7;
    font-size: 13px;
    white-space: pre-wrap;
}

.app-dialog-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn {
    padding: 10px 14px;
    background-color: #006564;
    color: #ffffff;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #004d4c;
}

.btn.secondary {
    background-color: #707070;
    font-weight: 400;
}

.btn.secondary:hover {
    background-color: #808080;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: lowercase;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background-color: #2d2d2d;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.error-message {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

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

.form-note {
    font-size: 12px;
    color: #808080;
    margin-top: 5px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.greeting {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 30px;
    text-align: center;
    color: #a0e7e5;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #a0e7e5;
    margin-top: 25px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 10px;
    border-bottom: 1px solid #4a4a4a;
}

.section-title:first-of-type {
    margin-top: 0;
}

/*
    Shared button baseline.
    Note: .page-live .submit-btn intentionally overrides parts of this.
*/
.submit-btn {
    width: 100%;
    padding: 24px;
    background-color: #006564;
    color: #e0e0e0;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    margin-top: 30px;
    letter-spacing: 0.5px;
}

.submit-btn:active {
    transform: scale(0.98);
}

.submit-btn:hover {
    background-color: #357a63;
}

input:invalid:not(:placeholder-shown) {
    border-color: #ff6b6b;
}

input:invalid:not(:placeholder-shown) ~ .error-message {
    display: block;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="number"],
textarea {
    width: 100%;
    padding: 12px;
    background-color: #3a3a3a;
    border: 1px solid #4a4a4a;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 14px;
    transition: border-color 0.3s, background-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
textarea:focus {
    outline: none;
    border-color: #a0e7e5;
    background-color: #404040;
}

textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #b0b0b0;
}

label .required {
    color: #ff6b6b;
    margin-left: 2px;
}

/* =========================
   WELCOME PAGE
   File: welcome.html
   Scope: body.page-welcome
   ========================= */

body.page-welcome {
    background-color: #1a1a1a;
    color: #e0e0e0;
    min-height: 100vh;
    padding: 0;
}

.page-welcome .about-footnote {
    margin-top: 15px;
    font-size: 12px;
    color: #808080;
}

.page-welcome .about-section {
    background-color: #2d2d2d;
    border: 1px solid #4a4a4a;
    border-radius: 8px;
    padding: 30px;
    margin-top: 60px;
}

.page-welcome .about-section h3 {
    font-size: 16px;
    color: #a0e7e5;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.page-welcome .about-section li {
    margin-bottom: 8px;
}

.page-welcome .about-section p {
    color: #b0b0b0;
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 12px;
}

.page-welcome .about-section ul {
    list-style-position: inside;
    color: #b0b0b0;
    font-size: 13px;
    line-height: 1.8;
    margin-left: 15px;
    margin-bottom: 12px;
}

.page-welcome .cta-box {
    background-color: #2d2d2d;
    border: 2px solid #4a4a4a;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-welcome .cta-box:hover {
    border-color: #a0e7e5;
    box-shadow: 0 0 20px rgba(160, 231, 229, 0.2);
    transform: translateY(-5px);
}

.page-welcome .cta-box h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #a0e7e5;
}

.page-welcome .cta-box p {
    color: #b0b0b0;
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.6;
}

.page-welcome .cta-boxes {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
    margin-bottom: 80px;
}

.page-welcome .cta-button {
    padding: 12px 24px;
    background-color: #2d5f4f;
    color: #e0e0e0;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-welcome .cta-button:active {
    transform: scale(0.98);
}

.page-welcome .cta-button:hover {
    background-color: #357a63;
}

.page-welcome .hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
}

.page-welcome .hamburger span {
    width: 25px;
    height: 3px;
    background-color: #e0e0e0;
    border-radius: 2px;
    transition: all 0.3s;
}

.page-welcome .logo {
    font-size: 32px;
    font-weight: 700;
    color: #a0e7e5;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    letter-spacing: 2px;
    transform: scaleY(1.1);
}

.page-welcome .session-id-input {
    width: 100%;
    padding: 12px;
    background-color: #3a3a3a;
    border: 1px solid #4a4a4a;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 14px;
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.page-welcome .session-id-input::placeholder {
    color: #606060;
}

.page-welcome .session-id-input:focus {
    outline: none;
    border-color: #a0e7e5;
    background-color: #404040;
}

.page-welcome .signin-button {
    padding: 12px 24px;
    background-color: #4a5a6f;
    color: #e0e0e0;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-block;
}

.page-welcome .signin-button:hover {
    background-color: #5a6a7f;
}

.page-welcome main {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-welcome nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.page-welcome nav a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
    text-transform: lowercase;
    letter-spacing: 0.5px;
}

.page-welcome nav a:hover {
    color: #a0e7e5;
}

/* Welcome page: small phones */
@media (max-width: 480px) {
    .page-welcome .logo {
        font-size: 20px;
    }

    .page-welcome header {
        padding: 12px 15px;
    }

    .page-welcome main {
        padding: 30px 15px;
    }

    .page-welcome .cta-box {
        padding: 25px 15px;
    }

    .page-welcome .cta-box h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .page-welcome .cta-box p {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .page-welcome .session-id-input,
    .page-welcome .cta-button,
    .page-welcome .signin-button {
        font-size: 13px;
        padding: 10px 16px;
    }
}

/* Welcome page: tablet and down */
@media (max-width: 768px) {
    .page-welcome header {
        padding: 15px 20px;
    }

    .page-welcome .logo {
        font-size: 24px;
    }

    .page-welcome nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: #2d2d2d;
        flex-direction: column;
        gap: 15px;
        padding: 20px;
        border-bottom: 1px solid #4a4a4a;
    }

    .page-welcome nav.active {
        display: flex;
    }

    .page-welcome nav a {
        padding: 10px 0;
        border-bottom: 1px solid #4a4a4a;
    }

    .page-welcome .hamburger {
        display: flex;
    }

    .page-welcome main {
        padding: 40px 15px;
    }

    .page-welcome .cta-boxes {
        grid-template-columns: 1fr;
        gap: 20px;
        order: -1;
    }

    .page-welcome .cta-box:first-child {
        order: -2;
    }

    .page-welcome .cta-box {
        padding: 30px 20px;
    }

    .page-welcome .cta-box h2 {
        font-size: 20px;
    }

    .page-welcome .about-section {
        padding: 20px;
        margin-top: 40px;
    }

    .page-welcome .about-section h3 {
        font-size: 14px;
    }

    .page-welcome .about-section p,
    .page-welcome .about-section ul {
        font-size: 12px;
    }
}

/* =========================
   SESSION HOST SIGN-IN PAGE
   File: session_host_signin.html
   Scope: body.page-signin
   ========================= */

body.page-signin {
    background-color: #1a1a1a;
    color: #e0e0e0;
    min-height: 100vh;
    padding: 0;
}

.page-signin .error-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #2d5f4f;
    color: #e0e0e0;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s;
    font-size: 13px;
}

.page-signin .error-link:hover {
    background-color: #357a63;
}

.page-signin .error-message {
    background-color: #4a2a2a;
    border: 1px solid #8a4a4a;
    color: #ff9999;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 25px;
    display: none;
    text-align: center;
}

.page-signin .error-message h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #ff6b6b;
}

.page-signin .error-message p {
    margin-bottom: 15px;
    font-size: 14px;
}

.page-signin .loading {
    display: none;
    text-align: center;
    color: #a0e7e5;
}

.page-signin .loading::after {
    content: " ...";
    animation: dots 1.5s steps(4, end) infinite;
}

.page-signin .signin-box {
    width: 100%;
    max-width: 500px;
    background-color: #2d2d2d;
    padding: 50px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.page-signin .signin-btn {
    width: 100%;
    padding: 14px;
    background-color: #2d5f4f;
    color: #e0e0e0;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
    letter-spacing: 0.5px;
}

.page-signin .signin-btn:active {
    transform: scale(0.98);
}

.page-signin .signin-btn:hover {
    background-color: #357a63;
}

.page-signin .signin-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 20px 20px;
}

.page-signin .signin-form .form-group {
    margin-bottom: 25px;
}

.page-signin .signin-form input[type="text"] {
    width: 100%;
    padding: 14px;
    background-color: #3a3a3a;
    border: 1px solid #4a4a4a;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 14px;
    transition: border-color 0.3s, background-color 0.3s;
}

.page-signin .signin-form input[type="email"],
.page-signin .signin-form input[type="password"] {
    width: 100%;
    padding: 14px;
    background-color: #3a3a3a;
    border: 1px solid #4a4a4a;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 14px;
    transition: border-color 0.3s, background-color 0.3s;
}

.page-signin .signin-form input[type="text"]:focus {
    outline: none;
    border-color: #a0e7e5;
    background-color: #404040;
}

.page-signin .signin-form input[type="email"]:focus,
.page-signin .signin-form input[type="password"]:focus {
    outline: none;
    border-color: #a0e7e5;
    background-color: #404040;
}

.page-signin .signin-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #b0b0b0;
    font-size: 14px;
}

.page-signin .signin-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-signin .signin-header h1 {
    font-size: 28px;
    color: #a0e7e5;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.page-signin .signin-header p {
    color: #b0b0b0;
    font-size: 14px;
}

.page-signin .signup-link {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #4a4a4a;
}

.page-signin .signup-link a {
    color: #a0e7e5;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.page-signin .signup-link a:hover {
    color: #c0f7f5;
}

.page-signin .signup-link p {
    color: #b0b0b0;
    font-size: 14px;
}

.page-signin .reset-feedback {
    display: none;
}

.page-signin .reset-feedback.is-visible {
    display: block;
}

.page-signin .success-message {
    background-color: #214537;
    border: 1px solid #2f6c55;
    color: #b8f7d4;
    padding: 14px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.page-signin .reset-confirm-form {
    margin-top: 24px;
}

/* Shared by sign-in loading indicator */
@keyframes dots {
    0%,
    20% {
        content: " ";
    }

    40% {
        content: " .";
    }

    60% {
        content: " ..";
    }

    80%,
    100% {
        content: " ...";
    }
}

/* Sign-in page: mobile */
@media (max-width: 600px) {
    .global-header,
    .page-welcome header,
    .page-signin header,
    .page-dashboard header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 12px;
    }

    .global-nav,
    .page-welcome nav,
    .page-signin nav {
        gap: 16px;
        justify-content: center;
    }

    .global-header .logo,
    .page-welcome .logo,
    .page-signin .logo,
    .page-dashboard .logo {
        font-size: 20px;
    }

    .page-signin .signin-box {
        padding: 30px 20px;
    }

    .page-signin .signin-header h1 {
        font-size: 24px;
    }

    .page-signin .signin-form input[type="text"] {
        padding: 12px;
    }

    .footer-content {
        justify-content: center;
        text-align: center;
    }
}

/* =========================
   SESSION HOST DASHBOARD PAGE
   File: session_host_dashboard.html
   Scope: body.page-dashboard
   ========================= */

body.page-dashboard {
    background-color: #1a1a1a;
    color: #e0e0e0;
    min-height: 100vh;
    padding: 0;
}

.page-dashboard .action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.page-dashboard .btn {
    padding: 12px 24px;
    background-color: #2d5f4f;
    color: #e0e0e0;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.page-dashboard .btn:hover {
    background-color: #357a63;
}

.page-dashboard .btn.secondary {
    background-color: #4a5a6f;
}

.page-dashboard .btn.secondary:hover {
    background-color: #5a6a7f;
}

.page-dashboard .empty-state {
    text-align: center;
    padding: 60px 20px;
    background-color: #2d2d2d;
    border: 1px dashed #4a4a4a;
    border-radius: 8px;
    color: #b0b0b0;
}

.page-dashboard .empty-state p {
    margin-bottom: 20px;
}

.page-dashboard .empty-state-full {
    grid-column: 1 / -1;
}

.page-dashboard .filter-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #b0b0b0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.page-dashboard .filter-tab:hover {
    color: #a0e7e5;
}

.page-dashboard .filter-tab.active {
    color: #a0e7e5;
    border-bottom-color: #a0e7e5;
}

.page-dashboard .filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid #4a4a4a;
    padding-bottom: 0;
}

.page-dashboard .header-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.page-dashboard .host-info {
    color: #b0b0b0;
    font-size: 13px;
}

.page-dashboard .host-info strong {
    color: #a0e7e5;
}

.page-dashboard .logo {
    font-size: 24px;
    font-weight: 700;
    color: #a0e7e5;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    letter-spacing: 2px;
}

.page-dashboard .logout-btn {
    padding: 8px 16px;
    background-color: #4a3a3a;
    color: #e0e0e0;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.page-dashboard .logout-btn:hover {
    background-color: #5a4a4a;
}

.page-dashboard .session-action-btn {
    flex: 1;
    padding: 8px 12px;
    background-color: #3a3a3a;
    color: #a0e7e5;
    border: 1px solid #4a4a4a;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.page-dashboard .session-action-btn:hover {
    background-color: #4a4a4a;
    border-color: #a0e7e5;
}

.page-dashboard .session-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #4a4a4a;
}

.page-dashboard .session-card {
    background-color: #2d2d2d;
    border: 1px solid #4a4a4a;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.page-dashboard .session-card:hover {
    border-color: #a0e7e5;
    box-shadow: 0 0 15px rgba(160, 231, 229, 0.1);
}

.page-dashboard .session-card-clickable {
    cursor: pointer;
}

.page-dashboard .session-card-clickable:focus {
    outline: 2px solid #a0e7e5;
    outline-offset: 2px;
}

.page-dashboard .session-actions.muted {
    color: #8a8a8a;
    font-size: 12px;
    border-top: 1px solid #4a4a4a;
    padding-top: 12px;
    margin-top: 12px;
}

.page-dashboard .session-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.page-dashboard .session-id {
    font-size: 16px;
    font-weight: 700;
    color: #a0e7e5;
    letter-spacing: 1px;
    font-family: monospace;
}

.page-dashboard .session-perf-title {
    font-size: 15px;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 4px;
}

.page-dashboard .session-no-value {
    color: #606060;
    font-weight: 400;
    font-style: italic;
}

.page-dashboard .session-info {
    color: #b0b0b0;
    font-size: 13px;
    margin-bottom: 10px;
    line-height: 1.6;
}

.page-dashboard .session-info label {
    color: #808080;
    font-size: 12px;
}

.page-dashboard .session-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.page-dashboard .sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.page-dashboard .sessions-section {
    margin-top: 50px;
}

.page-dashboard .sessions-section h2 {
    font-size: 20px;
    color: #a0e7e5;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 10px;
    border-bottom: 1px solid #4a4a4a;
}

.page-dashboard .status-active {
    background-color: #2d5f4f;
    color: #a0e7e5;
}

.page-dashboard .status-inactive {
    background-color: #4a3a3a;
    color: #b0b0b0;
}

.page-dashboard .welcome-section {
    margin-bottom: 40px;
}

.page-dashboard .welcome-section h1 {
    font-size: 28px;
    color: #a0e7e5;
    margin-bottom: 10px;
}

.page-dashboard .welcome-section p {
    color: #b0b0b0;
    font-size: 14px;
}

.page-dashboard header {
    background-color: #2d2d2d;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #4a4a4a;
}

.page-dashboard main {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-dashboard .profile-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.page-dashboard .profile-form-message {
    min-height: 20px;
    margin-top: 6px;
    font-size: 13px;
    color: #8fd7c0;
}

.page-dashboard .profile-form-message.error {
    color: #ff9f9f;
}

.page-dashboard .profile-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
}

.page-dashboard .profile-modal.open {
    display: block;
}

.page-dashboard .profile-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
}

.page-dashboard .profile-modal-content {
    position: relative;
    z-index: 1;
    width: min(760px, calc(100% - 24px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    margin: 20px auto;
    padding: 28px;
    border-radius: 10px;
    background: #222;
    border: 1px solid #4a4a4a;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.page-dashboard .profile-modal-content h2 {
    color: #a0e7e5;
    margin-bottom: 6px;
}

.page-dashboard .profile-modal-subtitle {
    color: #b0b0b0;
    font-size: 13px;
    margin-bottom: 18px;
}

.page-dashboard .profile-modal input[readonly] {
    background-color: #2a2a2a;
    color: #9d9d9d;
    border-color: #3f3f3f;
    cursor: not-allowed;
}

/* Dashboard page: tablet and down */
@media (max-width: 768px) {
    .page-dashboard header {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .page-dashboard main {
        padding: 20px;
    }

    .page-dashboard .action-buttons {
        flex-direction: column;
    }

    .page-dashboard .sessions-grid {
        grid-template-columns: 1fr;
    }

    .page-dashboard .filter-tabs {
        overflow-x: auto;
    }

    .page-dashboard .profile-form-actions {
        flex-direction: column-reverse;
    }

    .page-dashboard .profile-form-actions .btn {
        width: 100%;
    }

    .page-dashboard .profile-modal-content {
        padding: 20px;
        margin: 12px auto;
        max-height: calc(100vh - 24px);
    }
}

/* =========================
   SESSION MANAGER PAGE
   File: session_manager.html
   Scope: body.page-session-manager
   ========================= */

body.page-session-manager {
    background-color: #151719;
    color: #e0e0e0;
    min-height: 100vh;
    padding: 0;
}

.page-session-manager .manager-shell {
    max-width: 760px;
    margin: 20px auto;
    padding: 0 20px;
}

.page-session-manager .manager-card {
    background: #222629;
    border: 1px solid #3e454b;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.28);
}

.page-session-manager .manager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.page-session-manager .manager-title {
    font-size: 22px;
    color: #a0e7e5;
}

.page-session-manager .manager-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 10px;
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid #3a4248;
}

.page-session-manager .meta-collapse-toggle {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #8fa4b0;
    font-size: 11px;
    cursor: pointer;
    padding: 4px 2px;
    margin-top: 2px;
}

.page-session-manager .meta-collapse-toggle:hover {
    color: #c8dce6;
}

.page-session-manager .meta-collapse-arrow {
    transition: transform 0.2s ease;
}

.page-session-manager .meta-collapse-toggle[aria-expanded="false"] .meta-collapse-arrow {
    transform: rotate(-90deg);
}

.page-session-manager .meta-collapsible {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 10px;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.25s ease;
    max-height: 500px;
    opacity: 1;
}

.page-session-manager .meta-collapsible.collapsed {
    max-height: 0;
    opacity: 0;
}

.page-session-manager .meta-row {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 3px 2px;
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.page-session-manager .meta-row.description-row {
    grid-column: 1 / -1;
    padding-top: 4px;
    padding-bottom: 4px;
}

.page-session-manager .meta-row .meta-value {
    display: inline;
    min-width: 0;
    word-break: break-word;
    order: 1;
}

.page-session-manager #row-performance_title .meta-value,
.page-session-manager #sessionIdText {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.page-session-manager .meta-row label {
    display: block;
    color: #8f9aa3;
    font-size: 11px;
    letter-spacing: 0.3px;
    opacity: 0.92;
    margin-top: 2px;
    margin-right: 0;
    white-space: normal;
    text-align: left;
    order: 3;
    width: 100%;
}

.page-session-manager .meta-edit-btn {
    background: none;
    border: none;
    color: #566570;
    cursor: pointer;
    padding: 3px 5px;
    margin-left: 0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
    display: inline-flex;
    vertical-align: middle;
    margin-left: 6px;
    order: 2;
}

.page-session-manager .meta-copy-btn {
    background: none;
    border: none;
    color: #566570;
    cursor: pointer;
    padding: 3px 5px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
    vertical-align: middle;
    margin-left: 6px;
    order: 2;
}

.page-session-manager .meta-copy-btn:hover {
    color: #a0e7e5;
    background: rgba(160, 231, 229, 0.1);
}

.page-session-manager .meta-edit-btn:hover {
    color: #a0e7e5;
    background: rgba(160, 231, 229, 0.1);
}

.page-session-manager .meta-edit-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin-top: 0;
    margin-top: 6px;
    order: 4;
}

.page-session-manager .meta-edit-row.is-hidden {
    display: none;
}

.page-session-manager .meta-edit-input {
    flex: 1;
    background: #1e2326;
    border: 1px solid #4a5560;
    border-radius: 5px;
    color: #e0e8ee;
    font-size: 13px;
    padding: 5px 9px;
    outline: none;
    min-width: 0;
}

.page-session-manager .meta-edit-input:focus {
    border-color: #a0e7e5;
    box-shadow: 0 0 0 2px rgba(160, 231, 229, 0.18);
}

.page-session-manager .meta-edit-input[type="number"] {
    max-width: 120px;
}

.page-session-manager .meta-save-btn,
.page-session-manager .meta-cancel-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: color 0.15s, background 0.15s;
}

.page-session-manager .meta-save-btn {
    color: #7de8c8;
}

.page-session-manager .meta-save-btn:hover {
    color: #a8f5e0;
    background: rgba(125, 232, 200, 0.12);
}

.page-session-manager .meta-cancel-btn {
    color: #8f9aa3;
}

.page-session-manager .meta-cancel-btn:hover {
    color: #ff9f9f;
    background: rgba(255, 159, 159, 0.1);
}

.page-session-manager .manager-actions {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.page-session-manager .session-action-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.page-session-manager .scene-editor-modal {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: none;
}

.page-session-manager .scene-editor-modal.open {
    display: block;
}

.page-session-manager .scene-editor-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
}

.page-session-manager .scene-editor-content {
    position: relative;
    z-index: 1;
    width: min(680px, calc(100% - 24px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    margin: 20px auto;
    padding: 28px;
    border-radius: 10px;
    background: #222629;
    border: 1px solid #4a4a4a;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.page-session-manager .scene-editor-content h2 {
    color: #a0e7e5;
    margin-bottom: 6px;
}

.page-session-manager .scene-editor-content select {
    width: 100%;
    padding: 11px 12px;
    border-radius: 8px;
    border: 1px solid #4b5a6a;
    background: #121b25;
    color: #e0edf7;
    font-size: 14px;
}

.page-session-manager .scene-editor-content select:focus {
    outline: none;
    border-color: #81ddd4;
    box-shadow: 0 0 0 3px rgba(129, 221, 212, 0.18);
}

.page-session-manager .scene-editor-subtitle {
    color: #b0b0b0;
    font-size: 13px;
    margin-bottom: 18px;
}

.page-session-manager .scene-editor-message {
    min-height: 20px;
    margin-top: 8px;
    font-size: 13px;
    color: #8fd7c0;
}

.page-session-manager .scene-editor-message.error {
    color: #ff9f9f;
}

.page-session-manager .scene-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.page-session-manager .welcome-image-meta {
    margin-top: 8px;
    color: #9fb9c9;
    font-size: 12px;
}

.page-session-manager .welcome-image-file-controls {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-session-manager .welcome-image-file-input {
    display: none;
}

.page-session-manager .welcome-image-file-name {
    color: #c7d6e4;
    font-size: 13px;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-session-manager .welcome-image-delete-btn {
    border: 1px solid #7d4c58;
    background: #3a232b;
    color: #ffbfc9;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 12px;
    cursor: pointer;
}

.page-session-manager .welcome-image-delete-btn:hover {
    background: #4a2a34;
}

.page-session-manager .welcome-image-drop-zone {
    margin-top: 8px;
    border: 1px dashed #557084;
    background: #121b25;
    border-radius: 10px;
    padding: 14px;
    color: #b5cbd9;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.page-session-manager .welcome-image-drop-zone:hover,
.page-session-manager .welcome-image-drop-zone:focus {
    border-color: #86dcd4;
    background: #142433;
    box-shadow: 0 0 0 2px rgba(134, 220, 212, 0.12);
    outline: none;
}

.page-session-manager .welcome-image-drop-zone.drag-over {
    border-color: #9beee4;
    background: #173042;
    box-shadow: 0 0 0 3px rgba(155, 238, 228, 0.18);
}

.page-session-manager .welcome-image-drop-title {
    font-size: 13px;
    font-weight: 700;
    color: #d2ecf7;
}

.page-session-manager .welcome-image-drop-subtitle {
    margin-top: 4px;
    font-size: 12px;
    color: #96afc2;
}

.page-session-manager .welcome-image-preview-wrap {
    margin-top: 10px;
    border-radius: 10px;
    border: 1px solid #3a4a58;
    background: #111922;
    padding: 8px;
    display: inline-block;
    max-width: min(100%, 420px);
}

.page-session-manager .welcome-image-preview {
    display: block;
    width: min(100%, var(--welcome-preview-width, 150px));
    max-width: 150px;
    max-height: 220px;
    object-fit: contain;
    border-radius: 8px;
}

.page-session-manager .welcome-image-layout {
    margin-top: 8px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.page-session-manager .welcome-image-side-controls .form-group {
    margin-bottom: 0;
}

.page-session-manager .welcome-image-side-controls {
    display: grid;
    gap: 12px;
}

.page-session-manager .welcome-image-size-row {
    margin-top: 6px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 84px auto;
    gap: 10px;
    align-items: center;
}

.page-session-manager .welcome-image-size-row input[type='number'] {
    width: 100%;
}

.page-session-manager .welcome-image-size-unit {
    color: #9eb2c4;
    font-size: 13px;
}

.page-session-manager .welcome-live-preview-box {
    margin-top: 10px;
    border: 1px solid #3e4d5d;
    border-radius: 10px;
    background: #121922;
    padding: 12px;
}

.page-session-manager .welcome-live-preview-title {
    color: #bde7ea;
    font-size: 12px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.page-session-manager .welcome-live-preview-stage {
    border: 1px solid #2f3f50;
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(20, 33, 48, 0.94) 0%, rgba(14, 24, 36, 0.96) 100%);
    padding: 14px;
    text-align: center;
}

.page-session-manager .welcome-live-preview-image {
    width: var(--welcome-live-preview-width, 70%);
    max-width: 100%;
    max-height: 220px;
    border-radius: 10px;
    object-fit: contain;
    border: 1px solid rgba(145, 232, 222, 0.38);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

.page-session-manager .welcome-live-preview-heading {
    margin-top: 12px;
    color: #def7f6;
    font-size: 24px;
    line-height: 1.2;
}

.page-session-manager .welcome-live-preview-copy {
    margin-top: 10px;
    color: #b9c9d8;
    line-height: 1.55;
    font-size: 14px;
}

.page-session-manager .welcome-live-preview-copy a {
    color: #9cefe3;
}

.page-session-manager .manager-workspace {
    margin-top: 22px;
}

.page-session-manager .manager-tabs {
    display: flex;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #3a4248;
}

.page-session-manager .manager-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #8f9aa3;
    padding: 10px 2px 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.page-session-manager .manager-tab:hover {
    color: #d4f7f6;
}

.page-session-manager .manager-tab.active {
    color: #a0e7e5;
    border-bottom-color: #a0e7e5;
}

.page-session-manager .manager-panel {
    padding-top: 16px;
}

.page-session-manager .is-hidden {
    display: none;
}

.page-session-manager .scene-list {
    display: grid;
    gap: 12px;
}

.page-session-manager .scene-manager-footer {
    margin-top: 14px;
    display: flex;
    justify-content: flex-start;
}

/* Split layout: host timeline + audience preview */
.page-session-manager .live-split-layout {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 16px;
    min-height: 300px;
    margin-top: 16px;
}

.page-session-manager .live-host-pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.page-session-manager .live-host-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.page-session-manager .live-host-title {
    margin: 0;
    font-size: 15px;
    color: #a3c4d6;
    font-weight: 600;
}

.page-session-manager .host-timeline {
    flex: 1;
    overflow-y: auto;
    max-height: 60vh;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 6px;
}

.page-session-manager .timeline-block {
    border: 1px solid #2e3840;
    border-radius: 8px;
    background: #1c2328;
    padding: 10px 12px;
    transition: border-color 0.2s;
}

.page-session-manager .timeline-block.live {
    border-color: #2d7e69;
    background: #1a2e2a;
}

.page-session-manager .timeline-scene-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.page-session-manager .timeline-scene-label {
    font-size: 12px;
    font-weight: 700;
    color: #7fb8d0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-session-manager .timeline-edit-link {
    font-size: 11px;
    color: #5a8aa0;
    text-decoration: none;
}

.page-session-manager .timeline-edit-link:hover {
    color: #8fbcd4;
}

.page-session-manager .timeline-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-top: 1px solid #2a3338;
}

.page-session-manager .timeline-step:first-of-type {
    border-top: none;
}

.page-session-manager .timeline-step.live {
    background: rgba(15, 125, 98, 0.08);
    border-radius: 6px;
}

.page-session-manager .timeline-cue-btn {
    min-width: 52px;
    min-height: 44px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #4a545c;
    background: #31373d;
    color: #d6dde2;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    touch-action: manipulation;
    flex-shrink: 0;
}

.page-session-manager .timeline-cue-btn:hover:not(:disabled) {
    border-color: #6b7b84;
    background: #3a434a;
}

.page-session-manager .timeline-cue-btn.live {
    background: #0f7d62;
    border-color: #0f7d62;
    color: #ffffff;
    cursor: default;
}

.page-session-manager .timeline-cue-btn:disabled {
    opacity: 0.85;
}

.page-session-manager .timeline-step-content {
    flex: 1;
    min-width: 0;
}

.page-session-manager .timeline-step-title {
    font-size: 13px;
    font-weight: 600;
    color: #d8f4f3;
}

.page-session-manager .timeline-step-detail {
    font-size: 11px;
    color: #7a9aaa;
    margin-top: 2px;
}

.page-session-manager .timeline-skip-badge {
    display: inline-block;
    font-size: 9px;
    background: #3a4550;
    color: #8a9ba5;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 6px;
    font-weight: 500;
    vertical-align: middle;
}

/* Audience preview pane */
.page-session-manager .live-hostview-pane {
    display: flex;
    flex-direction: column;
    border: 1px solid #2e3840;
    border-radius: 10px;
    background: #161c21;
    padding: 14px;
    max-height: 60vh;
    overflow-y: auto;
}

.page-session-manager .live-hostview-title {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #8a9ba5;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-session-manager .audience-preview-toolbar {
    position: sticky;
    top: 6px;
    left: 6px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(15, 26, 34, 0.75);
    border-radius: 6px;
    padding: 4px 6px;
    backdrop-filter: blur(4px);
    margin: 6px 0 -30px 6px;
}

.page-session-manager .zoom-btn {
    background: rgba(42, 51, 56, 0.8);
    border: 1px solid #3e454b;
    color: #c8dce6;
    border-radius: 4px;
    width: 22px;
    height: 22px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-session-manager .zoom-btn:hover {
    background: #3a4750;
}

.page-session-manager .zoom-level {
    font-size: 10px;
    color: #8fa4b0;
    min-width: 30px;
    text-align: center;
}

.page-session-manager .audience-preview {
    position: relative;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 8px;
    border: 1px solid #3a4754;
    background: #0f1a22;
}

.page-session-manager .audience-preview-full {
    height: 360px;
    min-height: 360px;
    max-height: 360px;
    resize: vertical;
}

.page-session-manager .audience-preview-iframe {
    width: 100%;
    min-height: 600px;
    border: none;
    border-radius: 8px;
    transform-origin: top left;
    display: block;
}

.page-session-manager .host-view-content {
    flex: 1;
}

.page-session-manager .host-view-placeholder {
    color: #5a6a75;
    font-size: 13px;
    text-align: center;
    padding: 30px 10px;
}

.page-session-manager .host-view-scene-title {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #c8dce6;
}

.page-session-manager .host-view-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.page-session-manager .host-view-option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #1a2329;
    border-radius: 6px;
    font-size: 13px;
    color: #c8dce6;
}

.page-session-manager .host-view-vote-count {
    font-weight: 600;
    color: #a0e7e5;
}

.page-session-manager .host-view-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.page-session-manager .host-view-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-session-manager .host-view-bar-row.winner {
    font-weight: 600;
}

.page-session-manager .host-view-bar-label {
    flex: 0 0 90px;
    font-size: 12px;
    color: #c8dce6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-session-manager .host-view-bar-track {
    flex: 1;
    height: 14px;
    background: #1a2329;
    border-radius: 4px;
    overflow: hidden;
}

.page-session-manager .host-view-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.page-session-manager .host-view-bar-count {
    flex: 0 0 30px;
    font-size: 12px;
    color: #a0e7e5;
    font-weight: 600;
    text-align: right;
}

.page-session-manager .host-view-message {
    color: #c8dce6;
    font-size: 14px;
    text-align: center;
    padding: 20px 10px;
}

.page-session-manager .host-suggestions-count {
    color: #98b7c8;
    font-size: 12px;
    margin-bottom: 10px;
}

.page-session-manager .host-suggestion-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.page-session-manager .host-suggestion-filter-btn {
    border: 1px solid #3a5568;
    background: #1d2d3a;
    color: #b7d0df;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
}

.page-session-manager .host-suggestion-filter-btn:hover {
    background: #274052;
}

.page-session-manager .host-suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.page-session-manager .host-suggestion-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    background: #1a2329;
    border: 1px solid #2d3944;
    border-radius: 8px;
    padding: 8px 10px;
}

.page-session-manager label.host-suggestion-row {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    cursor: pointer;
}

.page-session-manager .host-suggestion-row.selected {
    border-color: #2b7f6b;
    background: #1b302d;
}

.page-session-manager .host-suggestion-row.hidden {
    border-style: dashed;
    opacity: 0.72;
}

.page-session-manager .host-suggestion-row-text {
    color: #d6e7f2;
    font-size: 13px;
}

.page-session-manager .host-suggestion-row-member {
    color: #88a2b3;
    font-size: 12px;
    text-align: right;
}

.page-session-manager .host-suggestion-checkbox {
    width: 16px;
    height: 16px;
}

.page-session-manager .host-suggestion-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.page-session-manager .host-suggestion-action-btn {
    border: 1px solid #3e5568;
    background: #1f2c37;
    color: #bdd6e6;
    border-radius: 7px;
    padding: 5px 8px;
    font-size: 11px;
    cursor: pointer;
}

.page-session-manager .host-suggestion-action-btn:hover {
    background: #2b3c4a;
}

.page-session-manager .host-suggestion-action-btn.danger {
    border-color: #744752;
    background: #3a2229;
    color: #ffc2cf;
}

.page-session-manager .host-suggestion-action-btn.danger:hover {
    background: #4a2932;
}

.page-session-manager .host-suggestions-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.page-session-manager .host-suggestion-result-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border: 1px solid #2d3944;
    border-radius: 8px;
    padding: 8px 10px;
    background: #1a2329;
}

.page-session-manager .host-suggestion-rank {
    color: #7ecfd1;
    font-weight: 700;
    font-size: 12px;
}

.page-session-manager .host-suggestion-text {
    color: #d6e7f2;
    font-size: 13px;
}

.page-session-manager .host-suggestion-count {
    color: #9fe5d3;
    font-weight: 700;
    font-size: 12px;
}

.page-session-manager .host-suggestion-select-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.page-session-manager .host-suggestion-select-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.page-session-manager #hostSuggestionSelectedCount {
    color: #9db7c8;
    font-size: 12px;
}

.page-session-manager #hostSuggestionSelectedCount.limit-reached {
    color: #ffd08d;
}

.page-session-manager .host-suggestion-save-btn {
    border: 1px solid #2f6f61;
    background: #1a3a33;
    color: #c8f1e8;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.page-session-manager .host-suggestion-save-btn:hover:not(:disabled) {
    background: #215047;
}

.page-session-manager .host-suggestion-save-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.page-session-manager .audience-preview-scene {
    text-align: center;
}

.page-session-manager .audience-preview-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #6bb8a0;
    background: rgba(15, 125, 98, 0.12);
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.page-session-manager .audience-preview-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #e0f0ee;
}

.page-session-manager .audience-preview-desc {
    font-size: 12px;
    color: #8a9ba5;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.page-session-manager .audience-preview-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.page-session-manager .audience-preview-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #3a4550;
    border-radius: 6px;
    background: #1e262d;
    font-size: 12px;
    color: #c8d8e2;
}

.page-session-manager .audience-preview-option.winner {
    border-color: #d4a017;
    background: #2e2a15;
    color: #fff3c4;
}

.page-session-manager .scene-add-link {
    background: none;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #a0e7e5;
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.page-session-manager .scene-add-link:hover {
    color: #c8f4f3;
}

.page-session-manager .scene-add-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid currentColor;
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
}

.page-session-manager .scene-empty {
    border: 1px dashed #3a4248;
    border-radius: 10px;
    padding: 16px;
    color: #90a0a9;
    font-size: 13px;
    background: rgba(34, 39, 43, 0.55);
}

.page-session-manager .scene-card {
    border: 1px solid #364148;
    border-radius: 10px;
    background: #232a2f;
    padding: 16px;
    display: grid;
    gap: 14px;
}

.page-session-manager .scene-card-welcome {
    grid-template-columns: auto minmax(0, 1fr) auto;
    background: linear-gradient(180deg, #223139 0%, #20292e 100%);
}

.page-session-manager .scene-card-scene {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    background: linear-gradient(180deg, #25292f 0%, #20252a 100%);
}

.page-session-manager .scene-card-scene.live {
    border-color: #2d7e69;
    box-shadow: 0 0 0 1px rgba(45, 126, 105, 0.22);
}

.page-session-manager .scene-card-cue-wrap {
    padding-top: 2px;
}

.page-session-manager .scene-card-cue-steps {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.page-session-manager .step-cue-btn {
    min-width: 56px;
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #4a545c;
    background: #31373d;
    color: #d6dde2;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    touch-action: manipulation;
}

.page-session-manager .step-cue-btn:hover:not(:disabled) {
    border-color: #6b7b84;
    background: #3a434a;
}

.page-session-manager .step-cue-btn.live {
    background: #0f7d62;
    border-color: #0f7d62;
    color: #ffffff;
    cursor: default;
}

.page-session-manager .step-cue-btn.skippable {
    border-style: dashed;
}

.page-session-manager .step-cue-btn:disabled {
    opacity: 0.85;
}

.page-session-manager .step-cue-label {
    display: block;
    font-size: 9px;
    color: #8a9ba5;
    text-align: center;
    max-width: 62px;
    line-height: 1.2;
    margin-bottom: 4px;
}

.page-session-manager .scene-card-main {
    min-width: 0;
}

.page-session-manager .scene-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.page-session-manager .scene-card-title {
    margin: 0;
    font-size: 19px;
    color: #d8f4f3;
}

.page-session-manager .scene-card-description {
    margin: 8px 0 10px;
    color: #aab6bd;
    font-size: 13px;
    line-height: 1.6;
}

.page-session-manager .scene-card-link {
    color: #a0e7e5;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.page-session-manager .scene-card-meta {
    display: grid;
    gap: 10px;
    min-width: 112px;
    justify-items: end;
}

.page-session-manager .scene-card-meta-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.page-session-manager .scene-card-meta-value {
    color: #dbe3e8;
    font-size: 13px;
    font-weight: 700;
}

.page-session-manager .scene-card-meta-label {
    color: #7f8b94;
    font-size: 11px;
    margin-top: 2px;
}

.page-session-manager .audience-section {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.page-session-manager .audience-title {
    margin: 0 0 12px;
    font-size: 18px;
    color: #a0e7e5;
}

.page-session-manager .audience-empty {
    color: #90a0a9;
    font-size: 13px;
    padding: 8px 2px;
}

.page-session-manager .audience-list {
    display: grid;
    gap: 10px;
}

.page-session-manager .audience-card {
    background: #273036;
    border: 1px solid #3b4750;
    border-radius: 8px;
    padding: 10px 12px;
}

.page-session-manager .audience-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 6px;
}

.page-session-manager .audience-greeting {
    font-size: 18px;
    font-weight: 700;
    color: #d4f7f6;
    flex: 1;
}

.page-session-manager .audience-status {
    font-size: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.page-session-manager .audience-meta {
    font-size: 12px;
    color: #9ea8b0;
}

.page-session-manager .btn-session-action {
    background: #8b2020;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.page-session-manager .btn-session-action.active {
    background: #8b2020;
}

.page-session-manager .btn-session-action.active:hover {
    background: #a82828;
}

.page-session-manager .btn-session-action.inactive {
    background: #3e454b;
    color: #9aa3ab;
    cursor: pointer;
}

.page-session-manager .btn-session-action.inactive:hover {
    background: #4d565e;
    color: #c5cdd4;
}

.page-session-manager .manager-message {
    min-height: 16px;
    margin-top: 0;
    color: #9de7cd;
    font-size: 13px;
    text-align: right;
}

.page-session-manager .manager-message.error {
    color: #ff9f9f;
}

.page-session-manager .status-pill {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.page-session-manager .status-pill.active {
    background: #225847;
    color: #a8f0dd;
}

.page-session-manager .status-pill.inactive {
    background: #4a3a3a;
    color: #d7b0b0;
}

@media (max-width: 700px) {
    .page-session-manager .manager-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-session-manager .manager-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .page-session-manager .manager-tabs {
        overflow-x: auto;
    }

    .page-session-manager .manager-meta {
        grid-template-columns: 1fr;
    }

    .page-session-manager .meta-row.description-row {
        grid-column: 1;
    }

    .page-session-manager .manager-actions .btn {
        width: 100%;
    }

    .page-session-manager .session-action-wrap {
        width: 100%;
        align-items: stretch;
    }

    .page-session-manager .scene-card-welcome,
    .page-session-manager .scene-card-scene {
        grid-template-columns: auto 1fr;
    }

    .page-session-manager .scene-editor-content {
        padding: 20px;
        margin: 12px auto;
        max-height: calc(100vh - 24px);
    }

    .page-session-manager .scene-editor-actions {
        flex-direction: column-reverse;
    }

    .page-session-manager .scene-editor-actions .btn {
        width: 100%;
    }

    .page-session-manager .scene-card-meta,
    .page-session-manager .scene-card-meta-item {
        justify-items: start;
        align-items: flex-start;
        text-align: left;
    }

    .page-session-manager .scene-card-cue-steps {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .page-session-manager .live-split-layout {
        grid-template-columns: 1fr;
    }

    .page-session-manager .live-hostview-pane {
        max-height: 300px;
    }

    .page-session-manager .session-action-wrap .btn-session-action {
        width: 100%;
    }

    .page-session-manager .manager-message {
        text-align: left;
    }
}

/* =========================
   SCENE EDITOR PAGE
   File: scene_editor.html
   Scope: body.page-scene-editor
   ========================= */

body.page-scene-editor {
    background: radial-gradient(circle at top, #253844 0%, #151d25 50%, #10151d 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 0;
}

.page-scene-editor .scene-editor-shell {
    max-width: 980px;
    margin: 0 auto;
    padding: 30px 18px 56px;
}

.page-scene-editor .scene-editor-card {
    background: #1f2831;
    border: 1px solid #36414d;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
}

.page-scene-editor .scene-editor-top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.page-scene-editor .scene-editor-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.page-scene-editor .scene-editor-nav-buttons {
    display: flex;
    gap: 8px;
}

.page-scene-editor .scene-editor-discard {
    font-size: 12px;
    color: #8a9ba5;
    text-decoration: none;
}

.page-scene-editor .scene-editor-discard:hover {
    color: #d46b6b;
    text-decoration: underline;
}

.page-scene-editor .scene-editor-delete {
    font-size: 13px;
    color: #d46b6b;
    text-decoration: none;
    align-self: flex-start;
}

.page-scene-editor .scene-editor-delete:hover {
    color: #f27a7a;
    text-decoration: underline;
}

.page-scene-editor .scene-editor-eyebrow {
    color: #8cd8d3;
    font-size: 12px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.page-scene-editor .scene-editor-title {
    margin: 0;
    color: #d8f4f3;
    font-size: 30px;
    line-height: 1.2;
}

.page-scene-editor .scene-editor-control {
    margin-top: 20px;
    display: grid;
    gap: 8px;
}

.page-scene-editor .scene-editor-control label {
    font-size: 13px;
    color: #a8b8c6;
    letter-spacing: 0.4px;
}

.page-scene-editor .scene-editor-control select {
    width: min(360px, 100%);
    padding: 11px 12px;
    border-radius: 8px;
    border: 1px solid #4b5a6a;
    background: #121b25;
    color: #e0edf7;
    font-size: 14px;
}

.page-scene-editor .scene-editor-control select:focus {
    outline: none;
    border-color: #81ddd4;
    box-shadow: 0 0 0 3px rgba(129, 221, 212, 0.18);
}

.page-scene-editor .scene-editor-content {
    margin-top: 22px;
}

.page-scene-editor .scene-editor-form {
    display: grid;
    gap: 14px;
}

.page-scene-editor .scene-editor-field {
    display: grid;
    gap: 8px;
}

.page-scene-editor .scene-editor-field.is-hidden {
    display: none;
}

.page-scene-editor .scene-editor-field label {
    font-size: 13px;
    color: #a8b8c6;
    letter-spacing: 0.4px;
}

.page-scene-editor .scene-editor-field input,
.page-scene-editor .scene-editor-field textarea {
    width: 100%;
    padding: 11px 12px;
    border-radius: 8px;
    border: 1px solid #4b5a6a;
    background: #121b25;
    color: #e0edf7;
    font-size: 14px;
}

.page-scene-editor .scene-editor-field textarea {
    min-height: 90px;
    resize: vertical;
}

.page-scene-editor .scene-editor-field input:focus,
.page-scene-editor .scene-editor-field textarea:focus {
    outline: none;
    border-color: #81ddd4;
    box-shadow: 0 0 0 3px rgba(129, 221, 212, 0.18);
}

.page-scene-editor .scene-settings-fields {
    display: grid;
    gap: 10px;
}

.page-scene-editor .scene-settings-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #b7c7d4;
    font-size: 13px;
}

.page-scene-editor .scene-settings-toggle input[type='checkbox'] {
    width: 16px;
    height: 16px;
}

.page-scene-editor .scene-settings-text-label {
    display: grid;
    gap: 5px;
    color: #b7c7d4;
    font-size: 12px;
}

.page-scene-editor .scene-settings-text-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #4b5a6a;
    background: #121b25;
    color: #e0edf7;
    font-size: 14px;
}

.page-scene-editor .scene-settings-text-input:focus {
    outline: none;
    border-color: #81ddd4;
    box-shadow: 0 0 0 3px rgba(129, 221, 212, 0.18);
}

.page-scene-editor .scene-editor-section-title {
    margin: 0 0 10px;
    color: #bdebe8;
    font-size: 16px;
    letter-spacing: 0.4px;
}

.page-scene-editor .scene-editor-message {
    min-height: 18px;
    color: #9fdbc9;
    font-size: 13px;
}

.page-scene-editor .scene-editor-message.error {
    color: #ffb4bf;
}

.page-scene-editor .scene-editor-form-actions {
    display: flex;
    justify-content: flex-start;
}

.page-scene-editor .scene-options-list {
    display: grid;
    gap: 8px;
}

.page-scene-editor .scene-option-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.page-scene-editor .scene-option-remove {
    border: 1px solid #566270;
    background: #2a323b;
    color: #d8e3ee;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 12px;
    cursor: pointer;
}

.page-scene-editor .scene-option-remove:hover {
    background: #323c46;
}

.page-scene-editor .scene-add-option-btn {
    justify-self: flex-start;
    border: 1px solid #4f697b;
    background: #1e2f3d;
    color: #bde8fa;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    cursor: pointer;
}

.page-scene-editor .scene-add-option-btn:hover {
    background: #264256;
}

.page-scene-editor .scene-option-sources {
    margin-top: 10px;
    border: 1px solid #3d4c5b;
    border-radius: 9px;
    background: #17232d;
    padding: 10px;
}

.page-scene-editor .scene-option-sources-title {
    color: #9ec5dd;
    font-size: 11px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.page-scene-editor .scene-option-source-manual-btn {
    margin-bottom: 10px;
    border: 1px solid #576777;
    background: #293743;
    color: #d4e5f1;
    border-radius: 7px;
    padding: 6px 10px;
    font-size: 11px;
    cursor: pointer;
}

.page-scene-editor .scene-option-source-manual-btn:hover {
    background: #334554;
}

.page-scene-editor .scene-option-sources-list {
    display: grid;
    gap: 8px;
}

.page-scene-editor .scene-option-source-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.page-scene-editor .scene-option-source-add-btn {
    border: 1px solid #3a6c77;
    background: #1c3f49;
    color: #c8edf3;
    border-radius: 7px;
    padding: 6px 9px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.page-scene-editor .scene-option-source-add-btn:hover {
    background: #275564;
}

.page-scene-editor .scene-option-source-add-btn.active {
    border-color: #2d7f6b;
    background: #1f5d53;
}

.page-scene-editor .scene-option-source-title {
    color: #d4e5f1;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-scene-editor .scene-option-source-output {
    color: #9ab6c9;
    font-size: 11px;
    white-space: nowrap;
}

.page-scene-editor .scene-step-list {
    display: grid;
    gap: 10px;
}

.page-scene-editor .scene-step-card {
    border: 1px solid #3a4754;
    border-radius: 9px;
    background: linear-gradient(180deg, #242e38 0%, #212a33 100%);
    padding: 12px 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.page-scene-editor .scene-step-card.active {
    border-color: #2b7f6b;
    box-shadow: 0 0 0 1px rgba(43, 127, 107, 0.24);
}

.page-scene-editor .scene-step-card.skipped {
    opacity: 0.5;
    border-style: dashed;
}

.page-scene-editor .scene-step-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #466073;
    background: #253544;
    color: #add7ec;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    padding: 4px 9px;
}

.page-scene-editor .scene-step-title {
    margin: 9px 0 6px;
    color: #d4f0ef;
    font-size: 16px;
}

.page-scene-editor .scene-step-detail {
    margin: 0;
    color: #a3b3bf;
    font-size: 13px;
    line-height: 1.58;
}

.page-scene-editor .scene-step-action {
    margin-top: 0;
    border: 1px solid #4f6070;
    background: #2a333e;
    color: #dbe9f2;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.page-scene-editor .scene-step-action:hover {
    background: #34404c;
}

.page-scene-editor .scene-step-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
}

.page-scene-editor .scene-step-skip-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #a3b3bf;
    cursor: pointer;
}

.page-scene-editor .scene-step-skip-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.page-scene-editor .view-config-panel {
    margin-top: 10px;
    border: 1px solid #3a4550;
    border-radius: 6px;
    overflow: hidden;
}

.page-scene-editor .view-config-summary {
    padding: 8px 12px;
    background: #1e262d;
    color: #8fbcd4;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.page-scene-editor .view-config-summary:hover {
    background: #243038;
}

.page-scene-editor .view-config-fields {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.page-scene-editor .view-config-toggle {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #b8c8d4;
    cursor: pointer;
}

.page-scene-editor .view-config-toggle input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.page-scene-editor .view-config-text-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #b8c8d4;
}

.page-scene-editor .view-config-text-input {
    padding: 6px 8px;
    border: 1px solid #3a4550;
    border-radius: 4px;
    background: #1a2228;
    color: #e0ecf4;
    font-size: 12px;
}

.page-scene-editor .view-config-text-input:focus {
    outline: none;
    border-color: #5a8aa8;
}

.page-scene-editor .view-config-toggle small,
.page-scene-editor .view-config-text-label small {
    display: block;
    color: #8ca0b0;
    font-size: 11px;
    line-height: 1.35;
}

.page-scene-editor .view-config-toggle small {
    margin-left: 23px;
}

/* =========================
   LIVE SESSION PAGE
   File: live_session.html
   Scope: body.page-live
   ========================= */

body.page-live {
    background: radial-gradient(circle at top, #223945 0%, #12181f 45%, #0e1218 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 0;
}

.page-live .edit-link {
    color: #8de5da;
    font-size: 13px;
    text-decoration: none;
    border-bottom: 1px solid #8de5da;
}

.page-live .live-stage-suggestions {
    max-width: 760px;
    margin: 0 auto;
}

.page-live .live-suggestions-step {
    display: inline-block;
    margin-bottom: 8px;
    border-radius: 999px;
    border: 1px solid #335b66;
    background: rgba(24, 50, 60, 0.45);
    color: #8dd5da;
    font-size: 11px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-weight: 700;
    padding: 4px 10px;
}

.page-live .live-suggestions-form {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.page-live .live-suggestions-input {
    width: 100%;
    min-height: 110px;
    border-radius: 10px;
    border: 1px solid #476176;
    background: #122333;
    color: #e1eef6;
    font-size: 15px;
    padding: 12px 14px;
    resize: vertical;
}

.page-live .live-suggestions-input:focus {
    outline: none;
    border-color: #7fd8d9;
    box-shadow: 0 0 0 3px rgba(127, 216, 217, 0.18);
}

.page-live .live-suggestions-submit {
    justify-self: start;
    border: 1px solid #3c7c7a;
    background: #1f4d4b;
    color: #e2f7f2;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.page-live .live-suggestions-submit:hover:not(:disabled) {
    background: #27615e;
}

.page-live .live-suggestions-submit:disabled,
.page-live .live-suggestions-input:disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.page-live .live-suggestions-note,
.page-live .live-suggestions-feed-count {
    margin-top: 10px;
    color: #9eb5c6;
    font-size: 13px;
}

.page-live .live-suggestions-results-list,
.page-live .live-suggestions-selected-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.page-live .live-suggestions-result-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border-radius: 8px;
    border: 1px solid #355062;
    background: #132635;
}

.page-live .live-suggestions-result-rank {
    color: #8fd7d7;
    font-weight: 700;
}

.page-live .live-suggestions-result-text,
.page-live .live-suggestions-selected-row {
    color: #d9eaf4;
    font-size: 14px;
}

.page-live .live-suggestions-result-count {
    color: #b5f0d9;
    font-weight: 700;
}

.page-live .live-suggestions-selected-row {
    border: 1px solid #355062;
    border-radius: 8px;
    background: #132635;
    padding: 9px 10px;
}

.page-live .error-box {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #3a1f28;
    border: 1px solid #8a4258;
    color: #ffb6c9;
    font-size: 13px;
    display: none;
}

.page-live .eyebrow {
    color: #89d4d1;
    font-size: 12px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.page-live .id-form {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.page-live .id-form input {
    flex: 1 1 240px;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #4f617b;
    background: #101723;
    color: #e4f4fa;
    font-size: 14px;
}

.page-live .id-form input:focus {
    outline: none;
    border-color: #76dfd4;
    box-shadow: 0 0 0 3px rgba(118, 223, 212, 0.15);
}

.page-live .inactive-wrap {
    max-width: 620px;
    margin: 80px auto;
    padding: 26px;
    border-radius: 12px;
    border: 1px solid #704050;
    background: rgba(58, 25, 35, 0.92);
    color: #ffd0db;
    text-align: center;
    display: none;
}

.page-live .inactive-wrap a {
    display: inline-block;
    margin-top: 12px;
    color: #95ece0;
    text-decoration: none;
    border-bottom: 1px solid #95ece0;
}

.page-live .is-hidden {
    display: none;
}

.page-live .no-social-links {
    margin-top: 12px;
}

.page-live .live-enter-wrap {
    margin-top: 16px;
}

.page-live .page-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 28px 18px 56px;
}

.page-live .panel {
    margin-top: 26px;
    background: #1b2430;
    border: 1px solid #334055;
    border-radius: 10px;
    padding: 20px;
}

.page-live .panel h2 {
    margin: 0 0 8px;
    color: #c6edf0;
    font-size: 18px;
}

.page-live .panel p {
    margin: 0;
    color: #9ba6b6;
    font-size: 14px;
    line-height: 1.6;
}

.page-live .saved-pill {
    padding: 8px 14px;
    border-radius: 999px;
    background: #14353f;
    border: 1px solid #2a6772;
    color: #bfe9f0;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.page-live .saved-row {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-live .session-meta {
    margin-top: 8px;
    color: #9ca9b8;
    font-size: 14px;
}

.page-live .session-shell {
    background: rgba(28, 35, 45, 0.9);
    border: 1px solid #3c4a5f;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.page-live .session-title {
    margin: 0;
    font-size: 32px;
    color: #d9f9f8;
    letter-spacing: 1.2px;
}

.page-live .social-list {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.page-live .social-list a {
    color: #91e8de;
    text-decoration: none;
}

.page-live .social-list a:hover {
    text-decoration: underline;
}

.page-live .social-list li {
    background: #13202e;
    border: 1px solid #2a3f57;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: #c7d8e8;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    word-break: break-all;
}

.page-live .submit-btn {
    width: auto;
    min-width: 140px;
    margin-top: 0;
    border-radius: 8px;
    background: linear-gradient(90deg, #1f6b4f 0%, #2e8c68 100%);
}

.page-live .submit-btn:hover {
    background: linear-gradient(90deg, #23825e 0%, #36a97d 100%);
}

body.page-live.live-stage-active #globalHeader,
body.page-live.live-stage-active #globalFooter,
body.page-live.live-stage-active #activePage {
    display: none !important;
}

.page-live .live-stage {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top, #1e3340 0%, #10161d 55%, #0b1016 100%);
}

.page-live .live-stage.is-hidden {
    display: none;
}

.page-live .live-stage-bar {
    height: 42px;
    background: #050505;
    border-bottom: 1px solid #1f272f;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
}

.page-live .live-stage-back {
    background: none;
    border: none;
    color: #d8e1e8;
    font-size: 14.4px;
    cursor: pointer;
    padding: 0;
}

.page-live .live-stage-back:hover {
    color: #ffffff;
}

.page-live .live-stage-greeting {
    color: #b9f4eb;
    font-size: 12px;
    font-weight: 600;
}

.page-live .live-stage-main {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding: 28px;
    overflow-y: auto;
}

.page-live .live-stage-welcome {
    width: min(90%, 1100px);
    border-radius: 22px;
    border: 1px solid rgba(128, 194, 198, 0.35);
    background: linear-gradient(145deg, rgba(20, 33, 48, 0.94) 0%, rgba(14, 24, 36, 0.96) 100%);
    box-shadow:
        0 24px 56px rgba(0, 0, 0, 0.52),
        0 0 0 1px rgba(145, 232, 222, 0.08) inset;
    padding: clamp(24px, 5vw, 56px);
    position: relative;
    overflow: hidden;
    animation: liveWelcomeCardPulse 5s ease-in-out infinite;
}

.page-live .live-stage-welcome::before {
    content: '';
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    top: -120px;
    right: -80px;
    background: radial-gradient(circle, rgba(141, 229, 218, 0.28) 0%, rgba(141, 229, 218, 0) 72%);
    pointer-events: none;
}

.page-live .live-stage-media-wrap {
    margin: 0 auto 20px;
    background: transparent;
    box-shadow: none;
}

.page-live .live-stage-welcome-image {
    --welcome-image-width: 70%;
    width: var(--welcome-image-width);
    max-width: 100%;
    max-height: min(42vh, 420px);
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: none;
}

.page-live .live-stage-title {
    margin: 0;
    color: #def7f6;
    font-size: clamp(30px, 4vw, 46px);
    letter-spacing: 0.8px;
    line-height: 1.15;
    animation: liveGreetingWiggle 5s ease-in-out infinite;
}

.page-live .live-stage-message {
    margin-top: 16px;
    color: #b9c9d8;
    font-size: clamp(16px, 1.8vw, 20px);
    line-height: 1.65;
}

.page-live .live-stage-message a {
    color: #9cefe3;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.page-live .live-stage-message a:hover {
    color: #d4fff8;
}

.page-live .live-stage-vote .live-stage-title {
    margin-top: 10px;
}

.page-live .live-stage-vote {
    width: min(90%, 500px);
}

.page-live .live-vote-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #4b667a;
    background: #223447;
    color: #b6e3ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 6px 12px;
}

.page-live .live-vote-options {
    margin-top: 18px;
    display: grid;
    gap: 10px;
}

.page-live .live-vote-option {
    width: 100%;
    border: 1px solid #4c5f73;
    background: #1d2733;
    color: #dbe8f4;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.page-live .live-vote-option:hover:not(:disabled) {
    background: #263446;
    border-color: #6e90a8;
    transform: translateY(-1px);
}

.page-live .live-vote-option.selected {
    border-color: #2d876f;
    background: #1f3a36;
    color: #d8ffef;
}

.page-live .live-vote-option.winner {
    border-color: #d4a017;
    background: #2e2a15;
    color: #fff3c4;
}

.page-live .live-vote-option:disabled {
    cursor: default;
    opacity: 0.75;
}

.page-live .live-vote-count {
    min-width: 34px;
    text-align: center;
    border-radius: 999px;
    border: 1px solid #516378;
    background: #172330;
    padding: 3px 9px;
    font-size: 12px;
    font-weight: 700;
}

.page-live .live-vote-note {
    margin-top: 12px;
    color: #99aab8;
    font-size: 13px;
}

.page-live .change-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #8cd8d3;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 0;
    margin-bottom: 8px;
}

.page-live .change-vote-btn:hover {
    color: #ffffff;
}

/* ─── Live Bar Chart ─── */

.live-chart-message {
    color: #8cd8d3;
    font-size: 14px;
    text-align: center;
    margin-bottom: 18px;
}

.live-bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    height: 260px;
    padding: 20px 10px 50px;
    position: relative;
}

.live-bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 80px;
    height: 100%;
    justify-content: flex-end;
    position: relative;
}

.live-bar-value {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    opacity: 0;
    animation: barValueFadeIn 0.4s ease-out forwards;
}

.live-bar {
    width: 100%;
    min-height: 4px;
    border-radius: 6px 6px 0 0;
    background: var(--bar-color, #00e5ff);
    box-shadow: 0 0 12px color-mix(in srgb, var(--bar-color) 50%, transparent);
    transition: height 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: barGrow 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    transform-origin: bottom;
}

.live-bar-label {
    position: absolute;
    bottom: -44px;
    font-size: 11px;
    color: #c0dde6;
    white-space: nowrap;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: rotate(-25deg);
    transform-origin: top center;
}

@keyframes barGrow {
    0% { transform: scaleY(0); }
    100% { transform: scaleY(1); }
}

@keyframes barValueFadeIn {
    0% { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ─── Outcome Reveal ─── */

.outcome-reveal .live-bar-col.winner .live-bar {
    animation: barGrow 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards, winnerShake 0.5s 1s ease-in-out 3;
    box-shadow: 0 0 24px var(--bar-color), 0 0 48px color-mix(in srgb, var(--bar-color) 40%, transparent);
}

.outcome-reveal .live-bar-col.winner .live-bar-value {
    font-size: 18px;
    color: #ffc400;
    text-shadow: 0 0 8px rgba(255, 196, 0, 0.6);
}

@keyframes winnerShake {
    0%, 100% { transform: scaleY(1) translateX(0); }
    15% { transform: scaleY(1) translateX(-3px) rotate(-1deg); }
    30% { transform: scaleY(1) translateX(3px) rotate(1deg); }
    45% { transform: scaleY(1) translateX(-2px) rotate(-0.5deg); }
    60% { transform: scaleY(1) translateX(2px) rotate(0.5deg); }
    75% { transform: scaleY(1) translateX(-1px); }
}

/* Star fountain */
.star-fountain {
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 0;
    z-index: 10;
    pointer-events: none;
}

.celebration-star {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: starBurst 1.4s ease-out forwards;
}

@keyframes starBurst {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(0.3);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(var(--drift-x), var(--drift-y)) scale(1);
    }
}

/* Winner banner */
.outcome-winner-banner {
    margin-top: 24px;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
    color: #ffc400;
    text-shadow: 0 0 12px rgba(255, 196, 0, 0.5);
    opacity: 0;
    transform: scale(0.6) rotate(-3deg);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.outcome-winner-banner.reveal {
    opacity: 1;
    font-size: 28px;
    transform: scale(1) rotate(0deg);
}

@keyframes liveGreetingWiggle {
    0%,
    86%,
    100% {
        transform: rotate(0deg);
    }

    90% {
        transform: rotate(-1.1deg);
    }

    93% {
        transform: rotate(1.1deg);
    }

    96% {
        transform: rotate(-0.7deg);
    }
}

@keyframes liveWelcomeCardPulse {
    0%,
    86%,
    100% {
        box-shadow:
            0 24px 56px rgba(0, 0, 0, 0.52),
            0 0 0 1px rgba(145, 232, 222, 0.08) inset;
    }

    92% {
        box-shadow:
            0 28px 64px rgba(0, 0, 0, 0.56),
            0 0 0 1px rgba(145, 232, 222, 0.16) inset,
            0 0 34px rgba(156, 239, 227, 0.15);
    }
}

/* Live session page: mobile */
@media (max-width: 700px) {
    .page-scene-editor .scene-editor-card {
        padding: 18px;
    }

    .page-scene-editor .scene-editor-title {
        font-size: 25px;
    }

    .page-scene-editor .scene-editor-control select {
        width: 100%;
    }

    .page-live .session-shell {
        padding: 20px;
    }

    .page-live .session-title {
        font-size: 26px;
    }

    .page-live .id-form {
        flex-direction: column;
    }

    .page-live .submit-btn {
        width: 100%;
    }

    .page-live .live-stage-bar {
        height: 44px;
        padding: 0 10px;
    }

    .page-live .live-stage-title {
        font-size: 28px;
    }

    .page-live .live-stage-welcome {
        width: 92%;
        border-radius: 16px;
    }

    .page-live .live-stage-message {
        font-size: 16px;
    }

    .page-live .live-stage-welcome-image {
        width: min(100%, var(--welcome-image-width));
        max-height: 34vh;
    }
}
