/* editor/editor.css — 통합 편집 모드 화면 (관리자 전용) — 편집 표시색 하늘색 #7FB4CA · 안내선 분홍 #D27E99 · 겹침 빨강 */
:root{ --ed-blue:#7FB4CA; --ed-blue-dim:#24343b; --ed-pink:#D27E99; --ed-bg:#0d0c0c; --ed-panel:#12120f; --ed-line:#2a2928; }

/* ---- 앱 화면 위 표시 ---- */
.ed-fs, .ed-fs span, .ed-fs b, .ed-fs i{ font-size:var(--edfs) !important; }
.ed-on .ed-hidden{ opacity:.35; }
.ed-on .ed-adminonly{ outline-style:dashed !important; }
.ed-on .app{ padding-top:var(--ed-h, 52px); }
.ed-on #main{ padding-bottom:calc(var(--ed-bot, 80px) + 24px); opacity:.42; }
.ed-on [data-ed]{ outline:1px solid rgba(127,180,202,.32); outline-offset:2px; cursor:default; }
.ed-on [data-ed].ed-sel{ outline:2px solid var(--ed-blue); outline-offset:2px; }
.ed-on [data-ed].ed-overlap{ outline:2px solid var(--danger) !important; }
.ed-ui [data-ed]{ outline:none !important; }
.ed-on header.board, .ed-on .am-head.board, .ed-on .navi-head.board{
  background-image:radial-gradient(rgba(197,201,197,.10) 1px, transparent 1.3px); background-size:8px 8px; border-bottom:1px dashed rgba(127,180,202,.55) !important; }
.ed-dragging, .ed-dragging *{ user-select:none; -webkit-user-select:none; }

/* ---- 위 막대 ---- */
#edBar{ position:fixed; left:0; right:0; top:0; z-index:140; box-sizing:border-box; display:flex; align-items:center; gap:6px;
  padding:calc(8px + env(safe-area-inset-top, 0px)) 10px 8px; background:var(--ed-bg); border-bottom:1px solid var(--ed-line); }
