:root {
  --ink: #172018;
  --muted: #6b746e;
  --paper: #f7f0e4;
  --panel: #fffdf8;
  --line: #ded2bf;
  --green: #245d43;
  --green-dark: #153a28;
  --sand: #e8dcc8;
  --amber: #c9773a;
  --red: #a33b32;
  --shadow: rgba(46, 34, 18, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(201, 119, 58, 0.20), transparent 28rem),
    radial-gradient(circle at 86% 4%, rgba(36, 93, 67, 0.18), transparent 30rem),
    linear-gradient(135deg, #fbf7ef 0%, var(--paper) 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

.page {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 90px;
}

.top {
  display: grid;
  place-items: center;
  gap: 12px;
  margin: 18px 0 36px;
  text-align: center;
}

.eyebrow {
  margin: 0;
  color: var(--amber);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.22em;
}

.brand {
  margin: 0;
  color: var(--green-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 9vw, 96px);
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 0.9;
}

.tagline {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.upload-card,
.settings-card,
.progress-card,
.download-card {
  margin: 18px 0;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 22px 60px var(--shadow);
  backdrop-filter: blur(12px);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.035em;
}

h1 {
  font-size: clamp(30px, 5vw, 44px);
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 18px;
}

.soft {
  color: var(--muted);
  line-height: 1.6;
}

.privacy-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid #d8e5d7;
  border-radius: 16px;
  color: var(--green-dark);
  background: #eff8ef;
  font-weight: 800;
  line-height: 1.55;
}

.drop-zone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 180px;
  margin-top: 20px;
  padding: 28px;
  border: 2px dashed #cabca7;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(247, 240, 228, 0.88));
  cursor: pointer;
  transition: 160ms ease;
}

.drop-zone:hover,
.drop-zone.dragging {
  border-color: var(--green);
  transform: translateY(-1px);
}

.drop-zone input {
  display: none;
}

.drop-zone span {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding: 0 24px;
  border-radius: 999px;
  color: white;
  background: var(--green);
  font-weight: 900;
}

.drop-zone small {
  color: var(--muted);
}

.message {
  margin: 18px 0 0;
  color: var(--muted);
  font-weight: 750;
}

.message.ok {
  color: var(--green);
}

.message.error {
  color: var(--red);
}

.hidden {
  display: none !important;
}

.notice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 32, 24, 0.38);
  backdrop-filter: blur(8px);
}

.notice-modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: 0 32px 90px rgba(23, 32, 24, 0.28);
}

.notice-modal h2 {
  margin-top: 6px;
}

.notice-modal p,
.notice-modal li {
  color: var(--muted);
  line-height: 1.65;
  font-weight: 700;
}

.notice-modal ul {
  margin: 16px 0 0;
  padding-left: 20px;
}

.notice-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.notice-actions button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  background: white;
  color: var(--ink);
  font-weight: 950;
  cursor: pointer;
}

.notice-actions button:last-child {
  border-color: var(--green);
  color: white;
  background: var(--green);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 26px;
}

.estimate {
  min-width: 190px;
  padding: 14px 16px;
  border-radius: 18px;
  color: var(--green-dark);
  background: #eef7ef;
  font-weight: 900;
  text-align: center;
}

.estimate.danger {
  color: var(--red);
  background: #fff0ed;
}

.estimate.warning {
  color: #815315;
  background: #fff4d8;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 18px;
  align-items: start;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 850;
}

.control-field {
  align-content: start;
}

.field-label {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 24px;
}

.hint {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid #cdbda7;
  border-radius: 999px;
  color: var(--green-dark);
  background: #fff8ed;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  cursor: help;
}

.hint::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 12;
  width: min(270px, 72vw);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 14px 38px rgba(46, 34, 18, 0.18);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: 140ms ease;
}

.hint::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  z-index: 13;
  width: 10px;
  height: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  opacity: 0;
  transform: translateX(-50%) rotate(45deg);
  transition: 140ms ease;
}

