:root {
  --bg: #f4efe7;
  --bg-accent: radial-gradient(circle at top left, rgba(198, 168, 132, 0.24), transparent 28%),
    radial-gradient(circle at right 20%, rgba(34, 107, 62, 0.16), transparent 24%),
    linear-gradient(180deg, #f8f3eb 0%, #f3eee5 100%);
  --card: rgba(255, 251, 245, 0.92);
  --card-strong: #fffdf8;
  --text: #241f1a;
  --muted: #6f655c;
  --line: rgba(104, 88, 71, 0.18);
  --brand: #1f6a43;
  --brand-dark: #144a2f;
  --accent: #b5672a;
  --danger: #b43a2e;
  --ok: #1f7a58;
  --shadow: 0 20px 40px rgba(61, 46, 30, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg-accent);
  font-family: "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

.page-header {
  padding: 28px 34px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  color: #fff8ef;
  background:
    linear-gradient(135deg, rgba(19, 61, 40, 0.95), rgba(65, 39, 20, 0.92)),
    linear-gradient(90deg, #17391f, #4d2a1e);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.page-header h1 {
  margin: 6px 0 0;
  font-size: 30px;
  line-height: 1.15;
}

.page-header p {
  margin: 8px 0 0;
  color: rgba(255, 244, 230, 0.84);
}

.eyebrow,
.hero-kicker,
.answer-badge {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
}

.eyebrow {
  color: rgba(255, 232, 204, 0.78);
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.top-nav a,
header a {
  color: #fff;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 700;
}

.top-nav a:hover,
header a:hover {
  background: rgba(255, 255, 255, 0.14);
}

main {
  max-width: 1380px;
  margin: 26px auto 0;
  padding: 0 24px 48px;
}

main.wide {
  max-width: 1760px;
}

.page-shell {
  animation: fadeUp 280ms ease-out;
}

.hero-card,
.card,
.answer-panel,
.login-card {
  background: var(--card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 26px 28px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
}

.hero-card.compact h2,
.hero-card h2 {
  margin: 4px 0 8px;
  font-size: 28px;
}

.hero-card p {
  margin: 0;
  color: var(--muted);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  min-width: min(380px, 100%);
}

.status-pill {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
}

.status-pill strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.status-label {
  color: var(--muted);
  font-size: 13px;
}

.card,
.answer-panel {
  padding: 22px;
  margin-bottom: 20px;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 24px;
}

.login-centered {
  width: min(600px, 100%);
}

.login-card-compact {
  position: relative;
  overflow: hidden;
  padding: 38px 34px 34px;
  margin: 0;
}

.login-orb {
  position: absolute;
  top: -72px;
  right: -46px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(241, 188, 121, 0.42) 0%, rgba(241, 188, 121, 0.08) 45%, transparent 70%);
  pointer-events: none;
}

.login-card {
  width: 100%;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-card h1 {
  position: relative;
  margin: 12px 0 10px;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.login-card-kicker {
  color: var(--accent);
}

.login-subtitle {
  position: relative;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
}

.login-form {
  position: relative;
  margin-top: 8px;
}

.login-form input {
  height: 50px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
}

.login-submit {
  width: 100%;
  margin-top: 20px;
  padding: 15px 18px;
  font-size: 15px;
}

label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  padding: 11px 13px;
  font: inherit;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(31, 106, 67, 0.2);
  border-color: rgba(31, 106, 67, 0.45);
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 11px 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
  box-shadow: 0 10px 24px rgba(31, 106, 67, 0.24);
}

button:hover,
.button-link:hover {
  transform: translateY(-1px);
}

button:disabled,
.button-link:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.ghost-button {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  border: 1px solid var(--line);
}

.ghost-button.active {
  background: rgba(31, 106, 67, 0.1);
  color: var(--brand-dark);
  border-color: rgba(31, 106, 67, 0.28);
}

.submit-btn {
  padding: 13px 22px;
}

.submit-btn-top {
  margin: 0;
}

.muted,
.hint {
  color: var(--muted);
}

.flash {
  padding: 12px 14px;
  border-radius: 16px;
  margin-bottom: 18px;
  font-weight: 700;
  border: 1px solid transparent;
}

.flash.error {
  color: #7a2018;
  background: rgba(239, 121, 107, 0.16);
  border-color: rgba(180, 58, 46, 0.22);
}

.flash.ok {
  color: #0f5e42;
  background: rgba(38, 172, 120, 0.16);
  border-color: rgba(31, 122, 88, 0.22);
}

.case-grid,
.answers {
  display: grid;
  gap: 20px;
}

.case-grid {
  grid-template-columns: minmax(420px, 1.3fr) minmax(360px, 0.95fr);
}

.answers {
  grid-template-columns: repeat(2, minmax(560px, 1fr));
}

.answer-panel {
  display: flex;
  flex-direction: column;
  min-height: 720px;
}

.answer-head,
.answer-toolbar,
.form-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

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

.answer-head h2 {
  margin: 4px 0 0;
}

.answer-badge {
  color: var(--accent);
}

.translation-state {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(181, 103, 42, 0.12);
  color: #6f421f;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.answer-toolbar {
  margin-bottom: 14px;
}

.response-stack {
  flex: 1;
  display: flex;
}

.response-box {
  display: none;
  width: 100%;
  white-space: pre-wrap;
  overflow-y: auto;
  min-height: 620px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card-strong);
  font-size: 14px;
}

.response-box.is-active {
  display: block;
}

.translation-box {
  position: relative;
}

.translation-loading,
.translation-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  margin-bottom: 12px;
}

.translation-loading {
  background: rgba(31, 106, 67, 0.08);
  color: var(--brand-dark);
}

.translation-error {
  background: rgba(180, 58, 46, 0.12);
  color: #7a2018;
}

.translation-result:empty::before {
  content: "中文译文会显示在这里。";
  color: var(--muted);
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(31, 106, 67, 0.18);
  border-top-color: var(--brand);
  animation: spin 800ms linear infinite;
}

.meta-list {
  padding-left: 18px;
  margin: 0;
}

.image-block {
  margin-top: 14px;
}

.case-image {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
}

.score-form h2,
.score-form h3 {
  margin-top: 0;
}

.form-header {
  margin-bottom: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: rgba(94, 76, 59, 0.06);
  font-weight: 800;
}

.survey-table tr:hover td {
  background: rgba(255, 255, 255, 0.36);
}

code {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(31, 106, 67, 0.1);
  color: var(--brand-dark);
}

[hidden] {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .page-header,
  .hero-card,
  .answer-head,
  .form-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .status-grid {
    width: 100%;
    min-width: 0;
  }

  .answer-panel {
    min-height: auto;
  }

  .login-card {
    padding: 28px;
  }

  .login-card h1 {
    font-size: 32px;
  }
}
