:root {
  color-scheme: light;
  --paper: #f7f0e6;
  --ink: #2b2119;
  --muted: #806f60;
  --line: rgba(64, 44, 28, 0.18);
  --record: #8d2d24;
  --save: #244d3a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Serif SC", "Songti SC", "Microsoft YaHei", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 255, 255, 0.72), transparent 28rem),
    linear-gradient(135deg, #efe2cf 0%, #f8f1e8 46%, #e6d2bc 100%);
}

.page {
  min-height: 100vh;
  padding: max(28px, env(safe-area-inset-top)) 18px max(26px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel {
  width: min(720px, 100%);
}

.brand {
  margin-bottom: 16px;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
}

textarea {
  width: 100%;
  min-height: 38vh;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.42);
  font: inherit;
  font-size: 18px;
  line-height: 1.75;
  outline: none;
  box-shadow: 0 18px 46px rgba(65, 42, 20, 0.08);
}

textarea:focus {
  border-color: rgba(50, 33, 20, 0.42);
  background: rgba(255, 255, 255, 0.58);
}

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

button {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  touch-action: none;
}

.record {
  background: var(--record);
}

.record.listening {
  background: #b4392c;
}

.save {
  background: var(--save);
}

button:disabled {
  opacity: 0.62;
  cursor: default;
}

.status {
  min-height: 28px;
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.status.error {
  color: #9d241e;
}

@media (max-width: 520px) {
  .page {
    align-items: stretch;
  }

  .brand {
    font-size: 30px;
  }

  textarea {
    min-height: 46vh;
    font-size: 17px;
  }
}
