:root {
  --mint: #0E9F8B;
  --teal: #0A7B74;
  --mint-soft: #E6F6F3;
  --amber: #C9844E;
  --amber-soft: #FBF2EA;
  --canvas: #F7F5F0;
  --surface: #FFFFFF;
  --ink: #1A1E20;
  --ink-sub: #71777A;
  --dark-glass: rgba(24, 36, 35, 0.92);
  --hairline: rgba(26, 30, 32, 0.065);
  --shadow: 0 6px 20px rgba(20, 30, 28, 0.055);
  --grad-primary: linear-gradient(135deg, #0E9F8B 0%, #0A7B74 100%);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: #ECEAE3;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

#app-shell {
  position: relative;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--canvas);
  box-shadow: 0 0 48px rgba(15, 25, 24, 0.08);
  overflow-x: hidden;
}

.page {
  display: none;
  position: relative;
  padding-bottom: calc(88px + var(--safe-bottom));
  min-height: 100dvh;
}
.page.active { display: block; }

.hero-glow {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 280px;
  background: linear-gradient(180deg, #E4F5F1 0%, #F4F6F2 60%, var(--canvas) 100%);
  pointer-events: none;
  z-index: 0;
}

.top-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.brand-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--mint);
  background: var(--mint-soft);
  padding: 4px 9px;
  border-radius: 999px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.75);
}
.status-dot.online { background: #16A34A; }

.brand-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-sub);
}

.quick-cam-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--hairline);
  background: rgba(255,255,255,0.94);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.quick-cam-btn:active { transform: scale(0.96); }

.card {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border-radius: 24px;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
}

.hero-card {
  margin: 0 18px 22px;
  padding: 14px;
}

/* Before / After Interactive Slider */
.ba-slider {
  position: relative;
  width: 100%;
  height: 224px;
  border-radius: 18px;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
  background: #E8E5DF;
}
.ba-slider.result-ba { height: 340px; }

.ba-img-after, .ba-img-before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ba-before-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ba-divider {
  position: absolute;
  top: 0; bottom: 0;
  width: 2.5px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
  pointer-events: none;
}

.ba-knob {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0,0,0,0.24);
  pointer-events: none;
}

.ba-label {
  position: absolute;
  top: 12px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  padding: 5px 10px;
  border-radius: 999px;
  pointer-events: none;
}
.ba-label.left { left: 12px; background: rgba(0,0,0,0.48); }
.ba-label.right { right: 12px; background: rgba(14,159,139,0.92); }

.hero-meta { margin: 14px 2px 14px; }
.hero-title-row { display: flex; align-items: center; gap: 7px; }
.hero-title-row h2 { margin: 0; font-size: 18px; font-weight: 700; }
.hot-tag {
  font-size: 10px;
  font-weight: 800;
  color: var(--amber);
  background: var(--amber-soft);
  padding: 2.5px 7px;
  border-radius: 999px;
}
.hero-meta p { margin: 4px 0 0; font-size: 12px; color: var(--ink-sub); }

.btn-primary {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 999px;
  background: var(--grad-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 18px rgba(10, 123, 116, 0.25);
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease;
}
.btn-primary:active { transform: scale(0.975); }
.btn-primary:disabled {
  background: #C9CCCB;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-secondary {
  height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: #fff;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.btn-soft-full {
  width: 100%;
  height: 48px;
  margin-top: 10px;
  border: none;
  border-radius: 16px;
  background: var(--mint-soft);
  color: var(--mint);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}
.btn-soft-full.done {
  background: var(--amber-soft);
  color: var(--amber);
}
.btn-soft-full:disabled { opacity: 0.72; cursor: default; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 20px;
  margin: 0 0 12px;
}
.section-head h3 { margin: 0; font-size: 18px; font-weight: 700; }
.section-head span { font-size: 12px; color: var(--ink-sub); font-weight: 500; }
.section-head .amber-note { color: var(--amber); }

.scene-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 18px 24px;
}

