:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #1b2330;
  --muted: #687385;
  --line: #dbe3ef;
  --primary: #31c84b;
  --primary-dark: #24a53a;
  --accent: #1976ff;
  --warn-bg: #fff7e8;
  --warn-line: #ffb54a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
}
code { word-break: break-all; }
.app-shell {
  width: min(880px, 100%);
  margin: 0 auto;
  padding: 20px 16px 40px;
}
.hero { margin-bottom: 16px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 600;
}
.hero h1 { margin: 0 0 10px; font-size: clamp(28px, 6vw, 40px); }
.subtitle { margin: 0; color: var(--muted); line-height: 1.6; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin-top: 16px;
  box-shadow: 0 8px 30px rgba(20, 34, 66, 0.05);
}
.panel h2 { margin: 0 0 14px; font-size: 20px; }
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  font: inherit;
  resize: vertical;
  min-height: 120px;
}
.camera {
  width: 100%;
  margin-top: 12px;
  border-radius: 14px;
  background: #111;
}
.actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.actions.wrap { flex-wrap: wrap; }
.actions.two-col { flex-wrap: wrap; }
button,
.button-like {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  background: #edf2fb;
  cursor: pointer;
}
button.primary,
.button-like.primary {
  background: var(--primary);
  color: white;
}
.button-like.success { background: #e6f9ea; color: #14752a; }
button:hover,
.button-like:hover { filter: brightness(0.98); }
button:disabled,
.button-like[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  filter: none;
}
.muted { color: var(--muted); line-height: 1.6; }
.hidden { display: none; }
.result .stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.result article {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fbfdff;
}
.label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}
.result strong { font-size: 18px; }
.callout {
  margin-top: 14px;
  border-radius: 14px;
  padding: 14px;
}
.callout.warning {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
}
.callout p { margin: 8px 0 0; line-height: 1.6; }
summary { cursor: pointer; font-weight: 600; }
ol { padding-left: 20px; }
@media (max-width: 640px) {
  .actions { flex-direction: column; }
  button, .button-like { width: 100%; }
}
