:root{
  --bg:#111413;
  --panel:#1a1f1d;
  --line:#2c3330;
  --fg:#e8ece9;
  --dim:#98a29d;
  --accent:#7fb069;
  --warn:#e0a458;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; background:var(--bg); color:var(--fg);
  font:15px/1.5 system-ui,-apple-system,"Segoe UI","Malgun Gothic",sans-serif;
  display:flex; flex-direction:column;
  -webkit-tap-highlight-color:transparent;
}
.bar{
  display:flex; align-items:center; gap:8px;
  padding:10px 12px; border-bottom:1px solid var(--line);
}
.spacer{flex:1}
h2{font-size:16px;margin:0}

select{
  background:var(--panel); color:var(--fg); border:1px solid var(--line);
  border-radius:8px; padding:8px 10px; font:inherit; max-width:55vw;
}
button{font:inherit; cursor:pointer}
.plant-btn{
  background:var(--panel); color:var(--fg); border:1px solid var(--line);
  border-radius:8px; padding:8px 10px; max-width:55vw;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.ghost-btn{
  background:transparent; color:var(--fg); border:1px solid var(--line);
  border-radius:8px; padding:8px 12px;
}
.chip{
  background:var(--panel); color:var(--fg); border:1px solid var(--line);
  border-radius:999px; padding:8px 14px;
}
.chip.on{border-color:var(--accent); color:var(--accent)}
.primary{
  background:var(--accent); color:#0d1210; border:0;
  border-radius:10px; padding:12px 20px; font-weight:600;
}

main{flex:1; display:flex; flex-direction:column; min-height:0}

/* 촬영 프레임 — 출력과 같은 4:5 비율. 여기 보이는 만큼이 그대로 저장된다. */
/* 높이는 flex가 정하고(남는 만큼), 폭은 aspect-ratio가 높이에서 역산한다.
   예전엔 width:min(100%, 70svh×4/5)로 잡았는데, 샷 리스트 한 줄이 들어오자 폰(375×812)에서
   42px가 넘쳐 셔터가 접혔다(2026-09-17). 이 방식이면 위아래 요소가 늘어도 무대가 알아서 줄고,
   width:100% + max-height 조합처럼 비율이 깨지는 일도 없다(실측 0.800 유지).
   비율 4:5는 app.js의 TARGET_W/TARGET_H와 반드시 같아야 한다. */
/* 높이를 '화면 폭 기준 4:5'로 정해 두고, 자리가 모자라면 flex가 줄인다. 폭은 aspect-ratio가 높이에서 역산.
   flex:1로 늘리는 방식은 도구를 접어 자리가 남을 때 max-width에 걸려 비율이 0.635로 깨졌다(2026-09-23 실측). */
#camera .stage{
  position:relative; aspect-ratio:4/5;
  height:calc(min(100vw, 480px) * 5 / 4);
  flex:0 1 auto; min-height:0; width:auto; max-width:100%;
  margin:0 auto; background:#000; overflow:hidden;
  align-self:center;
}
/* 리뷰 시트의 무대는 flex 안이 아니므로 예전 방식 그대로 */
.sheet .stage{
  position:relative; aspect-ratio:4/5;
  width:min(100%, calc(60svh * 4 / 5));
  margin:0 auto; background:#000; overflow:hidden; flex:none;
}
.stage video,.stage img{
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; display:block;
}
/* ⚠️ 바로 위 display:block이 hidden 속성을 이긴다(클래스 선택자가 브라우저 기본 [hidden]보다 세다).
   이 줄이 없어서 **리뷰의 지난 사진(#reviewGhost)이 숨김 상태인데도 불투명하게 새 사진을 덮었다** —
   "찍은 뒤에 방금 찍은 사진이 아니라 지난 사진이 나온다"(9/17 첫 보고, 9/25 재발)의 진짜 원인.
   9/17엔 decode 대기·새 <img>·새 프레임 대기로, 9/25엔 카메라 동결로 잘못 짚었다. 카메라 쪽 고스트의 'Ghost: off'도 같은 이유로 안 꺼졌다. */
