        /* 2026-06-15: 누끼따기 패널 통합 → 에디터 단독 1열. */
        #aiNbWrap { display:grid; grid-template-columns: 1fr; gap:16px; }
        .aiNb-card { background:linear-gradient(135deg,#f5f3ff 0%,#ede9fe 100%); border:1.5px solid #c4b5fd; border-radius:16px; padding:18px 18px 20px; box-shadow:0 6px 24px -8px rgba(124,58,237,0.18); display:flex; flex-direction:column; gap:10px; min-width:0; }
        .aiNb-card.bg { background:linear-gradient(135deg,#fef3c7 0%,#fde68a 100%); border-color:#fcd34d; box-shadow:0 6px 24px -8px rgba(217,119,6,0.18); }
        .aiNb-title { font-size:16px; font-weight:900; color:#5b21b6; display:flex; align-items:center; gap:8px; }
        .aiNb-card.bg .aiNb-title { color:#92400e; }
        .aiNb-sub { font-size:11.5px; color:#7c3aed; font-weight:600; line-height:1.55; }
        .aiNb-card.bg .aiNb-sub { color:#a16207; }
        .aiNb-btn { padding:10px 14px; background:#007AFF; color:#fff; border:none; border-radius:980px; font-size:13px; font-weight:600; cursor:pointer; font-family:inherit; transition:background .18s; flex-shrink:0; display:inline-flex; align-items:center; justify-content:center; gap:5px; letter-spacing:-0.2px; }
        .aiNb-btn:hover { background:#0a6dd5; }
        .aiNb-btn:disabled { opacity:0.5; cursor:not-allowed; }
        .aiNb-btn.amber { background:#FF9500; }
        .aiNb-btn.amber:hover { background:#e08500; }
        .aiNb-btn.full { width:100%; padding:12px 14px; font-size:14px; }
        /* 2026-06-27: 미니에디터 확대/축소/이동 버튼 — 플랫, 그림자 없음 */
        .me-zoom-btn { padding:10px 11px; min-width:38px; background:#f1f3f5; color:#1d1d1f; border:1px solid #e0e0e2; border-radius:9px; font-size:15px; font-weight:600; cursor:pointer; font-family:inherit; line-height:1; transition:background .15s; }
        .me-zoom-btn:hover { background:#e6e8eb; }
        .me-zoom-btn.on { background:#007AFF; color:#fff; border-color:#007AFF; }
        .aiNb-preview { background:#fff; border:1.5px dashed #c4b5fd; border-radius:12px; min-height:200px; position:relative; overflow:hidden; display:flex; align-items:center; justify-content:center; padding:10px; }
        .aiNb-card.bg .aiNb-preview { border-color:#fcd34d; background:repeating-conic-gradient(#f8fafc 0% 25%, #eef2ff 0% 50%) 50% / 16px 16px; flex:1 1 auto; min-height:420px; }
        .aiNb-preview img { max-width:100%; max-height:100%; object-fit:contain; border-radius:8px; display:block; }
        .aiNb-empty { color:#a78bfa; font-size:12px; font-weight:600; text-align:center; padding:30px 16px; line-height:1.6; }
        .aiNb-card.bg .aiNb-empty { color:#a16207; }
        .aiNb-spinner { display:none; flex-direction:column; align-items:center; gap:10px; color:#7c3aed; font-size:12.5px; font-weight:700; padding:30px 16px; }
        .aiNb-card.bg .aiNb-spinner { color:#92400e; }
        .aiNb-spinner.show { display:flex; }
        .aiNb-spinner i { font-size:28px; animation:aiNbSpin 1s linear infinite; }
        @keyframes aiNbSpin { from { transform:rotate(0); } to { transform:rotate(360deg); } }
        .aiNb-upload { display:flex; align-items:center; justify-content:center; gap:8px; padding:13px; background:#fff; border:2px dashed #fcd34d; border-radius:10px; font-size:13px; font-weight:800; color:#92400e; cursor:pointer; transition:all .15s; }
        .aiNb-upload:hover { background:#fef3c7; transform:translateY(-1px); }
        .aiNb-dl { display:none; }
        .aiNb-dl.show { display:inline-flex; }
        .aiNb-error { font-size:12px; color:#dc2626; font-weight:700; margin-top:6px; }

        /* ─── 미니 에디터 (Apple style) ─── */
        #aiNbAi { font-family:-apple-system, BlinkMacSystemFont, "SF Pro Text", "Pretendard", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; background:#fbfbfd; border:0.5px solid rgba(0,0,0,0.08); box-shadow:0 1px 3px rgba(0,0,0,0.04); }
        #aiNbAi .aiNb-title { color:#1d1d1f; font-weight:700; font-size:17px; letter-spacing:-0.5px; }
        #aiNbAi .aiNb-sub { color:#86868b; font-weight:500; font-size:12.5px; letter-spacing:-0.1px; }
        .me-sizes { display:flex; flex-wrap:wrap; gap:6px; }
        .me-size-btn { padding:7px 14px; background:rgba(120,120,128,0.10); border:none; border-radius:980px; font-size:12.5px; font-weight:600; color:#1d1d1f; cursor:pointer; font-family:inherit; transition:background .18s, color .18s; letter-spacing:-0.2px; }
        .me-size-btn:hover { background:rgba(120,120,128,0.18); }
        .me-size-btn.active { background:#1d1d1f; color:#fff; }
        .me-toolbar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; padding:10px 12px; background:rgba(255,255,255,0.72); -webkit-backdrop-filter:saturate(180%) blur(20px); backdrop-filter:saturate(180%) blur(20px); border:0.5px solid rgba(0,0,0,0.08); border-radius:14px; box-shadow:0 1px 2px rgba(0,0,0,0.04); }
        /* 2026-07-18: 에디터 간편 진입 — 좌 원클릭 AI디자인(컬러 그라데이션 애니메이션) / 우 디자인 편집하기(검정 그라데이션) */
        .me-intro { display:flex; gap:12px; }
        .me-intro-btn { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; padding:22px 18px; border-radius:16px; border:none; cursor:pointer; font-family:inherit; text-align:center; color:#fff; overflow:hidden; transition:transform .18s ease; }
        .me-intro-btn:hover { transform:translateY(-2px); }
        .me-intro-ttl { font-size:16px; font-weight:800; letter-spacing:-0.3px; line-height:1.2; }
        .me-intro-desc { font-size:11.5px; font-weight:500; line-height:1.45; opacity:0.9; word-break:keep-all; }
        /* 원클릭 AI — 무지개빛 그라데이션이 계속 흐른다 */
        .me-intro-ai {
            background:linear-gradient(120deg,#6366f1,#8b5cf6,#ec4899,#f59e0b,#6366f1);
            background-size:300% 300%;
            animation:meIntroFlow 6s ease infinite;
        }
        /* 디자인 편집하기 — 검정 그라데이션 + 은은한 흐름 */
        .me-intro-edit {
            background:linear-gradient(120deg,#000,#3f3f46,#18181b,#000);
            background-size:300% 300%;
            animation:meIntroFlow 8s ease infinite;
        }
        @keyframes meIntroFlow {
            0% { background-position:0% 50%; }
            50% { background-position:100% 50%; }
            100% { background-position:0% 50%; }
        }
        /* 2026-07-20: 내가 만든 디자인 — 차분한 남색 계열 (앞 두 버튼과 구분되게) */
        .me-intro-mine {
            background:linear-gradient(120deg,#0f172a,#1e3a8a,#334155,#0f172a);
            background-size:300% 300%;
            animation:meIntroFlow 10s ease infinite;
        }
        @media (prefers-reduced-motion:reduce) { .me-intro-ai, .me-intro-edit, .me-intro-mine { animation:none; } }
        /* 버튼이 3개가 되면서 한 줄에 다 넣으면 좁아진다 → 좁은 화면에선 줄바꿈 */
        @media (max-width:760px) { .me-intro { flex-wrap:wrap; } .me-intro-btn { flex:1 1 calc(50% - 6px); } }
        @media (max-width:520px) { .me-intro-btn { padding:16px 12px; } .me-intro-ttl { font-size:14px; } .me-intro-desc { font-size:10.5px; } }
        /* 개인 보관함 그리드 — 마퀴가 아니라 격자 (내 것은 흘러가면 찾기 어렵다).
           2026-07-20: 한 줄에 5개 × 2줄(최신 10개)만 노출 — 조회도 10개로 맞춰 스크롤이 없다. */
        .me-my-grid {
            display:grid; grid-template-columns:repeat(5, 1fr);
            gap:8px; margin-top:10px;
        }
        .me-my-item {
            border:1px solid #e2e8f0; border-radius:10px; background:#fff; padding:0;
            cursor:pointer; overflow:hidden; aspect-ratio:1/1;
        }
        .me-my-item:hover { border-color:#4338ca; }
        .me-my-item img { width:100%; height:100%; object-fit:cover; display:block; }
        /* 2026-06-15: PC 툴바 — 아이콘과 글씨 사이 간격 8px (이전 5px 은 너무 붙어보임). */
        /* 2026-06-18 v610: 배경 잠금 시각 표시 — 잠긴 배경은 살짝 어둡게, 호버 시 안내 */
        .me-item.me-bg-locked { pointer-events:none; }
        .me-item.me-bg-locked::after { content:""; position:absolute; inset:0; border:1.5px dashed rgba(56,189,248,0.45); border-radius:2px; pointer-events:none; }
        .me-tool-btn { padding:8px 14px; background:rgba(120,120,128,0.10); border:none; border-radius:980px; font-size:12.5px; font-weight:600; color:#1d1d1f; cursor:pointer; font-family:inherit; transition:background .18s, color .18s; letter-spacing:-0.2px; display:inline-flex; align-items:center; gap:8px; }
        .me-tool-btn:hover { background:rgba(120,120,128,0.18); }
        .me-tool-btn.accent { background:#FFCC00; color:#1d1d1f; }
        .me-tool-btn.accent:hover { background:#ffd633; }
        .me-tb-ic { font-size:12px; line-height:1; }
        /* 2026-06-15: 배경색 칩 — 무지개 그라데이션 원형. 아이콘/사각형 없이 색상 picker 임을 시각화. */
        .me-color-wrap { display:inline-flex; align-items:center; gap:8px; padding:5px 12px 5px 8px; background:rgba(120,120,128,0.10); border:none; border-radius:980px; font-size:12.5px; font-weight:600; color:#1d1d1f; cursor:pointer; letter-spacing:-0.2px; }
        .me-color-wrap:hover { background:rgba(120,120,128,0.18); }
        .me-color-wrap input[type=color] {
            -webkit-appearance:none; appearance:none;
            width:24px; height:24px; padding:0; cursor:pointer;
            border:1.5px solid #fff; border-radius:50%;
            background: conic-gradient(from 180deg, #ff0080, #ff8c00, #ffd900, #2ecc71, #00d1ff, #6c5ce7, #ff0080);
            box-shadow:0 0 0 1px rgba(0,0,0,0.18);
            overflow:hidden;
        }
        .me-color-wrap input[type=color]::-webkit-color-swatch-wrapper { padding:0; }
        .me-color-wrap input[type=color]::-webkit-color-swatch { visibility:hidden; border:none; }
        .me-color-wrap input[type=color]::-moz-color-swatch { visibility:hidden; border:none; }
        /* 대지 외 어두운 배경 */
        /* 2026-06-26: 여백 최소화 — 캔버스 가득 차게. 가로비율=줄자 상단 / 세로비율=줄자 좌측 (JS 제어) */
        .me-stage-wrap { position:relative; background:#808080; border:none; border-radius:14px; padding:10px; display:flex; align-items:center; justify-content:center; overflow:hidden; box-shadow:inset 0 0 0 1px rgba(255,255,255,0.06); }
        /* 2026-07-18: 대지에 맞추기 — 대지 우측 위 작은 버튼 (선택 이미지를 대지 꽉차게) */
        .me-fit-btn { position:absolute; top:8px; right:8px; z-index:20; display:inline-flex; align-items:center; gap:5px; padding:5px 10px; border:none; border-radius:980px; background:rgba(15,23,42,0.72); color:#fff; font-family:inherit; font-size:11.5px; font-weight:700; cursor:pointer; -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); transition:background .15s; }
        .me-fit-btn:hover { background:rgba(15,23,42,0.9); }
        .me-fit-btn i { font-size:11px; }
        /* 2026-07-18: 작품 갤러리 — 다운로드와 템플릿 탭 사이. 항상 표시. */
        .me-gallery { margin-top:12px; }
        /* 2026-07-18: 갤러리 안내 팁 — 원클릭으로 바로 하거나, 작품 검색 시 AI가 참고 */
        .me-gal-tip { display:flex; align-items:flex-start; gap:8px; background:#eef2ff; border:1px solid #c7d2fe; border-radius:10px; padding:9px 12px; margin-bottom:10px; font-size:12.5px; color:#3730a3; line-height:1.55; }
        .me-gal-tip-badge { flex:0 0 auto; color:#4338ca; font-size:12px; }
        .me-gal-head { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
        .me-gal-title { font-size:14px; font-weight:800; color:#1d1d1f; }
        .me-gal-search { flex:1; min-width:0; border:1.5px solid #e2e8f0; border-radius:9px; padding:7px 11px; font-size:13px; font-family:inherit; outline:none; }
        .me-gal-search:focus { border-color:#4338ca; }
        /* 2026-07-18: 미리캔버스식 2줄 마퀴 — 위:좌→우, 아래:우→좌. 높이 고정·가로폭 자동(전체 표시), hover 시 정지 */
        .me-gal-marquee { display:flex; flex-direction:column; gap:8px; overflow:hidden; }
        .me-gal-row { overflow:hidden; width:100%; -webkit-mask-image:linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%); mask-image:linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%); }
        .me-gal-track { display:flex; gap:8px; width:max-content; will-change:transform; }
        .me-marq-left { animation: meMarqL 70s linear infinite; }
        .me-marq-right { animation: meMarqR 70s linear infinite; }
        .me-gal-row:hover .me-gal-track { animation-play-state:paused; }
        @keyframes meMarqL { from { transform:translateX(0); } to { transform:translateX(-50%); } }
        @keyframes meMarqR { from { transform:translateX(-50%); } to { transform:translateX(0); } }
        .me-gal-item { flex:0 0 auto; height:132px; padding:0; border:1.5px solid #e5e7eb; border-radius:10px; overflow:hidden; cursor:pointer; background:#f8fafc; transition:border-color .15s; }
        .me-gal-item:hover { border-color:#4338ca; }
        .me-gal-item img { height:100%; width:auto; display:block; }
        .me-gal-empty { text-align:center; color:#94a3b8; font-size:12.5px; padding:20px 0; }
        @media (max-width:520px) { .me-gal-item { height:100px; } }
        /* 2026-07-18: 템플릿/사진/벡터/요소/장식 탭(qd-rail) — 기본 숨김, 디자인 편집하기(html.me-editing) 시 노출.
           editor-rail.css 의 `.qd-rail{display:flex}` 와 특정성 충돌 방지 위해 :not() 로 우선순위 확보.
           편집 중엔 이 규칙이 안 걸려 editor-rail 의 flex 레이아웃이 정상 적용됨. */
        html:not(.me-editing) .qd-rail { display:none; }
        /* 2026-07-19: [디자인 수정도구] 모드 레이아웃 —
           수정도구(툴바 + 속성패널)를 대지 위가 아니라 "작품 갤러리가 있던 자리"(대지·다운로드 아래)로 내리고,
           작품 갤러리는 숨긴다. 그 아래로 템플릿/사진/벡터 레일이 이어진다.
           #aiNbAi 는 flex column 이므로 order 로 자리만 바꾼다 — DOM 을 옮기지 않아 기존 이벤트·로직은 그대로. */
        html.me-editing #meToolbar { order:8; }
        html.me-editing #meProps   { order:9; }
        html.me-editing #meGallery { display:none !important; }
        /* 2026-06-25: 양면(앞/뒤) 탭 — 캔버스 바로 위 */
        .me-side-tabs { display:flex; gap:8px; margin-bottom:10px; }
        .me-side-tab { flex:1; padding:10px 14px; border:1.5px solid #e5e7eb; background:#f8fafc; color:#475569; border-radius:10px; font-size:14px; font-weight:700; cursor:pointer; font-family:inherit; transition:all .15s; }
        .me-side-tab:hover { border-color:#c4b5fd; }
        .me-side-tab.active { background:#6d28d9; color:#fff; border-color:#6d28d9; }
        /* 2026-07-18: 대지 밖으로 나간 이미지도 보이도록 overflow:visible. 대지 경계·바깥 어둡게는 .me-artboard-mask 가 담당.
           export(_meExportPNG)는 natW×natH 캔버스에 좌표로 다시 그려 대지 밖은 자동 클립되므로 PDF/PNG 는 안전. */
        .me-stage { position:relative; background:#ffffff; box-shadow:0 12px 36px rgba(0,0,0,0.45); overflow:visible; max-width:none; max-height:none; touch-action:none; user-select:none; border-radius:2px; }
        /* 대지 마스크 — 대지 크기의 투명 박스 + 거대한 box-shadow 로 대지 '밖'만 어둡게 덮는다(안은 통과).
           대지 밖으로 나간 이미지도 이 어두운 색에 묻혀 잘리는 경계가 명확해진다. 밝은 점선으로 대지 테두리 표시. */
        /* 2026-07-19: 한때 veil/점선을 분리하고 선택 항목을 veil 위로 올려봤으나(핸들 가림 해결 목적),
           대지 안팎이 구분되지 않아 원복. 대지 밖 어둡게 = 대지와 디자인을 구분하는 핵심 장치. */
        .me-artboard-mask { position:absolute; inset:0; pointer-events:none; z-index:999990; box-shadow:0 0 0 9999px rgba(2,6,23,0.82); outline:2px dashed rgba(255,255,255,0.95); outline-offset:0; border-radius:2px; }
        .me-item { position:absolute; cursor:move; user-select:none; touch-action:none; box-sizing:border-box; }
        .me-item.selected { outline:1.5px solid #007AFF; outline-offset:2px; }
        .me-item img { display:block; max-width:none; pointer-events:none; }
        .me-item.text { padding:4px 6px; line-height:1.2; word-break:keep-all; white-space:pre-wrap; }
        .me-item.text[contenteditable=true] { cursor:text; outline:1.5px solid #007AFF; background:rgba(255,255,255,0.6); }
        .me-item.shape { background:#007AFF; }
        .me-item.shape.circle { border-radius:50%; }
        /* 2026-06-14: 4 모서리 핸들 + 회전 핸들 (Photoshop/Figma 스타일) */
        /* 2026-07-14: 핸들/삭제/칩은 항상 클릭 가능 — 부모(칼선 박스)가 pointer-events:none 여도 조작되도록 (pointer-events 는 상속됨). */
        .me-handle, .me-handle-rot, .me-del, .me-imgchip { pointer-events:auto; }
        /* 2026-07-19: 핸들이 안 보인다는 재요청 — 07-18 판(흰 채움 + 흰 발광)은 어두운 배경만 고려해서,
           물/하늘처럼 밝은 이미지 위에서는 흰 원 + 흰 발광이 배경에 묻혀 사라졌다.
           → 채움을 진한 파랑으로 뒤집고 흰 링을 둘러, 밝은 곳에선 파란 알맹이가 / 어두운 곳에선 흰 링이 보이게.
           발광(box-shadow)은 대비를 흐리기만 해서 제거하고, 얇은 어두운 outline 으로 흰 배경에서도 링 경계를 남긴다. */
        .me-handle { position:absolute; width:15px; height:15px; background:#0A84FF; border:3px solid #fff; border-radius:50%; outline:1.5px solid rgba(15,23,42,0.65); z-index:5; }
        .me-handle-nw { left:-6px; top:-6px; cursor:nwse-resize; }
        .me-handle-ne { right:-6px; top:-6px; cursor:nesw-resize; }
        .me-handle-sw { left:-6px; bottom:-6px; cursor:nesw-resize; }
        .me-handle-se { right:-6px; bottom:-6px; cursor:nwse-resize; }
        /* 2026-06-16: 변(edge) 핸들 — 가로/세로 단독 리사이즈 (text 박스 너비/높이 독립 조절) */
        .me-handle-n  { left:50%; top:-6px; transform:translateX(-50%); cursor:ns-resize; }
        .me-handle-s  { left:50%; bottom:-6px; transform:translateX(-50%); cursor:ns-resize; }
        .me-handle-e  { right:-6px; top:50%; transform:translateY(-50%); cursor:ew-resize; }
        .me-handle-w  { left:-6px;  top:50%; transform:translateY(-50%); cursor:ew-resize; }
        /* 2026-06-28: 회전 핸들 — 우측상단 바깥 + 회전(↻) 모양 + grab 커서 (일러스트식). 녹색 점/줄기 제거. */
        /* 회전 핸들은 ↻ 글자가 읽혀야 해서 흰 채움 유지 — 대신 테두리를 두껍게 + 어두운 outline 으로 밝은 배경 대비 확보 */
        .me-handle-rot { left:auto; right:-28px; top:-28px; margin-left:0; width:24px; height:24px; background:#fff; border:3px solid #0A84FF; border-radius:50%; cursor:grab; display:flex; align-items:center; justify-content:center; outline:1.5px solid rgba(15,23,42,0.65); }
        .me-handle-rot::before { content:'\21BB'; position:static; width:auto; height:auto; background:none; transform:none; color:#0A84FF; font-size:16px; font-weight:900; line-height:1; -webkit-text-stroke:0; }
        /* 2026-06-28: 글씨 테두리(-webkit-text-stroke)가 자식 핸들·삭제버튼·칩까지 상속되어 회전 화살표에 테두리가 생기고 드래그 잔상이 남던 문제 차단 */
        .me-handle, .me-handle::before, .me-handle-rot, .me-handle-rot::before, .me-del, .me-imgchip { -webkit-text-stroke:0 !important; -webkit-text-stroke-width:0 !important; paint-order:normal !important; text-shadow:none !important; }
        .me-item.text {
            cursor: move;
            /* 2026-06-14: 폰트 렌더링 품질 — faux-bold 합성 차단 + antialiasing */
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            text-rendering: optimizeLegibility;
            font-synthesis: none;  /* 폰트가 weight 없을 때 가짜 bold 합성 방지 (검은고딕 등) */
            -webkit-font-synthesis: none;
            transition: box-shadow .15s, background .15s;
        }
        /* 2026-06-18 v565: 호버 시 부드러운 그림자 표시 → 클릭/드래그 가능함을 시각화 */
        .me-item.text:hover:not(.selected) { box-shadow: 0 0 0 1px rgba(0,122,255,0.35); border-radius:3px; }
        .me-item.text.selected { cursor: text; }
        .me-stage {
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }
        .me-del { position:absolute; right:-6px; top:-6px; width:18px; height:18px; background:#ff3b30; color:#fff; border-radius:50%; font-size:10px; line-height:18px; text-align:center; cursor:pointer; box-shadow:0 1px 4px rgba(0,0,0,0.25); font-weight:600; touch-action:none; }
        /* 2026-06-14: Smart guide — 드래그 중 캔버스 중앙 라인 */
        .me-guide { position:absolute; background:#ec4899; pointer-events:none; z-index:100; }
        .me-guide-v { width:1px; top:0; bottom:0; box-shadow:0 0 6px rgba(236,72,153,0.6); }
        .me-guide-h { height:1px; left:0; right:0; box-shadow:0 0 6px rgba(236,72,153,0.6); }
        /* 2026-06-14: 모바일 — 핸들·삭제버튼 터치 친화적 크기 + 텍스트 편집 UX */
        @media (max-width: 768px) {
            .me-handle { width:20px; height:20px; border-width:3px; }   /* 2026-07-19: 흰 링 두께 데스크탑과 동일하게 */
            .me-handle-nw { left:-10px; top:-10px; }
            .me-handle-ne { right:-10px; top:-10px; }
            .me-handle-sw { left:-10px; bottom:-10px; }
            .me-handle-se { right:-10px; bottom:-10px; }
            .me-handle-n  { top:-10px; }
            .me-handle-s  { bottom:-10px; }
            .me-handle-e  { right:-10px; }
            .me-handle-w  { left:-10px; }
            .me-handle-rot { left:auto; right:-34px; top:-34px; margin-left:0; width:28px; height:28px; }
            .me-handle-rot::before { top:20px; height:24px; }
            .me-del { width:24px; height:24px; font-size:14px; line-height:24px; right:-12px; top:-12px; }
            /* 2026-06-18 v573: 모바일 툴바 → 3행 grid 레이아웃
               Row 1: 템플릿 (full width)
               Row 2: 되돌리기 / 업로드 / 누끼 / 칼선  (4-col)
               Row 3: 글씨 / 가이드 / 배경 / 도형(네모+동그라미) (4-col) */
            .me-toolbar { display:grid !important; grid-template-columns:repeat(4, 1fr) !important; gap:5px !important; padding:8px 8px !important; overflow:visible !important; }
            .me-toolbar::-webkit-scrollbar { display:none; }
            .me-toolbar > .me-r1 { grid-column: 1 / -1; width:100%; box-sizing:border-box; }
            .me-toolbar > .me-r2, .me-toolbar > .me-r3 { min-width:0; box-sizing:border-box; }
            /* 도형 그룹 — 한 그리드 셀 안에 네모/동그라미 가로 나란히 (span 이 grid item) */
            .me-tool-shape-group { display:flex !important; gap:3px; min-width:0; align-items:stretch; }
            .me-tool-shape-group > button { flex:1 !important; padding:8px 0 !important; min-width:0 !important; }
            .me-tool-btn { padding:8px 11px !important; font-size:12px !important; flex:0 0 auto; min-height:36px; display:inline-flex !important; align-items:center; justify-content:center; gap:5px !important; white-space:nowrap; }
            .me-tool-btn .me-tb-lbl, .me-color-wrap .me-tb-lbl { display:inline !important; font-size:12px !important; }
            .me-tool-btn.accent .me-tb-lbl { display:inline !important; font-size:12.5px !important; }
            .me-tool-btn .me-tb-ic { font-size:13px !important; margin:0 !important; }
            .me-color-wrap { padding:6px 9px !important; min-height:36px; gap:5px !important; white-space:nowrap !important; flex-direction:row !important; align-items:center !important; flex:0 0 auto; }
            .me-color-wrap input[type=color] { width:22px !important; height:22px !important; }
            /* 2026-06-15: 모바일 props 패널 — 라벨 숨기고 컴팩트 */
            /* 2026-06-18 v578: 모바일도 min-height + overflow:visible → 받침대 슬라이더 등 추가 컨트롤 표시 */
            .me-props { padding:6px 6px !important; gap:5px !important; flex-wrap:wrap !important; min-height:80px !important; align-content:flex-start !important; align-items:flex-start !important; overflow:visible !important; }
            .me-prop-group { padding:5px 8px !important; font-size:12px !important; gap:4px !important; }
            .me-prop-group label { display:none !important; }
            .me-prop-group input[type=number] { width:38px !important; font-size:12px !important; }
            .me-prop-group select { min-width:80px !important; max-width:110px !important; font-size:12px !important; padding:2px 12px 2px 2px !important; }
            .me-prop-group input[type=color] { width:20px !important; height:20px !important; }
            .me-prop-btn { padding:5px 8px !important; min-width:28px !important; }
            /* 텍스트 — 선택 시 padding 확장 (탭 영역 보장) + 편집 중 배경 강조 */
            .me-item.text { padding: 6px 8px !important; min-height: 28px; }
            .me-item.text.selected { background: rgba(0,122,255,0.06); border-radius:4px; }
            .me-item.text[contenteditable="true"] {
                background: rgba(255,255,255,0.95) !important;
                box-shadow: 0 0 0 2px #007AFF, 0 4px 16px rgba(0,0,0,0.2);
                -webkit-user-select: text; user-select: text;
            }
        }
        /* 데스크톱도 편집 중 강조 */
        .me-item.text[contenteditable="true"] {
            background: rgba(255,255,255,0.85);
            box-shadow: 0 0 0 1.5px #007AFF;
        }
        /* 속성 패널 */
        /* 2026-06-15: props bar 항상 표시 (선택 없을 때도 stub) */
        /* 2026-06-18 v578: 기본 2줄 분량 + 받침대 모드 등 추가 컨트롤 있을 땐 확장 가능 (min-height) */
        .me-props { display:flex; flex-wrap:wrap; gap:8px; align-items:flex-start; align-content:flex-start; padding:10px 12px; background:rgba(255,255,255,0.72); -webkit-backdrop-filter:saturate(180%) blur(20px); backdrop-filter:saturate(180%) blur(20px); border:0.5px solid rgba(0,0,0,0.08); border-radius:14px; box-shadow:0 1px 2px rgba(0,0,0,0.04); min-height:96px; box-sizing:border-box; }
        .me-props .me-prop-group { flex-shrink:0; min-height:36px; }
        .me-props.show { display:flex; }
        .me-props.me-props-stub { opacity:0.55; pointer-events:none; }
        .me-props.me-props-stub * { user-select:none; }
        /* 2026-07-11: 칼선(외곽선/받침) 조절만 대지 옆 별도의 떠있는 창으로 — .me-stage-wrap 안 position:absolute (줌/팬 영향 없음). 칼선 이미지 선택 시만 JS 가 노드 이동 */
        .me-cutline-float { position:absolute; top:14px; right:14px; z-index:6; display:flex; flex-direction:column; gap:14px; width:210px; max-width:46%; max-height:calc(100% - 28px); box-sizing:border-box; overflow-y:auto; padding:14px 16px; background:rgba(255,255,255,0.92); -webkit-backdrop-filter:saturate(180%) blur(20px); backdrop-filter:saturate(180%) blur(20px); border:0.5px solid rgba(0,0,0,0.08); border-radius:14px; }
        /* 회색 알약테두리 제거 + 세로로 라벨/슬라이더 줄맞춤 */
        .me-cutline-float .me-cf-group { display:flex; flex-direction:column; align-items:stretch; gap:7px; width:100%; min-width:0 !important; flex:0 0 auto; background:transparent !important; padding:0 !important; border-radius:0; }
        .me-cutline-float .me-cf-group > label { display:block; font-size:12.5px; font-weight:600; letter-spacing:-0.2px; }
        .me-cutline-float .me-cf-row { display:flex; align-items:center; gap:10px; width:100%; }
        .me-cutline-float .me-cf-row input[type=range] { flex:1 1 auto; min-width:0; width:100%; }
        /* 크기 입력(mm) 줄맞춤 — 라벨(가로/세로) + 인풋 + 단위 */
        .me-cutline-float .me-cf-size .me-cf-row { gap:8px; }
        .me-cutline-float .me-cf-size .me-cf-dim { font-size:12px; color:#64748b; min-width:28px; }
        .me-cutline-float .me-cf-size input[type=number] { flex:1 1 auto; min-width:0; width:100%; padding:5px 8px; border:0.5px solid rgba(0,0,0,0.15); border-radius:8px; background:#fff; font-size:13px; font-variant-numeric:tabular-nums; color:#1d1d1f; -moz-appearance:textfield; }
        .me-cutline-float .me-cf-size input[type=number]::-webkit-outer-spin-button, .me-cutline-float .me-cf-size input[type=number]::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
        .me-cutline-float .me-cf-size .me-cf-unit { font-size:11px; color:#94a3b8; }
        /* 별도 창이 뜬 동안엔 대지를 왼쪽 정렬해 창과 겹치지 않게 */
        .me-stage-wrap.me-has-side #meStageCol { align-items:flex-start !important; }
        /* 2026-07-11: 객체크기 모드 — 대지(흰 캔버스) 숨김: 배경·그림자 제거해 객체만 보이게 */
        .me-stage.me-stage--nofill { background:transparent !important; box-shadow:none !important; }
        /* 상단 props 바(모바일 등)에 남아있을 때는 두 슬라이더를 한 줄에 인라인 */
        .me-cf-row { display:inline-flex; align-items:center; gap:6px; }
        .me-prop-group { display:inline-flex; align-items:center; gap:6px; padding:5px 10px; background:rgba(120,120,128,0.10); border:none; border-radius:980px; font-size:12px; font-weight:500; color:#1d1d1f; letter-spacing:-0.2px; }
        .me-prop-group label { color:#86868b; font-size:11px; font-weight:500; }
        .me-prop-group select, .me-prop-group input[type=number] { padding:2px 4px; border:none; background:transparent; border-radius:4px; font-size:12px; font-family:inherit; outline:none; color:#1d1d1f; font-weight:600; }
        .me-prop-group input[type=number] { width:42px; -moz-appearance:textfield; }
        .me-prop-group input[type=number]::-webkit-outer-spin-button, .me-prop-group input[type=number]::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
        .me-prop-group input[type=color] { width:22px; height:22px; border:none; padding:0; cursor:pointer; background:transparent; border-radius:50%; }
        .me-prop-group select { min-width:96px; -webkit-appearance:none; -moz-appearance:none; appearance:none; padding-right:14px; background-image:url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 6' fill='%2386868b'%3e%3cpath d='M4 6L0 0h8z'/%3e%3c/svg%3e"); background-repeat:no-repeat; background-position:right 2px center; background-size:7px 5px; }
        .me-prop-btn { padding:5px 10px; background:transparent; border:none; border-radius:6px; font-size:12px; color:#1d1d1f; cursor:pointer; font-family:inherit; font-weight:600; min-width:26px; }
        .me-prop-btn:hover { background:rgba(120,120,128,0.18); }
        .me-prop-btn.active { background:#007AFF; color:#fff; }
        /* 2026-06-15: 두께 S/M/B 토글 — 가독성 위해 단색 배경. S=얇게, M=보통, B=굵게. */
        .me-prop-btn.smb { padding:4px 9px; font-size:11.5px; font-weight:800; min-width:24px; letter-spacing:0.5px; }
        .me-prop-btn.smb[data-weight]:not(.active) { background:rgba(120,120,128,0.10); }
        .me-prop-btn.smb[data-weight="300"]:not(.active) { font-weight:300; }
        .me-prop-btn.smb[data-weight="700"]:not(.active),
        .me-prop-btn.smb[data-weight="800"]:not(.active),
        .me-prop-btn.smb[data-weight="900"]:not(.active) { font-weight:800; }
        /* 우클릭 컨텍스트 메뉴 */
        .me-ctx { position:fixed; z-index:100002; background:rgba(250,250,250,0.88); -webkit-backdrop-filter:saturate(180%) blur(22px); backdrop-filter:saturate(180%) blur(22px); border:0.5px solid rgba(0,0,0,0.10); border-radius:12px; box-shadow:0 14px 40px rgba(0,0,0,0.18); padding:5px; min-width:200px; font-family:-apple-system, BlinkMacSystemFont, "SF Pro Text", "Pretendard", "Segoe UI", system-ui, sans-serif; }
        .me-ctx button { display:flex; align-items:center; gap:8px; width:100%; padding:7px 12px; background:transparent; border:none; border-radius:6px; font-size:13px; font-weight:500; color:#1d1d1f; cursor:pointer; text-align:left; font-family:inherit; letter-spacing:-0.2px; }
        .me-ctx button:hover { background:#007AFF; color:#fff; }
        .me-ctx button.danger { color:#ff3b30; }
        .me-ctx button.danger:hover { background:#ff3b30; color:#fff; }
        .me-ctx hr { border:none; border-top:0.5px solid rgba(0,0,0,0.12); margin:4px 0; }
