/* MOBILEFIX-20261027: /quote·/editor 전용 휴대폰 보정 (mobile.css 의 상단띠·메뉴·푸터 규칙만 복사 + 견적·에디터 전용).
   mobile.css 는 하단 「견적 시작」 바(.m-cta)가 생겨서 이 두 페이지에는 붙이지 않는다. 전부 @media(max-width:768px) 안이라 PC 화면은 그대로다. */
@media(max-width:768px){
html{-webkit-text-size-adjust:100%}
/* 상단 띠: 짧은 문구 한 줄 */
.pv-banner{font-size:13px;line-height:1.4;padding:6px 12px}
.pv-banner .pv-full{display:none}
.pv-banner .pv-short{display:inline!important}
/* 헤더·메뉴(햄버거) */
header.site .in{height:64px}
.logo{min-height:44px}
.burger{width:44px;height:44px}
.burger[aria-expanded=true]{font-size:0}
.burger[aria-expanded=true]::before{content:'\2715';font-size:1.25rem;line-height:1}
nav.main{top:100%}
nav.main.open{max-height:calc(100vh - 112px);max-height:calc(100dvh - 112px);overflow-y:auto;overscroll-behavior:contain;padding:8px 16px 20px;gap:6px}
nav.main a{min-height:52px;display:flex;align-items:center;padding:0 14px;font-size:17px}
nav.main a.cta{justify-content:center;margin-top:10px}
html.nav-open,html.nav-open body{overflow:hidden}
/* 푸터 */
footer.site{font-size:15px}
footer.site .links{gap:0 6px}
footer.site .links a{min-height:48px;min-width:48px;justify-content:center;padding:0 6px}
footer.site .links a.owner-link{font-size:13px;opacity:.7}
footer.site dl dt{font-size:13px}
footer.site dl dd{font-size:15px}
footer.site dd a,footer.site p a{display:inline-flex;align-items:center;min-height:44px;padding:0 4px}
footer.site .small,footer.site p.small{font-size:13px;line-height:1.6}
.ph{font-size:13px}
.chk input[type=checkbox]{width:24px;height:24px}
label.chk a,.chk a{padding:14px 3px;margin:-14px -3px}
}

/* ---- 견적 (body.q-page) ---- */
@media(max-width:768px){
/* 하단 고정 「예상 합계」 바: 오른쪽에 상담 버튼 자리를 비우고, 버튼을 바 안 오른쪽에 넣는다(겹침 없음) */
.q-page .sum-bar{min-height:64px;padding:8px 68px calc(8px + env(safe-area-inset-bottom)) 16px;box-sizing:border-box}
html .q-page .tfhd-btn{width:48px;height:48px;right:10px;bottom:calc(8px + env(safe-area-inset-bottom))}
.q-page footer.site .wrap{padding-bottom:calc(84px + env(safe-area-inset-bottom))}
/* 단계 숫자·라벨 */
.q-page .progress .p{font-size:13px}
.q-page .progress .p i{font-size:14px}
.q-page .step-now,.q-page .flow-now{font-size:14px}
/* 케이스 카드의 보조 글자 */
.q-page .case-opt span,.q-page .case-opt .case-ins,.q-page .mg-grid .case-opt span{font-size:13px}
.q-page .case-opt .case-ins{font-size:13px}
/* 본문 속 링크: 글자 모양은 그대로, 누르는 자리만 넓힘 */
.q-page main p a:not([class]),.q-page main .hint a,.q-page main .muted a{padding:14px 3px;margin:-14px -3px}
}

/* ---- 에디터 (body.ed-page) ---- */
@media(max-width:768px){
.ed-page .ed-toolbar .tb{font-size:13px;min-width:64px;min-height:56px;white-space:nowrap}
.ed-page .ed-toolbar .tg{font-size:14px;min-height:44px;padding:0 10px;gap:8px}
.ed-page input[type=checkbox]{width:22px;height:22px;flex:0 0 auto}
.ed-page label.tg2,.ed-page .pm-btns .tg,.ed-page label.vault-big,.ed-page label.chk{min-height:44px;display:flex;align-items:center;gap:8px}
.ed-page .btn,.ed-page .chip{min-height:44px}
.ed-page .ed-toolbar .tb svg+span{font-size:13px}
.ed-page main p a:not([class]),.ed-page main .small a,.ed-page main .hint a,.ed-page main .muted a,.ed-page .ed-panel a:not([class]),.ed-page .ed-case a:not([class]){padding:14px 3px;margin:-14px -3px}
}