.stage video[hidden],.stage img[hidden]{display:none}
#ghost{pointer-events:none}
#ghost.difference{mix-blend-mode:difference; opacity:1 !important}

.grid{position:absolute; inset:0; pointer-events:none;
  background:
    linear-gradient(to right,transparent calc(33.333% - 1px),rgba(255,255,255,.35) 33.333%,transparent calc(33.333% + 1px)),
    linear-gradient(to right,transparent calc(66.666% - 1px),rgba(255,255,255,.35) 66.666%,transparent calc(66.666% + 1px)),
    linear-gradient(to bottom,transparent calc(33.333% - 1px),rgba(255,255,255,.35) 33.333%,transparent calc(33.333% + 1px)),
    linear-gradient(to bottom,transparent calc(66.666% - 1px),rgba(255,255,255,.35) 66.666%,transparent calc(66.666% + 1px));
}
/* 소개가 무대보다 길면 위아래가 잘리지 않고 스크롤되게. safe center = 넘칠 땐 위에서부터. */
.stage-msg{
  position:absolute; inset:0; display:flex; flex-direction:column;
  align-items:center; justify-content:center; justify-content:safe center;
  gap:10px; text-align:center; padding:16px; overflow-y:auto;
}
.stage-msg[hidden]{display:none}

.controls{padding:12px; display:flex; flex-direction:column; gap:12px}
.row{display:flex; align-items:center; gap:10px}
.row span{white-space:nowrap; color:var(--dim); font-size:13px}
.row b{color:var(--fg)}
.btns{flex-wrap:wrap}
input[type=range]{flex:1; accent-color:var(--accent)}
.shutter{
  width:100%; padding:16px; border:0; border-radius:12px;
  background:var(--accent); color:#0d1210; font-weight:700; font-size:17px;
}
.shutter:disabled{background:var(--panel); color:var(--dim)}
.status{margin:0; font-size:13px; color:var(--dim); min-height:1.5em; white-space:pre-line}
.status.warn{color:var(--warn)}
.hint{margin:0; font-size:13px; color:var(--dim)}

.sheet{
  position:fixed; inset:0; background:var(--bg); z-index:10;
  overflow:auto; padding:12px; display:flex; flex-direction:column; gap:12px;
}
.sheet[hidden]{display:none}