.scene-card {
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  padding: 0;
  transition: transform 0.16s ease;
}
.scene-card:active { transform: scale(0.97); }
.scene-thumb-wrap {
  position: relative;
  height: 112px;
  overflow: hidden;
}
.scene-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.scene-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: rgba(20, 32, 31, 0.72);
  backdrop-filter: blur(8px);
  padding: 3.5px 8px;
  border-radius: 999px;
}
.scene-body { padding: 10px 12px 12px; }
.scene-title { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.scene-sub { font-size: 11.5px; color: var(--ink-sub); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.style-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 18px 14px;
  scrollbar-width: none;
}
.style-strip::-webkit-scrollbar { display: none; }

.style-card {
  flex: 0 0 152px;
  background: var(--surface);
  border-radius: 20px;
  padding: 8px;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
}
.style-img-box {
  position: relative;
  width: 136px;
  height: 136px;
  border-radius: 14px;
  overflow: hidden;
}
.style-img-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.style-img-box::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 48px;
  background: linear-gradient(transparent, rgba(0,0,0,0.52));
}
.style-name-overlay {
  position: absolute;
  left: 10px;
  bottom: 8px;
  z-index: 2;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.style-sub-text {
  font-size: 11px;
  color: var(--ink-sub);
  margin: 7px 3px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tools Page */
.simple-header { padding: 20px 20px 12px; }
.simple-header h1 { margin: 0; font-size: 28px; font-weight: 800; }
.simple-header p { margin: 4px 0 0; font-size: 13px; color: var(--ink-sub); }
.tools-container { padding: 4px 18px 20px; }
.tool-group-title { font-size: 16px; font-weight: 700; margin: 16px 2px 10px; }
.tool-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  padding: 11px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
}
.tool-row img {
  width: 62px;
  height: 62px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
}
.tool-row-info { flex: 1; min-width: 0; }
.tool-row-title { font-size: 15px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.tool-row-sub { font-size: 12px; color: var(--ink-sub); margin-top: 4px; }
.tool-badge { font-size: 10px; font-weight: 600; color: var(--mint); background: var(--mint-soft); padding: 2px 7px; border-radius: 999px; }

/* Works Page */
.studio-status-card {
  margin: 0 18px 20px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.studio-avatar img { width: 48px; height: 48px; border-radius: 14px; display: block; }
.studio-info { flex: 1; }
.studio-name { font-size: 17px; font-weight: 700; }
.studio-sub { font-size: 12px; color: var(--ink-sub); margin-top: 3px; }
.region-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--mint);
  background: var(--mint-soft);
  padding: 5px 10px;
  border-radius: 999px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 18px;
}
.work-card {
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.work-thumb { position: relative; height: 146px; }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-2k {
  position: absolute;
  top: 8px; right: 8px;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: var(--amber);
  padding: 2.5px 7px;
  border-radius: 999px;
}
.work-del {
  position: absolute;
  top: 8px; left: 8px;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
.work-meta { padding: 9px 10px 11px; }
.work-title { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-sub { font-size: 11px; color: var(--ink-sub); margin-top: 2px; }

.empty-card {
  margin: 0 18px;
  padding: 34px 20px;
  text-align: center;
}
.empty-icon { font-size: 32px; color: var(--mint); margin-bottom: 8px; }
.empty-title { font-size: 15px; font-weight: 700; }
.empty-sub { font-size: 12.5px; color: var(--ink-sub); margin-top: 6px; line-height: 1.5; }

/* Bottom Tab Bar */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--hairline);
  padding: 8px 0 calc(8px + var(--safe-bottom));
  z-index: 30;
}
.tab-item {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--ink-sub);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.tab-item.active { color: var(--mint); }

/* Subpages (Workflow & Result) */
.subpage {
  position: fixed;
  inset: 0;
  max-width: 480px;
  margin: 0 auto;
  background: var(--canvas);
  z-index: 50;
  display: flex;
  flex-direction: column;
}
.subpage-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav-icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-title { font-size: 17px; font-weight: 700; }

.subpage-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 104px;
}

.step-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255,255,255,0.88);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 7px 12px;
  margin-bottom: 14px;
}
.step-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-sub);
}
.step-chip.active { color: var(--ink); font-weight: 600; }
.step-num {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--canvas);
  color: var(--ink-sub);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}
