/* LF45 웹 (보이는 이름 Holoway AI) — PC 프로그램 LF45_Cloud 를 휴대폰 웹으로 (대표·팀원 몇 명).
   디자인 언어 (2026-10-24 사용자 확정 '시안 A2 · 선, 로고 무늬 없이 · 격자 무늬도 빼고'): 로고에서 읽은 규칙을 화면 규칙으로.
   · 선: 로고의 선은 세로·30°·150° 세 방향뿐이고 둥근 곳이 없음 → 모서리 0, 채운 버튼·채운 카드만 오른쪽 위를 30° 로 깎음(--cut).
     1px 선으로 나누고 그림자는 떠 있는 것(시트·알림·독)에만. 배경 무늬·로고 반복·큰 로고는 쓰지 않음 (로고는 한 화면에 한 번, 원래 모양).
   · 색: 흰 종이 + 먹(검정) + 회색 단계. 빨강(--signal)은 '지금'에만 — 지금 메뉴 막대, 고른 거르기 밑줄, 입력 초점 밑줄, 커서.
     기본 버튼은 먹. 상태 색은 상태에만 (진행 호박 · 완료 초록 · 실패 진한 빨강 + ✕ · 보관 청록 · 대기 회색), 글리프는 큐브 윤곽인 육각형.
   · 진행: 45칸 막대(퀼트 45뷰) — 채운 칸 먹, 지금 칸은 30° 빗금이 흐름.
   · 글자: Pretendard(한글) + Archivo 넓은 폭(큰 숫자) + JetBrains Mono(번호·기록). 모두 SIL OFL 1.1.
   · 움직임: 대표 장면 = 작업 줄 → 자세히 (상태 글리프·이름·진행 막대가 이어져 커짐, View Transitions).
     나머지는 상태를 알리는 것만 — 목록 첫 등장 엇갈림, 진행 막대 채움, 빗금 흐름, 선택 모드, 시트·알림, 지금 표시 미끄러짐, 펼침, 숫자 바뀜.
     줄이기 설정이면 위치 움직임 없음 (맨 아래). */
:root {
  --bg: #ffffff;                           /* 종이 */
  --surface: #ffffff;
  --surface-2: #f2f2f2;                    /* 종이 2: 채운 카드·올림 바탕 */
  --surface-3: #e6e6e6;                    /* 진행 막대 빈칸·꺼진 스위치 */
  --line: #e0e0e0;
  --line-strong: #bdbdbd;
  --text: #0a0a0a;                         /* 먹 */
  --text-2: #444444;
  --text-3: #6a6a6a;                       /* 흰 바탕 5.4 : 1, 종이 2 위 4.8 : 1 */
  --ink: #0a0a0a;
  --ink-hover: #2e2e2e;
  --on-ink: #ffffff;
  --brand: var(--ink);                     /* 고른 것·링크·초점·진행 막대 = 먹 */
  --brand-soft: #ececec;                   /* 고른 줄 바탕 */
  --brand-line: #9a9a9a;
  --on-brand: var(--on-ink);
  --signal: #e60013;                       /* Holoway 빨강 = '지금' 표시만 (지금 메뉴 막대·고른 거르기 밑줄·입력 초점 밑줄·커서·고른 글 바탕) */
  --logo-red: #e60013;                     /* 로고 빨강 (2021 BI 원본 값) 은 어두운 화면에서도 그대로 */
  --logo-ink: #0a0a0a;                     /* 로고 'HOLOWAY' = 검정 (어두운 화면은 흰색) */
  --hatch: #0a0a0a;                        /* 30° 빗금 (진행 중인 칸) */
  --run: #d97706;
  --run-text: #b45309;
  --run-soft: #fdf3e2;
  --ok: #15803d;
  --ok-soft: #e8f4ec;
  --bad: #b42318;                          /* 실패 = 로고 빨강보다 어둡게, 늘 글리프(✕)·글자와 함께 */
  --bad-soft: #fbebe9;
  --kept: #0e7490;
  --kept-soft: #e5f2f5;
  --idle: #8a8a8a;
  --shadow-1: 0 0 transparent;             /* 선으로 그림: 그림자는 떠 있는 것(시트·알림·독)에만 (목록 안 값이라 none 대신 빈 그림자) */
  --shadow-2: 0 0 transparent;
  --shadow-3: 0 1px 0 rgb(10 10 10 / .06), 0 18px 40px -16px rgb(10 10 10 / .28);
  --r-ctl: 0px;                            /* 로고에 둥근 곳이 없음 → 모서리 0 */
  --r-box: 0px;
  --cut: polygon(0 0, calc(100% - 12px) 0, 100% 7px, 100% 100%, 0 100%);         /* 채운 버튼: 오른쪽 위를 큐브 빗변 각도(30°)로 12 × 7 */
  --cut-lg: polygon(0 0, calc(100% - 24px) 0, 100% 14px, 100% 100%, 0 100%);     /* 채운 카드: 24 × 14 */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --display: 'Archivo Variable', Archivo, var(--font);                            /* 큰 숫자 (폭 125%) */
  --mono: 'JetBrains Mono Variable', 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, 'Pretendard Variable', Pretendard, monospace;   /* 한글은 고정폭 대체(넓은 CJK) 대신 Pretendard */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --top-h: 52px;
  --tab-h: 62px;
  --side-w: 240px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0b;                         /* 밤 */
    --surface: #141414;
    --surface-2: #1c1c1c;
    --surface-3: #282828;
    --line: #2c2c2c;
    --line-strong: #404040;
    --text: #f2f2f2;
    --text-2: #b5b5b5;
    --text-3: #8c8c8c;                     /* 밤 바탕 5.8 : 1 */
    --ink: #f2f2f2;
    --ink-hover: #d0d0d0;
    --on-ink: #0b0b0b;
    --brand-soft: #262626;
    --brand-line: #5c5c5c;
    --signal: #ff3341;                     /* 어두운 바탕에서 읽히게 조금 밝힌 Holoway 빨강 ('지금' 표시) */
    --logo-ink: #ffffff;
    --hatch: #f2f2f2;
    --run: #f5a524;
    --run-text: #f7b955;
    --run-soft: #2b2112;
    --ok: #3fbf74;
    --ok-soft: #13261b;
    --bad: #ff7b6e;
    --bad-soft: #2d1513;
    --kept: #4fb8cf;
    --kept-soft: #10242a;
    --idle: #6e6e6e;
    --shadow-3: 0 0 0 1px #2c2c2c, 0 24px 48px -12px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}

/* ---------- 바탕 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) transparent; scrollbar-width: thin; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.55 var(--font); letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; caret-color: var(--signal);
  word-break: keep-all; overflow-wrap: anywhere;          /* 한국어는 낱말 중간에서 줄바꿈하지 않음 (파일 이름만 아무 데서나) */
}
/* ss06 = Pretendard 의 '알아보기 쉬운 숫자'. 같은 이름이 Inter 4 에서는 '네모 문자'라, Pretendard 를 못 받아 Inter 로 대신 그리면 숫자·영문이 칸 안에 갇힘
   → 화면이 Pretendard 를 받은 것을 확인한 뒤에만 켬 (app.js fontFeatures) */
html.pf body { font-feature-settings: 'ss06'; }
::selection { background: color-mix(in oklch, var(--signal) 24%, transparent); color: var(--text); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
a { color: var(--text); text-decoration: none; text-underline-offset: 3px; text-decoration-thickness: 1px; }
/* 글 속 링크 (문단·목록 안 class 없는 a — 알림·안내·드롭박스 순서): 색이 글과 같아 늘 밑줄 (옅게, 올리면 진하게) */
:is(p, li) a:not([class]) { font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in oklch, currentColor 36%, transparent); }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button, [role="button"], label.pick, summary { cursor: pointer; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 20px; height: 20px; fill: currentColor; flex: none; }
.ic-sm { width: 16px; height: 16px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .9em; letter-spacing: 0; }
.mut { color: var(--text-2); }
.faint { color: var(--text-3); }
.nobr { white-space: nowrap; }                 /* 'MoGe-3' 같은 이름이 줄표 자리에서 끊기지 않게 */
.noscript { padding: 24px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { a:hover { text-decoration: underline; } :is(p, li) a:not([class]):hover { text-decoration-color: currentColor; } }

/* ---------- 틀: 휴대폰 = 위 막대 + 아래 탭 / 넓은 화면 = 왼쪽 메뉴 ---------- */
.app { min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: calc(var(--top-h) + var(--safe-t)); padding: var(--safe-t) 16px 0;
  display: flex; align-items: center; gap: 12px;
  background: color-mix(in oklch, var(--bg) 84%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  box-shadow: 0 1px 0 transparent; transition: box-shadow 200ms ease;
  view-transition-name: topbar;
}
.topbar.scrolled { box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; min-width: 44px; min-height: 44px; flex: none; }   /* 큐브만 보일 때도 누르는 곳 44px */
.brand:hover { text-decoration: none; }
/* 로고 = 큐브 + 'HOLOWAY AI' 글자 (app.js logoLockup). --lg = 큐브 높이 하나로 원본 비율 그대로: 큐브 너비 .867 · 사이 .28 · 글자 높이 .328 · 글자 너비 3.49 */
.lockup { --lg: 26px; display: inline-flex; align-items: center; gap: calc(var(--lg) * .28); color: var(--logo-ink); line-height: 0; vertical-align: top; }
.lockup svg, svg.lg-mark { display: block; flex: none; }
.lg-mark { width: calc(var(--lg, 26px) * .867); height: var(--lg, 26px); }
.lg-word { width: calc(var(--lg) * 3.49); height: calc(var(--lg) * .328); }
.lg-red { fill: var(--logo-red); }
.lg-ink { fill: currentColor; }
.topbar-status { margin-left: auto; display: flex; align-items: center; min-width: 0; }
/* 좁은 휴대폰(360px 이하 갤럭시 등): 상태 알약이 화면 밖으로 밀려 가로 스크롤이 생기던 것 →
   진행 알약은 줄어들며 말줄임, 380px 이하는 '서버 확인 필요' 를 '확인 필요' 로, 상태 알약이 다 안 들어가면 로고 글자를 빼고 큐브만 (app.js fitTop) */
.topbar-status > .live { min-width: 0; }
.topbar-status > .live > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.topbar-status > .bal { flex: none; }
@media (max-width: 380px) { .topbar .wl { display: none; } }
.topbar.tight .lg-word { display: none; }
.live { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; font-size: 13px; color: var(--text-2); white-space: nowrap; }   /* 알약 대신 글자 (선 언어) */
.live b { font-weight: 650; color: var(--text); }
.bal { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; font-size: 13px; font-family: var(--mono); letter-spacing: 0;
  font-weight: 500; color: var(--text-2); }
.topbar-status > * + * { box-shadow: inset 1px 0 0 var(--line); }     /* 상태 사이 가는 세로선 */
.bal .ic { width: 15px; height: 15px; }
.bal.low, .nav-side .cost.low b { color: var(--bad); }
.net { position: fixed; z-index: 40; left: 16px; right: 16px; top: calc(var(--safe-t) + var(--top-h) + 8px);
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: var(--r-box);
  font-size: 13px; line-height: 1.4; background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-2); }
.net[hidden] { display: none; }
.net .ic { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--bad); }
.net div { display: grid; gap: 1px; min-width: 0; }
.net b { font-weight: 650; }
.net span { color: var(--text-2); }
body.stale .live .dot { animation: none; opacity: .4; }

