:root {
  color-scheme: light;
  --ink: #101828;
  --muted: #667085;
  --line: #d0d5dd;
  --soft-line: #e4e7ec;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --brand: #175cd3;
  --brand-dark: #0b4a9f;
  --brand-soft: #eff8ff;
  --success: #067647;
  --warning: #b54708;
  --warning-bg: #fffaeb;
  --shadow: 0 18px 60px rgb(16 24 40 / 10%);
  font-family: Inter, Pretendard, "Noto Sans KR", "Malgun Gothic", AppleSDGothicNeo, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: #f5f7fa;
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 14% 0%, rgb(213 233 255 / 68%), transparent 32rem),
    linear-gradient(180deg, #fbfdff 0, #f5f7fa 720px);
}

button,
input {
  font: inherit;
}

button:focus-visible,
[role="button"]:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(21 112 239 / 30%);
  outline-offset: 3px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1160px, calc(100% - 40px));
  height: 76px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: var(--ink);
  font-size: 17px;
  font-weight: 780;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  box-shadow: 0 7px 18px rgb(23 92 211 / 24%);
}

.local-badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 11px;
  border: 1px solid #abefc6;
  border-radius: 999px;
  background: #ecfdf3;
  color: #05603a;
  font-size: 13px;
  font-weight: 700;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #17b26a;
  box-shadow: 0 0 0 4px rgb(23 178 106 / 13%);
}

