:root {
  --bg: #f6f7f4;
  --ink: #1e2b2c;
  --muted: #63706f;
  --card: rgba(255, 255, 255, 0.88);
  --line: rgba(30, 43, 44, 0.1);
  --accent: #286f6a;
  --accent-2: #d77d41;
  --accent-soft: rgba(40, 111, 106, 0.12);
  --accent-dark: #1f5854;
  --shadow: 0 18px 52px rgba(39, 53, 52, 0.08);
  --panel-radius: 26px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(40, 111, 106, 0.12), transparent 26%),
    radial-gradient(circle at right 20%, rgba(215, 125, 65, 0.11), transparent 22%),
    linear-gradient(180deg, #fafbf8 0%, var(--bg) 100%);
}

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

.hero {
  padding: 6px 4px 20px;
}

.hero-topline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(215, 125, 65, 0.12);
  color: #935526;
  font-size: 12px;
  font-weight: 700;
}

.hero h1 {
  margin: 14px 0 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.lede {
  max-width: 820px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.72;
}

.author-panel {
  display: grid;
  gap: 10px;
  max-width: 920px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(40, 111, 106, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 28px rgba(34, 53, 50, 0.04);
}

.author-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.author-panel strong {
  color: inherit;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.hero-card {
  padding: 18px 18px 16px;
  border: 1px solid rgba(40, 111, 106, 0.08);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 251, 250, 0.86));
  box-shadow: 0 10px 34px rgba(34, 53, 50, 0.05);
}

.hero-card-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-card strong {
  display: block;
  font-size: 18px;
}

.hero-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.path-preview {
  word-break: break-all;
}

.panel {
  margin-top: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

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

.panel h2,
.result-head h2 {
  margin: 0;
  font-size: 24px;
}

.meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  word-break: break-all;
}

.mode {
  display: grid;
  gap: 8px;
  min-width: 140px;
  color: var(--muted);
  font-size: 13px;
}

select,
textarea,
button {
  font: inherit;
}

select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(252, 253, 251, 0.92);
  color: var(--ink);
}

select {
  height: 44px;
  padding: 0 14px;
}

.mode span,
.question-block {
  display: grid;
  gap: 10px;
  font-size: 14px;
}

.question-block {
  margin-top: 18px;
}

textarea {
  min-height: 150px;
  padding: 18px;
  resize: vertical;
  line-height: 1.7;
}

textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(40, 111, 106, 0.35);
  box-shadow: 0 0 0 4px rgba(40, 111, 106, 0.08);
}

.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.example-chip {
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(40, 111, 106, 0.14);
  border-radius: 999px;
  background: rgba(40, 111, 106, 0.05);
  color: var(--accent-dark);
  font-size: 13px;
}

.example-chip:hover {
  background: rgba(40, 111, 106, 0.1);
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.tips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.tips span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(30, 43, 44, 0.05);
  color: var(--muted);
  font-size: 12px;
}

button {
  height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

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

#submit {
  background: linear-gradient(135deg, var(--accent) 0%, #378880 100%);
  color: #f8fffd;
  box-shadow: 0 10px 22px rgba(40, 111, 106, 0.22);
}

#submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

.ghost {
  background: rgba(29, 42, 51, 0.08);
  color: var(--ink);
}

.result-panel {
  min-height: 280px;
}

.status {
  align-self: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
}

.status.idle {
  background: rgba(29, 42, 51, 0.08);
}

.status.loading {
  background: rgba(215, 125, 65, 0.16);
  color: #9a5a29;
}

.status.error {
  background: rgba(174, 42, 42, 0.14);
  color: #8f1f1f;
}

.status.done {
  background: rgba(62, 122, 91, 0.16);
  color: #24563e;
}

.answer {
  margin: 18px 0 0;
  padding: 18px 18px 20px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.72;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(249, 251, 249, 0.94), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(30, 43, 44, 0.08);
  border-radius: 18px;
  min-height: 220px;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 980px);
    padding-top: 24px;
  }

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

  .author-panel {
    padding: 14px 16px;
  }

  .panel-head,
  .result-head,
  .actions {
    flex-direction: column;
  }

  .mode {
    width: 100%;
  }

  button {
    width: 100%;
  }

  .examples {
    flex-direction: column;
  }

  .example-chip {
    width: 100%;
  }

  .tips {
    flex-direction: column;
  }
}