.nav {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
  height: calc(var(--tab-h) + var(--safe-b)); padding: 0 6px var(--safe-b);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in oklch, var(--surface) 96%, transparent);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: 0 -1px 0 var(--line);
  view-transition-name: nav;
  transition: transform 300ms var(--ease-drawer);
}
.nav a { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-3); font-size: 11.5px; font-weight: 600; letter-spacing: -0.01em; transition: color 180ms ease; }
.nav a:hover { text-decoration: none; }
.nav a .ic { width: 24px; height: 24px; transition: transform 200ms var(--ease-out), color 180ms ease; }
.nav a:active .ic { transform: scale(.9); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] .ic { color: var(--text); }           /* 지금 화면 = 먹 아이콘·글자 + 위 빨간 막대 (.nav-ind) */
.nav-ind { position: absolute; z-index: 0; top: 0; left: 0; height: 2px; width: 0; background: var(--signal);      /* 지금 화면 표시 = 탭 위 빨간 막대 (넓은 화면은 왼쪽 막대) */
  transition: transform 340ms var(--ease-out), width 340ms var(--ease-out), height 340ms var(--ease-out), opacity 200ms ease; opacity: 0; pointer-events: none; }
.nav-ind.ready { opacity: 1; }
.nav-side { display: none; }
body.selecting .nav { transform: translateY(110%); }

.view { padding: 4px 16px calc(var(--tab-h) + var(--safe-b) + 32px); max-width: 780px; margin: 0 auto; outline: none; view-transition-name: main; }

@media (min-width: 960px) {
  .app { display: grid; grid-template-columns: var(--side-w) 1fr; }
  .topbar { display: none; }
  .nav {
    position: sticky; top: 0; height: 100dvh; padding: 18px 12px; grid-row: 1; transform: none !important;
    display: flex; flex-direction: column; gap: 2px; box-shadow: 1px 0 0 var(--line); background: var(--bg);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .nav .brand-in-nav { height: auto; padding: 4px 10px 22px; }
  .nav .brand-in-nav .lockup { --lg: 30px; }
  .nav a { flex-direction: row; justify-content: flex-start; gap: 11px; height: 38px; padding: 0 10px; border-radius: var(--r-ctl);
    font-size: 14.5px; font-weight: 550; color: var(--text-2); }
  .nav a .ic { width: 19px; height: 19px; }
  .nav-ind { top: 0; background: var(--surface-2); box-shadow: inset 2px 0 0 var(--signal); }
  .nav-side { display: grid; gap: 8px; margin-top: auto; padding: 12px 10px 0; font-size: 13px; color: var(--text-2); }
  .nav-side .live { justify-self: start; }
  .net { top: 16px; right: auto; left: calc(50% + var(--side-w) / 2); transform: translateX(-50%); width: max-content; max-width: 720px;
    align-items: center; padding: 8px 16px; }
  .net div { display: flex; gap: 8px; }
  .nav-side .cost { display: flex; justify-content: space-between; }
  .nav-side .cost b { color: var(--text); font-weight: 650; }
  .view { padding: 32px 40px 72px; max-width: 1040px; width: 100%; margin: 0 auto; }
}
.nav .brand-in-nav { display: none; }
@media (min-width: 960px) { .nav .brand-in-nav { display: flex; } }
@media (min-width: 960px) and (hover: hover) { .nav a:hover { color: var(--text); } }

/* ---------- 머리말 ---------- */
.head { display: flex; align-items: center; gap: 12px; margin: 14px 0 16px; min-height: 40px; }
.head h1 { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 680; letter-spacing: -0.04em; text-wrap: balance; }
.head .sub { margin: 4px 0 0; color: var(--text-2); font-size: 14.5px; }
.head-side { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.head-cost { font-size: 13px; color: var(--text-2); white-space: nowrap; text-align: right; line-height: 1.25; }
.head-cost b { display: block; color: var(--text); font-weight: 650; font-size: 16px; letter-spacing: -0.02em; }
@media (min-width: 960px) { .head { margin-top: 0; } .head-cost { display: none; } }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: var(--text-2); font-size: 14.5px; font-weight: 550; margin-top: 2px; }
.back:hover { color: var(--text); text-decoration: none; }
.back .ic { transition: transform 200ms var(--ease-out); }
@media (hover: hover) { .back:hover .ic { transform: translateX(-3px); } }
h2.sec { font-size: 13.5px; font-weight: 650; color: var(--text-2); margin: 28px 2px 10px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
h2.sec .count { color: var(--text-3); font-weight: 550; }
h2.sec .sec-act { margin-left: auto; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 18px; border-radius: 0; border: 0;
  background: var(--ink); color: var(--on-ink); font-weight: 620; font-size: 15px; cursor: pointer; white-space: nowrap; text-decoration: none;
  box-shadow: none; clip-path: var(--cut);                 /* 채운 버튼 = 오른쪽 위 30° 깎기 */
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 140ms var(--ease-out), opacity 160ms ease, color 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: .38; cursor: default; transform: none; box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--on-ink); outline-offset: -5px; }     /* 깎은 모서리가 바깥 초점 테두리를 잘라서 안쪽 테두리로 */
.btn .ic { width: 18px; height: 18px; }
.btn .dim { opacity: .66; font-weight: 550; }
.btn-2 { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--ink); }
.btn-2, .btn-ghost, .btn-danger { clip-path: none; }
:is(.btn-2, .btn-ghost, .btn-danger):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn-danger { background: var(--surface); color: var(--bad); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--bad) 36%, var(--surface)); }
.btn-danger-solid { background: var(--bad); color: oklch(99% 0.003 27); }
.btn-ghost { background: transparent; color: var(--text-2); box-shadow: none; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 14px; gap: 6px; --cut: polygon(0 0, calc(100% - 9px) 0, 100% 5px, 100% 100%, 0 100%); }
.btn-sm .ic { width: 16px; height: 16px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-ctl); border: 0; background: transparent; color: var(--text-3); cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, transform 140ms var(--ease-out); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn[aria-expanded="true"] { color: var(--brand); background: var(--brand-soft); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--ink-hover); text-decoration: none; }
  .btn-2:hover { background: var(--surface-2); }
  .btn-danger:hover { background: var(--bad-soft); }
  .btn-danger-solid:hover { background: color-mix(in oklch, var(--bad) 88%, black); }
  .btn-ghost:hover { background: var(--surface-2); color: var(--text); }
  .icon-btn:hover { background: var(--surface-2); color: var(--text); }
}
@media (pointer: coarse) {                                  /* 손가락: 누르는 곳 44px 이상 */
  .btn-sm { min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
}
.busy { position: relative; color: transparent !important; pointer-events: none; }
.busy .ic { opacity: 0; }
.busy::after { content: ''; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%; border: 2px solid; border-color: var(--on-ink) var(--on-ink) transparent transparent; animation: spin .6s linear infinite; }
.btn-2.busy::after, .btn-danger.busy::after, .btn-ghost.busy::after { border-color: var(--text-2) var(--text-2) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 거르기 칩 ---------- */
.chips { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; box-shadow: inset 0 -1px 0 var(--line); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 0; border: 0; cursor: pointer;
  background: var(--surface); color: var(--text-2); font-size: 14px; font-weight: 580; box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 140ms var(--ease-out); }
.chip:active { transform: scale(.96); }
.chip .n { color: var(--text-3); font-weight: 550; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.chip[aria-pressed="true"] .n { color: color-mix(in oklch, var(--on-ink) 65%, transparent); }
.chips .chip { height: 42px; padding: 0 2px; background: none; box-shadow: none; }          /* 작업 거르기 = 밑줄 탭 */
.chips .chip[aria-pressed="true"] { background: none; color: var(--text); box-shadow: inset 0 -2px 0 var(--signal); }
.chips .chip[aria-pressed="true"] .n { color: var(--text-3); }
@media (pointer: coarse) { .chip, .chipset .chip { height: auto; min-height: 44px; } }
@media (min-width: 960px) { .chips { margin: 0; padding: 0; } }

/* ---------- 알림 띠 ---------- */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-box); font-size: 14px; margin: 10px 0; background: var(--run-soft); color: var(--text); }
.notice .ic { color: var(--run-text); margin-top: 1px; }
.notice.bad { background: var(--bad-soft); }
.notice.bad .ic { color: var(--bad); }
.notice.info { background: var(--brand-soft); }
.notice.info .ic { color: var(--brand); }
.notice p { margin: 0; }
.notice .why { display: block; color: var(--text-2); font-size: 13px; margin-top: 2px; word-break: break-word; }
.notice.retry { align-items: center; flex-wrap: wrap; }                       /* 못 받은 옵션 표·GPU 목록: 이유 + [다시 시도] (좁으면 단추가 아래 줄 오른쪽) */
.notice.retry p { flex: 1 1 200px; min-width: 0; word-break: break-word; }
.notice.retry .btn { flex: none; margin-left: auto; }

/* ---------- 목록 ---------- */
.list { background: var(--surface); border-radius: var(--r-box); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1); overflow: hidden; }
.list > * + * { box-shadow: inset 0 1px 0 var(--line); }
/* 진행 중 묶음 = 채운 카드 (오른쪽 위 30° 깎기) · 대기·끝난 작업은 선으로 나눈 줄 */
[data-key="body"] > .list:first-child { margin-top: 20px; }      /* 빈 목록이 거르기 밑줄에 붙지 않게 (줄이 있으면 '진행 중' 제목이 띄움) */
.list[data-key="sec-run"] { display: grid; gap: 8px; background: none; box-shadow: none; overflow: visible; }
.list[data-key="sec-run"] > * + * { box-shadow: none; }
.list[data-key="sec-run"] > .job { background: var(--surface-2); clip-path: var(--cut-lg); }

.job { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 2px 12px; padding: 14px 14px 14px 14px; position: relative;
  transition: background-color 160ms ease, opacity 200ms ease; }
