:root {
            --bg-page: #F8F1E6;
            --bg-card: #FDFCFA;
            --text-primary: #2B3141;
            --text-secondary: #626B78;
            --border-light: #DED9D1;
            --bg-panel: #FCF9F4;
            --accent: #EA580C;
            --accent-hover: #C94C0A;
            --accent-rgb: 234, 88, 12;
            --accent-soft: rgba(234, 88, 12, 0.12);
            --accent-soft-strong: rgba(234, 88, 12, 0.18);
            --accent-outline: rgba(234, 88, 12, 0.24);
            --text-on-accent: #F8FAFC;
            --btn-secondary-bg: #FDFBF8;
            --btn-secondary-border: #E1DBD3;
            --shadow: 0 26px 54px -18px rgba(85, 88, 98, 0.18);
            --status-bg: #FCFAF6;
            --status-border: #EA580C;
            --member-bg: #FEFDFC;
            --member-border: #E5E0D7;
            --input-bg: #FEFEFC;
            --download-btn-bg: #FCEBE2;
            --vu-bg: #E1DBD3;
            --vu-fill: #EA580C;
            --radius-card: 20px;
            --radius-panel: 14px;
            --radius-control: 12px;
            --radius-chat: 14px;
            --radius-pill: 22px;
            --scrollbar-size: 10px;
            --scrollbar-track: rgba(148,163,184,.16);
            --scrollbar-thumb: rgba(var(--accent-rgb), .28);
            --scrollbar-thumb-hover: rgba(var(--accent-rgb), .42);
            --scrollbar-thumb-active: rgba(var(--accent-rgb), .56);
            --room-panel-base-height: 396px;
            --room-panel-base-height-tablet: 340px;
            --room-panel-base-height-mobile: 296px;
            --karaoke-results-height: 228px;
        }
        @keyframes speaking-pulse {
            0%, 100% {
                transform: translateY(calc(var(--speak-level, 0) * -2px));
                box-shadow:
                    0 0 0 1px var(--speaking-ring, rgba(59,130,246,.14)) inset,
                    0 12px 24px var(--speaking-shadow, rgba(37,99,235,.12)),
                    0 0 10px 0 var(--speaking-glow-soft, rgba(96,165,250,.08)),
                    0 0 18px 0 var(--speaking-glow, rgba(59,130,246,.18));
            }
            50% {
                transform: translateY(calc(var(--speak-level, 0) * -2px - 1px));
                box-shadow:
                    0 0 0 1px var(--speaking-ring-strong, rgba(59,130,246,.24)) inset,
                    0 16px 30px var(--speaking-shadow-strong, rgba(37,99,235,.18)),
                    0 0 18px 0 var(--speaking-glow-soft, rgba(96,165,250,.08)),
                    0 0 30px 2px var(--speaking-glow, rgba(59,130,246,.18));
            }
        }
        .member-list li.speaking {
            animation: none;
            font-weight: 700;
            border-color: rgba(37,99,235,.34);
            box-shadow: 0 0 0 1px rgba(59,130,246,.10) inset, 0 12px 24px rgba(37,99,235,.10), 0 0 12px rgba(59,130,246,.08);
            transform: none;
        }
        body.dark .member-list li.speaking {
            border-color: rgba(96,165,250,.34);
            box-shadow: 0 0 0 1px rgba(96,165,250,.12) inset, 0 12px 26px rgba(37,99,235,.16), 0 0 16px rgba(96,165,250,.10);
        }
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            transition: background-color 0.2s, border-color 0.2s;
        }
        body {
            background:
                radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.12), transparent 24%),
                radial-gradient(circle at right bottom, rgba(var(--accent-rgb), 0.08), transparent 26%),
                var(--bg-page);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 16px;
            color: var(--text-primary);
            transition: background 0.24s ease, color 0.2s ease;
        }
        .app {
            max-width: 1440px;
            width: 100%;
        }
        .card {
            background: var(--bg-card);
            border-radius: var(--radius-card);
            box-shadow: var(--shadow);
            padding: 32px;
            margin-bottom: 16px;
        }
        .header {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            justify-content: flex-start;
            gap: 12px;
            margin-bottom: 24px;
        }
        .header-main-row {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            flex-wrap: wrap;
            min-width: 0;
        }
        .header-title-cluster {
            display: flex;
            align-items: baseline;
            gap: 12px;
            flex: 1 1 auto;
            min-width: 0;
            flex-wrap: wrap;
        }
        .header h1 {
            font-size: 1.8rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            min-width: 0;
        }
        .header h1 span {
            background: var(--accent-soft);
            border: 1px solid var(--accent-outline);
            color: var(--accent);
            font-size: 0.9rem;
            padding: 4px 12px;
            border-radius: var(--radius-pill);
        }
        .header-room-inline {
            display: flex;
            align-items: center;
            gap: 12px;
            min-width: 0;
            flex: 1 1 320px;
        }
        .header-sub-row .header-room-inline {
            flex: 0 1 auto;
            max-width: min(100%, 460px);
            gap: 0;
        }
        .header-room-divider {
            color: var(--text-secondary);
            opacity: .45;
            font-size: 1.1rem;
            font-weight: 700;
            flex: 0 0 auto;
        }
        .header-room-title-block {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .header-sub-row .header-room-title-block {
            gap: 6px;
        }
        .header-room-title-block .room-name-display {
            font-size: clamp(1rem, 0.94rem + 0.42vw, 1.3rem);
            line-height: 1.28;
        }
        .header-room-title-block .room-title-edit input {
            width: min(420px, 100%);
        }
        .header-tools {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 12px;
            flex-wrap: wrap;
            margin-left: auto;
        }
        .header-sub-row {
            display: block;
            width: 100%;
        }
        .room-meta-row {
            display: flex;
            align-items: center;
            gap: 14px;
            min-width: 0;
            flex-wrap: nowrap;
        }
        body.room-active {
            align-items: flex-start;
        }
        .theme-skin-shell {
            position: relative;
            display: flex;
            align-items: center;
            flex: 0 1 auto;
        }
        .theme-toggle {
            background: var(--bg-panel);
            border: 1px solid var(--border-light);
            border-radius: 18px;
            padding: 10px 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 12px;
            font-weight: 500;
            color: var(--text-primary);
            min-height: 54px;
            box-shadow: 0 10px 24px rgba(15,23,42,.06);
            transition: transform 0.16s ease, border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
        }
        .theme-toggle:hover {
            background: var(--btn-secondary-bg);
            transform: translateY(-1px);
            border-color: var(--accent-outline);
            box-shadow: 0 14px 28px rgba(var(--accent-rgb), .12);
        }
        .theme-toggle.is-open {
            border-color: var(--accent-outline);
            box-shadow: 0 16px 30px rgba(var(--accent-rgb), .16);
        }
        .theme-toggle-icon {
            width: 34px;
            height: 34px;
            border-radius: 12px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            background: linear-gradient(135deg, var(--accent-soft-strong), rgba(var(--accent-rgb), .08));
            box-shadow: inset 0 1px 0 rgba(255,255,255,.32);
            flex: 0 0 auto;
        }
        .theme-toggle-copy {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 2px;
            min-width: 0;
            text-align: left;
        }
        .theme-toggle-copy strong {
            font-size: 0.92rem;
            line-height: 1.1;
        }
        .theme-toggle-copy small {
            color: var(--text-secondary);
            font-size: 0.74rem;
            line-height: 1.2;
            white-space: nowrap;
        }
        .theme-panel {
            position: absolute;
            top: calc(100% + 12px);
            right: 0;
            z-index: 1200;
            width: min(436px, calc(100vw - 28px));
            padding: 18px;
            display: flex;
            flex-direction: column;
            gap: 14px;
            border-radius: 24px;
            border: 1px solid rgba(148,163,184,.18);
            background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.96));
            box-shadow: 0 28px 60px rgba(15,23,42,.18);
            backdrop-filter: blur(18px);
        }
        body.dark .theme-panel {
            background: linear-gradient(180deg, rgba(21,30,46,.96), rgba(15,23,42,.97));
            border-color: rgba(71,85,105,.42);
            box-shadow: 0 30px 60px rgba(0,0,0,.34);
        }
        .theme-panel-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
        }
        .theme-panel-header h3 {
            margin-bottom: 6px;
            font-size: 1.04rem;
        }
        .theme-panel-header p {
            color: var(--text-secondary);
            font-size: 0.84rem;
            line-height: 1.6;
        }
        .theme-panel-section {
            padding: 14px;
            border-radius: 18px;
            border: 1px solid rgba(148,163,184,.16);
            background: linear-gradient(180deg, rgba(255,255,255,.84), rgba(248,250,252,.92));
        }
        body.dark .theme-panel-section {
            background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
            border-color: rgba(71,85,105,.34);
        }
        .theme-panel-section-preview {
            padding: 0;
            border: none;
            background: transparent;
        }
        .theme-panel-label-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 10px;
        }
        .theme-panel-label {
            font-size: 0.9rem;
            font-weight: 800;
            color: var(--text-primary);
        }
        .theme-panel-note,
        .theme-panel-note-block {
            color: var(--text-secondary);
            font-size: 0.79rem;
            line-height: 1.6;
        }
        .theme-panel-note-block {
            margin-top: 2px;
        }
        .theme-auto-contrast-tip {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 4px 10px;
            border-radius: 999px;
            background: var(--accent-soft);
            border: 1px solid var(--accent-outline);
            color: var(--accent);
            font-size: 0.74rem;
            font-weight: 800;
        }
        .theme-preset-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }
        .theme-preset-btn {
            width: 100%;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            border-radius: 16px;
            border: 1px solid rgba(148,163,184,.18);
            background: rgba(255,255,255,.82);
            color: var(--text-primary);
            cursor: pointer;
            text-align: left;
            box-shadow: 0 10px 20px rgba(15,23,42,.05);
            transition: transform 0.16s ease, border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
        }
        .theme-preset-btn:hover {
            transform: translateY(-1px);
            border-color: var(--accent-outline);
            box-shadow: 0 16px 28px rgba(var(--accent-rgb), .12);
        }
        .theme-preset-btn.is-active {
            border-color: var(--accent);
            background: linear-gradient(180deg, rgba(var(--accent-rgb), .10), rgba(255,255,255,.96));
            box-shadow: 0 0 0 1px var(--accent-outline) inset, 0 18px 32px rgba(var(--accent-rgb), .16);
        }
        body.dark .theme-preset-btn {
            background: rgba(255,255,255,.04);
            border-color: rgba(71,85,105,.34);
            box-shadow: 0 10px 18px rgba(0,0,0,.16);
        }
        body.dark .theme-preset-btn.is-active {
            background: linear-gradient(180deg, rgba(var(--accent-rgb), .18), rgba(15,23,42,.92));
        }
        .theme-preset-swatches {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            flex: 0 0 auto;
        }
        .theme-preset-swatches i {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: var(--swatch);
            border: 2px solid rgba(255,255,255,.78);
            box-shadow: 0 4px 10px rgba(15,23,42,.1);
            display: inline-block;
        }
        .theme-preset-meta {
            display: flex;
            flex-direction: column;
            gap: 3px;
            min-width: 0;
        }
        .theme-preset-meta strong {
            font-size: 0.86rem;
            line-height: 1.2;
        }
        .theme-preset-meta small {
            color: var(--text-secondary);
            font-size: 0.74rem;
        }
        .theme-color-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }
        .theme-color-field {
            display: flex;
            flex-direction: column;
            gap: 8px;
            min-width: 0;
        }
        .theme-color-field > span {
            font-size: 0.8rem;
            font-weight: 700;
            color: var(--text-primary);
        }
        .theme-color-control {
            display: grid;
            grid-template-columns: 62px minmax(0, 1fr);
            gap: 10px;
            align-items: center;
        }
        .theme-color-control input[type=color] {
            width: 100%;
            height: 46px;
            padding: 0;
            border: none;
            background: transparent;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
        }
        .theme-color-control input[type=color]::-webkit-color-swatch-wrapper {
            padding: 0;
        }
        .theme-color-control input[type=color]::-webkit-color-swatch,
        .theme-color-control input[type=color]::-moz-color-swatch {
            border: 1px solid rgba(148,163,184,.22);
            border-radius: 14px;
            box-shadow: 0 10px 18px rgba(15,23,42,.08);
        }
        .theme-color-control input[type=text] {
            width: 100%;
            height: 46px;
            padding: 0 14px;
            border-radius: 14px;
            border: 1px solid rgba(148,163,184,.22);
            background: var(--input-bg);
            color: var(--text-primary);
            font-size: 0.88rem;
            font-weight: 700;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }
        .theme-color-control input[type=text]:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .12);
        }
        .theme-preview-card {
            padding: 18px;
            border-radius: 22px;
            border: 1px solid rgba(148,163,184,.16);
            background: linear-gradient(145deg, rgba(var(--accent-rgb), .16), rgba(255,255,255,.88));
            box-shadow: 0 20px 34px rgba(15,23,42,.08);
        }
        body.dark .theme-preview-card {
            background: linear-gradient(145deg, rgba(var(--accent-rgb), .22), rgba(15,23,42,.92));
            border-color: rgba(71,85,105,.36);
        }
        .theme-preview-topline {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 14px;
        }
        .theme-preview-badge {
            display: inline-flex;
            align-items: center;
            padding: 5px 12px;
            border-radius: 999px;
            background: rgba(255,255,255,.72);
            border: 1px solid rgba(255,255,255,.48);
            color: var(--accent);
            font-size: 0.76rem;
            font-weight: 800;
        }
        body.dark .theme-preview-badge {
            background: rgba(15,23,42,.48);
            border-color: rgba(255,255,255,.08);
        }
        .theme-preview-subtitle {
            color: var(--text-secondary);
            font-size: 0.76rem;
        }
        .theme-preview-surface {
            display: grid;
            grid-template-columns: auto minmax(0, 1fr) auto;
            gap: 12px;
            align-items: center;
            padding: 14px;
            border-radius: 18px;
            background: rgba(255,255,255,.82);
            border: 1px solid rgba(255,255,255,.5);
            backdrop-filter: blur(10px);
        }
        body.dark .theme-preview-surface {
            background: rgba(15,23,42,.54);
            border-color: rgba(255,255,255,.06);
        }
        .theme-preview-chip {
            width: 42px;
            height: 42px;
            border-radius: 14px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, var(--accent), var(--accent-hover));
            color: var(--text-on-accent);
            font-weight: 800;
            box-shadow: 0 16px 24px rgba(var(--accent-rgb), .22);
        }
        .theme-preview-lines {
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 0;
        }
        .theme-preview-lines strong {
            font-size: 0.92rem;
            line-height: 1.35;
        }
        .theme-preview-lines span {
            color: var(--text-secondary);
            font-size: 0.78rem;
            line-height: 1.55;
        }
        .theme-preview-btn {
            border: none;
            border-radius: 14px;
            padding: 10px 14px;
            background: linear-gradient(135deg, var(--accent), var(--accent-hover));
            color: var(--text-on-accent);
            font-weight: 800;
            white-space: nowrap;
            box-shadow: 0 16px 24px rgba(var(--accent-rgb), .22);
        }
        .header-account-chip {
            background: var(--bg-panel);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-pill);
            padding: 6px 12px 6px 8px;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: var(--text-primary);
            font-weight: 700;
            cursor: pointer;
            box-shadow: 0 7px 16px rgba(15,23,42,.05);
        }
        .header-account-chip:disabled {
            opacity: .58;
            cursor: not-allowed;
            box-shadow: none;
        }
        .header-account-chip.is-active {
            border-color: rgba(var(--accent-rgb), .34);
            box-shadow: 0 14px 28px rgba(var(--accent-rgb), .14), inset 0 1px 0 rgba(255,255,255,.72);
        }
        .header-account-icon {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #60a5fa, #2563eb);
            color: #fff;
            font-size: 0.95rem;
            line-height: 1;
            box-shadow: 0 10px 20px rgba(37,99,235,.18);
            position: relative;
            isolation: isolate;
            overflow: visible;
            flex: 0 0 auto;
        }
        .header-account-image {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 50%;
            background: linear-gradient(135deg, #dbeafe, #bfdbfe);
        }
        .header-account-fallback {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
            border-radius: 50%;
        }
        .header-account-name {
            max-width: 156px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 0.92rem;
        }
        .header-account-chip[data-gift-package]:not([data-gift-package=""]) {
            border-color: rgba(var(--accent-rgb), .24);
            box-shadow: 0 8px 18px rgba(var(--accent-rgb), .10);
        }
        .header-account-chip[data-gift-package]:not([data-gift-package=""]) .header-account-icon {
            box-shadow:
                0 10px 20px rgba(37,99,235,.18),
                0 0 0 2px rgba(255,255,255,.90),
                0 0 0 5px rgba(255,255,255,.38),
                0 14px 28px var(--gift-frame-core-shadow, rgba(var(--accent-rgb), .18));
        }
        .header-account-chip[data-gift-package]:not([data-gift-package=""]) .header-account-icon::before,
        .header-account-chip[data-gift-package]:not([data-gift-package=""]) .header-account-icon::after {
            content: "";
            position: absolute;
            pointer-events: none;
            border-radius: inherit;
        }
        .header-account-chip[data-gift-package]:not([data-gift-package=""]) .header-account-icon::before {
            inset: -5px;
            z-index: -2;
            background: var(--gift-frame-border-bg, linear-gradient(135deg, #fcd34d, #f59e0b));
            box-shadow:
                0 0 0 1px rgba(255,255,255,.56),
                0 0 0 3px rgba(255,255,255,.14),
                0 0 18px var(--gift-frame-core-shadow, rgba(var(--accent-rgb), .18));
            animation: var(--gift-frame-border-animation, none);
        }
        .header-account-chip[data-gift-package]:not([data-gift-package=""]) .header-account-icon::after {
            inset: -10px;
            z-index: -3;
            background: var(--gift-frame-halo-bg, radial-gradient(circle, rgba(var(--accent-rgb), .32), transparent 68%));
            filter: blur(10px);
            opacity: .74;
            animation: var(--gift-frame-halo-animation, none);
        }
        body.dark .header-account-chip {
            box-shadow: 0 8px 18px rgba(0,0,0,.16);
        }
        body.dark .header-account-chip[data-gift-package]:not([data-gift-package=""]) {
            box-shadow: 0 10px 20px rgba(0,0,0,.22), 0 0 0 1px rgba(var(--accent-rgb), .10) inset;
        }
        .header-recharge-btn {
            border: 1px solid rgba(var(--accent-rgb), .24);
            border-radius: var(--radius-pill);
            padding: 8px 14px;
            min-height: 42px;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: linear-gradient(180deg, rgba(var(--accent-rgb), .16), rgba(255,255,255,.94));
            color: var(--accent);
            font-weight: 800;
            cursor: pointer;
            box-shadow: 0 10px 22px rgba(var(--accent-rgb), .12), inset 0 1px 0 rgba(255,255,255,.68);
            transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
        }
        .header-recharge-btn:hover:not(:disabled) {
            transform: translateY(-1px);
            border-color: rgba(var(--accent-rgb), .34);
            box-shadow: 0 14px 26px rgba(var(--accent-rgb), .16), inset 0 1px 0 rgba(255,255,255,.74);
        }
        .header-recharge-btn.is-active {
            border-color: rgba(var(--accent-rgb), .40);
            box-shadow: 0 16px 28px rgba(var(--accent-rgb), .20), inset 0 1px 0 rgba(255,255,255,.78);
        }
        .header-recharge-btn:disabled {
            opacity: .58;
            cursor: not-allowed;
            box-shadow: none;
        }
        .header-recharge-icon {
            font-size: 1rem;
            line-height: 1;
            flex: 0 0 auto;
        }
        .header-recharge-copy {
            white-space: nowrap;
            line-height: 1;
        }
        body.dark .header-recharge-btn {
            background: linear-gradient(180deg, rgba(var(--accent-rgb), .24), rgba(30,41,59,.90));
            border-color: rgba(var(--accent-rgb), .28);
            box-shadow: 0 12px 24px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.06);
        }
