/* ─── Live Translate — NTT-branded styles ─────────────────────────────────── */

:root {
  --ntt-blue: #0072BC;
  --ntt-blue-light: #e8f4fc;
  --ntt-blue-hover: #005a96;
  --green: #16a34a;
  --green-light: #f0fdf4;
  --green-hover: #15803d;
  --red: #dc2626;
  --red-light: #fef2f2;
  --red-hover: #b91c1c;
  --amber: #d97706;
  --amber-light: #fffbeb;
  --amber-hover: #b45309;
  --amber-muted: #92400e;
  --text-primary: #1a1a1a;
  --text-secondary: #6b7280;
  --text-translation: #555;
  --bg-white: #ffffff;
  --bg-panel: #fafbfc;
  --border: #e0e4e8;
  --border-light: #eef0f2;
  --radius: 8px;
  --radius-sm: 5px;
  --radius-pill: 999px;
  --font-body: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

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

html, body {
  height: 100%;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* ─── Layout ──────────────────────────────────────────────────────────────── */

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

/* ─── Header ──────────────────────────────────────────────────────────────── */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-white);
  flex-shrink: 0;
}

.header-left {
  flex: 0 0 auto;
}

.header-center {
  display: flex;
  align-items: center;
  gap: 10px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.header-center img {
  height: 34px;
  width: auto;
}

.header-center h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--ntt-blue);
  letter-spacing: -0.3px;
}

.title-beta {
  font-size: 13px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.5px;
  text-transform: lowercase;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

.header-right {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.locale-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.locale-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Session controls row (Pause / Resume / Stop) */
.session-controls-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.btn-pause-session,
.btn-resume-session,
.btn-stop-session {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s;
  border: 2px solid transparent;
}

.btn-pause-session {
  background: var(--amber-light);
  border-color: var(--amber);
  color: var(--amber-muted);
}
.btn-pause-session:hover {
  background: var(--amber);
  color: white;
}

.btn-resume-session {
  background: var(--green-light);
  border-color: var(--green);
  color: var(--green);
}
.btn-resume-session:hover {
  background: var(--green);
  color: white;
}

.btn-stop-session {
  background: var(--red-light);
  border-color: var(--red);
  color: var(--red);
}
.btn-stop-session:hover {
  background: var(--red);
  color: white;
}

/* Download button */
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: 2px solid var(--ntt-blue);
  border-radius: var(--radius-pill);
  background: var(--bg-white);
  color: var(--ntt-blue);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  margin-left: 8px;
}
.btn-download:hover:not(.disabled) {
  background: var(--ntt-blue-light);
}
.btn-download.disabled {
  border-color: #ccc;
  color: #ccc;
  cursor: not-allowed;
  opacity: 0.5;
}
.btn-download.disabled svg {
  stroke: #ccc;
}

/* Summarize button */
.btn-summarize {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: 2px solid var(--ntt-blue);
  border-radius: var(--radius-pill);
  background: var(--bg-white);
  color: var(--ntt-blue);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  margin-left: 8px;
}
.btn-summarize:hover:not(.disabled) {
  background: var(--ntt-blue-light);
}
.btn-summarize.disabled {
  border-color: #ccc;
  color: #ccc;
  cursor: not-allowed;
  opacity: 0.5;
}
.btn-summarize.disabled svg {
  stroke: #ccc;
}

/* Locale selector */
.locale-select {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  padding: 3px 6px;
  cursor: pointer;
  outline: none;
  max-width: 130px;
}
.locale-select:hover,
.locale-select:focus {
  border-color: var(--ntt-blue);
  color: var(--ntt-blue);
}

/* Toggle config link */
.btn-toggle-config {
  background: none;
  border: none;
  color: var(--ntt-blue);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-toggle-config:hover {
  text-decoration: underline;
}

/* ─── Main content ────────────────────────────────────────────────────────── */

.main {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

/* ─── Transcript panel (left) ─────────────────────────────────────────────── */

.transcript-panel-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--border);
  position: relative;
}

/* ─── Viewer Pane ─────────────────────────────────────────────────────────── */

.viewer-pane {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 6px 16px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-panel);
}

.viewer-pane-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-height: 30px;
  gap: 0;
}


.viewer-pane-size {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.viewer-pane-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 8px;
}

.viewer-pane-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 4px;
  align-self: center;
}

.viewer-pane-or-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  margin: 0 6px;
  opacity: 0.7;
}

.tts-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-top: 1px solid var(--border-light);
  flex-wrap: nowrap;
}

.tts-row-sizer {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.mobile-sizer-only {
  display: none;
}

.mobile-session-btn {
  display: none;
}



.tts-row-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.tts-lang-wrap {
  position: relative;
  display: inline-flex;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.tts-lang-wrap::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-sm) + 2px);
  background: conic-gradient(
    from var(--spin-angle, 0deg),
    transparent 0deg,
    var(--ntt-blue) 60deg,
    transparent 120deg
  );
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s;
}

.tts-lang-wrap::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius-sm) + 1px);
  background: var(--bg-white);
  pointer-events: none;
  z-index: 1;
}

.tts-lang-wrap.tts-lang-spinning::before {
  opacity: 1;
  animation: tts-spin 1.2s linear infinite;
}

@property --spin-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes tts-spin {
  from { --spin-angle: 0deg; }
  to   { --spin-angle: 360deg; }
}

.tts-lang-wrap .tts-lang-select {
  position: relative;
  z-index: 2;
}

.tts-btn-wrap {
  position: relative;
  display: inline-flex;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.tts-btn-wrap::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-pill) + 2px);
  background: conic-gradient(
    from var(--spin-angle-btn, 0deg),
    transparent 0deg,
    var(--green) 60deg,
    transparent 120deg
  );
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s;
}

.tts-btn-wrap::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius-pill) + 1px);
  background: var(--bg-white);
  pointer-events: none;
  z-index: 1;
}

.tts-btn-wrap.tts-btn-spinning::before {
  opacity: 1;
  animation: tts-spin-btn 1.2s linear infinite;
}

@property --spin-angle-btn {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes tts-spin-btn {
  from { --spin-angle-btn: 0deg; }
  to   { --spin-angle-btn: 360deg; }
}

.tts-btn-wrap .btn-tts-toggle {
  position: relative;
  z-index: 2;
}

.btn-record-wrap {
  position: relative;
  display: inline-flex;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.btn-record-wrap::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-pill) + 2px);
  background: conic-gradient(
    from var(--spin-angle-rec, 0deg),
    transparent 0deg,
    var(--ntt-blue) 60deg,
    transparent 120deg
  );
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s;
}

.btn-record-wrap::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius-pill) + 1px);
  background: var(--bg-white);
  pointer-events: none;
  z-index: 1;
}

.btn-record-wrap.btn-record-spinning::before {
  opacity: 1;
  animation: rec-spin 1.2s linear infinite;
}

@property --spin-angle-rec {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes rec-spin {
  from { --spin-angle-rec: 0deg; }
  to   { --spin-angle-rec: 360deg; }
}

.btn-record-wrap .btn-record {
  position: relative;
  z-index: 2;
}

.tts-lang-select,
.tts-speaker-select {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-white);
  cursor: pointer;
  max-width: 150px;
  min-width: 0;
}

.tts-lang-select:disabled,
.tts-speaker-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--bg-panel);
}

.tts-lang-select:focus,
.tts-speaker-select:focus {
  outline: none;
  border-color: var(--ntt-blue);
}

.btn-tts-toggle {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-white);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-tts-toggle:hover:not(:disabled) {
  border-color: var(--ntt-blue);
  color: var(--ntt-blue);
}

.btn-tts-toggle:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-tts-toggle.tts-playing {
  background: var(--red-light);
  border-color: var(--red);
  color: var(--red);
}

.btn-tts-toggle.tts-playing:hover {
  background: var(--red);
  color: white;
}

.size-icon {
  color: var(--text-secondary);
  font-weight: 700;
  line-height: 1;
  user-select: none;
}

.size-icon-sm {
  font-size: 11px;
}

.size-icon-lg {
  font-size: 18px;
}

.size-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  cursor: pointer;
}

.size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ntt-blue);
  cursor: pointer;
  transition: background 0.15s;
}

.size-slider::-webkit-slider-thumb:hover {
  background: var(--ntt-blue-hover);
}

.size-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ntt-blue);
  cursor: pointer;
  border: none;
}

.btn-follow-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-white);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-follow-live:hover {
  border-color: var(--ntt-blue);
  color: var(--ntt-blue);
}

.btn-follow-live.vf-active {
  background: var(--ntt-blue);
  border-color: var(--ntt-blue);
  color: white;
}

.viewer-filter-btn {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-white);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.viewer-filter-btn:hover:not(.vf-disabled) {
  border-color: var(--ntt-blue);
  color: var(--ntt-blue);
}

.viewer-filter-btn.vf-active {
  background: var(--ntt-blue);
  border-color: var(--ntt-blue);
  color: white;
}

.viewer-filter-btn.vf-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.transcript-panel {
  flex: 1;
  overflow-y: auto;
  padding: 12px 32px 28px;
  --transcript-font-size: 16px;
}