.job-mark { grid-row: 1 / span 2; position: relative; width: 20px; height: 20px; margin-top: 1px; }
.job-mark > * { position: absolute; inset: 0; transition: transform 220ms var(--ease-out), opacity 180ms ease; }
.job-link { color: var(--text); font-weight: 620; font-size: 15.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.02em; width: fit-content; max-width: 100%; }
.job-link:hover { text-decoration: none; }
.job-link::after { content: ''; position: absolute; inset: 0; }
.job-link:focus-visible { outline: none; }
.job-link:focus-visible::after { outline: 2px solid var(--brand); outline-offset: -3px; border-radius: var(--r-box); }
.job-side { text-align: right; font-size: 14px; font-weight: 550; color: var(--text-2); white-space: nowrap; align-self: start; padding-top: 1px; }
.job-side.pct { color: var(--run-text); font-weight: 650; }
.job-meta { grid-column: 2 / span 2; font-size: 13px; color: var(--text-2); display: flex; gap: 2px 8px; align-items: center; min-width: 0; }
.job-meta .sum { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-meta .when { margin-left: auto; color: var(--text-3); white-space: nowrap; padding-left: 8px; }
.job-meta .spend { color: var(--text-2); font-weight: 600; }          /* 진행 중 작업에 지금까지 쌓인 요금 (돈이 나가는 상태는 목록에서도 보이게) */
.kind { flex: none; display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 0; font-size: 11.5px; font-weight: 650; letter-spacing: 0;
  background: var(--surface-2); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
.kind.make { background: var(--ink); color: var(--on-ink); box-shadow: none; }            /* 만들기(제품) = 잉크 채움 · 테스트는 회색 테두리 */
.kind.moge { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }   /* 정면 MoGe-3 (실험) — 상태 색 안 씀 */
.dock .what .kind { margin: 3px 6px 0 0; vertical-align: 1px; }
.job-run { grid-column: 2 / span 2; margin-top: 10px; display: block; }
.job-stage { font-size: 13px; color: var(--text-2); margin-top: 8px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.job-err { grid-column: 2 / span 2; font-size: 13px; color: var(--bad); margin-top: 3px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.job-err.wait { color: var(--text-2); }                 /* 엔진 설치 끝나기를 기다림 = 문제 아님 (볼륨 부족·공간 부족만 빨강) */
.job-actions { grid-column: 2 / span 2; display: flex; gap: 8px; margin-top: 10px; position: relative; z-index: 1; }
@media (hover: hover) and (pointer: fine) { .job:hover { background: var(--surface-2); } .list[data-key="sec-run"] > .job:hover { background: var(--surface-3); } }
/* 넓은 화면의 작업 줄 = 칸 맞춤: 글리프 · 이름 · 종류·요약·시각 · %/요금, 진행 막대·단계·버튼은 아래 줄 */
@media (min-width: 960px) {
  .job { grid-template-columns: 20px minmax(160px, 1fr) minmax(0, 1.7fr) 96px; align-items: center; column-gap: 16px; row-gap: 0; padding: 12px 16px; }
  .job-mark { grid-row: 1; margin-top: 0; }
  .job-link { grid-column: 2; grid-row: 1; }
  .job-meta { grid-column: 3; grid-row: 1; }
  .job-side { grid-column: 4; grid-row: 1; padding-top: 0; align-self: center; }
  .job-run { grid-column: 2 / span 2; grid-row: 2; margin-top: 8px; }
  .job-err { grid-column: 2 / span 2; grid-row: 2; margin-top: 4px; }
  .job-actions { grid-column: 4; grid-row: 2; justify-content: flex-end; margin-top: 8px; }
  .job-stage { margin-top: 6px; }
}
@media (min-width: 960px) and (hover: hover) and (pointer: fine) {        /* 버튼은 올리거나 초점이 갈 때만 — 숨은 동안엔 누를 수도 없음 */
  .job-actions { visibility: hidden; opacity: 0; transition: opacity 160ms ease, visibility 0s linear 160ms; }
  .job:hover .job-actions, .job:focus-within .job-actions { visibility: visible; opacity: 1; transition: opacity 160ms ease, visibility 0s; }
  .job:not(:has(.job-run, .job-err)) .job-actions { grid-row: 1; margin-top: 0; }          /* 아래 줄이 없는 줄은 높이를 늘리지 않고 오른쪽 칸에 겹침 */
  .job:not(:has(.job-run, .job-err)):is(:hover, :focus-within) .job-side { visibility: hidden; }
}
.st-running { color: var(--run-text); } .st-done { color: var(--ok); } .st-kept { color: var(--kept); }
.st-failed { color: var(--bad); } .st-stopping { color: var(--run-text); } .st-stopped, .st-queued { color: var(--text-2); }

/* 선택 모드: 상태 글리프 자리에 체크 상자 (자리는 그대로 — 줄이 흔들리지 않게) */
.chk { display: grid; place-items: center; opacity: 0; transform: scale(.6); pointer-events: none; }
.chk i { width: 20px; height: 20px; border-radius: 0; box-shadow: inset 0 0 0 1.5px var(--line-strong); background: var(--surface); display: grid; place-items: center;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms var(--ease-out); }
.chk svg { width: 14px; height: 14px; fill: none; stroke: var(--on-brand); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset 220ms var(--ease-out) 40ms; }
.selmode .job-mark .glyph, .selmode .pick .lead { opacity: 0; transform: scale(.6); }
.selmode .chk { opacity: 1; transform: none; pointer-events: auto; }
.selmode .job.sel, .selmode .pick.sel { background: color-mix(in oklch, var(--brand-soft) 70%, var(--surface)); }
.sel .chk i { background: var(--brand); box-shadow: none; animation: pop 220ms var(--ease-out); }
.sel .chk svg { stroke-dashoffset: 0; }
.selmode .job.locked { opacity: .45; }
.selmode .job.locked .chk { opacity: .35; }
.selmode .job-actions { display: none; }
@keyframes pop { 0% { transform: scale(.82); } 60% { transform: scale(1.06); } 100% { transform: none; } }

.bulk { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; padding: 10px 12px calc(10px + var(--safe-b));
  display: flex; align-items: center; gap: 8px; background: var(--surface); box-shadow: 0 -1px 0 var(--line), var(--shadow-3);
  transform: translateY(110%); visibility: hidden; transition: transform 320ms var(--ease-drawer), visibility 0s linear 320ms; }
.bulk.show { transform: none; visibility: visible; transition: transform 320ms var(--ease-drawer), visibility 0s; }
.bulk .what { flex: 1; min-width: 0; font-size: 14px; color: var(--text-2); padding-left: 4px; }
.bulk .what b { color: var(--text); font-weight: 650; font-size: 16px; margin-right: 2px; }
@media (min-width: 960px) {
  .bulk { left: calc(var(--side-w) + 40px); right: auto; width: min(560px, calc(100vw - var(--side-w) - 80px)); bottom: 20px; padding: 10px; transform: translateY(160%); }
}

/* 상태 글리프 = 큐브 윤곽(정육각형) — 실제 상태만 (진행 = 진행률만큼 아래부터 차오름 · app.js glyph) */
.glyph { display: block; width: 20px; height: 20px; color: var(--idle); }
.glyph svg { display: block; width: 20px; height: 20px; overflow: visible; }
.glyph.running, .glyph.stopping { color: var(--run); }
.glyph.done { color: var(--ok); } .glyph.kept { color: var(--kept); } .glyph.failed { color: var(--bad); }
.glyph .pie { transition: stroke-dasharray 600ms var(--ease-out); }
.glyph.running .halo { transform-origin: 10px 10px; animation: halo 2.2s var(--ease-out) infinite; }
@keyframes halo { 0% { transform: scale(.7); opacity: .45; } 70%, 100% { transform: scale(1.45); opacity: 0; } }

/* 작은 상태 점 (위 막대) */
.dot { display: block; width: 8px; height: 9px; background: var(--idle); position: relative; flex: none;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }      /* 큐브 윤곽 */
.dot.running { background: var(--run); animation: blink 2s ease-in-out infinite; }
.dot.queued { background: color-mix(in oklch, var(--text-3) 45%, transparent); }
.dot.ok { background: var(--ok); }
.dot.failed { background: var(--bad); }
.live.warn { color: var(--bad); margin-right: 6px; text-decoration: none; }
.live.warn b { color: var(--bad); }
@keyframes blink { 50% { opacity: .35; } }

.pill { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px 0 8px; border-radius: 0; font-size: 12.5px; font-weight: 650; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.pill .glyph, .pill .glyph svg { width: 16px; height: 16px; }
.pill.running, .pill.stopping { background: var(--run-soft); color: var(--run-text); }
.pill.done { background: var(--ok-soft); color: var(--ok); }
.pill.kept { background: var(--kept-soft); color: var(--kept); }
.pill.failed { background: var(--bad-soft); color: var(--bad); }

/* 45칸 진행 막대 — 퀼트 45뷰를 칸으로. 채운 칸은 먹, 진행 중이면 지금 칸(app.js data-c)에 30° 빗금이 흐름 */
.views-bar { display: block; position: relative; height: 8px; background: var(--surface-3); overflow: hidden;
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 calc(100% / 45 - 2px), transparent calc(100% / 45 - 2px) calc(100% / 45));
  mask: repeating-linear-gradient(90deg, #000 0 calc(100% / 45 - 2px), transparent calc(100% / 45 - 2px) calc(100% / 45)); }
.views-bar i { position: absolute; inset: 0; background: var(--ink); transform-origin: left center; transform: scaleX(var(--w, 0)); transition: transform 700ms var(--ease-out); }
.views-bar em { display: none; }
.views-bar.running em { display: block; position: absolute; top: 0; bottom: 0; left: calc(var(--c, 0) * 100%); width: calc(100% / 45);
  background: repeating-linear-gradient(150deg, var(--hatch) 0 1.5px, transparent 1.5px 4px); animation: hatch 1.6s linear infinite; transition: left 700ms var(--ease-out); }
.views-bar.stopping i { background: var(--run); }
.views-bar.big { height: 14px; }
.views-bar.indet i { transform: none; background: repeating-linear-gradient(150deg, var(--line-strong) 0 1.5px, transparent 1.5px 4px); animation: hatch 1.6s linear infinite; }
@keyframes hatch { to { background-position: 8px 0; } }       /* 150° 빗금 4px 간격의 가로 한 주기 = 8px */

.empty { text-align: center; padding: 48px 22px; }
.empty > .ic { width: 32px; height: 32px; color: var(--text-3); margin-bottom: 10px; }     /* 빈 칸 그림 아이콘만 (안의 [만들기] 단추 아이콘은 단추 크기·색 그대로) */
.empty .empty-art { display: block; width: 132px; height: auto; margin: 0 auto 16px; }   /* 작업이 하나도 없을 때 = 등각 분해도 (로고 대신 제품을 그림 · app.js emptyArt) */
.empty-art .pl { fill: var(--surface); stroke: var(--text); }
.empty-art .pl.now { fill: var(--signal); stroke: var(--signal); }
.empty h3 { margin: 0 0 6px; font-size: 17px; font-weight: 650; letter-spacing: -0.03em; }
.empty p { margin: 0 auto 18px; color: var(--text-2); max-width: 30em; font-size: 14.5px; text-wrap: pretty; }
.more { display: block; width: 100%; min-height: 48px; text-align: center; color: var(--text-2); font-weight: 600; font-size: 14px; background: none; border: 0; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .more:hover { color: var(--text); background: var(--surface-2); } }

/* 목록 첫 등장: 아래에서 살짝 올라오며 엇갈림 (한 번만, 3초마다 새로 그릴 때는 없음) */
.rise > * { animation: rise 420ms var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 9) * 28ms); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.enter { animation: flash 1400ms ease-out; }
@keyframes flash { from { background-color: var(--brand-soft); } }

/* ---------- 작업 자세히 ---------- */
.detail-head { margin: 6px 0 16px; }
.detail-title { display: flex; gap: 12px; align-items: flex-start; }
.detail-title .glyph, .detail-title .glyph svg { width: 26px; height: 26px; flex: none; margin-top: 3px; }
.detail-text { min-width: 0; }
.detail-head h1 { margin: 0 0 6px; font-size: 23px; line-height: 1.3; font-weight: 680; letter-spacing: -0.04em; word-break: break-all; }
.detail-head .sub { color: var(--text-2); font-size: 13.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.detail-head .sub > span { display: inline-flex; align-items: center; gap: 5px; }
.detail-head .sub .ic { width: 15px; height: 15px; color: var(--text-3); }
.status-card { background: var(--surface-2); padding: 16px; clip-path: var(--cut-lg); }      /* 채운 카드 (오른쪽 위 30° 깎기) */
.status-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.status-top .big { margin-left: auto; font-family: var(--display); font-stretch: 125%; font-size: 34px; font-weight: 600; letter-spacing: 0; line-height: 1; }
.status-top .big small { font-size: .55em; color: var(--text-3); margin-left: 1px; }
.status-text { margin: 12px 0 0; font-size: 14.5px; color: var(--text); word-break: break-word; }
.status-err { margin: 10px 0 0; padding: 10px 12px; background: var(--bad-soft); border-radius: var(--r-ctl); font: 12.5px/1.55 var(--mono); word-break: break-word; white-space: pre-wrap; max-height: 240px; overflow: auto; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: var(--r-box); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; margin: 12px 0 0; padding: 1px; }
.fact { background: var(--surface); padding: 11px 14px; min-width: 0; }
.fact dt { font-size: 12.5px; color: var(--text-3); font-weight: 550; }
/* 값은 줄바꿈 (예전: 한 줄 말줄임이라 '182GB / 300GB (오…' 처럼 측정 시각·재시도 시각이 잘림). 덧붙임(측정 시각 등)은 아래 작은 글 */
.fact dd { margin: 2px 0 0; font-size: 15px; font-weight: 620; letter-spacing: -0.015em; }
.fact dd small { display: block; margin-top: 1px; font-size: 12.5px; font-weight: 500; color: var(--text-3); letter-spacing: -0.01em; }
/* 칸 수가 열 수로 나뉘지 않으면 마지막 칸이 남은 자리를 채움 (예전: 빈자리가 선 색 바탕 그대로 회색 칸으로 보임) */
.fact:last-child:nth-child(2n+1) { grid-column: 1 / -1; }
@media (min-width: 600px) {
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fact:last-child:nth-child(2n+1) { grid-column: auto; }
  .fact:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
  .fact:last-child:nth-child(3n+2) { grid-column: span 2; }
}

/* 탭·나눔 단추: 선택 표시가 미끄러짐 */
.tabs, .seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.tabs { margin: 22px 0 12px; padding: 0; gap: 0; background: none; box-shadow: inset 0 -1px 0 var(--line); }   /* 화면 안 탭 = 밑줄 탭 */
.tabs button, .seg button { position: relative; z-index: 1; display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 38px; padding: 0 8px;
  border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--text-2); font-weight: 620; font-size: 14px; cursor: pointer; transition: color 180ms ease; white-space: nowrap; }
.tabs button[aria-selected="true"], .seg button[aria-pressed="true"] { color: var(--text); }
.tabs button .ic, .seg button .ic { width: 17px; height: 17px; }
.thumb { position: absolute; z-index: 0; top: 0; left: 0; height: calc(100% - 8px); width: 0; background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--ink); transition: transform 300ms var(--ease-out), width 300ms var(--ease-out); pointer-events: none; }   /* 고른 것 = 먹 테두리 */
.tabs > .thumb { background: none; box-shadow: inset 0 -2px 0 var(--signal); }      /* 탭은 지금 = 빨간 밑줄 */
.thumb.still { transition: none; }
@media (pointer: coarse) { .tabs button, .seg button { min-height: 44px; } }
/* 테스트 방식 나눔 단추 (아홉 칸): 본문 폭이 한 줄(글자 그대로 약 740px)보다 좁으면 3칸씩 세 줄 — 위 = 테스트·GPU만·CPU 다시,
   가운데 = GPU 진단·키뷰 실험·점구름 해상도, 아래 = 렌더러 영상·정답 퀼트·카메라 경로 · 칸보다 긴 이름은 띄어쓰기에서 두 줄로, 두 줄도 44px 안.
   화면 폭이 아니라 남는 폭으로 고름 (옆 메뉴가 생기는 960~1079px 에서 한 줄이 본문을 밀어 가로로 넘쳤음) · 컨테이너 질의를 모르는 브라우저는 휴대폰 폭만 */
.seg-fit { container-type: inline-size; }
@container (max-width: 759px) { .seg-5 { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .seg-5 > button { padding: 4px 6px; white-space: normal; word-break: keep-all; line-height: 1.2; text-align: center; } }
@supports not (container-type: inline-size) {
  @media (max-width: 819px) { .seg-5 { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .seg-5 > button { padding: 4px 6px; white-space: normal; word-break: keep-all; line-height: 1.2; text-align: center; } } }
/* 카메라 경로 단계 단추 넷: 같은 폭 한 줄에 안 들어가면(본문 약 440px 미만 = 휴대폰) 2칸씩 두 줄 — 한 줄이면 360px 이하에서 넷째 단추가 틀 밖으로 밀렸음 */
@container (max-width: 439px) { .seg-4 { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@supports not (container-type: inline-size) { @media (max-width: 471px) { .seg-4 { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); } } }

.result-group + .result-group { margin-top: 18px; }
.result-group > h3 { font-size: 13.5px; color: var(--text-2); font-weight: 650; margin: 0 2px 8px; display: flex; gap: 8px; align-items: baseline; }
.figure { margin: 0 0 12px; background: var(--surface); border-radius: var(--r-box); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1); overflow: hidden; }
.figure button.zoom { display: block; width: 100%; padding: 0; border: 0; background: var(--surface-2); cursor: zoom-in; }
.figure img { display: block; width: 100%; height: auto; }
.figure video { display: block; width: 100%; max-height: 70vh; background: oklch(12% 0 0); }
.figure figcaption { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; font-size: 13.5px; box-shadow: inset 0 1px 0 var(--line); }
.figure figcaption .name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.figure figcaption .size { color: var(--text-3); margin-left: auto; white-space: nowrap; }
.figure .fig-note { margin: 0; padding: 0 14px 10px; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
/* 작업 화면: 같은 이름의 입력으로 만든 다른 결과 (A/B 비교로 바로 가기) */
.peers { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 14px 0 0; font-size: 13px; color: var(--text-2); }
.peers-h { display: inline-flex; align-items: center; gap: 6px; }
.peers-h .ic { width: 15px; height: 15px; }
.peers .chip { text-decoration: none; }
.peers .chip small { color: var(--text-3); font-weight: 500; font-size: 12.5px; }
.textfile pre { margin: 0; padding: 12px 14px; max-height: 340px; overflow: auto; font: 12.5px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; background: var(--surface-2); }
.file-row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 14px; color: var(--text); font-size: 14px; }
.file-row:hover { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { a.file-row:hover { background: var(--surface-2); } }
.file-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .size { color: var(--text-3); font-size: 13px; white-space: nowrap; }
.file-row .ic { color: var(--text-3); }
.list.flat { border-radius: 0; box-shadow: inset 0 1px 0 var(--line); }
.hint.pad { padding: 0 14px 14px; margin-top: 10px; }
.optlist { margin: 0; }
.optlist > div { display: flex; gap: 12px; justify-content: space-between; padding: 10px 14px; font-size: 14px; }
.optlist dt { flex: none; max-width: 50%; color: var(--text-2); }   /* 값이 길어도 이름이 눌려 접히지 않게 (예: '정면 MoGe-3' 이 'MoGe-' 에서 끊김) */
.optlist dd { margin: 0; font-weight: 600; text-align: right; min-width: 0; }   /* 줄바꿈은 body 규칙 (한국어 낱말 유지·긴 영문만 아무 데서나) — 예전 break-word 는 "(하드" / "웨어" 처럼 낱말 가운데서 끊음 */

.log-box { background: var(--surface); border-radius: var(--r-box); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1); overflow: hidden; }
.log-tools { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; box-shadow: inset 0 -1px 0 var(--line); font-size: 13px; color: var(--text-2); }
.log-tools .sp { flex: 1; }
.log { margin: 0; padding: 12px 14px; min-height: 160px; max-height: min(62vh, 640px); overflow: auto; font: 12px/1.65 var(--mono); white-space: pre-wrap; word-break: break-word; color: var(--text-2); background: var(--surface); }   /* 짧은 기록은 그만큼만 (예전: 다섯 줄에도 화면 2/3 빈 상자) */
.log .l-bad { color: var(--bad); font-weight: 600; }
.log .l-warn { color: var(--run-text); }
.log .l-ok { color: var(--ok); }
.log .l-t { color: var(--text-3); }

/* ---------- 입력 고르기 (만들기·테스트 같이) ---------- */
.card { background: var(--surface); border-radius: var(--r-box); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1); }
.block { margin-top: 12px; }
.pick { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 12px 6px 12px 14px; position: relative; transition: background-color 160ms ease; }
.pick input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.pick .lead { grid-row: 1 / span 2; grid-column: 1; position: relative; width: 20px; height: 20px; transition: transform 220ms var(--ease-out), opacity 180ms ease; }
.pick .chk { grid-row: 1 / span 2; grid-column: 1; position: relative; z-index: 1; }
.radio { display: block; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: box-shadow 200ms var(--ease-out); }
.pick:has(input:checked) { background: var(--brand-soft); }
.pick:has(input:checked) .radio { box-shadow: inset 0 0 0 6px var(--brand); }
.pick:has(input:focus-visible) .radio { outline: 2px solid var(--brand); outline-offset: 2px; }
.pick .name { font-weight: 600; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.015em; }
.pick .meta { grid-column: 2; font-size: 12.5px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: center; }
.pick .end { grid-row: 1 / span 2; grid-column: 3; display: flex; align-items: center; }
.selmode .pick .end { visibility: hidden; }
@media (hover: hover) and (pointer: fine) { .pick:hover { background: var(--surface-2); } .pick:has(input:checked):hover { background: var(--brand-soft); } }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; font-size: 11.5px; font-weight: 650; background: var(--surface-3); color: var(--text-2); }
.tag.portrait { background: var(--brand-soft); color: var(--brand); }
.pick:has(input:checked) .tag { background: var(--surface); }
.drop { display: grid; place-items: center; gap: 8px; text-align: center; padding: 30px 18px; border-radius: var(--r-box); background: var(--surface); color: var(--text-2); cursor: pointer;
  box-shadow: inset 0 0 0 1.5px var(--line-strong); background-image: none; transition: box-shadow 160ms ease, background-color 160ms ease; }
.drop.over { box-shadow: inset 0 0 0 2px var(--brand); background: var(--brand-soft); color: var(--text); }
@media (hover: hover) and (pointer: fine) { .drop:hover { box-shadow: inset 0 0 0 1.5px var(--brand); color: var(--text); } }
.drop .ic { width: 28px; height: 28px; color: var(--text); }
.drop b { color: var(--text); font-size: 15.5px; font-weight: 620; }
.up-progress { margin-top: 12px; }
.up-progress .row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.bar { height: 6px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); transform-origin: left center; transform: scaleX(var(--w, 0)); transition: transform 400ms var(--ease-out); }
.ts-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 10px 10px 14px; }
.ts-row > .ic { color: var(--text-3); }
.ts-row .info { flex: 1; min-width: 0; }
.ts-row .name { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-row .meta { font-size: 12.5px; color: var(--text-2); display: flex; gap: 2px 10px; align-items: center; flex-wrap: wrap; margin-top: 3px; }
.mode-help { font-size: 13.5px; color: var(--text-2); margin: 8px 2px 0; }
.estimate { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-box); background: var(--surface-2); font-size: 13.5px; color: var(--text-2); white-space: pre-wrap; }
.fixed { margin-top: 12px; }

/* ---------- 만들기 옵션 ---------- */
.opt-group { margin-top: 12px; }
.opt { padding: 14px; }
.opt + .opt { box-shadow: inset 0 1px 0 var(--line); }
.opt-head { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.opt-head b { font-size: 14.5px; font-weight: 650; letter-spacing: -0.015em; }
.opt-head .val { margin-left: auto; font-size: 14.5px; font-weight: 650; color: var(--text); }
.opt-head .icon-btn { margin: -6px -6px -6px 0; }
.opt-head .icon-btn .ic { width: 18px; height: 18px; }
.opt-sub { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.help { overflow: hidden; display: grid; grid-template-rows: 0fr; transition: grid-template-rows 260ms var(--ease-out); }
.help > div { min-height: 0; }
.help.open { grid-template-rows: 1fr; }
.help p { margin: 8px 0 0; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--surface-2); font-size: 13px; line-height: 1.6; color: var(--text-2); white-space: pre-wrap; }
.choices { display: grid; gap: 6px; margin-top: 10px; }
.choice { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 1px 10px; align-items: start; padding: 10px 12px; border-radius: var(--r-ctl); cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line); transition: background-color 160ms ease, box-shadow 160ms ease; position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .radio { grid-row: 1 / span 2; margin-top: 1px; }
.choice b { font-weight: 620; font-size: 14.5px; letter-spacing: -0.015em; }
.choice small { grid-column: 2; font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.choice .end { position: absolute; right: 12px; top: 10px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.choice:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--brand); background: var(--brand-soft); }
.choice:has(input:checked) .radio { box-shadow: inset 0 0 0 6px var(--brand); }
.choice:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.choice.off { opacity: .5; }
@media (hover: hover) and (pointer: fine) { .choice:hover { background: var(--surface-2); } .choice:has(input:checked):hover { background: var(--brand-soft); } }
.chipset { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chipset .chip { height: 36px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.mini label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin: 0 2px 5px; }
.range { width: 100%; margin: 14px 0 4px; height: 28px; background: transparent; -webkit-appearance: none; appearance: none; --p: 50%; }
.range::-webkit-slider-runnable-track { height: 6px; background: linear-gradient(90deg, var(--brand) var(--p), var(--surface-3) var(--p)); }
.range::-moz-range-track { height: 6px; background: var(--surface-3); }
.range::-moz-range-progress { height: 6px; background: var(--brand); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: oklch(99.5% 0 0); border: 0;
  box-shadow: 0 0 0 1px oklch(0% 0 0 / .08), 0 2px 6px oklch(0% 0 0 / .18); transition: transform 160ms var(--ease-out); }
.range::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: oklch(99.5% 0 0); border: 0; box-shadow: 0 0 0 1px oklch(0% 0 0 / .08), 0 2px 6px oklch(0% 0 0 / .18); }
.range:active::-webkit-slider-thumb { transform: scale(1.12); }
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--brand-soft), 0 0 0 1px var(--brand); }
.range-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); }
.gpu { grid-template-columns: 20px minmax(0, 1fr) auto; }
.gpu .price { grid-row: 1 / span 2; grid-column: 3; text-align: right; font-size: 14px; font-weight: 650; }
.gpu .price small { display: block; font-size: 12px; font-weight: 500; color: var(--text-3); }
.more-row { justify-self: start; }
.stock { font-weight: 600; }
.stock.hi { color: var(--ok); } .stock.lo { color: var(--run-text); } .stock.none { color: var(--bad); }
.toggle-row { display: flex; align-items: center; gap: 12px; }
.toggle-row .lbl { flex: 1; min-width: 0; }
.toggle-row.gap-top { margin-top: 8px; }
.opt-sub.pre { margin: 0; white-space: pre-wrap; }
.gpu-skel { height: 120px; margin-top: 10px; }
.toggle-row .lbl b { display: block; font-size: 14.5px; font-weight: 620; letter-spacing: -0.015em; }
.toggle-row .lbl small { display: block; font-size: 12.5px; color: var(--text-2); }
textarea.input { min-height: 84px; padding: 10px 14px; resize: vertical; line-height: 1.5; }

