:root {
  --accent: #1f7a6d;
  --accent-soft: #e3f1ee;
  --danger: #c94040;
  --ink: #232830;
  --ink-2: #5b6470;
  --ink-3: #8a93a0;
  --line: #e2e5ea;
  --bg: #f1f3f6;
  --surface: #ffffff;
  --radius: 10px;
  --font: Pretendard, 'Malgun Gothic', 'Apple SD Gothic Neo', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

/* ── 상단 바 ── */
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; white-space: nowrap; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 17px;
}
.brand small { font-weight: 500; color: var(--ink-3); font-size: 11px; }
.project-btn {
  display: flex; align-items: center; gap: 6px; max-width: 280px;
  border: 1px solid var(--line); background: #fafbfc; border-radius: 8px; padding: 6px 10px;
}
.project-btn #project-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.project-btn .caret { color: var(--ink-3); font-size: 11px; }
.spacer { flex: 1; }
.seg { display: flex; background: #eef0f3; border-radius: 9px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 11px; border-radius: 7px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.undo-group { display: flex; gap: 2px; }

.btn {
  border: 1px solid var(--line); background: var(--surface); border-radius: 8px;
  padding: 7px 13px; font-weight: 600; white-space: nowrap;
}
.btn:hover { background: #f6f7f9; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #196a5e; }
.btn.danger { color: var(--danger); border-color: #f0caca; }
.btn.danger:hover { background: #fdf2f2; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.block { width: 100%; }
.icon-btn { border: 0; background: transparent; width: 34px; height: 34px; border-radius: 8px; font-size: 17px; }
.icon-btn:hover:not(:disabled) { background: #eef0f3; }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* ── 레이아웃 ── */
.topbar { flex: none; }
.app { display: flex; flex: 1; min-height: 0; }
.toolbar {
  width: 68px; flex: none; background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0;
}
.toolbar button {
  width: 56px; height: 54px; border: 0; background: transparent; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--ink-2);
}
.toolbar button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.toolbar button[data-tool="select"] svg { fill: currentColor; stroke-width: 1; }
.toolbar button:hover { background: #f1f3f5; }
.toolbar button.active { background: var(--accent-soft); color: var(--accent); }
.tb-sep { width: 36px; height: 1px; background: var(--line); margin: 6px 0; }
body[data-mode="customer"] .measure-only { display: none; }
/* 보기 전용 사이트 */
.viewer-only { display: none; }
body[data-app="viewer"] .viewer-hide { display: none !important; }
body[data-app="viewer"] .viewer-only { display: inline-flex; }
body[data-app="viewer"] .project-btn { cursor: default; }
.view-badge { align-items: center; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 20px; padding: 4px 10px; white-space: nowrap; }
.viewer-empty { max-width: 420px; margin: 18vh auto 0; text-align: center; padding: 0 20px; line-height: 1.7; color: var(--ink-2); }
.viewer-empty .logo { width: 54px; height: 54px; border-radius: 14px; display: inline-grid; place-items: center; background: var(--accent); color: #fff; font-size: 28px; }
.fl-list { list-style: none; padding: 0; margin: 8px 0 0; }
.fl-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 7px 8px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.fl-list li:hover { background: #f3f5f7; }
.fl-list li em { grid-column: 1 / -1; font-style: normal; font-size: 11px; color: var(--ink-3); }
.fl-list li b { font-size: 12px; color: var(--ink-2); }
.price-total { margin-top: 10px; padding: 10px; background: #f6f7f9; border-radius: 8px; font-size: 13px; display: flex; justify-content: space-between; }

.workspace { flex: 1; display: flex; min-width: 0; gap: 1px; background: var(--line); position: relative; }

/* 선택한 항목의 빠른 작업 막대 (휴대폰에서도 바로 삭제·회전 가능) */
.selbar {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 5;
  display: flex; align-items: center; gap: 2px; padding: 5px;
  background: rgba(35, 40, 48, 0.94); color: #fff; border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22); max-width: calc(100% - 24px);
}
.selbar[hidden] { display: none; }
.selbar .sb-name { font-size: 12px; font-weight: 700; padding: 0 10px 0 8px; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
@media (max-width: 420px) { .selbar button { padding: 0 9px; font-size: 12px; } .selbar .sb-name { max-width: 70px; } }
.selbar button {
  border: 0; background: transparent; color: #fff; font-weight: 700; font-size: 13px;
  min-height: 40px; padding: 0 12px; border-radius: 10px; white-space: nowrap;
}
.selbar button:hover, .selbar button:active { background: rgba(255, 255, 255, 0.14); }
.selbar button.danger { color: #ff9b9b; }
.workspace.has-sel .hint { display: none; }

.pane-3d .pane-tools { flex-wrap: wrap; justify-content: flex-end; max-width: calc(100% - 70px); }
.walk-ui { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.walk-ui[hidden] { display: none; }
.walk-hint { position: absolute; top: 50px; left: 50%; transform: translateX(-50%); background: rgba(20, 24, 30, 0.72); color: #fff;
  font-size: 12px; padding: 6px 12px; border-radius: 20px; white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.walk-exit { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); pointer-events: auto; }
.joy { position: absolute; left: 22px; bottom: 22px; width: 116px; height: 116px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.25); border: 2px solid rgba(255, 255, 255, 0.6); pointer-events: auto; touch-action: none; }
.joy-knob { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.85); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }
@media (hover: hover) and (pointer: fine) { .joy { display: none; } }

.clearance-card {
  position: absolute; left: 12px; top: 38px; z-index: 4; width: min(320px, calc(100% - 24px));
  background: rgba(255, 255, 255, 0.96); border: 1px solid #f1d2a8; border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1); font-size: 12px; overflow: hidden;
}
.clearance-card[hidden] { display: none; }
.cc-head { display: flex; align-items: center; gap: 4px; padding: 9px 10px; background: #fff4e5; color: #8a5300; font-weight: 700; }
.cc-head.ok { background: var(--accent-soft); color: var(--accent); }
.cc-head b { color: #c46a00; }
.cc-x { margin-left: auto; border: 0; background: transparent; color: inherit; font-size: 12px; opacity: .7; }
.clearance-card ul { list-style: none; margin: 0; padding: 4px; max-height: 190px; overflow-y: auto; }
.clearance-card li { display: flex; gap: 6px; padding: 6px 6px; border-radius: 7px; cursor: pointer; line-height: 1.4; color: var(--ink-2); }
.clearance-card li:hover { background: #f6f7f9; }
.clearance-card li span { width: 16px; flex: none; text-align: center; }
.cc-more, .cc-note { padding: 2px 12px 8px; color: var(--ink-3); }
.pane-tools button.active { background: #fff4e5; color: #8a5300; border-color: #f1d2a8; }
@media (max-width: 820px) { .clearance-card { top: 44px; } .clearance-card ul { max-height: 120px; } }
.pane { position: relative; flex: 1; min-width: 0; overflow: hidden; background: #f7f8fa; }
.workspace[data-view="2d"] .pane-3d, .workspace[data-view="3d"] .pane-2d { display: none; }
#plan { display: block; touch-action: none; }
.canvas3d { display: block; width: 100%; height: 100%; touch-action: none; }
.pane-label {
  position: absolute; top: 10px; left: 12px; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  color: var(--ink-3); background: rgba(255,255,255,.8); padding: 3px 8px; border-radius: 6px; pointer-events: none;
}
.pane-tools { position: absolute; top: 8px; right: 10px; display: flex; gap: 4px; }
.pane-tools button {
  border: 1px solid var(--line); background: rgba(255,255,255,.92); border-radius: 7px;
  padding: 5px 9px; font-size: 12px; font-weight: 600; min-width: 30px;
}
.pane-tools button:hover { background: #fff; border-color: #cfd4da; }
.pane-tools button.active { background: var(--accent-soft); color: var(--accent); border-color: #b9dcd5; }
.hint {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  background: rgba(35,40,48,.82); color: #fff; font-size: 12px; padding: 6px 12px; border-radius: 20px;
  pointer-events: none; white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis;
}

/* ── 오른쪽 패널 ── */
.panel { width: 320px; flex: none; background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.tabs { display: flex; border-bottom: 1px solid var(--line); flex: none; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 12px 0; font-weight: 700; color: var(--ink-3); border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
#panel-body { flex: 1; overflow-y: auto; padding: 4px 16px 24px; }
.sec { padding: 14px 0; border-bottom: 1px solid #f0f1f4; }
.sec:last-child { border-bottom: 0; }
.sec-title { font-size: 12px; font-weight: 800; color: var(--ink-2); margin-bottom: 10px; letter-spacing: .02em; }
.field { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 8px; margin-bottom: 8px; }
.field > span { font-size: 13px; color: var(--ink-2); }
.field input[type="text"], .field input[type="tel"], .field input[type="date"], .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; background: #fbfbfc;
}
.field textarea { resize: vertical; }
.num { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 7px; background: #fbfbfc; overflow: hidden; }
.num input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 7px 9px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.num em { font-style: normal; color: var(--ink-3); font-size: 12px; padding-right: 9px; }
.field input:focus, .num:focus-within, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,122,109,.12); }
.help { font-size: 12px; color: var(--ink-3); line-height: 1.55; margin: 6px 0 0; }
.mono { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 13px; }
.warn { background: #fff4e5; color: #8a5300; border: 1px solid #f5d9a8; border-radius: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.5; margin: 8px 0; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.btn-row .num { width: 96px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.proj-title { font-size: 16px; font-weight: 800; }
.area-big { font-size: 22px; font-weight: 800; color: var(--accent); margin-top: 4px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stats div { background: #f6f7f9; border-radius: 8px; padding: 9px 8px; text-align: center; }
.stats b { display: block; font-size: 16px; }
.stats span { font-size: 11px; color: var(--ink-3); }
.room-list { list-style: none; padding: 0; margin: 10px 0 0; }
.room-list li { display: flex; justify-content: space-between; padding: 7px 8px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.room-list li:hover { background: #f3f5f7; }
.room-list em { font-style: normal; color: var(--ink-3); font-size: 12px; }
.tips { padding-left: 18px; margin: 0; font-size: 12px; color: var(--ink-2); line-height: 1.7; }

.swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: var(--c); box-shadow: 0 0 0 1px var(--line); padding: 0; position: relative; }
.swatch.on { box-shadow: 0 0 0 2px var(--accent); }
.swatch.custom { background: conic-gradient(#f66, #fd6, #6d8, #6cf, #a7f, #f66); overflow: hidden; cursor: pointer; }
.swatch.custom input { opacity: 0; width: 100%; height: 100%; cursor: pointer; }

.floor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.floor-opt { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 8px; font-size: 12px; font-weight: 600; text-align: left; }
.floor-opt i { width: 22px; height: 22px; border-radius: 5px; background: var(--c); flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.floor-opt.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.catalog { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.cat-item { display: grid; grid-template-columns: 46px 1fr; grid-template-rows: auto auto; column-gap: 6px; align-items: center; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 8px; }
.cat-item:hover { border-color: var(--accent); background: #f7fbfa; }
.cat-item .ico { grid-row: span 2; font-size: 20px; text-align: center; }
.cat-item .nm { font-size: 12px; font-weight: 700; line-height: 1.25; }
.cat-item .sz { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.measure-btn { margin-top: 12px; }
.measure-list { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.mrow { display: grid; grid-template-columns: 24px 18px 1fr 44px; align-items: center; gap: 6px; padding: 4px; border-radius: 9px; }
.mrow.active { background: var(--accent-soft); }
.mno { width: 22px; height: 22px; border-radius: 50%; background: #e7eaee; color: var(--ink-2); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.mrow.active .mno { background: var(--accent); color: #fff; }
.marrow { color: var(--ink-3); font-size: 14px; text-align: center; }
.mrow input::placeholder { color: #b3bac4; font-weight: 500; }
.mres { font-size: 12px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.mres.ok { color: var(--accent); }
.mres.bad { color: #c46a00; }
.ok-box { background: var(--accent-soft); color: var(--accent); border-radius: 8px; padding: 8px 10px; font-size: 12px; font-weight: 600; margin: 8px 0; }
.mstatus { margin-bottom: 10px; }
input.invalid, .num:has(input.invalid) { border-color: var(--danger) !important; }
.lib-head { position: sticky; top: -4px; background: var(--surface); z-index: 1; padding-bottom: 8px; }
.lib-search { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fbfbfc; margin-bottom: 10px; }
.lib-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,122,109,.12); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; padding: 6px 0 12px; }
.lib-card { display: flex; flex-direction: column; align-items: stretch; gap: 3px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px; text-align: left; }
.lib-card[hidden] { display: none; }
.lib-card:hover { border-color: var(--accent); background: #f7fbfa; }
.lib-card img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #f3f4f6; border-radius: 7px; }
.lib-card .nm { font-size: 12px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-card .sz { font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.credit a { color: var(--accent); }
.lib-src { margin-bottom: 10px; width: 100%; }
.lib-src button { flex: 1; font-size: 12px; }
.lib-ico { position: relative; width: 100%; aspect-ratio: 1; border-radius: 7px; display: block; overflow: hidden;
  background: linear-gradient(160deg, #f7f8fa, #eaedf0); }
.thumb3d { width: 100%; height: 100%; object-fit: contain; display: block; opacity: 0; transition: opacity .2s; }
.thumb3d.ready { opacity: 1; }
.cat-item .ico .thumb3d { width: 44px; height: 44px; border-radius: 6px; background: linear-gradient(160deg, #f7f8fa, #eaedf0); }
.lib-ico em { position: absolute; top: 5px; left: 6px; font-style: normal; font-size: 10px; font-weight: 800; color: #fff;
  background: rgba(35, 40, 48, 0.78); border-radius: 4px; padding: 1px 5px; }
.lib-card .pr { font-size: 11px; font-weight: 700; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.import-btn { border-style: dashed; color: var(--accent); border-color: #9fcfc6; background: #f7fbfa; }
.model-item { display: flex; padding: 0; position: relative; }
.model-item .cat-hit { flex: 1; min-width: 0; display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; column-gap: 6px; align-items: center; text-align: left; border: 0; background: transparent; padding: 8px; }
.model-item .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-item .del { position: absolute; top: 2px; right: 2px; border: 0; background: transparent; color: var(--ink-3); font-size: 11px; width: 20px; height: 20px; border-radius: 5px; }
.model-item .del:hover { background: #fdecec; color: var(--danger); }
.field select { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; background: #fbfbfc; }

/* ── 모달·토스트 ── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(20,24,30,.42); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); background: #fff; border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.25); display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 6px; }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-body { padding: 6px 18px 12px; overflow-y: auto; }
.modal-body p { line-height: 1.6; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid #f0f1f4; flex-wrap: wrap; }
.proj-list { display: flex; flex-direction: column; gap: 6px; }
.proj-row { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 9px; padding: 2px 4px 2px 2px; }
.proj-row.current { border-color: var(--accent); background: #f7fbfa; }
.proj-open { flex: 1; text-align: left; border: 0; background: transparent; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.proj-open span { font-size: 12px; color: var(--ink-3); }
.export-grid { display: flex; flex-direction: column; gap: 8px; }
.export-opt { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.export-opt:hover { border-color: var(--accent); background: #f7fbfa; }
.export-opt span { font-size: 12px; color: var(--ink-3); }
.share-sec { padding: 12px 0; border-bottom: 1px solid #f0f1f4; }
.share-sec:last-of-type { border-bottom: 0; }
.share-sec .link-box { margin: 8px 0; }
.check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); margin: 4px 0; }
.link-box { width: 100%; font-size: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; resize: none; word-break: break-all; background: #fafbfc; }

.onboard-card { text-align: center; padding: 22px 8px 0; width: min(420px, 100%); }
.onboard-card h2 { margin: 6px 0 8px; font-size: 19px; }
.onboard-card p { margin: 0 22px; color: var(--ink-2); line-height: 1.65; font-size: 14px; }
.ob-icon { font-size: 46px; }
.ob-step { font-size: 11px; font-weight: 700; color: var(--ink-3); }
.ob-dots { display: flex; justify-content: center; gap: 6px; margin: 16px 0 4px; }
.ob-dots i { width: 7px; height: 7px; border-radius: 50%; background: #d7dbe0; }
.ob-dots i.on { background: var(--accent); width: 18px; border-radius: 4px; }
.onboard-card .modal-actions { justify-content: center; border-top: 0; }

#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0;
  background: #232830; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13px; z-index: 60;
  transition: .2s; pointer-events: none; max-width: calc(100% - 32px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── 태블릿·모바일 ── */
@media (max-width: 1100px) {
  .brand small, .brand span:not(.logo) { display: none; }
  .project-btn { max-width: 170px; }
  .panel { width: 280px; }
}
@media (max-width: 820px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 8px 10px; gap: 6px; }
  .spacer { display: none; }
  .project-btn { flex: 1; max-width: none; }
  .seg button { padding: 5px 8px; font-size: 12px; }
  #btn-export, #btn-share { padding: 6px 9px; font-size: 12px; }
  .app { flex-direction: column; }
  .toolbar { width: 100%; height: 56px; flex-direction: row; justify-content: center; padding: 0 6px; border-right: 0; border-bottom: 1px solid var(--line); }
  .toolbar button { height: 48px; width: 52px; }
  .tb-sep { width: 1px; height: 30px; margin: 0 4px; }
  .workspace { flex: 1; min-height: 0; flex-direction: column; }
  .panel { width: 100%; height: 38%; border-left: 0; border-top: 1px solid var(--line); }
  .hint { display: none; }
}