.transcript-footnote {
  flex-shrink: 0;
  padding: 8px 32px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-white);
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footnote-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footnote-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-rawlog-footer {
  background: none;
  border: none;
  padding: 0;
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.6;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-rawlog-footer:hover {
  opacity: 1;
}

.viewer-mode .btn-rawlog-footer {
  display: none;
}

.footer-version {
  color: var(--text-secondary);
  opacity: 0.6;
}

.btn-version-footer {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-size: inherit;
  font-family: inherit;
  color: var(--text-secondary);
  opacity: 0.6;
  cursor: pointer;
  line-height: inherit;
}

.btn-version-footer:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.modal--release-notes {
  width: 90vw !important;
  max-width: 90vw !important;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-body--release-notes {
  overflow-y: auto;
  flex: 1;
  padding: 0 20px 16px;
}

.modal-body--release-notes h1 {
  display: none;
}

.modal-body--release-notes h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  padding: 13px 0 4px;
  line-height: 1.5;
}

.modal-body--release-notes h2::before {
  content: attr(data-version);
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  color: var(--ntt-blue);
  background: var(--ntt-blue-light);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

.rn-entry {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.rn-entry:last-child {
  border-bottom: none;
}

.rn-entry h2 {
  padding: 0 0 6px 0;
  border-bottom: none;
}

.rn-entry p {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.modal-body--release-notes ul,
.modal-body--release-notes ol {
  display: none;
}

.log-level-input {
  width: 16px;
  text-align: center;
  font-size: inherit;
  font-family: inherit;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--text-secondary);
  opacity: 0.4;
  padding: 0;
  margin-left: 4px;
  line-height: 1;
  pointer-events: auto;
}
.log-level-input:focus {
  opacity: 0.8;
  outline: none;
}
.log-level-input:disabled {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

.log-level-display {
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.5;
}

.log-level-wrap {
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.5;
  display: flex;
  align-items: center;
  gap: 1px;
}

.log-level-readonly {
  font-size: 11px;
  color: var(--text-secondary);
  min-width: 10px;
}

.footnote-sep {
  color: var(--border);
}

.speaker-block {
  margin-bottom: 12px;
}

.speaker-label {
  font-size: var(--transcript-font-size, 16px);
  font-weight: 700;
  color: var(--ntt-blue);
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

.seg-original {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 2px;
  line-height: 1.7;
}

.seg-original .seg-text {
  font-size: calc(var(--transcript-font-size, 16px) + 2px);
  font-weight: 500;
  color: var(--text-primary);
}

.seg-translation {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
  line-height: 1.7;
}

.seg-translation .seg-text {
  font-size: var(--transcript-font-size, 16px);
  font-weight: 400;
  color: var(--text-secondary);
  font-style: italic;
}

.lang-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--ntt-blue-light);
  color: var(--ntt-blue);
  font-size: calc(var(--transcript-font-size, 16px) - 5px);
  font-weight: 600;
  letter-spacing: 0.2px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ─── Config panel (right sidebar) ────────────────────────────────────────── */

.config-panel {
  width: 380px;
  flex-shrink: 0;
  padding: 24px;
  background: var(--bg-panel);
  overflow-y: auto;
}

.config-panel-close {
  display: none;
}

/* ─── Viewer mode ──────────────────────────────────────────────────────────── */

body.viewer-mode #config-panel,
body.viewer-mode #btn-toggle-config {
  display: none !important;
}

.viewer-mode-badge,
.host-mode-badge {
  display: none;
}

body.viewer-mode .viewer-mode-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: #fff3e0;
  color: #e65100;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 1px solid #e65100;
  white-space: nowrap;
}

body.host-mode .host-mode-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--green-light);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 1px solid var(--green);
  white-space: nowrap;
}

/* ─── Session Details card ─────────────────────────────────────────────────── */

.session-details-card {
  margin-top: 10px;
  margin-bottom: 8px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 12px 12px 10px;
}

.session-details-hint {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.session-details-body {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.session-details-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sdl-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sdl-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sdl-value {
  font-size: 12px;
  color: var(--text-primary);
  font-family: var(--font-mono, monospace);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sdl-value--key {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--ntt-blue);
}

.sdl-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.btn-sdl-action {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--ntt-blue);
  border-radius: var(--radius-pill);
  background: var(--bg-white);
  color: var(--ntt-blue);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: center;
  white-space: nowrap;
}

.btn-sdl-action:hover {
  background: var(--ntt-blue-light);
}

.btn-sdl-action.copied {
  border-color: var(--green);
  color: var(--green);
}

/* QR thumbnail button */
.session-qr-thumb {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  background: none;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 4px 4px 3px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.session-qr-thumb:hover {
  border-color: var(--ntt-blue);
  box-shadow: 0 0 0 2px rgba(0, 114, 188, 0.12);
}

.sqt-canvas-wrap {
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sqt-canvas-wrap img,
.sqt-canvas-wrap canvas {
  display: block;
  width: 150px;
  height: 150px;
}

.sqt-hint {
  font-size: 9px;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}

/* ─── (legacy) btn-copy-url / btn-copy-viewer-key stubs — kept for compat ── */
.btn-copy-url,
.btn-copy-viewer-key {
  display: none;
}

/* ─── Viewer session banner ────────────────────────────────────────────────── */

.viewer-session-banner {
  display: none;
  margin: 10px 16px;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.1px;
}

.viewer-session-banner--waiting {
  background: var(--bg-panel);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.viewer-session-banner--paused {
  background: var(--amber-light);
  color: var(--amber-muted);
  border: 1px solid var(--amber);
}

.viewer-session-banner--archive_capped {
  background: var(--amber-light);
  color: var(--amber-muted);
  border: 1px solid var(--amber);
}

.viewer-session-banner--ended {
  background: var(--green-light);
  color: var(--green);
  border: 1px solid var(--green);
}

.viewer-session-banner--session_not_found {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Override .hidden for config-panel to use width collapse instead */
aside.config-panel.hidden {
  display: block !important;
  width: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  transition: width 0.2s, padding 0.2s, opacity 0.2s;
}

.config-section {
  margin-bottom: 24px;
}

/* ─── Hierarchical config headings ─────────────────────────────────────────── */

.config-group-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ntt-blue);
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ntt-blue-light);
}

.config-group-title--collapsible::after {
  content: " ▾";
  font-size: 15px;
  opacity: 0.6;
}

.config-group-title--collapsible.collapsed::after {
  content: " ▸";
  font-size: 15px;
  opacity: 0.6;
}

#pre-session-body,
#post-call-body {
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease;
  max-height: 600px;
  opacity: 1;
}

#pre-session-body.collapsed,
#post-call-body.collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

/* ─── Normalized section titles (grey, no uppercase) ─────────────────────── */

.config-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

/* ─── Host Key ────────────────────────────────────────────────────────────── */

.host-key-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-clearable {
  position: relative;
  flex: 1;
}

.input-clearable input {
  width: 100%;
  padding: 7px 30px 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
}
.input-clearable input:focus {
  outline: none;
  border-color: var(--ntt-blue);
  box-shadow: 0 0 0 2px rgba(0, 114, 188, 0.15);
}
.input-clearable input:disabled {
  background: #f3f4f6;
  color: #999;
}

.input-clear-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #999;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 50%;
}
.input-clear-btn:hover {
  color: #333;
  background: #eee;
}

.btn-apply {
  padding: 7px 16px;
  border: 1px solid var(--ntt-blue);
  border-radius: var(--radius-sm);
  background: var(--ntt-blue);
  color: white;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-apply:hover:not(:disabled) {
  background: var(--ntt-blue-hover);
}
.btn-apply:disabled {
  cursor: default;
}
.btn-apply.btn-apply-success {
  background: var(--green);
  border-color: var(--green);
  color: white;
  font-size: 16px;
  font-weight: 700;
}

.host-key-error {
  margin-top: 6px;
  font-size: 13px;
  color: var(--red);
  font-weight: 500;
}

/* ─── Language selectors ──────────────────────────────────────────────────── */

.setting-row {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  gap: 12px;
}

.setting-row--top {
  align-items: flex-start;
}

.setting-row--top .config-section-hint,
.setting-row--top .setting-row-hint {
  margin-bottom: 0;
  padding-top: 2px;
}

.setting-row-label {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.setting-row-hint {
  flex: 1;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
}

.setting-select {
  width: 200px;
  flex-shrink: 0;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-white);
  cursor: pointer;
}

.setting-select:focus {
  outline: none;
  border-color: var(--ntt-blue);
}

.lang-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  gap: 0;
}

.lang-row label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  flex: 1;
}

.lang-row .btn-lang-clear {
  margin-left: auto;
  margin-right: 6px;
  flex-shrink: 0;
}

.lang-row select {
  width: 200px;
  flex-shrink: 0;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-white);
  cursor: pointer;
}
.lang-row select:focus {
  outline: none;
  border-color: var(--ntt-blue);
  box-shadow: 0 0 0 2px rgba(0, 114, 188, 0.15);
}

/* ─── Language section hint & required asterisk ──────────────────────────── */

.config-section-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  margin-top: 0;
}

.config-section--log-transcript {
  margin-top: 10px;
}

.log-transcript-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.log-transcript-hint {
  flex: 1;
  margin: 0;
}

.audio-playback-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.audio-playback-hint {
  flex: 1;
  margin: 0;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  transition: background 0.2s;
  cursor: pointer;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--ntt-blue, #0057b8);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

.toggle-switch.toggle-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.required {
  color: var(--ntt-blue);
  font-weight: 700;
}

/* ─── Language slots (horizontal) ────────────────────────────────────────── */

.lang-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.lang-slot {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1 1 120px;
  max-width: 220px;
}

.lang-slot--anchor {
  flex: 1 1 140px;
}

.lang-slot--add {
  flex: 0 0 auto;
  max-width: none;
}

.lang-slot .setting-select {
  flex: 1 1 auto;
  min-width: 120px;
  width: 100%;
  max-width: 100%;
}

/* ─── Lang row clear / add buttons ───────────────────────────────────────── */

.btn-lang-clear {
  background: none;
  border: none;
  color: #aaa;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 50%;
  margin-left: 0;
  flex-shrink: 0;
}
.btn-lang-clear:hover {
  color: var(--red);
  background: var(--red-light);
}

.btn-lang-add {
  background: none;
  border: 1px dashed var(--border);
  border-radius: 999px;
  color: var(--ntt-blue);
  font-size: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  width: auto;
  white-space: nowrap;
  transition: all 0.15s;
}
.btn-lang-add:hover {
  background: var(--ntt-blue-light);
  border-color: var(--ntt-blue);
}

/* ─── Mic selector (full width, no MIC label) ─────────────────────────────── */

.mic-inline-row {
  display: flex;
  align-items: center;
  gap: 0;
}

.mic-inline-row .config-section-title {
  flex: 1;
  margin-bottom: 0;
}

.mic-select {
  width: 200px;
  flex-shrink: 0;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-white);
  margin-bottom: 10px;
}

.mic-select--inline {
  margin-bottom: 0;
}
.mic-select:focus {
  outline: none;
  border-color: var(--ntt-blue);
}


/* ─── Response Speed slider ────────────────────────────────────────────────── */

.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-label-left,
.slider-label-right {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ntt-blue);
  cursor: pointer;
  transition: background 0.15s;
}
.slider::-webkit-slider-thumb:hover {
  background: var(--ntt-blue-hover);
}
.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ntt-blue);
  cursor: pointer;
  border: none;
}
.slider:disabled {
  opacity: 0.4;
}
.slider:disabled::-webkit-slider-thumb {
  cursor: default;
}