main {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  padding: 88px 0 58px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 850px;
  margin: 0 auto;
  font-size: clamp(42px, 6.4vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.hero-copy {
  max-width: 690px;
  margin: 25px auto 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.75;
  letter-spacing: -0.015em;
}

.drop-zone {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  max-width: 900px;
  min-height: 174px;
  margin: 50px auto 0;
  padding: 30px 34px;
  border: 1.5px dashed #84adff;
  border-radius: 24px;
  background: rgb(255 255 255 / 88%);
  box-shadow: var(--shadow);
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.drop-zone[data-drag="true"] {
  border-color: var(--brand);
  background: #f5faff;
  box-shadow: 0 20px 70px rgb(23 92 211 / 18%);
  transform: translateY(-2px);
}

.drop-zone[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.72;
}

.file-icon {
  display: grid;
  width: 74px;
  height: 88px;
  place-items: center;
  border: 1px solid #b2ccff;
  border-radius: 13px;
  background: linear-gradient(150deg, #fff 0%, #eaf2ff 100%);
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.03em;
  box-shadow: 0 10px 28px rgb(23 92 211 / 12%);
}

.file-icon span {
  display: block;
  line-height: 1.05;
  text-align: center;
}


.drop-title {
  margin: 0;
  font-size: 20px;
  font-weight: 780;
  letter-spacing: -0.025em;
}

.drop-help {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 760;
  letter-spacing: -0.015em;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.button:not(:disabled):active {
  transform: translateY(1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 18px rgb(23 92 211 / 19%);
}

.button-primary:not(:disabled):hover {
  background: var(--brand-dark);
}

.button-secondary,
.button-quiet {
  border-color: var(--line);
  background: #fff;
  color: #344054;
}

.button-secondary:not(:disabled):hover,
.button-quiet:not(:disabled):hover {
  border-color: #98a2b3;
  background: var(--surface-soft);
}

.button-quiet {
  min-height: 40px;
  font-size: 14px;
}

.privacy-state {
  margin: 18px auto 0;
  color: var(--success);
  font-size: 13px;
  font-weight: 700;
}

.status-panel,
.result-panel {
  border: 1px solid var(--soft-line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.status-panel {
  display: flex;
  gap: 22px;
  align-items: center;
  max-width: 900px;
  margin: 6px auto 70px;
  padding: 28px 32px;
}

.status-panel[hidden],
.result-panel[hidden],
.warning-panel[hidden] {
  display: none;
}

.spinner {
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  border: 4px solid #d1e9ff;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

.status-content {
  flex: 1;
  min-width: 0;
}

.status-content h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.status-content p {
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 14px;
}

progress {
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #eaecf0;
}

progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #eaecf0;
}

progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--brand);
  transition: width 160ms ease;
}

progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--brand);
}

.result-panel {
  margin: 10px 0 78px;
  padding: 30px;
}

.result-heading {
  display: flex;
  gap: 26px;
  align-items: flex-start;
  justify-content: space-between;
}

.result-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.04em;
}

.file-details {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.warning-panel {
  margin: 24px 0 0;
  padding: 16px 18px;
  border: 1px solid #fedf89;
  border-radius: 12px;
  background: var(--warning-bg);
  color: #7a2e0e;
  font-size: 14px;
}

.warning-panel ul {
  margin: 7px 0 0;
  padding-left: 20px;
}

.warning-panel li + li {
  margin-top: 4px;
}

.batch-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr) auto;
  gap: 18px;
  align-items: end;
  margin: 24px 0 0;
  padding: 20px;
  border: 1px solid #b2ccff;
  border-radius: 15px;
  background: var(--brand-soft);
}

.batch-panel[hidden] {
  display: none;
}

.batch-panel strong {
  font-size: 15px;
}

.batch-panel p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.document-picker-label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 12px;
  font-weight: 760;
}

.document-picker-label select {
  width: 100%;
  min-height: 44px;
  padding: 8px 36px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.download-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 25px 0 20px;
  padding: 16px;
  border: 1px solid var(--soft-line);
  border-radius: 15px;
  background: var(--surface-soft);
}

.download-label {
  margin-right: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.preview-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #eaecf0;
}

.preview-toolbar {
  display: flex;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: #f9fafb;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.preview-shell iframe {
  display: block;
  width: 100%;
  height: min(920px, 80vh);
  border: 0;
  background: #fff;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 24px 0 92px;
}

.trust-grid article {
  min-height: 230px;
  padding: 27px;
  border: 1px solid var(--soft-line);
  border-radius: 20px;
  background: rgb(255 255 255 / 72%);
}

.trust-number {
  color: var(--brand);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.trust-grid h2 {
  margin: 41px 0 10px;
  font-size: 21px;
  letter-spacing: -0.03em;
}

.trust-grid p,
.limits-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.limits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  margin-bottom: 110px;
  padding: 46px;
  border-radius: 24px;
  background: #101828;
  color: #fff;
}

.limits .eyebrow {
  color: #84adff;
}

.limits h2 {
  margin: 0;
  font-size: clamp(27px, 4vw, 42px);
  line-height: 1.25;
  letter-spacing: -0.045em;
}

.limits-copy {
  display: grid;
  gap: 18px;
  align-content: center;
}

.limits-copy p {
  color: #d0d5dd;
}

footer {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 42px;
  border-top: 1px solid var(--soft-line);
  color: var(--muted);
  font-size: 12px;
}

footer p {
  margin: 0;
}

@media (max-width: 820px) {
  .hero {
    padding-top: 58px;
  }

  .drop-zone {
    grid-template-columns: auto 1fr;
  }

  .drop-zone .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .trust-grid,
  .limits {
    grid-template-columns: 1fr;
  }

  .batch-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .limits {
    gap: 32px;
  }
}

@media (max-width: 560px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 1160px);
  }

  .local-badge {
    padding: 7px 9px;
    font-size: 11px;
  }

  .hero {
    padding-top: 44px;
  }

  h1 {
    font-size: 41px;
  }

  .drop-zone {
    display: flex;
    min-height: 0;
    flex-direction: column;
    padding: 25px 20px;
    text-align: center;
  }

  .file-icon {
    width: 62px;
    height: 74px;
  }

  .status-panel {
    align-items: flex-start;
    padding: 23px 20px;
  }

  .result-panel {
    padding: 21px 16px;
  }

  .result-heading {
    flex-direction: column;
  }

  .download-bar .button {
    width: 100%;
  }

  .download-label {
    width: 100%;
  }

  .trust-grid {
    margin-bottom: 65px;
  }

  .limits {
    margin-bottom: 70px;
    padding: 31px 24px;
  }

  footer {
    flex-direction: column;
    gap: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
