:root {
  --bg: #f5f1e9;
  --panel: #fffdf9;
  --line: #d6cfc2;
  --text: #1f1b16;
  --muted: #696258;
  --accent: #0a7a67;
  --accent-deep: #065d4f;
  --warn: #a6342a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Pretendard", "SUIT", "Noto Sans KR", sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 0% 0%, #ffe4c8 0%, transparent 60%),
    radial-gradient(850px 400px at 100% 0%, #cfeee4 0%, transparent 60%),
    linear-gradient(180deg, #faf8f3 0%, #ece7dc 100%);
}

.app {
  width: min(980px, 94vw);
  margin: 32px auto 60px;
  display: grid;
  gap: 14px;
}

.hero h1 {
  margin: 10px 0;
  line-height: 1.2;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--accent-deep);
}

.subtitle {
  margin: 0;
  color: var(--muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 14px 32px rgba(31, 27, 22, 0.08);
}

.input-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.upload-row {
  display: flex;
  gap: 8px;
}

.link-row {
  display: flex;
  gap: 8px;
}

input[type="file"],
input[type="url"] {
  flex: 1;
  border: 1px solid #cabfae;
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  background: #fff;
}

input[type="file"]:focus,
input[type="url"]:focus {
  outline: 2px solid #8ecdbd;
}

.help-text {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(120deg, var(--accent) 0%, #0d9c83 100%);
  color: #fff;
}

.btn.ghost {
  background: #fff;
  border: 1px solid #d8d0c4;
}

.status {
  color: var(--muted);
  font-weight: 700;
}

.status[data-kind="loading"] { color: var(--accent-deep); }
.status[data-kind="success"] { color: #1d7c4f; }
.status[data-kind="error"] { color: var(--warn); }

.panel-header h2 {
  margin: 0;
}

.panel-header p {
  margin: 6px 0 14px;
  color: var(--muted);
}

.stat-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  border: 1px solid #ddd5c7;
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

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

.stat-card strong {
  display: block;
  margin-top: 5px;
  font-size: 1.2rem;
}

.section-title {
  margin: 18px 0 8px;
  font-size: 1rem;
}

.cons-list,
.evidence-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.cons-list li,
.evidence-item,
.empty-item {
  line-height: 1.5;
}

.evidence-item {
  list-style: none;
  margin-left: -18px;
  border: 1px solid #ddd5c7;
  border-left: 5px solid #b44235;
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.evidence-head {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.evidence-text {
  margin: 4px 0 0;
}

@media (max-width: 760px) {
  .upload-row,
  .link-row { flex-direction: column; }
  .stat-grid { grid-template-columns: 1fr; }
}
