/* 편집기 — 왼쪽 탭·입력, 오른쪽 폰 크기 미리보기. 좁은 화면은 미리보기를 단추로 연다. */
:root { --ink:#1f2328; --muted:#6b7280; --line:#e5e7eb; --bg:#f6f7f9; --acc:#7c5c45; }
* { box-sizing: border-box; }
body { margin:0; font:15px/1.55 "Pretendard", system-ui, sans-serif; color:var(--ink); background:var(--bg); }
.top { position:sticky; top:0; z-index:5; display:flex; gap:12px; align-items:center; padding:10px 16px; background:#fff; border-bottom:1px solid var(--line); }
.top .grow { flex:1; } .state { color:var(--muted); font-size:13px; }
.top a { color:var(--acc); }
.keep { background:#fff7e6; border-bottom:1px solid #f3d9a4; padding:10px 16px; }
.layout { display:grid; grid-template-columns: 170px minmax(0, 1fr) 420px; gap:0; height:calc(100vh - 49px); }
.tabs { display:flex; flex-direction:column; padding:10px; gap:2px; background:#fff; border-right:1px solid var(--line); overflow:auto; }
.tabs button { text-align:left; border:0; background:none; padding:9px 10px; border-radius:6px; font:inherit; cursor:pointer; color:var(--ink); }
.tabs button.on { background:var(--bg); font-weight:600; color:var(--acc); }
.pane { overflow:auto; padding:20px 24px 80px; }
.pane > section { display:none; max-width:640px; } .pane > section.on { display:block; }
label { display:block; margin:0 0 12px; font-size:13px; color:var(--muted); }
label small, h3 small { color:var(--muted); font-weight:400; }
input:not([type=checkbox]):not([type=color]):not([type=file]), select, textarea { display:block; width:100%; margin-top:4px; padding:9px 10px; border:1px solid var(--line); border-radius:6px; font:inherit; color:var(--ink); background:#fff; }
input[type=color] { display:block; margin-top:4px; width:60px; height:36px; border:1px solid var(--line); border-radius:6px; }
label.chk { display:flex; gap:8px; align-items:center; color:var(--ink); font-size:14px; }
.two { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
fieldset { border:1px solid var(--line); border-radius:8px; padding:12px 14px 4px; margin:0 0 16px; background:#fff; }
legend { font-weight:600; padding:0 4px; }
h3 { font-size:15px; margin:22px 0 10px; }
.hint { color:var(--muted); font-size:13px; }
.msg { color:var(--acc); font-size:13px; min-height:1em; }
button, .btn, .upload { display:inline-block; border:1px solid var(--line); background:#fff; border-radius:6px; padding:8px 12px; font:inherit; cursor:pointer; color:var(--ink); text-decoration:none; }
#add-guests, #pub-code-btn, #pub-order, .upload { background:var(--acc); color:#fff; border-color:var(--acc); }
.upload input { display:none; }
.mini { padding:3px 8px; font-size:12px; margin-left:4px; }
.add { margin-bottom:10px; }
.list .item { position:relative; background:#fff; border:1px solid var(--line); border-radius:8px; padding:12px 12px 4px; margin:0 0 10px; display:grid; gap:6px; }
.list .item input, .list .item textarea, .list .item select { margin:0; }
.list .rm { justify-self:end; font-size:12px; padding:3px 8px; margin-bottom:8px; }
.hide-set { display:grid; grid-template-columns:1fr 1fr; }
.thumbs { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.thumbs figure { position:relative; margin:0; width:92px; height:92px; cursor:grab; }
.thumbs img { width:100%; height:100%; object-fit:cover; border-radius:6px; }
.thumbs .rm { position:absolute; top:2px; right:2px; padding:0 6px; font-size:14px; line-height:20px; }
.dragging { opacity:.4; }
.order { list-style:none; padding:0; margin:0; }
.order li { display:flex; gap:10px; align-items:center; background:#fff; border:1px solid var(--line); border-radius:6px; padding:6px 10px; margin-bottom:4px; cursor:grab; }
.order li label { margin:0; } .grip { color:var(--muted); }
.inline { display:flex; gap:6px; } .inline input { margin:0 !important; }
.tbl { width:100%; border-collapse:collapse; background:#fff; font-size:13px; }
.tbl th, .tbl td { border-bottom:1px solid var(--line); padding:6px 8px; text-align:left; }
.booklist { list-style:none; padding:0; } .booklist li { background:#fff; border:1px solid var(--line); border-radius:6px; padding:8px 10px; margin-bottom:6px; } .booklist p { margin:4px 0; }
.filters { margin:12px 0 6px; display:flex; gap:12px; align-items:center; font-size:13px; }
.ok { color:#1a7f37; font-weight:600; } .warn { color:#9a6700; font-weight:600; }
.samples { margin:-4px 0 16px; font-size:13px; color:var(--muted); }
code { background:#eef0f3; padding:1px 5px; border-radius:4px; font-size:12px; }
.preview { background:#e9ebef; border-left:1px solid var(--line); display:flex; flex-direction:column; }
.pv-bar { display:flex; gap:6px; padding:8px; } .pv-bar select { margin:0; } .pv-bar button { white-space:nowrap; }
.preview iframe { flex:1; width:390px; margin:0 auto 12px; border:0; border-radius:16px; background:#fff; box-shadow:0 0 0 1px var(--line); }
.only-narrow { display:none; }
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; height:auto; }
  .tabs { flex-direction:row; overflow-x:auto; border-right:0; border-bottom:1px solid var(--line); position:sticky; top:49px; z-index:4; }
  .tabs button { white-space:nowrap; }
  .preview { display:none; position:fixed; inset:49px 0 0; z-index:6; }
  .show-preview .preview { display:flex; }
  .preview iframe { width:100%; border-radius:0; margin:0; }
  .only-narrow { display:inline-block; }
  .pane { padding:16px; }
}

/* 첫 화면 고르기 — 그림으로 보이는 선택지 */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-bottom: 8px; }
.choices.small { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.choices button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; font-size: 13px; }
.choices button.on { border-color: var(--acc); color: var(--acc); font-weight: 600; box-shadow: 0 0 0 1px var(--acc) inset; }
.cv { display: block; width: 54px; height: 76px; border: 1px solid var(--line); border-radius: 4px; background: #fbf8f4; position: relative; overflow: hidden; }
.cv::before, .cv::after { content: ""; position: absolute; }
.cv-full::before { inset: 0; background: linear-gradient(160deg, #c9b8a6, #8d7867); }
.cv-full::after { left: 10px; right: 10px; bottom: 10px; height: 4px; background: #fff; border-radius: 2px; }
.cv-frame::before { left: 8px; right: 8px; top: 16px; bottom: 16px; background: linear-gradient(160deg, #c9b8a6, #8d7867); }
.cv-frame::after { left: 16px; right: 16px; top: 6px; height: 4px; background: #8d7867; border-radius: 2px; }
.cv-arch::before { left: 9px; right: 9px; top: 8px; bottom: 18px; border-radius: 30px 30px 3px 3px; background: linear-gradient(160deg, #c9b8a6, #8d7867); }
.cv-arch::after { left: 16px; right: 16px; bottom: 8px; height: 4px; background: #8d7867; border-radius: 2px; }
.cv-text::before { left: 12px; right: 12px; top: 26px; height: 6px; background: #8d7867; border-radius: 2px; }
.cv-text::after { left: 18px; right: 18px; top: 40px; height: 3px; background: #c9b8a6; border-radius: 2px; }
.pick-map { height: 280px; border: 1px solid var(--line); border-radius: 8px; margin: 8px 0 4px; background: #eef0f3; }
.geo-list { list-style: none; padding: 0; margin: 6px 0; }
.geo-list button { width: 100%; text-align: left; margin-bottom: 4px; }
.geo-list small { color: var(--muted); }
