    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      font-family: system-ui, sans-serif;
      background: #0f1117;
      color: #e0e0e0;
      min-height: 100vh;
      padding: 20px;
    }
    h1 { font-size: 1.4rem; margin-bottom: 12px; color: #fff; }
    .layout {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 18px;
      max-width: 900px;
    }
    @media (max-width: 600px) { .layout { grid-template-columns: 1fr; } }
    .card {
      background: #1c1f2e;
      border-radius: 10px;
      padding: 16px;
      margin-bottom: 16px;
    }
    .card h2 { font-size: 0.95rem; margin-bottom: 12px; color: #8b9fd4; text-transform: uppercase; letter-spacing: .05em; }
    video { width: 100%; border-radius: 8px; background: #000; aspect-ratio: 16/9; display: block; }
    #localVideo {
      transition: transform .2s ease;
      transform-origin: center center;
      object-fit: contain;
    }
    .video-container {
      position: relative;
      width: 100%;
      border-radius: 8px;
      overflow: hidden;
    }
    .pause-overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      z-index: 10;
    }
    .pause-overlay.show {
      display: flex;
    }
    .pause-text {
      font-size: 3rem;
      font-weight: 700;
      color: #ffc107;
      text-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
      letter-spacing: 0.2em;
    }
    .btn {
      display: inline-block; padding: 8px 20px; border-radius: 6px;
      border: none; cursor: pointer; font-size: 0.9rem; font-weight: 600;
      transition: opacity .15s;
    }
    .btn:hover:not(:disabled) { opacity: .85; }
    .btn:disabled { opacity: .35; cursor: not-allowed; }
    .btn-primary { background: #4a6cf7; color: #fff; }
    .btn-danger  { background: #d94f4f; color: #fff; }
    .btn-row { display: flex; gap: 10px; margin-bottom: 14px; }
    .btn-row { flex-wrap: wrap; }
    .badge {
      display: inline-block; padding: 2px 10px; border-radius: 20px;
      font-size: 0.78rem; font-weight: 700;
    }
    .badge-green  { background: #1a3a22; color: #4caf50; }
    .badge-yellow { background: #3e3209; color: #ffc107; }
    .badge-red    { background: #3a1010; color: #f44336; }
    .status-bar {
      font-size: 0.82rem; margin-bottom: 16px; padding: 8px 14px;
      background: #1c1f2e; border-radius: 8px; display: flex; gap: 14px; align-items: center;
    }
    .info-row { margin: 8px 0; font-size: 0.85rem; }
    .label { color: #8b9fd4; margin-right: 6px; }
    .mono {
      font-family: monospace; font-size: 0.82rem;
      word-break: break-all; color: #7ecfff;
    }
    .viewer-count { font-size: 2.2rem; font-weight: 700; color: #4a6cf7; }
    .copy-btn {
      font-size: 0.75rem; padding: 3px 9px;
      background: #252a40; color: #8b9fd4;
      border: 1px solid #3a4060; border-radius: 4px;
      cursor: pointer; margin-left: 6px; vertical-align: middle;
    }
    .copy-btn:hover { background: #3a4070; }
    #qrcode { margin-top: 10px; }
    #qrcode canvas, #qrcode img {
      border-radius: 6px;
      border: 8px solid #ffffff;
      background: #ffffff;
    }
    .log {
      font-size: 0.75rem; font-family: monospace;
      background: #12141e; border-radius: 6px; padding: 8px;
      max-height: 120px; overflow-y: auto; color: #9ab;
      margin-top: 8px;
    }
    .log-entry { margin: 1px 0; }
    .log-entry.ok   { color: #4caf50; }
    .log-entry.warn { color: #ffc107; }
    .log-entry.err  { color: #f44336; }
    .viewer-list {
      list-style: none;
      margin-top: 8px;
      padding: 0;
      max-height: 220px;
      overflow-y: auto;
      border: 1px solid #2a2f47;
      border-radius: 8px;
      background: #12141e;
    }
    .viewer-item {
      padding: 8px 10px;
      font-size: 0.82rem;
      font-family: monospace;
      color: #9ab;
      border-bottom: 1px solid #252a40;
      word-break: break-all;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }
    .viewer-item:last-child { border-bottom: none; }
    .viewer-id {
      flex: 1;
      min-width: 0;
      overflow-wrap: anywhere;
    }
    .viewer-toggle {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: #8b9fd4;
      font-size: 0.75rem;
      white-space: nowrap;
    }
    .viewer-toggle input { cursor: pointer; }
    .viewer-empty {
      color: #60729b;
      font-size: 0.82rem;
      padding: 10px;
      text-align: center;
    }
    .settings-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px 12px;
      margin-bottom: 10px;
    }
    .settings-grid .info-row {
      margin: 0;
    }
    .settings-grid select {
      max-width: none;
    }
    .audio-flags {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px 12px;
      margin-bottom: 10px;
    }
    .audio-flag {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 0.82rem;
      color: #c9d3f0;
    }
    .audio-flag input {
      cursor: pointer;
    }
    .video-container:fullscreen,
    .video-container:-webkit-full-screen {
      display: flex;
      align-items: center;
      justify-content: center;
      background: #000;
      border-radius: 0;
      width: 100vw;
      height: 100vh;
    }
    .video-container:fullscreen video,
    .video-container:-webkit-full-screen video {
      width: 100%;
      height: 100%;
      aspect-ratio: unset;
      border-radius: 0;
    }
    select {
      background: #12141e;
      border: 1px solid #3a4060;
      border-radius: 5px;
      color: #e0e0e0;
      padding: 5px 10px;
      font-size: 0.85rem;
      cursor: pointer;
      width: 100%;
      max-width: 300px;
    }
    select option {
      background: #1c1f2e;
      color: #e0e0e0;
    }
    @media (max-width: 600px) {
      .settings-grid,
      .audio-flags {
        grid-template-columns: 1fr;
      }
    }
