:root {
  --paper: #ffffff;
  --sheet: #f6f7f9;
  --card: #ffffff;
  --ink: #17191e;
  --muted: #606773;
  --line: #dfe3e9;
  --red: #1769e8;
  --red-dark: #1053bc;
  --yellow: #ffe052;
  --pink: #ff93c9;
  --green: #d8e8cc;
  --shadow: #edf0f5;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img, canvas, svg { display: block; max-width: 100%; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 1rem; top: -5rem; z-index: 100;
  background: var(--ink); color: #fff; padding: .7rem 1rem;
}
.skip-link:focus { top: 1rem; }

.privacy-strip {
  background: var(--ink); color: #f8f0e4; text-align: center;
  padding: .48rem 1rem; font-size: .8rem;
}
.privacy-strip strong { color: var(--yellow); }
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1120px; min-height: 64px; margin: 0 auto; padding: .65rem 1.25rem;
  display: flex; align-items: center; gap: 1.5rem;
}
.brand {
  flex: none; font-size: 1.45rem; line-height: 1; font-weight: 900;
  letter-spacing: -.04em; text-decoration: none;
}
.brand span { color: var(--red); }
.site-nav { display: flex; align-items: center; gap: 1.25rem; margin-left: auto; }
.site-nav a {
  padding: .4rem 0; border-bottom: 2px solid transparent;
  font-size: .9rem; text-decoration: none;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--red-dark); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--red); font-weight: 800; }
.nav-toggle { display: none; }

.container { width: min(1120px, calc(100% - 2.5rem)); margin-inline: auto; }
.page-main { padding: 2.1rem 0 4.5rem; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; margin-bottom: 1.35rem; }
.eyebrow { margin: 0 0 .25rem; font-size: .76rem; letter-spacing: .1em; font-weight: 900; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.035em; }
h1 { margin: 0 0 .55rem; font-size: clamp(2.25rem, 5.2vw, 3.75rem); }
h2 { margin: 3rem 0 .8rem; font-size: clamp(1.55rem, 3vw, 2rem); }
h3 { margin: 0 0 .35rem; font-size: 1.08rem; }
.lead { max-width: 44rem; margin: 0; color: var(--muted); font-size: 1.05rem; }
.hero-stamps { display: flex; gap: .25rem; transform: rotate(-3deg); }
.hero-stamps svg { width: 52px; height: 52px; filter: drop-shadow(0 5px 2px rgb(53 31 13 / .12)); }
.pill-row { display: flex; gap: .45rem; flex-wrap: wrap; margin: 1rem 0 0; }
.pill { border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: .25rem .65rem; font-size: .78rem; }

