:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #1f2a37;
  --muted: #64748b;
  --line: #d9e2ec;
  --brand: #0f766e;
  --brand-strong: #115e59;
  --accent: #2563eb;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    Arial,
    sans-serif;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 36px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand img {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.2;
}

h2 {
  font-size: 20px;
  line-height: 1.3;
}

.status {
  min-width: 150px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 20px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px;
}

.panel,
.rubric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.rubric {
  grid-column: 1 / -1;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title span {
  color: var(--muted);
  font-size: 14px;
}

form {
  display: grid;
  gap: 16px;
}

.upload-zone {
  display: grid;
  gap: 8px;
  min-height: 148px;
  align-content: center;
  padding: 22px;
  border: 1px dashed #8aa4bf;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
}

.upload-zone strong {
  color: var(--text);
  font-size: 17px;
}

.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  font: inherit;
  line-height: 1.6;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: #ffffff;
  font: inherit;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

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

.primary-button {
  background: var(--brand);
  color: #ffffff;
}

.primary-button:hover:not(:disabled) {
  background: var(--brand-strong);
}

.ghost-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--accent);
  padding: 0 14px;
}

.result {
  min-height: 320px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 16px;
  color: #334155;
  line-height: 1.75;
}

.result.error {
  color: var(--danger);
  border-color: #f1aaa3;
  background: #fff7f6;
}

.rubric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.rubric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.rubric-card strong {
  display: block;
  margin-bottom: 6px;
}

.rubric-card span {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 900px) {
  .app-header {
    display: grid;
    padding: 22px 18px;
  }

  .brand img {
    width: 52px;
    height: 52px;
  }

  .layout {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .rubric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 28px;
  }

  .rubric-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .ghost-button {
    width: 100%;
  }
}
