:root {
  --bg:              #F7F7F7;
  --surface:         #FFFFFF;
  --surface-2:       #F2F2F2;
  --border:          #E8E8E8;
  --border-strong:   #D0D0D0;
  --text-primary:    #111111;
  --text-secondary:  #666666;
  --text-tertiary:   #AAAAAA;
  --accent:          #4AB3FF;
  --accent-hover:    #2E97F0;
  --destructive:     #CC0000;
  --destructive-bg:  #FFF0F0;
}

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

body {
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

#app { height: 100dvh; }

.app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}


.role-separator {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.lang-badge {
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid var(--border);
  letter-spacing: 0.1px;
}

.clear-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-family: inherit;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s;
}
.clear-btn:hover {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

/* ── Messages ───────────────────────────────────────────────────────────── */
.messages-wrapper {
  flex: 1;
  display: flex;
  flex-direction: row;
  min-height: 0;
}

.messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-panel {
  width: 260px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
}

.chat-panel-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-panel-empty {
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: 24px;
}

.chat-panel-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.chat-panel-sender {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-tertiary);
}

.chat-panel-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.4;
  white-space: pre-wrap;
}

.chat-panel-text--original {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

@media (max-width: 900px) {
  .chat-panel { display: none; }
}

.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-tertiary);
  padding-bottom: 60px;
}

.empty-icon {
  opacity: 0.3;
  display: flex;
}

.empty-text {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.1px;
  color: var(--text-tertiary);
}

.message-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  animation: fade-up 150ms ease;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.msg-translated {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.55;
  letter-spacing: -0.2px;
}

.msg-original {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 4px;
  letter-spacing: -0.1px;
}

.msg-time {
  display: block;
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: right;
  margin-top: 6px;
}

.partial-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  opacity: 0.4;
  padding: 6px 14px;
  letter-spacing: -0.2px;
}

/* ── Error bar ──────────────────────────────────────────────────────────── */
.error-bar {
  background: var(--destructive-bg);
  border-top: 1px solid #FFD0D0;
  color: var(--destructive);
  font-size: 13px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 12px;
}
.error-bar button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--destructive);
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.app-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.app-brand-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 20px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.mic-btn {
  flex: 1;
  max-width: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, opacity 0.15s;
  letter-spacing: -0.1px;
}
.mic-btn:hover  { opacity: 0.88; }
.mic-btn:active { transform: scale(0.97); }

.mic-btn--stop {
  background: #1C1C1E;
  color: #ffffff;
  border: none;
}
.mic-btn--stop:hover { opacity: 0.82; }

.mic-dot {
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.5);
}
.mic-btn--stop .mic-dot {
  color: #FF453A;
}

.mic-timer {
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.55);
  margin-left: 2px;
}

.mic-btn-icon { display: none; }

@media (max-width: 768px) {
  .mic-btn-label { display: none; }
  .mic-btn-icon  { display: flex; align-items: center; }
  .mic-btn { flex: none; width: auto; padding: 0 14px; }
}

.waveform {
  width: 80px;
  height: 28px;
}

.settings-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: color 0.12s, background 0.12s;
}
.settings-btn:hover {
  background: var(--surface);
  color: var(--text-primary);
}

/* ── End Session (설정 시트 내부) ───────────────────────────────────────── */
.sheet-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0 16px;
}

.end-session-btn {
  width: 100%;
  height: 44px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: var(--destructive);
  cursor: pointer;
  transition: all 0.12s;
}
.end-session-btn:hover {
  background: var(--destructive-bg);
  border-color: #FFBBBB;
}

.end-session-confirm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.end-session-confirm-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.end-session-confirm-row {
  display: flex;
  gap: 8px;
}

.end-session-cancel-btn {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.12s;
}
.end-session-cancel-btn:hover {
  border-color: var(--border-strong);
}

.end-session-confirm-btn {
  flex: 1;
  height: 44px;
  background: var(--destructive);
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.12s;
}
.end-session-confirm-btn:hover {
  opacity: 0.85;
}

/* ── Bottom sheet ───────────────────────────────────────────────────────── */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 99;
  animation: overlay-in 180ms ease;
}

