:root {
  color-scheme: light;
  --bg: #f4efe6;
  --panel: rgba(255, 251, 244, 0.92);
  --border: rgba(58, 36, 20, 0.14);
  --text: #26170d;
  --muted: #705440;
  --accent: #bb5a2a;
  --accent-strong: #8f3f17;
  --shadow: 0 24px 60px rgba(62, 37, 22, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(233, 194, 130, 0.45), transparent 25%),
    linear-gradient(180deg, #fff9f2 0%, var(--bg) 100%);
}

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

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

.hero {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

.hero-copy {
  width: min(72ch, 100%);
  color: var(--muted);
}

.panel {
  margin-bottom: 20px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.nested-panel {
  margin-bottom: 0;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.66);
}

.grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.join-form,
.status-grid {
  display: grid;
  gap: 16px;
}

.join-form {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: end;
}

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

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(73, 49, 30, 0.18);
  border-radius: 14px;
  background: white;
}

textarea {
  resize: vertical;
}

button {
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--accent-strong);
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.helper-copy {
  margin: 16px 0 0;
  color: var(--muted);
}

.status-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.status-grid dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.status-grid dd {
  margin: 0;
  font-weight: 600;
}

.interim-transcript {
  min-height: 48px;
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(187, 90, 42, 0.08);
}

.activity-log {
  min-height: 180px;
  margin: 16px 0 0;
  padding: 14px;
  overflow: auto;
  border-radius: 14px;
  background: #1d150f;
  color: #ffe8d0;
}

.participants,
.transcript-list {
  margin: 0;
  padding-left: 20px;
}

.participants li,
.transcript-list li {
  margin-bottom: 12px;
}

.listener-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.listener-header h2,
.listener-panel h3 {
  margin-top: 0;
}

.listener-grid,
.analysis-grid {
  display: grid;
  gap: 16px;
}

.listener-grid {
  grid-template-columns: 1.3fr 1fr;
  margin-bottom: 16px;
}

.analysis-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.analysis-summary {
  min-height: 72px;
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  background: rgba(187, 90, 42, 0.08);
}

.analysis-list {
  margin: 0;
  padding-left: 20px;
}

.analysis-list li {
  margin-bottom: 12px;
}

.analysis-minutes {
  min-height: 180px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border-radius: 14px;
  background: #f7efe7;
  color: var(--text);
  white-space: pre-wrap;
}

.audio-preview {
  width: 100%;
  margin-top: 16px;
}

.remote-audio-root {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.remote-audio-root:empty {
  display: none;
}

.remote-audio-root audio {
  width: 100%;
}

.room-audio-element {
  min-height: 48px;
}

.span-2 {
  grid-column: span 2;
}

.transcript-list time {
  display: inline-block;
  margin-left: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.transcript-list p {
  margin: 6px 0 0;
}

.screens {
  display: grid;
  gap: 16px;
}

.screen {
  width: 100%;
  border-radius: 16px;
  background: #140d08;
}

.hidden {
  display: none;
}

@media (max-width: 800px) {
  .app-shell {
    width: min(100% - 24px, 1120px);
    padding-top: 24px;
  }

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

  .listener-grid,
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }
}