.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 1.25rem; align-items: start; }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 8px 28px #17294408; overflow: hidden;
}
.editor-empty { padding: 1.15rem; }
.drop-zone {
  min-height: 270px; border: 2px dashed #b7c6dc; border-radius: 16px;
  display: grid; place-items: center; padding: 2rem; text-align: center; cursor: pointer;
  background: #f6f9fd;
  transition: border-color .15s, background-color .15s, transform .15s;
}
.drop-zone:hover, .drop-zone:focus-within, .drop-zone.is-over { border-color: var(--red); transform: translateY(-2px); }
.drop-zone:focus-within { outline: 3px solid var(--yellow); outline-offset: 3px; }
.drop-icon {
  display: block; width: 66px; height: 52px; margin: 0 auto .9rem; border: 3px solid var(--ink);
  border-radius: 8px; position: relative; background: var(--yellow);
}
.drop-icon::before { content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%; background: var(--pink); right: 8px; top: 7px; }
.drop-icon::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 7px; height: 22px; background: var(--green); clip-path: polygon(0 100%, 35% 25%, 55% 65%, 73% 40%, 100% 100%); }
.drop-zone strong { display: block; font-size: 1.12rem; }
.drop-zone > span { display: block; width: 100%; }
.drop-zone span { color: var(--muted); font-size: .88rem; }
.button {
  border: 1px solid var(--ink); border-radius: 999px; background: #fff;
  color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  gap: .35rem; min-height: 42px; padding: .55rem 1rem; font-weight: 800; text-decoration: none;
}
.button:hover:not(:disabled), .button:focus-visible:not(:disabled) { transform: translateY(-1px); box-shadow: 0 3px 0 var(--ink); }
.button.primary { border-color: var(--red); background: var(--red); color: #fff; }
.button.primary:hover:not(:disabled), .button.primary:focus-visible:not(:disabled) { box-shadow: 0 3px 0 var(--red-dark); }
.button.danger { color: #a92b23; border-color: #c9968f; }
.button.small { min-height: 36px; padding: .35rem .75rem; font-size: .84rem; }
.button:disabled { opacity: .48; cursor: not-allowed; }
.upload-button { display: flex; width: max-content; margin: 1rem auto 0; }
.sample-button {
  width: 76px; height: 62px; padding: 2px; border: 2px solid transparent;
  border-radius: 11px; overflow: hidden; background: #fff; cursor: pointer;
}
.sample-button:hover, .sample-button:focus-visible { border-color: var(--red); }
.sample-button img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }
.upload-status { min-height: 1.5rem; margin: .65rem 0 0; text-align: center; color: var(--muted); font-size: .82rem; }
.upload-status[data-kind="error"] { color: #982e25; font-weight: 700; }

.editor-workspace[hidden], .editor-empty[hidden] { display: none; }
.editor-toolbar { padding: 1rem; border-bottom: 1px solid var(--line); background: #f8f9fb; }
.tool-row { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
.tool-row + .tool-row { margin-top: .8rem; }
.tool-label { min-width: 4.5rem; font-size: .82rem; color: var(--muted); font-weight: 800; }
.sticker-list { display: flex; gap: .35rem; flex-wrap: wrap; }
.sticker-button {
  width: 49px; height: 49px; padding: 5px; border: 2px solid transparent;
  border-radius: 14px; background: #fff; cursor: pointer;
}
.sticker-button:hover, .sticker-button:focus-visible { border-color: var(--line); }
.sticker-button[aria-pressed="true"] { border-color: var(--ink); background: var(--yellow); }
.sticker-button svg { width: 100%; height: 100%; }
.effect-list { display: flex; gap: .4rem; flex-wrap: wrap; }
.effect-button[aria-pressed="true"] { border-color: var(--ink); background: var(--yellow); box-shadow: inset 0 0 0 1px var(--ink); }
.range-control { display: inline-flex; align-items: center; gap: .55rem; color: var(--muted); font-size: .82rem; }
.range-control input { width: 150px; accent-color: var(--red); }
.local-badge { border-color: #769665; background: #e6f0dd; color: #245d35; font-weight: 900; }
.editor-status {
  min-height: 2.5rem; margin: 0; padding: .65rem 1rem; background: var(--ink); color: #fff;
  font-size: .85rem;
}
.editor-status[data-kind="error"] { background: #982e25; }
.editor-status[data-kind="success"] { background: #28663c; }
.stage-wrap { padding: 3.5rem 1rem 1rem; background: #edf0f4; overflow: auto; max-height: 72vh; }
.canvas-stage {
  position: relative; width: fit-content; margin: auto;
  background: #d6dbe2; box-shadow: 0 10px 24px rgb(68 43 18 / .18);
  touch-action: none; user-select: none;
}
#editor-canvas { display: block; width: 100%; height: 100%; cursor: crosshair; }
#editor-canvas:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.canvas-stage[data-mode="move"] #editor-canvas { cursor: grab; }
.canvas-stage.is-dragging #editor-canvas { cursor: grabbing; }
.selection-box {
  position: absolute; border: 2px dashed #fff; outline: 2px solid var(--red); pointer-events: none;
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / .45)); transform-origin: center;
}
.selection-handle {
  position: absolute; width: 22px; height: 22px; padding: 0; border: 2px solid #fff; border-radius: 50%;
  background: var(--red); color: #fff; box-shadow: 0 0 0 1px var(--red), 0 2px 5px rgb(0 0 0 / .25);
  pointer-events: auto; touch-action: none; cursor: nwse-resize;
}
.selection-handle:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.selection-handle.nw { left: 0; top: 0; transform: translate(-50%, -50%); }
.selection-handle.ne { right: 0; top: 0; transform: translate(50%, -50%); cursor: nesw-resize; }
.selection-handle.sw { left: 0; bottom: 0; transform: translate(-50%, 50%); cursor: nesw-resize; }
.selection-handle.se { right: 0; bottom: 0; transform: translate(50%, 50%); }
.rotation-stem { position: absolute; left: 50%; top: -34px; width: 2px; height: 32px; background: #fff; transform: translateX(-50%); }
.selection-handle.rotation {
  left: 50%; top: -48px; width: 28px; height: 28px; transform: translateX(-50%); cursor: grab;
  font-size: .88rem; font-weight: 900; line-height: 1;
}
.selection-handle.rotation:active { cursor: grabbing; }
.region-selection-box { border-style: solid; border-radius: 5px; }
.region-selection-box.is-drawing .selection-handle,
.region-selection-box.is-drawing .rotation-stem { display: none; }
.region-canvas-stage .selection-handle { width: 24px; height: 24px; }
.region-canvas-stage .selection-handle.rotation { width: 30px; height: 30px; }
.editor-view-tools output { min-width: 3.4rem; text-align: center; font-size: .82rem; font-weight: 900; color: var(--muted); }
.item-status { margin: 0; padding: .55rem 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; font-weight: 800; }
.editor-actions { display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; padding: 1rem; border-top: 1px solid var(--line); }
.action-group { display: flex; gap: .5rem; flex-wrap: wrap; }
.editor-help { margin: .75rem 0 0; color: var(--muted); font-size: .8rem; }

.side-stack { display: grid; gap: .85rem; }
.info-card { border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 1rem; }
.info-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.info-card ul { margin: .55rem 0 0; padding-left: 1.15rem; color: var(--muted); font-size: .88rem; }
.info-card a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.quick-links { list-style: none; padding: 0 !important; }
.quick-links li + li { border-top: 1px solid var(--line); }
.quick-links a { display: block; padding: .5rem 0; text-decoration: none; color: var(--ink); }

.feature-grid, .steps, .card-grid { display: grid; gap: .85rem; }
.feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature-card, .step-card, .content-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem;
}
.feature-card p, .step-card p, .content-card p { margin: 0; color: var(--muted); }
.step-number { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); font-weight: 900; margin-bottom: .6rem; }
.content-card a.title { font-weight: 900; font-size: 1.08rem; text-decoration: none; }
.content-card a.title:hover { color: var(--red-dark); text-decoration: underline; }
.content-card .meta { margin: 0 0 .3rem; color: #69717d; font-size: .78rem; }
.content-card .status { display: inline-block; margin-top: .7rem; border-radius: 999px; background: #eee4d4; padding: .15rem .55rem; font-size: .76rem; font-weight: 800; }
.content-card .status.ready { background: #dcebd4; color: #245d35; }

.breadcrumbs { margin: 0 0 .8rem; color: var(--muted); font-size: .84rem; }
.breadcrumbs a { text-decoration: none; }
.article { max-width: 760px; }
.article h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.article h2 { margin-top: 2.4rem; font-size: 1.45rem; }
.article p, .article li { color: #3e4550; }
.article .note-box { padding: 1rem; border-left: 4px solid var(--red); background: var(--card); }
.article .button { margin-top: 1rem; }
.faq-list details { border-bottom: 1px solid var(--line); padding: .85rem 0; }
.faq-list summary { cursor: pointer; font-weight: 800; }
.faq-list p { margin: .45rem 0 0; color: var(--muted); }
.contact-box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1rem; }

.site-footer { border-top: 1px solid var(--line); background: var(--sheet); padding: 2.2rem 0 2.8rem; color: var(--muted); font-size: .87rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 1.5rem; }
.site-footer h2 { margin: 0 0 .45rem; color: var(--ink); font-size: .95rem; }
.site-footer p { margin: 0; }
.site-footer a { display: block; padding: .14rem 0; text-decoration: none; }
.copyright { margin-top: 1.5rem !important; font-size: .76rem; }

@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; gap: .65rem 1rem; }
  .site-nav { order: 3; width: 100%; overflow-x: auto; margin: 0; padding-bottom: .15rem; }
  .site-nav a { flex: none; }
  .editor-layout { grid-template-columns: 1fr; }
  .side-stack { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  body { word-break: normal; }
  .privacy-strip { text-align: left; }
  .container { width: min(100% - 1.25rem, 1120px); }
  .page-main { padding-top: 1.35rem; }
  .hero { grid-template-columns: 1fr; }
  .hero-stamps { display: none; }
  h1 { font-size: 2.35rem; }
  .feature-grid, .card-grid, .side-stack, .steps, .footer-grid { grid-template-columns: 1fr; }
  .panel { border-radius: 15px; box-shadow: 0 6px 20px #17294408; }
  .editor-toolbar { padding: .75rem; }
  .tool-label { width: 100%; }
  .stage-wrap { padding: 3.25rem .5rem .5rem; }
  .editor-actions { padding: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* 공용 안내 화면과 탐색 메뉴. 도구의 입력·결과 계산에는 관여하지 않는다. */
.site-header { position:relative; }
.header-inner { max-width:1360px; min-height:76px; padding:18px 28px; }
.brand span { color:inherit; }
.brand::before { content:''; display:inline-block; width:24px; height:24px; margin-right:9px; vertical-align:-3px; background:url('../favicon.svg') center/contain no-repeat; }
.site-nav,.home-page .site-nav { overflow:visible; gap:28px; }
.site-nav>a,.nav-help summary { font-size:14px; font-weight:600; white-space:nowrap; }
.site-nav>a { padding:10px 0; }
.nav-help { position:relative; }
.nav-help summary { list-style:none; cursor:pointer; padding:10px 0; color:#566071; }
.nav-help summary::-webkit-details-marker { display:none; }
.nav-help summary span { margin-left:5px; }
.nav-help[data-current] summary { color:#1769e8; }
.nav-help-links { position:absolute; right:0; top:calc(100% + 8px); width:205px; padding:8px; background:#fff; border:1px solid #e0e5ed; border-radius:12px; box-shadow:0 12px 30px #1b30551a; z-index:50; }
.nav-help-links a { display:block; padding:10px 12px; border:0; border-radius:6px; font-size:13px; }
.nav-help-links a:hover,.nav-help-links a[aria-current] { background:#f0f5fe; color:#1769e8; }
:where(a,button,input,summary):focus-visible { outline:3px solid #1769e8; outline-offset:4px; }
.privacy-strip { background:#f3f7fd; color:#526579; font-size:12px; padding:6px 20px; }
.article { max-width:850px; padding-top:12px; }
.article h1 { font-size:clamp(30px,4vw,48px); font-weight:800; letter-spacing:-.055em; margin:14px 0 20px; }
.article .lead { font-size:17px; line-height:1.85; max-width:760px; }
.article h2 { border-top:1px solid var(--line); padding-top:28px; margin:42px 0 16px; scroll-margin-top:24px; font-size:24px; }
.article p,.article li { font-size:16px; line-height:1.95; }
.article p a,.article li a { color:#155fce; text-underline-offset:4px; }
.article-toc { margin:28px 0 38px; padding:21px 24px; background:#f6f8fc; border:1px solid #e5eaf2; border-radius:12px; }
.article-toc>p { font-size:12px; font-weight:750; color:#687489; margin:0 0 12px; }
.article-toc ol { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 25px; padding:0; list-style:none; margin:0; }
.article-toc li,.article-toc a { font-size:13px; line-height:1.6; text-decoration:none; }
.article-toc a:hover { text-decoration:underline; }
.article .note-box { background:#f1f6ff; border-radius:0 10px 10px 0; padding:20px; }
.content-card { border-radius:12px; padding:24px; transition:border-color .2s; }
.content-card:has(a):hover { border-color:#9eb7df; }
.content-card a.title { display:block; font-size:20px; line-height:1.5; margin:7px 0 12px; }
.content-card .meta { color:#7a8597; font-size:11px; letter-spacing:.04em; }
.content-card p { font-size:14px; line-height:1.8; }
.faq-search { display:grid; gap:9px; margin:25px 0 15px; font-size:13px; color:#637085; }
.faq-search input { min-width:0; width:100%; border:1px solid #cdd7e5; border-radius:9px; padding:13px 16px; background:#fff; }
.faq-search span { min-height:20px; font-size:12px; }
.faq-list details { border:1px solid #e0e6ef; border-radius:12px; padding:0 20px; margin:12px 0; background:#fff; }
.faq-list summary { padding:18px 0; font-size:16px; color:#282f3b; }
.faq-list details[open] { border-color:#b4c9eb; background:#fafcff; }
.faq-list details p { padding:0 0 18px; margin:0; line-height:1.9; font-size:14px; }
.faq-list details[hidden],.faq-search[hidden] { display:none; }
.spec-table { border-collapse:collapse; width:100%; margin:22px 0; font-size:14px; }
.spec-table th,.spec-table td { border:1px solid #e0e6ee; padding:13px 16px; text-align:left; }
.spec-table th { background:#f5f7fb; }
.site-footer { margin-top:28px; padding-top:36px; }
.site-footer a:hover { color:#1769e8; text-decoration:underline; text-underline-offset:3px; }
@media(max-width:900px) { .header-inner { gap:18px; }.site-nav,.home-page .site-nav { gap:25px; }.site-nav { justify-content:flex-start; } }
@media(max-width:620px) { .site-header { position:relative; }.header-inner,.home-page .header-inner { padding:20px 18px 12px; gap:20px; }.site-nav,.home-page .site-nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 22px; width:100%; overflow:visible; }.site-nav>a,.home-page .site-nav>a,.nav-help summary { font-size:13px; padding:10px 0; }.nav-help-links { left:auto; right:0; width:min(205px,calc(100vw - 40px)); }.article { width:calc(100% - 36px); }.article h1 { font-size:32px; }.article h2 { font-size:22px; }.article p,.article li { font-size:15px; }.article-toc { padding:18px; }.article-toc ol { grid-template-columns:1fr; gap:11px; }.content-card { padding:20px; }.content-card a.title { font-size:18px; } }
