/* V143.58 화면 보면서 편집 + 칸 배치 */
/* 칸 배치 (모든 방문자) */
.hsl-on.hsl-flex{display:flex!important;flex-direction:column!important}
.hsl-on.hsl-flex>*{flex:0 0 auto;width:100%}
.hsl-hidden{display:none!important}

/* 관리자 상단 버튼 */
.admin-portal-actions-v97 .hle-open{height:40px;padding:0 16px;border-radius:999px;border:0;background:linear-gradient(135deg,#2563eb,#7c3aed);color:#fff;font-weight:800;font-size:13.5px;cursor:pointer;box-shadow:0 6px 16px rgba(37,99,235,.28);white-space:nowrap}
.admin-portal-actions-v97 .hle-open:hover{filter:brightness(1.08)}

/* 편집 창 */
html.hle-lock,html.hle-lock body{overflow:hidden!important}
.hle-shell{position:fixed;inset:0;z-index:99990;background:#e9ebef;display:flex;flex-direction:column;font-family:inherit}
.hle-shell[hidden]{display:none}
.hle-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 14px;background:#111827;color:#fff}
.hle-title{font-size:15px;margin-right:4px;white-space:nowrap}
.hle-seg{display:inline-flex;border:1px solid #374151;border-radius:9px;overflow:hidden}
.hle-seg button{height:34px;padding:0 12px;border:0;background:#1f2937;color:#d1d5db;font-size:13px;font-weight:700;cursor:pointer;font-family:inherit}
.hle-seg button.on{background:#2563eb;color:#fff}
.hle-page{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:#9ca3af}
.hle-page select{height:34px;border-radius:8px;border:1px solid #374151;background:#1f2937;color:#fff;padding:0 8px;font-size:13px;font-family:inherit}
.hle-tools{display:inline-flex;gap:6px;flex-wrap:wrap}
.hle-tools button{height:34px;padding:0 11px;border-radius:8px;border:1px solid #374151;background:#111827;color:#e5e7eb;font-size:12.5px;font-weight:700;cursor:pointer;font-family:inherit}
.hle-tools button:hover{background:#1f2937;border-color:#60a5fa}
.hle-status{margin-left:auto;font-size:12px;color:#9ca3af;white-space:nowrap}
.hle-status.saved{color:#34d399}
.hle-close{height:36px;padding:0 16px;border-radius:9px;border:0;background:#fff;color:#111827;font-weight:800;font-size:13.5px;cursor:pointer;font-family:inherit}
.hle-help{padding:7px 14px;background:#eef2ff;color:#3730a3;font-size:12.5px;line-height:1.5;border-bottom:1px solid #c7d2fe}
.hle-stage{flex:1;min-height:0;display:flex;justify-content:center;align-items:stretch;padding:0;overflow:auto}
.hle-device{width:100%;height:100%;background:#fff}
.hle-device iframe{display:block;width:100%;height:100%;border:0;background:#fff}
.hle-shell.is-mobile .hle-stage{padding:18px 0;align-items:flex-start}
.hle-shell.is-mobile .hle-device{box-sizing:content-box;width:390px;height:min(844px,calc(100% - 24px));flex:none;border-radius:30px;border:10px solid #111827;overflow:hidden;box-shadow:0 20px 50px rgba(0,0,0,.25)}
.hle-toast{position:fixed;left:50%;bottom:26px;transform:translateX(-50%) translateY(20px);opacity:0;pointer-events:none;background:#111827;color:#fff;padding:11px 18px;border-radius:999px;font-size:13.5px;font-weight:600;transition:.2s;z-index:99999;max-width:90vw;text-align:center}
.hle-toast.on{opacity:1;transform:translateX(-50%) translateY(0)}
.hle-back{position:fixed;left:50%;top:14px;transform:translateX(-50%);z-index:99995;height:44px;padding:0 20px;border-radius:999px;border:0;background:linear-gradient(135deg,#2563eb,#7c3aed);color:#fff;font-weight:800;font-size:14px;cursor:pointer;box-shadow:0 10px 26px rgba(37,99,235,.35)}
/* 상단 사진·글씨체 편집 창이 편집 창 위로 */
html.hle-lock #hpbModal{z-index:99996}

/* iframe 안(편집 도우미) */
html.hle-agent.hle-editing .sub-hero{cursor:pointer;outline:2px dashed rgba(96,165,250,0);outline-offset:-6px;transition:outline-color .15s}
html.hle-agent.hle-editing .sub-hero:hover{outline-color:rgba(96,165,250,.95)}
html.hle-agent.hle-editing .sub-hero:hover::after{content:"📷 눌러서 사진·위치 바꾸기";position:absolute;right:18px;top:calc(var(--subpage-header-height,88px) + 14px);z-index:3;background:rgba(17,24,39,.85);color:#fff;font-size:12.5px;font-weight:700;padding:7px 12px;border-radius:999px;pointer-events:none}
html.hle-agent.hle-editing #page-home .slider-wrap{cursor:pointer}
html.hle-agent.hle-editing #page-home .hero:hover{outline:3px dashed rgba(96,165,250,.95);outline-offset:-8px}
html.hle-agent #page-home .hero{position:relative}
html.hle-agent.hle-editing .hle-sec-hover{outline:2px solid rgba(124,58,237,.75)!important;outline-offset:-2px}
html.hle-agent.hle-editing .hsl-hidden{display:block!important;position:relative;background:repeating-linear-gradient(135deg,rgba(185,28,28,.05) 0 12px,transparent 12px 24px)}
html.hle-agent.hle-editing .hsl-hidden>*{opacity:.38;filter:grayscale(1)}
html.hle-agent.hle-editing .hsl-hidden::before{content:"숨긴 칸 (방문자에게 안 보임)";position:absolute;left:12px;top:12px;z-index:5;background:#b91c1c;color:#fff;font-size:12px;font-weight:800;padding:5px 10px;border-radius:6px}
html.hle-agent:not(.hle-editing) .hsl-hidden{display:none!important}
.hle-sec-tool{position:absolute;z-index:9990;display:none;align-items:center;gap:4px;padding:5px;border-radius:10px;background:#4c1d95;box-shadow:0 8px 22px rgba(0,0,0,.25);font-family:inherit}
.hle-sec-tool .hle-sec-name{color:#ede9fe;font-size:12px;font-weight:700;padding:0 6px;max-width:150px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.hle-sec-tool button{height:30px;min-width:30px;padding:0 9px;border:0;border-radius:7px;background:#fff;color:#4c1d95;font-size:12.5px;font-weight:800;cursor:pointer}
.hle-sec-tool button:hover{background:#ede9fe}
#hleShell .hle-page{white-space:nowrap}
#hleShell .hle-page select{appearance:auto;-webkit-appearance:menulist;height:34px;min-width:150px;width:auto;border-radius:8px;border:1px solid #374151;background:#fff!important;color:#111827!important;padding:0 8px;font-size:13px;box-shadow:none}

/* 편집 창 안 모달 편집 (슬라이드·팝업) */
body.hle-inline-on .hle-shell{filter:none}
.hle-inline-dim{position:fixed;inset:0;z-index:99991;background:rgba(15,23,42,.55)}
body.hle-inline-on #page-admin .admin-shell-v76{position:fixed!important;z-index:99993!important;left:3vw;right:3vw;top:calc(3vh + 54px);bottom:3vh;width:auto!important;max-width:none!important;display:block!important;background:#f8fafc;border-radius:0 0 16px 16px;box-shadow:0 30px 80px rgba(0,0,0,.35);overflow:hidden}
body.hle-inline-on #page-admin .admin-sidebar-v76{display:none!important}
body.hle-inline-on #page-admin .admin-main-v76{width:100%!important;max-width:none!important;height:100%;overflow:auto;padding:18px 22px!important;box-sizing:border-box}
.hle-inline-bar{position:fixed;z-index:99994;left:3vw;right:3vw;top:3vh;height:54px;display:flex;align-items:center;gap:12px;padding:0 16px;background:#111827;color:#fff;border-radius:16px 16px 0 0;font-size:13.5px}
.hle-inline-bar b{font-size:15px}
.hle-inline-bar span{color:#cbd5e1}
.hle-inline-bar em{font-style:normal;color:#fde68a;font-weight:700}
.hle-inline-done{margin-left:auto;height:38px;padding:0 16px;border-radius:9px;border:0;background:linear-gradient(135deg,#2563eb,#7c3aed);color:#fff;font-weight:800;font-size:13.5px;cursor:pointer;font-family:inherit}
body.hle-inline-on .hv54-overlay{z-index:99997!important}
/* iframe 안: 슬라이드·팝업 편집 버튼 */
.hle-slide-edit{position:absolute;z-index:9991;display:none;height:42px;padding:0 18px;border-radius:999px;border:0;background:linear-gradient(135deg,#2563eb,#7c3aed);color:#fff;font-weight:800;font-size:14px;cursor:pointer;box-shadow:0 10px 26px rgba(37,99,235,.4);font-family:inherit}
html.hle-agent:not(.hle-editing) .hle-slide-edit,html.hle-agent:not(.hle-editing) .hle-pop-edit{display:none!important}
.hmp-slot{position:relative}
.hle-pop-edit{position:absolute;left:50%;top:-16px;transform:translateX(-50%);z-index:5;height:34px;padding:0 14px;border-radius:999px;border:0;background:linear-gradient(135deg,#2563eb,#7c3aed);color:#fff;font-weight:800;font-size:13px;cursor:pointer;box-shadow:0 8px 20px rgba(37,99,235,.4);white-space:nowrap;font-family:inherit}
.hle-pop-edit:hover{filter:brightness(1.1)}

/* ===== 포토샵처럼: 화면 편집에서 여는 큰 편집 화면 ===== */
html.hle-ps .hv54-overlay{position:fixed!important;inset:0!important;z-index:99997!important;padding:0!important;background:#1b1b1f!important;display:block!important}
html.hle-ps .hv54-dialog{width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;margin:0!important;border-radius:0!important;background:#1b1b1f!important;display:flex!important;flex-direction:column!important;padding:0!important;box-shadow:none!important;overflow:hidden!important}
html.hle-ps .hv54-dialog-header{flex:0 0 auto;display:flex!important;align-items:center!important;gap:16px;min-height:64px;padding:0 18px!important;background:#26262c!important;border-bottom:1px solid #34343c!important;margin:0!important}
html.hle-ps .hv54-dialog-title{color:#fff!important;font-size:18px!important}
html.hle-ps .hv54-dialog-tip{color:#a1a1aa!important;font-size:13px!important}
html.hle-ps .hv54-dismiss{display:none!important}
.hle-ps-actions{margin-left:auto;display:flex;gap:8px}
.hle-ps-actions button{height:44px;padding:0 18px;border-radius:10px;font-size:15px;font-weight:800;cursor:pointer;font-family:inherit}
.hle-ps-cancel{background:transparent;border:1px solid #52525b;color:#d4d4d8}
.hle-ps-save{background:linear-gradient(135deg,#2563eb,#7c3aed);border:0;color:#fff;box-shadow:0 8px 20px rgba(37,99,235,.35)}
html.hle-ps .hv54-expanded-editor{flex:1 1 auto!important;min-height:0!important;display:grid!important;grid-template-columns:120px minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important;gap:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:#1b1b1f!important;max-height:none!important}
html.hle-ps .hv54-expanded-editor>.hv52-helper{display:none!important}
/* 왼쪽 도구 막대 */
html.hle-ps .hv54-expanded-editor>.hv52-toolbar{grid-column:1;grid-row:1;display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;align-items:stretch!important;gap:8px!important;padding:14px 10px!important;margin:0!important;background:#222228!important;border:0!important;border-right:1px solid #34343c!important;border-radius:0!important;overflow-y:auto;position:static!important}
html.hle-ps .hv54-expanded-editor>.hv52-toolbar button,html.hle-ps .hv54-expanded-editor>.hv52-toolbar label{width:100%!important;min-height:54px!important;height:auto!important;padding:8px 6px!important;border-radius:12px!important;border:1px solid #3f3f46!important;background:#2c2c33!important;color:#f4f4f5!important;font-size:14px!important;font-weight:800!important;line-height:1.25!important;justify-content:center!important;text-align:center!important;white-space:normal!important;box-shadow:none!important}
html.hle-ps .hv54-expanded-editor>.hv52-toolbar button:hover{background:#3b3b44!important;border-color:#60a5fa!important}
html.hle-ps .hv54-expanded-editor>.hv52-toolbar .hv52-devices{display:flex!important;flex-direction:column!important;gap:6px!important;margin:8px 0!important;padding:8px 0!important;border-top:1px solid #34343c;border-bottom:1px solid #34343c;background:none!important}
html.hle-ps .hv54-expanded-editor>.hv52-toolbar .hv52-device.is-on{background:#2563eb!important;border-color:#2563eb!important}
html.hle-ps .hv54-expanded-editor>.hv52-toolbar .hv52-undo{min-height:44px!important;font-size:20px!important}
html.hle-ps .hv54-expanded-editor>.hv52-toolbar .hv52-expand{display:none!important}
html.hle-ps .hv54-expanded-editor>.hv52-toolbar .hv52-background{display:flex!important;flex-direction:column;gap:6px;align-items:center}
html.hle-ps .hv54-expanded-editor>.hv52-toolbar .hv52-background input{width:44px!important;height:30px!important;border:0;background:none;padding:0}
/* 가운데 캔버스 + 오른쪽 설정 */
html.hle-ps .hv54-workspace{grid-column:2;grid-row:1;display:grid!important;grid-template-columns:minmax(0,1fr) 400px!important;gap:0!important;min-height:0!important;height:100%!important;margin:0!important}
html.hle-ps .hv54-canvas-scroll{min-height:0!important;height:100%!important;overflow:auto!important;display:flex!important;align-items:flex-start!important;justify-content:flex-start!important;padding:40px!important;border-radius:0!important;border:0!important;background-color:#2a2a30!important;background-image:linear-gradient(45deg,#26262b 25%,transparent 25%),linear-gradient(-45deg,#26262b 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#26262b 75%),linear-gradient(-45deg,transparent 75%,#26262b 75%)!important;background-size:24px 24px!important;background-position:0 0,0 12px,12px -12px,-12px 0!important}
html.hle-ps .hv54-canvas-scroll>.hv52-stage{box-shadow:0 20px 60px rgba(0,0,0,.55)!important;flex:none;margin:auto!important}
html.hle-ps .hv54-canvas-scroll>.hv52-stage.hv52-slide{width:calc(min(100%,calc((100vh - 190px) * var(--hana-slide-ratio-pc-num,1.7))) * var(--hle-zoom,1))!important;max-width:none!important}
html.hle-ps .hv54-canvas-scroll>.hv52-stage.hv52-popup{height:calc(min(calc(100vh - 190px),900px) * var(--hle-zoom,1))!important;width:auto!important;max-width:none!important;max-height:none!important}
html.hle-ps .hv54-settings{min-height:0!important;height:100%!important;overflow-y:auto!important;margin:0!important;padding:20px 20px 40px!important;background:#fafafa!important;border:0!important;border-left:1px solid #d4d4d8!important;border-radius:0!important;font-size:15px!important;max-height:none!important}
html.hle-ps .hv54-settings .hv52-inspector-head strong{font-size:19px!important}
html.hle-ps .hv54-settings label>span,html.hle-ps .hv54-settings .hv52-field>span{font-size:13.5px!important;font-weight:800!important;color:#3f3f46!important}
html.hle-ps .hv54-settings input:not([type=color]):not([type=checkbox]):not([type=range]),html.hle-ps .hv54-settings select{min-height:44px!important;font-size:15px!important;border-radius:9px!important}
html.hle-ps .hv54-settings textarea{font-size:16px!important;min-height:96px!important;border-radius:9px!important}
html.hle-ps .hv54-settings input[type=color]{width:56px!important;height:44px!important}
html.hle-ps .hv54-settings button{min-height:40px}
html.hle-ps .hv54-settings .hv52-seg .hv52-seg-btn{height:44px!important;font-size:13.5px!important}
html.hle-ps .hv54-settings .hv52-align-btns .hv52-align-btn{height:56px!important;font-size:20px!important}
html.hle-ps .hv54-empty{color:#52525b!important;font-size:16px!important;line-height:1.7!important;padding:30px 10px!important;text-align:center}
html.hle-ps .hv54-expanded-editor>.hv52-toolbar{height:100%!important;max-height:none!important;min-height:0!important;align-self:stretch!important;overflow-y:auto!important}

/* 오른쪽 설정: 아이콘 묶음 */
.hle-cats{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:12px 0 14px;padding:6px;border-radius:12px;background:#27272a}
.hle-cats button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;height:58px;border:0;border-radius:9px;background:transparent;color:#d4d4d8;cursor:pointer;font-family:inherit}
.hle-cats button b{font-size:19px;line-height:1;font-weight:800}
.hle-cats button small{font-size:11.5px;font-weight:700;white-space:nowrap}
.hle-cats button:hover{background:#3f3f46;color:#fff}
.hle-cats button.on{background:#2563eb;color:#fff}
.hle-cat-body{display:block}
.hle-cat-sec{display:grid;grid-template-columns:1fr 1fr;gap:12px 12px;align-items:start;padding:4px 2px 12px}
.hle-cat-sec[hidden]{display:none!important}
.hle-cat-sec>*{min-width:0}
.hle-cat-sec>label:has(textarea),.hle-cat-sec>.hv52-talign,.hle-cat-sec>.hv52-align-row,.hle-cat-sec>.hv52-fit-row,.hle-cat-sec>.hv52-device-title,.hle-cat-sec>.hv52-link-note,.hle-cat-sec>.hv52-wide,.hle-cat-sec>p,.hle-cat-sec>div:not(label){grid-column:1/-1}
html.hle-ps .hv54-settings .hle-cat-sec label{display:flex;flex-direction:column;gap:6px;margin:0}
/* 왼쪽: HTML 버튼 + HTML 창 */
html.hle-ps .hv54-expanded-editor>.hv52-toolbar .hle-html-btn{font-family:ui-monospace,Menlo,Consolas,monospace!important;color:#fde68a!important}
.hle-html-modal{position:fixed;inset:0;z-index:99999;background:rgba(0,0,0,.6);display:flex;align-items:center;justify-content:center;padding:3vh 3vw}
.hle-html-box{width:min(1100px,100%);height:100%;display:flex;flex-direction:column;background:#18181b;border-radius:14px;overflow:hidden;box-shadow:0 30px 80px rgba(0,0,0,.5)}
.hle-html-head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;background:#27272a;color:#fff;font-size:16px}
.hle-html-x{width:36px;height:36px;border:0;background:transparent;color:#a1a1aa;font-size:26px;cursor:pointer}
.hle-html-warn{margin:0;padding:10px 18px;background:#422006;color:#fde68a;font-size:13px;line-height:1.6}
.hle-html-box textarea{flex:1;min-height:0;margin:0;padding:16px 18px;border:0;outline:0;resize:none;background:#0f0f12;color:#e4e4e7;font:14px/1.6 ui-monospace,Menlo,Consolas,monospace;tab-size:2;white-space:pre}
.hle-html-foot{display:flex;align-items:center;gap:8px;padding:12px 18px;background:#27272a}
.hle-html-count{margin-right:auto;color:#a1a1aa;font-size:12.5px}
.hle-html-foot button{height:42px;padding:0 18px;border-radius:9px;font-weight:800;font-size:14px;cursor:pointer;font-family:inherit}
.hle-html-cancel{background:transparent;border:1px solid #52525b;color:#d4d4d8}
.hle-html-apply{background:#f59e0b;border:0;color:#1c1917}
/* 편집 창 위쪽: 만들어 둔 슬라이드·팝업 탭 */
.hle-ps-tabs{flex:0 0 auto;display:flex;gap:6px;padding:8px 14px;background:#1f1f24;border-bottom:1px solid #34343c;overflow-x:auto;scrollbar-width:thin}
.hle-ps-tabs button{flex:0 0 auto;display:inline-flex;align-items:center;gap:7px;height:38px;max-width:240px;padding:0 14px;border:1px solid #3a3a44;border-radius:9px;background:#2b2b32;color:#c9c9d2;font:700 14px/1 inherit;font-family:inherit;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hle-ps-tabs button em{font-style:normal;display:inline-grid;place-items:center;min-width:22px;height:22px;border-radius:6px;background:#3a3a44;color:#fff;font-size:12px}
.hle-ps-tabs button:hover{background:#34343c;color:#fff}
.hle-ps-tabs button.on{background:#2f6bff;border-color:#2f6bff;color:#fff}
.hle-ps-tabs button.on em{background:rgba(255,255,255,.25)}
.hle-ps-tabs button.off{opacity:.62}
.hle-ps-tabs button small{font-size:11px;padding:2px 6px;border-radius:5px;background:#55555f;color:#fff}

/* 확대·축소 + 실제처럼 보기 */
.hle-zoom{display:flex;flex-direction:column;gap:6px;padding:8px 0;border-top:1px solid #34343c}
.hle-zoom-row{display:grid;grid-template-columns:1fr 1fr;gap:6px}
html.hle-ps .hv54-expanded-editor>.hv52-toolbar .hle-zoom button{min-height:40px!important}
.hle-zoom output{display:block;text-align:center;color:#e4e4e7;font:800 15px/1 inherit}
html.hle-ps .hv54-expanded-editor>.hv52-toolbar .hle-clean-btn.is-on{background:#7c3aed!important;border-color:#a78bfa!important}
.hle-chrome-edit{z-index:2147480000;display:none;height:34px;padding:0 14px;border-radius:999px;border:0;background:linear-gradient(135deg,#2563eb,#7c3aed);color:#fff;font-weight:800;font-size:13px;cursor:pointer;box-shadow:0 8px 20px rgba(37,99,235,.4);white-space:nowrap;font-family:inherit}
html.hle-agent:not(.hle-editing) .hle-chrome-edit{display:none!important}
/* 둘러보면서 글 쓰기·고치기 막대 */
.hle-cbar{position:fixed;left:16px;bottom:16px;z-index:2147480500;display:none;align-items:center;gap:6px;padding:8px 8px 8px 14px;border-radius:999px;background:rgba(17,24,39,.94);color:#fff;box-shadow:0 12px 30px rgba(0,0,0,.3);font:600 13px/1 inherit;font-family:inherit;max-width:calc(100vw - 32px);flex-wrap:wrap}
.hle-cbar b{font-weight:800;margin-right:4px;white-space:nowrap}
.hle-cbar button{height:34px;padding:0 13px;border:0;border-radius:999px;background:#fff;color:#111827;font:800 13px/1 inherit;font-family:inherit;cursor:pointer;white-space:nowrap}
.hle-cbar button[data-c=new]{background:linear-gradient(135deg,#2563eb,#7c3aed);color:#fff}
.hle-cbar button[data-c=edit]{background:#fde68a}
.hle-cbar button:hover{filter:brightness(1.05)}
@media (max-width:620px){.hle-cbar{left:8px;right:8px;bottom:84px;border-radius:16px}}
.admin-portal-actions-v97 .hle-open[hidden]{display:none!important}