@keyframes overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  padding: 16px 20px 36px;
  z-index: 100;
  overflow-x: hidden;
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.08);
  animation: sheet-up 240ms cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 80dvh;
  overflow-y: auto;
}

@keyframes sheet-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.sheet-handle {
  width: 32px;
  height: 3px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.sheet-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.setting-group {
  margin-bottom: 16px;
}

.setting-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 6px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.setting-select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 32px 0 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23AAAAAA' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  appearance: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.setting-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 179, 255, 0.18);
}
.setting-disabled-hint {
  height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--surface);
  opacity: 0.6;
}

.setting-input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.setting-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 179, 255, 0.18);
}

.sheet-error {
  font-size: 13px;
  color: var(--destructive);
  margin-bottom: 12px;
}

.save-btn {
  width: 100%;
  height: 48px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s;
  letter-spacing: -0.2px;
}
.save-btn:hover    { background: var(--accent-hover); }
.save-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Share banner ───────────────────────────────────────────────────────── */
.share-banner {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.share-banner-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  padding: 9px 20px;
  white-space: nowrap;
  width: 100%;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.share-banner-toggle:hover { color: var(--text-secondary); }

.share-banner-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.share-banner-body.open {
  max-height: 60px;
}
.share-banner-body-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px 10px;
}

.share-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.share-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.share-room-id {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 6px;
  font-variant-numeric: tabular-nums;
}

.share-banner-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.share-url {
  font-size: 11px;
  color: var(--text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .share-url { display: none; }
}

/* ── Chat ───────────────────────────────────────────────────────────────── */
.message-card--right {
  align-self: flex-end;
  max-width: 80%;
}

.message-card--transcript .msg-translated {
  font-style: italic;
  opacity: 0.85;
}

.message-card--chat {
  background: #F4FAFF;
  border-color: #D9EEFF;
  max-width: 80%;
  align-self: flex-start;
}

.message-card--chat.message-card--right {
  align-self: flex-end;
}

.message-card--chat .msg-translated,
.message-card--chat .msg-original {
  white-space: pre-wrap;
}

.bubble-sender {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}

.message-card--right .bubble-sender {
  text-align: right;
}

.app-footer--host {
  gap: 8px;
}

.viewer-chat-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.chat-input {
  flex: 1;
  min-height: 36px;
  max-height: 100px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 16px;
  font-family: inherit;
  background: var(--surface);
  resize: none;
  overflow-y: auto;
  line-height: 1.4;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.chat-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 179, 255, 0.18);
}

.chat-send-btn {
  height: 36px;
  padding: 0 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  align-self: flex-end;
  transition: background 0.15s;
}
.chat-send-btn:hover    { background: var(--accent-hover); }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.copy-btn {
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  padding: 5px 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s;
  white-space: nowrap;
}
.copy-btn:hover { background: var(--accent-hover); }

/* ── Room closed / connecting ───────────────────────────────────────────── */
.room-closed {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text-tertiary);
}

.room-closed-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.2px;
}

.connecting-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.connecting-text {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ── Landing / Created page ─────────────────────────────────────────────── */
.landing-page {
  height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px 20px 48px;
  background: var(--bg);
}

.brand-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-tertiary);
  letter-spacing: 0.1px;
}

/* 랜딩 내 brand-footer: 화면 하단 고정 */
.landing-page > .brand-footer {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
}


.brand-footer-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border-strong);
  flex-shrink: 0;
}

.landing-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.landing-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

.landing-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.landing-subtitle {
  font-size: 13px;
  color: var(--text-tertiary);
  letter-spacing: -0.1px;
}

.landing-card {
  width: 100%;
  max-width: 500px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.landing-primary-btn {
  width: 100%;
  height: 48px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: -0.2px;
}
.landing-primary-btn:hover    { background: var(--accent-hover); }
.landing-primary-btn:active   { transform: scale(0.98); }
.landing-primary-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.landing-active-notice {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}

.landing-code-input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.landing-code-input::placeholder {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-tertiary);
}
.landing-code-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 179, 255, 0.18);
}

