/* 연한 민트 바탕에 에메랄드 강조색을 쓰는 차분한 구성. 색은 아래 변수만 바꾸면 전체에 반영된다. */
:root {
  --desk: #f2f7f4;
  --paper: #ffffff;
  --ink: #10231b;
  --muted: #586c62;
  --line: #d9e6de;
  --soft: #edf5f0;
  --accent: #0a8358;
  --accent-deep: #086c48;
  --on-accent: #ffffff;
  --tint: #e0f4e9;
  --band: #d9f2e4;
  --band-end: #eef7dc;
  --bad: #b93127;
  --r: 14px;
  --lift: 0 1px 2px rgba(16, 35, 27, .05), 0 14px 34px -14px rgba(16, 35, 27, .2);
  --font: "Pretendard Variable", Pretendard, "SUIT Variable", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  font-family: var(--font);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --desk: #0d1411;
    --paper: #16201b;
    --ink: #e8f1ec;
    --muted: #94a99e;
    --line: #2a3a32;
    --soft: #1e2b25;
    --accent: #3cc592;
    --accent-deep: #63d6aa;
    --on-accent: #052417;
    --tint: #1b3a2d;
    --band: #12261d;
    --band-end: #1a2b1c;
    --bad: #ff8a80;
    --lift: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -14px rgba(0, 0, 0, .8);
  }
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--desk);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* 한국어는 단어(어절) 단위로만 줄을 바꾼다. 일본어와 중국어는 글자 단위로 바꿔야 자연스러우므로 적용하지 않는다. */
:lang(ko) { word-break: keep-all; }
h1, h2, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.bad { color: var(--bad); }

.icon { display: inline-flex; flex: none; width: 1.25em; height: 1.25em; }
.icon svg { width: 100%; height: 100%; }

/* ── 머리말, 꼬리말 ── */
.top, #view, .foot { width: min(100% - 2.5rem, 68rem); margin-inline: auto; }
/* 머리말과 첫 화면 소개 영역은 화면 폭 전체에 민트색 띠를 깐다. */
.top, .hero { background: var(--band); box-shadow: 0 0 0 100vmax var(--band); clip-path: inset(0 -100vmax); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; text-decoration: none; }
.brand-mark { width: 1.05rem; height: 1.35rem; background: var(--accent); border-radius: 2px; clip-path: polygon(0 0, 62% 0, 100% 28%, 100% 100%, 0 100%); }
.top-right { display: flex; align-items: center; gap: 1rem; }
#lang { width: auto; min-height: 2.1rem; padding: .2rem .5rem; font-size: .85rem; background: transparent; border-color: transparent; cursor: pointer; }
#lang:hover, #lang:focus { border-color: var(--accent); background: var(--paper); }
.nav { font-size: .9rem; font-weight: 700; text-decoration: none; padding: .3rem .6rem; border-radius: 8px; }
.nav:hover { background: var(--paper); color: var(--accent-deep); }
.local { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600; color: var(--accent-deep); }
#view { flex: 1; padding-bottom: 4rem; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }

/* ── 단추 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 2.75rem; padding: .5rem 1.1rem;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--paper); font-weight: 700; font-size: .95rem; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
a.btn { text-decoration: none; }
.btn:hover { background: var(--tint); border-color: var(--accent); color: var(--accent-deep); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--on-accent); }
.btn.small { min-height: 2.1rem; padding: .25rem .7rem; font-size: .85rem; border-radius: 8px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { background: var(--paper); border-color: var(--line); color: var(--ink); }
.btn.primary:disabled:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.btn.busy:disabled { opacity: 1; cursor: progress; background: var(--tint); border-color: var(--accent); color: var(--accent-deep); }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn-row.end { justify-content: flex-end; }
.btn-row .btn { flex: 1; }
.btn-row.end .btn { flex: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--tint); color: var(--accent-deep); }

/* ── 파일을 놓는 자리 ── */
.drop {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: .35rem;
  min-height: 15rem; padding: 2rem;
  background: var(--paper); border-radius: var(--r); box-shadow: var(--lift);
  transition: background-color .15s;
}
.drop::after { content: ""; position: absolute; inset: .75rem; border: 1.5px dashed var(--line); border-radius: calc(var(--r) - 5px); pointer-events: none; transition: border-color .15s; }
.drop-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.35; }
.drop-hint { color: var(--muted); font-size: .92rem; }
.drop .btn { margin-top: .9rem; position: relative; z-index: 1; }
.drop.over { background: var(--tint); }
.drop.over::after { border-color: var(--accent); border-style: solid; }
.drop.compact { min-height: 0; padding: 0; background: none; box-shadow: none; flex-direction: row; justify-content: flex-start; }
.drop.compact::after { display: none; }
.drop.compact .btn { margin: 0; }
.drop.compact.over .btn { background: var(--tint); border-color: var(--accent); }

