@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+KR:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap");

:root {
  --ink: #14201d;
  --muted: #66716d;
  --paper: #f3f0e8;
  --paper-deep: #e8e3d7;
  --panel: rgba(255, 255, 255, 0.7);
  --line: rgba(20, 32, 29, 0.16);
  --green: #0f4d45;
  --green-soft: #bce0d1;
  --mint: #dcefe3;
  --orange: #e9673f;
  --yellow: #f1ca67;
  --danger: #a43f2a;
  --shadow: 0 24px 70px rgba(30, 42, 37, 0.12);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans KR", "Malgun Gothic", sans-serif;
  line-height: 1.55;
}

button,
input,
select {
  font: inherit;
}

button,
a,
.drop-zone {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
.drop-zone:focus-visible {
  outline: 3px solid rgba(233, 103, 63, 0.42);
  outline-offset: 3px;
}

.page-noise {
  position: fixed;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(20, 32, 29, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 32, 29, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 82% 10%, rgba(188, 224, 209, 0.8), transparent 34%),
    radial-gradient(circle at 2% 48%, rgba(241, 202, 103, 0.22), transparent 28%);
  background-size: 38px 38px, 38px 38px, 100% 100%, 100% 100%;
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: Georgia, serif;
  font-size: 1.1rem;
  font-style: italic;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.privacy-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
}

.privacy-chip span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2aa976;
  box-shadow: 0 0 0 5px rgba(42, 169, 118, 0.12);
}

.back-link {
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 70px;
  align-items: center;
  min-height: 600px;
  padding: 82px 0 90px;
}

.eyebrow,
.step-label {
  margin: 0;
  color: var(--orange);
  font-family: "Manrope", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 20px 0 26px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(4rem, 8vw, 7.5rem);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 0.88;
}

.hero h1 em {
  color: var(--green);
  font-family: Georgia, serif;
  font-weight: 400;
}

.hero-lead {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.85;
}

.hero-diagram {
  position: relative;
  display: grid;
  grid-template-columns: 138px 42px 180px;
  align-items: center;
  justify-content: center;
  min-height: 310px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.2);
  transform: rotate(-3deg);
}

.hero-diagram::before,
.hero-diagram::after {
  position: absolute;
  content: "";
  border-radius: 50%;
}

.hero-diagram::before {
  top: -28px;
  right: 54px;
  width: 72px;
  height: 72px;
  background: var(--yellow);
  opacity: 0.8;
}

.hero-diagram::after {
  bottom: 4px;
  left: 28px;
  width: 42px;
  height: 42px;
  background: var(--orange);
  opacity: 0.78;
}

.pixel-sample {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  padding: 7px;
  background: var(--ink);
  box-shadow: 9px 9px 0 rgba(15, 77, 69, 0.18);
}

.pixel-sample span {
  aspect-ratio: 1;
  background: var(--green-soft);
}

.pixel-sample span:nth-child(3n) {
  background: var(--orange);
}

.pixel-sample span:nth-child(5n + 2) {
  background: var(--yellow);
}

.pixel-sample span:nth-child(7n) {
  background: var(--paper);
}

.diagram-arrow {
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 1.1rem;
  font-style: italic;
  text-align: center;
}

.path-sample {
  width: 100%;
  overflow: visible;
}

.path-sample path:first-child {
  fill: var(--green-soft);
  stroke: var(--green);
  stroke-width: 5;
}

.path-sample path:last-child {
  fill: none;
  stroke: var(--orange);
  stroke-linecap: round;
  stroke-width: 7;
}

.converter-shell {
  margin-bottom: 110px;
  padding: clamp(24px, 5vw, 62px);
  border: 1px solid rgba(20, 32, 29, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.workspace-head,
.action-bar,
.queue-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.workspace-head {
  margin-bottom: 34px;
}

.workspace-head h2,
.queue-heading h2,
.guide h2 {
  margin: 6px 0 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.text-button,
.option-heading button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.text-button:disabled,
.option-heading button:disabled {
  cursor: default;
  opacity: 0.38;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.72fr);
  gap: 22px;
}

.upload-column {
  display: grid;
  gap: 14px;
}

.drop-zone {
  display: grid;
  min-height: 340px;
  place-items: center;
  align-content: center;
  gap: 9px;
  padding: 36px;
  border: 2px dashed rgba(15, 77, 69, 0.35);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(220, 239, 227, 0.72), rgba(255, 255, 255, 0.5)),
    repeating-linear-gradient(-45deg, transparent 0 12px, rgba(15, 77, 69, 0.025) 12px 13px);
  cursor: pointer;
  text-align: center;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--orange);
  background: linear-gradient(135deg, rgba(241, 202, 103, 0.24), rgba(255, 255, 255, 0.72));
  transform: translateY(-2px);
}

