:root {
  color-scheme: light;
  --ink: #211f1d;
  --muted: #6f6964;
  --line: #e7e2dd;
  --paper: #faf8f6;
  --panel: #ffffff;
  --accent: #e95d2f;
  --accent-dark: #b53f1e;
  --soft: #f4f0ec;
  font-family: "Pretendard", "Apple SD Gothic Neo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, textarea, select { font: inherit; }
.site-header { align-items: center; border-bottom: 1px solid var(--line); display: flex; padding: 20px clamp(20px, 6vw, 88px); }
.brand { color: var(--ink); font-size: 20px; font-weight: 800; text-decoration: none; }
.brand span { color: var(--accent); margin: 0 3px; }
.shell { margin: 0 auto; max-width: 1080px; padding: 64px 20px 110px; }
h1, h2 { letter-spacing: -.04em; line-height: 1.12; margin: 0; }
.nowrap { white-space: nowrap; }
h1 { font-size: clamp(24px, 5.6vw, 44px); }
h2 { font-size: clamp(20px, 4.4vw, 30px); }
.intro > p:last-child { color: var(--muted); font-size: 17px; line-height: 1.6; margin: 18px 0 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 18px 55px rgb(33 31 29 / 6%); margin-top: 38px; padding: clamp(20px, 4vw, 38px); }
.field-heading, .upload-row, .form-row, .results-heading { align-items: center; display: flex; gap: 14px; justify-content: space-between; }
.field-heading label, .form-row label { font-size: 15px; font-weight: 800; }
.field-heading span, #file-name { color: var(--muted); font-size: 13px; }
.upload-row { justify-content: flex-start; margin-top: 14px; }
.file-button, .secondary-button, .text-button { background: var(--soft); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 700; padding: 11px 15px; }
.text-button { background: transparent; border-color: transparent; color: var(--accent-dark); padding-inline: 8px; }
#source-file { height: 1px; opacity: 0; position: absolute; width: 1px; }
textarea { border: 1px solid var(--line); border-radius: 14px; color: var(--ink); display: block; line-height: 1.8; margin-top: 14px; min-height: 220px; padding: 15px; resize: vertical; width: 100%; }
textarea:focus, select:focus, button:focus-visible, .file-button:focus-visible { border-color: var(--accent); outline: 3px solid rgb(233 93 47 / 18%); }
.form-row { justify-content: flex-start; margin-top: 24px; }
select { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); padding: 11px 12px; }
.status { color: var(--muted); font-size: 13px; line-height: 1.6; }
.primary-button { background: var(--accent); border: 0; border-radius: 999px; color: #fff; cursor: pointer; font-weight: 800; margin-top: 18px; padding: 15px 22px; }
.primary-button:hover { background: var(--accent-dark); }
.primary-button:disabled { cursor: not-allowed; opacity: .45; }
.results { margin-top: 78px; }
.results-heading { align-items: flex-end; }
.classification { color: var(--muted); font-size: 13px; margin: 0; }
.candidate-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; }
.candidate { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; display: flex; flex-direction: column; min-width: 0; padding: 20px; }
.candidate h3 { font-size: 14px; margin: 0; }
.candidate pre { background: var(--soft); border-radius: 12px; flex: 1; margin: 14px 0; min-height: 240px; overflow: auto; padding: 16px; white-space: pre-wrap; word-break: break-word; }
.candidate button { background: var(--ink); border: 0; border-radius: 999px; color: #fff; cursor: pointer; font-weight: 700; padding: 12px; }
.candidate button:disabled, .secondary-button:disabled { cursor: wait; opacity: .6; }
.candidate.selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(233 93 47 / 12%); }
.secondary-button { margin-top: 14px; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; padding: 20px clamp(20px, 6vw, 88px) 28px; }
@media (max-width: 700px) { .site-header { align-items: flex-start; flex-direction: column; gap: 8px; } .shell { padding-top: 48px; } .candidate-grid { grid-template-columns: 1fr; } .results-heading { align-items: flex-start; flex-direction: column; } .upload-row { align-items: flex-start; flex-direction: column; } }