.landing-error {
  font-size: 13px;
  color: var(--destructive);
  text-align: center;
}

/* Created page */
.created-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-align: center;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}


.created-link-box {
  display: flex;
  align-items: center;
  border-radius: 10px;
  overflow: hidden;
}

.created-link-text {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.created-link-btn {
  flex-shrink: 0;
  padding: 0 16px;
  height: 42px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.created-link-btn:hover { background: var(--accent-hover); }

/* ── Name input page ────────────────────────────────────────────────────── */
.name-input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ── Viewer header controls ──────────────────────────────────────────────── */
.viewer-name-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.12s;
  max-width: 80px;
  overflow: hidden;
  flex-shrink: 0;
}

.viewer-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.viewer-name-btn:hover {
  background: var(--surface);
  border-color: var(--border-strong);
}

.viewer-name-input {
  height: 30px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-primary);
  width: 120px;
  box-shadow: 0 0 0 3px rgba(74, 179, 255, 0.18);
  outline: none;
  background: var(--surface);
}

.viewer-lang-select {
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 24px 0 8px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23AAAAAA' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  cursor: pointer;
  appearance: none;
  transition: border-color 0.12s;
}
.viewer-lang-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(74, 179, 255, 0.18);
}

/* ── Participants bar (host) ─────────────────────────────────────────────── */
.participants-bar {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.participants-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
  padding: 8px 20px;
  width: 100%;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.participants-toggle:hover { color: var(--text-secondary); }

.participants-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.participants-body.open {
  max-height: 200px;
}
.participants-body-inner {
  /* wrapper for overflow clip */
}

.participants-list {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  padding: 0 20px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.participants-list::-webkit-scrollbar { display: none; }

.participant-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px 3px 7px;
  font-size: 12px;
  white-space: nowrap;
}

.participant-dot {
  display: flex;
  align-items: center;
  color: var(--text-tertiary);
}

.participant-name {
  font-weight: 600;
  color: var(--text-primary);
}

.participant-lang {
  color: var(--text-tertiary);
  font-size: 11px;
}

.participant-audio {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
}

/* ── Header icon buttons (viewer) ───────────────────────────────────────── */
.header-icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  transition: all 0.12s;
  flex-shrink: 0;
}
.header-icon-btn:hover {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.header-icon-btn--on {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.header-mic-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s, transform 0.1s;
}
.header-mic-btn:hover  { opacity: 0.88; }
.header-mic-btn:active { transform: scale(0.97); }

.header-mic-btn--stop {
  background: #1C1C1E;
}
.header-mic-btn .mic-dot  { color: rgba(255,255,255,0.45); }
.header-mic-btn--stop .mic-dot { color: #FF453A; }
.header-mic-btn .mic-timer {
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.4px;
  color: rgba(255,255,255,0.5);
  margin-left: 1px;
}

/* ── Audio toggle button (viewer) ───────────────────────────────────────── */
.audio-toggle-btn {
  height: 32px;
  width: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  transition: all 0.12s;
  flex-shrink: 0;
}
.audio-toggle-btn:hover {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text-secondary);
}
.audio-toggle-btn--on {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

/* ── Landing: room list & create flow ───────────────────────────────────── */
.rooms-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.rooms-empty {
  font-size: 13px;
  color: var(--text-tertiary);
  text-align: center;
  padding: 10px 0;
}

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

.room-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.room-list-item:hover {
  border-color: var(--accent);
}

.room-list-icon {
  display: flex;
  align-items: center;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.room-list-title {
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-list-code {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 2px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.room-list-count {
  font-size: 11px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.room-list-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.room-list-badge--away {
  background: var(--surface-3, #333);
  color: var(--text-tertiary);
  border: 1px solid var(--border);
}

.landing-btn-row {
  display: flex;
  gap: 8px;
}
.landing-btn-row .landing-primary-btn { flex: 1; }

.landing-secondary-btn {
  flex: 1;
  height: 48px;
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.landing-secondary-btn:hover {
  background: var(--border);
  border-color: var(--border-strong);
}

.host-disconnected-banner {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

@media (max-width: 480px) {
  .share-url { display: none; }
}