.step-chip.active .step-num { background: var(--mint-soft); color: var(--mint); }
.step-chip.done .step-num { background: var(--mint); color: #fff; }
.step-arrow { color: #BDBDBD; font-size: 12px; }

.wf-card { padding: 15px; margin-bottom: 14px; }
.wf-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.wf-card-title { font-size: 15px; font-weight: 700; display: block; }

.pill-btn {
  border: none;
  background: var(--mint-soft);
  color: var(--mint);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.text-btn { border: none; background: transparent; color: var(--ink-sub); font-size: 13px; cursor: pointer; }

.upload-drop {
  border: 1.5px dashed rgba(14, 159, 139, 0.45);
  background: rgba(230, 246, 243, 0.35);
  border-radius: 18px;
  padding: 26px 14px;
  text-align: center;
  cursor: pointer;
}
.upload-circle {
  width: 58px; height: 58px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--mint-soft);
  color: var(--mint);
  display: flex;
  align-items: center;
  justify-content: center;
}
.upload-main { font-size: 15.5px; font-weight: 700; }
.upload-sub { font-size: 12px; color: var(--ink-sub); margin-top: 5px; line-height: 1.4; }
.upload-tags { font-size: 11px; color: var(--mint); font-weight: 600; margin-top: 8px; }

.src-preview-wrap { position: relative; border-radius: 16px; overflow: hidden; background: #EFECE6; }
.src-preview-wrap img { width: 100%; max-height: 260px; object-fit: contain; display: block; margin: 0 auto; }
.ready-badge {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(14, 159, 139, 0.92); color: #fff;
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
}

/* Brush Mask Editor */
.mask-tip { margin: 0 0 8px; font-size: 12px; color: var(--ink-sub); }
.mask-stage {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #ECEAE3;
  touch-action: none;
}
.mask-stage img { width: 100%; max-height: 300px; object-fit: contain; display: block; pointer-events: none; }
.mask-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }

.mask-toolbar {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--dark-glass);
  color: #fff;
  padding: 9px 14px;
  border-radius: 999px;
}
.mask-toolbar button {
  border: none; background: transparent; color: #fff;
  font-size: 17px; cursor: pointer; padding: 2px 4px;
}
.mask-toolbar button:disabled { opacity: 0.3; }
.mask-toolbar input[type=range] { flex: 1; accent-color: var(--mint); }
.mask-div { width: 1px; height: 16px; background: rgba(255,255,255,0.22); }
.mask-clear-btn { font-size: 12.5px !important; font-weight: 600; }

/* Reference Pick */
.ref-pick-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.ref-thumb {
  width: 68px; height: 68px;
  border-radius: 14px;
  background: var(--canvas);
  color: var(--mint);
  font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.ref-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ref-main { font-size: 14.5px; font-weight: 600; }
.ref-hint { font-size: 12px; color: var(--ink-sub); margin-top: 3px; }

/* Material Spheres */
.material-strip { display: flex; gap: 12px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.material-strip::-webkit-scrollbar { display: none; }
.mat-btn {
  flex: 0 0 64px;
  border: none; background: transparent; padding: 0; cursor: pointer; text-align: center;
}
.mat-dot {
  width: 48px; height: 48px; margin: 0 auto 5px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,0.14);
}
.mat-btn.active .mat-dot { border-color: var(--mint); transform: scale(1.06); }
.mat-name { font-size: 11px; font-weight: 600; color: var(--ink); display: block; white-space: nowrap; }

/* Room & Style Selector */
.dual-entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.entry-box {
  background: var(--canvas);
  border-radius: 14px;
  padding: 10px 12px;
}
.entry-box.active-box { background: var(--mint-soft); }
.entry-box label { display: block; font-size: 11px; color: var(--ink-sub); margin-bottom: 4px; }
.entry-box select {
  width: 100%; border: none; background: transparent;
  font-size: 15px; font-weight: 700; color: var(--ink); outline: none;
}
.entry-val { font-size: 15px; font-weight: 700; color: var(--mint); }

.seg-control {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: var(--canvas); padding: 4px; border-radius: 999px; margin-bottom: 12px;
}
.seg-btn {
  height: 36px; border: none; border-radius: 999px;
  background: transparent; color: var(--ink-sub);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.seg-btn.active { background: var(--grad-primary); color: #fff; }

.style-pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.style-opt { border: none; background: transparent; padding: 0; cursor: pointer; text-align: center; }
.style-opt-img {
  position: relative;
  height: 84px; border-radius: 13px; overflow: hidden;
  border: 2.5px solid transparent;
}
.style-opt.active .style-opt-img { border-color: var(--mint); }
.style-opt-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.style-opt-check {
  display: none;
  position: absolute; top: 5px; right: 5px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--mint); color: #fff; font-size: 11px; font-weight: 800;
  align-items: center; justify-content: center;
}
.style-opt.active .style-opt-check { display: flex; }
.style-opt span { display: block; margin-top: 5px; font-size: 12px; font-weight: 600; color: var(--ink); }
.style-opt.active span { color: var(--mint); }

.custom-examples { display: flex; flex-direction: column; gap: 8px; }
.example-chip {
  text-align: left;
  border: none;
  background: var(--canvas);
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.4;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
}

textarea#wf-prompt {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--canvas);
  padding: 11px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  resize: none;
  outline: none;
}
.strength-box { margin-top: 14px; }
.strength-head { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 6px; }
.strength-head strong { color: var(--mint); }
.strength-box input[type=range] { width: 100%; accent-color: var(--mint); }
.strength-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-sub); }