.drop-zone strong {
  margin-top: 7px;
  font-family: "Manrope", sans-serif;
  font-size: 1.25rem;
}

.drop-zone > span:not(.upload-symbol) {
  color: var(--muted);
  font-size: 0.9rem;
}

.drop-zone small {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.72rem;
}

.upload-symbol {
  display: flex;
  gap: 7px;
}

.upload-symbol span {
  display: inline-flex;
  align-items: flex-end;
  width: 58px;
  height: 70px;
  padding: 8px;
  border: 2px solid var(--green);
  background: var(--paper);
  color: var(--green);
  font-family: "Manrope", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 5px 5px 0 rgba(15, 77, 69, 0.13);
}

.upload-symbol span:last-child {
  margin-top: 14px;
  border-color: var(--orange);
  color: var(--orange);
  transform: rotate(5deg);
}

.local-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: white;
}

.local-note strong {
  color: var(--green-soft);
  font-family: "Manrope", sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.local-note p {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.76rem;
  line-height: 1.55;
}

.options-panel {
  display: grid;
  align-content: start;
  gap: 17px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
}

.option-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-family: "Manrope", sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field output {
  color: var(--green);
  font-family: "Manrope", sans-serif;
}

.field select {
  width: 100%;
  height: 44px;
  padding: 0 38px 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%) calc(100% - 17px) 19px / 5px 5px no-repeat,
    linear-gradient(135deg, var(--ink) 50%, transparent 50%) calc(100% - 12px) 19px / 5px 5px no-repeat,
    rgba(255, 255, 255, 0.76);
  color: var(--ink);
  cursor: pointer;
}

.field input[type="range"] {
  width: 100%;
  height: 7px;
  margin: 8px 0 3px;
  border-radius: 99px;
  appearance: none;
  background: linear-gradient(90deg, var(--green) 0 50%, rgba(20, 32, 29, 0.14) 50% 100%);
  cursor: pointer;
}

.field input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  appearance: none;
  background: var(--orange);
  box-shadow: 0 0 0 1px rgba(20, 32, 29, 0.18);
}

.field input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--orange);
}

.option-help {
  margin: 2px 0 0;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.65;
}

.action-bar {
  margin-top: 24px;
  padding: 22px 0 30px;
  border-bottom: 1px solid var(--line);
}

.queue-summary {
  display: grid;
  gap: 2px;
}

.queue-summary strong {
  font-family: "Manrope", sans-serif;
  font-size: 1.1rem;
}

.queue-summary span {
  color: var(--muted);
  font-size: 0.78rem;
}

.main-actions,
.file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.button,
.mini-button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: transform 150ms ease, opacity 150ms ease, background 150ms ease;
}

.button:hover:not(:disabled),
.mini-button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.button:disabled,
.mini-button:disabled {
  cursor: default;
  opacity: 0.38;
}

.button {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 0.82rem;
}

.button--primary {
  background: var(--orange);
  color: white;
  box-shadow: 0 9px 24px rgba(233, 103, 63, 0.22);
}

.button--secondary {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.message {
  margin-top: 20px;
  padding: 13px 16px;
  border-radius: 9px;
  background: rgba(15, 77, 69, 0.1);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 700;
}

.message.is-error {
  background: rgba(164, 63, 42, 0.1);
  color: var(--danger);
}

.queue-section {
  padding-top: 35px;
}

.queue-heading {
  align-items: start;
  margin-bottom: 22px;
}

.empty-state {
  display: grid;
  min-height: 230px;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(243, 240, 232, 0.58);
  color: var(--muted);
  text-align: center;
}

.empty-state span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--orange);
  font-size: 1.6rem;
  font-weight: 300;
}

.empty-state p {
  margin: 0;
  font-size: 0.82rem;
}

.file-list {
  display: grid;
  gap: 14px;
}

