:root {
  --bg: #f4efe6;
  --card: #fffdf9;
  --ink: #1f2a24;
  --muted: #5f6d64;
  --line: #d9d0c3;
  --accent: #0f6b5c;
  --accent-2: #b85c38;
  --shadow: 0 18px 50px rgba(31, 42, 36, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 107, 92, 0.12), transparent 28%),
    radial-gradient(circle at bottom right, rgba(184, 92, 56, 0.12), transparent 24%),
    var(--bg);
  min-height: 100vh;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.hero {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.15;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
  line-height: 1.7;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.panel h2 {
  margin: 0;
  font-size: 1.25rem;
}

.badge {
  font-size: 0.75rem;
  color: var(--muted);
  background: #f1ebe2;
  border-radius: 999px;
  padding: 6px 10px;
  white-space: nowrap;
}

.hint {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

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

.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
}

.file-drop {
  display: block;
  border: 2px dashed var(--line);
  border-radius: 16px;
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 14px;
  transition: border-color 0.2s, background 0.2s;
}

.file-drop:hover,
.file-drop.dragover {
  border-color: var(--accent);
  background: rgba(15, 107, 92, 0.05);
}

.file-drop input { display: none; }

.btn {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 14px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.primary { background: var(--accent); color: #fff; }
.btn.secondary { background: var(--accent-2); color: #fff; }

.status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #eef6f3;
  color: var(--accent);
  line-height: 1.5;
}

.status.error {
  background: #fdeeee;
  color: #9b2c2c;
}

.result-box {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.result-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.result-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1.6;
}

.result-text.small {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

.audio-player {
  width: 100%;
}

.footer {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

code {
  background: #efe8dc;
  padding: 2px 6px;
  border-radius: 6px;
}
