
:root {
  --bg: #F2F4F6;
  --card: #FFFFFF;
  --text: #191F28;
  --sub: #8B95A1;
  --sub2: #4E5968;
  --line: #F2F4F6;
  --blue: #3182F6;
  --blue-dark: #1B64DA;
  --blue-bg: #E8F3FF;
  --green: #00C471;
  --red: #F04452;
  --orange: #FF9500;
  --radius: 20px;
  --shadow: 0 1px 4px rgba(25, 31, 40, 0.04), 0 4px 16px rgba(25, 31, 40, 0.04);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #E5E8EB;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}


#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.04), 0 8px 40px rgba(25,31,40,0.12);
}
@media (max-width: 480px) { #app { box-shadow: none; } }


#header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(242, 244, 246, 0.92);
  backdrop-filter: blur(12px);
  padding: 12px 20px 10px;
  display: none;
}
#header.visible { display: block; }
.header-row { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.back-btn {
  width: 44px; height: 44px; border: none; background: transparent;
  border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--text); flex-shrink: 0; transition: background .15s;
}
.back-btn:active { background: rgba(0,0,0,0.06); }
.progress-track {
  flex: 1; height: 4px; background: #E5E8EB; border-radius: 2px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: var(--blue); border-radius: 2px;
  transition: width .45s cubic-bezier(.4, 0, .2, 1);
}
.step-label { font-size: 12px; color: var(--sub); font-weight: 600; flex-shrink: 0; min-width: 30px; text-align: right; }


#gauge {
  display: none; margin-top: 10px;
  background: var(--card); border-radius: 14px; padding: 10px 14px;
  box-shadow: var(--shadow);
}
#gauge.visible { display: block; }
.gauge-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.gauge-label { font-size: 11px; color: var(--sub); font-weight: 600; }

.app-shell-loading {
  min-height: 62dvh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 32px 20px;
  color: #24312d;
  text-align: center;
}
.app-shell-loading > span {
  width: 26px;
  height: 26px;
  margin-bottom: 4px;
  border: 2px solid #d3d9d6;
  border-top-color: #1f5947;
  border-radius: 50%;
  animation: app-shell-spin .8s linear infinite;
}
.app-shell-loading strong { font-size: 14px; }
.app-shell-loading small { color: #738079; font-size: 10px; }

.scene3d-shell { position: relative; }
.scene3d-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  color: #f8fafc;
  text-align: center;
  background: #111827;
}
.scene3d-loading > span {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(248, 250, 252, 0.24);
  border-top-color: #f8fafc;
  border-radius: 50%;
  animation: app-shell-spin .8s linear infinite;
}
.scene3d-loading strong { font-size: 14px; }
.scene3d-loading small { color: #cbd5e1; }

@keyframes app-shell-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .app-shell-loading > span,
  .scene3d-loading > span { animation: none; }
  .variant-progress-fill { transition: none; }
}
.gauge-nums { font-size: 13px; font-weight: 700; color: var(--text); }
.gauge-nums .used { color: var(--blue); transition: color .3s; }
.gauge-nums.over .used { color: var(--red); }
.gauge-bar { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; position: relative; }
.gauge-bar-fill {
  height: 100%; border-radius: 4px; background: var(--blue);
  transition: width .5s cubic-bezier(.4, 0, .2, 1), background .3s;
  width: 0;
}
.gauge-bar-fill.over { background: var(--red); }
.gauge-allow-mark { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #B0B8C1; border-radius: 1px; }


#screen { flex: 1; padding: 8px 20px 120px; overflow-x: hidden; }
.screen-enter { animation: slideUp .35s cubic-bezier(.3, 0, .2, 1); }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }


.headline { font-size: 26px; font-weight: 800; line-height: 1.32; letter-spacing: -0.4px; margin: 20px 0 8px; word-break: keep-all; }
.headline .accent { color: var(--blue); }
.sub-text { font-size: 15px; color: var(--sub); margin-bottom: 24px; word-break: keep-all; }
.section-title { font-size: 16px; font-weight: 700; margin: 28px 0 12px; }
.section-title .hint { font-size: 12px; font-weight: 500; color: var(--sub); margin-left: 6px; }


.card {
  background: var(--card); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.pressable { cursor: pointer; transition: transform .12s ease, box-shadow .15s, border-color .15s; border: 1.5px solid transparent; }
.pressable:active { transform: scale(0.975); }
.selectable.selected { border-color: var(--blue); background: #FBFDFF; }
.card-title { font-size: 16px; font-weight: 700; }
.card-desc { font-size: 13px; color: var(--sub); margin-top: 2px; word-break: keep-all; }


.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 8px; vertical-align: middle; }
.badge.blue { background: var(--blue-bg); color: var(--blue); }
.badge.green { background: #E6F9F1; color: #00A661; }
.badge.gray { background: var(--bg); color: var(--sub2); }
.badge.orange { background: #FFF3E0; color: #E68A00; }
.badge.red { background: #FDEDEE; color: var(--red); }
.badge.purple { background: #F1EBFE; color: #8B5CF6; }

.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 10px 16px; border-radius: 100px; background: var(--card); border: 1.5px solid #E5E8EB;
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--sub2); cursor: pointer;
  transition: all .15s; user-select: none;
}
.chip:active { transform: scale(0.95); }
.chip.on { background: var(--blue-bg); border-color: var(--blue); color: var(--blue); }


#cta-bar {
  position: sticky; bottom: 0; z-index: 40;
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, rgba(242,244,246,0));
  display: none;
}
#cta-bar.visible { display: block; }
#cta-bar.preview-inline-cta { position: static; }
.legacy-selector-label {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

#arch-us-privacy-overlay {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #17221f;
  color: #fff;
}
#arch-us-privacy-overlay > div { display: grid; justify-items: center; gap: 8px; text-align: center; }
#arch-us-privacy-overlay span {
  width: 28px;
  height: 28px;
  margin-bottom: 5px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: privacy-spin .8s linear infinite;
}
#arch-us-privacy-overlay strong { font-size: 17px; }
#arch-us-privacy-overlay small { color: #bdc9c4; font-size: 11px; }
#arch-us-privacy-overlay[data-state="pending"] span { animation: none; border-color: #bdc9c4; border-top-color: #bdc9c4; }
#arch-us-privacy-overlay button {
  min-height: 44px;
  margin-top: 12px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 10px;
  background: #fff;
  color: #17221f;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
