:root {
  color-scheme: light;
  --bg: #f5f7f4;
  --surface: #ffffff;
  --surface-muted: #edf4f0;
  --ink: #15211d;
  --muted: #66736d;
  --line: #d8e1dc;
  --primary: #0f7c72;
  --primary-dark: #0a5d56;
  --accent: #f06143;
  --accent-dark: #c9462d;
  --focus: #255ce8;
  --shadow: 0 18px 48px rgba(21, 33, 29, 0.12);
  font-family:
    Inter, Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(180deg, rgba(15, 124, 114, 0.12), rgba(245, 247, 244, 0) 36rem),
    linear-gradient(90deg, rgba(240, 97, 67, 0.08), rgba(245, 247, 244, 0) 42rem);
}

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
.dropzone:focus-within,
a:focus-visible {
  outline: 3px solid rgba(37, 92, 232, 0.35);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  padding: 0.8rem 5vw;
  border-bottom: 1px solid rgba(216, 225, 220, 0.8);
  background: rgba(245, 247, 244, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: max-content;
  font-weight: 800;
}

.brand-mark {
  position: relative;
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: linear-gradient(135deg, var(--primary) 0 50%, var(--accent) 50% 100%);
  box-shadow: 4px 4px 0 rgba(21, 33, 29, 0.16);
}

.brand-mark::after {
  position: absolute;
  right: -0.35rem;
  bottom: -0.35rem;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--ink);
  border-radius: 5px;
  background: var(--surface);
  content: "";
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.site-nav a {
  min-height: 40px;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.site-nav a:hover {
  background: rgba(15, 124, 114, 0.1);
  color: var(--ink);
}

.tool-hero {
  width: min(1180px, 90vw);
  margin: 0 auto;
  padding: 3.35rem 0 4.5rem;
}

.hero-intro {
  margin-bottom: 1.4rem;
}

.hero-copy {
  max-width: 780px;
  margin-bottom: 1rem;
}

.hero-copy p:last-child {
  margin-bottom: 0;
}

.hero-examples {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
}

.hero-example {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 26px rgba(21, 33, 29, 0.08);
}

.hero-example-heading {
  margin-bottom: 0.7rem;
}

.hero-example-heading h2 {
  margin-bottom: 0;
  font-size: 1.02rem;
  line-height: 1.32;
}

.hero-example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: start;
}

.hero-example-item {
  min-width: 0;
  margin: 0;
}

.hero-example-item figcaption {
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.hero-example-media {
  display: grid;
  place-items: center;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1921;
}

.hero-example-media.checker-media {
  background-color: #ffffff;
}

.hero-example-media.checker-media img {
  border: 1px solid var(--line);
  border-radius: 6px;
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #d8e1dc 25%, transparent 25%),
    linear-gradient(-45deg, #d8e1dc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d8e1dc 75%),
    linear-gradient(-45deg, transparent 75%, #d8e1dc 75%);
  background-position:
    0 0,
    0 8px,
    8px -8px,
    -8px 0;
  background-size: 16px 16px;
}

.hero-example-media img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 0.45rem;
  color: var(--primary-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 1rem;
  font-size: 2.65rem;
  line-height: 1.17;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0.9rem;
  font-size: 1.65rem;
  line-height: 1.28;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.45rem;
  font-size: 1.05rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.hero-copy p,
.content-wrap > p,
.two-column p,
.feature-list p {
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(320px, 1.18fr);
  gap: 1rem;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.upload-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.2rem;
}

.preview-panel {
  padding: 1.2rem;
}

.panel-heading {
  margin-bottom: 0.2rem;
}

.panel-heading h2 {
  margin-bottom: 0;
  font-size: 1.25rem;
}

.split-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  min-width: 82px;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--primary-dark);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 1.2rem;
  border: 2px dashed #94aaa0;
  border-radius: 8px;
  background:
    linear-gradient(45deg, rgba(15, 124, 114, 0.06) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(15, 124, 114, 0.06) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(15, 124, 114, 0.06) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(15, 124, 114, 0.06) 75%);
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0;
  background-size: 20px 20px;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.drop-content {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.dropzone strong {
  display: block;
  margin-top: 0.85rem;
  font-size: 1.03rem;
  line-height: 1.35;
}

.drop-content span:last-child {
  display: block;
  max-width: 19rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.drop-symbol {
  display: inline-grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 8px;
  background: var(--surface);
  color: var(--primary-dark);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 0 0 1px var(--line);
}

.dropzone.is-dragging {
  border-color: var(--accent);
  background-color: rgba(240, 97, 67, 0.1);
  transform: translateY(-2px);
}

.dropzone.is-busy {
  cursor: progress;
  opacity: 0.72;
}

.original-preview {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.78);
}

.dropzone.has-preview {
  min-height: 280px;
  border-style: solid;
}

.dropzone.has-preview .drop-content {
  display: none;
}

.control-group {
  display: grid;
  gap: 0.55rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
}

.range-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 800;
}

.range-row output {
  min-width: 2.5rem;
  text-align: right;
  color: var(--accent-dark);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.72rem 0.9rem;
  border-radius: 8px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    opacity 160ms ease;
}

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

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

.button.primary {
  background: var(--primary);
  color: #ffffff;
}

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

.button.secondary {
  background: #21302b;
  color: #ffffff;
}

.button.secondary:hover:not(:disabled) {
  background: #111a17;
}

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

.button.accent {
  background: var(--accent);
  color: #ffffff;
}

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

.button.wide {
  grid-column: 1 / -1;
}

.scale-field,
.format-field {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.scale-field input,
.format-field select {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--ink);
  font-weight: 800;
}

.format-field select:not(:disabled) {
  cursor: pointer;
}

.status {
  min-height: 3.2rem;
  margin: 0;
  padding: 0.8rem;
  border-radius: 8px;
  background: #19241f;
  color: #eaf2ee;
  font-size: 0.92rem;
}

.canvas-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 450px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
}

.canvas-frame.has-result {
  background: #ffffff;
}

.preview-panel canvas {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 62vh;
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #d8e1dc 25%, transparent 25%),
    linear-gradient(-45deg, #d8e1dc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d8e1dc 75%),
    linear-gradient(-45deg, transparent 75%, #d8e1dc 75%);
  background-position:
    0 0,
    0 12px,
    12px -12px,
    -12px 0;
  background-size: 24px 24px;
  box-shadow: 0 10px 28px rgba(21, 33, 29, 0.18);
}

.empty-preview {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.empty-preview span {
  max-width: 18rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.image-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1rem 0 0;
}

.image-meta div {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
}

.image-meta dt {
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.image-meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
}

.content-section {
  padding: 4.5rem 0;
  background: rgba(255, 255, 255, 0.65);
  border-top: 1px solid rgba(216, 225, 220, 0.8);
}

.content-section.muted {
  background: var(--surface-muted);
}

.content-wrap {
  width: min(1040px, 90vw);
  margin: 0 auto;
}

.content-wrap p:last-child {
  margin-bottom: 0;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.comparison-item {
  min-width: 0;
  margin: 0;
}

.comparison-item figcaption {
  display: grid;
  gap: 0.15rem;
  margin-bottom: 0.7rem;
}

.comparison-item figcaption strong {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 800;
}

.comparison-item figcaption span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.comparison-media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
}

.comparison-media.portrait-media {
  aspect-ratio: 3 / 4;
}

.comparison-media img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  object-fit: contain;
}

.comparison-media img.checker-image {
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #d8e1dc 25%, transparent 25%),
    linear-gradient(-45deg, #d8e1dc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d8e1dc 75%),
    linear-gradient(-45deg, transparent 75%, #d8e1dc 75%);
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0;
  background-size: 20px 20px;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.feature-list article {
  min-width: 0;
  padding-top: 1rem;
  border-top: 3px solid var(--primary);
}

.feature-list article:nth-child(even) {
  border-color: var(--accent);
}

.faq-list {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.faq-list article {
  min-width: 0;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--line);
}

.faq-list h3 {
  margin-bottom: 0.35rem;
}

.inline-link,
.rich-text a {
  color: var(--primary-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(300px, 1.3fr);
  gap: 2.5rem;
  align-items: start;
}

.info-main {
  background: rgba(255, 255, 255, 0.65);
}

.info-hero {
  width: min(980px, 90vw);
  margin: 0 auto;
  padding: 4.2rem 0 2rem;
}

.info-hero p {
  max-width: 760px;
  color: var(--muted);
}

.updated-note {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--primary-dark);
  font-size: 0.88rem;
  font-weight: 800;
}

.rich-text {
  width: min(980px, 90vw);
  margin: 0 auto;
  padding: 0 0 4.5rem;
}

.rich-text section {
  padding: 1.55rem 0;
  border-top: 1px solid var(--line);
}

.rich-text h2 {
  font-size: 1.35rem;
}

.rich-text ul {
  margin: 0;
  padding-left: 1.25rem;
}

.rich-text li + li {
  margin-top: 0.45rem;
}

.contact-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.contact-option {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.contact-option h3 {
  margin-bottom: 0.35rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 5vw;
  background: #14201c;
  color: #eef6f2;
}

.site-footer div {
  display: grid;
  gap: 0.15rem;
}

.site-footer span,
.site-footer a {
  color: #b8c8c1;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.site-footer a {
  font-weight: 800;
}

@media (max-width: 960px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .tool-hero {
    padding-top: 3rem;
  }

  h1 {
    font-size: 2.1rem;
  }

  .workspace,
  .comparison-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .feature-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .site-header {
    min-height: auto;
    padding: 0.75rem 1rem;
  }

  .site-nav a {
    padding: 0.4rem 0.55rem;
    font-size: 0.88rem;
  }

  .tool-hero,
  .content-wrap {
    width: min(100% - 2rem, 1040px);
  }

  .tool-hero {
    padding-top: 2rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  .hero-copy {
    margin-bottom: 0.8rem;
  }

  .hero-examples {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .control-grid,
  .image-meta,
  .feature-list {
    grid-template-columns: 1fr;
  }

  .hero-example {
    padding: 0.65rem;
  }

  .hero-example-heading {
    margin-bottom: 0.45rem;
  }

  .hero-example-heading h2 {
    font-size: 0.94rem;
  }

  .hero-example-media {
    padding: 0.35rem;
  }

  .button.wide {
    grid-column: auto;
  }

  .dropzone {
    min-height: 190px;
  }

  .canvas-frame {
    min-height: 310px;
  }

  .preview-panel canvas {
    max-height: 52vh;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .info-hero,
  .rich-text {
    width: min(100% - 2rem, 980px);
  }
}
