:root {
  color-scheme: light;
  --ink: #18201f;
  --muted: #64706d;
  --line: #d8dfdc;
  --paper: #f7f8f4;
  --panel: rgba(255, 255, 255, 0.88);
  --accent: #1d6b5b;
  --accent-strong: #0f4f43;
  --copper: #b45538;
  --code: #111817;
  --shadow: 0 22px 60px rgba(30, 45, 42, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: ui-serif, Georgia, "Times New Roman", "Songti SC", serif;
  background:
    linear-gradient(130deg, rgba(29, 107, 91, 0.16), transparent 38%),
    linear-gradient(315deg, rgba(180, 85, 56, 0.14), transparent 34%),
    repeating-linear-gradient(90deg, rgba(24, 32, 31, 0.04) 0 1px, transparent 1px 72px),
    var(--paper);
}

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

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 34px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--copper);
  font-family: ui-sans-serif, "Avenir Next", "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-size: clamp(40px, 7vw, 84px);
}

h2 {
  overflow-wrap: anywhere;
  font-size: 24px;
}

.muted {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.status-card {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-family: ui-sans-serif, "Avenir Next", "PingFang SC", sans-serif;
  font-weight: 750;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9aa5a1;
}

.status-card.running .dot {
  background: #c48a22;
  box-shadow: 0 0 0 6px rgba(196, 138, 34, 0.16);
}

.status-card.succeeded .dot {
  background: var(--accent);
}

.status-card.failed .dot {
  background: #b83232;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
  gap: 18px;
  margin-top: 18px;
}

.form-panel,
.result-panel {
  padding: 24px;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-family: ui-sans-serif, "Avenir Next", "PingFang SC", sans-serif;
  font-size: 13px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

textarea {
  min-height: 132px;
  padding: 12px 13px;
  resize: vertical;
  line-height: 1.5;
}

input[type="file"] {
  padding: 11px 13px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 107, 91, 0.13);
}

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

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.check-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

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

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font-family: ui-sans-serif, "Avenir Next", "PingFang SC", sans-serif;
  font-weight: 800;
}

button:hover {
  background: var(--accent-strong);
}

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

.secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

.secondary:hover {
  background: #edf3f0;
}

.ghost {
  border: 1px solid var(--line);
  color: var(--accent-strong);
  background: transparent;
}

.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.upload-box {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.7);
}

.upload-box label {
  margin-bottom: 12px;
}

.upload-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ece9;
}

.upload-meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--copper));
  transition: width 180ms ease;
}

.upload-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-family: ui-sans-serif, "Avenir Next", "PingFang SC", sans-serif;
  font-size: 13px;
  line-height: 1.5;
}

.hotword-box {
  margin: 2px 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.7);
}

.hotword-head,
.hotword-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hotword-head {
  margin-bottom: 14px;
}

.hotword-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.hotword-actions {
  flex-wrap: wrap;
}

.hotword-actions span {
  flex: 1 1 180px;
  color: var(--muted);
  font-family: ui-sans-serif, "Avenir Next", "PingFang SC", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

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

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.transcript {
  min-height: 94px;
  margin-bottom: 16px;
  border-left: 4px solid var(--accent);
  padding: 14px 16px;
  background: rgba(29, 107, 91, 0.08);
  line-height: 1.8;
}

pre {
  min-height: 430px;
  max-height: 58vh;
  margin: 0;
  overflow: auto;
  border-radius: 8px;
  padding: 18px;
  color: #d6f3ed;
  background: var(--code);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .hero,
  .result-head {
    align-items: stretch;
    flex-direction: column;
  }

  .result-actions {
    justify-content: stretch;
  }

  .result-actions button {
    flex: 1;
  }

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

  .shell {
    width: min(100% - 20px, 1180px);
    padding: 10px 0;
  }

  .hero,
  .form-panel,
  .result-panel {
    padding: 18px;
  }
}