#arch-us-privacy-overlay button:focus-visible { outline: 3px solid #8ec5ff; outline-offset: 3px; }
@keyframes privacy-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #arch-us-privacy-overlay span { animation: none; } }
.btn {
  width: 100%; padding: 16px; border: none; border-radius: 16px;
  font-family: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
  transition: transform .12s, background .15s, opacity .15s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:active { background: var(--blue-dark); }
.btn-primary:disabled { background: #C5CCD3; cursor: default; transform: none; }
.btn-sub { background: var(--card); color: var(--sub2); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--blue); font-size: 14px; padding: 12px; }
.cta-note { font-size: 11px; color: var(--sub); text-align: center; margin-bottom: 8px; word-break: keep-all; }


.toggle { width: 48px; height: 28px; border-radius: 14px; background: #D7DCE2; position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0; border: none; }
.toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: left .2s cubic-bezier(.4, 0, .2, 1);
}
.toggle.on { background: var(--blue); }
.toggle.on::after { left: 23px; }
.toggle.locked { background: #A8C7F5; opacity: .8; cursor: default; }


.segment { display: flex; background: var(--bg); border-radius: 12px; padding: 3px; gap: 2px; }
.segment button {
  flex: 1; border: none; background: transparent; padding: 10px 6px; border-radius: 10px;
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--sub); cursor: pointer; transition: all .15s;
}
.segment button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }


.input {
  width: 100%; padding: 14px 16px; border: 1.5px solid #E5E8EB; border-radius: 14px;
  font-family: inherit; font-size: 16px; font-weight: 600; color: var(--text);
  background: var(--card); outline: none; transition: border-color .15s;
}
.input:focus { border-color: var(--blue); }
input[type="range"].slider {
  -webkit-appearance: none; width: 100%; height: 6px; border-radius: 3px;
  background: linear-gradient(to right, var(--blue) var(--pct, 40%), #E5E8EB var(--pct, 40%));
  outline: none; margin: 18px 0 6px;
}
input[type="range"].slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 2px solid var(--blue); box-shadow: 0 2px 8px rgba(49,130,246,0.35); cursor: pointer;
}
.big-num { font-size: 32px; font-weight: 800; letter-spacing: -0.5px; }
.big-num .unit { font-size: 18px; font-weight: 700; color: var(--sub2); }


.plan-canvas { width: 100%; border-radius: 14px; background: #FAFBFC; display: block; }


.expand-toggle { font-size: 13px; font-weight: 600; color: var(--blue); background: none; border: none; cursor: pointer; padding: 6px 0; font-family: inherit; }
.expand-body { margin-top: 10px; padding: 14px; background: var(--bg); border-radius: 14px; font-size: 13px; color: var(--sub2); }
.expand-body h5 { font-size: 12px; color: var(--text); margin: 10px 0 4px; }
.expand-body h5:first-child { margin-top: 0; }
.expand-body ul { padding-left: 16px; }
.expand-body li { margin: 2px 0; word-break: keep-all; }


.swatch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.swatch-card { background: var(--card); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); border: 1.5px solid transparent; cursor: pointer; transition: transform .12s, border-color .15s; position: relative; }
.swatch-card:active { transform: scale(0.97); }
.swatch-card.selected { border-color: var(--blue); background: #FBFDFF; }
.swatch-card.selected::after {
  content: ''; position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--blue) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') center no-repeat;
}
.swatch-img { width: 100%; height: 72px; border-radius: 10px; display: block; margin-bottom: 8px; }
.swatch-brand { font-size: 11px; color: var(--sub); font-weight: 600; }
.swatch-name { font-size: 13px; font-weight: 700; line-height: 1.3; margin: 1px 0 4px; word-break: keep-all; }
.swatch-price { font-size: 13px; font-weight: 700; color: var(--blue); }
.swatch-meta { font-size: 11px; color: var(--sub); margin-top: 4px; word-break: keep-all; }


