/* 라벨 편집기 전체 화면 (10/20) — 쇼핑몰 머리·바닥 없이 작업만.
   평면 원칙 그대로: 모서리 0·그림자 없음. 색은 styles.css 토큰과 남색(--navy). */
:root{--navy:#17384d;--st-top:60px}
body.st{background:#eef2f5}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* 위쪽 줄: 로고 · 이름 · (편집기) 라벨지·더 보기·인쇄하기 · 쇼핑몰로 */
.st-top{position:sticky;top:0;z-index:30;height:var(--st-top);display:flex;align-items:center;gap:16px;padding:0 16px;
  background:#fff;border-bottom:1px solid var(--line)}
.st-brand img{height:34px;display:block}
.st-name{font-size:15px;font-weight:800;color:var(--navy);padding-left:16px;border-left:1px solid var(--line);white-space:nowrap}
.st-bar{flex:1;min-width:0;display:flex;align-items:center}
.st-bar .ad-row1{flex:1;display:flex;align-items:center;gap:12px;min-width:0}
.st-bar .a4p-specbtn{height:44px}
.st-bar .ad-go{min-height:44px}
.st-bar .ad-more>summary{height:44px}
.st-shop{font-size:14px;font-weight:700;color:#536b7e;white-space:nowrap}
@media(hover:hover) and (pointer:fine){.st-shop:hover,.st-name:hover{color:var(--blue)}}
body.st-pick .st-shop{margin-left:auto}

/* ── 첫 화면: 라벨지 고르기 ── */
.st-pickpage{max-width:1180px;margin:0 auto;padding:40px 24px 80px}
.st-pickpage h1{margin:0;font-size:32px;letter-spacing:-.04em}
.st-lead{margin:8px 0 24px;font-size:16px;color:#536b7e;line-height:1.7}
.st-resume{display:flex;align-items:center;gap:16px;padding:14px 18px;margin-bottom:24px;background:#fff;border:1px solid var(--line);border-left:4px solid var(--navy)}
.st-resume-pic svg{width:42px;height:60px;display:block}
.st-resume b{display:block;font-size:16px}
.st-resume small{font-size:13px;color:#566b7d}
.st-go{margin-left:auto;font-weight:800;color:var(--navy);white-space:nowrap}
@media(hover:hover) and (pointer:fine){.st-resume:hover{border-color:var(--navy)}}
.st-kinds{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid var(--line);background:#fff;margin-bottom:18px}
.st-kinds button{display:grid;gap:3px;text-align:left;padding:16px 18px;border:0;border-right:1px solid var(--line);background:#fff;color:var(--ink);cursor:pointer}
.st-kinds button:last-child{border-right:0}
.st-kinds b{font-size:17px}
.st-kinds small{font-size:13px;color:#566b7d}
.st-kinds [aria-selected=true]{background:#eef4f8;box-shadow:inset 0 -3px 0 var(--navy)}
.st-filter{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.st-find{flex:1;max-width:380px}
.st-find input,.st-filter select{width:100%;height:44px;border:1px solid #ccd9e1;background:#fff;padding:0 12px;color:var(--ink)}
.st-filter select{width:auto}
.st-count{margin-left:auto;font-size:14px;color:#566b7d}
.st-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(168px,1fr));gap:12px}
.st-card{display:grid;gap:8px;padding:14px;border:1px solid var(--line);background:#fff;text-align:left;color:var(--ink);cursor:pointer}
@media(hover:hover) and (pointer:fine){.st-card:hover{border-color:var(--navy);background:#fbfdfe}}
.st-pic{position:relative;display:grid;place-items:center;background:#f3f7f9;padding:12px}
.st-pic svg{width:100%;max-width:120px;aspect-ratio:210/297;display:block}
.st-pic .pg,.st-resume-pic .pg{fill:#fff;stroke:#a9bac6;stroke-width:1.2}
.st-pic rect:not(.pg),.st-resume-pic rect:not(.pg){fill:#e3eef7;stroke:#5f86a6;stroke-width:.8}
.st-pic>b{position:absolute;right:10px;bottom:6px;font-size:13px;color:#566b7d;font-variant-numeric:tabular-nums}
.st-cap{display:flex;align-items:baseline;justify-content:space-between;gap:6px}
.st-cap b{font-size:17px}
.st-cap span{font-size:14px;font-weight:600;color:#3e5a70;font-variant-numeric:tabular-nums;white-space:nowrap}
.st-card small{font-size:12px;color:#566b7d}
.st-empty{padding:28px;background:#fff;border:1px solid var(--line);text-align:center;color:#536b7e}
.st-empty a{color:var(--blue);font-weight:700;border-bottom:1px solid currentColor}
.st-big{display:flex;align-items:center;gap:24px;padding:28px;background:#fff;border:1px solid var(--line)}
.st-big h2{margin:0 0 6px;font-size:22px}
.st-big p{margin:0;max-width:640px;font-size:15px;line-height:1.7;color:#3e5a70}
.st-big .st-note{margin-top:8px;font-size:14px;color:#566b7d}
.st-start{margin-left:auto;flex:none;border:0;color:#fff}
@media(max-width:700px){.st-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.st-card{padding:10px}.st-cap{flex-direction:column;gap:0}.st-kinds{grid-template-columns:1fr}.st-kinds button{border-right:0;border-bottom:1px solid var(--line)}
  .st-big{flex-direction:column;align-items:stretch}.st-start{margin:0}.st-pickpage h1{font-size:26px}.st-name{display:none}}

/* ── 편집 화면: 왼쪽 시트 · 가운데 캔버스 · 오른쪽 속성 ── */
body.st-edit #stMain{height:calc(100vh - var(--st-top))}
@media(min-width:901px){body.st-edit{overflow:hidden}}
#a4design[data-layout=studio]{height:100%}
#a4design[data-layout=studio] .ad{height:100%;grid-template-columns:260px minmax(0,1fr) 330px;gap:0;align-items:stretch}
#a4design[data-layout=studio] .a4p-intro,#a4design[data-layout=studio] .ad-simple{display:none}
.st-sheet{order:1;display:flex;flex-direction:column;gap:8px;min-height:0;padding:12px;background:#fff;border-right:1px solid var(--line)}
.st-sheet-head{display:flex;align-items:center;gap:8px}
.st-sheet-head h2{margin:0;font-size:15px;margin-right:auto}
.st-sheet-head .a4p-tool{height:36px;padding:0 8px;font-size:12px}
.st-sheet-head .a4p-tool svg{width:16px;height:16px}
#a4design[data-layout=studio] .st-sheet .ad-sheetview{flex:0 1 auto;min-height:0;height:auto!important;overflow-y:auto;padding:0;background:none}
#a4design[data-layout=studio] .st-sheet .ad-sheethint{font-size:12px;text-align:left;margin:0 0 6px}
#a4design[data-layout=studio] .st-sheet .ad-info{margin:0;text-align:left;font-size:13px}
#a4design[data-layout=studio] .ad-stage{order:2}
#a4design[data-layout=studio] .ad-side{order:3;align-content:start;overflow-y:auto;padding:12px;background:#f6f8f9;border-left:1px solid var(--line)}
#a4design[data-layout=studio] .a4p-stage.ad-stage{position:relative;top:auto;height:100%;display:flex;flex-direction:column;
  border:0;padding:12px 16px 8px;background:#eef2f5;overflow:hidden}
/* 꾸미기 도구: 캔버스 위 가운데 떠 있는 띠 */
#a4design[data-layout=studio] .st-tools{flex:none;align-self:center;display:flex;align-items:center;gap:10px;margin:0 0 10px;padding:4px;background:#fff;border:1px solid var(--line)}
#a4design[data-layout=studio] .st-tools .ad-tools{border:0}
#a4design[data-layout=studio] .st-tools .ad-view{padding-left:8px;border-left:1px solid var(--line)}
#a4design[data-layout=studio]:not([data-kind=roll]) .ad-viewtabs{display:none}
#a4design[data-layout=studio] .ad-viewtabs{flex:none}
#a4design[data-layout=studio] .ad-stage>.ad-canvas{flex:1 1 auto;min-height:0;height:auto!important;border:1px solid var(--line)}
#a4design[data-layout=studio] .ad-stage>.ad-tip{flex:none;margin:6px 0 0}
#a4design[data-layout=studio] .a4p-phone{display:none}

/* 폰·좁은 화면: 위아래로 (편집은 PC 권장) */
@media(max-width:900px){
  .st-top{height:auto;min-height:var(--st-top);flex-wrap:wrap;padding:8px 12px}
  .st-bar{order:3;flex-basis:100%}
  body.st-edit #stMain{height:auto}
  #a4design[data-layout=studio] .ad{display:flex;flex-direction:column;height:auto}
  #a4design[data-layout=studio] .a4p-stage.ad-stage{height:auto;min-height:70vh}
  #a4design[data-layout=studio] .ad-stage{order:1}
  .st-sheet{order:2;border-right:0;border-top:1px solid var(--line)}
  #a4design[data-layout=studio] .st-sheet .ad-sheetview{max-height:none}
  #a4design[data-layout=studio] .st-sheet .ad-sheetview{max-width:280px;margin:0 auto}   /* 10/22 폰에서 롤 미리보기가 화면을 꽉 채워 길게 늘어났다 */
  #a4design[data-layout=studio] .a4p-phone{display:block}
}

/* 10/20 아이라벨에서 가져온 디테일 */
.st-saved{font-size:13px;color:#566b7d;white-space:nowrap}
.st-saved.err{color:#b45309;font-weight:700}
/* 눈금자 (mm) */
#a4design[data-layout=studio] .ad-canvas{padding-top:30px;padding-left:30px}
.ad-ruler{position:absolute;z-index:3;background:#f4f7f9;pointer-events:none}
.ad-ruler.h{left:18px;right:0;top:0;height:18px;border-bottom:1px solid #c9d5dd}
.ad-ruler.v{left:0;top:18px;bottom:0;width:18px;border-right:1px solid #c9d5dd}
.ad-ruler canvas{display:block;width:100%;height:100%}
#a4design[data-layout=studio] .ad-zoomfloat{top:26px}
/* 따로 꾸미는 칸 */
#dSheets .a4p-sheet .c.cur::before{border:.8mm solid var(--blue);z-index:4}
/* 꾸미기 도구: 넣기(글상자~아이콘) | 꾸미기(양식·바탕색) */
#a4design[data-layout=studio] .ad-tools>.ad-menu:has([data-menu=tpl]){margin-left:6px;padding-left:6px;border-left:1px solid var(--line)}
/* 스튜디오 시트: 칸을 눌러도 이미 디자인 화면이라 누르는 표시는 없앤다 (따로 꾸민 칸만 누를 수 있게) */
#a4design[data-layout=studio] #dSheets:not(.picking) .c{cursor:default}
#a4design[data-layout=studio] #dSheets:not(.picking) .c:hover{outline:0!important}
#a4design[data-layout=studio] #dSheets:not(.picking) .c.own{cursor:pointer}
/* 10/22 처음부터 끝까지 점검 */
html{scrollbar-gutter:stable}   /* 탭을 바꿀 때 스크롤바가 생기고 없어지며 화면이 옆으로 밀리지 않게 */
#a4design[data-layout=studio] .ad-canvas:has(.ad-zoombox.fac){padding-top:80px}   /* 범례 자리만큼 라벨을 아래로 */
@media (max-width:560px){.st-filter{flex-wrap:wrap}.st-find{flex:1 1 100%;max-width:none}}   /* 10/22 폰에서 검색 안내 글이 잘렸다 */
/* 10/23 왼쪽 시트 머리 · 캔버스 위 안내 정리 (예람님: 조잡해 보인다) */
.st-sheet-head{min-height:30px}
.st-sheet-head .ad-used{display:flex}
.st-sheet-head .ad-used[hidden],#a4design .st-sheet .ad-sheethint[hidden],#a4design .a4p-plabel[hidden]{display:none!important}
.st-sheet-head .a4p-tool{flex-direction:row;gap:5px;min-width:0;height:30px!important;padding:0 10px;font-size:13px;font-weight:600;color:#425c70}
.st-sheet-head .a4p-tool svg{width:15px;height:15px}
#a4design[data-layout=studio] .st-sheet .ad-sheethint{color:#566b7d;line-height:1.5}
#a4design[data-layout=studio] .a4p-plabel{height:auto;line-height:1.4;margin:0 0 4px;font-weight:600;color:#566b7d}
#a4design[data-layout=studio] .ad-stage>.a4p-stage-warn{margin:0 0 8px;padding:7px 12px;font-size:13px;line-height:1.5;border:0;border-left:3px solid #e0a43a;background:#fff8ec;color:#6b4a06}
/* 10/23 세로선 맞추기 (예람님: 직각이 많은 화면이라 선이 어긋나면 바로 보인다)
   기준: 아래 세 칸 260px | 가운데 | 330px, 칸 안쪽 여백은 모두 16px.
   위쪽 줄도 같은 격자 — 라벨지 단추 왼쪽 = 도구막대·캔버스 왼쪽, 더 보기 왼쪽 = 오른쪽 카드 왼쪽, 인쇄하기 오른쪽 = 카드 오른쪽 */
:root{--st-l:260px;--st-r:330px;--st-pad:16px}
#a4design[data-layout=studio] .ad{grid-template-columns:var(--st-l) minmax(0,1fr) var(--st-r)}
.st-sheet{padding:var(--st-pad)}
#a4design[data-layout=studio] .ad-side{padding:var(--st-pad)}
#a4design[data-layout=studio] .a4p-stage.ad-stage{padding-left:var(--st-pad)!important;padding-right:var(--st-pad)!important}
#a4design[data-layout=studio] .st-tools{align-self:stretch;justify-content:flex-start}
#a4design[data-layout=studio] .st-tools .ad-tools{flex:0 1 auto;min-width:0}
#a4design[data-layout=studio] .st-tools{flex-wrap:nowrap;gap:8px}
#a4design[data-layout=studio] .st-tools .ad-tools>button,#a4design[data-layout=studio] .st-tools .ad-menu>button,#a4design[data-layout=studio] .st-tools .ad-bgbtn{width:auto;min-width:46px;padding:7px 3px 5px}
#a4design[data-layout=studio] .st-tools .ad-view{margin-left:auto}
@media(min-width:901px){
  body.st-edit .st-top{display:grid;grid-template-columns:var(--st-l) minmax(0,1fr) var(--st-r);grid-template-rows:var(--st-top);align-items:center;gap:0;padding:0}
  body.st-edit .st-top>*{grid-row:1}
  body.st-edit .st-brand{grid-column:1;justify-self:start;margin-left:var(--st-pad)}
  body.st-edit .st-name{grid-column:1;justify-self:start;margin-left:128px}
  body.st-edit .st-shop{display:none}
  body.st-edit .st-saved{grid-column:2;justify-self:end;margin-right:var(--st-pad)}
  body.st-edit .st-bar,body.st-edit .st-bar .ad-row1{display:contents}
  body.st-edit .st-bar .a4p-specbtn{grid-column:2;grid-row:1;justify-self:start;margin-left:var(--st-pad)}
  body.st-edit .st-bar .ad-row1-r{grid-column:3;grid-row:1;display:flex;gap:8px;margin:0 var(--st-pad) 0 calc(var(--st-pad) + 1px)}   /* +1px: 오른쪽 칸 왼쪽 테두리만큼 */
  body.st-edit .st-bar .ad-row1-r .ad-go{flex:1;justify-content:center}
}
/* 라벨지(용지·제품 형태) 고르는 칸을 더 또렷하게 */
#a4design[data-layout=studio] .a4p-stage.ad-stage{padding-top:var(--st-pad)}   /* 위쪽 끝선: 도구막대 = 왼쪽 시트 제목 = 오른쪽 카드 */
#a4design[data-layout=studio] .st-tools .ad-view{flex:none;flex-wrap:nowrap;flex-direction:row}
#a4design[data-layout=studio] .st-tools .ad-tools span{white-space:nowrap}
#a4design[data-layout=studio] .st-sheet .ad-info{white-space:pre-line}
#a4design[data-layout=studio] .st-sheet .a4p-plabel{text-align:left}   /* 10/23 왼쪽 칸 글자는 모두 왼쪽 끝선에 */
@media(max-width:900px){body.st-edit .st-top{padding:8px var(--st-pad)}}
body.st-edit .st-shop{display:none}   /* 편집기에서는 더 보기 → 쇼핑몰로 (로고도 쇼핑몰로 간다) */
@media(min-width:901px){body.st-edit .st-bar .ad-more-box{left:0;right:auto;width:calc(var(--st-r) - var(--st-pad) * 2 - 1px)}}   /* 메뉴 왼쪽 끝 = 더 보기 왼쪽 = 오른쪽 카드 왼쪽, 폭 = 카드 폭 */
/* 10/23 라벨지 정보: 상자를 없애고 가로로 나열 (예람님: 2px 상자는 너무 튄다) — 왼쪽 끝은 캔버스 선 */
.st-bar .a4p-specbtn{border:0;background:none;height:44px;padding:0 10px 0 0;gap:14px;align-items:center}
.st-bar .a4p-specbtn .a4p-sheetmini,.st-bar .a4p-specbtn .a4p-spectx small{display:none}
.st-bar .a4p-specbtn .a4p-spectx{flex-direction:row;padding:0;gap:0}
.st-bar .a4p-specbtn .a4p-spectx b{display:flex;align-items:center;font-size:15px;font-weight:700;color:var(--ink);letter-spacing:-.02em}
.st-bar .a4p-specbtn .a4p-spectx b span+span::before{content:"·";margin:0 9px;color:#9aabb7;font-weight:500}
.st-bar .a4p-specbtn .a4p-spectx b span:first-child{color:var(--navy);font-weight:800}
.st-bar .a4p-specbtn .a4p-specgo{border:0;padding:0;font-size:14px;font-weight:700;color:var(--blue)}
@media(hover:hover) and (pointer:fine){.st-bar .a4p-specbtn:hover{background:none}.st-bar .a4p-specbtn:hover .a4p-specgo{text-decoration:underline;text-underline-offset:3px}}
/* 10/23 오른쪽 칸 스크롤바: 글상자를 고르면 생겨서 카드 오른쪽 끝이 15px 안으로 들어갔다 → 자리를 늘 비우고 위쪽 줄도 같이 */
:root{--st-sb:0px}
#a4design[data-layout=studio] .ad-side{scrollbar-gutter:stable}
@media(min-width:901px){
  body.st-edit .st-bar .ad-row1-r{margin-right:calc(var(--st-pad) + var(--st-sb))}
  body.st-edit .st-bar .ad-more-box{width:calc(var(--st-r) - var(--st-pad) * 2 - 1px - var(--st-sb))}
  /* 자동 저장됨: '라벨 편집기' 아래 작은 줄 (가운데 칸은 라벨지 정보만) */
  body.st-edit .st-bar .a4p-specbtn{max-width:calc(100% - var(--st-pad) * 2)}
}
.st-bar .a4p-specbtn .a4p-spectx{min-width:0;overflow:hidden}
.st-bar .a4p-specbtn .a4p-spectx b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* 10/23 위쪽 줄: '라벨 편집기'와 라벨지 정보를 같은 줄에 (저장 표시는 가운데 칸 오른쪽 끝) */
@media(min-width:901px){
  body.st-edit .st-name{align-self:center;margin-top:0}   /* 10/23 라벨지 정보(15px)와 글자 바닥선을 같게 — 남아 있던 '위로 붙이기' 규칙은 지움 */
  body.st-edit .st-saved{grid-column:2;justify-self:end;align-self:center;margin:0 var(--st-pad) 0 0;font-size:13px}
  body.st-edit .st-bar .a4p-specbtn{max-width:calc(100% - var(--st-pad) * 2 - 70px)}
}
.st-saved{color:#5f8a6c}
.st-saved.err{color:#b45309}
/* 바꾸기: 마우스를 올려도 남색 바탕이 생기지 않게 (a4print.css 의 상자형 단추 효과를 끔) */
@media(hover:hover) and (pointer:fine){.st-bar .a4p-specbtn:hover .a4p-specgo{background:none;border:0;color:var(--blue)}}
/* 롤·좁은 시트 미리보기: 왼쪽 칸 가운데에 */
#a4design[data-layout=studio] .st-sheet .a4p-page{display:flex;flex-direction:column;align-items:center}
#a4design[data-layout=studio] .st-sheet .ad-info:empty{display:none}
@media(min-width:901px){body.st-edit .st-saved{position:relative;top:1px}}   /* 작은 글씨 바닥선을 라벨지 줄과 같게 */
/* 10/23 첫 화면 선 맞추기 — 기준은 카드 격자(6열·간격 12px). 탭 3개 = 카드 2개씩, 검색칸 = 카드 2개, 정렬 = 카드 1개.
   상자 안 글자·그림 시작점은 모두 바깥 테두리에서 16px (이어하기 131 · 탭 128 · 카드 125 → 모두 126) */
.st-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
.st-card{padding:15px}
.st-kinds{gap:12px;border:0;background:none}
.st-kinds button,.st-kinds button:last-child{padding:15px;border:1px solid var(--line)}
.st-resume{padding:14px 15px 14px 12px}
@media(min-width:1000px){
  .st-filter{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
  .st-find{grid-column:span 2;max-width:none}
  .st-filter select{width:100%}
  .st-count{grid-column:-2/-1;justify-self:end}
}
@media(min-width:701px) and (max-width:999px){.st-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.st-kinds{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.st-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.st-kinds{gap:8px}.st-kinds button,.st-kinds button:last-child{border:1px solid var(--line)}.st-card{padding:11px}}
.st-card{align-content:start}   /* 10/23 옆 카드에 설명 줄이 있으면 남는 높이가 칸 사이로 퍼져 '1칸' 글자 높이가 어긋났다 */
/* 11/12 풍선말 — 브라우저 기본(title)은 1초쯤 늦게 뜨고 모양이 제각각이라 우리 것으로(studio.js) */
.le-tip{position:fixed;z-index:2147483000;max-width:260px;padding:6px 9px;background:#102b43;color:#fff;font-size:13px;font-weight:600;line-height:1.45;letter-spacing:-.01em;word-break:keep-all;pointer-events:none}

/* 11/12 디테일 정리 — 견적문의 D안과 같은 기준(왼쪽 색 띠·옅은 채움 대신 테두리)
   이어서 하기: 왼쪽 남색 띠(4px) 뺌 / 라벨 종류 탭: 고른 칸이 옅은 회색 채움뿐이라 꺼진 칸처럼 보였다 → 흰 바탕 + 굵은 남색 테두리 / 무대 경고: 왼쪽 주황 띠 뺌 */
.st-resume{border-left:1px solid var(--line);padding-left:15px}
.st-kinds [aria-selected=true]{background:#fff;border-color:var(--navy) !important;box-shadow:inset 0 0 0 1px var(--navy) !important}
.st-kinds [aria-selected=true] b{color:var(--navy)}
#a4design[data-layout=studio] .ad-stage>.a4p-stage-warn{border-left:0}

/* 11/12 폰: 편집 화면 도구 단추(되돌리기·확대 34px, 칩 30px) 누르는 자리 */
@media(max-width:640px){#a4design[data-layout=studio] .a4p-tb{min-height:40px;min-width:40px}#a4design[data-layout=studio] .ad-chip,#a4design[data-layout=studio] .a4p-tool{min-height:40px}}

/* 11/23 검수 ② 폰: 위쪽 줄 규격 글자(칸 크기 · 2열 × 4줄)가 「바꾸기」 단추에 겹치고 뒤쪽이 상자 밖으로 → 첫 조각(라벨지 이름)만 */
@media(max-width:640px){.st-bar .a4p-specbtn .a4p-spectx b span+span{display:none}.st-bar .a4p-specbtn .a4p-spectx b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.st-bar .a4p-specbtn{min-width:0}}
