* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f2ec;
  color: #1f2933;
}

body {
  padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
}

.app {
  width: min(920px, 100%);
  margin: 0 auto;
}

.hero {
  padding: 28px 4px 16px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #61705d;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 8vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.lead {
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.8;
  color: #52616b;
}

.panel,
.transcript-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(31, 41, 51, 0.08);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(31, 41, 51, 0.08);
}

.panel {
  padding: 18px;
  margin: 14px 0 18px;
}

.label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

select,
button {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  font-size: 16px;
}

select {
  padding: 0 14px;
  border: 1px solid #c9d2c5;
  background: #fff;
}

.button-row,
.direction-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

button {
  border: 0;
  font-weight: 700;
  cursor: pointer;
}

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

.primary {
  color: #fff;
  background: #2f5d45;
}

.secondary {
  color: #2f3a31;
  background: #dfe7d9;
}

.direction-button {
  min-height: 58px;
  border: 1px solid #c9d2c5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #34453a;
  background: #edf3e8;
  text-align: center;
  padding: 8px 12px;
}

.direction-button.active {
  color: #fff;
  background: #2f5d45;
  border-color: #2f5d45;
}

.direction-button > span {
  font-size: 15px;
  font-weight: 700;
}

.direction-button small {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 700;
}

.status {
  margin: 14px 2px 0;
  color: #52616b;
  font-weight: 700;
}

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

.transcript-card {
  padding: 18px;
  min-height: 220px;
}

.transcript-card h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.transcript {
  min-height: 150px;
  white-space: pre-wrap;
  line-height: 1.8;
  font-size: 17px;
  color: #334e36;
}

.translated {
  font-size: 20px;
  font-weight: 700;
}

.note {
  color: #65727b;
  font-size: 13px;
  line-height: 1.7;
  padding: 0 4px;
}

@media (max-width: 720px) {
  .transcript-grid {
    grid-template-columns: 1fr;
  }

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