/* 만들기 · 올리기 · 관리 페이지 공통 (소개 페이지 톤) */
:root {
  --bg: #f6f2ec; --ink: #1d1916; --muted: #6f665f; --line: #e4ddd3; --card: #fffdf9; --soft: #efe9e1;
  --heart: #e5484d; --ok: #2f7d4f;
  --sans: "Pretendard Variable", Pretendard, -apple-system, system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.6; word-break: keep-all; -webkit-font-smoothing: antialiased; }
img, video { display: block; width: 100%; height: 100%; object-fit: cover; }
button { font: inherit; color: inherit; }
a { color: inherit; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.page { max-width: 560px; margin: 0 auto; padding: 0 20px 48px; }
.head { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; }
.brand { font-size: 15px; font-weight: 600; text-decoration: none; }
.brand .heart, .heart { color: var(--heart); }
.link { font-size: 13px; color: var(--muted); text-decoration: none; }
h1 { margin: 20px 0 8px; font-size: 30px; line-height: 1.25; letter-spacing: -.03em; }
.lead { font-size: 15px; color: var(--muted); }
h2 { margin: 40px 0 12px; font-size: 13px; font-weight: 600; color: var(--muted); }

.box { margin-top: 16px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.box h3 { font-size: 17px; letter-spacing: -.02em; }
.box p { margin-top: 6px; font-size: 14px; color: #4a423c; }
.box.dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.box.dark p { color: #cfc6be; }
.copy-row { display: flex; gap: 8px; margin-top: 10px; }
.copy-row input { flex: 1; min-width: 0; padding: 10px 12px; font: inherit; font-size: 14px; background: var(--soft); border: none; border-radius: 10px; color: var(--ink); }
.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 700; letter-spacing: .06em; }

/* 폼 */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; }
.field > span em { font-style: normal; font-weight: 400; color: var(--muted); }
.field small { font-size: 12px; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; line-height: 1.7; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; overflow: hidden; border: 1px solid var(--ink); border-radius: 99px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 11px 0; text-align: center; font-size: 14px; cursor: pointer; }
.seg input:checked + span { background: var(--ink); color: var(--bg); }
.seg input:focus-visible + span { outline: 2px solid var(--heart); outline-offset: -4px; }

/* 템플릿 고르기 */
.tpls { display: grid; gap: 10px; }
.tpl { position: relative; display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 12px; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; }
.tpl input { position: absolute; opacity: 0; pointer-events: none; }
.tpl:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.tpl:has(input:focus-visible) { outline: 2px solid var(--heart); outline-offset: 2px; }
.chip { height: 56px; border-radius: 10px; }
.chip.editorial { background: #141211; }
.chip.scrapbook { background: #f7f0e4 radial-gradient(rgba(120, 90, 60, .15) 1px, transparent 1px) 0 0 / 7px 7px; border: 1px solid var(--line); }
.chip.film { background: linear-gradient(#ffa9c6 0 0) 8px 6px / 40px 44px no-repeat, #fff; border: 1px solid var(--line); }
.tpl b { display: block; font-size: 15px; }
.tpl small { font-size: 12.5px; color: var(--muted); }
.tpl a { font-size: 12.5px; color: var(--muted); }

.checks { display: grid; gap: 10px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.check a { color: var(--muted); }

.pick { display: grid; place-items: center; min-height: 88px; font-size: 14px; color: var(--muted); background: var(--card); border: 1.5px dashed var(--line); border-radius: 14px; cursor: pointer; }
.pick:focus-within { border-color: var(--ink); }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 6px; margin-top: 8px; }
.previews:empty { display: none; }
.pv { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: var(--soft); }
.pv-n { position: absolute; top: 4px; left: 4px; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; font-size: 11px; color: #fff; background: rgba(0, 0, 0, .6); border-radius: 99px; }
.pv-x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; padding: 0; display: grid; place-items: center; font-size: 16px; line-height: 1; color: #fff; background: rgba(0, 0, 0, .6); border: none; border-radius: 50%; cursor: pointer; }
.pv-move { position: absolute; left: 4px; right: 4px; bottom: 4px; display: flex; justify-content: space-between; }
.pv-move button { width: 28px; height: 28px; padding: 0 0 2px; display: grid; place-items: center; font-size: 18px; line-height: 1; color: #fff; background: rgba(0, 0, 0, .6); border: none; border-radius: 50%; cursor: pointer; }
.pv-move button:disabled { opacity: 0; pointer-events: none; }
.hint { font-size: 12.5px; color: var(--muted); }
.link-btn { justify-self: start; padding: 0; font-size: 13px; color: var(--muted); background: none; border: none; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.end-row { display: grid; gap: 8px; }

.primary, .ghost { width: 100%; padding: 15px; font-size: 16px; font-weight: 600; border-radius: 99px; cursor: pointer; }
.primary { color: var(--bg); background: var(--ink); border: 1px solid var(--ink); }
.primary:disabled { opacity: .5; cursor: default; }
.ghost { background: none; border: 1px solid var(--line); }
.status { min-height: 1.4em; text-align: center; font-size: 13.5px; color: var(--muted); }
.error { color: var(--heart); }

/* 목록 */
.list { padding: 0; list-style: none; }
.item { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.thumb { width: 52px; height: 52px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: var(--soft); font-size: 11px; color: var(--muted); }
.item-text { display: grid; min-width: 0; }
.item-meta { font-size: 12px; color: var(--muted); }
.item-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.actions { display: flex; gap: 4px; }
.mini { padding: 6px 10px; font-size: 12.5px; background: var(--card); border: 1px solid var(--line); border-radius: 99px; cursor: pointer; }
.mini.danger { color: var(--heart); }
.mini.go { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.empty { padding: 28px 0; text-align: center; font-size: 14px; color: var(--muted); }
.badge { display: inline-block; padding: 1px 8px; font-size: 11.5px; font-weight: 600; border-radius: 99px; background: var(--soft); color: var(--muted); }
.badge.active { background: #e3f1e8; color: var(--ok); }

/* 잠금 (업로드 페이지) */
.pin { width: 8ch; padding: 6px 0; font-size: 36px; letter-spacing: .12em; text-align: center; font-variant-numeric: tabular-nums; background: none; border: none; border-bottom: 2px solid var(--ink); border-radius: 0; outline: none; color: var(--ink); }
.center { display: grid; justify-items: center; gap: 14px; padding: 72px 0; text-align: center; }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* 푸터 */
.foot { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 11.5px; color: var(--muted); }

/* 약관 문서 */
.doc h1 { font-size: 26px; }
.doc h3 { margin-top: 28px; font-size: 16px; }
.doc p, .doc li { margin-top: 8px; font-size: 14.5px; color: #3d3632; }
.doc ul { padding-left: 18px; }