/* ── 첫 화면 ── */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3rem; align-items: end;
  margin-bottom: 2.5rem; padding: 2.25rem 0 3.5rem;
  background: linear-gradient(90deg, var(--band), var(--band-end) 62%, var(--band)); /* 양 끝이 바깥 띠 색과 이어지게 한다. */
}
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); font-weight: 800; line-height: 1.18; letter-spacing: -.04em; text-wrap: balance; }
.hero-text p { margin-top: 1.25rem; max-width: 34rem; color: var(--muted); font-size: 1.05rem; }
.chosen {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem;
  margin-bottom: 1rem; padding: .8rem 1.1rem; background: var(--accent); color: var(--on-accent); border-radius: var(--r);
}
.chosen .btn { background: transparent; border-color: currentColor; color: inherit; }
.chosen .btn:hover { background: var(--on-accent); border-color: var(--on-accent); color: var(--accent-deep); }

/* 도구 목록: 한 장의 종이 위에 분류별로 줄을 그어 구분한다. */
.index { background: var(--paper); border-radius: var(--r); box-shadow: var(--lift); }
.group { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1rem; padding: 1.1rem 1.5rem; }
.group + .group { border-top: 1px solid var(--line); }
.group h2 { padding-top: .8rem; font-size: .95rem; font-weight: 700; color: var(--accent-deep); }
.group ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: .25rem .75rem; }
.tool { display: flex; align-items: center; gap: .85rem; padding: .7rem .75rem; border-radius: 12px; text-decoration: none; transition: background-color .15s; }
.tool .icon { width: 2.6rem; height: 2.6rem; padding: .62rem; border-radius: 11px; background: var(--tint); color: var(--accent-deep); transition: background-color .15s, color .15s; }
.tool-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.tool-text strong { font-size: 1rem; letter-spacing: -.015em; }
.tool-text span { font-size: .85rem; color: var(--muted); }
.tool:hover { background: var(--soft); }
.tool:hover .icon { background: var(--accent); color: var(--on-accent); }
.tool.off { opacity: .32; pointer-events: none; }

/* ── 도구 화면 ── */
.tool-head { padding: 1.75rem 0 1.75rem; }
.back { display: inline-flex; align-items: center; gap: .15rem; margin-left: -.3rem; font-size: .9rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--accent-deep); }
.tool-head h1 { text-wrap: balance; margin-top: .6rem; font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.25; }
.tool-head p { margin-top: .35rem; color: var(--muted); max-width: 40rem; }
.tool-body { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 2rem; align-items: start; }
.work { min-width: 0; grid-column: 1 / -1; }
.work.has-files { grid-column: 1; }
.work.has-files > .drop { display: none; }
.more { display: none; margin-top: 1.25rem; }
.work.has-files > .more { display: block; }
/* 파일이 이미 있을 때는 작업 영역 전체에 파일을 더 끌어다 놓을 수 있다. */
.work.has-files.over { outline: 2px dashed var(--accent); outline-offset: .6rem; border-radius: var(--r); }

