:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --panel: #ffffff;
  --ink: #132033;
  --muted: #667085;
  --line: #dfe4ec;
  --soft-line: #edf0f5;
  --green: #006b42;
  --green-soft: #eaf8ef;
  --rose: #d92d69;
  --rose-soft: #ffe8f1;
  --amber: #b85d00;
  --amber-soft: #fff8e6;
  --blue: #1d4ed8;
  --shadow: 0 16px 45px rgba(17, 25, 40, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(223, 228, 236, 0.82);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

.brand,
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.brand {
  font-size: 18px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
}

.header-actions a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.header-actions a:hover,
.language-select:hover {
  background: var(--soft-line);
  color: var(--ink);
}

.language-control {
  display: flex;
  align-items: center;
}

.language-select {
  min-height: 38px;
  max-width: 148px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(45deg, transparent 50%, #5f6675 50%) calc(100% - 17px) 16px / 6px 6px no-repeat,
    linear-gradient(135deg, #5f6675 50%, transparent 50%) calc(100% - 12px) 16px / 6px 6px no-repeat,
    #fff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  appearance: none;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 72px;
}

.intro-section {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 24px;
  align-items: stretch;
}

.intro-copy,
.upload-panel,
.guide-section,
.faq-section,
.policy-link-section,
.result-section,
.policy-hero,
.policy-list article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.intro-copy {
  min-height: 365px;
  padding: clamp(28px, 5vw, 54px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
}

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

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.22;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(36px, 7vw, 64px);
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(24px, 4vw, 34px);
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.intro-copy p:last-child {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.upload-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(22px, 4vw, 32px);
}

.dropzone {
  position: relative;
  display: grid;
  min-height: 190px;
  place-items: center;
  padding: 24px;
  border: 2px dashed #b8c2d1;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f4f8ff);
  text-align: center;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.dropzone.dragging,
.dropzone:hover {
  border-color: var(--blue);
  background: #eef5ff;
}

.dropzone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone-content {
  display: grid;
  gap: 8px;
}

.dropzone-content strong {
  font-size: 22px;
}

.dropzone-content span,
.privacy-note,
.file-list {
  color: var(--muted);
  font-size: 14px;
}

.file-list {
  min-height: 24px;
}

.primary-button,
.secondary-button,
.sort-button,
.tab-button,
.icon-actions button {
  border: 1px solid transparent;
  border-radius: 8px;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.primary-button {
  min-height: 52px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

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

.primary-button:not(:disabled):hover,
.secondary-button:hover,
.icon-actions button:hover {
  transform: translateY(-1px);
}

.privacy-note {
  margin: 0;
}

.error-message {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #ffb4b4;
  border-radius: 8px;
  background: #fff0f0;
  color: #a40000;
  font-weight: 700;
}

.guide-section,
.faq-section,
.policy-link-section,
.result-section {
  margin-top: 24px;
  padding: clamp(22px, 4vw, 34px);
}

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

.guide-grid article {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fbfcfe;
}

.step-number {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 900;
}

.guide-grid p,
.notice-box p,
.faq-section p,
.policy-hero p,
.policy-list p,
.policy-list li {
  color: var(--muted);
}

.notice-box,
.warning-box {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid #ffc64b;
  border-radius: 8px;
  background: var(--amber-soft);
  color: var(--amber);
}

.notice-box {
  display: block;
}

.notice-box strong {
  display: block;
  margin-bottom: 4px;
}

.notice-box p,
.warning-box p {
  margin: 0;
}

.result-section {
  background: #fff;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.result-header h2 {
  margin-bottom: 0;
  font-size: clamp(22px, 4vw, 30px);
}

.icon-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.icon-actions button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
  font-size: 19px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  border-radius: 8px;
  background: var(--green-soft);
}

.summary-strip div {
  display: grid;
  justify-items: center;
  gap: 3px;
}

.summary-strip strong {
  color: var(--green);
  font-size: 22px;
  line-height: 1.2;
}

.summary-strip span {
  color: #064d33;
  font-size: 14px;
  font-weight: 700;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 18px;
  padding: 4px;
  border-radius: 8px;
  background: #f0f0f3;
}

.tab-button {
  min-height: 38px;
  background: transparent;
  color: #5f6675;
  font-weight: 800;
}

.tab-button.active {
  background: #fff;
  border-color: var(--soft-line);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(17, 25, 40, 0.06);
}

.sort-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 18px 0 10px;
}

.sort-button {
  min-height: 34px;
  padding: 0 14px;
  background: #fff;
  border-color: var(--soft-line);
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
}

.sort-button.active {
  background: var(--rose-soft);
  border-color: var(--rose-soft);
  color: var(--rose);
}

.result-list {
  max-height: min(540px, 68vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.result-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 68px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}

.result-item:last-child {
  border-bottom: 0;
}

.account-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #0b1b33;
  font-size: 16px;
  font-weight: 800;
}

.copy-account-button {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: #eef2f7;
  color: #6b7280;
  font-size: 13px;
}

.account-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: #8a93a3;
  font-size: 13px;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #f4f5f7;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.empty-state {
  padding: 48px 20px;
  color: var(--muted);
  text-align: center;
}

.result-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  background: #fff;
  border-color: var(--line);
  color: #111827;
  font-weight: 800;
}

.accordion {
  display: grid;
  gap: 10px;
}

.accordion details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.accordion summary {
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 900;
}

.accordion p {
  margin: 0;
  padding: 0 20px 18px;
}

.policy-link-section {
  text-align: center;
}

.policy-link-section a {
  color: var(--blue);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.policy-page {
  width: min(960px, calc(100% - 32px));
}

.policy-hero {
  padding: clamp(28px, 5vw, 50px);
}

.policy-hero h1 {
  font-size: clamp(34px, 6vw, 54px);
}

.policy-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.policy-list article {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px;
  padding: clamp(22px, 4vw, 30px);
}

.policy-list article > span {
  color: var(--green);
  font-size: 22px;
  font-weight: 900;
}

.policy-list h2 {
  margin-bottom: 8px;
  font-size: 24px;
}

.policy-list h3 {
  color: #374151;
  font-size: 16px;
}

.policy-list ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

@media (max-width: 860px) {
  .site-header {
    padding: 0 16px;
    min-height: 72px;
  }

  main {
    width: min(100% - 24px, 680px);
    padding-top: 24px;
  }

  .intro-section,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .intro-copy {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .brand {
    font-size: 16px;
  }

  .header-actions {
    gap: 4px;
  }

  .header-actions a {
    padding: 7px 8px;
    font-size: 13px;
  }

  .language-select {
    max-width: 118px;
    min-height: 34px;
    padding-left: 9px;
    padding-right: 26px;
    font-size: 12px;
  }

  h1 {
    font-size: 40px;
  }

  .summary-strip {
    padding: 14px 8px;
  }

  .tabs {
    grid-template-columns: 1fr;
  }

  .sort-row,
  .result-footer {
    justify-content: stretch;
  }

  .sort-button,
  .result-footer .secondary-button {
    flex: 1;
  }

  .result-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .result-meta {
    justify-items: start;
  }

  .policy-list article {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