/* 펼침 묶음 (품질·실험) — 높이가 부드럽게 (지원 브라우저만, 아니면 바로) */
details.fold { interpolate-size: allow-keywords; }
details.fold::details-content { height: 0; overflow: clip; transition: height 280ms var(--ease-out), content-visibility 280ms allow-discrete; }
details.fold[open]::details-content { height: auto; }
details.fold summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 14px; font-weight: 650; font-size: 14.5px; letter-spacing: -0.015em; }
details.fold summary small { font-weight: 500; color: var(--text-3); font-size: 13px; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary .ic { margin-left: auto; color: var(--text-3); transition: transform 240ms var(--ease-out); }
details.fold[open] > summary .ic { transform: rotate(90deg); }
details.fold > .opt:first-of-type, details.fold > div:first-of-type { box-shadow: inset 0 1px 0 var(--line); }

/* 아래 고정: 예상 + 추가 버튼 */
.dock {                                                    /* 아래 탭 바로 위에 붙은 한 덩어리 (사이로 글이 비치지 않게 불투명) */
  position: sticky; bottom: calc(var(--tab-h) + var(--safe-b)); z-index: 10; margin: 18px -16px 0;
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--surface); box-shadow: 0 -1px 0 var(--line), 0 -12px 24px -12px oklch(25% 0 0 / .12);
}
.dock .what { flex: 1; min-width: 0; font-size: 13px; color: var(--text-2); line-height: 1.35; }
.dock .what b { display: block; color: var(--text); font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.02em; }
.dock .what b.est { white-space: normal; }                  /* 예상 줄은 접혀도 금액이 보이게 (예전: 320px·'대기열에 추가' 에서 '예상 7시간 13분 · $…' 로 잘림, 금액이 길면 더 넓은 화면도) */
.dock .what b.est [data-tween] { white-space: nowrap; }      /* '7시간 13분'·금액은 한 덩어리로 */
.dock .what .calc { opacity: .55; transition: opacity 200ms ease; }
/* 예상 안내 (서버 tip 문장마다 한 줄) + '3D 짐작만'·'빈자리' 안내: 단추 아래 한 줄 전체 · 주의는 주황 경고(먼저) · 길면 독 안에서만 넘김 */
.dock { flex-wrap: wrap; row-gap: 10px; }
.dock-notes { flex: 1 0 100%; margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; line-height: 1.4; color: var(--brand);
  max-height: 34vh; overflow-y: auto; overscroll-behavior: contain; }