.side {
  position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto;
  display: flex; flex-direction: column; gap: 1rem;
  padding: 1.35rem; background: var(--paper); border-radius: var(--r); box-shadow: var(--lift);
}
.side h2, .results h2, dialog h2 { font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.4; }
.side-note { font-size: .88rem; color: var(--muted); }
.summary { font-size: .92rem; font-weight: 600; }
.fields { display: flex; flex-direction: column; gap: .9rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field-label { font-size: .85rem; font-weight: 700; }
.field-note { font-size: .82rem; color: var(--muted); }
input[type="text"], input[type="password"], input[type="number"], select {
  width: 100%; min-height: 2.6rem; padding: .4rem .7rem;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper);
  transition: border-color .15s;
}
input[type="text"]:hover, input[type="password"]:hover, input[type="number"]:hover, select:hover { border-color: var(--accent); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.check { display: flex; align-items: center; gap: .5rem; font-size: .9rem; cursor: pointer; }
.check input { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }

.seg { display: flex; padding: 3px; background: var(--soft); border-radius: 10px; }
.seg label { flex: 1; cursor: pointer; }
.seg span { display: block; padding: .4rem .3rem; border-radius: 8px; text-align: center; font-size: .87rem; font-weight: 600; color: var(--muted); }
.seg input:checked + span { background: var(--paper); color: var(--accent-deep); box-shadow: 0 1px 3px rgba(16, 35, 27, .16); }
.seg input:focus-visible + span { outline: 3px solid var(--accent); }

/* ── 결과 ── */
.results { display: flex; flex-direction: column; gap: .6rem; padding: 1rem; margin: 0 -.35rem -.35rem; background: var(--tint); border-radius: 10px; }
.results h2 { color: var(--accent-deep); }
.result { display: flex; flex-direction: column; gap: .6rem; }
.result-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.result-text strong { font-size: .92rem; }
.result-text span { font-size: .82rem; color: var(--muted); }
.result-note { font-size: .82rem; color: var(--muted); }
.results details { font-size: .88rem; }
.results summary { cursor: pointer; color: var(--muted); padding: .3rem 0; }
.results details .result { flex-direction: row; align-items: center; justify-content: space-between; padding: .4rem 0; border-top: 1px solid var(--line); }
.results details .btn { min-height: 2rem; padding: .2rem .6rem; font-size: .8rem; flex: none; }

/* ── 파일, 쪽 카드 ── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 1rem; }
.card { position: relative; display: flex; flex-direction: column; gap: .5rem; padding: .7rem; border-radius: 12px; cursor: grab; transition: background-color .15s; }
.card.static { cursor: default; }
.card:hover, .card:focus-within { background: var(--tint); }
.card.dragging { opacity: .35; }
.thumb { position: relative; display: block; aspect-ratio: 1; transition: transform .2s; }
.thumb canvas, .thumb img { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; width: auto; height: auto; background: #fff; border-radius: 3px; box-shadow: 0 0 0 1px rgba(16, 35, 27, .08), 0 8px 18px -10px rgba(16, 35, 27, .45); }
.thumb:empty::before { content: ""; position: absolute; inset: 4% 15%; border-radius: 3px; background: var(--paper); opacity: .6; }
.card figcaption { display: flex; flex-direction: column; align-items: center; text-align: center; font-size: .82rem; line-height: 1.35; color: var(--muted); }
.card figcaption strong { max-width: 100%; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-tools {
  position: absolute; top: .4rem; left: .4rem; right: .4rem; display: flex; justify-content: space-between;
  padding: 2px; background: var(--paper); border-radius: 10px; box-shadow: 0 2px 10px rgba(16, 35, 27, .22);
  opacity: 0; transition: opacity .12s;
}
.card:hover .card-tools, .card:focus-within .card-tools { opacity: 1; }
@media (hover: none) { .card-tools { opacity: 1; } }
.move { display: inline-flex; }
/* 분할: 고른 쪽은 또렷하게, 나머지는 흐리게. 묶음이 시작되는 쪽 왼편에 표시를 한다. */
.card.static:not(.picked) .thumb { opacity: .28; }
.card.static.picked { background: var(--tint); }
.card.starts::before { content: ""; position: absolute; left: -.55rem; top: .7rem; bottom: 2.2rem; width: 4px; border-radius: 2px; background: var(--accent); }

/* ── 파일 목록(여러 파일 처리) ── */
.rows { background: var(--paper); border-radius: var(--r); box-shadow: var(--lift); overflow: hidden; }
.row { display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem; }
.row + .row { border-top: 1px solid var(--line); }
.row > .icon { width: 2.3rem; height: 2.3rem; padding: .5rem; border-radius: 9px; background: var(--tint); color: var(--accent-deep); }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.row-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.row-status { font-size: .85rem; color: var(--muted); }
.row.working { background: linear-gradient(90deg, transparent, var(--tint) 50%, transparent) 0 0 / 200% 100%; animation: sweep 1.1s linear infinite; }
.row.done .row-status { color: var(--accent-deep); font-weight: 600; }
.row.failed .row-status { color: var(--bad); font-weight: 600; }
@keyframes sweep { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ── 미리보기 ── */
.stage { min-width: 0; }
.preview { position: relative; width: 100%; background: #fff; border-radius: 4px; box-shadow: var(--lift); overflow: hidden; container-type: inline-size; }
.preview canvas { display: block; width: 100%; height: auto; }
.preview .layer { position: absolute; inset: 0; height: 100%; pointer-events: none; }
.num-sample { position: absolute; line-height: 1; color: #10231b; white-space: nowrap; background: #bfeed6; box-shadow: 0 0 0 .3em #bfeed6; border-radius: 1px; font-family: Helvetica, Arial, sans-serif; }
.num-sample[data-pos^="t"] { top: var(--edge-y); }
.num-sample[data-pos^="b"] { bottom: var(--edge-y); }
.num-sample[data-pos$="l"] { left: var(--edge-x); }
.num-sample[data-pos$="r"] { right: var(--edge-x); }
.num-sample[data-pos$="c"] { left: 50%; transform: translateX(-50%); }
.pos-picker {
  display: grid; grid-template-columns: repeat(3, 1fr); align-content: space-between; justify-items: center;
  width: 6.5rem; aspect-ratio: 210 / 297; padding: .45rem; background: var(--soft); border: 1.5px solid var(--line); border-radius: 8px;
}
.pos-picker input { appearance: none; width: 1.15rem; height: 1.15rem; margin: 0; border: 1.5px solid var(--muted); border-radius: 50%; background: var(--paper); cursor: pointer; }
.pos-picker input:checked { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--paper); }
.pager { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; font-size: .9rem; font-weight: 600; }
.preview:has(.sig) { overflow: visible; }
.sig { position: absolute; cursor: move; outline: 1.5px dashed #0a8358; outline-offset: 4px; touch-action: none; }
.sig img { display: block; width: 100%; pointer-events: none; user-select: none; }
.sig-grip { position: absolute; right: -11px; bottom: -11px; width: 16px; height: 16px; border-radius: 50%; background: #0a8358; border: 2px solid #fff; cursor: nwse-resize; }
.pad { width: 100%; height: auto; background: #fff; border: 1.5px dashed var(--line); border-radius: 10px; cursor: crosshair; touch-action: none; }

/* ── 예시 그림: 처리 전 → 처리 후 ── */
.demo { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; margin-top: 2rem; padding: 1.4rem 1.5rem; border: 1.5px dashed var(--line); border-radius: var(--r); }
.tool-page:has(.work.has-files) .demo { display: none; }
.demo-label { flex: none; padding: .15rem .6rem; border-radius: 99px; background: var(--tint); color: var(--accent-deep); font-size: .8rem; font-weight: 700; }
.demo-side { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .7rem; }
.demo-arrow { flex: none; display: inline-flex; width: 1.6rem; height: 1.6rem; color: var(--accent); }
.demo-arrow .icon { width: 100%; height: 100%; }
.dfile { position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 6px; border-radius: 9px; background: var(--tint); }
.dcol { display: inline-flex; flex-direction: column; align-items: center; gap: .3rem; }
.dcap { font-size: .72rem; font-weight: 700; color: var(--muted); }
.pg {
  position: relative; display: grid; place-items: center; width: 36px; height: 48px; overflow: hidden;
  border-radius: 3px; background: #fff; color: #10231b; font-size: .8rem;
  box-shadow: 0 0 0 1px rgba(16, 35, 27, .1), 0 3px 6px -3px rgba(16, 35, 27, .45);
}
/* 종이 위쪽의 글줄 무늬. 파일이 다르면 줄 색도 다르다. */
.pg::before { content: ""; position: absolute; inset: 6px 6px auto; height: 12px; background: repeating-linear-gradient(var(--ln, #c9d3ce) 0 2px, transparent 2px 5px); }
.pg.a { --ln: #6cc7a0; }
.pg.b { --ln: #f0b84f; }
.pg b { position: relative; margin-top: 16px; font-weight: 800; }
.pg.rot { transform: rotate(90deg); margin: 0 6px; }
.pg.big { width: 60px; height: 80px; }
.pg.big::before { inset: 10px 9px auto; height: 37px; }
.pg.small { width: 30px; height: 40px; }
.pg.im { background: linear-gradient(#bfe3f5 58%, #79c596 58%); }
.pg.im::before { inset: 7px auto auto 7px; width: 9px; height: 9px; border-radius: 50%; background: #ffd166; }
.pg .no { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); padding: 0 4px; border-radius: 3px; background: #bfeed6; font-size: 9px; font-weight: 800; line-height: 1.5; }
.pg .mark { position: absolute; inset: 0; display: grid; place-items: center; transform: rotate(-52deg); color: rgba(217, 45, 32, .55); font-size: 13px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.pg .sig-demo { position: absolute; right: 6px; bottom: 9px; width: 34px; }
.pg .sig-demo svg { display: block; width: 100%; }
.dbadge { position: absolute; top: -9px; right: -9px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.dbadge .icon { width: 14px; height: 14px; }
.dbadge.off { background: var(--paper); color: var(--muted); box-shadow: 0 0 0 1.5px var(--line); }

/* ── 소개 페이지 ── */
.intro h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.3; text-wrap: balance; }
.intro section > p, .intro section div > p { color: var(--muted); }
.shot { display: block; width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--lift); background: var(--paper); }
.intro-hero {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; gap: 1.1rem; padding: 3rem 0 0; text-align: center;
}
/* 민트색 띠는 캡처 이미지의 중간까지만 깔아서, 이미지가 띠 아래로 걸쳐 나오게 한다. */
.intro-hero::before {
  content: ""; position: absolute; z-index: -1; inset: 0 0 30%;
  background: linear-gradient(90deg, var(--band), var(--band-end) 62%, var(--band));
  box-shadow: 0 0 0 100vmax var(--band); clip-path: inset(0 -100vmax); /* 화면 폭 전체로 넓히되, 페이지 폭은 늘리지 않는다. */
}
.intro-hero h1 { max-width: 20em; font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 800; line-height: 1.2; letter-spacing: -.04em; text-wrap: balance; }
.intro-hero > p { max-width: 38rem; font-size: 1.05rem; }
.intro-hero .shot { margin-top: 1.5rem; max-width: 60rem; }
.intro-safe { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; margin-top: 4rem; padding: 2.25rem; background: var(--paper); border-radius: var(--r); box-shadow: var(--lift); }
.intro-safe p { margin-top: .9rem; }
.intro-safe ul { display: flex; flex-direction: column; gap: .7rem; }
.intro-safe li { display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; border-radius: 10px; background: var(--tint); color: var(--accent-deep); font-weight: 700; font-size: .95rem; line-height: 1.45; }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: 3rem; align-items: center; margin-top: 5rem; }
/* 한 줄 걸러 이미지를 왼쪽에 둔다. 이미지는 어느 쪽에 있든 넓은 칸을 차지한다. */
.feature:nth-of-type(odd) { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.feature:nth-of-type(odd) .feature-text { order: 2; }
.feature-text p { margin-top: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border: 1.5px solid var(--line); border-radius: 99px; background: var(--paper); font-size: .88rem; font-weight: 700; text-decoration: none; transition: border-color .15s, color .15s, background-color .15s; }
.chip .icon { color: var(--accent); }
.chip:hover { border-color: var(--accent); background: var(--tint); color: var(--accent-deep); }
.intro-all { margin-top: 5rem; }
.intro-end { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; margin-top: 5rem; padding: 3rem 1.5rem; border-radius: var(--r); background: linear-gradient(120deg, var(--band), var(--band-end)); text-align: center; }
.intro-end p { font-size: .88rem; }
@media (max-width: 52rem) {
  .intro-safe, .feature, .feature:nth-of-type(odd) { grid-template-columns: 1fr; gap: 1.5rem; }
  .intro-safe { padding: 1.5rem; margin-top: 2.5rem; }
  .feature, .intro-all, .intro-end { margin-top: 3.5rem; }
  .feature:nth-of-type(odd) .feature-text { order: 0; }
}

/* ── 대화 상자, 알림 ── */
dialog { width: min(26rem, calc(100% - 2rem)); padding: 1.5rem; border: 0; border-radius: var(--r); background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); }
dialog::backdrop { background: rgba(16, 35, 27, .5); }
dialog form { display: flex; flex-direction: column; gap: .8rem; }
dialog p { font-size: .92rem; }
#toasts { position: fixed; left: 50%; bottom: 1.5rem; z-index: 10; transform: translateX(-50%); display: flex; flex-direction: column; gap: .5rem; width: min(30rem, calc(100% - 2rem)); }
.toast { padding: .8rem 1rem; border-radius: 10px; background: var(--ink); color: var(--paper); font-size: .92rem; font-weight: 600; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5); border-left: 5px solid var(--bad); }
.toast.info { border-left-color: var(--accent); }
.noscript { width: min(100% - 2.5rem, 68rem); margin: 2rem auto; }

@media (max-width: 52rem) {
  .hero { grid-template-columns: 1fr; gap: 2rem; padding: 1.5rem 0 2.5rem; margin-bottom: 1.5rem; }
  .group { grid-template-columns: 1fr; gap: .25rem; padding: 1rem; }
  .group h2 { padding: 0 .75rem; }
  .tool-body { grid-template-columns: 1fr; }
  .work.has-files { grid-column: 1 / -1; }
  .side { position: static; max-height: none; }
  .local { display: none; }
  .drop { min-height: 12rem; padding: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