.slider-value-display {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ─── Control buttons ─────────────────────────────────────────────────────── */

.btn-clear {
  display: block;
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-white);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-clear:hover {
  border-color: var(--ntt-blue);
  color: var(--ntt-blue);
}

.btn-clear-small {
  display: block;
  width: 100%;
  padding: 5px 10px;
  margin-top: 8px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.btn-clear-small:hover {
  border-color: var(--ntt-blue);
  color: var(--ntt-blue);
}

.config-section--start {
  padding-bottom: 4px;
}

.config-section--create {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.btn-create-session {
  display: block;
  width: 100%;
  padding: 12px;
  border: 2px solid var(--ntt-blue);
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-body);
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--ntt-blue);
  color: white;
}
.btn-create-session:hover {
  background: #005fa3;
  border-color: #005fa3;
}
.btn-create-session:disabled {
  background: #c5cdd6;
  border-color: #c5cdd6;
  color: #fff;
  opacity: 1;
  cursor: not-allowed;
}

.btn-record {
  display: block;
  width: 100%;
  padding: 12px;
  border: 2px solid;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-body);
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.15s;
}

/* Start Session = green */
.btn-record.btn-start {
  border-color: var(--green);
  background: var(--bg-white);
  color: var(--green);
}
.btn-record.btn-start:hover {
  background: var(--green-light);
}

/* End Session = red */
.btn-record.btn-stop {
  border-color: var(--red);
  background: var(--red);
  color: white;
}
.btn-record.btn-stop:hover {
  background: var(--red-hover);
  border-color: var(--red-hover);
}

/* ─── Empty state ─────────────────────────────────────────────────────────── */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
  font-size: 15px;
  gap: 8px;
}

.empty-state svg {
  opacity: 0.3;
  margin-bottom: 8px;
}

.empty-state-intro {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
  margin-bottom: 10px;
}

.empty-state-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.empty-state-bullets li {
  font-size: 13px;
  color: var(--text-secondary);
  padding-left: 16px;
  position: relative;
  white-space: nowrap;
}

.empty-state-bullets li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--ntt-blue);
  font-weight: 700;
}

@media (max-width: 600px) {
  .empty-state-intro {
    white-space: normal;
    text-align: center;
  }
  .empty-state-bullets li {
    white-space: normal;
  }
}

/* ─── Bottom bar: Follow Live + sizer (left), Download/Summarize (right) ─── */

.bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-white);
  flex-shrink: 0;
  gap: 10px;
  position: relative;
  z-index: 20;
}

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

.bottom-bar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.mobile-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid var(--border-light);
  background: var(--bg-white);
  color: var(--text-secondary);
  font-family: var(--font-body);
  transition: background 0.15s, color 0.15s;
}

.mobile-action-btn:not(.disabled):hover {
  background: var(--bg-panel);
  color: var(--text-primary);
}

.mobile-action-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}



/* ─── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  aside.config-panel.config-panel--session-active {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
  }

  /* ── App shell ── */
  .app {
    height: 100dvh;
  }

  /* ── Header: 2-row grid layout on mobile ── */
  .header {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    padding: 10px 14px 8px;
    gap: 6px 8px;
  }

  /* Row 1: logo + title — spans full width, centred */
  .header-center {
    grid-column: 1 / -1;
    grid-row: 1;
    position: static;
    transform: none;
    justify-content: center;
    gap: 8px;
    width: 100%;
  }

  .header-center img {
    height: 26px;
  }

  .header-center h1 {
    font-size: 17px;
  }

  /* Row 2 left: mode badge — shrinks to content width */
  .header-left {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
  }

  .header-left .btn-download,
  .header-left .btn-summarize {
    display: none !important;
  }

  /* Row 2 right: locale + host config toggle — fills remaining space */
  .header-right {
    grid-column: 2;
    grid-row: 2;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
  }

  .locale-row {
    gap: 4px;
  }

  .locale-label {
    font-size: 11px;
  }

  .locale-select {
    font-size: 11px;
    padding: 3px 5px;
    max-width: 110px;
  }

  .btn-toggle-config {
    font-size: 13px;
    white-space: nowrap;
  }

  .landing-header {
    padding: 10px 14px 8px !important;
    min-height: unset !important;
  }

  .landing-key-card {
    min-width: 0;
    width: 100%;
    max-width: 400px;
    padding: 20px 16px;
  }

  /* ── Main: vertical stack ── */
  .main {
    flex-direction: column;
    overflow: hidden;
  }

  /* ── Transcript panel wrapper fills available height ── */
  .transcript-panel-wrapper {
    flex: 1;
    border-right: none;
    border-bottom: none;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  /* ── Viewer pane on mobile: compact ── */
  .viewer-pane {
    padding: 4px 10px;
  }

  .tts-row {
    padding: 5px 0;
  }

  .tts-row-sizer {
    display: flex;
    margin-left: 0;
  }

  .mobile-sizer-only {
    display: flex;
  }

  .mobile-session-btn {
    display: none;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-body);
    border-radius: var(--radius-pill);
    border: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .mobile-session-btn.mobile-session-btn--visible {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .tts-lang-select,
  .tts-speaker-select {
    flex: 1;
    max-width: none;
  }

  .viewer-pane-toolbar {
    padding: 3px 0;
    flex-wrap: nowrap;
    gap: 6px;
  }

  .filter-pills {
    flex-wrap: nowrap;
    min-width: 0;
  }

  .pill-label-full {
    display: none !important;
  }

  .pill-label-compact {
    display: inline !important;
  }

  .btn-live-share {
    padding: 5px 8px;
    margin-left: 0;
    flex-shrink: 0;
  }

  .btn-live-share span {
    display: none;
  }

  .screen-title,
  .session-title-wrap,
  .session-title-text {
    font-size: 14px;
    line-height: 1.25;
  }

  .session-title-input {
    font-size: 14px;
    min-width: 0;
    width: 100%;
  }

  .summary-tab-actions--transcript {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 16px;
  }

  .transcript-actions-spacer {
    display: none;
  }

  .session-audio-player {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    height: 62px;
    padding: 6px 8px;
  }

  .transcript-download-stack {
    display: none;
  }

  .session-audio-grid {
    grid-template-columns: auto 1fr auto;
  }

  .session-audio-seek {
    grid-column: 2 / 4;
  }

  .session-audio-downloads {
    display: flex;
    align-items: center;
    gap: 2px;
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
  }

  .viewer-filter-btn {
    padding: 3px 9px;
    font-size: 11px;
  }

  .viewer-pane-or-label {
    font-size: 10px;
  }

  .btn-follow-live {
    padding: 3px 9px;
    font-size: 11px;
  }

  .size-slider {
    width: 60px;
  }

  .size-icon-sm {
    font-size: 10px;
  }

  .size-icon-lg {
    font-size: 15px;
  }

  /* ── Bottom bar: stack into two rows on mobile ── */
  .bottom-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
  }

  .bottom-bar-left {
    padding: 6px 14px;
    border-bottom: 1px solid var(--border-light);
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .bottom-bar-right {
    padding: 8px 14px;
    justify-content: stretch;
  }

  .bottom-bar-right .mobile-action-btn {
    flex: 1;
    justify-content: center;
  }

  /* ── Mobile controls row (Follow Live + sizer) — below transcript ── */
  .mobile-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 14px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-white);
    flex-shrink: 0;
  }

  /* ── Transcript panel ── */
  .transcript-panel {
    flex: 1;
    padding: 10px 16px 14px;
    min-height: 0;
  }

  .empty-state {
    justify-content: flex-start;
    padding-top: 16px;
  }

  /* ── Mobile action buttons ── */
  .mobile-action-btn {
    padding: 8px 10px;
    font-size: 13px;
  }

  .mobile-action-btn svg {
    width: 15px;
    height: 15px;
  }

  /* ── Footer ── */
  .transcript-footnote {
    padding: 6px 14px;
  }

  .footer-beta,
  .footnote-beta-sep {
    display: none;
  }

  /* ── Transcript content ── */
  .speaker-label {
    font-size: var(--transcript-font-size, 16px);
  }

  .seg-original .seg-text {
    font-size: calc(var(--transcript-font-size, 16px) + 2px);
  }

  .seg-translation .seg-text {
    font-size: var(--transcript-font-size, 16px);
  }

  .lang-badge {
    font-size: calc(var(--transcript-font-size, 16px) - 5px);
    padding: 1px 6px;
  }

  /* ── Config panel close button ── */
  .config-panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    padding: 0;
  }

  .config-panel-close:hover {
    background: var(--border-light);
    color: var(--text-primary);
  }

  /* ── Config panel: full-width slide-in on mobile ── */
  .config-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    z-index: 500;
    padding: 44px 16px 16px;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    overflow-y: auto;
    transition: transform 0.25s ease, opacity 0.2s ease;
    transform: translateX(0);
    opacity: 1;
  }

  aside.config-panel.hidden {
    display: block !important;
    width: 100vw;
    padding: 44px 16px 16px;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
  }

  .lang-row {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    margin-bottom: 10px;
  }

  .lang-row label {
    font-size: 13px;
    min-width: 0;
    white-space: nowrap;
  }

  .lang-row select {
    width: auto;
    flex: 1;
    min-width: 0;
    font-size: 13px;
  }

  .empty-state {
    font-size: 13px;
  }

  .empty-state svg {
    width: 36px;
    height: 36px;
  }

  .btn-record {
    font-size: 14px;
    padding: 10px;
  }

  .btn-clear {
    font-size: 13px;
    padding: 8px;
  }

  .config-section-title {
    font-size: 12px;
    margin-bottom: 6px;
  }

  /* ── Config panel: tighten all whitespace on mobile ── */
  .config-section {
    margin-bottom: 12px;
  }

  .config-section-hint {
    margin-bottom: 6px;
    margin-top: -3px;
  }

  .mic-select {
    margin-bottom: 4px;
  }

  .lang-slots {
    gap: 6px;
  }

  .lang-slot {
    flex: 1 1 100%;
    max-width: none;
  }

  .lang-slot--add {
    flex: 0 0 auto;
  }

  .advanced-settings-row {
    margin-top: 2px;
    margin-bottom: 10px;
  }

  .config-group-title {
    margin: 0 0 10px 0;
    padding-bottom: 6px;
  }

  .config-section--create {
    margin-top: 4px;
    padding-top: 10px;
  }

  .btn-create-session {
    padding: 8px;
    font-size: 14px;
  }

  .btn-clear-small {
    padding: 4px 10px;
    margin-top: 6px;
  }

  .session-controls-row {
    margin-bottom: 6px;
  }

  .session-details-card {
    margin-top: 6px;
    margin-bottom: 4px;
    padding: 8px 10px 8px;
  }

  .config-section--start {
    padding-bottom: 2px;
  }

  /* ── Hide speaker output on mobile (Web Audio can't route on iOS/Android) ── */
  .tts-output-label,
  #tts-speaker-select {
    display: none !important;
  }

  /* ── Transcript spacing: very tight on mobile ── */
  .speaker-block {
    margin-bottom: 4px;
  }

  .utt-card {
    padding: 5px 10px;
  }

  /* Modal on mobile */
  .modal--wide {
    width: 96vw;
    max-height: 88vh;
  }

  /* ── Advanced Settings modal: fix layout on mobile ── */
  .modal--wide .modal-body {
    padding: 12px;
  }

  .preferred-langs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 8px;
    width: 100%;
  }

  .pref-lang-col {
    min-width: 0;
  }

  .pref-lang-select {
    width: 100%;
    min-width: 0;
    font-size: 12px;
    padding: 5px 4px;
    margin-bottom: 0;
    box-sizing: border-box;
  }

  .pref-lang-long {
    display: none;
  }

  .pref-lang-short {
    display: inline;
  }

  .context-kv-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .context-kv-row .context-key-input {
    flex: 2 1 0;
    width: auto;
    min-width: 0;
    font-size: 12px;
    padding: 6px 8px;
  }

  .context-kv-row .context-value-input {
    flex: 3 1 0;
    width: auto;
    min-width: 0;
    font-size: 12px;
    padding: 6px 8px;
  }

  .context-kv-row .btn-context-add {
    flex: 0 0 100%;
    justify-content: center;
    padding: 7px 10px;
  }

  .context-term-input {
    font-size: 12px;
    padding: 6px 8px;
  }

  .viewer-pane-toolbar {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .filter-pills,
  #viewer-filter-buttons {
    flex-wrap: nowrap;
    min-width: 0;
  }

  .pill-label-full {
    display: none !important;
  }

  .pill-label-compact {
    display: inline !important;
  }

  .btn-live-share {
    padding: 5px 8px;
    margin-left: 0;
    flex-shrink: 0;
  }

  .btn-live-share span {
    display: none;
  }

  .screen-title,
  .session-title-wrap,
  .session-title-text {
    font-size: 14px;
    line-height: 1.25;
  }

  .session-title-input {
    font-size: 14px;
    min-width: 0;
    width: 100%;
  }

  .summary-tab-actions--transcript {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 16px;
  }

  .transcript-actions-spacer {
    display: none;
  }

  .session-audio-player {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    height: 62px;
    padding: 6px 8px;
  }

  .transcript-download-stack {
    display: none;
  }

  .session-audio-grid {
    grid-template-columns: auto 1fr auto;
  }

  .session-audio-seek {
    grid-column: 2 / 4;
  }

  .session-audio-downloads {
    display: flex;
    align-items: center;
    gap: 2px;
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
  }
}

