:root {
  color-scheme: light;
  font-family: Inter, "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  color: #172d28;
  background: #f3f7f4;
  --green: #17624d;
  --border: #dbe7df;
  --muted: #536860;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button, a, input, textarea { outline-offset: 4px; }
:focus-visible { outline: 2px solid #197859; }
.shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.top { background: #fff; border-bottom: 1px solid var(--border); }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 68px; }
.brand { font-weight: 750; display: flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #d9efe5; color: var(--green); font-size: 19px; }
nav { display: flex; gap: 24px; font-size: .88rem; color: var(--muted); }
nav a { text-decoration: none; white-space: nowrap; }
nav a:hover { color: var(--green); text-decoration: underline; }
.intro { padding: 42px 0 28px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.95rem, 4.1vw, 3rem); line-height: 1.27; letter-spacing: -.045em; }
.intro > p { margin-top: 10px; color: var(--muted); line-height: 1.6; }
.intro > .test-note { font-size: .83rem; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; padding-bottom: 40px; }
.stack { display: grid; gap: 20px; align-content: start; min-width: 0; }
.card { scroll-margin-top: 16px; background: #fff; border: 1px solid var(--border); border-radius: 17px; padding: 23px; min-width: 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
h2 { font-size: 1.18rem; line-height: 1.4; }
h3 { font-size: .92rem; margin-bottom: 8px; }
.chip { padding: 4px 10px; border-radius: 30px; color: var(--green); background: #e8f3ec; font-size: .77rem; font-weight: 650; white-space: nowrap; }
.chip.warning { background: #fff2d9; color: #814512; }
.notice { background: #f1f7f3; border-radius: 10px; padding: 12px 14px; color: var(--green); font-size: .86rem; line-height: 1.6; }
.notice.warning { background: #fff6e4; border: 1px solid #f2dfb8; color: #74430c; }
details { margin-top: 6px; }
summary { cursor: pointer; }
ul { padding-left: 24px; margin-bottom: 4px; overflow-wrap: anywhere; }
form { display: grid; gap: 11px; margin-top: 14px; }
.photo-grid, .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.upload { display: grid; align-content: start; gap: 11px; min-width: 0; padding: 13px; border: 1px dashed #96b9aa; border-radius: 11px; background: #f8fbf9; }
.field-title, .fields label { font-size: .85rem; font-weight: 650; }
.upload img { width: 100%; max-height: 180px; object-fit: contain; background: #edf3ef; border-radius: 8px; }
input, textarea { width: 100%; min-width: 0; }
input:not([type=file]), textarea {
  padding: 9px 10px; color: inherit; border: 1px solid #cddcd3; border-radius: 8px; background: #fff; font-size: .9rem;
}
.fields input { margin-top: 6px; font-weight: 400; }
textarea { resize: vertical; }
input[type=file] { font-size: .83rem; color: var(--muted); }
input::file-selector-button { font: inherit; padding: 6px 8px; border-radius: 7px; border: 1px solid #cadbd0; background: #fff; margin-right: 6px; cursor: pointer; }
button { justify-self: start; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--green); background: var(--green); color: #fff; font-size: .86rem; font-weight: 650; cursor: pointer; }
button:hover:not(:disabled) { background: #104f3d; color: #fff; }
button:disabled { cursor: not-allowed; opacity: .5; }
.secondary { color: var(--green); background: #fff; border-color: #b9d3c4; }
.muted, .message { color: var(--muted); font-size: .88rem; line-height: 1.6; }
.card h2 + .muted, .message:not(:empty), .transcript { margin-top: 9px; }
.message.error { color: #a33229; }
audio { width: 100%; height: 38px; }
.transcript { padding: 12px; background: #f3f8f4; border-radius: 9px; }
.transcript p { line-height: 1.6; margin-bottom: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.conversation { min-height: 108px; max-height: 310px; overflow-y: auto; display: grid; align-content: start; gap: 9px; padding: 11px; border-radius: 10px; background: #f5f8f6; }
.bubble { max-width: 94%; border-radius: 9px; padding: 8px 11px; background: white; border: 1px solid #e0e9e3; line-height: 1.55; font-size: .88rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.user { justify-self: end; background: #dcefe3; }
.result-title { margin: 12px 0 8px; font-weight: 700; color: var(--green); }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0; font-size: .88rem; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
pre { max-height: 330px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: #f5f8f6; padding: 10px; border-radius: 8px; }

@media (max-width: 800px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .shell { width: calc(100% - 24px); }
  .bar { gap: 8px; min-height: 60px; }
  nav { gap: 10px; }
  .intro { padding-top: 29px; }
  .card { padding: 15px; }
  .fields { grid-template-columns: 1fr; }
}
