:root {
  --bg: #f4f8fb;
  --panel: #ffffff;
  --ink: #1d2b36;
  --muted: #6b7c89;
  --line: #e2ecf3;
  --accent: #2f8fd0;
  --accent-dark: #1f6ba3;
  --est: #c9651b;
  --meas: #2e8b57;
  --radius: 14px;
  --shadow: 0 2px 14px rgba(31, 107, 163, 0.08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: #ffffff; line-height: 1.55;
}
.wrap { max-width: none; margin: 0 auto; padding: 0 28px; }

/* 하나의 묶음 박스: 상단 라인탭(전체 폭) + 좌(제품선택)·우(크기비교) */
.suite {
  height: calc(100vh - 32px); display: flex; flex-direction: column; margin: 8px 0 16px;
}
.suite-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); margin-top: 12px; }
.pick-panel, .compare-panel { display: flex; flex-direction: column; min-height: 0; }
.pick-panel { padding-right: 22px; }
.compare-panel { padding-left: 22px; border-left: 1px solid #dcebf8; }
/* 왼쪽: 카드 영역만 내부 스크롤 */
.pick-panel .gallery { flex: 1; min-height: 0; }
.pick-panel .cards { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); flex: 1; min-height: 0; overflow-y: auto; padding: 2px 6px 2px 2px; }
.pick-panel .cards::-webkit-scrollbar { width: 8px; }
.pick-panel .cards::-webkit-scrollbar-thumb { background: #cddbe6; border-radius: 8px; }
.pick-panel .cards::-webkit-scrollbar-track { background: transparent; }
/* 오른쪽: 비교 무대가 남는 높이를 채움 */
.compare-panel .stage-scroll { flex: 1; min-height: 0; }
@media (max-width: 980px) {
  .suite { position: static; height: auto; display: block; }
  .suite-body { display: block; }
  .pick-panel, .compare-panel { display: block; }
  .pick-panel { padding-right: 0; }
  .compare-panel { padding-left: 0; border-left: none; margin-top: 18px; }
  .pick-panel .cards { flex: none; max-height: none; overflow: visible; }
  .compare-panel .stage-scroll { flex: none; }
}

.site-header { background: #fff; padding: 34px 0; }
.site-header .wrap { text-align: center; }
.site-header .logo { height: 34px; width: auto; display: inline-block; }

.panel { background: linear-gradient(180deg, #eaf5fe 0%, #ffffff 55%); border: 1px solid #cfe6f6; border-radius: 22px; box-shadow: 0 6px 24px rgba(47, 143, 208, .13); padding: 22px 24px; margin: 22px 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-size: 19px; color: var(--accent-dark); }
.panel-head h2 .opt { font-weight: 400; font-size: 13px; color: var(--muted); }
.hint { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.hint b { color: var(--accent-dark); }
.link-btn { background: none; border: none; color: var(--accent); font-size: 14px; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.link-btn:hover { background: #eaf4fb; }

.head-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search { border: 1px solid var(--line); border-radius: 9px; padding: 7px 12px; font-size: 14px; min-width: 180px; }
.search:focus { outline: none; border-color: var(--accent); }
.sel-count { font-size: 13px; color: var(--muted); }
.compare-head-left { display: flex; align-items: baseline; gap: 10px; }

/* Gallery */
.gallery { display: flex; flex-direction: column; gap: 14px; }

/* 상단 라인 탭(메뉴) — 풀버전 이름, 공간 채우기 */
.line-tabs { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid #d8ecf8; padding-bottom: 12px; }
.line-tab { flex: 1 1 auto; text-align: center; white-space: nowrap; border: 1px solid #d8e6f1; background: #fff; color: var(--ink); border-radius: 999px; padding: 9px 16px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .15s; }
.line-tab .tab-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--tab-color, #8a98a5); margin-right: 8px; vertical-align: middle; }
.line-tab:hover { border-color: var(--tab-color, var(--accent)); background: #f7fbfe; }
.line-tab.active { background: var(--tab-color, #2f8fd0); border-color: var(--tab-color, #2f8fd0); color: var(--tab-ink, #fff); box-shadow: 0 3px 12px rgba(0,0,0,.16); }
.line-tab.active .tab-dot { background: var(--tab-ink, #fff); opacity: .85; }

/* 검색줄과 아래 구분 */
.pick-panel .panel-head { border-bottom: 1px solid #d7e8f6; padding-bottom: 12px; }

/* 폴더 액션 바(라인 이름 줄) */
.folder-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid #e3eef8; }
.folder-name { margin: 0; font-size: 16px; color: var(--accent-dark); font-weight: 700; }
.folder-name .cnt { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.folder-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.folder-actions .link-btn { font-size: 12.5px; }
.f-del { color: #c0392b !important; }

/* 하위 카테고리 버튼 — 한 그룹으로 묶어 구분 */
.subcat-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: #f1f8fd; border: 1px solid #dcebf8; border-radius: 12px; padding: 10px 12px; }
.subcat { border: 1px solid #d8e6f1; background: #fff; color: var(--muted); border-radius: 8px; padding: 6px 13px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; }
.subcat:hover { border-color: var(--accent); color: var(--accent-dark); }
.subcat.active { background: #eef7fc; border-color: var(--accent); color: var(--accent-dark); box-shadow: 0 0 0 1px var(--accent) inset; }
.subcat .scnt { font-weight: 400; font-size: 11px; opacity: .75; margin-left: 2px; }
.subcat-wrap { display: inline-flex; align-items: center; }
.subcat-bar.editing .subcat-wrap { border: 1px dashed var(--line); border-radius: 10px; padding: 2px 3px; }
.sc-mini { border: none; background: #eef2f5; color: var(--muted); width: 22px; height: 22px; border-radius: 6px; cursor: pointer; font-size: 11px; margin-left: 3px; line-height: 1; }
.sc-mini:hover { background: #dde6ec; }
.sc-del:hover { background: #f6d6d2; color: #c0392b; }
.sc-add { border: 1px dashed var(--accent); background: #fff; color: var(--accent-dark); border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.sc-add:hover { background: #eef7fc; }
.subcat-tools { flex-basis: 100%; display: flex; justify-content: flex-start; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #cfe2f2; }
.subcat-tools:empty { display: none; }
.lock-btn.on { background: #eaf7ee; border-color: #59b06e; color: #2e7d46; }
.subcat-tool { border: 1px solid var(--line); background: #fff; color: var(--accent-dark); border-radius: 8px; padding: 6px 13px; font-size: 13px; font-weight: 600; cursor: pointer; }
.subcat-tool:hover { border-color: var(--accent); }
.subcat-tool.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.subcat-tool.on.alert { background: var(--est); border-color: var(--est); }

/* 분류 이동 바 */
.move-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: #fff7ef; border: 1px solid #f0d6b8; border-radius: 10px; padding: 10px 14px; }
.move-info { font-size: 13.5px; color: var(--ink); }
.move-info .mvcnt { color: var(--est); }
.move-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.move-to { border: 1px solid var(--est); background: #fff; color: var(--est); border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.move-to:hover { background: var(--est); color: #fff; }

/* 분류 편집 중 카드 표시 */
.card.managing.on { border-color: var(--est); background: #fff7ef; box-shadow: 0 0 0 1px var(--est) inset; }
.card.managing .chk { accent-color: var(--est); }
.catchip { font-size: 10px; padding: 1px 6px; border-radius: 6px; background: #eef2f5; color: var(--muted); font-weight: 600; }

.search-head { font-size: 14px; color: var(--muted); font-weight: 600; }

/* 제품 드래그 추가 영역 */
.prod-drop { margin-top: 4px; border: 2px dashed #bcd6e8; border-radius: 12px; background: #fbfdfe; cursor: pointer; padding: 16px; text-align: center; font-size: 14px; color: var(--muted); transition: all .15s; }
.prod-drop:hover, .prod-drop:focus, .prod-drop.drag { border-color: var(--accent); background: #eef7fc; outline: none; }
.prod-drop b { color: var(--accent-dark); }
.prod-drop .pd-sub { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.card { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fbfdfe; cursor: pointer; transition: border-color .15s, box-shadow .15s; display: flex; flex-direction: column; }
.card:hover { border-color: var(--accent); }
.card.on { border-color: var(--accent); background: #eef7fc; box-shadow: 0 0 0 1px var(--accent) inset; }
.card .chk { position: absolute; top: 8px; left: 8px; width: 20px; height: 20px; accent-color: var(--accent); z-index: 2; }
.thumb-wrap { position: relative; margin-bottom: 8px; }
.card .thumb { height: 110px; background: #fff center/contain no-repeat; border-radius: 8px; }
.repbtn { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); font-size: 11px; padding: 3px 10px; border: none; border-radius: 20px; background: rgba(31,107,163,.85); color: #fff; cursor: pointer; opacity: 0; transition: opacity .15s; white-space: nowrap; }
.thumb-wrap:hover .repbtn { opacity: 1; }
.repbtn:hover { background: var(--accent-dark); }
.revbtn { position: absolute; top: 4px; right: 4px; font-size: 10px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.92); color: var(--muted); cursor: pointer; }
.revbtn:hover { color: var(--ink); border-color: var(--accent); }
.cname-row { display: flex; align-items: flex-start; gap: 4px; min-height: 32px; }
.card .cname { font-size: 12.5px; font-weight: 600; line-height: 1.3; flex: 1; }
.c-rename { background: none; border: none; cursor: pointer; font-size: 12px; color: var(--muted); padding: 1px 3px; border-radius: 5px; flex: none; }
.c-rename:hover { background: #eaf4fb; color: var(--accent-dark); }
.c-del { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border: none; border-radius: 50%; background: rgba(192,57,43,.85); color: #fff; cursor: pointer; font-size: 12px; line-height: 1; opacity: 0; transition: opacity .15s; z-index: 2; }
.thumb-wrap:hover .c-del { opacity: 1; }
.hval { font-size: 14px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.hval small { font-weight: 400; color: var(--muted); }
.h-edit { font-size: 12px; }
.hbox { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.hbox[hidden] { display: none; }
.hbox .ch { width: 56px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 7px; font-size: 12.5px; text-align: right; }
.hbox .ch:focus { outline: none; border-color: var(--accent); }
.card .cmeta { margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.card .cmeta .vol { font-size: 11px; color: var(--muted); }
.badge { font-size: 10px; padding: 2px 7px; border-radius: 6px; color: #fff; border: none; cursor: pointer; font-weight: 600; transition: filter .12s; }
.badge:hover { filter: brightness(1.08); }
.badge.est { background: var(--est); }
.badge.meas { background: var(--meas); }
.card .hrow { margin-top: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dl-wrap { margin-left: auto; position: relative; }
.dl-img { font-size: 13px; line-height: 1; padding: 4px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); cursor: pointer; }
.dl-img:hover { border-color: var(--accent); color: var(--accent-dark); background: #f3faff; }
.dl-img:disabled { opacity: .6; cursor: default; }
.dl-menu { position: absolute; right: 0; bottom: calc(100% + 4px); z-index: 10; display: flex; flex-direction: column; min-width: 132px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.14); overflow: hidden; }
.dl-menu[hidden] { display: none; }
.dl-menu button { text-align: left; font-size: 12px; padding: 8px 11px; border: none; background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; }
.dl-menu button:hover { background: #f3faff; color: var(--accent-dark); }
.dl-menu button + button { border-top: 1px solid var(--line); }

/* 수정 모드: 평소엔 편집 컨트롤을 숨기고 "수정" 버튼을 눌러야 열림 */
.card:not(.editing) .edit-only { display: none !important; }
.card.editing .view-only { display: none !important; }
.card.editing .repbtn, .card.editing .c-del, .card.editing .revbtn { opacity: 1; }
.card.editing { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(31,107,163,.12); }
.card:not(.editing) .badge { cursor: default; }
.card:not(.editing) .badge:hover { filter: none; }
.card-actions { margin-top: 8px; display: flex; justify-content: flex-end; }
.card-edit { font-size: 12px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); cursor: pointer; }
.card-edit:hover { border-color: var(--accent); color: var(--accent-dark); background: #f3faff; }
.card.editing .card-edit { border-color: var(--accent); background: var(--accent); color: #fff; }

/* Stage */
.stage-opts { display: flex; align-items: center; gap: 14px; }
.clear-sel-btn { border: 1px solid #d8e6f1; background: #fff; color: var(--accent-dark); border-radius: 8px; padding: 6px 13px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; }
.clear-sel-btn:hover { border-color: var(--accent); background: #f3faff; }
.stage-opts label { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 6px; cursor: pointer; }
.stage-opts input { accent-color: var(--accent); }
.stage-opts select { border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 13px; background: #fff; }
.stage-scroll {
  overflow: hidden; border: 1px dashed var(--line); border-radius: 12px;
  background: linear-gradient(#fff,#fff) padding-box, repeating-linear-gradient(0deg, transparent, transparent 19px, #f0f5f9 19px, #f0f5f9 20px);
  display: flex; align-items: flex-end;
}
.stage { position: relative; display: flex; align-items: flex-end; gap: 24px; padding: 30px 30px 58px; min-height: 280px; transform-origin: bottom left; user-select: none; -webkit-user-select: none; }
.stage img { -webkit-user-drag: none; user-drag: none; }
.stage.is-empty { align-self: stretch; align-items: center; justify-content: center; width: 100%; padding: 24px; }
.empty-msg { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0; max-width: 440px; text-align: center; }
.stage-note { margin: 10px 2px 0; font-size: 12px; color: var(--muted); }
.stage-note .b-meas { color: var(--meas); }
.stage-note .b-est { color: var(--est); }

.ruler { position: relative; width: 38px; flex: none; align-self: stretch; border-right: 1px solid var(--line); }
.ruler .tick { position: absolute; right: 0; width: 8px; border-top: 1px solid #c4d4df; }
.ruler .tick.major { width: 14px; border-top-color: #93b1c2; }
.ruler .tick span { position: absolute; right: 16px; top: -8px; font-size: 10px; color: var(--muted); white-space: nowrap; }

.product { position: relative; display: flex; flex-direction: column; align-items: center; flex: none; cursor: grab; touch-action: none; }
.product.dragging { cursor: grabbing; z-index: 5; filter: drop-shadow(0 8px 12px rgba(0,0,0,.18)); }
.product img { display: block; pointer-events: none; }
.stage-del { position: absolute; top: 0; right: 0; z-index: 3; width: 24px; height: 24px; border: none; border-radius: 50%; background: rgba(192,57,43,.9); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .12s; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.product:hover .stage-del { opacity: 1; }
.stage-del:hover { background: #c0392b; }
/* 라벨을 이미지 바닥 아래에 절대 배치 → 이미지 바닥이 자의 0cm에 정확히 맞음 */
.product .label { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 10px; text-align: center; white-space: nowrap; }
.product .dim { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--accent-dark); font-weight: 800; font-variant-numeric: tabular-nums; background: #fff; border: 1px solid #dbe6ef; border-radius: 999px; padding: 3px 9px; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.product .dim .tag { font-size: 9px; font-weight: 600; padding: 1px 5px; border-radius: 999px; color: #fff; }
.product .dim .tag.est { background: var(--est); }
.product .dim .tag.meas { background: var(--meas); }

/* Upload */
.dropzone { border: 2px dashed #bcd6e8; border-radius: 12px; background: #fbfdfe; cursor: pointer; }
.dropzone:hover, .dropzone:focus, .dropzone.drag { border-color: var(--accent); background: #eef7fc; outline: none; }
.dz-inner { padding: 22px; text-align: center; font-size: 14px; color: var(--muted); }
.dz-inner b { color: var(--ink); }
.upload-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.urow { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fbfdfe; }
.urow .uthumb { width: 40px; height: 40px; background: #fff center/contain no-repeat; border: 1px solid var(--line); border-radius: 7px; flex: none; }
.urow input.uname { flex: 1; min-width: 0; border: none; background: transparent; font-size: 13.5px; font-weight: 600; }
.urow input.uname:focus { outline: none; }
.urow .uh { width: 56px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 7px; text-align: right; font-size: 13px; }
.urow label.uinc { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.urow .urm { background: none; border: none; color: #c0392b; cursor: pointer; font-size: 15px; }

/* 사진으로 측정 */
#measure-body[hidden] { display: none; }
.m-stage { display: flex; gap: 18px; margin-top: 14px; align-items: flex-start; flex-wrap: wrap; }
.m-stage[hidden] { display: none; }
.m-canvas-wrap { position: relative; flex: 1; min-width: 280px; line-height: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #f0f3f6; touch-action: none; }
.m-zoom { position: relative; transform-origin: 0 0; will-change: transform; }
.m-zoom img { width: 100%; height: auto; display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.m-zoom svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.m-canvas-wrap.panning { cursor: grabbing; }
.m-zoom-ctrl { position: absolute; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 4px; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 20px; padding: 3px 6px; box-shadow: var(--shadow); line-height: 1; z-index: 3; }
.m-zoom-ctrl button { width: 26px; height: 26px; border: none; background: #eef4f8; color: var(--ink); border-radius: 50%; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.m-zoom-ctrl button:hover { background: var(--accent); color: #fff; }
.m-zoom-ctrl #m-zlabel { font-size: 11.5px; color: var(--muted); min-width: 38px; text-align: center; font-variant-numeric: tabular-nums; }
.m-handle { cursor: grab; }
.m-handle:active { cursor: grabbing; }
.m-side { width: 300px; flex: none; }
.m-side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.m-add-btn { background: var(--accent); color: #fff; border: none; border-radius: 9px; padding: 8px 14px; font-size: 14px; cursor: pointer; }
.m-add-btn:hover { background: var(--accent-dark); }
.m-list { display: flex; flex-direction: column; gap: 8px; }
.m-row { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fbfdfe; }
.m-row.ref { border-color: var(--accent); background: #eef7fc; }
.m-row-top { display: flex; align-items: center; gap: 8px; }
.m-row .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.m-row .mname { flex: 1; min-width: 0; border: none; background: transparent; font-size: 13px; font-weight: 600; }
.m-row .mname:focus { outline: none; }
.m-row .mdel { background: none; border: none; color: #c0392b; cursor: pointer; font-size: 14px; }
.m-row-bot { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.m-row .mcm { font-size: 14px; font-weight: 700; color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.m-row .mcm-in { width: 64px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; text-align: right; }
.m-row .mreflabel { font-size: 11px; color: #fff; background: var(--accent); border-radius: 6px; padding: 1px 6px; }
.m-row .mapply { font-size: 12px; border: 1px solid var(--line); border-radius: 7px; padding: 3px 6px; background: #fff; max-width: 100%; }
.m-row .mref-btn { font-size: 11px; }
.m-row .mval { font-size: 14px; font-weight: 700; color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.m-row .mratio2 { font-size: 11px; color: var(--muted); }
.m-row .mrefprod, .m-row .msave { font-size: 12px; border: 1px solid var(--line); border-radius: 7px; padding: 3px 6px; background: #fff; max-width: 150px; }
.m-tip { font-size: 11.5px; color: var(--muted); margin: 12px 0 0; }

/* Calibration */
.calib-body[hidden], #up-body[hidden] { display: none; }
.calib-row { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.calib-card { border-radius: 10px; background: linear-gradient(135deg,#3a4a57,#20303b); color: #cdd9e2; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 12px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.12), var(--shadow); flex: none; }
.calib-controls { flex: 1; min-width: 220px; }
.calib-controls input[type=range] { width: 100%; accent-color: var(--accent); }
.calib-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.readout { font-size: 13px; color: var(--muted); }
.readout strong { color: var(--ink); }

.site-footer { margin-top: 40px; padding: 24px 0 40px; border-top: 1px solid var(--line); background: #fff; }
.site-footer p { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-text p:last-child { margin-bottom: 0; }
.footer-admin { font-size: 13px; color: var(--muted); white-space: nowrap; }

@media (max-width: 560px) {
  .site-header h1 { font-size: 24px; }
  .panel { padding: 16px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