@media (max-width: 400px) {
  .header-center h1 {
    font-size: 15px;
  }

  .header-center img {
    height: 22px;
  }

  .btn-toggle-config {
    font-size: 12px;
  }
}

/* ─── Advanced Settings link ──────────────────────────────────────────────── */

.advanced-settings-row {
  margin-top: 6px;
  margin-bottom: 20px;
  display: flex;
  justify-content: flex-end;
}

.btn-advanced-settings {
  background: none;
  border: none;
  color: var(--ntt-blue);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.btn-advanced-settings:hover {
  color: var(--ntt-blue-hover);
}

/* ─── Modal ───────────────────────────────────────────────────────────────── */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  width: 340px;
  max-width: 94vw;
  overflow: hidden;
}

.modal--wide {
  width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

#modal-config {
  align-items: flex-start;
  padding-top: 48px;
}

#modal-config.settings-mode-upload .settings-live-only {
  display: none !important;
}

#modal-config .modal-seg-ctrl {
  display: none;
}

#modal-config #modal-view-basic,
#modal-config #modal-view-extended {
  display: block !important;
}

.modal--wide .modal-body {
  overflow-y: auto;
  flex: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border-light);
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ntt-blue);
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.modal-close:hover {
  background: var(--border-light);
  color: var(--text-primary);
}

.modal-body {
  padding: 18px;
}

/* ─── Modal context section ───────────────────────────────────────────────── */

.preferred-langs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px 10px;
}

.pref-lang-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pref-lang-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.pref-lang-short {
  display: none;
}

.pref-lang-long {
  display: inline;
}

.pref-lang-select {
  width: 100%;
  font-size: 13px;
}

.modal-context-section {
  margin-bottom: 0;
}

.modal-context-section + .modal-context-section {
  margin-top: 20px;
}

.context-subsection {
  margin-bottom: 20px;
}

.context-subsection:last-child {
  margin-bottom: 0;
}

.context-sub-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
  margin-bottom: 4px;
}

.context-sub-title--heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  margin-bottom: 12px;
}

.context-sub-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  margin-top: -6px;
}

.context-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.context-term-input {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text-primary);
}
.context-term-input:focus {
  outline: none;
  border-color: var(--ntt-blue);
  box-shadow: 0 0 0 2px rgba(0, 114, 188, 0.15);
}

.context-kv-row {
  align-items: stretch;
}

.context-key-input {
  width: 130px;
  flex-shrink: 0;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text-primary);
}
.context-key-input:focus {
  outline: none;
  border-color: var(--ntt-blue);
  box-shadow: 0 0 0 2px rgba(0, 114, 188, 0.15);
}

.context-value-input {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text-primary);
}
.context-value-input:focus {
  outline: none;
  border-color: var(--ntt-blue);
  box-shadow: 0 0 0 2px rgba(0, 114, 188, 0.15);
}

.btn-context-add {
  padding: 7px 14px;
  border: 1px solid var(--ntt-blue);
  border-radius: var(--radius-sm);
  background: var(--ntt-blue);
  color: white;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}
.btn-context-add:hover {
  background: var(--ntt-blue-hover);
}

.context-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
}

.context-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 10px;
  background: var(--ntt-blue-light);
  border: 1px solid rgba(0, 114, 188, 0.2);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--ntt-blue);
  max-width: 100%;
}

.context-tag-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-tag-remove {
  background: none;
  border: none;
  color: var(--ntt-blue);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  opacity: 0.6;
  flex-shrink: 0;
}
.context-tag-remove:hover {
  opacity: 1;
}

/* ─── Context title row + info tooltip ───────────────────────────────────────── */

.context-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.context-title-row .context-sub-title--heading {
  margin-bottom: 0;
}

.context-info-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.context-info-icon {
  font-size: 13px;
  color: var(--text-secondary);
  cursor: default;
  line-height: 1;
  opacity: 0.7;
}

.context-info-tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 280px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  padding: 12px 14px;
  z-index: 1100;
  font-size: 12px;
  color: var(--text-primary);
}

.context-info-wrap:hover .context-info-tooltip {
  display: block;
}

.context-info-example {
  margin-bottom: 10px;
}

.context-info-example:last-child {
  margin-bottom: 0;
}

.context-info-example-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.context-info-kv {
  font-size: 11.5px;
  color: var(--text-primary);
  line-height: 1.6;
}

.context-info-kv span {
  font-weight: 700;
  color: var(--ntt-blue);
}

/* ─── General Context open text ──────────────────────────────────────────────── */

.context-text-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text-primary);
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.context-text-input:focus {
  outline: none;
  border-color: var(--ntt-blue);
  box-shadow: 0 0 0 2px rgba(0, 114, 188, 0.15);
}

.context-text-counter {
  text-align: right;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.context-text-counter--warn {
  color: #c0392b;
}

/* ─── Landing overlay ────────────────────────────────────────────────────────── */
.landing-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  flex-direction: column;
}
body.landing-mode .landing-overlay {
  display: flex;
}
body.landing-mode .app {
  display: none;
}
body.landing-mode #btn-toggle-config-landing {
  visibility: hidden;
}
body.landing-mode .host-mode-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--green-light);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 1px solid var(--green);
  white-space: nowrap;
}

.landing-header {
  padding: 0 24px;
  min-height: 56px;
}
.landing-header-center img {
  height: 28px;
  width: 28px;
}
.landing-header-center h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ntt-blue);
  margin: 0;
}

.landing-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.landing-key-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  min-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.landing-key-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.landing-card-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.landing-key-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.landing-key-input-wrap {
  flex: 1;
}

.landing-footer {
  text-align: left;
  padding: 14px 32px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ─── Viewer key gate ────────────────────────────────────────────────────────── */

.viewer-key-gate {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.viewer-key-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 480px) {
  .viewer-key-card {
    padding: 20px 16px;
  }
}

/* ─── Viewer key block — now rendered as .sdl-field inside .session-details-card ── */

/* ─── QR Code button (URL row) ───────────────────────────────────────────────── */

.btn-qr-url {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: none;
  border: none;
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  transition: background 0.1s, color 0.1s;
}

.btn-qr-url:hover {
  background: var(--border-light);
  color: var(--ntt-blue);
}

/* ─── QR Code modal (desktop) ────────────────────────────────────────────────── */

.modal--qr {
  width: 320px;
  max-width: 94vw;
}

.modal-body--qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px 18px 10px;
}

.qr-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}

.qr-canvas-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.qr-canvas-wrap img,
.qr-canvas-wrap canvas {
  display: block;
}

.qr-url-display {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono, monospace);
  text-align: center;
  word-break: break-all;
  max-width: 260px;
}

.modal-footer--qr {
  display: flex;
  justify-content: center;
  padding: 10px 18px 16px;
  border-top: 1px solid var(--border-light);
}

.btn-qr-close-bottom {
  padding: 8px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-white);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-qr-close-bottom:hover {
  border-color: var(--ntt-blue);
  color: var(--ntt-blue);
}