.ed-ib{ width:36px; height:36px; padding:0; display:flex; align-items:center; justify-content:center; border:1px solid #393836; border-radius:10px; background:transparent; color:var(--text); flex:none; }
.ed-ib.ghost{ border:none; width:34px; }
.ed-ib:disabled{ color:#5f5b57; }
.ed-ib.sm{ width:32px; height:32px; border:none; }
.ed-scr{ height:36px; padding:0 9px 0 12px; display:flex; align-items:center; gap:4px; border:1px solid #393836; border-radius:10px; background:var(--panel); color:#d8d6cf; font:inherit; font-size:14px; font-weight:500; }
.ed-sp{ flex:1 1 auto; min-width:0; }
.ed-save{ height:36px; padding:0 16px; border:none; border-radius:10px; background:var(--amber); color:var(--on-amber); font:inherit; font-size:14px; font-weight:700; }
.ed-btn{ background:transparent; border:1px solid var(--line); border-radius:8px; color:var(--text); font:inherit; font-size:12.5px; font-weight:700; padding:5px 10px; cursor:pointer; white-space:nowrap; }
.ed-btn.sm{ font-size:13px; padding:3px 10px; min-width:30px; }
.ed-btn.dng{ color:var(--danger); border-color:var(--danger); }
.ed-btn:disabled{ opacity:.4; }
.ed-pop{ position:fixed; right:8px; z-index:142; background:var(--panel); border:1px solid var(--amber-dim); border-radius:12px; padding:4px; display:flex; flex-direction:column; min-width:200px; max-height:60vh; overflow:auto; box-shadow:0 8px 24px rgba(0,0,0,.55); }
.ed-pop button{ text-align:left; background:transparent; border:none; color:var(--text); font:inherit; font-size:14px; padding:11px 12px; border-radius:8px; }
.ed-pop button.on{ color:var(--ed-blue); }
.ed-pop button:active{ background:var(--panel-2); }
.ed-pt{ font-size:11.5px; color:var(--text-dim); padding:6px 12px 2px; }

/* ---- 아래 막대 ---- */
#edBot{ position:fixed; left:0; right:0; bottom:0; z-index:140; max-height:46vh; overflow:auto; box-sizing:border-box; padding:8px 12px calc(14px + env(safe-area-inset-bottom, 0px)); background:var(--ed-bg); border-top:1px solid var(--ed-line); }
#edBot.big{ max-height:48vh; overflow:auto; padding:10px 14px calc(14px + env(safe-area-inset-bottom, 0px)); background:var(--ed-panel); border-top:1px solid var(--ed-blue); border-radius:16px 16px 0 0; box-shadow:0 -10px 28px rgba(0,0,0,.6); }
.ed-hintpill{ position:absolute; left:50%; top:-44px; transform:translateX(-50%); white-space:nowrap; height:34px; box-sizing:border-box; padding:0 14px; display:flex; align-items:center; border:1px solid #393836; border-radius:17px; background:#282727; color:var(--text); font-size:12px; pointer-events:none; }
.ed-tools{ display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:2px; }
.ed-tools button{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; padding:6px 0; border:none; border-radius:10px; background:transparent; color:var(--text); font:inherit; font-size:10.5px; font-weight:500; }
.ed-tools button.on{ color:var(--ed-blue); }
.ed-selrow,.ed-selrow2,.ed-mhead,.ed-mfoot{ display:flex; align-items:center; gap:8px; min-height:34px; }
.ed-selico{ width:24px; height:24px; display:flex; align-items:center; justify-content:center; border-radius:6px; background:#1f2a2f; color:var(--ed-blue); flex:none; }
.ed-selico svg{ width:15px; height:15px; }
.ed-selrow b, .ed-mhead b{ font-size:14px; color:#d8d6cf; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ed-linkb,.ed-tag{ font-size:10.5px; color:var(--text-dim); background:var(--panel); border-radius:9px; padding:1px 7px; white-space:nowrap; }
.ed-linkb, .ed-tag.bl{ color:var(--ed-blue); background:#1f2a2f; }
.ed-chipx{ height:22px; padding:0 8px; display:flex; align-items:center; border-radius:11px; background:var(--panel); color:var(--text-dim); font-size:11px; }
.ed-multi{ display:flex; align-items:center; gap:8px; font-size:12px; color:var(--text-dim); }
.ed-val{ height:26px; padding:0 8px; display:flex; align-items:center; gap:5px; border:none; border-radius:6px; background:var(--panel); color:var(--text); font-family:"Courier New",monospace; font-size:12px; }
.ed-val i{ font-style:normal; color:var(--text-dim); }
.ed-pri{ height:34px; padding:0 12px; display:flex; align-items:center; gap:4px; border:none; border-radius:10px; background:var(--ed-blue); color:#0d0c0c; font:inherit; font-size:13px; font-weight:700; }
.ed-pri svg{ width:15px; height:15px; }
.ed-link{ border:none; background:transparent; color:var(--ed-blue); font:inherit; font-size:12.5px; padding:4px 2px; }
.ed-acc{ height:40px; padding:0 12px; display:flex; align-items:center; justify-content:space-between; border:1px solid #393836; border-radius:10px; background:var(--panel); color:var(--text); font:inherit; font-size:13px; margin:8px 0; width:100%; }
.ed-chipbtn{ height:32px; padding:0 12px; display:flex; align-items:center; gap:6px; border:1px solid rgba(127,180,202,.45); border-radius:16px; background:transparent; color:var(--ed-blue); font:inherit; font-size:12px; }
.ed-chipbtn svg{ width:16px; height:16px; }
#edBot .switch, #edSheet .switch, .ed-dlg .switch{ position:relative; flex:none; }

/* ---- 화면 위 표시 층 ---- */
#edLayer{ position:fixed; inset:0; z-index:130; pointer-events:none; }
#edLayer > *{ position:absolute; }
.ed-bpill{ height:18px; padding:0 8px; display:flex; align-items:center; border-radius:9px; background:var(--ed-bg); border:1px solid rgba(127,180,202,.45); color:var(--ed-blue); font-size:10.5px; font-weight:500; }
.ed-bh{ pointer-events:auto; height:22px; padding:0 8px; display:flex; align-items:center; gap:3px; border:1px solid rgba(127,180,202,.45); border-radius:11px; background:var(--ed-bg); color:var(--ed-blue); font:inherit; font-size:10.5px; font-weight:500; touch-action:none; }
.ed-bh svg{ width:12px; height:12px; }
.ed-listchip{ pointer-events:auto; height:30px; padding:0 10px 0 12px; display:flex; align-items:center; gap:4px; border:1px solid rgba(127,180,202,.45); border-radius:15px; background:var(--ed-bg); color:var(--ed-blue); font:inherit; font-size:12px; font-weight:500; }
.ed-listchip svg{ width:14px; height:14px; }
.ed-num-b{ width:18px; height:18px; display:flex; align-items:center; justify-content:center; border-radius:9px; background:var(--ed-blue); color:#0d0c0c; font-family:"Courier New",monospace; font-size:11px; font-weight:700; }
.ed-move{ pointer-events:auto; width:36px; height:36px; padding:0; display:flex; align-items:center; justify-content:center; border:2px solid var(--ed-bg); border-radius:18px; background:var(--ed-blue); color:#0d0c0c; touch-action:none; box-shadow:0 2px 8px rgba(0,0,0,.6); }
.ed-move svg{ stroke-width:2.2; }
.ed-rz{ pointer-events:auto; width:32px; height:32px; display:flex; align-items:center; justify-content:center; touch-action:none; }
.ed-rz i{ width:10px; height:10px; box-sizing:border-box; border:2px solid var(--ed-bg); border-radius:2px; background:var(--ed-blue); }
.ed-ghost{ position:absolute; box-sizing:border-box; border:1.5px dashed rgba(127,180,202,.75); border-radius:12px; pointer-events:none; }
.ed-pv-box{ box-sizing:border-box; border:1.5px dashed var(--ed-blue); border-radius:12px; background:rgba(127,180,202,.10); }
.ed-pv-gap{ text-align:center; font-family:"Courier New",monospace; font-size:10px; font-weight:700; color:var(--ed-blue); }
.ed-pv-tag{ height:16px; padding:0 6px; display:flex; align-items:center; border-radius:4px; background:var(--ed-bg); border:1px dashed var(--ed-blue); color:var(--ed-blue); font-size:9.5px; font-weight:700; }
#edGuides{ position:fixed; inset:0; z-index:129; pointer-events:none; }
.ed-gv{ position:fixed; top:0; bottom:0; width:0; border-left:1px solid var(--ed-pink); }
.ed-gh2{ position:fixed; left:0; right:0; height:0; border-top:1px solid var(--ed-pink); }
.ed-gl{ position:fixed; height:18px; padding:0 7px; display:flex; align-items:center; border-radius:4px; background:var(--ed-pink); color:#181616; font-size:10.5px; font-weight:700; }
.ed-bubble{ position:fixed; left:50%; top:calc(var(--ed-h, 52px) + 6px); transform:translateX(-50%); z-index:145; height:26px; padding:0 10px; display:flex; align-items:center; gap:8px; border:1px solid var(--ed-blue); border-radius:13px; background:var(--ed-bg); color:#d8d6cf; font-family:"Courier New",monospace; font-size:11.5px; font-weight:600; white-space:nowrap; pointer-events:none; }
.ed-bubble em{ font-style:normal; color:var(--ed-pink); }

/* ---- 속성 시트 · 창 ---- */
#edSheet,.ed-dlg{ position:fixed; left:0; right:0; bottom:0; z-index:150; box-sizing:border-box; max-height:56vh; display:flex; flex-direction:column; padding:0 14px calc(12px + env(safe-area-inset-bottom, 0px)); background:var(--ed-panel); border-top:1px solid #393836; border-radius:18px 18px 0 0; box-shadow:0 -14px 30px rgba(0,0,0,.45); }
#edDlg{ position:fixed; inset:0; z-index:155; background:rgba(0,0,0,.4); display:flex; align-items:flex-end; }
#edDlg .ed-dlg{ position:relative; width:100%; max-height:78vh; }
.ed-sgrip{ width:36px; height:4px; margin:8px auto 6px; border-radius:2px; background:#4a4845; flex:none; }
.ed-ih{ display:flex; align-items:center; gap:10px; min-height:40px; flex:none; }
.ed-sname{ flex:1; font-size:16px; color:#d8d6cf; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ed-x{ width:36px; height:36px; display:flex; align-items:center; justify-content:center; border:1px solid #393836; border-radius:10px; background:transparent; color:var(--text); padding:0; }
.ed-tabs{ display:flex; gap:4px; margin:4px 0 8px; flex:none; overflow-x:auto; }
.ed-tab{ background:transparent; border:1px solid var(--line); border-radius:16px; color:var(--text-dim); font:inherit; font-size:12.5px; font-weight:700; padding:5px 12px; cursor:pointer; white-space:nowrap; }
.ed-tab.on{ color:var(--ed-blue); border-color:var(--ed-blue); background:rgba(127,180,202,.12); }
.ed-sbody{ overflow:auto; flex:1 1 auto; padding-bottom:8px; }
.ed-pills{ display:flex; flex-wrap:wrap; gap:5px; margin:5px 0; }
.ed-sec{ font-size:11.5px; font-weight:700; letter-spacing:.3px; color:var(--text-dim); margin:12px 0 4px; }
.ed-lb{ font-size:11.5px; color:var(--text-dim); margin:8px 0 3px; }
.ed-note{ font-size:12px; color:var(--text-dim); margin:4px 0; }
.ed-note.c{ text-align:center; }
.ed-code{ font-family:"Courier New",monospace; font-size:12.5px; background:var(--ink); border:1px solid var(--line); border-radius:8px; padding:7px 10px; }
.ed-nrow{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin:6px 0; font-size:13px; flex-wrap:wrap; }
.ed-step{ display:flex; align-items:center; gap:5px; }
.ed-num{ width:66px; background:var(--ink); border:1px solid var(--line); border-radius:8px; color:var(--text); font-size:15px; padding:5px 6px; text-align:center; }
.ed-num:focus{ outline:none; border-color:var(--ed-blue); }
.ed-unit{ font-size:11px; color:var(--text-dim); width:18px; }
.ed-step .ed-btn, .ed-hold, .ed-ib, .ed-move, .ed-rz{ user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; touch-action:manipulation; }
.ed-grid2{ display:grid; grid-template-columns:1fr 1fr; gap:8px 12px; }
.ed-nc{ display:flex; flex-direction:column; gap:3px; font-size:11.5px; color:var(--text-dim); }
.ed-nc .ed-num{ width:54px; }
.ed-fit{ display:grid; grid-template-columns:repeat(3, 1fr); gap:6px; }
.ed-fb{ min-height:44px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; border:1px solid #393836; border-radius:10px; background:transparent; color:var(--text); font:inherit; font-size:11px; }
.ed-fb svg{ width:18px; height:18px; }
.ed-acts{ display:flex; gap:8px; margin:10px 0 4px; flex-wrap:wrap; }
.ed-sw{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin:4px 0 8px; }
.ed-swb{ width:28px; height:28px; border-radius:50%; border:1.5px solid var(--line); padding:0; }
.ed-swb.none{ background:repeating-linear-gradient(45deg,var(--line) 0 3px,transparent 3px 6px) !important; }
.ed-swb.on{ border-color:var(--ed-blue); box-shadow:0 0 0 2px var(--ed-blue); }
.ed-icons{ display:flex; flex-wrap:wrap; gap:6px; margin:6px 0; }
.ed-ord{ display:flex; align-items:center; gap:8px; margin:4px 0; font-size:13px; min-height:40px; }
.ed-ord span{ flex:1; }
.ed-ord.off{ opacity:.6; }
.ed-trow{ margin-bottom:10px; }
.ed-tk{ display:flex; align-items:center; gap:8px; font-family:"Courier New",monospace; font-size:11.5px; color:var(--text-dim); margin-bottom:4px; }
.ed-badge{ font-family:inherit; font-size:10.5px; font-weight:700; color:var(--on-amber); background:var(--amber); border-radius:10px; padding:1px 8px; }
.ed-trow textarea{ width:100%; box-sizing:border-box; background:var(--ink); border:1px solid var(--line); border-radius:8px; padding:9px 11px; color:var(--text); font-size:16px; font-family:inherit; line-height:1.45; resize:vertical; }
.ed-trow textarea:focus{ outline:none; border-color:var(--ed-blue); }
.ed-chips{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:5px; }
.ed-chips .ed-lb{ flex:1 0 100%; }
.ed-chip{ background:rgba(127,180,202,.16); border:1px solid var(--ed-blue); color:var(--ed-blue); border-radius:14px; font-family:"Courier New",monospace; font-size:13px; font-weight:700; padding:2px 11px; cursor:pointer; }
.ed-chip.miss{ background:rgba(196,116,110,.16); border-color:var(--danger); color:var(--danger); }
.ed-def{ margin-top:6px; font-size:12px; color:var(--text-dim); display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.ed-body{ padding:0; }
.ed-pick{ font-size:13px; color:var(--text-dim); padding:8px 2px; }

/* ---- 맞추기 · 제안 카드 ---- */
.ed-sug{ margin:8px 0; padding:12px; display:flex; flex-direction:column; gap:8px; border:1px solid rgba(127,180,202,.38); border-radius:14px; background:#141c20; }
.ed-sugt{ display:flex; align-items:center; gap:8px; color:var(--ed-blue); font-size:14px; }
.ed-sugt b{ color:#d8d6cf; }
.ed-sugt svg{ width:20px; height:20px; }
.pk{ font-style:normal; font-family:"Courier New",monospace; color:var(--ed-pink); }
.bl{ font-style:normal; font-family:"Courier New",monospace; color:var(--ed-blue); }
.ed-seg2{ display:grid; grid-template-columns:1fr 1fr; gap:3px; padding:3px; border-radius:9px; background:var(--ed-bg); }
.ed-seg2 > button{ min-height:34px; border:none; border-radius:7px; background:transparent; color:var(--text-dim); font:inherit; font-size:12.5px; display:flex; align-items:center; justify-content:center; gap:4px; }
.ed-seg2 > button.on{ background:var(--ed-blue-dim); color:var(--ed-blue); font-weight:700; }
.ed-gapv{ display:inline-flex; align-items:center; gap:4px; }
.ed-gapv .ed-btn{ padding:0 6px; min-width:24px; }
.ed-go{ height:44px; width:100%; border:none; border-radius:11px; background:var(--ed-blue); color:#0d0c0c; font:inherit; font-size:14.5px; font-weight:700; }
.ed-go:disabled{ opacity:.4; }
.ed-agrid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:6px; margin-bottom:6px; }
.ed-agt{ grid-column:1/-1; font-size:11.5px; font-weight:700; color:var(--text-dim); margin-top:6px; }
.ed-ab{ min-height:44px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; border:1px solid #393836; border-radius:10px; background:transparent; color:var(--text); font:inherit; font-size:11px; }
.ed-ab svg{ width:18px; height:18px; }

/* ---- 다른 화면 적용 · 요소 목록 ---- */
.ed-check{ width:100%; min-height:44px; display:flex; align-items:center; gap:10px; border:none; background:transparent; color:#d8d6cf; font:inherit; font-size:14px; text-align:left; }
.ed-check i{ width:20px; height:20px; box-sizing:border-box; display:flex; align-items:center; justify-content:center; border:1.5px solid #393836; border-radius:5px; flex:none; }
.ed-check.on i{ background:var(--ed-blue); border-color:var(--ed-blue); color:#0d0c0c; }
.ed-check i svg{ width:14px; height:14px; stroke-width:3; }
.ed-check span{ flex:1; }
.ed-check em{ font-style:normal; font-size:11.5px; color:var(--ed-blue); }
.ed-check.off{ color:#6f6b66; } .ed-check.off em{ color:#6f6b66; }
.ed-prevbox{ display:flex; flex-wrap:wrap; gap:6px; padding:10px; border:1px solid var(--ed-line); border-radius:12px; background:var(--ink); }
.ed-prevchip{ padding:3px 9px; border:1px dashed var(--ed-blue); border-radius:8px; color:var(--text); font-size:12px; }
.ed-lrow{ display:flex; align-items:center; gap:8px; min-height:46px; padding:0 4px; border-bottom:1px solid #22211f; }
.ed-lrow.on{ background:rgba(127,180,202,.10); }
.ed-lic{ display:flex; color:var(--ed-blue); } .ed-lic svg{ width:18px; height:18px; }
.ed-lname{ flex:1; font-size:14px; color:#d8d6cf; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ---- 카드 양식 ---- */
#edCardOv{ position:fixed; inset:0; z-index:160; display:flex; flex-direction:column; background:var(--ink); }
.ed-cardhd{ display:flex; align-items:center; gap:6px; padding:calc(8px + env(safe-area-inset-top, 0px)) 10px 8px; background:var(--ed-bg); border-bottom:1px solid var(--ed-line); }
.ed-back{ display:flex; align-items:center; gap:2px; border:none; background:transparent; color:var(--text); font:inherit; font-size:14px; min-width:84px; }
.ed-cardt{ flex:1; text-align:center; display:flex; flex-direction:column; } .ed-cardt b{ font-size:15px; color:#d8d6cf; } .ed-cardt span{ font-size:11px; color:var(--text-dim); }
.ed-cardprev{ padding:10px 16px; flex:none; }
.ed-cardlist{ margin-top:8px; pointer-events:none; }
.ed-cardset{ flex:1; overflow:auto; padding:14px 16px calc(24px + env(safe-area-inset-bottom, 0px)); background:var(--ed-panel); border-top:1px solid #393836; border-radius:18px 18px 0 0; }

/* ---- 숨은 문구 · 전체 설정 큰 패널 ---- */
.ed-list{ position:fixed; left:0; right:0; bottom:0; z-index:141; background:var(--ink); display:flex; flex-direction:column; padding:10px 12px; }
.ed-ltop{ display:flex; gap:8px; margin-bottom:8px; }
.ed-ltop input{ flex:1; background:var(--panel); border:1px solid var(--line); border-radius:8px; color:var(--text); font-size:16px; padding:8px 10px; }
.ed-seg{ display:flex; gap:4px; margin-bottom:8px; }
.ed-rows{ flex:1; overflow:auto; padding-bottom:44vh; }
.ed-gh{ font-size:12px; font-weight:700; color:var(--amber); margin:10px 0 4px; }
.ed-gh span{ color:var(--text-dim); font-weight:400; }
.ed-hrow{ display:flex; flex-direction:column; width:100%; text-align:left; background:var(--panel); border:1px solid var(--line); border-radius:8px; padding:6px 10px; margin-bottom:4px; color:var(--text); font:inherit; }
.ed-hrow.ed{ border-color:var(--ed-blue); }
.ed-rk{ font-family:"Courier New",monospace; font-size:11px; color:var(--text-dim); }
.ed-rv{ font-size:13px; }
.ed-confirm{ position:fixed; inset:0; z-index:200; background:rgba(0,0,0,.6); display:flex; align-items:center; justify-content:center; padding:20px; }
.ed-cbox{ background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:18px 16px 12px; max-width:320px; width:100%; }
.ed-ctxt{ font-size:15px; line-height:1.5; white-space:pre-wrap; }
.ed-cbtns{ display:flex; justify-content:flex-end; gap:8px; margin-top:14px; }
.ed-cbtns button{ background:transparent; border:1px solid var(--line); border-radius:8px; color:var(--text); font:inherit; padding:7px 14px; }
.ed-cbtns button.pri{ background:var(--amber); color:var(--on-amber); border-color:var(--amber); }
.ed-ui svg{ fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; flex:none; }

.ed-on .allmap-ov{ top:var(--ed-h, 52px); }
.ed-on .allmap-ov .am-head{ padding-top:10px; }