.dock-notes li { display: flex; gap: 6px; align-items: flex-start; min-width: 0; }
.dock-notes li.warn { color: var(--run-text); }
.dock-notes .ic { width: 15px; height: 15px; margin-top: 1.5px; }
@media (min-width: 960px) { .dock { bottom: 16px; margin: 18px 0 0; box-shadow: inset 0 0 0 1px var(--line), var(--shadow-3); } }

/* ---------- 설정 ---------- */
.group { background: var(--surface); border-radius: var(--r-box); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1); overflow: hidden; }
.group > * + * { box-shadow: inset 0 1px 0 var(--line); }
.row-set { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 56px; }
.row-set .lbl { flex: 1; min-width: 0; }
.row-set .lbl b { display: block; font-weight: 620; font-size: 14.5px; letter-spacing: -0.015em; }
.row-set .lbl small { display: block; color: var(--text-2); font-size: 12.5px; margin-top: 1px; word-break: break-word; }
.row-set .val { color: var(--text-2); font-size: 14px; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.row-col { padding: 13px 14px; }
.row-col .lbl b { display: block; font-weight: 620; font-size: 14.5px; margin-bottom: 8px; }
.stepper { display: inline-flex; align-items: center; border-radius: var(--r-ctl); box-shadow: inset 0 0 0 1px var(--line-strong); overflow: hidden; background: var(--surface); }
.stepper button { width: 42px; height: 38px; border: 0; background: transparent; cursor: pointer; font-size: 18px; color: var(--text); transition: background-color 150ms ease, transform 120ms var(--ease-out); }
.stepper button:active { background: var(--surface-2); transform: scale(.94); }
.stepper button[disabled] { color: var(--text-3); cursor: default; transform: none; }
.stepper output { min-width: 32px; text-align: center; font-weight: 650; }
@media (pointer: coarse) { .stepper button { height: 44px; width: 46px; } }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line); transition: background-color 220ms ease; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; background: oklch(99.5% 0 0);
  box-shadow: 0 1px 2px oklch(0% 0 0 / .2), 0 2px 6px oklch(0% 0 0 / .08); transition: transform 260ms var(--ease-out), width 160ms var(--ease-out); }
.switch input:active + span::after { width: 28px; }
.switch input:checked + span { background: var(--brand); box-shadow: none; }
.switch input:checked + span::after { background: var(--on-brand); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:checked:active + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.field { display: block; }
.field + .field { margin-top: 12px; }
.field label, .field .lab { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0 2px 6px; }
.input, select.input {
  width: 100%; min-height: 46px; padding: 0 14px; border-radius: var(--r-ctl); border: 0; box-shadow: inset 0 0 0 1px var(--line-strong);
  background: var(--surface); font-size: 16px; transition: box-shadow 160ms ease; appearance: none; -webkit-appearance: none;
}
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--ink), inset 0 -2px 0 var(--signal); }     /* 초점 = 먹 테두리 + 지금 입력하는 곳 빨간 밑줄 */
.input::placeholder { color: var(--text-3); }
.inline { display: flex; gap: 8px; }
.inline .input { flex: 1; min-width: 0; }
.hint { font-size: 12.5px; color: var(--text-2); margin: 6px 2px 0; }
.hint.flush { margin-top: 0; }
.field.gap-top { margin-top: 12px; }
.inline.gap-top { margin-top: 10px; }
.steps a { font-weight: 600; }
.err { font-size: 13.5px; color: var(--bad); margin: 10px 2px 0; min-height: 1em; }
/* 입력 오류: 칸은 빨간 테두리, 이유는 칸 아래 (예상·시작은 고칠 때까지 막힘) · 방향 안내 · 막힌 이유 · 드롭박스로 옮겨짐 */
.input[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--bad), 0 0 0 3px var(--bad-soft); }
.field-err { display: flex; gap: 6px; align-items: flex-start; margin: 8px 2px 0; font-size: 13px; line-height: 1.45; color: var(--bad); }
.field-err .ic, .opt-sub.hint-warn .ic { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.opt-sub.hint-warn { display: flex; gap: 6px; align-items: flex-start; color: var(--run-text); margin-top: 4px; }
.dock .what .bad-txt, .bad-txt { display: block; color: var(--bad); }
.inline-link { font-weight: 600; text-decoration: underline; white-space: nowrap; }
@media (pointer: coarse) { .inline-link { display: inline-block; padding: 12px 4px; margin: -12px -4px; } }   /* 글 줄 높이는 그대로, 누르는 곳만 44px */
.result-group .fblock > .list { margin-bottom: 8px; }                     /* 드롭박스에만 있는 파일 줄 사이 */
.moved { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 14px; font-size: 13px; line-height: 1.5; color: var(--text);
  background: var(--ok-soft); box-shadow: inset 0 1px 0 var(--line); }
.moved .ic { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--ok); }
.bal.stale { background: var(--surface-2); box-shadow: none; outline: 1px dashed var(--line-strong); outline-offset: -1px; }   /* 예전 조회값: 점선 (적음 경고 빨강은 그대로) */
.bal.stale:not(.low) { color: var(--text-3); }
.nav-side .cost.stale { flex-wrap: wrap; }
.nav-side .cost.stale:not(.low) b { color: var(--text-3); }
.stale-note { flex-basis: 100%; font-size: 12px; color: var(--text-3); }
.cmd { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 6px 6px 12px; border-radius: var(--r-ctl); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.cmd code { flex: 1; min-width: 0; font: 12.5px/1.5 var(--mono); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.steps { margin: 10px 0 0; padding-left: 20px; font-size: 13px; color: var(--text-2); }
.steps li + li { margin-top: 3px; }
.events { margin: 0; max-height: 320px; overflow: auto; padding: 12px 14px; font: 12px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; color: var(--text-2); background: var(--surface-2); }

/* ---------- 로그인·처음 설정 ---------- */
.gate { min-height: calc(100dvh - var(--top-h) - 60px); display: grid; place-items: center; padding: 20px 0; }
.gate-card { width: 100%; max-width: 420px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-3); padding: 28px 22px; animation: rise 500ms var(--ease-out) both; }
.gate-card h1 { margin: 0 0 6px; font-size: 24px; font-weight: 680; letter-spacing: -0.04em; }
.gate-card .gate-logo { margin: 2px 0 20px; line-height: 0; }
.gate-logo .lockup { --lg: 40px; }
/* 로그인 화면 뒤에 큰 로고를 깔지 않음 (로고는 한 화면에 한 번, 카드 위 원래 모양 그대로 · 2026-10-24 사용자 '로고플레이 빼기') */
.gate-card > p { margin: 0 0 20px; color: var(--text-2); font-size: 14.5px; }
body.gated .nav, body.gated .bulk { display: none; }
body.gated .topbar .brand { visibility: hidden; }          /* 로그인·처음 설정 카드에 큰 로고가 있어 위 막대 로고는 숨김 (자리는 그대로) */
body.gated .view { padding-bottom: 32px; }
@media (min-width: 960px) { body.gated .app { grid-template-columns: 1fr; } body.gated .topbar { display: flex; } body.gated .view { margin: 0 auto; } }

/* ---------- 알림·시트·뷰어 ---------- */
.toasts { position: fixed; z-index: 80; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--safe-b) + 14px + var(--dock-h, 0px)); display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none;
  transition: bottom 200ms var(--ease-out); }    /* --dock-h: 만들기·테스트 아래 독 높이 (app.js watchDock) — 알림이 시작 단추를 가리지 않게 */
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--ink); color: var(--on-ink); font-size: 14px; font-weight: 560;
  clip-path: var(--cut); pointer-events: auto; transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out), filter 260ms var(--ease-out); }