/* ─── QR Code overlay (mobile slide-in) ──────────────────────────────────────── */

.qr-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.45);
  align-items: flex-end;
  justify-content: center;
}

.qr-mobile-overlay.open {
  display: flex;
}

.qr-mobile-sheet {
  background: var(--bg-white);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 100vw;
  padding: 20px 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  animation: qr-slide-up 0.25s ease;
}

@keyframes qr-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.qr-mobile-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.qr-mobile-close:hover {
  background: var(--border-light);
  color: var(--text-primary);
}

.qr-mobile-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ntt-blue);
  margin-top: 4px;
}

.qr-mobile-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}

/* ─── Host empty-state subheading ───────────────────────────────────────────── */

.empty-state-subhead {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 8px;
  margin-bottom: 2px;
}

.empty-state-bullets--after {
  margin-top: 8px;
}

.host-empty-state {
  align-items: center;
  justify-content: flex-start;
  padding: 32px;
  overflow-y: auto;
}

.host-empty-state .empty-state-intro,
.host-empty-state .empty-state-subhead,
.host-empty-state .empty-state-bullets {
  align-self: center;
  width: 100%;
  max-width: 480px;
  text-align: left;
}

.empty-state-bullets--plain li::before {
  content: none;
}

.empty-state-bullets--plain {
  padding-left: 0;
  margin-top: 10px;
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
}

.empty-state-bullets--plain li {
  padding-left: 0;
}

@media (max-width: 600px) {
  .host-empty-state {
    padding: 16px;
  }
}

/* ─── Session end warning ────────────────────────────────────────────────────── */

.session-end-warning {
  display: none;
  color: var(--red);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 8px;
}

.session-end-warning.visible {
  display: block;
}

.session-id-display {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 11px;
}

