:root {
  color-scheme: light;
  --bg: #f6f0e4;
  --paper: #fffdf8;
  --ink: #1f2a1f;
  --muted: #667069;
  --line: rgba(32, 42, 31, 0.12);
  --green: #1e8f55;
  --green-strong: #11643a;
  --brick: #be5d2d;
  --brick-strong: #91411a;
  --gold: #d29a2f;
  --soft-shadow: 0 20px 60px rgba(42, 35, 21, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(210, 154, 47, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(30, 143, 85, 0.16), transparent 24%),
    linear-gradient(180deg, #f8f3e8 0%, var(--bg) 100%);
  color: var(--ink);
}

.app-shell {
  width: min(1120px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.eyebrow,
.section-label {
  margin: 0 0 10px;
  color: var(--brick-strong);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: "Avenir Next", "SF Pro Display", "PingFang SC", sans-serif;
  line-height: 1.1;
}

h1 {
  font-size: clamp(30px, 4.4vw, 52px);
  max-width: 14ch;
}

h2 {
  font-size: clamp(22px, 2.4vw, 30px);
}

.hero-copy,
.tips p,
.warning-card li {
  color: var(--muted);
  line-height: 1.65;
  font-size: 16px;
}

.card {
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(12px);
}

.warning-card,
.setup-card,
.use-card,
.transcript-card {
  padding: 22px;
}

.warning-card ul {
  margin: 14px 0 0;
  padding-left: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
}

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

.field-wide {
  grid-column: 1 / -1;
}

.field span {
  font-size: 14px;
  font-weight: 700;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(31, 42, 31, 0.14);
  border-radius: 18px;
  background: #fff;
  padding: 14px 16px;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(30, 143, 85, 0.6);
  box-shadow: 0 0 0 4px rgba(30, 143, 85, 0.12);
}

textarea {
  resize: vertical;
  min-height: 88px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.action-row.compact {
  margin-top: 10px;
}

.backend-hint,
.share-card {
  margin-top: 16px;
  border-radius: 20px;
  padding: 16px 18px;
  background: rgba(30, 143, 85, 0.08);
  border: 1px solid rgba(30, 143, 85, 0.18);
}

.backend-hint {
  color: #1d5c3a;
  font-weight: 700;
}

.share-card {
  background: rgba(210, 154, 47, 0.12);
  border-color: rgba(210, 154, 47, 0.24);
}

.share-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.public-link {
  display: block;
  margin-top: 10px;
  word-break: break-all;
  color: #0f6e48;
  font-weight: 700;
  text-decoration: none;
}

.public-link:hover {
  text-decoration: underline;
}

button {
  border: none;
  border-radius: 999px;
  padding: 13px 18px;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.secondary {
  background: #f4eee1;
  color: var(--ink);
  border: 1px solid rgba(31, 42, 31, 0.08);
}

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

.use-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
}

.status-pill {
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.idle {
  background: #eee6d7;
  color: #5b5447;
}

.status-pill.listening {
  background: rgba(30, 143, 85, 0.14);
  color: var(--green-strong);
}

.status-pill.processing {
  background: rgba(210, 154, 47, 0.18);
  color: #8a6113;
}

.status-pill.error {
  background: rgba(190, 93, 45, 0.16);
  color: var(--brick-strong);
}

.speaker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.meeting-controls {
  margin-top: 18px;
  padding: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 24%),
    linear-gradient(135deg, #1c8b63 0%, #be5d2d 100%);
  color: white;
}

.meeting-toggle {
  background: rgba(255, 255, 255, 0.94);
  color: #193020;
  font-weight: 800;
  padding: 15px 22px;
}

.meeting-toggle.active {
  background: #163d2a;
  color: white;
}

.meeting-tip {
  margin: 14px 0 0;
  max-width: 58ch;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
}

.speaker-button {
  position: relative;
  min-height: 214px;
  border-radius: 28px;
  padding: 22px;
  text-align: left;
  color: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.speaker-button strong {
  display: block;
  margin-top: 28px;
  font-size: clamp(28px, 3.1vw, 40px);
  line-height: 1.02;
}

.speaker-button small {
  display: block;
  margin-top: 14px;
  max-width: 28ch;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.speaker-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.14);
}

.speaker-zh {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(135deg, #1f9d6a 0%, #0f6e48 100%);
}

.speaker-nl {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(135deg, #cd6d39 0%, #98461f 100%);
}

.speaker-button.active {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 16px 40px rgba(23, 39, 27, 0.18);
}

.tips {
  margin-top: 14px;
}

.tips p {
  margin: 6px 0 0;
}

.live-turn {
  margin: 18px 0 12px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.96), rgba(248, 243, 232, 0.92));
  border: 1px solid rgba(210, 154, 47, 0.28);
}

.hidden {
  display: none;
}

.turn-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(210, 154, 47, 0.18);
  color: #8a6113;
}

.live-input,
.live-output {
  margin: 12px 0 0;
  line-height: 1.65;
}

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

.live-output {
  font-size: 18px;
  font-weight: 700;
}

.transcript-list {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.transcript-item {
  padding: 16px 18px;
  border-radius: 20px;
  background: white;
  border: 1px solid rgba(31, 42, 31, 0.08);
}

.transcript-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.meta-chip {
  border-radius: 999px;
  padding: 6px 10px;
  background: #f1eadc;
  color: #5c584d;
  font-weight: 700;
}

.transcript-original,
.transcript-translation {
  margin: 10px 0 0;
  line-height: 1.68;
}

.transcript-translation {
  font-size: 18px;
  font-weight: 700;
}

@media (max-width: 920px) {
  .hero,
  .speaker-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .use-header {
    flex-direction: column;
  }

  .speaker-button {
    min-height: 190px;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100vw - 18px, 100%);
    padding: 18px 0 36px;
  }

  .warning-card,
  .setup-card,
  .use-card,
  .transcript-card {
    padding: 16px;
    border-radius: 20px;
  }

  h1 {
    max-width: none;
  }

  .speaker-button strong {
    font-size: 30px;
  }

  .action-row {
    flex-direction: column;
  }

  .action-row button {
    width: 100%;
  }
}