@starting-style { .toast { opacity: 0; transform: translateY(12px) scale(.98); filter: blur(4px); } }
.toast.out { opacity: 0; transform: translateY(6px) scale(.98); filter: blur(2px); transition-duration: 160ms; }
.toast.bad { background: var(--bad); color: oklch(99% 0.003 27); }
.toast .ic { width: 18px; height: 18px; margin-top: 1px; }
body.selecting .toasts { bottom: calc(76px + var(--safe-b) + var(--dock-h, 0px)); }
@media (min-width: 960px) { .toasts { bottom: calc(24px + var(--dock-h, 0px)); left: calc(50% + var(--side-w) / 2); } }
/* 전체 화면 덮개(퀼트 시점 보기 z 75 · 3D 보정 z 76) 위에도 알림이 보이게 z 80 (예전 60 — 덮개 뒤에 가려져 [이대로 만들기] 거절 이유가 안 보였음).
   덮개엔 아래 탭·독이 없어 가운데 아래로, 3D 보정은 아래 [이대로 만들기] 줄 위로 */
html.qv-on .toasts, html.ed-on .toasts { left: 50%; bottom: calc(16px + var(--safe-b)); }
html.ed-on .toasts { bottom: calc(76px + var(--safe-b)); }
@media (min-width: 960px) { html.qv-on .toasts, html.ed-on .toasts { left: calc(100% - 180px); width: 336px; } }   /* 넓은 화면: 오른쪽 조작 칸(360px) 아래 — 무대 그림·칩을 가리지 않게 */
@media (max-width: 380px) { html.ed-on .toasts { bottom: calc(100px + var(--safe-b)); } }                      /* 좁은 화면: 아래 줄이 두 줄 (.ed-bar) */
@media (max-width: 640px) { html.ed-on.ed-alert .toasts { bottom: calc(136px + var(--safe-b)); } }              /* 저장 실패 줄이 단추 위에 올라오면 (.ed-bar.alert) 알림도 그만큼 위로 */

.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 520px; max-height: 88dvh; background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-3); overflow: auto;
  transform: translateY(100%); transition: transform 360ms var(--ease-drawer), overlay 360ms allow-discrete, display 360ms allow-discrete; }
.sheet[open] { transform: none; }
@starting-style { .sheet[open] { transform: translateY(100%); } }
.sheet::backdrop { background: oklch(14% 0 0 / 0); transition: background-color 300ms ease, overlay 300ms allow-discrete, display 300ms allow-discrete; }
.sheet[open]::backdrop { background: oklch(14% 0 0 / .5); }
@starting-style { .sheet[open]::backdrop { background: oklch(14% 0 0 / 0); } }
.sheet-grip { width: 36px; height: 3px; background: var(--line-strong); margin: 8px auto 0; }
.sheet-body { padding: 18px 20px calc(18px + var(--safe-b)); }
.sheet-body h3 { margin: 0 0 6px; font-size: 18px; font-weight: 680; letter-spacing: -0.035em; }
.sheet-body p { margin: 0 0 18px; color: var(--text-2); font-size: 14.5px; white-space: pre-wrap; }
.sheet-actions { display: grid; gap: 8px; }
.sheet-actions [data-v="ok"] { order: -1; }
@media (min-width: 600px) {
  .sheet { margin: auto; transform: scale(.96); opacity: 0; transition: transform 220ms var(--ease-out), opacity 180ms ease, overlay 220ms allow-discrete, display 220ms allow-discrete; }
  .sheet[open] { transform: none; opacity: 1; }
  @starting-style { .sheet[open] { transform: scale(.96); opacity: 0; } }
  .sheet-grip { display: none; }
  .sheet-actions { grid-auto-flow: column; grid-auto-columns: 1fr; }
  .sheet-actions [data-v="ok"] { order: 0; }
}

.viewer { position: fixed; inset: 0; z-index: 70; background: oklch(9% 0 0 / 0.96); overflow: auto; overscroll-behavior: contain; animation: fade-in 200ms ease both; }
.viewer img { display: block; max-width: none; margin: auto; }
.viewer.fit img { max-width: 100%; max-height: 100dvh; object-fit: contain; position: absolute; inset: 0; }
.viewer-bar { position: fixed; top: 0; left: 0; right: 0; display: flex; gap: 8px; justify-content: flex-end; padding: calc(10px + var(--safe-t)) 12px 10px; z-index: 1; }
.viewer-bar button, .viewer-bar a { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: var(--r-ctl); border: 0; background: oklch(26% 0 0 / 0.88); color: oklch(97% 0 0); font-weight: 600; font-size: 14px; cursor: pointer; }
.viewer-bar a:hover { text-decoration: none; }
@keyframes fade-in { from { opacity: 0; } }

.skeleton { border-radius: var(--r-box); background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.job-skel { height: 82px; margin-bottom: 8px; }
.detail-skel { height: 230px; margin-top: 14px; }
.pick-skel { height: 168px; }

/* ---------- 화면 넘김 (View Transitions — 지원 브라우저만) ---------- */
::view-transition-group(*) { animation-duration: 300ms; animation-timing-function: var(--ease-out); }
::view-transition-old(main), ::view-transition-new(main) { animation-duration: 200ms; }
html[data-vt="tab"]::view-transition-old(main) { animation: vt-fade-out 120ms ease both; }
html[data-vt="tab"]::view-transition-new(main) { animation: vt-fade-in 220ms var(--ease-out) both; }
html[data-vt="push"]::view-transition-old(main) { animation: vt-push-out 240ms var(--ease-out) both; }
html[data-vt="push"]::view-transition-new(main) { animation: vt-push-in 300ms var(--ease-out) both; }
html[data-vt="pop"]::view-transition-old(main) { animation: vt-pop-out 200ms var(--ease-out) both; }
html[data-vt="pop"]::view-transition-new(main) { animation: vt-pop-in 280ms var(--ease-out) both; }
::view-transition-group(vt-title), ::view-transition-group(vt-bar), ::view-transition-group(vt-glyph) { animation-duration: 340ms; }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes vt-push-out { to { opacity: 0; transform: translateX(-24px); } }
@keyframes vt-push-in { from { opacity: 0; transform: translateX(28px); } }
@keyframes vt-pop-out { to { opacity: 0; transform: translateX(28px); } }
@keyframes vt-pop-in { from { opacity: 0; transform: translateX(-20px); } }

/* 움직임 줄이기: 위치 움직임은 없애고, 상태를 알리는 색·투명도만 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-property: opacity, color, background-color, box-shadow !important; transition-duration: 120ms !important; }
  .btn:active, .icon-btn:active, .chip:active { transform: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* 퀼트 시점 보기 (ui/quilt.js): 결과 퀼트를 한 시점씩 크게 — 무대는 어둡게(그림만), 조작은 캔버스 카드. 넓은 화면은 무대 | 조작 두 칸 */
html.qv-on { overflow: hidden; }
.qv[hidden] { display: none; }
.qv { position: fixed; inset: 0; z-index: 75; background: var(--bg); display: flex; flex-direction: column; animation: qv-in 220ms var(--ease-out) both; }
@keyframes qv-in { from { opacity: 0; transform: translateY(10px); } }
.qv-top { flex: none; display: flex; align-items: center; gap: 8px; padding: calc(6px + var(--safe-t)) 8px 6px; background: var(--surface); box-shadow: inset 0 -1px 0 var(--line); }
.qv-btn { flex: none; width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--text); cursor: pointer; transition: transform 160ms var(--ease-out); }
.qv-btn:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .qv-btn:hover { background: var(--surface-2); } }
.qv-title { min-width: 0; flex: 1; display: grid; line-height: 1.3; }
.qv-title b { font-size: 14.5px; font-weight: 650; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qv-sub { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qv-tools { display: flex; gap: 2px; }
.qv-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.qv-stage { position: sticky; top: 0; z-index: 1; height: min(52svh, 640px); min-height: 240px; background: oklch(13% 0 0); display: grid; place-items: center; overflow: hidden;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; }   /* 휴대폰: 아래 조작을 내려도 그림은 위에 그대로 */
.qv-stage #qvCanvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; cursor: ew-resize; touch-action: pan-y; }   /* 무대에 맞춰 (작은 타일은 키움) */
.qv-stage #qvCanvas:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.qv-stage:fullscreen { height: 100dvh; width: 100vw; }
.qv-read, .qv-hint { position: absolute; padding: 5px 11px; background: oklch(17% 0 0 / .74); color: oklch(97% 0 0 / .92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); pointer-events: none; }
.qv-read { top: 10px; left: 10px; font-size: 12.5px; }
.qv-read b { font-weight: 650; font-size: 14px; color: oklch(99% 0 0); }
.qv-read span { opacity: .66; }
.qv-hint { bottom: 12px; left: 50%; transform: translateX(-50%); font-size: 12px; white-space: nowrap; transition: opacity 400ms ease; }
.qv-hint.gone { opacity: 0; }
.qv-msg { position: absolute; left: 12px; right: 12px; bottom: 12px; margin: 0 auto; max-width: 520px; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
  border-radius: var(--r-box); background: var(--surface); color: var(--text); box-shadow: var(--shadow-3); font-size: 13.5px; line-height: 1.55; }
.qv-msg[hidden] { display: none; }
.qv-msg.bad { box-shadow: inset 0 0 0 1px var(--bad), var(--shadow-3); }
.qv-msg .ic { flex: none; width: 18px; height: 18px; color: var(--bad); margin-top: 1px; }
.qv-msg .inline-link { margin-left: 8px; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; font: inherit; font-weight: 600; text-decoration: underline; }
.qv-spin { flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--brand); animation: spin .8s linear infinite; }
.qv-panel { position: relative; z-index: 0; padding: 12px 12px calc(16px + var(--safe-b)); display: grid; gap: 10px; align-content: start; }   /* 쌓임 맥락: 안쪽의 z-index 단추(.seg)가 휴대폰에서 위로 올린 칸이 sticky 무대 그림 위에 비치지 않게 */
.qv-card { background: var(--surface); border-radius: var(--r-box); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1); padding: 12px 14px; }
.qv-card[hidden] { display: none; }
details.qv-card { padding: 0; }
.qv-range-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--text-2); }
.qv-range-head output { color: var(--text); font-weight: 650; }
.qv-range { display: block; width: 100%; height: 32px; margin: 2px 0; accent-color: var(--brand); cursor: pointer; }
.qv-ticks { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); margin-top: -4px; }
.qv-actions { display: flex; gap: 6px; margin-top: 10px; }
.qv-grow { flex: 1; }
.qv-sq { flex: none; width: 44px; padding: 0; }
.qv-next .ic { transform: scaleX(-1); }
#qvSweep.on { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.qv-vline { display: flex; align-items: center; gap: 10px; }
.qv-time { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.qv-note { font-size: 12px; color: var(--text-3); margin: 6px 0 0; line-height: 1.55; }
.qv-card-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 650; margin-bottom: 8px; }
.qv-card-head .faint { font-weight: 500; font-size: 12px; }
.qv-map { overflow: hidden; background: var(--surface-2); display: flex; justify-content: center; line-height: 0; }
.qv-map canvas { max-width: 100%; max-height: 200px; width: auto; height: auto; cursor: crosshair; }
.qv-grid summary b { font-weight: 650; }
.qv-grid #qvFrom { font-weight: 500; font-size: 12.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qv-grid #qvFrom.warn { color: var(--run-text); }
.qv-grid-body { padding: 0 14px 14px; display: grid; gap: 10px; }
.qv-cr { display: grid; grid-template-columns: 1fr 20px 1fr; gap: 8px; align-items: end; }
.qv-cr label span, .qv-field > span { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 5px; }
.qv-times { text-align: center; color: var(--text-3); padding-bottom: 12px; }
.qv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.qv-chips:empty { display: none; }
.qv-chips .chip .ic { width: 15px; height: 15px; }
.qv-check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 13.5px; cursor: pointer; }
.qv-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.qv-src { position: fixed; left: -4px; top: -4px; width: 2px; height: 2px; opacity: 0; pointer-events: none; }
.qv-row { display: flex; justify-content: flex-end; padding: 8px 2px 0; }
.qv-open .faint { font-weight: 550; }
@media (max-width: 420px) { .figure figcaption .size { display: none; } .figure figcaption .qv-open { margin-left: auto; } }
@media (min-width: 960px) {
  .qv-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; overflow: hidden; }
  .qv-stage { position: relative; height: auto; min-height: 0; }
  .qv-panel { overflow: auto; padding: 14px 16px; overscroll-behavior: contain; }
}
@media (prefers-reduced-motion: reduce) { .qv { animation: none; } .qv-hint { transition: none; } }