.session-id-label {
  color: var(--text-muted, #888);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.session-id-value {
  color: var(--text-secondary, #555);
  font-family: monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.btn-session-id-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted, #888);
  border-radius: 3px;
  line-height: 1;
  transition: color 0.15s;
}

.btn-session-id-copy:hover {
  color: var(--ntt-blue);
}

.btn-session-id-copy.copied {
  color: var(--green);
}

/* ─── Session log viewer modal ───────────────────────────────────────────────── */

.modal--log {
  width: 95vw;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal--log .modal-body--log {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  padding: 0;
}

.log-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 16px 4px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.log-filename {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: monospace;
  letter-spacing: 0.02em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-sizer-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.log-size-slider {
  width: 72px;
}

.log-viewer {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0;
  padding: 12px 16px;
  font-family: "SFMono-Regular", "Consolas", "Menlo", monospace;
  font-size: var(--log-font-size, 11.5px);
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-all;
  background: var(--bg-white);
}

.log-level-display--clickable {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.log-level-display--clickable:hover {
  color: var(--ntt-blue);
}

/* ─── Utterance cards (Lingo Audio lane pipeline) ─────────────────────────── */

.utt-card {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.2s;
}

.utt-card.tts-playing {
  background: var(--ntt-blue-light);
  border-left: 3px solid var(--ntt-blue);
  padding-left: 11px;
}

.utt-row {
  margin-top: 4px;
  line-height: 1.5;
  font-size: var(--transcript-font-size, 15px);
}

.utt-row--original {
  color: var(--text-secondary);
  font-size: calc(var(--transcript-font-size, 15px) * 0.88);
}

.utt-original-text {
  color: var(--text-secondary);
}

.partial {
  color: var(--text-secondary);
  opacity: 0.6;
  font-style: italic;
}

.row-label {
  font-size: 0.78em;
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 4px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.row-label--lang {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--ntt-blue);
}

/* ─── Filter pills (host transcript toolbar) ──────────────────────────────── */

.transcript-toolbar {
  display: none;
}

.filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pill {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-white);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.pill.active, .pill:hover {
  background: var(--ntt-blue);
  color: #fff;
  border-color: var(--ntt-blue);
}

.pill-label-compact {
  display: none;
}

/* ─── Audio toggle button ─────────────────────────────────────────────────── */

.audio-toggle-btn {
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-white);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.audio-toggle-btn--active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.audio-toggle-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ─── Raw log modal ───────────────────────────────────────────────────────── */

.rawlog-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rawlog-modal.hidden {
  display: none !important;
}

.rawlog-box {
  background: #1e1e2e;
  color: #cdd6f4;
  border-radius: var(--radius);
  width: min(96vw, 96vw);
  height: min(92vh, 92vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.rawlog-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #181825;
  border-bottom: 1px solid #313244;
  font-size: 13px;
  font-weight: 600;
  color: #cdd6f4;
  flex-shrink: 0;
}

.cert-fail-banner {
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  gap: 12px;
  padding: 10px 40px;
  background: #fab387;
  color: #1e1e2e;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  border-bottom: 1px solid #e64553;
  flex-shrink: 0;
}

.cert-fail-banner-text {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.cert-fail-banner-dismiss {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #1e1e2e;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.75;
}

.cert-fail-banner-dismiss:hover {
  opacity: 1;
}

.rawlog-filters {
  display: flex;
  gap: 4px;
  margin-left: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.rawlog-filter-btn {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid #45475a;
  background: transparent;
  color: #6c7086;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.rawlog-filter-btn.active {
  background: var(--ntt-blue);
  color: #fff;
  border-color: var(--ntt-blue);
}

.rawlog-filter-sep {
  width: 1px;
  background: #45475a;
  align-self: stretch;
  margin: 0 4px;
}

.rawlog-regex {
  flex: 1;
  min-width: 0;
  background: #313244;
  border: 1px solid #45475a;
  border-radius: var(--radius-sm);
  color: #cdd6f4;
  font-size: 12px;
  padding: 3px 7px;
  font-family: "SFMono-Regular", "Consolas", monospace;
}

.rawlog-regex::placeholder { color: #6c7086; }

.rawlog-sort {
  background: #313244;
  border: 1px solid #45475a;
  border-radius: var(--radius-sm);
  color: #cdd6f4;
  font-size: 12px;
  padding: 3px 7px;
  cursor: pointer;
  flex-shrink: 0;
}

.rawlog-header button {
  background: none;
  border: none;
  color: #6c7086;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: color 0.12s;
}

.rawlog-header button:hover { color: #cdd6f4; }

.rawlog-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  margin: 0;
  padding: 10px 14px;
  font-family: "SFMono-Regular", "Consolas", "Menlo", monospace;
  font-size: 11.5px;
  line-height: 1.55;
  color: #cdd6f4;
  white-space: pre;
  word-break: normal;
  background: #1e1e2e;
}

.raw-log-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-white);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.raw-log-btn:hover {
  background: var(--ntt-blue-light);
  color: var(--ntt-blue);
  border-color: var(--ntt-blue);
}

/* ─── Summarizing modal ───────────────────────────────────────────────────── */

.modal--summarizing {
  width: 280px;
}

.modal-body--summarizing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 18px;
  text-align: center;
}

.summarizing-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.summarizing-text--error {
  color: #c0392b;
}

.summarizing-hint {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

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

.arcs-demo {
  position: relative;
  width: 40px;
  height: 40px;
}

.arc-demo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  animation: arc-spin-anim linear infinite;
}

.arc-demo--outer  { border-top-color: var(--ntt-blue); animation-duration: 1.0s; }
.arc-demo--middle { inset: 6px; border-top-color: var(--ntt-blue); opacity: 0.6; animation-duration: 1.4s; animation-direction: reverse; }
.arc-demo--inner  { inset: 12px; border-top-color: var(--ntt-blue); opacity: 0.35; animation-duration: 0.7s; }



/* ─── 5-Screen redesign additions (v080606) ────────────────────────────────── */

/* Screen container */

.app-screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Screen 4 is the full live layout — same as current .main */
.screen-live-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* Screen card (Screens 2, 3, 5) */

.screen-card {
  max-width: 560px;
  width: 100%;
  margin: 40px auto;
  padding: 32px 36px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.config-screen-inner {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.config-walkthroughs {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(180px, calc(100% - 24px));
  margin: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-white);
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
}

.config-walkthroughs-expanded {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.config-walkthroughs-title-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding-right: 22px;
}

.config-walkthroughs-heading {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.config-walkthroughs-collapse {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.config-walkthroughs-collapse:hover,
.config-walkthroughs-collapse:focus-visible {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
  outline: none;
}

.config-walkthroughs-expand {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.config-walkthroughs-expand:hover,
.config-walkthroughs-expand:focus-visible {
  background: var(--ntt-blue-light);
  color: var(--ntt-blue);
  outline: none;
}

.config-walkthroughs-expand-icon {
  display: block;
  flex-shrink: 0;
}

.config-walkthroughs--collapsed {
  width: auto;
  min-width: 0;
  padding: 6px;
  gap: 0;
}

.config-walkthroughs--collapsed .config-walkthroughs-expanded,
.config-walkthroughs--collapsed .config-walkthroughs-collapse {
  display: none;
}

.config-walkthroughs--collapsed .config-walkthroughs-expand {
  display: inline-flex;
}

.config-walkthroughs-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.btn-tour-menu {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ntt-blue);
  cursor: pointer;
  font-family: var(--font-body);
  box-sizing: border-box;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.btn-tour-menu:hover,
.btn-tour-menu:focus-visible {
  background: var(--ntt-blue-light);
  border-color: var(--ntt-blue);
  color: var(--ntt-blue);
  box-shadow: 0 0 0 3px rgba(0, 114, 188, 0.14);
  outline: none;
}

.btn-tour-menu:active {
  transform: translateY(1px);
}

.btn-tour-menu-label,
.btn-how-to-lingo-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#btn-tour-new-features .btn-tour-menu-label,
.btn-tour-menu--emphasis .btn-tour-menu-label {
  font-weight: 700;
}

.config-cards {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 16px;
  max-width: 960px;
  width: 100%;
  margin: 12px auto 0;
  padding: 0 12px;
  box-sizing: border-box;
}

.screen-card--config {
  margin: 0;
  max-width: none;
  flex: 1 1 320px;
  min-width: 0;
  padding: 18px 20px;
  gap: 12px;
}

.screen-card--config .screen-actions {
  margin-top: auto;
  width: 100%;
}

@media (max-width: 1100px) {
  .config-walkthroughs {
    display: none !important;
  }
}

@media (max-width: 700px) {
  .config-cards {
    flex-direction: column;
    max-width: 560px;
    margin-top: 12px;
  }

  .screen-card--config {
    flex: 1 1 auto;
  }
}

.host-sessions {
  max-width: 960px;
  width: 100%;
  margin: 24px auto 40px;
  padding: 0 12px 8px;
  box-sizing: border-box;
}

.host-sessions-card.screen-card {
  margin: 0;
  max-width: none;
  width: 100%;
  padding: 18px 20px;
  gap: 12px;
}

.host-sessions-heading {
  margin: 0;
}

.host-sessions-blurb {
  margin: -4px 0 0;
}

.host-sessions-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.host-sessions-empty {
  padding: 14px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
}

.host-sessions-empty p {
  margin: 0;
}

.host-sessions-unavailable {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
}

.host-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.host-session-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.host-session-row:hover {
  border-color: var(--ntt-blue);
  box-shadow: 0 1px 6px rgba(0, 114, 188, 0.1);
}

.host-session-row-main {
  flex: 1 1 180px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.host-session-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.host-session-title {
  font-size: 14px;
  font-weight: 650;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.host-session-rename {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.host-session-rename:hover {
  color: var(--ntt-blue);
  background: var(--ntt-blue-light);
}

.host-session-rename-input {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 650;
  padding: 2px 6px;
}

.host-session-delete {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-panel);
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.host-session-delete:hover {
  color: var(--red, #c0392b);
  border-color: var(--red, #c0392b);
  background: #fff5f5;
}

body.history-mode #btn-edit-summary,
body.history-mode #btn-name-speakers,
body.history-mode #chat-input,
body.history-mode #btn-chat-send,
body.history-mode .chat-starter-btn,
body.history-mode #transcript-view-wrap,
body.history-mode #summary-dirty-banner {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.host-session-meta {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.35;
}

.host-session-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.host-session-badge--live {
  background: var(--ntt-blue-light);
  color: var(--ntt-blue);
}

.host-session-badge--recorded {
  background: var(--green-light);
  color: var(--green-hover);
}

.host-session-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.host-session-no-audio {
  font-size: 11px;
  font-weight: 500;
  color: var(--amber-muted);
}

.history-readonly-banner {
  display: none;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ntt-blue);
  background: var(--ntt-blue-light);
  color: var(--ntt-blue-hover);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.history-audio-warning {
  display: none;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--amber);
  background: var(--amber-light);
  color: var(--amber-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

body.history-mode .history-mode-disabled,
.history-mode .history-mode-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

@media (max-width: 700px) {
  .host-sessions {
    max-width: 560px;
  }
}

.config-card-blurb {
  margin: -8px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.45;
}

.config-card-note {
  margin: -6px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
}

.upload-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-file-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-panel);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.btn-file-pick:hover {
  border-color: var(--ntt-blue);
  color: var(--ntt-blue);
}

.upload-file-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.upload-formats-hint {
  margin: -8px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
}

.screen-card--summary {
  max-width: 1000px;
  min-height: 50vh;
  padding: 16px 18px;
  gap: 8px;
}

.screen-summary-layout {
  overflow-y: auto;
}

.summary-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.summary-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-scroll-area {
  flex: 1;
  overflow-y: auto;
  min-height: 240px;
  max-height: calc(100vh - 320px);
  padding-right: 12px;
}

.screen-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

/* Screen actions row */

.screen-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.screen-actions--summary {
  justify-content: flex-start;
}

.screen-actions--centered {
  justify-content: center;
}

/* Config summary card (Screen 3) */

.screen-card--share {
  gap: 10px;
}

.share-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.share-title-row .session-id-display {
  margin-bottom: 0;
  flex-shrink: 0;
}

.share-qr-hint {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.share-qr-centered {
  display: flex;
  justify-content: center;
}

.share-qr-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.share-copy-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-copy-stack .btn-sdl-action {
  width: 120px;
}

.config-summary-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.config-summary-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.config-summary-label {
  font-weight: 700;
  color: var(--text-primary);
  min-width: 120px;
  font-size: 12px;
}

.config-summary-value {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.config-summary-row--pills {
  align-items: center;
}

.config-summary-value--pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.config-summary-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--ntt-blue-light);
  border: 1px solid rgba(0, 114, 188, 0.2);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--ntt-blue);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Share details (Screen 3) */

.share-details {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.share-details-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Back to Config button (Screen 3) */

.btn-back-config {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s;
}

.btn-back-config:hover {
  border-color: var(--ntt-blue);
  color: var(--ntt-blue);
}

/* New Session button (Screen 5) */

.btn-new-session {
  padding: 10px 24px;
  background: var(--ntt-blue);
  border: none;
  border-radius: var(--radius-pill);
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s;
}

.btn-new-session:hover {
  background: var(--ntt-blue-hover);
}

/* Live controls bar (Screen 4 top) */

.live-controls-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.live-controls-left {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.live-controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.live-config-summary {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Summary screen (Screen 5) */

.summary-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
}

.summary-meta-badge {
  background: var(--ntt-blue-light);
  color: var(--ntt-blue);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
}

.summary-duration,
.summary-when {
  font-size: 11px;
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color: #b0b0b0;
  line-height: 1.2;
}

.summary-when {
  text-align: left;
  white-space: nowrap;
}

.summary-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
}

.summary-tab {
  padding: 8px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s;
}

.summary-tab.active {
  color: var(--ntt-blue);
  border-bottom-color: var(--ntt-blue);
}

.summary-tab-panel {
  min-height: 280px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.summary-transcript {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 0;
}

.committed-block {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.committed-block.is-playing .utt-orig,
.committed-block.is-playing .utt-trans {
  color: var(--green);
}
.committed-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.utt-speaker {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 2px;
  letter-spacing: 0.3px;
}

body.viewer-mode .host-only {
  display: none !important;
}

.utt-orig {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 4px;
}

.utt-lang-tag {
  color: var(--ntt-blue);
  font-weight: 600;
  font-size: 13px;
  margin-right: 4px;
}

.utt-trans {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.6;
  margin-top: 2px;
  margin-bottom: 2px;
}

.summary-no-transcript,
.summary-error {
  padding: 32px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.finalize-banner {
  background: var(--ntt-blue-light);
  color: var(--ntt-blue);
  padding: 10px 14px;
  text-align: center;
  font-size: 13px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
}

.finalize-error {
  background: var(--red-light);
  color: var(--red);
  padding: 10px 14px;
  text-align: center;
  font-size: 13px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
}

.summary-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px;
}

.summary-content {
  padding: 0 10px 0;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--text-primary);
  line-height: 1.7;
}
.summary-content h1,
.summary-content h2,
.summary-content h3 {
  font-weight: 700;
  color: var(--text-primary);
  margin: 16px 0 6px;
}
.summary-content h1 { font-size: 18px; }
.summary-content h2 { font-size: 16px; }
.summary-content h3 { font-size: 14px; }
.summary-content p  { margin: 0 0 10px; }
.summary-content ul,
.summary-content ol {
  padding-left: 20px;
  margin: 0 0 10px;
}
.summary-content li { margin-bottom: 4px; }
.summary-content strong { font-weight: 700; }
.summary-content em { font-style: italic; }

.summary-footnote {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  font-size: 11px;
  color: var(--text-secondary);
}

.app-footer {
  flex-shrink: 0;
}

.btn-live-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-white);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  margin-left: auto;
}

.btn-live-share:hover {
  border-color: var(--ntt-blue);
  color: var(--ntt-blue);
}

body.viewer-mode .btn-live-share {
  display: none;
}

.modal--live-share {
  max-width: 420px;
  width: 90%;
}

.modal-body--live-share {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px;
}

.screen-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-edit-settings {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s;
}

.btn-edit-settings:hover {
  border-color: var(--ntt-blue);
  color: var(--ntt-blue);
}

body.viewer-mode #btn-new-session,
body.viewer-mode #finalize-banner,
body.viewer-mode #finalize-error {
  display: none;
}

.transcript-view-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-right: auto;
}

.transcript-view-select {
  font-family: var(--font-body);
  font-size: 13px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--text-primary);
}

.transcript-view-busy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.transcript-view-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--ntt-blue);
  border-radius: 50%;
  animation: transcript-view-spin 0.7s linear infinite;
}

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

#summary-transcript-body.transcript-view-dim {
  opacity: 0.45;
  pointer-events: none;
}

.summary-tab-actions--transcript {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: relative;
  overflow: visible;
  padding-top: 28px;
}

.transcript-actions-spacer {
  min-width: 0;
}

.transcript-download-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  justify-self: start;
}

.transcript-edit-hint {
  font-size: 11px;
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color: #b0b0b0;
  text-align: center;
  line-height: 1.2;
  padding: 2px 0 2px;
  margin: 0;
}

.transcript-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0 8px;
}

.transcript-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.btn-utt-time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--ntt-blue);
  padding: 4px;
  cursor: pointer;
}

.btn-utt-time.is-off {
  color: var(--text-secondary);
}

.btn-utt-time:hover {
  opacity: 0.8;
}

.utt-time {
  font-size: 11px;
  font-weight: 500;
  color: #b0b0b0;
  margin-right: 6px;
}

body.hide-utt-times .utt-time {
  display: none;
}

body.hide-utt-langs .utt-lang-tag {
  display: none;
}

.utt-speaker-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.utt-speaker-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  cursor: pointer;
}

.utt-speaker-pencil {
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--text-secondary);
  padding: 0;
  cursor: pointer;
  line-height: 1;
}

.utt-speaker-wrap:not(.is-editing):hover .utt-speaker-pencil {
  display: inline-flex;
}

.utt-speaker-wrap.is-editing .utt-speaker-chip,
.utt-speaker-wrap.is-editing .utt-speaker-pencil {
  display: none;
}

.utt-speaker-pencil:hover {
  color: var(--ntt-blue);
}

.utt-speaker-edit {
  display: none;
  align-items: center;
  gap: 6px;
}

.utt-speaker-wrap.is-editing .utt-speaker-edit {
  display: inline-flex;
}

.utt-speaker-select {
  font-family: var(--font-body);
  font-size: 12px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.utt-speaker-commit {
  border: none;
  background: none;
  color: var(--green);
  padding: 0 2px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.summary-dirty-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--amber-light);
  color: var(--amber-muted);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin: 10px 0 0;
}

.summary-dirty-actions {
  display: flex;
  gap: 8px;
}

.screen-card--progress {
  max-width: 480px;
  margin-top: 11vh;
  padding: 36px 38px;
}

.screen-card--progress .screen-title {
  font-size: 22px;
  margin-bottom: 0;
}

.progress-subtitle {
  margin: -8px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
  min-height: 1.2em;
}

.progress-overall {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 4px;
}

.progress-overall-track {
  flex: 1;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--border-light);
  overflow: hidden;
}

.progress-overall-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  background: var(--ntt-blue);
  transition: width 0.25s ease;
}

.progress-overall-pct {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--ntt-blue);
  font-variant-numeric: tabular-nums;
  min-width: 36px;
  text-align: right;
}

