:root {
  color-scheme: light;
  --bg: #f5f7f4;
  --surface: #ffffff;
  --surface-strong: #eef4f6;
  --ink: #18201f;
  --muted: #60706d;
  --line: #d8e1dd;
  --accent: #0d7f79;
  --accent-dark: #085e59;
  --warm: #b8572d;
  --shadow: 0 16px 45px rgba(21, 43, 40, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(125deg, rgba(13, 127, 121, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(184, 87, 45, 0.1), transparent 30%),
    var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

button:hover {
  background: var(--accent-dark);
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

button.secondary,
button.icon-button,
button.tab-button {
  color: var(--ink);
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

button.secondary:hover,
button.icon-button:hover,
button.tab-button:hover,
button.tab-button.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

a {
  color: var(--accent-dark);
  word-break: break-word;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar,
.auth-panel,
.pricing-panel,
.verify-panel,
.workspace,
.listener {
  border: 1px solid rgba(216, 225, 221, 0.9);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 104px;
  padding: 12px 24px;
  overflow: visible;
  border-radius: 10px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  height: 80px;
  overflow: visible;
}

.brand-logo {
  width: auto;
  height: 86px;
  display: block;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--warm);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 0.95;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.45rem;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.muted {
  color: var(--muted);
}

.status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 9px 14px;
  color: var(--muted);
  background: var(--surface);
}

.status-pill.active {
  color: var(--accent-dark);
  border-color: rgba(13, 127, 121, 0.25);
  background: rgba(13, 127, 121, 0.08);
}

.auth-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  margin-top: 18px;
  padding: 28px;
  border-radius: 10px;
}

.auth-copy p,
.note,
.empty-state,
.pricing-card p {
  color: var(--muted);
  line-height: 1.7;
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.free-trial-button {
  margin-top: 12px;
}

.tab-button {
  min-height: 38px;
}

.login-form,
.verify-form,
.control-panel,
.share-panel,
.transcript-panel,
.listener,
.verify-panel,
.pricing-panel {
  border-radius: 10px;
}

.login-form,
.verify-form {
  display: grid;
  gap: 16px;
}

.verify-panel {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 32px;
  margin-top: 18px;
  padding: 28px;
}

.dev-code {
  display: inline-block;
  border-radius: 8px;
  border: 1px solid rgba(13, 127, 121, 0.22);
  padding: 10px 12px;
  color: var(--accent-dark);
  background: rgba(13, 127, 121, 0.08);
  font-weight: 800;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(13, 127, 121, 0.6);
  box-shadow: 0 0 0 4px rgba(13, 127, 121, 0.12);
}

.pricing-panel {
  margin-top: 18px;
  padding: 22px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.pricing-card {
  display: grid;
  gap: 16px;
  align-content: space-between;
  min-height: 235px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
}

.pricing-card strong {
  display: block;
  color: var(--accent-dark);
  font-size: 2rem;
  line-height: 1;
}

.pricing-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: 340px minmax(280px, 1fr);
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
  border-radius: 10px;
}

.control-panel,
.share-panel,
.transcript-panel,
.listener {
  background: var(--surface);
  border: 1px solid var(--line);
}

.control-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 20px;
}

.account-summary,
.preferences-panel,
.meeting-context-panel {
  display: grid;
  gap: 10px;
  border-radius: 8px;
  border: 1px solid rgba(13, 127, 121, 0.18);
  padding: 13px;
  background: rgba(13, 127, 121, 0.06);
}

.preferences-panel,
.meeting-context-panel {
  background: #fff;
}

.file-summary {
  display: grid;
  gap: 8px;
}

.file-chip {
  display: grid;
  gap: 4px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 10px;
  color: var(--muted);
  background: var(--surface-strong);
  font-size: 0.86rem;
}

.file-chip strong {
  color: var(--ink);
}

.instructions-preview {
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: var(--surface-strong);
}

.instructions-preview summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-weight: 800;
}

.instructions-preview pre {
  max-height: 220px;
  overflow: auto;
  margin: 10px 0 0;
  white-space: pre-wrap;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.account-summary strong,
.account-summary span {
  display: block;
}

.account-summary span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.field-grid,
.button-row {
  display: grid;
  gap: 12px;
}

.button-row {
  grid-template-columns: 1fr 1fr;
}

.manual-send {
  display: grid;
  gap: 12px;
}

.share-panel {
  display: grid;
  grid-template-columns: 168px 1fr;
  align-items: center;
  gap: 22px;
  padding: 22px;
}

.qr-wrap {
  display: grid;
  place-items: center;
  width: 168px;
  min-height: 168px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.qr-wrap img {
  display: block;
  width: 146px;
  height: 146px;
}

.share-details h2 {
  margin-bottom: 8px;
}

.transcript-panel {
  grid-column: 2;
  min-height: 360px;
  padding: 18px;
}

.panel-heading.inline,
.listener-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.icon-button {
  min-height: 36px;
  padding: 0 12px;
}

.transcript-list {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.message {
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 13px 14px;
  background: var(--surface-strong);
}

.message time {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.message strong,
.live-card strong {
  display: block;
  margin-bottom: 6px;
}

.translation {
  color: var(--accent-dark);
  font-weight: 800;
}

.original {
  color: var(--muted);
}

.listener {
  margin-top: 18px;
  padding: 22px;
}

.language-bar {
  max-width: 280px;
  margin: 12px 0 18px;
}

.live-card {
  min-height: 180px;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 22px;
  background: linear-gradient(135deg, rgba(13, 127, 121, 0.1), rgba(184, 87, 45, 0.08));
}

.live-card .translation {
  font-size: clamp(1.8rem, 5vw, 3.8rem);
  line-height: 1.08;
}

.listener-list {
  margin-top: 16px;
  max-height: 430px;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 20px, 680px);
    padding-top: 10px;
  }

  .topbar,
  .auth-panel,
  .verify-panel,
  .workspace,
  .share-panel {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-logo {
    width: auto;
    height: 74px;
    max-width: 86vw;
  }

  .workspace {
    padding: 12px;
  }

  .share-panel,
  .transcript-panel {
    grid-column: auto;
  }

  .qr-wrap {
    width: 100%;
  }

  .listener-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .pricing-grid,
  .button-row {
    grid-template-columns: 1fr;
  }

  .auth-tabs {
    flex-direction: column;
  }
}