/* ---------- 3D 보정 화면 (ui/edit.js) — 퀼트 시점 보기와 같은 틀 (qv-*) + 고르기·앞뒤·렌즈·따라가기 ---------- */
html.ed-on { overflow: hidden; }
.ed[hidden] { display: none; }
.ed { position: fixed; inset: 0; z-index: 76; background: var(--bg); display: flex; flex-direction: column; animation: qv-in 220ms var(--ease-out) both; }
.ed-undo .ic { transform: scaleX(-1); }
.qv-btn:disabled { opacity: .35; cursor: default; }
.ed-stage { display: flex; flex-direction: column; place-items: stretch; height: min(58svh, 660px); }   /* 무대 = 그림 칸 + 안내 줄 + 도구 칸 */
.ed-view { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.ed-view #edCanvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: grab; touch-action: none;   /* 손가락 둘 = 그림 확대 (화면 전체 확대·밀기 대신) */
  -webkit-touch-callout: none; user-select: none; }
.ed-view.painting #edCanvas, .ed-view.aim #edCanvas { cursor: crosshair; }
.ed-view #edCanvas:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.ed-brush[hidden] { display: none; }
.ed-brush { position: absolute; z-index: 2; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; pointer-events: none;
  background: oklch(100% 0 0 / .2); box-shadow: 0 0 0 2px var(--c, oklch(99% 0 0)), 0 0 0 4px oklch(0% 0 0 / .45); }   /* 붓 자리 (물체 색 테두리 · 붓은 실제 굵기) */
.ed-brush.sub { background: oklch(0% 0 0 / .3); }
.ed-loupe[hidden] { display: none; }
.ed-loupe { position: absolute; z-index: 3; width: 132px; height: 132px; margin: -66px 0 0 -66px; border-radius: 50%; pointer-events: none;   /* 손잡이를 끄는 동안 손가락 밑을 위에 크게 */
  box-shadow: 0 0 0 2px oklch(99% 0 0 / .92), 0 8px 22px oklch(0% 0 0 / .5); background: oklch(13% 0 0); }
.ed-read { top: 10px; left: auto; right: 10px; }
.ed-zoom[hidden] { display: none; }
.ed-zoom { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; max-width: calc(100% - 120px); pointer-events: none; }
.ed-zchip, .ed-zinfo { display: inline-flex; align-items: center; gap: 6px; }
.ed-zchip .ic { width: 15px; height: 15px; }
.ed-zinfo { cursor: default; }
.ed-zinfo .qv-spin, .ed-ctx .qv-spin { margin: 0; width: 14px; height: 14px; border-color: oklch(100% 0 0 / .25); border-top-color: oklch(99% 0 0); }
.ed-stage-btns { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.ed-chip { min-height: 34px; padding: 0 12px; border: 0; background: oklch(17% 0 0 / .78); color: oklch(97% 0 0 / .9);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font: 600 12.5px/1 var(--font); cursor: pointer; -webkit-touch-callout: none; user-select: none;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out); }
.ed-chip:active { transform: scale(.97); }
.ed-chip[aria-pressed="true"], .ed-chip.on { background: oklch(99% 0 0); color: oklch(18% 0 0); }
@media (pointer: coarse) { .ed-chip { min-height: 44px; } }
.ed-zoom button { pointer-events: auto; }
/* 도구 칸 위 안내 줄: 도구마다 할 일·고를 것 (붓 굵기·선 굵기·찾기 색 뜻·찍기) — 그림 밖이라 손잡이·후보를 가리지 않음 */
.ed-ctx { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 6px; min-height: 46px; padding: 4px 8px;
  background: oklch(17% 0 0); box-shadow: inset 0 1px 0 oklch(100% 0 0 / .07); color: oklch(97% 0 0 / .86); font: 500 12.5px/1.35 var(--font); text-align: center; }
.ed-ctx > span:not(.ed-cseg):not(.qv-spin) { padding: 0 6px; }
.ed-ctx > .qv-spin { margin-left: 6px; }
.ed-ctx .ed-ctx-s { color: oklch(97% 0 0 / .55); }
@media (max-width: 599px) { .ed-ctx .ed-ctx-s { display: none; } }   /* 휴대폰: 한 줄로 (보조 안내는 알림·물체 칸에) */
@media (pointer: coarse) { .ed-ctx { min-height: 56px; } }   /* 나눔 단추(44px + 테두리 4px)가 들어간 줄과 같은 높이 — 도구를 바꾸거나 올가미를 찍기 시작할 때 그림이 4px 흔들리지 않게 */
.ed-cseg { display: inline-flex; gap: 2px; padding: 2px; background: oklch(0% 0 0 / .3); }
.ed-cbtn { min-height: 30px; min-width: 30px; padding: 0 10px; border: 0; background: oklch(99% 0 0 / .12); color: inherit; font: 600 12.5px/1 var(--font);
  cursor: pointer; transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out); }
.ed-cseg .ed-cbtn { background: transparent; }
.ed-cbtn[aria-pressed="true"], .ed-cseg .ed-cbtn[aria-pressed="true"] { background: oklch(99% 0 0); color: oklch(18% 0 0); }
.ed-cbtn:active { transform: scale(.97); }
.ed-cbtn:disabled { opacity: .4; cursor: default; transform: none; }
@media (pointer: coarse) { .ed-cbtn { min-height: 44px; min-width: 44px; } }
/* 올가미 그리는 중: 꼭짓점 수 · [점 하나 지우기] [닫기] [취소] — 휴대폰은 한 줄에 들게 더하기|빼기를 숨기고 빼기면 꼬리표 (넓은 화면은 나눔 단추가 보여 줌) */
.ed-lcount { padding: 0 4px; font-weight: 600; white-space: nowrap; }
.ed-ltag { display: none; margin-right: 3px; padding: 2px 7px; background: oklch(0% 0 0 / .45); box-shadow: inset 0 0 0 1px oklch(100% 0 0 / .5); font: inherit; font-style: normal; }
@media (max-width: 599px) { .ed-ctx .ed-lseg { display: none; } .ed-ltag { display: inline-block; } }
@media (max-width: 359px) { .ed-ctx { gap: 4px 3px; padding: 4px; } .ed-cbtn { padding: 0 7px; } .ed-lcount { padding: 0 2px; } }   /* 320px: 빼기 꼬리표가 붙어도 한 줄 */
.ed-key { display: inline-flex; align-items: center; gap: 6px; }
.ed-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; }
.ed-dot.dep { background: rgb(255 93 115); }                  /* 찾기 후보 색 = 무대 그림 위 선 색 (edit.js edVectors) */
.ed-dot.thin { background: rgb(255 201 77); }
/* 아래 도구 칸: 보기 · 더하기 · 빼기 · 잇기 · 붓 · 찾기 (예전 꾸러미는 앞 셋만) */
.ed-dock { flex: none; position: relative; z-index: 2; display: flex; justify-content: center; gap: 2px; padding: 0 6px 5px; background: oklch(17% 0 0); }
.ed-dock button { flex: 1 1 0; max-width: 96px; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 50px; padding: 4px 2px; border: 0;
  background: transparent; color: oklch(97% 0 0 / .62); font: 600 11.5px/1.1 var(--font); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out); }