.file-card {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(0, 1.3fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.file-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 210px;
  background-image:
    linear-gradient(45deg, #e1ded5 25%, transparent 25%),
    linear-gradient(-45deg, #e1ded5 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e1ded5 75%),
    linear-gradient(-45deg, transparent 75%, #e1ded5 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.preview-cell {
  position: relative;
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 18px;
  overflow: hidden;
  border-right: 1px solid rgba(20, 32, 29, 0.12);
  background: rgba(255, 255, 255, 0.42);
}

.preview-cell:last-child {
  border-right: 0;
}

.preview-cell > span {
  position: absolute;
  top: 8px;
  left: 9px;
  z-index: 2;
  padding: 4px 7px;
  border-radius: 4px;
  background: rgba(20, 32, 29, 0.76);
  color: white;
  font-family: "Manrope", sans-serif;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.preview-cell img {
  display: block;
  max-width: 100%;
  max-height: 174px;
  object-fit: contain;
}

.preview-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}

.preview-placeholder.is-working::before {
  width: 24px;
  height: 24px;
  margin-bottom: 9px;
  border: 3px solid rgba(15, 77, 69, 0.18);
  border-top-color: var(--green);
  border-radius: 50%;
  content: "";
  animation: spin 800ms linear infinite;
}

.file-info {
  display: grid;
  align-content: center;
  gap: 15px;
  padding: 24px;
}

.file-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.file-name {
  min-width: 0;
}

.file-name strong {
  display: block;
  overflow: hidden;
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-name span,
.file-result-meta {
  color: var(--muted);
  font-size: 0.72rem;
}

.status-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 99px;
  background: rgba(20, 32, 29, 0.08);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.status-badge.is-working {
  background: rgba(241, 202, 103, 0.28);
  color: #735814;
}

.status-badge.is-done {
  background: rgba(42, 169, 118, 0.14);
  color: var(--green);
}

.status-badge.is-error {
  background: rgba(164, 63, 42, 0.11);
  color: var(--danger);
}

.file-result-meta {
  min-height: 1.2em;
}

.mini-button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-size: 0.7rem;
}

.mini-button--ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.mini-button--remove {
  margin-left: auto;
  background: transparent;
  color: var(--danger);
}

.guide {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 70px;
  padding: 20px 0 110px;
}

.guide h2 {
  max-width: 390px;
}

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

.guide-grid article {
  padding-top: 15px;
  border-top: 2px solid var(--ink);
}

.guide-grid article > span {
  color: var(--orange);
  font-family: "Manrope", sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
}

.guide-grid h3 {
  margin: 16px 0 8px;
  font-size: 0.9rem;
}

.guide-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.68;
}

.converter-ad-section {
  padding: 0 0 90px;
}

.converter-ad-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.converter-ad-heading h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

.converter-ad-frame {
  position: relative;
  display: grid;
  min-height: 190px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(220, 239, 227, 0.76), rgba(255, 255, 255, 0.5)),
    var(--paper);
}

.converter-ad-placeholder {
  position: absolute;
  color: var(--muted);
  font-family: "Manrope", sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.converter-ad {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  min-height: 190px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 27px 0 35px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 45px;
    min-height: auto;
    padding: 70px 0;
  }

  .hero-diagram {
    width: min(520px, 100%);
    margin-inline: auto;
  }

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

  .guide {
    gap: 36px;
  }
}

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

  .site-header {
    padding: 18px 0;
  }

  .brand {
    font-size: 0.78rem;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .privacy-chip {
    display: none;
  }

  .hero {
    gap: 32px;
    padding: 50px 0 56px;
  }

  .hero h1 {
    margin: 14px 0 20px;
    font-size: clamp(3.3rem, 17vw, 5.6rem);
  }

  .hero-lead {
    font-size: 0.88rem;
    line-height: 1.72;
  }

  .hero-diagram {
    grid-template-columns: 96px 34px 126px;
    min-height: 230px;
  }

  .converter-shell {
    margin-bottom: 72px;
    padding: 20px 14px;
    border-radius: 19px;
  }

  .workspace-head {
    align-items: center;
    margin-bottom: 22px;
  }

  .workspace-head h2,
  .queue-heading h2,
  .guide h2 {
    font-size: 1.55rem;
  }

  .workspace-grid {
    gap: 14px;
  }

  .drop-zone {
    min-height: 265px;
    padding: 24px 14px;
  }

  .drop-zone strong {
    font-size: 1.04rem;
  }

  .local-note {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .options-panel {
    padding: 18px;
  }

  .action-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .main-actions {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
  }

  .button {
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .file-card {
    grid-template-columns: 1fr;
  }

  .file-preview-grid {
    min-height: 190px;
  }

  .preview-cell img {
    max-height: 150px;
  }

  .file-info {
    padding: 17px;
  }

  .file-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .mini-button--remove {
    margin-left: 0;
  }

  .guide {
    padding-bottom: 72px;
  }

  .converter-ad-section {
    padding-bottom: 64px;
  }

  .converter-ad-frame,
  .converter-ad {
    min-height: 160px;
  }

  .guide-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

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

@media (max-width: 420px) {
  .hero-diagram {
    grid-template-columns: 84px 27px 112px;
  }

  .main-actions {
    grid-template-columns: 1fr;
  }

  .file-preview-grid {
    grid-template-columns: 1fr;
  }

  .preview-cell {
    min-height: 160px;
    border-right: 0;
    border-bottom: 1px solid rgba(20, 32, 29, 0.12);
  }

  .preview-cell:last-child {
    border-bottom: 0;
  }
}
