:root {
  color-scheme: light;
  --bg: #f5f7f4;
  --panel: #ffffff;
  --text: #17201b;
  --muted: #5b6860;
  --line: #d9e0da;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --warn-bg: #fff7d6;
  --warn-line: #d7b84f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans TC", sans-serif;
}

.shell {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 20px;
  width: min(1440px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0;
}

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgb(23 32 27 / 0.06);
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: calc(100vh - 48px);
  padding: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  font-size: 32px;
}

h2 {
  font-size: 22px;
}

.lede {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

form,
.field {
  display: flex;
  flex-direction: column;
}

form {
  gap: 18px;
}

.field {
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea,
button {
  width: 100%;
  border-radius: 8px;
  font: inherit;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  background: #fbfcfb;
  color: var(--text);
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

.notice {
  border: 1px solid var(--warn-line);
  background: var(--warn-bg);
  border-radius: 8px;
  color: #453711;
  padding: 12px;
  font-size: 14px;
  line-height: 1.6;
}

button {
  border: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 12px 14px;
}

button:hover:not(:disabled) {
  background: var(--accent-dark);
}

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

.report-panel {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 48px);
  overflow: hidden;
}

.report-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
}

.report-toolbar button {
  width: auto;
  min-width: 150px;
}

.report {
  flex: 1;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #fbfcfb;
  color: #16211c;
  padding: 20px;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  line-height: 1.7;
}

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

  .controls,
  .report-panel {
    min-height: auto;
  }
}