.shots{display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:12px}
.shot{background:var(--panel); border:1px solid var(--line); border-radius:10px; overflow:hidden}
.shot img{width:100%; aspect-ratio:4/5; object-fit:cover; display:block; background:#000}
.shot .meta{padding:8px; font-size:12px; color:var(--dim)}
.shot .acts{display:flex; flex-wrap:wrap; gap:4px; padding:0 8px 8px}
.shot .acts button{flex:1 1 30%; font-size:12px; padding:6px 0; background:transparent;
  color:var(--fg); border:1px solid var(--line); border-radius:6px}
.shot.is-ref{border-color:var(--accent)}

/* 식물 고르기 */
.shot.pick{cursor:pointer; text-align:left; padding:0; color:var(--fg); font:inherit}
.shot.pick.on{border-color:var(--accent)}
.shot.pick .name{padding:8px 8px 0; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.shot.pick .noimg{width:100%; aspect-ratio:4/5; display:grid; place-items:center; background:#000; color:var(--dim); font-size:28px}

/* QR 라벨 — 크기는 mm로 고정해 인쇄 배율 100%면 실제 3cm가 나온다.
   3cm의 근거: 버전 4(33칸+여백 8칸=41칸)라 한 칸이 약 0.73mm. 폰으로 식물 전체를 담는 거리(40~60cm)에서
   2560px 폭 영상이면 한 칸이 3px 안팎 — 인식에 필요한 최소(2~3px)를 겨우 넘긴다. 더 작게 하면 가까이 가야 읽힌다. */
.labels{display:flex; flex-wrap:wrap; gap:6mm; background:#fff; padding:6mm; border-radius:8px}
.label{width:30mm; color:#000; text-align:center; font-size:9pt; line-height:1.2; break-inside:avoid}
.label svg{width:30mm; height:30mm; display:block}
.label .name{margin-top:1mm; overflow-wrap:anywhere}
.label .name.blank{border-bottom:0.3mm solid #000; height:5mm}   /* 손으로 이름을 적을 자리 */
.plant-toast{
  position:absolute; left:50%; top:40%; transform:translate(-50%,-50%); z-index:5;
  background:rgba(17,20,19,.85); color:var(--fg); border:2px solid var(--accent);
  border-radius:14px; padding:14px 22px; font-size:22px; font-weight:700; text-align:center;
  max-width:85%; pointer-events:none;
}
.plant-toast[hidden]{display:none}
/* 라벨 읽기 칸 — labelread 쪽 LABEL_BOX와 같은 비율(가로 80%, 세로 24%, 위에서 38%) */
.label-box{
  position:absolute; left:10%; top:38%; width:80%; height:24%; z-index:4;
  border:3px dashed var(--accent); border-radius:12px; box-shadow:0 0 0 2000px rgba(0,0,0,.35);
  display:flex; align-items:flex-end; justify-content:center;
}
.label-box span{transform:translateY(calc(100% + 8px)); background:rgba(17,20,19,.85); color:var(--fg);
  padding:4px 10px; border-radius:8px; font-size:14px; text-align:center}
.label-box[hidden]{display:none}
@media print{
  body > *:not(#labels){display:none !important}
  #labels{position:static; padding:0; background:#fff}
  #labels > :not(.labels){display:none}
  .labels{padding:0}
}

@media (min-width:900px){
  #camera .stage{max-width:480px}
  .sheet .stage{width:min(480px, calc(60svh * 4 / 5))}
  .controls{max-width:520px; margin:0 auto; width:100%}
}

/* 갤러리의 체크박스형 chip. 버튼과 같은 높이로 보이게만 맞춘다. */
.chip.check{ display:inline-flex; align-items:center; gap:.4em; cursor:pointer; }
.chip.check input{ margin:0; }

/* 첫 화면 소개. 4:5 무대 안에 폰(375px)에서도 다 들어가야 하므로 글자를 작게 잡는다. */
.intro{max-width:34ch}
.intro h1{margin:0 0 6px; font-size:22px; letter-spacing:.02em}
.intro .lead{margin:0 0 10px; font-size:14px; line-height:1.45; word-break:keep-all}
.intro .steps{margin:0; padding-left:1.4em; text-align:left; font-size:13px; line-height:1.5; color:var(--dim)}
.intro .steps li{margin:2px 0}
.privacy{margin:0; font-size:11px; line-height:1.4; color:var(--dim); opacity:.85}

/* 샷 리스트 chip. 무대 위 한 줄. 오늘 찍은 컷은 .done */
.views{display:flex; gap:6px; padding:8px 12px 0; overflow-x:auto; scrollbar-width:none}
.views::-webkit-scrollbar{display:none}
.chip.view{padding:6px 12px; font-size:13px; white-space:nowrap; flex:none}
.chip.view.done{color:var(--accent)}
.chip.view.done:not(.on){border-color:var(--line)}
.chip.view.add{padding:6px 10px; color:var(--dim)}

/* 탭 층. 테두리 양끝·꼭대기 탭을 받는다. */
.mark{position:absolute; inset:0; cursor:crosshair; touch-action:none}
.mark[hidden]{display:none}
.mark i{position:absolute; width:14px; height:14px; margin:-7px 0 0 -7px; border-radius:50%;
  background:var(--accent); box-shadow:0 0 0 2px #000}

/* 키 재기 오버레이. viewBox가 저장 픽셀(1280×1600)이라 좌표를 그대로 쓴다. */
.msvg{position:absolute; inset:0; width:100%; height:100%; pointer-events:none}
.msvg circle{fill:var(--accent); stroke:#000; stroke-width:4}
.msvg circle.fixed{fill:var(--dim)}
.msvg line{stroke:var(--accent); stroke-width:8; stroke-linecap:round}
.msvg line.h{stroke:#fff; stroke-dasharray:24 16}
.msvg text{fill:#fff; font:bold 60px system-ui,sans-serif; paint-order:stroke; stroke:#000; stroke-width:10}

/* 성장 그래프. 갤러리 맨 위. 값이 하나면 점만 찍힌다. */
.growth{background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:10px 12px}
.growth[hidden]{display:none}
.growth .sum{margin:0 0 6px; font-size:13px}
.growth .sum b{color:var(--accent)}
.growth svg{display:block; width:100%; height:auto}
.growth polyline{fill:none; stroke:var(--accent); stroke-width:2}
.growth circle{fill:var(--accent)}
.growth text{fill:var(--dim); font-size:11px}


.ver{font-size:12px; color:var(--dim); margin-right:4px; white-space:nowrap}

/* 비교 화면. 지난 사진(then)이 지금 사진 위에 놓이고 clip-path로 갈린다. */
#compareStage img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover}
#compareThen{clip-path:inset(0 50% 0 0)}
#compareThen.fade{clip-path:none}
.wipe-line{position:absolute; top:0; bottom:0; left:50%; width:2px; margin-left:-1px;
  background:var(--accent); box-shadow:0 0 0 1px rgba(0,0,0,.5); pointer-events:none}
.wipe-line[hidden]{display:none}
.tag{position:absolute; top:8px; padding:3px 8px; border-radius:6px; font-size:12px;
  background:rgba(0,0,0,.6); color:#fff; pointer-events:none}
.tag.left{left:8px} .tag.right{right:8px}
.shot .meta i{color:var(--warn); font-style:normal}

/* 접힌 도구들. More tools를 누르면 펼친다. */
.more{background:transparent; border:0; color:var(--dim); font-size:13px; padding:4px 0; text-align:left; align-self:flex-start}
.adv{display:flex; flex-direction:column; gap:12px}
.adv[hidden]{display:none}
.views[hidden]{display:none}

/* 기울기 과녁. 점을 가운데 원(±1°)에 넣는다. 점선 원은 ±3°. */
/* 과녁 위치는 글자 길이와 무관하게 고정. 전에는 캡션이 길어지면(초록일 때 "✓ tilt · line up…") 컨테이너가 넓어지며
   원이 왼쪽으로 밀렸다(2026-09-23 사용자). 캡션은 원 아래에 절대 위치로, 오른쪽 끝을 원에 맞춘다. */
.tilt{position:absolute; top:8px; right:8px; width:84px; pointer-events:none}
.tilt[hidden]{display:none}
.tilt .pad{position:relative; width:84px; height:84px; border-radius:50%; background:rgba(0,0,0,.45); box-shadow:inset 0 0 0 2px rgba(255,255,255,.35)}
.tilt .pad[hidden]{display:none}
.tilt .ring{position:absolute; left:50%; top:50%; border-radius:50%; transform:translate(-50%,-50%)}
/* 크기는 app.js의 d/(d+3) 식에서 역산: 0.5°에서 점 중심이 4.7px 이동 + 점 반지름 5 = 9.7 → 안쪽 반지름 10(지름 24, 테두리 2).
   2°에서 13.2+5 = 18 → 점선 지름 36. 처음엔 지름 20으로 잡아 점이 반쯤 걸친 채 초록이 떴다(검증 스크린샷). */
.tilt .ring{box-sizing:border-box}
.tilt .ring.near{width:38px; height:38px; border:1.5px dashed rgba(255,255,255,.55)}
.tilt .ring.ok{width:24px; height:24px; border:2px solid #fff}
.tilt .dot{position:absolute; left:50%; top:50%; width:10px; height:10px; margin:-5px 0 0 -5px; border-radius:50%;
  background:#fff; box-shadow:0 0 0 2px #000; transition:transform .06s linear}
.tilt.near .dot{background:var(--warn)}
.tilt.ok .dot{background:var(--accent)}
.tilt.ok .pad{box-shadow:inset 0 0 0 3px var(--accent)}
.tilt .cap{position:absolute; top:88px; right:0; white-space:nowrap; font-size:11px; color:#fff; background:rgba(0,0,0,.55); padding:1px 7px; border-radius:999px}
.tilt .pad[hidden] + .cap{top:0}
.tilt.ok .cap{background:var(--accent); color:#0d1210; font-weight:700}

/* 화면 전체 일치도. 무대 왼쪽 위. 문턱(0.7) 이상이면 초록. */
.match{position:absolute; top:8px; left:8px; padding:3px 9px; border-radius:999px; font-size:12px; font-weight:600;
  background:rgba(0,0,0,.55); color:#fff; pointer-events:none}
.match.good{background:var(--accent); color:#0d1210; box-shadow:0 0 0 2px #0d1210}
.match[hidden]{display:none}
/* 지난번 테두리 선. 화분 입구를 여기에 맞춘다. */
.msvg.live[hidden]{display:none}
.msvg.live line{stroke:#fff; stroke-width:6; stroke-dasharray:28 18; stroke-linecap:round; filter:drop-shadow(0 0 3px #000)}
.msvg.live circle{fill:none; stroke:#fff; stroke-width:5; filter:drop-shadow(0 0 3px #000)}

/* 자동 촬영 1초: Shoot 버튼이 왼쪽부터 차오른다(--p 0~1). */
.shutter.holding{background:linear-gradient(90deg, #cfe8c0 calc(var(--p,0) * 100%), var(--accent) 0); transition:none}
/* 찍히는 순간 번쩍 */
.flash{position:absolute; inset:0; background:#fff; opacity:0; pointer-events:none}
.flash.on{animation:flash .35s ease-out}
@keyframes flash{from{opacity:.85} to{opacity:0}}

/* 이사 안내(옛 주소 전용) */
.moved{background:var(--warn); color:#0d1210; font-size:13px; line-height:1.4; padding:8px 12px}
.moved a{color:#0d1210; font-weight:700}
.moved[hidden]{display:none}
.privacy a{color:var(--dim)}
.install-tip{font-size:12px}
.install-tip[hidden]{display:none}

/* v46 — 첫 행동과 사진을 중심으로 화면의 우선순위를 정리한다. */
:root{
  --bg:#111714; --panel:#1c2520; --line:#33423a;
  --fg:#f1f5ef; --dim:#acb9af; --accent:#b2d990;
  color-scheme:dark;
}
body{height:100svh}
button,summary,input,select{touch-action:manipulation}
button,summary{min-height:44px}
button:disabled{cursor:default; opacity:.5}
button:focus-visible,summary:focus-visible,input:focus-visible,a:focus-visible{
  outline:3px solid var(--accent); outline-offset:3px;
}
button:not(:disabled):hover{border-color:var(--accent)}
.primary,.shutter{border-radius:16px; box-shadow:0 3px 0 rgba(0,0,0,.18)}
.ghost-btn,.plant-btn{border-radius:12px}
.app-header{padding:10px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
  padding-top:max(10px, env(safe-area-inset-top)); border-bottom:1px solid var(--line)}
.brand-row,.plant-row{display:flex; align-items:center; gap:8px; max-width:680px; margin:auto}
.brand-row{margin-bottom:10px}
.brand{font-size:16px; font-weight:650; letter-spacing:-.02em; white-space:nowrap}
.brand-icon{display:inline-grid; place-items:center; color:var(--accent); width:28px; height:28px;
  background:#263a2a; border-radius:9px; font-size:25px; margin-right:5px}
.brand-row .ghost-btn{font-size:13px; padding:8px 12px}
.ver{font-size:11px; margin:0}
.plant-btn{flex:1; min-width:0; max-width:none; text-align:left; position:relative; padding:8px 30px 8px 12px; line-height:1.35}
.plant-btn .field-label{display:block; font-size:9px; color:var(--dim); letter-spacing:.12em; margin-bottom:2px}
.plant-btn > span:last-child{position:absolute; right:12px; top:18px; color:var(--accent)}
.icon-btn{width:44px; flex:none; font-size:21px; padding:0}
#readBtn{font-size:13px; flex:none; padding:10px}
#readBtn.on{background:#263a2a; color:var(--accent); border-color:var(--accent)}
#camera .stage{border-radius:20px; margin-top:10px; box-shadow:0 0 0 1px var(--line)}
.stage-msg{padding:24px 20px; gap:12px; background:radial-gradient(ellipse at 50% 0%,#243a2b 0%,#17231c 50%,#111714 100%)}
.eyebrow{font-size:10px; font-weight:650; letter-spacing:.14em; color:var(--accent); margin:0 0 6px}
.intro{max-width:35ch; width:100%; text-align:left}
.intro h1{font-size:30px; line-height:1.1; letter-spacing:-.035em; font-weight:650; margin-bottom:10px}
.intro .lead{font-size:14px; line-height:1.5; color:#c8d5cc; margin-bottom:18px}
.intro .steps{list-style:none; counter-reset:step; padding:0; display:grid; gap:12px}
.intro .steps li{counter-increment:step; position:relative; padding-left:38px; margin:0; line-height:1.4}
.intro .steps li:before{content:counter(step); position:absolute; left:0; top:0; width:27px; height:27px;
  border:1px solid #4b6551; border-radius:50%; display:grid; place-items:center; color:var(--accent)}
.intro .steps b{display:block; color:var(--fg); font-size:13px; font-weight:600}
.intro .steps span{font-size:12px}
#startBtn{width:100%; max-width:320px; margin-top:4px}
#introHint{max-width:30ch; font-size:12px}
.privacy{font-size:11px; opacity:1}
.install-tip{font-size:11px; max-width:36ch}
.controls{gap:8px; padding:12px 16px max(12px,env(safe-area-inset-bottom))}
.status{font-size:12px; line-height:1.45}
.more{min-height:44px; padding:8px 0; font-size:12px}
#camera:has(#stageMsg:not([hidden])) .shutter{display:none}
#camera:has(#stageMsg:not([hidden])) #moreBtn{display:none}
.sheet{padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)); gap:16px}
.sheet > .bar{padding:0 0 12px; flex-wrap:wrap}
.sheet h2{font-size:18px; letter-spacing:-.02em; overflow-wrap:anywhere}
.sheet .stage{border-radius:16px; box-shadow:0 0 0 1px var(--line)}
.sheet > :not(.stage){width:100%; max-width:760px; margin-left:auto; margin-right:auto}
.sheet .hint{font-size:13px; line-height:1.5}
.rim-progress{display:flex; list-style:none; padding:0; gap:6px; margin:0; font-size:11px; font-weight:600}
.rim-progress li{flex:1; padding:9px 6px; background:var(--panel); border:1px solid var(--line); border-radius:10px; text-align:center; color:var(--dim)}
.rim-progress .current{background:#283c2b; border-color:var(--accent); color:var(--accent)}
.rim-progress .done{color:var(--accent)}
.review-sheet .stage{width:min(100%,calc(47svh * 4 / 5)); margin-bottom:auto}
.review-footer{position:sticky; bottom:0; padding:12px 0 0; background:var(--bg); border-top:1px solid var(--line); display:grid; gap:10px}
.review-footer .primary{width:100%; min-height:50px}
.review-tools{gap:6px}
.review-tools .chip{font-size:12px; padding:8px 10px}
#saveHint{font-size:11px; text-align:center}
.inline-error{margin:0; border:1px solid var(--warn); border-radius:12px; padding:12px; background:#382a1d; color:#ffcf96; font-size:13px}
.inline-error[hidden]{display:none}
#review[aria-busy=true] .mark{pointer-events:none}
.search-field{display:grid; gap:6px; font-size:12px; color:var(--dim)}
.search-field input{width:100%; min-height:48px; border-radius:12px; border:1px solid var(--line); background:var(--panel); color:var(--fg); padding:12px 14px; font:inherit; font-size:15px}
.shots{grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:14px}
.shot{border-radius:16px}
.shot.pick[hidden]{display:none}
.shot.pick.on{box-shadow:0 0 0 2px var(--accent)}
.shot.pick.on .name:after{content:' ✓'; color:var(--accent)}
.shot.pick .name{padding:12px 12px 0}
.shot .meta{padding:10px 12px; line-height:1.6}
.shot.pick .noimg{background:linear-gradient(145deg,#23372a,#17201b); color:var(--accent); font-size:36px}
.shot .acts{padding:0 10px 10px; gap:6px}
.shot .acts button{min-height:44px; border-radius:9px; padding:6px; flex:1 1 40%; font-size:12px}
.shot-menu{border-top:1px solid var(--line)}
.shot-menu summary{font-size:12px; color:var(--dim); padding:12px; cursor:pointer}
.shot-menu [data-a=del]{color:#efb2a8}
.tool-panel{background:var(--panel); border:1px solid var(--line); border-radius:16px; padding:0 14px 0}
.tool-panel summary{padding:14px 0; font-size:13px; cursor:pointer; font-weight:600}
.tool-panel[open]{padding-bottom:14px}
.tool-panel .hint{margin-top:12px}
.chip.check{white-space:normal; font-size:13px}
.empty-state{text-align:center; padding:36px 16px; display:grid; justify-items:center; gap:12px; background:var(--panel); border:1px dashed var(--line); border-radius:20px}
.empty-state[hidden]{display:none}
.empty-state h3{font-size:20px; letter-spacing:-.02em; margin:0}
.empty-state p{font-size:13px; color:var(--dim); max-width:32ch; margin:0 0 6px}
.empty-icon{font-size:36px; color:var(--accent)}
#gallery .views{padding:0; min-height:44px}
#gallery .views:empty{display:none}
#storageInfo{font-size:11px; color:var(--dim)}
@media (max-width:360px){
  .app-header{padding-left:12px; padding-right:12px}
  .brand{font-size:14px} .brand-icon{margin-right:2px}
  .stage-msg{padding:18px 16px} .intro h1{font-size:26px}
  .shots{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:900px){
  .review-sheet .stage{width:min(420px,calc(50svh * 4 / 5))}
  .sheet > :not(.stage){max-width:760px}
  .review-sheet > :not(.stage){max-width:540px}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important; transition:none!important}
}

/* 기록 위에 비교, 비교 위에 테두리 편집이 올라가야 한다. */
#gallery{z-index:10} #review{z-index:20} #compare{z-index:30}
#picker{z-index:40} #labels{z-index:50} #measure{z-index:60}
#camera:has(#stageMsg[hidden]) #installTip{display:none}
.controls .install-tip{max-width:none; margin:0; text-align:center; color:var(--dim)}
.status:empty{display:none}

/* 기본 prompt의 호스트 이름 대신 앱의 입력창을 보여준다. */
.input-dialog{width:min(440px,calc(100% - 32px)); max-height:calc(100svh - 32px); overflow:auto;
  border:1px solid var(--line); border-radius:22px; padding:24px; background:var(--panel); color:var(--fg); box-shadow:0 24px 80px #0008}
.input-dialog::backdrop{background:rgba(5,12,7,.75); backdrop-filter:blur(5px)}
.input-dialog form{display:grid; gap:16px}
.input-dialog .eyebrow{margin:0}
.input-dialog h2{font-size:24px; letter-spacing:-.03em}
.input-dialog .hint{font-size:13px; line-height:1.5}
.input-dialog input{background:var(--bg)}
.dialog-actions{justify-content:flex-end; margin-top:4px}
.storage-help .hint{margin:0 0 12px}
.storage-help a.ghost-btn{display:inline-flex; align-items:center; text-decoration:none; font-size:13px}