.sheet-dim {
  position: fixed; inset: 0; background: rgba(25,31,40,0.5); z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-width: 480px; background: var(--card);
  border-radius: 24px 24px 0 0; padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
  max-height: 78vh; overflow-y: auto;
  animation: sheetUp .3s cubic-bezier(.3, 0, .2, 1);
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: #E5E8EB; margin: 0 auto 16px; }
.sheet-title { font-size: 19px; font-weight: 800; margin-bottom: 6px; word-break: keep-all; }
.sheet-desc { font-size: 14px; color: var(--sub); margin-bottom: 16px; word-break: keep-all; }


.toast {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
  background: rgba(45, 52, 62, 0.94); color: #fff; font-size: 14px; font-weight: 600;
  padding: 12px 20px; border-radius: 100px; z-index: 200; white-space: nowrap;
  animation: toastIn .25s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }


.est-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.est-row:last-child { border-bottom: none; }
.est-label { font-size: 14px; font-weight: 600; }
.est-basis { font-size: 11px; color: var(--sub); margin-top: 2px; word-break: keep-all; }
.est-amount { font-size: 14px; font-weight: 700; white-space: nowrap; text-align: right; }
.est-total-box { background: var(--blue-bg); border-radius: 14px; padding: 16px; margin-top: 14px; text-align: center; }
.est-total-box .range { font-size: 22px; font-weight: 800; color: var(--blue-dark); letter-spacing: -0.3px; }
.est-total-box .cap { font-size: 12px; color: var(--sub2); margin-top: 2px; }


#scene3d-wrap { border-radius: var(--radius); overflow: hidden; background: #1A1E27; position: relative; }
#scene3d-wrap canvas { display: block; width: 100%; }
.cam-chips { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.pipe-step { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.pipe-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--bg); color: var(--sub); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .3s; }
.pipe-step.active .pipe-dot { background: var(--blue); color: #fff; box-shadow: 0 0 0 4px var(--blue-bg); }
.pipe-step.done .pipe-dot { background: var(--green); color: #fff; }
.pipe-name { font-size: 14px; font-weight: 600; color: var(--sub); flex: 1; }
.pipe-step.active .pipe-name, .pipe-step.done .pipe-name { color: var(--text); }
.pipe-status { font-size: 12px; color: var(--sub); }
.render-result { position: relative; border-radius: var(--radius); overflow: hidden; }
.render-result img { width: 100%; display: block; }
.watermark {
  position: absolute; left: 10px; bottom: 10px;
  background: rgba(25, 31, 40, 0.66); color: rgba(255,255,255,0.92);
  font-size: 10px; font-weight: 600; padding: 5px 10px; border-radius: 8px; letter-spacing: 0.2px;
}
.qa-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; }
.qa-ico { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #fff; }
.qa-ico.ok { background: var(--green); }
.qa-ico.warn { background: var(--orange); }
.thumb-pair { display: flex; gap: 8px; margin-top: 10px; }
.thumb-pair figure { flex: 1; margin: 0; }
.thumb-pair img { width: 100%; border-radius: 10px; display: block; background: #10131A; }
.thumb-pair figcaption { font-size: 10px; color: var(--sub); text-align: center; margin-top: 4px; }


.case-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; scrollbar-width: none; }
.case-scroll::-webkit-scrollbar { display: none; }
.case-card { min-width: 168px; border-radius: 14px; padding: 12px; color: #fff; position: relative; overflow: hidden; }
.case-card .ct { font-size: 12px; font-weight: 700; position: relative; }
.case-card .cs { font-size: 10px; opacity: .85; position: relative; margin-top: 2px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.metric { background: var(--bg); border-radius: 12px; padding: 8px 6px; text-align: center; }
.metric .mv { font-size: 14px; font-weight: 800; }
.metric .mk { font-size: 10px; color: var(--sub); margin-top: 1px; }


.divider { height: 1px; background: var(--line); margin: 14px 0; }
.spec-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.small { font-size: 12px; color: var(--sub); word-break: keep-all; }
.check-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; cursor: pointer; }
.check-box { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid #D7DCE2; flex-shrink: 0; transition: all .15s; margin-top: 1px; }
.check-row.on .check-box {
  background: var(--blue) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') center no-repeat;
  border-color: var(--blue);
}
.tooltip-note { font-size: 11px; color: var(--sub); background: var(--bg); border-radius: 8px; padding: 4px 8px; display: inline-block; }
.done-hero { text-align: center; padding: 60px 0 30px; }
.done-hero .circle {
  width: 72px; height: 72px; border-radius: 50%; background: var(--blue-bg); margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  animation: pop .5s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
.fit-badge { font-size: 12px; font-weight: 800; color: var(--blue); background: var(--blue-bg); border-radius: 10px; padding: 4px 10px; }


.timeline-row {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.timeline-row::-webkit-scrollbar { display: none; }
.timeline-chip { flex-shrink: 0; white-space: nowrap; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.timeline-chip .tl-num {
  width: 16px; height: 16px; border-radius: 50%; background: #E5E8EB; color: var(--sub);
  font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.timeline-chip.on .tl-num { background: var(--blue); color: #fff; }
.work-card .work-status { font-size: 12px; font-weight: 700; color: var(--sub); flex-shrink: 0; }
.work-card .work-status.on { color: var(--blue); }
.work-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.work-sheet-summary { display: flex; gap: 8px; }
.wss-item { flex: 1; background: var(--bg); border-radius: 12px; padding: 10px 12px; text-align: center; }
.wss-cap { font-size: 11px; color: var(--sub); font-weight: 600; }
.wss-val { font-size: 14px; font-weight: 800; margin-top: 2px; white-space: nowrap; }
.pro-tip { margin-top: 10px; padding: 12px 14px; background: var(--blue-bg); border-radius: 12px; font-size: 13px; color: #1B64DA; word-break: keep-all; }
.sheet-btn-row { display: flex; gap: 8px; margin-top: 16px; }
.sheet-btn-row .btn { flex: 1; }


.cat-tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin-top: 4px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }

.cat-tabs-wrap { position: relative; }
.cat-tabs-wrap::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 10px; width: 28px;
  background: linear-gradient(to right, rgba(242,244,246,0), var(--bg) 85%);
  pointer-events: none;
}
.cat-chip { flex-shrink: 0; white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.cat-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); display: inline-block; }
.subcat-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.sub-chip { font-size: 12px; padding: 6px 12px; }


.bw-progress { display: flex; gap: 4px; margin: 10px 0 12px; }
.bw-progress .bw-seg { flex: 1; height: 4px; border-radius: 2px; background: #E5E8EB; transition: background .2s; }
.bw-progress .bw-seg.on { background: var(--blue); }
.bw-cap { font-size: 13px; font-weight: 800; color: var(--blue); }
#bw-content { margin-top: 12px; }
.sheet-swatch { width: 100%; height: 150px; border-radius: 14px; display: block; border: 1px solid rgba(0,0,0,0.06); }
.mat-sheet-price { margin-top: 8px; display: flex; align-items: baseline; }
.source-link {
  display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--blue);
  text-decoration: none; padding: 8px 0;
}


.gear-btn {
  width: 32px; height: 32px; border-radius: 10px; border: none; background: var(--bg);
  color: var(--sub2); font-size: 16px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.gear-btn:active { background: #E5E8EB; }


.biz-entry {
  text-align: center; font-size: 13px; color: var(--sub2); font-weight: 600;
  margin-top: 18px; padding: 14px; background: var(--card); border-radius: 16px;
  box-shadow: var(--shadow); cursor: pointer; transition: transform .12s;
}
.biz-entry:active { transform: scale(0.98); }

.biz-header {
  position: sticky; top: 0; z-index: 45;
  background: rgba(242, 244, 246, 0.94); backdrop-filter: blur(12px);
  margin: 0 -20px; padding: 14px 20px 0;
  border-bottom: 1px solid #E5E8EB;
}
.biz-name { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; }
.biz-sub { font-size: 11px; color: var(--sub); font-weight: 600; margin-top: 1px; }
.biz-exit {
  border: none; background: var(--card); color: var(--sub2); font-family: inherit;
  font-size: 12px; font-weight: 700; padding: 8px 12px; border-radius: 10px;
  box-shadow: var(--shadow); cursor: pointer; flex-shrink: 0;
}
.biz-tabs { display: flex; gap: 2px; margin-top: 10px; }
.biz-tab {
  flex: 1; border: none; background: transparent; font-family: inherit;
  font-size: 13px; font-weight: 700; color: var(--sub); padding: 10px 2px;
  border-bottom: 2.5px solid transparent; cursor: pointer; transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.biz-tab.on { color: var(--blue); border-bottom-color: var(--blue); }

.biz-filter-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }

.biz-thumb {
  width: 84px; height: 62px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; position: relative; overflow: hidden;
}
.biz-thumb-label {
  background: rgba(25,31,40,0.55); color: #fff; font-size: 9px; font-weight: 700;
  padding: 3px 7px; border-radius: 7px;
}
.biz-render-hero {
  height: 150px; border-radius: var(--radius); margin-bottom: 4px;
  display: flex; align-items: flex-end; padding: 10px;
}

.biz-gauge { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.biz-gauge-fill { height: 100%; border-radius: 4px; transition: width .45s cubic-bezier(.4,0,.2,1); }


.biz-range-viz { position: relative; }
.biz-range-track { position: relative; height: 22px; background: var(--bg); border-radius: 8px; overflow: hidden; }
.biz-range-bar { position: absolute; border-radius: 6px; transition: left .2s, width .2s; }
.biz-range-bar.platform { top: 3px; height: 7px; background: var(--blue); opacity: .8; }
.biz-range-bar.mine { bottom: 3px; height: 7px; background: var(--green); }


.kanban-col { margin-bottom: 18px; }
.kanban-col-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.kanban-col-title { font-size: 14px; font-weight: 800; }
.kanban-card { padding: 16px; }
.biz-contact-box { background: #E6F9F1; border-radius: 12px; padding: 12px; }


.pf-visual {
  width: 92px; height: 92px; border-radius: 14px; flex-shrink: 0;
  position: relative; overflow: hidden;
}
.pf-palette { position: absolute; left: 6px; bottom: 6px; display: flex; gap: 4px; }
.pf-dot {
  width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.85);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2); display: inline-block;
}
.pf-color {
  width: 52px; height: 40px; border: 1.5px solid #E5E8EB; border-radius: 10px;
  background: var(--card); padding: 3px; cursor: pointer;
}


.site-seg { max-width: 100%; }
.site-seg button { font-size: 12px; }
.site-header .biz-tabs { margin-top: 8px; }


.site-steps { display: flex; justify-content: space-between; gap: 4px; }
.site-step { flex: 1; text-align: center; }
.site-step .ss-dot {
  width: 26px; height: 26px; border-radius: 50%; background: var(--bg); color: var(--sub);
  font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  margin: 0 auto; transition: all .25s;
}
.site-step.done .ss-dot { background: var(--green); color: #fff; }
.site-step .ss-label { font-size: 10px; color: var(--sub); font-weight: 700; margin-top: 4px; }
.site-step.done .ss-label { color: var(--green); }


.ms-card.locked { opacity: .78; }
.ms-card.paid { border: 1.5px solid #C9F0DD; background: #FBFFFD; }


.hash-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; background: var(--bg); color: var(--sub2);
  padding: 3px 8px; border-radius: 8px; word-break: break-all; display: inline-block;
}


.log-photo-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.log-photo { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--bg); }


.chat-notice {
  font-size: 11px; color: #8A6D3B; background: #FFFBF2; border: 1px solid #FBE7C6;
  border-radius: 10px; padding: 7px 11px; margin: 10px 0 6px; line-height: 1.5; word-break: keep-all;
}
.chat-list {
  padding: 6px 2px 10px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  height: calc(100vh - 320px); min-height: 260px; background: #EBEEF2;
  border-radius: 16px; margin: 0 -4px;
}
.chat-day { text-align: center; margin: 12px 0 8px; }
.chat-day span {
  font-size: 10.5px; color: #6B7684; background: rgba(255,255,255,.7);
  padding: 3px 12px; border-radius: 999px; font-weight: 700;
}
.chat-row { display: flex; margin: 4px 8px; align-items: flex-end; gap: 6px; }
.chat-row.me { justify-content: flex-end; }
.chat-av {
  width: 30px; height: 30px; border-radius: 50%; background: #3182F6; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800;
  flex: 0 0 auto; margin-bottom: 16px;
}
.chat-stack { min-width: 0; max-width: 82%; }
.chat-name { font-size: 11px; color: #4E5968; font-weight: 700; margin: 0 0 3px 4px; }
.chat-bubwrap { display: flex; align-items: flex-end; gap: 5px; }
.chat-bubwrap.me { flex-direction: row; justify-content: flex-end; }
.chat-bubble {
  background: #fff; border-radius: 4px 16px 16px 16px;
  padding: 9px 13px; font-size: 14px; line-height: 1.45; box-shadow: 0 1px 1px rgba(0,0,0,.05);
  word-break: break-word; max-width: 100%;
}
.chat-bubble.me { background: var(--blue); color: #fff; border-radius: 16px 4px 16px 16px; }
.chat-text { white-space: pre-wrap; }
.chat-imgs { display: flex; flex-wrap: wrap; gap: 4px; }
.chat-img { width: 130px; height: 130px; object-fit: cover; border-radius: 10px; cursor: pointer; display: block; }
.chat-imgs + .chat-text { margin-top: 6px; }
.chat-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; margin-bottom: 1px; white-space: nowrap; }
.chat-bubwrap:not(.me) .chat-meta { align-items: flex-start; }
.chat-time { font-size: 9.5px; color: #97A0AB; }
.chat-read { font-size: 9.5px; color: #97A0AB; font-weight: 700; }
.chat-read.on { color: #FFC94D; }
.chat-empty { text-align: center; color: #8B95A1; font-size: 13px; padding: 40px 20px; white-space: pre-line; line-height: 1.6; }
.chat-sys {
  text-align: center; font-size: 11px; color: #6B7684; background: rgba(255,255,255,.65);
  border-radius: 10px; padding: 7px 12px; margin: 10px 24px; word-break: keep-all; line-height: 1.5;
}

.chat-bubble.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.chat-bubble.typing .td { width: 6px; height: 6px; border-radius: 50%; background: #B0B8C1; animation: chatTd 1.2s infinite ease-in-out; }
.chat-bubble.typing .td:nth-child(2) { animation-delay: .18s; }
.chat-bubble.typing .td:nth-child(3) { animation-delay: .36s; }
@keyframes chatTd { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.chat-event {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #E5E8EB;
  border-radius: 14px; padding: 11px 13px; margin: 8px 20px; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.chat-event-ico { font-size: 20px; flex: 0 0 auto; }
.chat-event-title { font-size: 13px; font-weight: 800; color: #191F28; }
.chat-event-desc { font-size: 11.5px; color: #8B95A1; margin-top: 2px; }
.chat-event-btn { flex: 0 0 auto; background: #EAF2FE; color: #3182F6; border: none; border-radius: 9px; padding: 8px 12px; font-size: 12px; font-weight: 700; }

.chat-composer { position: sticky; bottom: 0; background: var(--bg); padding: 8px 0 4px; margin-top: 4px; }
.chat-composer-row { display: flex; gap: 7px; align-items: center; }
.chat-plus {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%; border: none; background: #EDF0F3;
  color: #4E5968; font-size: 22px; font-weight: 600; line-height: 1;
}
.chat-input {
  flex: 1; min-width: 0; border: 1px solid #E5E8EB; border-radius: 21px; padding: 11px 16px;
  font-size: 14px; background: #fff; outline: none;
}
.chat-input:focus { border-color: var(--blue); }
.chat-send { flex: 0 0 auto; background: var(--blue); color: #fff; border: none; border-radius: 21px; padding: 11px 18px; font-size: 14px; font-weight: 700; min-height: 42px; }
.chat-attach-preview { display: flex; gap: 6px; padding: 6px 2px 8px; flex-wrap: wrap; }
.chat-attach-thumb { position: relative; }
.chat-attach-thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; display: block; }
.chat-attach-x { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: none; background: #191F28; color: #fff; font-size: 13px; line-height: 1; }

.photo-viewer { position: fixed; inset: 0; z-index: 10001; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; }
.pv-img { max-width: 94vw; max-height: 82vh; object-fit: contain; border-radius: 6px; }
.pv-close { position: absolute; top: 16px; right: 18px; width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255,255,255,.15); color: #fff; font-size: 24px; }
.pv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 60px; border: none; background: rgba(255,255,255,.12); color: #fff; font-size: 30px; border-radius: 10px; }
.pv-prev { left: 10px; } .pv-next { right: 10px; }
.pv-counter { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: #fff; font-size: 13px; font-weight: 700; }

.na-card { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #3182F6, #1B64DA); color: #fff; cursor: pointer; }
.na-card .na-ico { font-size: 26px; flex: 0 0 auto; }
.na-card .na-label { font-size: 11px; font-weight: 700; opacity: .85; }
.na-card .na-title { font-size: 16px; font-weight: 800; margin-top: 2px; }
.na-card .na-desc { font-size: 12px; opacity: .9; margin-top: 3px; line-height: 1.4; }
.na-card .na-arrow { font-size: 26px; font-weight: 700; opacity: .9; flex: 0 0 auto; }


.tab-badge {
  display: inline-block; min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px;
  background: #F04452; color: #fff; font-size: 10px; font-weight: 800; border-radius: 999px;
  margin-left: 4px; vertical-align: middle;
}


.auth-btns { display: flex; gap: 8px; }
.auth-btn { flex: 1; border: none; border-radius: 12px; padding: 13px; font-size: 14px; font-weight: 800; min-height: 48px; }
.auth-btn.kakao { background: #FEE500; color: #191600; }
.auth-btn.pass { background: #E5175E; color: #fff; }
.auth-done { display: flex; align-items: center; gap: 10px; background: #F0FDF6; border: 1px solid #C4EFD9; border-radius: 12px; padding: 11px 13px; }
.auth-chk { width: 24px; height: 24px; border-radius: 50%; background: #00A661; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: 0 0 auto; }
.sign-canvas-wrap { position: relative; margin-top: 6px; border: 1.5px dashed #C5CAD1; border-radius: 12px; background: #FBFCFD; overflow: hidden; }
.sign-canvas { display: block; width: 100%; height: 180px; touch-action: none; position: relative; z-index: 1; cursor: crosshair; }
.sign-canvas-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #C5CAD1; font-size: 20px; font-weight: 800; pointer-events: none; z-index: 0; }
.sign-clear { margin-top: 8px; padding: 10px; font-size: 13px; }
.sign-done { display: flex; align-items: center; gap: 12px; }
.sign-img-done { width: 90px; height: 54px; object-fit: contain; border: 1px solid #E5E8EB; border-radius: 8px; background: #fff; flex: 0 0 auto; }

.contract-doc { font-size: 13px; line-height: 1.6; color: #333D4B; }
.cdoc-row { display: flex; gap: 8px; padding: 5px 0; border-bottom: 1px solid #F2F4F6; }
.cdoc-k { flex: 0 0 92px; color: #8B95A1; font-weight: 700; }
.cdoc-v { flex: 1; color: #191F28; font-weight: 600; }
.cdoc-h { font-weight: 800; color: #191F28; margin: 14px 0 6px; font-size: 13.5px; }
.cdoc-p { color: #4E5968; margin: 3px 0; padding-left: 2px; }


.addr-item { padding: 14px 16px; margin-bottom: 8px; }
.addr-item.addr-disabled { opacity: .55; }
.addr-item.addr-disabled:active { transform: none; }




.chip { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.timeline-chip { min-height: 44px; }
.cat-chip { min-height: 44px; }
.segment button { min-height: 44px; }
.biz-tab { min-height: 44px; }
.expand-toggle { min-height: 44px; display: inline-flex; align-items: center; }
.source-link { min-height: 44px; }

.chip.sub-chip { min-height: 40px; }


.sheet .sheet-btn-row {
  position: sticky; bottom: 0; z-index: 3;
  margin: 16px -20px calc(-24px - env(safe-area-inset-bottom));
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
  background: var(--card);
  box-shadow: 0 -6px 14px -6px rgba(25, 31, 40, 0.14);
}


.card.acc { padding: 0; overflow: hidden; }
.acc-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px; cursor: pointer; min-height: 44px; user-select: none;
}
.acc-head:active { background: rgba(0, 0, 0, 0.02); }
.acc-headmain { flex: 1; min-width: 0; }
.acc-headmain .acc-title { font-size: 16px; font-weight: 700; color: var(--text); }
.acc-head .section-title { margin: 0; flex: 1; }
.acc-sub { font-size: 12px; color: var(--sub); margin-top: 2px; word-break: keep-all; }
.acc-chev {
  width: 18px; height: 18px; flex-shrink: 0; transition: transform .2s;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="%238B95A1" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>') center/contain no-repeat;
}
.acc-chev.open { transform: rotate(180deg); }
.acc-body { padding: 2px 4px 10px; }
.acc-body > .card, .acc-body .card { box-shadow: none; margin: 0 0 8px; }
.acc-body .card:last-child { margin-bottom: 0; }
.acc-body .section-title { margin-top: 6px; }
.acc-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 8px; flex-shrink: 0; }


.date-field { text-align: left; cursor: pointer; display: block; }
.date-field.date-field-empty { color: var(--sub); }
.date-field-disabled { opacity: .55; cursor: default; }
.date-picker-row { display: flex; gap: 8px; margin: 4px 0 4px; }
.date-picker-col { flex: 1; }
.date-select {
  width: 100%; padding: 12px 10px; border: 1.5px solid #E5E8EB; border-radius: 12px;
  font-family: inherit; font-size: 15px; font-weight: 600; color: var(--text);
  background: var(--card); outline: none; -webkit-appearance: none; appearance: none;
  text-align: center; min-height: 44px;
}
.date-select:focus { border-color: var(--blue); }


.file-field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-native { display: none; }
.file-btn {
  border: 1.5px solid var(--blue); background: var(--blue-bg); color: var(--blue);
  font-family: inherit; font-size: 14px; font-weight: 700; padding: 11px 18px;
  border-radius: 12px; cursor: pointer; min-height: 44px; flex-shrink: 0;
  transition: transform .12s;
}
.file-btn:active { transform: scale(0.97); }
.file-name { font-size: 13px; color: var(--sub2); font-weight: 600; word-break: break-all; }


.home-footer { margin-top: 28px; padding-top: 18px; border-top: 1px solid #E5E8EB; }
.home-footer-label { font-size: 12px; color: var(--sub); font-weight: 700; margin-bottom: 10px; text-align: center; }
.home-footer .biz-entry { margin-top: 0; }
.home-footer .biz-entry + .biz-entry { margin-top: 8px; }




#account-chip {
  position: fixed; top: 12px; right: 14px; z-index: 40;
  min-width: 40px; height: 40px; padding: 0 6px; border: none; border-radius: 20px;
  background: var(--card); box-shadow: var(--shadow); cursor: pointer;
  display: none; align-items: center; justify-content: center; gap: 6px;
  font-family: inherit; font-size: 13px; font-weight: 700; color: var(--blue);
}
#account-chip.visible { display: inline-flex; }
#account-chip.guest { padding: 0 16px; }
.chip-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800;
}


.auth-top { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; }
.auth-back {
  width: 40px; height: 40px; border-radius: 12px; border: none; background: var(--card);
  box-shadow: var(--shadow); color: var(--text); cursor: pointer; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.auth-top-label { font-size: 15px; font-weight: 700; color: var(--text); }


.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 20px; }
.auth-brand-logo {
  width: 56px; height: 56px; border-radius: 18px; background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800;
}
.auth-brand-name { font-size: 16px; font-weight: 800; color: var(--text); }


.social-kakao { background: #FEE500; color: #191600; margin-top: 8px; }
.social-naver { background: #03C75A; color: #fff; margin-top: 10px; }
.social-ico { display: inline-block; margin-right: 8px; font-weight: 900; }

body[data-step="auth"] {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 78% 16%, rgba(49,130,246,.26), transparent 34%),
    linear-gradient(145deg, #071126 0%, #0C1B3A 55%, #123872 100%);
}
body[data-step="auth"] #app { background: transparent; box-shadow: none; }
body[data-step="auth"] #screen { padding-bottom: max(28px, env(safe-area-inset-bottom)); }
.google-auth-screen { max-width: 520px; margin: 0 auto; }
.google-auth-screen .auth-top { margin-top: max(8px, env(safe-area-inset-top)); }
.google-auth-screen .auth-back {
  background: rgba(255,255,255,.1); color: #fff; box-shadow: none; border: 1px solid rgba(255,255,255,.14);
}
.google-auth-screen .auth-top-label { color: rgba(255,255,255,.74); }
.google-auth-card {
  margin-top: 24px; padding: 28px 22px 22px; border-radius: 24px;
  background: rgba(255,255,255,.98); box-shadow: 0 24px 70px rgba(0,0,0,.28);
}
.google-auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; }
.google-auth-mark {
  width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: linear-gradient(145deg, #3182F6, #165DCE); font-size: 22px; font-weight: 900;
  box-shadow: 0 8px 18px rgba(49,130,246,.28);
}
.google-auth-brand-name { color: #141B2A; font-size: 18px; line-height: 1.1; font-weight: 900; }
.google-auth-brand-sub { color: #8B95A1; font-size: 10px; font-weight: 800; letter-spacing: .08em; margin-top: 4px; }
.google-auth-kicker { color: #3182F6; font-size: 11px; font-weight: 900; letter-spacing: .13em; }
.google-auth-title { color: #141B2A; font-size: clamp(28px, 7.6vw, 38px); line-height: 1.08; letter-spacing: -.035em; margin: 10px 0 12px; }
.google-auth-copy { color: #6B7684; font-size: 15px; line-height: 1.6; margin: 0 0 24px; }
.google-signin-slot { width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: center; }
.google-signin-slot > div, .google-signin-slot iframe { max-width: 100% !important; }
.google-signin-button {
  width: 100%; min-height: 52px; border: 1px solid #DADCE0; border-radius: 10px; background: #fff;
  display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 18px;
  color: #202124; font: 600 15px/1.2 Arial, sans-serif; cursor: pointer; transition: background .15s, box-shadow .15s, transform .12s;
}
.google-signin-button:active { transform: scale(.985); background: #F8FAFD; }
.google-signin-button:disabled { cursor: wait; opacity: .72; }
.google-signin-button.is-busy::after {
  content: ''; width: 15px; height: 15px; border: 2px solid #DADCE0; border-top-color: #4285F4; border-radius: 50%;
  animation: spin .7s linear infinite;
}
.google-g {
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: #4285F4; background: #fff; border: 1px solid #E3E6EA; font: 800 15px/1 Arial, sans-serif;
}
.google-signin-loading { color: #6B7684; font-size: 13px; }
.google-auth-mode-note { min-height: 18px; color: #8B95A1; font-size: 11px; line-height: 1.5; text-align: center; margin-top: 10px; }
.google-auth-trust {
  display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #EDF0F3;
}
.google-auth-trust > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.google-auth-trust strong { color: #333D4B; font-size: 12px; }
.google-auth-trust span { color: #8B95A1; font-size: 11px; text-align: right; }
.google-auth-card .auth-legal-note { margin-top: 20px; }

@media (min-width: 700px) {
  body[data-step="auth"] #screen { padding: 30px 32px 54px; }
  .google-auth-card { margin-top: 38px; padding: 38px 40px 30px; border-radius: 28px; }
  .google-auth-trust { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .google-auth-trust > div { display: block; }
  .google-auth-trust strong, .google-auth-trust span { display: block; text-align: left; }
  .google-auth-trust span { margin-top: 4px; line-height: 1.4; }
}


.auth-divider { display: flex; align-items: center; text-align: center; margin: 18px 0; color: var(--sub); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: #E5E8EB; }
.auth-divider span { padding: 0 12px; }

.auth-legal-note { font-size: 12px; color: var(--sub); text-align: center; margin-top: 18px; line-height: 1.6; }


.field { display: block; }
.field-label { display: block; font-size: 12px; font-weight: 700; color: var(--sub2); margin-bottom: 6px; }
.field-err { font-size: 12px; color: var(--red); margin-top: 6px; display: none; font-weight: 600; }
.input-err { border-color: var(--red) !important; }


.link-text { color: var(--blue); font-weight: 700; cursor: pointer; }
.link-text.danger { color: var(--red); }
.auth-legal-link {
  display: inline; min-height: 0; padding: 0; border: 0; background: transparent;
  color: var(--blue); font: inherit; font-weight: 700; line-height: inherit; vertical-align: baseline;
}
.auth-legal-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 3px; }


.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-card {
  border: 1.5px solid #E5E8EB; border-radius: 14px; padding: 14px; cursor: pointer;
  background: var(--card); transition: border-color .15s, background .15s;
}
.role-card.on { border-color: var(--blue); background: #FBFDFF; }
.role-card-title { font-size: 14px; font-weight: 700; color: var(--text); }
.role-card-desc { font-size: 12px; color: var(--sub); margin-top: 4px; word-break: keep-all; }


.pw-meter { height: 5px; border-radius: 3px; background: #EDF0F3; margin-top: 8px; overflow: hidden; }
.pw-meter-fill { height: 100%; width: 0; border-radius: 3px; transition: width .25s, background .25s; background: var(--red); }
.pw-meter-fill.weak { background: var(--red); }
.pw-meter-fill.ok { background: var(--orange); }
.pw-meter-fill.strong { background: var(--green); }


.agree-card { padding: 14px 18px; }
.agree-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; cursor: pointer; }
.agree-all { padding-top: 2px; }
.chk {
  width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #D7DCE2; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; transition: all .15s; margin-top: 1px;
}
.chk.on { background: var(--blue); border-color: var(--blue); }
.chk.on::after { content: '✓'; color: #fff; font-size: 13px; font-weight: 900; }
.agree-label { font-size: 13px; color: var(--sub2); line-height: 1.5; word-break: keep-all; }
.agree-label .req { color: var(--blue); font-weight: 700; }
.agree-label .opt { color: var(--sub); font-weight: 700; }


.code-input { text-align: center; letter-spacing: 8px; font-size: 22px; font-weight: 800; }
.dev-hint {
  background: #FFF8E1; border: 1px dashed #F0C000; border-radius: 12px; padding: 12px 14px;
  font-size: 13px; color: #8A6D00; margin-bottom: 12px; line-height: 1.5;
}


.verify-done { text-align: center; margin-top: 40px; }
.verify-check {
  width: 64px; height: 64px; border-radius: 50%; background: #E6F9F1; color: var(--green);
  display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 900; margin: 0 auto 16px;
}


.account-hero { display: flex; align-items: center; gap: 14px; margin: 12px 0 16px; }
.account-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; flex-shrink: 0;
}
.account-name { font-size: 18px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 8px; }
.account-email { font-size: 13px; color: var(--sub); margin-top: 2px; }
.account-role { font-size: 12px; color: var(--blue); font-weight: 700; margin-top: 4px; }
.verified-badge { font-size: 11px; font-weight: 700; color: var(--green); background: #E6F9F1; padding: 2px 8px; border-radius: 8px; }

.notice-card {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: #FFF8E1; border-radius: 14px; padding: 14px 16px; margin-bottom: 12px;
  font-size: 13px; color: #8A6D00; cursor: pointer; font-weight: 600; word-break: keep-all;
}

.account-section { padding: 16px 18px; }
.account-section-title { font-size: 13px; font-weight: 800; color: var(--text); margin-bottom: 12px; }
.kv { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; color: var(--sub2); }
.kv strong { color: var(--text); }
.verified-inline { font-size: 13px; color: var(--green); font-weight: 700; margin-top: 8px; }
.proj-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.proj-row:last-child { border-bottom: none; }


.switch { width: 48px; height: 28px; border-radius: 14px; background: #D7DCE2; position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0; }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transition: left .2s cubic-bezier(.4,0,.2,1); }
.switch.on { background: var(--blue); }
.switch.on .switch-knob { left: 23px; }

.btn-danger { background: var(--red); color: #fff; }


.oauth-sim { text-align: center; padding: 8px 0 4px; }
.oauth-sim-logo { width: 52px; height: 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 900; margin-bottom: 12px; }
.oauth-sim-logo.kakao { background: #FEE500; color: #191600; }
.oauth-sim-logo.naver { background: #03C75A; color: #fff; }
.oauth-sim-title { font-size: 16px; font-weight: 700; color: var(--text); }
.oauth-sim-desc { font-size: 13px; color: var(--sub); margin-top: 6px; word-break: keep-all; }
.oauth-sim-badge { font-size: 11px; color: var(--sub); background: var(--bg); border-radius: 8px; padding: 8px 10px; margin-top: 12px; }


.legal-tabs { display: flex; gap: 8px; margin: 14px 0; }
.legal-tab { flex: 1; padding: 10px; border: 1.5px solid #E5E8EB; border-radius: 12px; background: var(--card); font-family: inherit; font-size: 13px; font-weight: 700; color: var(--sub); cursor: pointer; }
.legal-tab.on { border-color: var(--blue); color: var(--blue); background: #FBFDFF; }
.legal-body { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.legal-section { margin-bottom: 18px; }
.legal-section:last-child { margin-bottom: 0; }
.legal-section h4 { font-size: 14px; font-weight: 800; color: var(--text); margin: 0 0 6px; }
.legal-section p { font-size: 13px; color: var(--sub2); line-height: 1.7; margin: 0; word-break: keep-all; }




.swatch-info {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  width: 24px; height: 24px; border-radius: 50%; border: none; padding: 0;
  background: rgba(255,255,255,0.92); color: var(--blue);
  font-size: 13px; font-weight: 800; line-height: 24px; text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.14); cursor: pointer;
}
.swatch-info:active { transform: scale(0.9); }


.mat-seq { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 0 0 12px; }
.mat-seq-count { font-size: 11px; font-weight: 800; color: #fff; background: var(--blue); border-radius: 8px; padding: 3px 8px; margin-right: 2px; }
.mat-seq-step {
  font-size: 12px; font-weight: 700; color: var(--sub); background: var(--bg);
  border-radius: 9px; padding: 5px 10px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s;
}
.mat-seq-step.cur { color: var(--blue); background: var(--blue-bg); }
.mat-seq-step.done { color: #00A661; background: #E6F9F1; }
.mat-seq-step.done.cur { box-shadow: 0 0 0 1.5px var(--blue) inset; }
.mat-seq-arrow { color: #C5CCD3; font-weight: 800; font-size: 13px; }


.cat-dot { background: #C5CCD3; }
.cat-dot.done { background: var(--green); }


.sheet:focus { outline: none; }


.mat-photo-box { background: #F8FAFC; border: 1px solid #EDF0F3; border-radius: 12px; padding: 12px 14px; margin-top: 12px; }


.defect-add-btn {
  border: 1px solid #FBD5D8; background: #FDEDEE; color: var(--red);
  font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 8px;
  cursor: pointer; flex-shrink: 0; font-family: inherit;
}
.photo-board-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 10px; }
.photo-board-item { margin: 0; border-radius: 10px; overflow: hidden; border: 1px solid #EDF0F3; }
.photo-board-item img { width: 100%; height: 84px; object-fit: cover; display: block; }
.photo-board-item figcaption { font-size: 9.5px; color: var(--sub); padding: 3px 6px; background: #FAFBFC; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.live-studio {
  margin: 18px 0 6px; padding: 20px; border-radius: 20px;
  color: #F8FAFC; background: linear-gradient(145deg, #141B2A, #222D43);
  box-shadow: 0 16px 36px rgba(14, 25, 45, .22);
}
.live-eyebrow { font-size: 10px; font-weight: 900; letter-spacing: .16em; color: #7DD3FC; }
.live-title { margin-top: 7px; font-size: 20px; line-height: 1.2; font-weight: 850; letter-spacing: -.02em; }
.live-copy { margin-top: 6px; color: #AEBBD0; font-size: 12px; line-height: 1.5; }
.live-product-tabs {
  display: flex; gap: 6px; overflow-x: auto; padding: 16px 0 10px; scrollbar-width: none;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.live-product-tabs::-webkit-scrollbar { display: none; }
.live-tab {
  flex: 0 0 auto; border: 1px solid rgba(255,255,255,.16); border-radius: 999px;
  padding: 8px 12px; background: rgba(255,255,255,.06); color: #B9C5D8;
  min-height: 44px; font: 750 11px/1 inherit; cursor: pointer; scroll-snap-align: start;
}
.live-tab.on { color: #0F172A; background: #F8FAFC; border-color: #F8FAFC; }
.live-product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 8px; }
.live-product-card {
  position: relative; min-width: 0; padding: 0 0 11px; overflow: hidden; text-align: left;
  border: 1.5px solid rgba(255,255,255,.12); border-radius: 14px;
  background: rgba(255,255,255,.075); color: #fff; cursor: pointer;
  font-family: inherit; transition: transform .14s, border-color .14s, background .14s;
}
.live-product-card:hover { transform: translateY(-2px); background: rgba(255,255,255,.11); }
.live-product-card.selected { border-color: #38BDF8; box-shadow: 0 0 0 2px rgba(56,189,248,.18); }
.live-product-card.selected::after {
  content: '✓'; position: absolute; top: 7px; right: 7px; width: 22px; height: 22px;
  display: grid; place-items: center; border-radius: 50%; background: #0284C7;
  color: #fff; font-size: 12px; font-weight: 900;
}
.live-product-swatch { width: 100%; height: 72px; display: block; object-fit: cover; }
.live-product-tier { display: block; margin: 9px 9px 0; color: #7DD3FC; font-size: 8px; font-weight: 900; letter-spacing: .11em; }
.live-product-name { display: block; margin: 3px 9px 0; color: #F8FAFC; font-size: 11px; line-height: 1.25; font-weight: 800; }
.live-product-code { display: block; margin: 3px 9px 0; color: #7F8CA3; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-update-status { display: flex; gap: 7px; align-items: center; margin-top: 12px; color: #B9C5D8; font-size: 10.5px; }
.live-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 4px rgba(34,197,94,.12); }
.live-dot.pulse { animation: livePulse .7s ease-out; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(56,189,248,.55); } 100% { box-shadow: 0 0 0 9px rgba(56,189,248,0); } }

.cam-chips {
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.cam-chips::-webkit-scrollbar { display: none; }
.cam-chips .chip { flex: 0 0 auto; scroll-snap-align: start; }

.variant-render-card { overflow: hidden; }
.variant-label { margin-top: 10px; color: #8B95A1; font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.variant-label:first-child { margin-top: 0; }
.variant-option-row {
  display: flex; gap: 6px; margin-top: 7px; overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: none; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.variant-option-row::-webkit-scrollbar { display: none; }
.variant-chip {
  flex: 0 0 auto; border: 1px solid #E5E8EB; border-radius: 999px; padding: 8px 11px;
  min-height: 44px; color: #6B7684; background: #fff; font: 750 11px/1 inherit; cursor: pointer;
  scroll-snap-align: start;
}
.variant-chip.on { color: #1D4ED8; border-color: #93C5FD; background: #EFF6FF; }
.variant-progress { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #EFF6FF; color: #2563EB; font-size: 11px; font-weight: 750; gap:8px; }
.variant-progress-copy { min-width:0; }
.variant-progress-track { display:block; width:100%; height:6px; overflow:hidden; border-radius:999px; background:#cfe0ff; }
.variant-progress-fill { display:block; width:0; height:100%; border-radius:inherit; background:#2563eb; transition:width .25s ease; }
.variant-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.variant-gallery:empty { display: none; }
.variant-result-card { min-width: 0; overflow: hidden; border: 1px solid #E9EDF2; border-radius: 14px; background: #fff; }
.variant-image-wrap { aspect-ratio: 4 / 3; background: #111827; overflow: hidden; }
.variant-image-wrap img { width: 100%; height: 100%; display: block; object-fit: cover; }
.variant-result-meta { display: flex; align-items: center; gap: 5px; padding: 9px 9px 3px; }
.variant-result-style { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #191F28; font-size: 10.5px; font-weight: 850; }
.variant-result-angle { flex: 0 0 auto; margin-left: auto; color: #6B7684; font-size: 9px; }
.variant-product-lock { padding: 2px 9px 9px; color: #059669; font-size: 8.5px; font-weight: 750; }
.variant-error { min-height: 90px; display: grid; place-items: center; padding: 12px; background: #FFF4F4; color: #DC2626; text-align: center; font-size: 11px; font-weight: 750; }

@media (max-width: 420px) {
  .live-studio { padding: 17px 15px; }
  .live-product-grid { gap: 6px; }
  .live-product-name { font-size: 10px; }
  .variant-gallery { gap: 8px; }
}

body[data-step="studio"] { background: #E8EDF4; }
body[data-step="studio"] #app { background: #F4F6F9; }
body[data-step="studio"] #screen { padding-bottom: 48px; }
.preview-hero { max-width: 720px; }
.preview-kicker {
  margin-top: 18px; color: #2563EB; font-size: 10px; font-weight: 900;
  letter-spacing: .16em;
}
.preview-hero .headline { margin-top: 8px; }
.preview-consultation-grid { display: grid; gap: 16px; align-items: stretch; }
.preview-scene-panel {
  min-width: 0; padding: 14px; border: 1px solid #E5EAF0; border-radius: 22px;
  background: #FFFFFF; box-shadow: var(--shadow);
}
.preview-panel-heading { display: flex; align-items: center; gap: 10px; padding: 0 2px 10px; }
.preview-panel-title { color: #1E293B; font-size: 13px; font-weight: 850; }
.preview-panel-hint { margin-left: auto; color: #8B95A1; font-size: 10px; font-weight: 650; }
.preview-screen #scene3d-wrap { height: clamp(280px, 76vw, 340px); }
.preview-screen #scene3d-wrap canvas { width: 100%; height: 100%; }
.preview-screen #light-mode-seg { min-width: 200px; }
.preview-screen #light-mode-seg button { min-height: 44px; }
.preview-screen .gear-btn { min-width: 44px; min-height: 44px; }
.preview-screen .live-studio { margin: 0; }
.preview-secondary-grid { display: grid; gap: 16px; margin-top: 8px; }
.preview-secondary-panel { min-width: 0; }
.preview-secondary-panel > .section-title { margin-top: 20px; }
.preview-secondary-panel > .card { height: calc(100% - 52px); }

@media (hover: hover) and (pointer: fine) {
  .live-product-card:hover { transform: translateY(-2px); background: rgba(255,255,255,.11); }
}
@media (pointer: coarse) {
  .live-product-card:active { transform: scale(.985); }
}

@media (min-width: 700px) {
  body[data-step="studio"] #app {
    width: min(100%, 920px); max-width: 920px; box-shadow: 0 18px 70px rgba(30, 41, 59, .14);
  }
  body[data-step="studio"] #header { padding-inline: 32px; }
  body[data-step="studio"] .back-btn { width: 44px; height: 44px; }
  body[data-step="studio"] #screen { padding: 18px 32px 56px; }
  body[data-step="studio"] #cta-bar { padding-inline: 32px; }
  body[data-step="studio"] #cta-bar .btn { max-width: 460px; margin-inline: auto; display: block; }
  .preview-hero .headline { font-size: 34px; line-height: 1.16; letter-spacing: -.7px; }
  .preview-hero .headline br { display: none; }
  .preview-hero .sub-text { max-width: 650px; font-size: 16px; }
  .preview-screen #scene3d-wrap { height: clamp(390px, 52vw, 500px); }
  .preview-screen .live-studio { padding: 24px; }
  .preview-screen .live-title { font-size: 24px; }
  .preview-screen .live-copy { font-size: 13px; }
  .preview-screen .live-product-swatch { height: 96px; }
  .preview-screen .live-product-name { font-size: 12px; }
  .variant-render-card { padding: 24px; }
  .variant-option-row { gap: 8px; }
  .variant-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .variant-result-style { font-size: 11px; }
  .variant-product-lock { font-size: 9px; }
  .preview-secondary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  body[data-step="studio"] .sheet { max-width: 620px; border-radius: 24px; margin-bottom: 20px; }
}

@media (min-width: 900px) {
  body[data-step="studio"] #app { width: min(100%, 1280px); max-width: 1280px; }
  body[data-step="studio"] #header { padding-inline: 40px; }
  body[data-step="studio"] #screen { padding: 22px 40px 64px; }
  .preview-hero { max-width: 780px; }
  .preview-hero .headline { font-size: 40px; }
  .preview-consultation-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(330px, .85fr);
    gap: 20px;
  }
  .preview-scene-panel { padding: 16px; }
  .preview-screen #scene3d-wrap { height: clamp(430px, 43vw, 540px); }
  .preview-screen .live-studio { height: 100%; display: flex; flex-direction: column; }
  .preview-screen .live-product-grid { margin-top: 2px; }
  .preview-screen .live-update-status { margin-top: auto; padding-top: 14px; }
}

@media (min-width: 1180px) {
  .preview-consultation-grid { grid-template-columns: minmax(0, 1.65fr) minmax(380px, .8fr); }
  .preview-screen .live-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .preview-screen .live-product-swatch { height: 112px; }
}