/* ---- 두 페이지 공통 보강 ---- */
@media(max-width:768px){
.q-page figcaption,.ed-page figcaption{font-size:13px}
.q-page .link-btn,.ed-page .link-btn{min-height:44px;min-width:44px}
.q-page main a:not([class]),.ed-page main a:not([class]){padding:14px 3px;margin:-14px -3px}
}
@media(max-width:768px){
.q-page .eyebrow,.ed-page .eyebrow{font-size:13px}
}

/* quote-flow-v2 */
.q-page .add-actions{display:flex;flex-direction:column;gap:10px;margin:14px 0 6px}
.q-page .add-actions .btn{width:100%;min-height:56px;justify-content:center;font-size:17px}
.q-page .add-actions .add-photo{min-height:64px;font-size:18px}
.q-page .items-list{display:grid;gap:10px;margin:14px 0}
.q-page .items-empty{padding:18px 14px;border:1px dashed var(--line,#cfd6e0);border-radius:12px;text-align:center;margin:0}
.q-page .item-photo .ip-row{display:flex;align-items:center;gap:12px}
.q-page .item-photo .ip-th{width:64px;height:64px;border-radius:10px;object-fit:cover;background:#e8ecf2;flex:none}
.q-page .item-photo .ip-info{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.q-page .item-photo .ip-info b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.q-page .item-photo .ip-info span{font-size:14px;color:var(--muted,#5b6678)}
.q-page .item-photo .ip-info em{font-style:normal;font-size:12px;color:var(--gold,#8a6a2f)}
.q-page .item-photo .ip-btns{display:flex;flex-direction:column;gap:2px;align-items:flex-end}
.q-page .item-photo .ip-btns .link-btn{min-height:40px;padding:6px 8px}
.q-page .item-photo .ip-edit{margin-top:12px}
.q-page .case-opt{position:relative}
.q-page .case-opt .case-fit{position:absolute;top:8px;right:8px;font-style:normal;font-size:12px;font-weight:800;color:#fff;background:#1f7a4d;border-radius:999px;padding:3px 9px}
.q-page .case-opt.is-fit{border-color:#1f7a4d;box-shadow:0 0 0 1px #1f7a4d inset}
.q-page .lay-btns{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.q-page .lay-btns .btn{min-height:52px}
.q-page details.refs{margin-top:22px;border-top:1px solid var(--line,#e1e5ec);padding-top:12px}
.q-page details.refs>summary{cursor:pointer;font-weight:700;padding:10px 0;min-height:44px}
.q-page .lay-btns .link-btn{color:var(--muted,#5b6678);text-decoration:underline;font-weight:600}
@media(min-width:769px){.q-page .add-actions{flex-direction:row}.q-page .add-actions .btn{width:auto;flex:1}}

/* quote-flow-v2 (r2): 배치 단계 큰 주 버튼 */
.q-page .lay-btns .btn.primary.lg{flex:1 1 100%;min-height:60px;font-size:18px}

/* editor-simple: /editor?from=quote&simple=1 (견적에서 넘어온 간단 모드. 일반 화면에는 영향 없음 — 전부 html.ed-simple 아래) */
html.ed-simple .ed-head,html.ed-simple #ed-start,html.ed-simple #ed-case,html.ed-simple .ed-tabs,html.ed-simple #ed-props,html.ed-simple #ed-actions,html.ed-simple .ed-photo-cta{display:none!important}
html.ed-simple .ed-wrap{display:flex;flex-direction:column;padding-top:10px;padding-bottom:calc(100px + env(safe-area-inset-bottom))}
html.ed-simple .ed-grid{order:1;margin-bottom:10px}
html.ed-simple #ed-toolbar{order:2;display:block;overflow:visible;padding:10px}
html.ed-simple #ed-place{order:3}
html.ed-simple #ed-warn{order:4;padding:10px 4px 2px}
html.ed-simple .ed-stage{height:min(50vh,520px);min-height:300px}
html.ed-simple .ed-big4{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
html.ed-simple .ed-toolbar .tb-big{width:100%;min-width:0;min-height:76px;gap:6px;font-size:16px;border:1px solid rgba(184,149,90,.55);background:rgba(244,239,228,.08)}
html.ed-simple .ed-toolbar .tb-big svg{width:30px;height:30px}
html.ed-simple .ed-toolbar .tb-big span{font-size:16px;font-weight:700}
html.ed-simple .ed-toolbar .tb-more{width:100%;min-height:48px;margin-top:10px;flex-direction:row;font-size:15px;border:1px dashed rgba(216,187,130,.55)}
html.ed-simple .ed-more{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;padding-top:10px;border-top:1px solid rgba(216,187,130,.3)}
html.ed-simple .ed-more[hidden]{display:none}
html.ed-simple #ed-wrap[data-tab="3d"] #ed-toolbar{display:block}
html.ed-simple .ed-nextbar{position:fixed;left:0;right:0;bottom:0;z-index:240;display:flex;gap:10px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:var(--ivory);border-top:1px solid var(--gold);box-shadow:0 -6px 20px rgba(15,26,43,.16)}
html.ed-simple .ed-nextbar #sb-undo{flex:0 0 auto;min-height:56px;padding:0 16px}
html.ed-simple .ed-nextbar #sb-next{flex:1 1 auto;min-height:56px;font-size:1.05rem}
html:not(.ed-simple) .ed-nextbar{display:none}
html.ed-simple .ed-nextbar{padding-right:70px}
html.ed-simple .tfhd-btn{left:auto!important;right:10px!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;width:52px;height:52px}
@media(min-width:769px){
html.ed-simple .ed-nextbar{padding-left:max(12px,calc((100vw - 1100px)/2));padding-right:max(70px,calc((100vw - 1100px)/2 + 58px))}
html.ed-simple .tfhd-btn{right:max(10px,calc((100vw - 1100px)/2))!important}
html.ed-simple .ed-big4{grid-template-columns:repeat(4,minmax(0,1fr))}
html.ed-simple .ed-wrap{max-width:1100px}
}

/* TF-DIRECTEDIT-20261027: 에디터 간단 모드 「치수 칸」 — 도형을 놓거나 탭하면 캔버스 바로 아래에 가로·세로(지름)·깊이 칸이 열린다 */
html.ed-simple .ed-qsize[hidden]{display:none!important}
html.ed-simple .ed-qsize{order:1;margin:0 0 12px;padding:10px 12px 12px;border:1px solid rgba(184,149,90,.65);border-radius:12px;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.06)}
html.ed-simple .ed-qsize .qs-head{display:flex;gap:8px;align-items:baseline;margin-bottom:6px}
html.ed-simple .ed-qsize .qs-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 10px}
html.ed-simple .ed-qsize .qf-name{grid-column:1/-1}
html.ed-simple .ed-qsize .qf label.f{display:block;margin:0 0 2px;font-size:.85rem}
html.ed-simple .ed-qsize .qf input{width:100%;min-height:46px;font-size:16px;box-sizing:border-box}
html.ed-simple .ed-qsize .qs-note{margin:6px 0 0}
html.ed-simple .ed-qsize .qs-act{display:flex;gap:8px;margin-top:8px}
@media(min-width:769px){html.ed-simple .ed-qsize .qs-grid{grid-template-columns:2fr 1fr 1fr 1fr}
html.ed-simple .ed-qsize .qf-name{grid-column:auto}}
/* SIMPLE-ORDER-1027: 간단 모드 세로 순서 = ① 도형 도구 → ② 모눈종이(그리기) → 치수 칸 → ③ 입체(3D) (대표님 지시 2026-10-27) */
html.ed-simple .ed-grid,html.ed-simple .ed-side{display:contents}
html.ed-simple #ed-toolbar{order:0;margin-bottom:10px}
html.ed-simple #ed-place{order:0}
html.ed-simple #ed-warn{order:0;margin-bottom:6px}
html.ed-simple #pane-2d{order:1;margin-bottom:10px}
html.ed-simple .ed-qsize{order:2}
html.ed-simple #pane-3d{order:3;margin-bottom:10px}
/* SIMPLE-ORDER-1027b: 순서 바꾼 뒤 좁은 화면에서 모눈종이 폭이 줄어드는 문제 → 가로 꽉 채움 */
html.ed-simple #pane-2d>*,html.ed-simple #pane-3d,html.ed-simple .ed-qsize{width:100%;box-sizing:border-box;align-self:stretch}