.progress-steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.progress--live .progress-step--upload {
  display: none;
}

.progress--upload .progress-step--upload {
  display: flex;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
}

.progress-step-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-error-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.progress-error-row .host-key-error {
  display: block;
}

.progress-step.is-pending,
.progress-step.is-skipped {
  color: var(--text-secondary);
}

.progress-step-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  position: relative;
}

.progress-step-loader,
.progress-step-mark {
  position: absolute;
  inset: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.progress-step-loader {
  opacity: 0;
  transform: scale(0.86);
}

.progress-step-loader .arc-demo {
  pointer-events: none;
}

.progress-step-mark {
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  opacity: 1;
}

.progress-step.is-pending .progress-step-mark,
.progress-step.is-skipped .progress-step-mark {
  border-color: #c5c5c5;
  background: transparent;
}

.progress-step.is-pending .progress-step-mark::before,
.progress-step.is-pending .progress-step-mark::after,
.progress-step.is-skipped .progress-step-mark::before,
.progress-step.is-skipped .progress-step-mark::after {
  content: none;
}

.progress-step.is-running .progress-step-loader {
  opacity: 1;
  transform: scale(1);
}

.progress-step.is-running .progress-step-mark {
  opacity: 0;
  transform: scale(0.7);
}

.progress-step.is-done .progress-step-loader,
.progress-step.is-error .progress-step-loader {
  opacity: 0;
  transform: scale(0.7);
}

.progress-step.is-done .progress-step-mark {
  border-color: var(--green);
  background: var(--green);
}

.progress-step.is-done .progress-step-mark::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 6px;
  width: 7px;
  height: 13px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.progress-step.is-error .progress-step-mark {
  border-color: var(--red);
  background: var(--red);
}

.progress-step.is-error .progress-step-mark::before,
.progress-step.is-error .progress-step-mark::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 8px;
  width: 2px;
  height: 14px;
  background: #fff;
}

.progress-step.is-error .progress-step-mark::before { transform: rotate(45deg); }
.progress-step.is-error .progress-step-mark::after { transform: rotate(-45deg); }

.progress-step.is-skipped .progress-step-icon {
  opacity: 0.4;
}

.modal--name-speakers {
  width: min(780px, 96vw);
  max-width: 96vw;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

#modal-speaker-confirm.modal-backdrop,
#modal-speaker-confirm.modal-backdrop.open {
  z-index: 1200;
}

.btn-name-speakers-reset {
  border: none;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
}

.btn-name-speakers-reset:hover {
  color: var(--ntt-blue);
}

.name-speakers-table-wrap {
  overflow-x: auto;
}

.name-speakers-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 13px;
}

.name-speakers-table th:nth-child(1),
.name-speakers-table td:nth-child(1) { width: 88px; }
.name-speakers-table th:nth-child(2),
.name-speakers-table td:nth-child(2) { width: 120px; }
.name-speakers-table th:nth-child(3),
.name-speakers-table td:nth-child(3) { width: 140px; }
.name-speakers-table th:nth-child(4),
.name-speakers-table td:nth-child(4) { width: 130px; }
.name-speakers-table th:nth-child(5),
.name-speakers-table td:nth-child(5) { width: 72px; }
.name-speakers-table th:nth-child(6),
.name-speakers-table td:nth-child(6) { width: 72px; }

.name-speakers-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 8px 12px 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.name-speakers-table td {
  padding: 10px 12px 10px 0;
  vertical-align: middle;
  color: var(--text-primary);
}

.name-speakers-table .name-speaker-id {
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

.name-speakers-table .name-speaker-detected {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name-speaker-input {
  font-family: var(--font-body);
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 100%;
  box-sizing: border-box;
}

.name-speaker-merge-sel {
  width: 100%;
  max-width: 100%;
}

.name-speakers-col-action {
  text-align: left;
}

.name-speakers-table .btn-action-secondary {
  white-space: nowrap;
}

.name-speakers-msg {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.modal-footer--name-speakers {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-footer-spacer {
  flex: 1;
}

.modal--confirm {
  max-width: 420px;
}

.session-audio-player {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: 0;
  width: 500px;
  height: 70px;
  max-width: 100%;
  flex: 0 0 500px;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 8px 12px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.session-audio-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 6px;
  align-items: center;
  height: 100%;
}

.session-audio-time {
  grid-column: 1;
  grid-row: 1;
}

.session-audio-seek {
  grid-column: 2;
  grid-row: 1;
}

.session-audio-rate {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
}

.session-audio-transport {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  height: 28px;
}

.session-audio-transport .session-audio-btn {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

#session-audio-back { left: 25%; }
#session-audio-play { left: 50%; }
#session-audio-fwd { left: 75%; }

.session-audio-downloads {
  display: none;
}

.session-audio-dl-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  color: var(--ntt-blue);
  padding: 0;
  cursor: pointer;
}

.session-audio-dl-icon:disabled,
.session-audio-dl-icon.disabled {
  opacity: 0.35;
  cursor: default;
}

.session-audio-time {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ntt-blue);
  min-width: 64px;
}

.session-audio-seek {
  flex: 1;
  accent-color: var(--ntt-blue);
  height: 4px;
}

.session-audio-rate {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  color: var(--ntt-blue);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 114, 188, 0.28);
  border-radius: var(--radius-pill);
  padding: 3px 6px;
}

.session-audio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  background: transparent;
  color: var(--ntt-blue);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
}

.session-audio-btn--play {
  width: 28px;
  height: 28px;
  background: var(--ntt-blue);
  color: #fff;
}

.session-audio-btn:disabled,
.session-audio-dl:disabled,
.session-audio-rate:disabled,
.session-audio-seek:disabled {
  opacity: 0.4;
  cursor: default;
}

.session-audio-btn--play:hover:not(:disabled) {
  background: var(--ntt-blue-hover);
}

.session-audio-skip-lbl {
  font-size: 9px;
  font-weight: 700;
}

.session-audio-dl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: var(--ntt-blue);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
}

.btn-action-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body.viewer-mode .live-controls-bar {
  display: none;
}

body.host-mode #viewer-filter-buttons {
  display: none;
}

body.viewer-mode #filter-pills {
  display: none;
}

body.host-mode #btn-download-mobile,
body.host-mode #btn-summarize-mobile {
  display: none;
}

.modal-seg-ctrl {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 3px;
  width: fit-content;
  margin-bottom: 16px;
}

.modal-seg-ctrl--compact {
  margin-bottom: 0;
  margin-left: auto;
  margin-right: 12px;
}

.modal-seg-ctrl--compact .modal-seg-btn {
  padding: 3px 10px;
  font-size: 11px;
}

.modal-seg-btn {
  padding: 6px 18px;
  border: none;
  border-radius: var(--radius-pill);
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s;
}

.modal-seg-btn.active {
  background: var(--ntt-blue);
  color: white;
}

/* ─── Summary tab action bar ──────────────────────────────────────────────── */

.summary-tab-actions {
  display: flex;
  gap: 8px;
  padding: 12px 0 0;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
  flex-wrap: wrap;
}

#panel-summary .summary-tab-actions {
  justify-content: space-between;
}

#panel-summary .summary-tab-actions #btn-summarize {
  margin-left: auto;
}

.btn-action-secondary {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-white);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-action-secondary:hover:not(:disabled) {
  background: var(--ntt-blue-light);
  color: var(--ntt-blue);
  border-color: var(--ntt-blue);
}
.btn-action-secondary.disabled,
.btn-action-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ─── Chat panel ──────────────────────────────────────────────────────────── */

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.chat-empty-state {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  padding: 48px 20px;
}

.chat-bubble {
  max-width: 80%;
  padding: 8px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-bubble--user {
  align-self: flex-end;
  background: var(--ntt-blue);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-bubble--assistant {
  align-self: flex-start;
  background: var(--bg-panel);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-bottom-left-radius: 4px;
}
.chat-bubble--typing {
  align-self: flex-start;
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-bottom-left-radius: 4px;
  padding: 10px 16px;
}

.typing-dots span {
  display: inline-block;
  animation: typing-blink 1.2s infinite;
  font-size: 18px;
  line-height: 1;
  color: var(--text-secondary);
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-blink {
  0%, 80%, 100% { opacity: 0.2; }
  40%           { opacity: 1; }
}

.chat-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
  resize: none;
  line-height: 1.5;
  overflow-y: auto;
  color: var(--text-primary);
}
.chat-input:focus {
  outline: none;
  border-color: var(--ntt-blue);
}

.btn-chat-send {
  padding: 8px 18px;
  background: var(--ntt-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.btn-chat-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ─── Summary template tiles ──────────────────────────────────────────────── */

.summary-template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.summary-tpl-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-white);
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 0.15s, background 0.15s;
}

.summary-tpl-star {
  position: absolute;
  top: 6px;
  right: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  color: var(--text-secondary);
  opacity: 0.4;
  padding: 0;
  transition: opacity 0.15s, color 0.15s;
}

.summary-tpl-info {
  position: absolute;
  top: 24px;
  right: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--text-secondary);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  line-height: 12px;
  text-align: center;
  opacity: 0.45;
  cursor: pointer;
  background: var(--bg-white);
}
.summary-tpl-star:hover,
.summary-tpl-star.starred {
  opacity: 1;
  color: #f59e0b;
}
.summary-tpl-info:hover {
  opacity: 1;
  color: var(--ntt-blue);
  border-color: var(--ntt-blue);
}
.summary-tpl-tile:hover {
  background: var(--ntt-blue-light);
  border-color: var(--ntt-blue);
}
.summary-tpl-tile.active {
  background: var(--ntt-blue-light);
  border-color: var(--ntt-blue);
}

.summary-tpl-icon {
  font-size: 22px;
  line-height: 1;
}

.summary-tpl-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.3;
}
.summary-tpl-tile.active .summary-tpl-name {
  color: var(--ntt-blue);
}