.ed-dock button[hidden] { display: none; }
.ed-dock button .ic { width: 20px; height: 20px; }
.ed-dock button[aria-pressed="true"] { background: oklch(99% 0 0 / .13); color: oklch(99% 0 0); }
.ed-dock button:active { transform: scale(.97); }
.ed-dock button:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
@media (hover: hover) { .ed-dock button:hover { color: oklch(99% 0 0); } }
@media (max-width: 359px) { .ed-dock { gap: 1px; padding: 0 2px 5px; } }   /* 좁은 휴대폰(320px): 도구 7칸도 칸마다 44px 너비 */
.ed-panel { padding-bottom: 16px; }
.ed-card .qv-range-head .ed-src { display: inline-block; margin-left: 6px; padding: 1px 8px; background: var(--brand-soft); color: var(--brand); font-size: 11.5px; font-weight: 650; }
.ed-empty { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--text-2); line-height: 1.6; }
.ed-empty li + li { margin-top: 2px; }
.ed-objs { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-obj { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 12px 4px 8px; border: 0; border-radius: var(--r-ctl); background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font: 500 13px/1.25 var(--font); cursor: pointer; text-align: left;
  transition: box-shadow 160ms ease, background-color 160ms ease, transform 160ms var(--ease-out); }
.ed-obj:active { transform: scale(.97); }
.ed-obj i { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--brand)); }
.ed-obj b { font-weight: 650; }
.ed-obj small { display: block; color: var(--text-3); font-size: 11.5px; }
.ed-obj.on { background: var(--surface); box-shadow: inset 0 0 0 2px var(--c, var(--brand)); }
.ed-obj span { display: grid; }
.ed-new { color: var(--text-2); }
.ed-new .ic { width: 15px; height: 15px; }
.ed-active { margin-top: 12px; padding: 10px 0 0 12px; border-left: 3px solid var(--c, var(--brand)); }
.ed-ahead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; font-size: 13.5px; }
.ed-ahead .faint { font-size: 12px; text-align: right; }
.ed-dmode { margin-bottom: 10px; }
.ed-dmode button, .ed-amp button { font-size: 12.5px; }
.ed-dmode button:disabled { opacity: .42; cursor: default; }
/* 점구름 고르기 (Pi3X · MoGe-3) + 범위 넓히기 (DEV 기획 2026-10-23_depth_source_ui_plan): 없는 점구름은 회색 · 이유는 아래 한 줄 */
.ed-srcseg button:disabled { opacity: .42; cursor: default; }
.ed-srcseg + .ed-warn { margin-top: 8px; }
.ed-gainhead { margin-top: 14px; }
.ed-ask { margin: 2px 0 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.ed-end { display: grid; gap: 6px; margin-bottom: 10px; font-size: 12.5px; color: var(--text-2); }
.ed-cdot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--brand)); }
.ed-active .qv-chips + .qv-range-head, .ed-end + .qv-range-head { margin-top: 6px; }
.ed-amp { flex: 1; }
.ed-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; font-size: 13px; color: var(--text-2); }   /* 좁은 화면(320px)에서 나눔 단추가 안 들어가면 다음 줄로 (예전: 9px 넘침) */
.ed-row > span { flex: none; }
.ed-row-end { justify-content: flex-end; margin-top: 4px; }
/* 원본 살리기 (실험): 깊이 칸 아래 한 줄 스위치 · 넓은 물체 알림 · 목록의 '원본' 표시 */
.ed-keep { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.ed-keep .toggle-row .lbl b { font-size: 13.5px; }
.ed-keep .toggle-row .lbl small { margin-top: 2px; font-size: 12px; line-height: 1.5; color: var(--text-3); }
.ed-keep .toggle-row .lbl .ed-keep-raw { display: flex; gap: 5px; align-items: center; color: var(--run-text); font-weight: 600; }
.ed-keep-raw .ic { width: 14px; height: 14px; flex: none; }
.ed-keep .switch input:disabled { cursor: default; }
.ed-keep .switch input:disabled + span { opacity: .45; }
.ed-warn { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 8px 10px; border-radius: var(--r-ctl); background: var(--run-soft); color: var(--text); font-size: 12.5px; line-height: 1.5; }
.ed-warn .ic { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--run-text); }
.ed-ktag { display: inline-block; margin-left: 6px; padding: 0 6px; background: var(--brand-soft); color: var(--brand); font: 650 10.5px/16px var(--font); vertical-align: 1px; }
.ed-levels { flex: 1; }
.ed-levels button { min-height: 34px; font-size: 12.5px; }
@media (pointer: coarse) { .ed-obj, .ed-levels button { min-height: 44px; } }   /* 손가락 44px (위 규칙들 뒤에 둬야 이김 — 예전 물체 40px·넓이 34px) */
.ed-topv { overflow: hidden; line-height: 0; background: var(--surface-2); }
.ed-topv canvas { width: 100%; height: auto; display: block; touch-action: none; cursor: ns-resize; -webkit-touch-callout: none; user-select: none; }
.ed-topv.pt canvas { cursor: crosshair; }                    /* 점 조정: 누르기·네모 */
/* 첫 프레임 사진 (AI 가 지어낸 퀼트의 한 시점 — 편집 미리보기 '입체 모형'과 다른 것): 끌면 시점 · 누르면 크게. 세로로 끄는 건 패널 내리기 */
.ed-photov { position: relative; display: grid; place-items: center; min-height: 120px; line-height: 0; background: oklch(13% 0 0); }
.ed-photov canvas { display: block; max-width: 100%; touch-action: pan-y; cursor: ew-resize; -webkit-touch-callout: none; user-select: none; }
.ed-ph-skel { width: 100%; height: 180px; border-radius: 0; }
.ed-phband { position: absolute; left: 0; right: 0; top: 0; padding: 7px 12px; line-height: 1.4; font-size: 12.5px; font-weight: 600; color: oklch(99% 0 0);
  background: oklch(17% 0 0 / .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); pointer-events: none; }   /* 사진 위 흐린 띠: 고친 뒤 다시 보기 전 · 다시 만드는 중 */
.ed-phband.run { background: oklch(30% 0.08 70 / .82); }
.ed-phbig { background: oklch(13% 0 0); }
.ed-phbig canvas { cursor: ew-resize; }
.ed-read .ed-what { opacity: .8; }                            /* 무대 = '입체 모형' 미리보기 (사진 판 '생성된 첫 프레임 (AI)' 과 이름으로 가름) */
/* 위에서 본 모습: 크게 보기 단추 · 점 조정 도구줄 (작은 칸과 크게 보기에 같은 것) */
.qv-card-head.ed-tophead { align-items: center; }
.ed-bigbtn { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; margin: -6px -6px -6px 0; padding: 0 8px; border: 0; background: transparent;
  color: var(--text-2); font: 600 12.5px/1 var(--font); cursor: pointer; transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out); }
.ed-bigbtn .ic { width: 16px; height: 16px; }
.ed-bigbtn:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .ed-bigbtn:hover { background: var(--surface-2); color: var(--text); } }
@media (pointer: coarse) { .ed-bigbtn { min-height: 44px; margin: -12px -8px -12px 0; } }
.ed-ptbar { margin-top: 8px; }
.ed-pthint { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.ed-pt { display: grid; gap: 8px; }
.ed-ptrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; color: var(--text-2); }
.ed-ptrow > b { color: var(--text); font-weight: 650; }
.ed-ptobj { justify-content: space-between; flex-wrap: nowrap; }
.ed-ptobj > span { min-width: 0; }
.ed-ptobj b { color: var(--text); font-weight: 650; }
.ed-ptobj .btn { flex: none; }
.ed-ptsp { flex: 1; }
.ed-ptlab { flex: none; min-width: 58px; font-size: 12.5px; }
.ed-ptgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ed-ptgroup { flex: 1; display: flex; gap: 4px; min-width: 0; }
.ed-ptgroup .btn { flex: 1; padding: 0 6px; }
.ed-pt .btn-sm { font-size: 13px; }
.ed-pt .chip .ic { width: 15px; height: 15px; }
.ed-ptwait { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: var(--r-ctl); background: var(--brand-soft); color: var(--text); font-size: 13px; font-weight: 600; }
.ed-ptwait > span { flex: 1; display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.ed-ptwait .ic { width: 16px; height: 16px; flex: none; color: var(--brand); }
/* 좌우 시야각: 3D 짐작 각도 + 되돌리기 · 그 각도에서 실제로 움직이는 양 */
.ed-abase { justify-content: space-between; margin-top: 2px; font-size: 12.5px; color: var(--text-3); }
.ed-motion { margin-top: 8px; padding: 9px 11px; border-radius: var(--r-ctl); background: var(--surface-2); font-size: 12.5px; line-height: 1.55; color: var(--text-2); }
.ed-motion:empty { display: none; }
.ed-motion p { margin: 0; }
.ed-motion b { color: var(--text); font-weight: 650; }
.ed-motion .nw { white-space: nowrap; }                    /* '이웃 뷰 사이 3.7px' 처럼 이름·값이 한 덩어리로 줄바꿈 */
.ed-motion .ed-mnote { margin-top: 3px; font-size: 12px; color: var(--text-3); }
/* 크게 보기: 편집 화면 위를 덮는 전체 화면 (휴대폰 = 그림 위 · 도구 아래, 넓은 화면 = 그림 | 도구) */
.ed-big[hidden] { display: none; }
.ed-big { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; background: var(--bg); animation: qv-in 200ms var(--ease-out) both; }
.ed-big-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ed-big-view { position: relative; flex: 1; min-height: 200px; background: var(--surface-2); overflow: hidden; }
.ed-big-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: ns-resize; -webkit-touch-callout: none; user-select: none; }
.ed-big-view.pt canvas { cursor: crosshair; }
.ed-big-zoom[hidden] { display: none; }
.ed-big-zoom { position: absolute; top: 10px; left: 10px; z-index: 1; }
.ed-big-side { flex: none; max-height: 48svh; overflow: auto; overscroll-behavior: contain; padding: 10px 12px calc(12px + var(--safe-b)); background: var(--surface); box-shadow: inset 0 1px 0 var(--line); }
.ed-big-side .ed-ptbar { margin-top: 0; }
@media (min-width: 960px) {
  .ed-big-body { flex-direction: row; }
  .ed-big-side { width: 340px; max-height: none; padding: 16px; box-shadow: inset 1px 0 0 var(--line); }
}
@media (prefers-reduced-motion: reduce) { .ed-big { animation: none; } }
.ed-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ed-thumbs figure { margin: 0; }
.ed-thumbs canvas { width: 100%; height: auto; display: block; background: var(--surface-2); }
.ed-thumbs figcaption { font-size: 11.5px; color: var(--text-3); margin-top: 3px; text-align: center; }
.ed-thumb-skel { grid-column: 1 / -1; height: 72px; }
.ed-lens-chips { margin-top: 2px; }
.ed-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 12px calc(10px + var(--safe-b)); background: var(--surface); box-shadow: inset 0 1px 0 var(--line); }
.ed-save { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-save.bad { color: var(--bad); }
.ed-save.act { display: flex; align-items: baseline; gap: 8px; overflow: visible; }   /* 저장 실패·다른 화면 저장: 글은 줄이고 단추는 늘 보이게 (단추 누르는 곳이 잘리지 않게 overflow 풂) */
.ed-save.act > span { min-width: 0; overflow: hidden; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }   /* 이유는 두 줄까지 */
@media (max-width: 640px) { .ed-bar.alert { flex-wrap: wrap; row-gap: 6px; justify-content: flex-end; } .ed-bar.alert .ed-save { flex-basis: 100%; } }   /* 저장 실패·다른 화면 저장: 단추 위 한 줄 전체 (예전 390px 에서 '저장 … 다시 저장' 으로 잘림) */
.ed-save .inline-link { flex: none; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; font: inherit; font-weight: 600; }
@media (pointer: coarse) { .ed-save .inline-link { padding: 12px 6px; margin: -12px -6px; } }   /* 글 줄 높이는 그대로, 누르는 곳만 44px (.inline-link 규칙을 위 padding 0 이 덮지 않게) */
@media (max-width: 380px) { .ed-bar { flex-wrap: wrap; row-gap: 6px; } .ed-save { flex-basis: 100%; } .ed-bar .btn { flex: 1; } }   /* 좁은 화면: 저장 상태를 단추 위 한 줄로 (예전 320px 에서 '저…'로 잘림) */
.ed-bar [hidden] { display: none; }                                                    /* .btn 의 display 가 hidden 을 덮지 않게 ([사진 다시 보기] 는 영상 첫 프레임 사진이 있을 때만) */
@media (max-width: 640px) { .ed-bar.pv { flex-wrap: wrap; row-gap: 6px; } .ed-bar.pv .ed-save { flex-basis: 100%; } .ed-bar.pv .btn { flex: 1 1 auto; padding-left: 10px; padding-right: 10px; } }   /* [사진 다시 보기] 까지 단추 셋: 저장 상태는 위 한 줄 */
@media (max-width: 640px) { html.ed-on.ed-pv .toasts { bottom: calc(100px + var(--safe-b)); } }
@media (min-width: 960px) {
  .ed-stage { height: auto; }
  .ed-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ed-bar { padding: 10px 16px; }
}
@media (prefers-reduced-motion: reduce) { .ed { animation: none; } }
