:root {
  color-scheme: light dark;
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text",
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei",
    "Noto Sans SC", system-ui, sans-serif;
  --page: #f5f5f7;
  --surface: #ffffff;
  --surface-2: rgb(118 118 128 / 0.1);
  --material: rgb(246 246 248 / 0.82);
  --text: #1d1d1f;
  --muted: #505055;
  --edge: rgb(0 0 0 / 0.09);
  --edge-strong: rgb(0 0 0 / 0.16);
  --accent: #0066cc;
  --accent-hover: #0055b3;
  --logo-blue: #0071e3;
  --logo-orange: #ff9500;
  --focus-halo: rgb(0 102 204 / 0.24);
  --shadow-soft: rgb(0 0 0 / 0.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #141416;
    --surface: #1c1c1e;
    --surface-2: rgb(118 118 128 / 0.22);
    --material: rgb(30 30 32 / 0.82);
    --text: #f2f2f4;
    --muted: #b8b8bd;
    --edge: rgb(255 255 255 / 0.09);
    --edge-strong: rgb(255 255 255 / 0.18);
    --accent: #0a6cdc;
    --accent-hover: #1d7ae8;
    --logo-blue: #0a84ff;
    --logo-orange: #ff9f0a;
    --focus-halo: rgb(74 161 255 / 0.3);
    --shadow-soft: rgb(0 0 0 / 0.35);
  }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { margin: 0; background: var(--page); color: var(--text); letter-spacing: -0.003em; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 3.4vw, 2.35rem); line-height: 1.25; letter-spacing: -.025em; }
h2 { font-size: 1.15rem; line-height: 1.4; }
button, select, input { font: inherit; }
button, select, input, summary { border-radius: .625rem; }
button, select, input {
  min-height: 2.75rem;
  color: var(--text);
  border: 1px solid var(--edge-strong);
  background: var(--surface);
  transition:
    color 150ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 150ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 150ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 150ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 150ms cubic-bezier(0.22, 1, 0.36, 1);
}
button { padding: .5rem 1rem; font-weight: 600; cursor: pointer; }
button:hover:enabled { background: var(--surface-2); border-color: var(--edge-strong); }
button:active:enabled { transform: scale(0.985); }
button:disabled, select:disabled { opacity: .45; cursor: default; }
.primary {
  color: #fff;
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12), inset 0 1px 0 rgb(255 255 255 / 0.12);
}
.primary:hover:enabled { background: var(--accent-hover); border-color: transparent; }
:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--focus-halo);
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--material);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--edge);
}
.topbar-inner {
  max-width: 74rem;
  margin: 0 auto;
  padding: .68rem clamp(1rem, 4vw, 2.75rem);
  display: flex;
  gap: 1rem;
  align-items: center;
}
.brand { display: inline-flex; align-items: center; gap: .45rem; font-size: 1.42rem; font-weight: 650; letter-spacing: -.03em; }
.notice, #welcome { max-width: 55rem; margin: clamp(1.5rem, 6vh, 3.5rem) auto; padding: 0 1rem; }
.intro p { color: var(--muted); margin-top: .65rem; }
.entry-card, .panel {
  border: 1px solid var(--edge);
  background: var(--surface);
  border-radius: 1rem;
  box-shadow: 0 1px 2px var(--shadow-soft);
}
.entry-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.35rem; }
.entry-card { padding: clamp(1rem, 3vw, 1.5rem); }
.entry-card h2 { font-size: 1.25rem; }
.choice-description { margin: .4rem 0 1rem; }
#welcome label { display: block; font-size: .95rem; font-weight: 650; }
.entry-card select, #invite-input, #copy-fallback { margin-top: .4rem; width: 100%; padding: .55rem .65rem; }
#manual-invite { margin: 1.2rem 0 0; max-width: 34rem; }
.choice-action { min-height: 2.85rem; width: 100%; }
.entry-card > .choice-action { margin-bottom: .45rem; }
a.choice-action { display: grid; place-items: center; border: 1px solid var(--edge-strong); border-radius: .65rem; color: inherit; text-decoration: none; }
.trial-info { margin: .55rem 0 .9rem; }
.trial-info summary { cursor: pointer; color: var(--muted); }
#trial-models { white-space: pre-line; overflow-wrap: anywhere; }
.setup-link { display: inline-block; margin-top: .5rem; color: var(--muted); font-size: .875rem; }
#start, .copy-link { margin-top: .65rem; }
.copy-link { font-size: .875rem; }
.hint { color: var(--muted); font-size: .875rem; margin-top: .65rem; }
.status-text { overflow-wrap: anywhere; color: var(--muted); }
.status-text:empty, #copy-status:empty { display: none; }
#entry-status:not(:empty) { margin-top: .85rem; color: var(--text); font-weight: 600; }
#meeting { max-width: 74rem; margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 2.75rem) 4rem; }
.session-header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.session-header .status-text { margin-top: .35rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.meeting-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(16rem, 1fr); align-items: start; gap: 1rem; }
.panel { padding: clamp(1rem, 2.2vw, 1.4rem); min-width: 0; }
.panel h2 { margin-bottom: .85rem; }
.transcript-heading { display: flex; gap: .75rem; align-items: center; justify-content: space-between; min-height: 2.75rem; }
.transcript-heading h2 { margin: 0; }
.transcript-heading button { color: var(--accent); font-size: .9rem; }
#record-hint { margin: .25rem 0 .85rem; }
#service-note:not(:empty) { margin: .5rem 0; }
.transcript {
  max-height: clamp(8rem, calc(100vh - 19rem), 36rem);
  max-height: clamp(8rem, calc(100dvh - 19rem), 36rem);
  overflow-y: auto;
  overflow-anchor: none;
  overflow-wrap: anywhere;
}
.transcript:empty::before { content: "暂无字幕"; color: var(--muted); }
.transcript > * + * { border-top: 1px solid var(--edge); margin-top: .75rem; padding-top: .75rem; }
.transcript .translation, .transcript article p + p { color: var(--muted); margin-top: .2rem; }
#ask-form { display: flex; gap: .45rem; }
#question { width: 100%; min-width: 0; padding: .5rem .65rem; }
#ask-form button { flex-shrink: 0; }
#answer { white-space: pre-wrap; overflow-wrap: anywhere; }
#answer:not(:empty) { border-top: 1px solid var(--edge); margin-top: 1rem; padding-top: .8rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 44rem) {
  .meeting-grid, .entry-choices { grid-template-columns: 1fr; }
  #meeting { padding-top: 1.4rem; }
  .transcript { max-height: 48vh; max-height: 48dvh; }
}
[data-asr-draft] { margin: .55rem 0; color: var(--muted, #505055); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