.sticky-cta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 18px calc(14px + var(--safe-bottom));
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--hairline);
}

/* Result Page */
.result-visual-card { padding: 12px; margin-bottom: 12px; }
.pure-wrap { border-radius: 18px; overflow: hidden; background: #ECEAE3; }
.pure-wrap img { width: 100%; max-height: 410px; object-fit: contain; display: block; margin: 0 auto; }
.result-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.pill-neutral {
  border: none; background: var(--canvas); color: var(--ink);
  font-size: 12.5px; font-weight: 600; padding: 7px 13px; border-radius: 999px; cursor: pointer;
}
.dim-badge {
  font-size: 12px; font-weight: 600; color: var(--ink-sub);
  background: var(--canvas); padding: 5px 10px; border-radius: 999px;
}
.dim-badge.is-2k { color: var(--amber); background: var(--amber-soft); }

.res-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.res-tag { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: #fff; color: var(--ink-sub); border: 1px solid var(--hairline); }
.res-tag.hi { background: var(--mint-soft); color: var(--mint); border-color: transparent; }

.res-actions-row { display: flex; gap: 10px; }
.flex-1 { flex: 1; }

.spec-card { padding: 14px; margin: 14px 0; }
.spec-head-btn {
  width: 100%; border: none; background: transparent; padding: 0;
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
}
.spec-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--amber-soft); display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.spec-head-copy { flex: 1; }
.spec-title { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.spec-sub { font-size: 12px; color: var(--ink-sub); margin-top: 2px; }
.spec-chevron { font-size: 20px; color: var(--ink-sub); }
.spec-body { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.palette-row { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.palette-item { flex: 1; text-align: center; }
.palette-circle { width: 36px; height: 36px; border-radius: 50%; margin: 0 auto 4px; border: 1px solid rgba(0,0,0,0.08); }
.palette-hex { font-size: 10px; font-family: ui-monospace, monospace; color: var(--ink-sub); }
.spec-desc {
  background: var(--canvas); padding: 11px 12px; border-radius: 13px;
  font-size: 13px; line-height: 1.55; color: var(--ink); margin-bottom: 10px;
}
.mat-spec-item {
  background: rgba(247, 245, 240, 0.72); padding: 10px 12px; border-radius: 13px; margin-bottom: 8px;
}
.mat-spec-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.mat-spec-name { font-size: 13.5px; font-weight: 700; }
.mat-spec-finish { font-size: 11px; color: var(--mint); font-weight: 600; }
.mat-spec-app { font-size: 12px; color: var(--ink-sub); margin-top: 4px; line-height: 1.4; }

.continue-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-subtle {
  height: 44px; border: none; border-radius: 14px;
  background: var(--canvas); color: var(--ink);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.disclaimer { font-size: 11px; color: var(--ink-sub); text-align: center; margin: 14px 4px 0; }

/* Bottom Photo Sheet */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15, 22, 22, 0.44);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-panel {
  width: 100%; max-width: 480px;
  background: var(--canvas);
  border-radius: 26px 26px 0 0;
  padding: 10px 18px calc(22px + var(--safe-bottom));
}
.sheet-handle { width: 40px; height: 5px; border-radius: 99px; background: rgba(0,0,0,0.14); margin: 0 auto 12px; }
.sheet-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-header h3 { margin: 0; font-size: 18px; font-weight: 700; }
.sheet-close { width: 28px; height: 28px; border-radius: 50%; border: none; background: rgba(0,0,0,0.08); color: var(--ink-sub); cursor: pointer; }
.sheet-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.sheet-row {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--hairline); background: #fff;
  padding: 13px; border-radius: 18px; cursor: pointer; text-align: left;
}
.sheet-ico {
  width: 44px; height: 44px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
}
.sheet-ico.mint { background: var(--mint-soft); }
.sheet-ico.sky { background: #EAF4FC; }
.sheet-row-text { flex: 1; }
.sheet-row-text strong { display: block; font-size: 15px; color: var(--ink); }
.sheet-row-text small { display: block; font-size: 12px; color: var(--ink-sub); margin-top: 2px; }
.sheet-arr { color: #BDBDBD; font-size: 18px; }
.sheet-samples-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-sub); margin-bottom: 10px; }
.sheet-samples-head em { font-style: normal; color: var(--mint); font-weight: 600; }
.sheet-samples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sheet-sample-btn { border: none; background: transparent; padding: 0; cursor: pointer; text-align: center; }
.sheet-sample-btn img { width: 100%; height: 78px; object-fit: cover; border-radius: 12px; display: block; border: 1px solid var(--hairline); }
.sheet-sample-btn span { display: block; margin-top: 5px; font-size: 12px; font-weight: 500; color: var(--ink); }

/* Generating Overlay */
.gen-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 22, 22, 0.48);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.gen-modal {
  width: 100%; max-width: 290px;
  background: #fff; border-radius: 26px; padding: 28px 22px; text-align: center;
  box-shadow: 0 20px 44px rgba(0,0,0,0.22);
}
.gen-ring { position: relative; width: 80px; height: 80px; margin: 0 auto 14px; }
.gen-ring svg { width: 80px; height: 80px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--mint-soft); stroke-width: 6; }
.ring-fg { fill: none; stroke: var(--mint); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 213.6; stroke-dashoffset: 188; transition: stroke-dashoffset 0.4s ease; }
#gen-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; }
.gen-modal h3 { margin: 0 0 6px; font-size: 18px; }
.gen-modal p { margin: 0; font-size: 13px; color: var(--ink-sub); line-height: 1.45; }

/* Toast */
.toast {
  position: fixed;
  left: 50%; bottom: calc(86px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 120;
  background: var(--dark-glass);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 999px;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
}