.hint:hover::after,
.hint:focus::after,
.hint:hover::before,
.hint:focus::before {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hint:hover::before,
.hint:focus::before {
  transform: translateX(-50%) rotate(45deg);
}

label small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

label small.warning-text {
  color: #8a4d12;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 28px;
}

.profile-grid div {
  min-height: 82px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff8ed;
}

.profile-grid .wide {
  grid-column: span 2;
}

.profile-grid .missing-card {
  grid-column: 1 / -1;
  min-height: 72px;
}

.profile-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.profile-grid b {
  display: block;
  margin-top: 8px;
  color: var(--green-dark);
  font-size: 18px;
  line-height: 1.35;
}

.column-warning {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #f0d3a8;
  border-radius: 18px;
  color: #78481d;
  background: #fff6e5;
  font-weight: 850;
  line-height: 1.55;
}

.column-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.checks {
  display: grid;
  max-height: 280px;
  overflow: auto;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffaf2;
}

.check {
  display: grid;
  gap: 4px;
  padding: 8px 9px;
  border-radius: 12px;
  background: white;
  font-weight: 700;
}

.check span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.check input {
  width: auto;
}

.check small {
  display: block;
  padding-left: 24px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.run-button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 24px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--green);
  font-weight: 950;
  cursor: pointer;
}

.run-button:hover {
  filter: brightness(1.05);
}

.run-button:disabled {
  cursor: not-allowed;
  background: #9aa49d;
  filter: none;
}

.advanced-note {
  margin-top: 18px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffaf2;
  color: var(--muted);
}

.advanced-note summary {
  color: var(--ink);
  cursor: pointer;
  font-weight: 950;
}

.advanced-note p {
  margin: 10px 0 0;
}

.progress-card {
  text-align: left;
}

.progress-meter {
  height: 14px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5dbc9;
}

.progress-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #5f9f72);
  transition: width 220ms ease;
}

.progress-percent {
  margin: 8px 0 0;
  color: var(--green-dark);
  font-weight: 950;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  position: relative;
  padding: 16px 16px 16px 42px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffaf2;
  color: var(--muted);
  font-weight: 900;
}

.steps li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 13px;
  height: 13px;
  border: 2px solid #cdbda7;
  border-radius: 999px;
  transform: translateY(-50%);
}

.steps li.active {
  color: var(--green-dark);
  border-color: var(--green);
  background: #edf7ef;
}

.steps li.active::before {
  border-color: var(--green);
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(36, 93, 67, 0.14);
}

.steps li.done {
  color: var(--green);
}

.cancel-button {
  margin-top: 18px;
  border: 1px solid #d9b6a8;
  border-radius: 999px;
  padding: 11px 18px;
  color: #8d3c27;
  background: #fff6f1;
  font-weight: 900;
  cursor: pointer;
}

.cancel-button:hover {
  background: #ffe9df;
}

.download-links {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.retention-note {
  margin: 10px 0 0;
  padding: 12px 14px;
  border: 1px solid #d8e5d7;
  border-radius: 16px;
  color: var(--green-dark);
  background: #eff8ef;
  font-weight: 800;
  line-height: 1.5;
}

.download-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: white;
  text-decoration: none;
  font-weight: 900;
}

.download-link span {
  color: var(--muted);
  font-weight: 700;
}

.site-footer {
  display: grid;
  gap: 8px;
  justify-items: center;
  margin: 34px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--green-dark);
  font-weight: 900;
  text-decoration: none;
}

.site-footer nav {
  display: flex;
  gap: 14px;
}

.legal-page {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 90px;
}

.legal-card {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 22px 60px var(--shadow);
}

.legal-card h1 {
  margin-bottom: 12px;
}

.legal-card h2 {
  margin-top: 28px;
  font-size: 22px;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
  line-height: 1.7;
  font-weight: 700;
}

.legal-card a {
  color: var(--green-dark);
  font-weight: 900;
}

@media (max-width: 760px) {
  .section-head,
  .field-grid,
  .column-box,
  .profile-grid,
  .steps {
    grid-template-columns: 1fr;
    display: grid;
  }

  .profile-grid .wide {
    grid-column: span 1;
  }

  .estimate {
    min-width: 0;
    width: 100%;
  }

  .upload-card,
  .settings-card,
  .progress-card,
  .download-card,
  .notice-modal,
  .legal-card {
    padding: 24px;
    border-radius: 24px;
  }

  .notice-actions {
    display: grid;
  }
}