.summary-tpl-custom-input {
  width: 100%;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-body);
  resize: vertical;
  color: var(--text-primary);
  box-sizing: border-box;
  min-height: 100px;
}

/* ─── Summary length slider row ───────────────────────────────────────────── */

.summary-length-wrap {
  margin-top: 8px;
  width: 100%;
}

.summary-length-slider {
  display: block;
  width: calc(100% - 56px);
  margin: 0 28px;
  padding: 0;
  accent-color: var(--ntt-blue);
  cursor: pointer;
}

.summary-length-ticks {
  display: flex;
  justify-content: space-between;
  width: calc(100% - 20px);
  box-sizing: border-box;
  margin: 6px 10px 0;
  padding: 0;
}

.summary-length-tick-label {
  flex: 1;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.summary-length-tick-label:first-child {
  text-align: left;
}

.summary-length-tick-label:nth-child(2) {
  text-align: center;
}

.summary-length-tick-label:last-child {
  text-align: right;
}

.summary-length-tick-label--active {
  color: var(--ntt-blue);
  font-weight: 700;
}

/* ─── Modal footer (shared) ───────────────────────────────────────────────── */

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px 14px;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

.btn.btn-primary {
  padding: 7px 20px;
  background: var(--ntt-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn.btn-primary:hover { opacity: 0.88; }

.btn.btn-secondary {
  padding: 7px 20px;
  background: var(--bg-white);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
}
.btn.btn-secondary:hover {
  background: var(--ntt-blue-light);
  color: var(--ntt-blue);
  border-color: var(--ntt-blue);
}

/* ─── Edit Summary & Translate modals ─────────────────────────────────────── */

.modal--edit-summary {
  width: 560px;
  max-height: 92vh;
}

.modal--tpl-info {
  width: 520px;
  max-width: 94vw;
  overflow: visible;
}

.modal-body--tpl-info {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-primary);
  padding: 10px 18px 16px;
  overflow: visible;
}

.modal-body--tpl-info h1,
.modal-body--tpl-info h2,
.modal-body--tpl-info h3 {
  font-size: 15px;
  margin: 0 0 8px;
}

.modal-body--tpl-info p {
  margin: 0 0 8px;
}

.modal-body--tpl-info p:first-child {
  margin-top: 0;
}

.modal-body--tpl-info ul {
  margin: 0;
  padding-left: 18px;
}

.modal-body--tpl-info li {
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}

.session-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.session-title-text {
  cursor: pointer;
}

.session-title-pencil {
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--text-secondary);
  padding: 0;
  cursor: pointer;
  line-height: 1;
}

.session-title-wrap:not(.is-editing):hover .session-title-pencil {
  display: inline-flex;
}

.session-title-wrap.is-editing .session-title-text,
.session-title-wrap.is-editing .session-title-pencil {
  display: none;
}

.session-title-edit {
  display: none;
  align-items: center;
  gap: 6px;
}

.session-title-wrap.is-editing .session-title-edit {
  display: inline-flex;
}

.session-title-input {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 180px;
}

.session-title-commit {
  border: none;
  background: none;
  color: var(--green);
  padding: 0 2px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.chat-starters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.chat-starter-btn {
  padding: 6px 12px;
  background: var(--bg-white);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
}

.chat-starter-btn:hover {
  background: var(--ntt-blue-light);
  color: var(--ntt-blue);
  border-color: var(--ntt-blue);
}

.modal--translate {
  width: 360px;
}

/* ─── Test transcript textarea ────────────────────────────────────────────── */

.test-transcript-textarea {
  width: 100%;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: var(--font-body);
  resize: vertical;
  color: var(--text-primary);
  box-sizing: border-box;
  min-height: 120px;
}

@media (max-width: 768px) {
  .transcript-download-stack {
    display: none !important;
  }

  .session-audio-downloads {
    display: flex !important;
    align-items: center;
    gap: 2px;
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
  }

  .session-audio-grid {
    grid-template-columns: auto 1fr auto;
  }

  .session-audio-seek {
    grid-column: 2 / 4;
  }

  .btn-new-session {
    padding: 5px 12px;
    font-size: 12px;
  }

  .summary-meta {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
  }

  .summary-when {
    text-align: right;
  }
}

/* ─── Driver.js — NTT tour theme ─────────────────────────────────────────── */

.driver-overlay {
  z-index: 10050 !important;
}

.driver-active-element,
.driver-active-element * {
  z-index: 10051;
}

.driver-popover.lingo-driver-theme {
  z-index: 10060 !important;
  background: var(--bg-white);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(0, 114, 188, 0.08),
    0 12px 40px rgba(0, 40, 80, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 18px 20px 14px;
  min-width: 400px;
  max-width: 400px;
  width: 400px;
  box-sizing: border-box;
  font-family: var(--font-body);
}

.driver-popover.lingo-driver-theme * {
  font-family: var(--font-body);
}

.driver-popover.lingo-driver-theme .driver-popover-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ntt-blue);
  padding-right: 36px;
}

.driver-popover.lingo-driver-theme .driver-popover-description {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-top: 8px;
}

.driver-popover.lingo-driver-theme .driver-popover-description p {
  margin: 0 0 0.65em;
  line-height: 1.6;
}

.driver-popover.lingo-driver-theme .driver-popover-description p:last-child {
  margin-bottom: 0;
}

.driver-popover.lingo-driver-theme .driver-popover-description ul,
.driver-popover.lingo-driver-theme .driver-popover-description ol {
  margin: 0.35em 0 0.65em;
  padding-left: 1.25em;
  line-height: 1.6;
}

.driver-popover.lingo-driver-theme .driver-popover-description br {
  content: "";
  display: block;
  margin-top: 0.35em;
}

.driver-popover.lingo-driver-theme .driver-popover-close-btn {
  color: #a0a8b0;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 18px;
  line-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.driver-popover.lingo-driver-theme .driver-popover-close-btn:hover,
.driver-popover.lingo-driver-theme .driver-popover-close-btn:focus {
  color: var(--ntt-blue);
  background: var(--ntt-blue-light);
}

.driver-popover.lingo-driver-theme .driver-popover-footer {
  margin-top: 14px;
  gap: 8px;
}

.driver-popover.lingo-driver-theme .driver-popover-progress-text {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.driver-popover.lingo-driver-theme .driver-popover-footer button {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-white);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  text-shadow: none;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.driver-popover.lingo-driver-theme .driver-popover-footer button:hover,
.driver-popover.lingo-driver-theme .driver-popover-footer button:focus {
  background: var(--ntt-blue-light);
  border-color: var(--ntt-blue);
  color: var(--ntt-blue);
}

.driver-popover.lingo-driver-theme .driver-popover-next-btn {
  background: var(--ntt-blue);
  border-color: var(--ntt-blue);
  color: #fff;
}

.driver-popover.lingo-driver-theme .driver-popover-next-btn:hover,
.driver-popover.lingo-driver-theme .driver-popover-next-btn:focus {
  background: var(--ntt-blue-hover);
  border-color: var(--ntt-blue-hover);
  color: #fff;
}

.driver-popover.lingo-driver-theme .driver-popover-arrow-side-left {
  border-left-color: var(--bg-white);
}

.driver-popover.lingo-driver-theme .driver-popover-arrow-side-right {
  border-right-color: var(--bg-white);
}

.driver-popover.lingo-driver-theme .driver-popover-arrow-side-top {
  border-top-color: var(--bg-white);
}

.driver-popover.lingo-driver-theme .driver-popover-arrow-side-bottom {
  border-bottom-color: var(--bg-white);
}

.driver-active .driver-active-element {
  position: relative;
  z-index: 10052 !important;
  isolation: isolate;
  outline: none;
  border: none;
  box-shadow: none;
  border-radius: 8px;
}

@media (max-width: 480px) {
  .driver-popover.lingo-driver-theme {
    min-width: 0;
    max-width: calc(100vw - 32px);
    width: calc(100vw - 32px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .driver-fade .driver-overlay,
  .driver-fade .driver-popover {
    animation: none !important;
  }

  .driver-popover.lingo-driver-theme .driver-popover-footer button {
    transition: none;
  }

  .btn-tour-menu {
    transition: none;
  }

  .btn-tour-menu:active {
    transform: none;
  }
}

.tour-demo-stage {
  width: 100%;
}

.tour-demo-speaker {
  margin-bottom: 6px;
}

#tour-stage-live .btn-pause-session,
#tour-stage-live .btn-resume-session,
#tour-stage-live .btn-stop-session {
  display: inline-flex;
}

#tour-demo-summary-content {
  display: block;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-primary);
  white-space: pre-wrap;
}

#tour-demo-filter-pills .viewer-pane-label {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 4px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

#tour-demo-session-audio-back { left: 25%; }
#tour-demo-session-audio-play { left: 50%; }
#tour-demo-session-audio-fwd { left: 75%; }

#tour-demo-panel-summary .summary-tab-actions {
  justify-content: space-between;
}

#tour-demo-panel-summary .summary-tab-actions #tour-demo-btn-download-summary {
  margin-left: auto;
}

.tour-demo-summary-block {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

#modal-edit-summary.open {
  z-index: 10055;
  align-items: flex-start;
  justify-content: center;
  padding-top: 72px;
  padding-bottom: 16px;
  box-sizing: border-box;
  overflow-y: auto;
}

#modal-edit-summary.open .modal--edit-summary {
  margin-top: 0;
  max-height: calc(100vh - 88px);
}

#tour-demo-transcript-view-wrap {
  display: inline-flex;
}

.tour-demo-name-speakers-wrap {
  display: inline-flex;
  padding: 4px;
  border-radius: calc(var(--radius-pill) + 4px);
  background: transparent;
}

.tour-demo-name-speakers-wrap .btn-action-secondary {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: none;
}
