/**
 * Stone 3D Visualiser - 前台样式
 * 极简、大气、高可读性
 */

/* ─── 变量 ─────────────────────────────── */
.s3dv-wrapper {
  --s3dv-primary  : #2563EB;
  --s3dv-primary-h: #1d4ed8;
  --s3dv-bg       : #f8f8f6;
  --s3dv-panel-w  : clamp(380px, 28vw, 520px);
  --s3dv-radius   : 8px;
  --s3dv-shadow   : 0 4px 24px rgba(0,0,0,.12);
  --s3dv-font     : -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --s3dv-gray1    : #f1f0ed;
  --s3dv-gray2    : #e0deda;
  --s3dv-gray3    : #9e9a94;
  --s3dv-text     : #1a1a1a;
  position        : relative;
  left            : 50%;
  width           : min(1520px, calc(100vw - 48px));
  max-width       : none !important;
  min-height      : 720px;
  margin          : 40px 0;
  transform       : translateX(-50%);
  display         : flex;
  flex-direction  : column;
  background      : var(--s3dv-bg);
  border-radius   : var(--s3dv-radius);
  overflow        : hidden;
  font-family     : var(--s3dv-font);
  box-shadow      : var(--s3dv-shadow);
  isolation       : isolate;
}
.s3dv-wrapper,
.s3dv-wrapper * {
  box-sizing: border-box;
}
.s3dv-wrapper [hidden] {
  display: none !important;
}

/* ─── 加载层 ────────────────────────────── */
.s3dv-loading {
  position        : absolute;
  inset           : 0;
  z-index         : 100;
  display         : flex;
  align-items     : center;
  justify-content : center;
  background      : rgba(255,255,255,.95);
  transition      : opacity .4s;
}
.s3dv-wrapper.s3dv-ready .s3dv-loading {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.s3dv-wrapper.s3dv-loading-hidden .s3dv-loading {
  display: none !important;
}
.s3dv-loading__inner { text-align: center; }
.s3dv-loading__logo img { height: 48px; margin-bottom: 16px; }
.s3dv-loading__text { color: var(--s3dv-gray3); font-size: 14px; margin: 0 0 16px; }
.s3dv-progress {
  width: 200px; height: 3px;
  background: var(--s3dv-gray2);
  border-radius: 2px; margin: 0 auto;
}
.s3dv-progress__bar {
  height: 100%; width: 0;
  background: var(--s3dv-primary);
  border-radius: 2px;
  transition: width .3s;
}

/* ─── 场景标签栏 ─────────────────────────── */
.s3dv-scene-tabs {
  position       : absolute;  /* 浮在canvas上方 */
  top            : 0;
  left           : 0;
  right          : var(--s3dv-panel-w);
  z-index        : 10;
  display        : flex;
  gap            : 4px;
  padding        : 8px 12px;
  background     : rgba(255,255,255,.88);
  backdrop-filter: blur(8px);
  border-bottom  : 1px solid var(--s3dv-gray2);
  overflow-x     : auto;
  scrollbar-width: none;
}
.s3dv-scene-tabs::-webkit-scrollbar { display: none; }
.s3dv-scene-tab {
  display       : flex;
  align-items   : center;
  gap           : 6px;
  padding       : 5px 12px;
  border        : 1px solid var(--s3dv-gray2);
  border-radius : 20px;
  background    : transparent;
  cursor        : pointer;
  font-size     : 13px;
  color         : var(--s3dv-text);
  white-space   : nowrap;
  transition    : all .2s;
}
.s3dv-scene-tab img {
  width: 20px; height: 20px;
  border-radius: 50%; object-fit: cover;
}
.s3dv-scene-tab:hover  { background: var(--s3dv-gray1); }
.s3dv-scene-tab.active {
  background  : var(--s3dv-primary);
  color       : #fff;
  border-color: var(--s3dv-primary);
}

/* ─── 主体布局 ───────────────────────────── */
.s3dv-body {
  display  : flex;
  flex     : 1;
  overflow : hidden;
  position : relative;  /* 供 scene-tabs 绝对定位 */
  min-height: 0;        /* flex子元素高度修复 */
}

/* ─── Canvas画布区 ─────────────────────────── */
.s3dv-canvas-wrap {
  flex    : 1;
  position: relative;
  overflow: hidden;
  min-width: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.55), transparent 34%),
    linear-gradient(145deg, #f6f4ef 0%, #e9e5de 100%);
}
.s3dv-canvas {
  display: block;
  width  : 100% !important;
  height : 100% !important;
}

/* ─── 右侧石材面板 ────────────────────────── */
.s3dv-panel {
  width          : var(--s3dv-panel-w);
  flex           : 0 0 var(--s3dv-panel-w);
  min-width      : 360px;
  display        : flex;
  flex-direction : column;
  background     : #fff;
  border-left    : 1px solid var(--s3dv-gray2);
  overflow       : hidden;
}

/* 搜索+筛选区 */
.s3dv-panel__filter { padding: 12px; border-bottom: 1px solid var(--s3dv-gray2); }
.s3dv-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}
.s3dv-search-row .s3dv-search {
  flex: 1;
}
.s3dv-filter-toggle-btn {
  display: none; /* 中文注释：在普通模式下隐藏，在 Surface Studio 模式下显示 */
}
.s3dv-search {
  width        : 100%;
  padding      : 7px 10px;
  border       : 1px solid var(--s3dv-gray2);
  border-radius: var(--s3dv-radius);
  font-size    : 13px;
  outline      : none;
  box-sizing   : border-box;
  transition   : border-color .2s;
}
.s3dv-search:focus { border-color: var(--s3dv-primary); }
.s3dv-filter-tags  { display: grid; gap: 6px; margin-top: 8px; }
.s3dv-filter-row   { display: flex; flex-wrap: wrap; gap: 4px; }
.s3dv-tag-btn {
  padding      : 3px 10px;
  border       : 1px solid var(--s3dv-gray2);
  border-radius: 20px;
  background   : transparent;
  font-size    : 12px;
  cursor       : pointer;
  transition   : all .15s;
}
.s3dv-tag-btn:hover  { background: var(--s3dv-gray1); }
.s3dv-tag-btn.active {
  background  : var(--s3dv-primary);
  color       : #fff;
  border-color: var(--s3dv-primary);
}

/* 区域选择器 */
.s3dv-areas {
  padding      : 10px 12px;
  border-bottom: 1px solid var(--s3dv-gray2);
}
.s3dv-areas__label { font-size: 11px; color: var(--s3dv-gray3); margin: 0 0 6px; }
.s3dv-areas__list  { display: flex; flex-wrap: wrap; gap: 4px; }
.s3dv-area-btn {
  padding      : 4px 10px;
  border       : 1px solid var(--s3dv-gray2);
  border-radius: 4px;
  background   : transparent;
  font-size    : 12px;
  cursor       : pointer;
  transition   : all .15s;
}
.s3dv-area-btn:hover  { background: var(--s3dv-gray1); }
.s3dv-area-btn.active {
  background  : #eff6ff;
  border-color: var(--s3dv-primary);
  color       : var(--s3dv-primary);
}

/* 石材网格 */
.s3dv-stones-grid {
  flex       : 1 1 0%;
  min-height : 0; /* 中文注释：防内容撑开溢出，允许在 Flex 父容器下正常收缩以产生滚动条 */
  overflow-y : auto;
  padding    : 12px;
  display    : grid;
  grid-template-columns: repeat(2, 1fr);
  gap        : 10px;
  align-content: start;
}
.s3dv-stones-grid::-webkit-scrollbar { width: 4px; }
.s3dv-stones-grid::-webkit-scrollbar-thumb { background: var(--s3dv-gray2); border-radius: 2px; }

.s3dv-stone-item {
  position     : relative;
  display      : flex;
  flex-direction: column;
  min-height   : 164px;
  border       : 1px solid var(--s3dv-gray2);
  border-radius: var(--s3dv-radius);
  overflow     : hidden;
  cursor       : pointer;
  transition   : all .2s;
  background   : #fff;
  min-width    : 0;
}
.s3dv-stone-item:hover  { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.s3dv-stone-item.active { border-color: var(--s3dv-primary); box-shadow: 0 0 0 2px var(--s3dv-primary); }
.s3dv-stone-item--unavailable {
  cursor:not-allowed;
  opacity:.58;
}
.s3dv-stone-item--unavailable:hover {
  transform:none;
  box-shadow:none;
}

.s3dv-stone-thumb {
  flex       : 0 0 clamp(96px, 7.6vw, 132px);
  height     : clamp(96px, 7.6vw, 132px);
  overflow   : hidden;
  background : var(--s3dv-gray1);
}
.s3dv-stone-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.s3dv-stone-item:hover .s3dv-stone-thumb img { transform: scale(1.05); }
.s3dv-stone-thumb--empty { width: 100%; height: 100%; background: var(--s3dv-gray2); }

.s3dv-stone-name { font-size: 11px; line-height: 1.25; padding: 6px 7px 0; margin: 0; color: var(--s3dv-text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s3dv-stone-sku  { font-size: 10px; line-height: 1.2; padding: 2px 7px 7px; margin: 0; color: var(--s3dv-gray3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s3dv-stone-badge {
  position:absolute;
  left:6px;
  top:6px;
  max-width:calc(100% - 34px);
  padding:2px 6px;
  border-radius:999px;
  background:rgba(17,24,39,.76);
  color:#fff;
  font-size:10px;
  line-height:1.35;
  pointer-events:none;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.s3dv-stone-detail-btn {
  position   : absolute;
  top        : 4px;
  right      : 4px;
  width      : 20px; height: 20px;
  border     : none;
  background : rgba(255,255,255,.85);
  border-radius: 50%;
  font-size  : 12px;
  cursor     : pointer;
  display    : flex;
  align-items: center;
  justify-content: center;
  opacity    : 0;
  transition : opacity .2s;
}
.s3dv-stone-item:hover .s3dv-stone-detail-btn { opacity: 1; }

.s3dv-empty { text-align: center; color: var(--s3dv-gray3); font-size: 13px; padding: 24px; grid-column: 1/-1; }
.s3dv-toast {
  position:absolute;
  left:50%;
  bottom:18px;
  z-index:30;
  max-width:min(420px, calc(100% - 32px));
  padding:9px 12px;
  border-radius:7px;
  background:rgba(17,24,39,.88);
  color:#fff;
  font-size:12px;
  line-height:1.45;
  text-align:center;
  pointer-events:none;
  opacity:0;
  transform:translate(-50%, 8px);
  transition:opacity .2s, transform .2s;
}
.s3dv-toast--show {
  opacity:1;
  transform:translate(-50%, 0);
}

/* ─── 操作按钮区 ──────────────────────────── */
.s3dv-actions {
  display       : grid;
  grid-template-columns: 1fr 1fr;
  gap           : 6px;
  padding       : 10px;
  border-top    : 1px solid var(--s3dv-gray2);
}
.s3dv-btn {
  padding      : 7px 10px;
  border       : 1px solid var(--s3dv-gray2);
  border-radius: var(--s3dv-radius);
  background   : #fff;
  font-size    : 12px;
  cursor       : pointer;
  display      : flex;
  align-items  : center;
  justify-content: center;
  gap          : 4px;
  transition   : all .15s;
  white-space  : nowrap;
}
.s3dv-btn:hover { background: var(--s3dv-gray1); }
.s3dv-btn.active {
  background:#eff6ff;
  border-color:var(--s3dv-primary);
  color:var(--s3dv-primary);
}
.s3dv-btn--compare { display:none; }
.s3dv-wrapper.s3dv-mode-image .s3dv-btn--compare { display:flex; }
.s3dv-btn--primary {
  background  : var(--s3dv-primary);
  color       : #fff;
  border-color: var(--s3dv-primary);
  grid-column : 1/-1;
}
.s3dv-btn--primary:hover { background: var(--s3dv-primary-h); }
.s3dv-btn--block { width: 100%; }
.s3dv-btn--inquiry { font-weight: 600; }

/* ─── 弹窗通用 ───────────────────────────── */
.s3dv-stone-modal,
.s3dv-inquiry-modal,
.s3dv-share-modal {
  position       : absolute;
  inset          : 0;
  z-index        : 200;
  display        : flex;
  align-items    : center;
  justify-content: center;
}
.s3dv-stone-modal__backdrop,
.s3dv-inquiry-modal__backdrop,
.s3dv-share-modal__backdrop {
  position  : absolute;
  inset     : 0;
  background: rgba(0,0,0,.4);
}
.s3dv-stone-modal__content,
.s3dv-inquiry-modal__content,
.s3dv-share-modal__content {
  position    : relative;
  z-index     : 1;
  background  : #fff;
  border-radius: 12px;
  padding     : 24px;
  width       : min(380px, 90%);
  max-height  : 85%;
  overflow-y  : auto;
  box-shadow  : 0 20px 60px rgba(0,0,0,.2);
}
.s3dv-stone-modal__close,
.s3dv-inquiry-modal__close,
.s3dv-share-modal__close {
  position  : absolute;
  top       : 12px; right: 12px;
  border    : none;
  background: var(--s3dv-gray1);
  border-radius: 50%;
  width     : 28px; height: 28px;
  cursor    : pointer;
  font-size : 14px;
  display   : flex;
  align-items: center;
  justify-content: center;
}

/* ─── 石材详情弹窗 ────────────────────────── */
.s3dv-detail__img  { width: 100%; border-radius: 8px; object-fit: cover; margin-bottom: 12px; max-height: 200px; }
.s3dv-detail__name { font-size: 16px; font-weight: 600; margin: 0 0 8px; }
.s3dv-detail p     { font-size: 13px; margin: 4px 0; color: #444; }
.s3dv-detail__apply { margin-top: 16px; }

/* ─── 询盘表单 ───────────────────────────── */
.s3dv-inquiry-modal__content h3 { margin: 0 0 16px; font-size: 16px; }
.s3dv-inquiry-summary { font-size: 12px; color: var(--s3dv-gray3); background: var(--s3dv-gray1); padding: 8px; border-radius: 4px; margin-bottom: 12px; }
.s3dv-form-row        { margin-bottom: 12px; }
.s3dv-form-row label  { display: block; font-size: 12px; color: #555; margin-bottom: 4px; }
.s3dv-form-row input,
.s3dv-form-row textarea {
  width        : 100%;
  padding      : 8px 10px;
  border       : 1px solid var(--s3dv-gray2);
  border-radius: var(--s3dv-radius);
  font-size    : 13px;
  box-sizing   : border-box;
  outline      : none;
  transition   : border-color .2s;
}
.s3dv-form-row input:focus,
.s3dv-form-row textarea:focus { border-color: var(--s3dv-primary); }
.s3dv-form-tip { text-align: center; font-size: 11px; color: var(--s3dv-gray3); margin: 8px 0 0; }
.s3dv-success  { text-align: center; font-size: 15px; padding: 24px 0; }
.s3dv-form-status {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
.s3dv-form-status:empty { display: none; }
.s3dv-form-status--success { color: #166534; }
.s3dv-form-status--error { color: #b91c1c; }

/* ─── 分享弹窗 ───────────────────────────── */
.s3dv-share-modal__content h3 { margin: 0 0 8px; font-size: 16px; }
.s3dv-share-modal__content p  { font-size: 12px; color: var(--s3dv-gray3); margin: 0 0 16px; }
.s3dv-share-link-wrap  { display: flex; gap: 6px; }
.s3dv-share-link-input {
  flex: 1; padding: 7px 10px;
  border: 1px solid var(--s3dv-gray2);
  border-radius: var(--s3dv-radius);
  font-size: 12px; outline: none;
}
.s3dv-qrcode-wrap { text-align: center; margin-top: 16px; }
.s3dv-qrcode-wrap p { margin: 6px 0 0; font-size: 12px; color: var(--s3dv-gray3); }
.s3dv-qrcode svg,
.s3dv-qrcode img  { display:block; margin:0 auto; border-radius: 4px; }
.s3dv-qrcode__fallback {
  width: 160px;
  height: 160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 12px;
}
.s3dv-qrcode__hint {
  max-width: 160px;
  margin: 6px auto 0 !important;
  word-break: break-all;
}

/* ─── 渲染图 / AI 图片模式 ─────────────────── */
.s3dv-img-container {
  width:100%;
  height:100%;
  min-height:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f3f1ec;
}
.s3dv-img-stage {
  position:relative;
  width:100%;
  height:auto;
  max-height:100%;
  aspect-ratio:16 / 9;
  overflow:hidden;
  background:#f3f1ec;
  touch-action:none;
  user-select:none;
}
.s3dv-img-stage::before {
  content:"";
  position:absolute;
  inset:-34px;
  z-index:0;
  background-image:var(--s3dv-stage-bg-image);
  background-size:cover;
  background-position:center;
  filter:blur(24px) saturate(.9);
  opacity:.28;
  transform:scale(1.05);
  pointer-events:none;
}
.s3dv-img-layer,
.s3dv-img-overlays,
.s3dv-img-overlay,
.s3dv-hotspot-svg {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  transform-origin:center center;
}
.s3dv-img-layer {
  z-index:1;
  display:block;
  object-fit:contain;
  background:transparent;
  opacity:0;
  pointer-events:none;
}
.s3dv-img-layer--active { opacity:1; }
.s3dv-img-overlays {
  z-index:3;
  transform-origin:center center;
  pointer-events:none;
}
.s3dv-img-overlay {
  z-index:3;
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  pointer-events:none;
}
.s3dv-hotspot-svg {
  z-index:4;
  pointer-events:none;
}
.s3dv-hotspot-area {
  fill:rgba(37,99,235,0);
  stroke:rgba(37,99,235,0);
  stroke-width:.3;
  cursor:pointer;
  pointer-events:visibleFill;
  transition:fill .2s, stroke .2s, stroke-width .2s;
}
.s3dv-hotspot-area--hover {
  fill:rgba(37,99,235,.045);
  stroke:rgba(37,99,235,.18);
  stroke-width:.4;
}
.s3dv-hotspot-area--active {
  fill:rgba(37,99,235,0);
  stroke:rgba(37,99,235,0);
  stroke-width:0;
  stroke-dasharray:none;
  animation:none;
}
.s3dv-hotspot-area--mask,
.s3dv-hotspot-area--mask.s3dv-hotspot-area--hover,
.s3dv-hotspot-area--mask.s3dv-hotspot-area--active {
  fill:rgba(0,0,0,0);
  stroke:rgba(0,0,0,0);
  animation:none;
}
.s3dv-hotspot-label--hidden { display:none; }
@keyframes s3dv-dash { to { stroke-dashoffset:-20; } }
.s3dv-hotspot-label {
  display:none;
  pointer-events:none;
  fill:#fff;
  paint-order:stroke;
  stroke:rgba(17,24,39,.72);
  stroke-width:.55;
  font-size:3.2px;
  font-weight:650;
  text-anchor:middle;
  dominant-baseline:middle;
  opacity:.85;
  transition:opacity .2s;
}
.s3dv-hotspot-area--active + .s3dv-hotspot-label {
  opacity:1;
}
.s3dv-view-bar,
.s3dv-zoom-bar {
  position:absolute;
  z-index:8;
  display:flex;
  gap:6px;
}
.s3dv-view-bar {
  left:12px;
  bottom:12px;
  max-width:calc(100% - 24px);
  overflow-x:auto;
}
.s3dv-view-btn,
.s3dv-zoom-btn {
  border:1px solid rgba(255,255,255,.55);
  background:rgba(17,24,39,.72);
  color:#fff;
  border-radius:6px;
  cursor:pointer;
  backdrop-filter:blur(8px);
}
.s3dv-view-btn {
  display:flex;
  align-items:center;
  gap:6px;
  min-height:34px;
  padding:5px 10px;
  font-size:12px;
}
.s3dv-view-btn.active {
  background:var(--s3dv-primary);
  border-color:var(--s3dv-primary);
}
.s3dv-view-btn img {
  width:32px;
  height:22px;
  border-radius:3px;
  object-fit:cover;
}
.s3dv-zoom-bar {
  right:12px;
  bottom:12px;
}
.s3dv-zoom-btn {
  width:32px;
  height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
  line-height:1;
}
.s3dv-compare-slider {
  position:absolute;
  top:0;
  bottom:0;
  width:2px;
  z-index:9;
  background:#fff;
  box-shadow:0 0 0 1px rgba(0,0,0,.18);
  cursor:ew-resize;
}
.s3dv-compare-handle {
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:34px;
  height:34px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#fff;
  color:#111827;
  box-shadow:0 6px 18px rgba(0,0,0,.18);
  font-size:12px;
}

/* ─── 错误状态 ───────────────────────────── */
.s3dv-error {
  display        : flex;
  flex-direction : column;
  align-items    : center;
  justify-content: center;
  height         : 100%;
  gap            : 12px;
  color          : var(--s3dv-gray3);
}
.s3dv-error button {
  padding      : 8px 20px;
  border       : 1px solid var(--s3dv-gray2);
  border-radius: var(--s3dv-radius);
  cursor       : pointer;
  background   : #fff;
}

/* ─── 响应式 ─────────────────────────────── */
@media (max-width: 768px) {
  .s3dv-wrapper {
    width: calc(100vw - 24px);
    min-height: 760px;
    margin: 24px 0;
    flex-direction: column;
  }
  .s3dv-body { flex-direction: column; }
  .s3dv-scene-tabs { right: 0; }
  .s3dv-canvas-wrap {
    flex: 1 1 auto;
    min-height: 420px;
  }
  .s3dv-panel   {
    width    : 100%;
    flex     : 0 0 340px;
    min-width: 0;
    border-left  : none;
    border-top   : 1px solid var(--s3dv-gray2);
  }
  .s3dv-stones-grid { grid-template-columns: repeat(3,1fr); }
  .s3dv-panel__filter { display: none; } /* 移动端隐藏筛选，节省空间 */
  .s3dv-stone-item { min-height: 142px; }
  .s3dv-stone-thumb {
    flex-basis: 96px;
    height: 96px;
  }
}
@media (max-width: 480px) {
  .s3dv-stones-grid { grid-template-columns: repeat(2,1fr); }
}

/* ─── 商业渲染图库模式优化 ───────────────────
   当前交付方向以客户手工/ComfyUI 成品图为准，界面强调层级和清晰切换。 */
.s3dv-wrapper {
  --s3dv-panel-w: clamp(390px, 30vw, 500px);
  --s3dv-bg: #f5f4f1;
  --s3dv-gray1: #f6f5f2;
  --s3dv-gray2: #e4e1dc;
  --s3dv-gray3: #8c8780;
  --s3dv-shadow: 0 18px 56px rgba(17,24,39,.10);
  width: min(1560px, calc(100vw - 40px));
  min-height: 760px;
  border: 1px solid rgba(17,24,39,.06);
  background: var(--s3dv-bg);
}

.s3dv-body {
  background: #f5f4f1;
}

.s3dv-scene-tabs {
  min-height: 58px;
  padding: 10px 14px;
  gap: 8px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--s3dv-gray2);
}

.s3dv-scene-tab {
  min-height: 38px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: #fff;
  border-color: rgba(17,24,39,.10);
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 1px 2px rgba(17,24,39,.04);
}

.s3dv-scene-tab img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255,255,255,.8);
}

.s3dv-scene-tab:hover {
  background: #f8fafc;
  border-color: rgba(37,99,235,.28);
}

.s3dv-scene-tab.active {
  background: var(--s3dv-primary);
  border-color: var(--s3dv-primary);
  box-shadow: 0 8px 18px rgba(37,99,235,.20);
}

.s3dv-canvas-wrap {
  background: #f2f0eb;
}

.s3dv-wrapper.s3dv-mode-image .s3dv-canvas-wrap {
  padding-top: 58px;
}

.s3dv-panel {
  background: #fff;
  border-left: 1px solid rgba(17,24,39,.10);
}

.s3dv-panel__filter {
  padding: 14px 16px 12px;
  background: #fff;
  border-bottom: 1px solid var(--s3dv-gray2);
}

.s3dv-search {
  height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  border-color: rgba(17,24,39,.14);
  font-size: 14px;
  background: #fff;
}

.s3dv-search:focus {
  border-color: var(--s3dv-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.10);
}

.s3dv-filter-tags {
  gap: 10px;
  margin-top: 12px;
}

.s3dv-filter-row {
  gap: 6px;
}

.s3dv-filter-row + .s3dv-filter-row {
  padding-top: 10px;
  border-top: 1px solid #f0eee9;
}

.s3dv-tag-btn {
  min-height: 28px;
  padding: 4px 11px;
  border-radius: 999px;
  background: #fff;
  border-color: rgba(17,24,39,.13);
  font-size: 12px;
  font-weight: 600;
}

.s3dv-tag-btn.active {
  box-shadow: 0 6px 14px rgba(37,99,235,.14);
}

.s3dv-areas {
  padding: 14px 16px;
  background: #fbfaf8;
  border-bottom: 1px solid var(--s3dv-gray2);
}

.s3dv-areas__label {
  margin-bottom: 8px;
  color: #9a948b;
  font-size: 12px;
}

.s3dv-areas__list {
  gap: 7px;
}

.s3dv-area-btn {
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 8px;
  background: #fff;
  border-color: rgba(17,24,39,.13);
  font-size: 13px;
  font-weight: 650;
}

.s3dv-area-btn.active {
  background: #eff6ff;
  border-color: var(--s3dv-primary);
  box-shadow: inset 0 0 0 1px var(--s3dv-primary);
}

.s3dv-stones-grid {
  padding: 16px;
  gap: 12px;
  background: #fbfaf8;
}

.s3dv-stone-item {
  min-height: 190px;
  border-radius: 8px;
  border-color: rgba(17,24,39,.10);
  box-shadow: 0 1px 3px rgba(17,24,39,.05);
}

.s3dv-stone-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(17,24,39,.10);
}

.s3dv-stone-item.active {
  border-color: var(--s3dv-primary);
  box-shadow: 0 0 0 2px rgba(37,99,235,.96), 0 10px 24px rgba(37,99,235,.14);
}

.s3dv-stone-item--unavailable {
  opacity: .48;
  filter: grayscale(.16);
}

.s3dv-stone-thumb {
  flex-basis: 136px;
  height: 136px;
  background: #ebe8e1;
}

.s3dv-stone-thumb img {
  transform: none;
}

.s3dv-stone-item:hover .s3dv-stone-thumb img {
  transform: scale(1.025);
}

.s3dv-stone-name {
  padding: 9px 10px 0;
  font-size: 13px;
  line-height: 1.25;
}

.s3dv-stone-sku {
  padding: 3px 10px 10px;
  font-size: 12px;
}

.s3dv-stone-badge {
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  background: rgba(17,24,39,.66);
  font-size: 11px;
}

.s3dv-actions {
  padding: 14px 16px 16px;
  gap: 10px;
  background: #fff;
  border-top: 1px solid var(--s3dv-gray2);
  box-shadow: 0 -10px 22px rgba(17,24,39,.035);
}

.s3dv-btn {
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 8px;
  border-color: rgba(17,24,39,.13);
  font-size: 13px;
  font-weight: 650;
}

.s3dv-btn--primary {
  min-height: 48px;
  box-shadow: 0 10px 22px rgba(37,99,235,.20);
}

.s3dv-img-container {
  padding: 0;
  background: #f2f0eb;
}

.s3dv-img-stage {
  width: 100%;
  height: 100%;
  max-height: none;
  background: #f2f0eb;
}

.s3dv-img-layer,
.s3dv-img-overlay {
  object-fit: contain;
}

.s3dv-view-bar {
  left: 16px;
  right: 88px;
  bottom: 16px;
  gap: 8px;
  padding: 0;
}

.s3dv-view-btn {
  min-height: 42px;
  padding: 6px 12px 6px 7px;
  border-radius: 8px;
  background: rgba(17,24,39,.78);
  border-color: rgba(255,255,255,.48);
  font-size: 13px;
  font-weight: 650;
}

.s3dv-view-btn.active {
  box-shadow: 0 8px 20px rgba(37,99,235,.24);
}

.s3dv-view-btn img {
  width: 44px;
  height: 28px;
  border-radius: 5px;
}

.s3dv-zoom-bar {
  right: 16px;
  bottom: 16px;
  gap: 8px;
}

.s3dv-zoom-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(17,24,39,.78);
  font-size: 17px;
}

@media (max-width: 768px) {
  .s3dv-wrapper {
    width: calc(100vw - 20px);
    min-height: 760px;
    margin: 20px 0;
  }
  .s3dv-wrapper.s3dv-mode-image .s3dv-canvas-wrap {
    padding-top: 56px;
  }
  .s3dv-scene-tabs {
    min-height: 56px;
    right: 0;
  }
  .s3dv-panel {
    flex-basis: 360px;
  }
  .s3dv-panel__filter {
    display: block;
    padding: 12px;
  }
  .s3dv-stones-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 12px;
  }
  .s3dv-stone-item {
    min-height: 160px;
  }
  .s3dv-stone-thumb {
    flex-basis: 108px;
    height: 108px;
  }
  .s3dv-view-bar {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }
  .s3dv-view-btn {
    min-height: 38px;
    padding: 5px 9px 5px 6px;
  }
  .s3dv-view-btn img {
    width: 36px;
    height: 24px;
  }
  .s3dv-zoom-bar {
    display: none;
  }
}

/* ─── 手工成品图上线模式：区域准备状态与更稳的卡片状态 ─── */
.s3dv-area-status {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(37,99,235,.16);
  border-radius: 8px;
  background: #fff;
}

.s3dv-area-status__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: #1f2937;
  font-size: 12px;
  font-weight: 650;
}

.s3dv-area-status__count {
  color: #2563eb;
  font-variant-numeric: tabular-nums;
}

.s3dv-area-status__bar {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #ede9e1;
}

.s3dv-area-status__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #2563eb;
  transition: width .25s ease;
}

.s3dv-area-status--empty {
  border-color: #eadfca;
  background: #fbfaf7;
}

.s3dv-area-status--empty .s3dv-area-status__count {
  color: #9a7b38;
}

.s3dv-area-status--empty .s3dv-area-status__fill {
  background: #d6b86a;
}

.s3dv-area-status--complete {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.s3dv-area-status--complete .s3dv-area-status__count {
  color: #15803d;
}

.s3dv-area-status--complete .s3dv-area-status__fill {
  background: #16a34a;
}

.s3dv-stone-item--ready::after {
  content: "";
  position: absolute;
  top: 9px;
  right: 9px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22,163,74,.13);
}

.s3dv-stone-item--unavailable::after {
  display: none;
}

/* ─── 手机扫码展示：图片在上、选材在下，避免右侧栏挤压画面 ─── */
@media (max-width: 900px) {
  .s3dv-wrapper {
    width: calc(100vw - 20px);
    height: auto !important;
    min-height: 0;
    margin: 16px auto;
    border-radius: 10px;
  }

  .s3dv-body {
    flex-direction: column;
    min-height: 0;
  }

  .s3dv-wrapper.s3dv-mode-image .s3dv-canvas-wrap {
    flex: none;
    width: 100%;
    min-height: min(62vw, 520px);
    padding-top: 52px;
    border-right: 0;
  }

  .s3dv-panel {
    width: 100%;
    flex: 0 0 auto;
    max-height: none;
    border-left: 0;
    border-top: 1px solid var(--s3dv-gray2);
  }

  .s3dv-panel__filter {
    display: block;
  }

  .s3dv-areas {
    padding: 12px 14px;
  }

  .s3dv-stones-grid {
    max-height: 420px;
    overflow-y: auto;
  }

  .s3dv-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
  }
}

@media (max-width: 560px) {
  .s3dv-wrapper.s3dv-mode-image .s3dv-canvas-wrap {
    min-height: 64vw;
  }

  .s3dv-scene-tabs {
    gap: 8px;
    padding: 9px 10px;
  }

  .s3dv-scene-tab {
    max-width: 220px;
  }

  .s3dv-view-bar {
    left: 8px;
    right: 8px;
    bottom: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .s3dv-view-btn {
    flex: 0 0 auto;
  }

  .s3dv-stones-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 360px;
  }

  .s3dv-actions {
    grid-template-columns: 1fr 1fr;
  }

  .s3dv-btn--primary {
    grid-column: 1 / -1;
  }
}

/* ─── Surface Studio 对标布局：左侧产品列表 + 顶部工具栏 + 画面热点 ─── */
.s3dv-layout-surface-studio {
  --s3dv-panel-w: clamp(320px, 21vw, 410px);
  width: min(1780px, calc(100vw - 24px));
  min-height: 820px;
  margin: 24px 0;
  border-radius: 12px;
  background: #efece7;
  box-shadow: 0 18px 70px rgba(21, 18, 15, .16);
}

.s3dv-layout-surface-studio .s3dv-body {
  min-height: 0;
  position: relative;
  background: linear-gradient(90deg, #766045 0%, #5f4a34 34%, #4d3a2b 100%);
}

.s3dv-layout-surface-studio .s3dv-panel {
  position: relative;
  left: auto;
  top: auto;
  bottom: auto;
  margin: 22px 0 22px 22px;
  z-index: 20;
  width: 300px;
  flex: 0 0 300px;
  min-width: 0;
  order: 1;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 12px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 20px 54px rgba(17,24,39,.22);
  backdrop-filter: blur(18px);
}

.s3dv-panel-brand {
  order: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(236,233,228,.72);
  background: rgba(255,255,255,.72);
}

.s3dv-panel-brand__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  color: #181818;
  font-weight: 780;
  letter-spacing: 0;
  line-height: .92;
  font-size: 18px;
}

.s3dv-panel-brand__mark {
  width: 34px;
  height: 34px;
  display: inline-block;
  clip-path: polygon(46% 0, 100% 100%, 0 100%);
  background: #111;
}

.s3dv-panel-brand__img {
  max-width: 178px;
  max-height: 48px;
  object-fit: contain;
  display: block;
}

.s3dv-panel-brand__favorite {
  width: 36px;
  height: 36px;
  border: 1px solid #dedad3;
  border-radius: 999px;
  background: #fff;
  color: #6b6259;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.s3dv-panel-brand__favorite--active {
  background: #fff7ed;
  color: #c2410c;
  border-color: #f1c5a7;
}

.s3dv-layout-surface-studio .s3dv-surface-toolbar {
  position: absolute;
  top: 14px;
  left: 344px;
  right: 18px;
  z-index: 18;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(255,255,255,.97);
  border: 1px solid rgba(17,24,39,.08);
  box-shadow: 0 10px 32px rgba(17,24,39,.14);
  backdrop-filter: blur(14px);
}

.s3dv-toolbar-menu {
  position: absolute;
  top: 74px;
  right: 18px;
  z-index: 22;
  min-width: 210px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(17,24,39,.08);
  box-shadow: 0 16px 38px rgba(17,24,39,.16);
  backdrop-filter: blur(14px);
}

.s3dv-toolbar-menu button {
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 9px 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 650;
  color: #2a2927;
  cursor: pointer;
}

.s3dv-toolbar-menu button:hover {
  background: #f4f1ea;
}

.s3dv-toolbar-menu-open .s3dv-tool-btn--menu {
  color: var(--s3dv-primary);
  background: #eff6ff;
}

.s3dv-tool-btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #2a2927;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s, color .16s, opacity .16s;
}

.s3dv-tool-btn:hover {
  background: #f2f0ec;
}

.s3dv-tool-btn.active {
  color: var(--s3dv-primary);
  background: #eff6ff;
}

.s3dv-tool-btn--primary {
  padding-inline: 14px;
  background: #ad875d;
  color: #fff;
}

.s3dv-tool-btn--primary:hover {
  background: #9a764e;
}

.s3dv-tool-btn--muted {
  color: #8b867d;
  cursor: default;
  opacity: .62;
}

.s3dv-tool-btn--muted:hover {
  background: transparent;
}

.s3dv-tool-icon {
  font-size: 16px;
  line-height: 1;
}

.s3dv-tool-divider {
  width: 1px;
  align-self: stretch;
  margin: 0 4px;
  background: #e2ded7;
}

.s3dv-layout-surface-studio .s3dv-canvas-wrap {
  width: auto;
  height: 100%;
  flex: 1 1 auto;
  order: 2;
  min-height: 0;
  padding-top: 0;
  background:
    radial-gradient(circle at 50% 34%, rgba(255,255,255,.12), transparent 38%),
    linear-gradient(90deg, #6f593e 0%, #5a442d 22%, #392c22 100%);
}

.s3dv-layout-surface-studio.s3dv-mode-image .s3dv-canvas-wrap {
  padding-top: 0;
}

.s3dv-layout-surface-studio .s3dv-img-container {
  background: transparent;
}

.s3dv-layout-surface-studio .s3dv-img-stage {
  width: auto;
  height: auto;
  max-height: none;
  max-width: 100%;
  background: rgba(242,239,232,.72);
  box-shadow: none;
}

.s3dv-layout-surface-studio .s3dv-img-layer,
.s3dv-layout-surface-studio .s3dv-img-overlay {
  object-fit: contain;
}

.s3dv-layout-surface-studio .s3dv-scene-tabs {
  top: 86px;
  left: 344px;
  right: auto;
  max-width: min(680px, calc(100% - 372px));
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.s3dv-layout-surface-studio .s3dv-scene-tab {
  min-height: 40px;
  padding: 7px 14px 7px 8px;
  background: rgba(17,24,39,.74);
  color: #fff;
  border-color: rgba(255,255,255,.38);
  backdrop-filter: blur(12px);
}

.s3dv-layout-surface-studio .s3dv-scene-tab.active {
  background: var(--s3dv-primary);
  border-color: var(--s3dv-primary);
}

.s3dv-layout-surface-studio .s3dv-areas {
  order: 1;
  padding: 12px 14px 10px;
  background: rgba(255,255,255,.72);
  border-bottom: 1px solid rgba(236,233,228,.72);
}

.s3dv-layout-surface-studio .s3dv-areas__label {
  display: none;
}

.s3dv-layout-surface-studio .s3dv-areas__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)); /* 中文注释：改为 4 列，使 Floors, Benchtop, Cabinets, Tap 并排在一行 */
  gap: 6px;
}

.s3dv-layout-surface-studio .s3dv-area-btn {
  min-height: 52px;
  padding: 6px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 8px;
  background: rgba(255,255,255,.72);
  color: #31302d;
  border-color: #dcd8d1;
  font-size: 11px; /* 中文注释：轻微缩小字号防止断行 */
  font-weight: 760;
}

.s3dv-area-btn__icon {
  font-size: 15px;
  line-height: 1;
}

.s3dv-layout-surface-studio .s3dv-area-btn.active {
  background: rgba(255,255,255,.97);
  color: #111;
  border-color: #2d3034;
  box-shadow: 0 8px 20px rgba(17,24,39,.13), inset 0 0 0 1px #2d3034;
}

.s3dv-layout-surface-studio .s3dv-area-status {
  display: none !important;
}

.s3dv-layout-surface-studio .s3dv-panel__filter {
  order: 2;
  padding: 12px 14px;
  background: rgba(255,255,255,.68);
  border-bottom: 1px solid rgba(236,233,228,.72);
}

.s3dv-layout-surface-studio .s3dv-filter-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(17,24,39,.12);
  border-radius: 7px;
  background: #fbfaf7;
  color: #4a4640;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s ease;
}

.s3dv-layout-surface-studio .s3dv-filter-toggle-btn:hover {
  background: #f4efe6;
  border-color: rgba(17,24,39,.24);
}

.s3dv-layout-surface-studio .s3dv-filter-toggle-btn.active {
  background: #2d3034;
  color: #fff;
  border-color: #2d3034;
}

.s3dv-layout-surface-studio .s3dv-filter-tags {
  display: none; /* 中文注释：默认隐藏筛选面板，节省高度 */
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(17,24,39,.08);
}

.s3dv-layout-surface-studio .s3dv-filter-tags.show {
  display: grid; /* 中文注释：当有 active / show 状态时，才展开显示 */
}

.s3dv-layout-surface-studio .s3dv-search {
  height: 42px;
  padding: 0 14px;
  border-radius: 7px;
  font-size: 14px;
}

.s3dv-layout-surface-studio .s3dv-filter-tags {
  margin-top: 12px;
}

.s3dv-layout-surface-studio .s3dv-filter-row {
  gap: 7px;
}

.s3dv-layout-surface-studio .s3dv-tag-btn {
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 6px;
  color: #33302c;
}

.s3dv-layout-surface-studio .s3dv-tag-btn.active {
  background: #2d3034;
  border-color: #2d3034;
  color: #fff;
  box-shadow: none;
}

.s3dv-layout-surface-studio .s3dv-stones-grid {
  order: 3;
  flex: 1 1 0%; /* 中文注释：占据面板剩余的高度空间 */
  min-height: 0; /* 中文注释：允许进行收缩 */
  overflow-y: auto; /* 中文注释：开启垂直滚动 */
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px 14px 16px;
  background: rgba(255,255,255,.68);
}

.s3dv-area-guidance {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #eadfca;
  border-radius: 7px;
  background: #fbfaf7;
  color: #6d5b38;
  font-size: 12px;
  line-height: 1.45;
}

.s3dv-area-guidance strong {
  color: #342d23;
  font-size: 13px;
}

.s3dv-layout-surface-studio .s3dv-stone-item {
  min-height: 82px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: stretch;
  border-radius: 8px;
  box-shadow: none;
  background: rgba(255,255,255,.72);
}

.s3dv-layout-surface-studio .s3dv-stone-item:hover {
  transform: none;
  border-color: #9b958c;
  box-shadow: 0 8px 20px rgba(17,24,39,.08);
}

.s3dv-layout-surface-studio .s3dv-stone-item.active {
  border-color: #9b958c;
  box-shadow: inset 0 0 0 2px #9b958c;
}

.s3dv-layout-surface-studio .s3dv-stone-item--unavailable {
  opacity: .72;
  filter: grayscale(.12);
}

.s3dv-layout-surface-studio .s3dv-stone-thumb {
  height: 100%;
  min-height: 82px;
  flex: none;
  background: #eeeae3;
}

.s3dv-layout-surface-studio .s3dv-stone-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 10px 34px 10px 12px;
}

.s3dv-stone-brand {
  margin: 0;
  color: #77716a;
  font-size: 12px;
  font-weight: 700;
}

.s3dv-layout-surface-studio .s3dv-stone-name {
  padding: 0;
  font-size: 14px;
  font-weight: 760;
  white-space: normal;
}

.s3dv-layout-surface-studio .s3dv-stone-sku {
  padding: 0;
  font-size: 12px;
}

.s3dv-stone-more {
  margin-top: 6px;
  color: #5c5852;
  font-size: 12px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.s3dv-layout-surface-studio .s3dv-stone-detail-btn {
  opacity: 1;
  top: 9px;
  right: 9px;
  width: 24px;
  height: 24px;
  background: rgba(255,255,255,.9);
  color: #4a4640;
}

.s3dv-layout-surface-studio .s3dv-actions {
  order: 4;
  padding: 12px 14px 14px;
  background: rgba(255,255,255,.72);
}

.s3dv-hotspot-label-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  width: 100%;
  height: 100%;
  transform-origin: center center;
  pointer-events: none;
}

.s3dv-layout-surface-studio .s3dv-hotspot-label {
  display: none;
}

.s3dv-hotspot-pill {
  position: absolute;
  transform: translate(-50%, -50%);
  min-height: 34px;
  max-width: 180px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  background: rgba(24,22,19,.76);
  color: #fff;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0;
  box-shadow: 0 8px 22px rgba(0,0,0,.24);
  backdrop-filter: blur(10px);
  cursor: pointer;
  pointer-events: auto;
  white-space: nowrap;
  transition: transform .16s, background .16s, box-shadow .16s;
}

.s3dv-hotspot-pill:hover,
.s3dv-hotspot-pill--active {
  transform: translate(-50%, -50%) scale(1.04);
  background: rgba(17,17,17,.88);
  box-shadow: 0 10px 26px rgba(0,0,0,.30);
}

.s3dv-hotspot-pill__check {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  font-size: 11px;
}

.s3dv-hotspot-pill--active .s3dv-hotspot-pill__check {
  background: #fff;
  color: #111;
}

.s3dv-layout-surface-studio .s3dv-view-bar {
  left: 18px;
  right: 92px;
  bottom: 64px;
}

.s3dv-layout-surface-studio .s3dv-zoom-bar {
  right: 18px;
  bottom: 64px;
}

.s3dv-selection-dock {
  position: absolute;
  left: 344px;
  right: 48px;
  bottom: 12px;
  z-index: 14;
  height: 46px;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.97);
  border: 1px solid rgba(17,24,39,.08);
  box-shadow: 0 8px 24px rgba(17,24,39,.12);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.s3dv-selection-dock[hidden] {
  display: none !important;
}

.s3dv-selection-dock__thumb {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #e1ddd6;
  border-radius: 8px;
  background: #f1eee8;
  color: #6d655c;
  font-size: 15px;
}

.s3dv-selection-dock__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.s3dv-selection-dock__copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.s3dv-selection-dock__area {
  flex: 0 0 auto;
  color: #7b746d;
  font-size: 11px;
  font-weight: 700;
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.s3dv-selection-dock__name {
  flex: 0 1 auto;
  color: #211f1d;
  font-size: 13px;
  line-height: 1.2;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.s3dv-selection-dock__meta {
  display: none;
}

.s3dv-selection-dock__chips {
  min-width: 0;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  gap: 4px;
  margin-top: 0;
  overflow: hidden;
}

.s3dv-selection-chip {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 116px;
  padding: 3px 7px;
  border: 1px solid #e1ddd6;
  border-radius: 999px;
  background: #f8f6f2;
  color: #4b463f;
  font-size: 10.5px;
  text-align: left;
  cursor: pointer;
}

.s3dv-selection-chip span,
.s3dv-selection-chip strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.s3dv-selection-chip strong {
  color: #1f1c18;
  font-size: 10.5px;
}

.s3dv-selection-chip--active {
  border-color: #9b958c;
  background: #fff;
  box-shadow: inset 0 0 0 1px #9b958c;
}

.s3dv-selection-chip--selected {
  background: #f3efe8;
}

.s3dv-selection-dock__reset {
  margin-left: auto;
  min-height: 30px;
  padding: 5px 10px;
  border: 0;
  border-left: 1px solid #e4e0d9;
  background: transparent;
  color: #37332e;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 1180px) {
  .s3dv-layout-surface-studio .s3dv-tool-btn--muted,
  .s3dv-layout-surface-studio .s3dv-tool-btn--menu {
    display: none;
  }
  .s3dv-layout-surface-studio .s3dv-surface-toolbar {
    left: 332px;
  }
}

@media (max-width: 900px) {
  .s3dv-layout-surface-studio {
    width: calc(100vw - 20px);
    min-height: 0;
    margin: 16px auto;
  }

  .s3dv-layout-surface-studio .s3dv-body {
    flex-direction: column;
    background: #f2f0eb;
  }

  .s3dv-layout-surface-studio .s3dv-panel {
    position: relative;
    left: auto;
    top: auto;
    bottom: auto;
    order: 2;
    width: 100%;
    flex-basis: auto;
    min-width: 0;
    border-right: 0;
    border-top: 1px solid #e4e1dc;
    box-shadow: none;
  }

  .s3dv-layout-surface-studio .s3dv-surface-toolbar {
    left: 10px;
    right: 10px;
    top: 10px;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .s3dv-layout-surface-studio .s3dv-canvas-wrap,
  .s3dv-layout-surface-studio.s3dv-mode-image .s3dv-canvas-wrap {
    min-height: min(66vw, 520px);
    padding-top: 0;
  }

  .s3dv-layout-surface-studio .s3dv-scene-tabs {
    left: 10px;
    right: 10px;
    top: 70px;
    max-width: none;
  }

  .s3dv-layout-surface-studio .s3dv-view-bar {
    bottom: 10px;
    right: 10px;
  }

  .s3dv-selection-dock {
    position: static;
    order: 1;
    margin: 0;
    flex-wrap: wrap;
    border-radius: 0;
    box-shadow: none;
  }

  .s3dv-selection-dock__reset {
    margin-left: 0;
    width: 100%;
    border-left: 0;
    border-top: 1px solid #e4e0d9;
  }
}

@media (max-width: 560px) {
  .s3dv-layout-surface-studio .s3dv-surface-toolbar {
    min-height: 46px;
    padding: 6px;
  }

  .s3dv-tool-btn {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 12px;
  }

  .s3dv-layout-surface-studio .s3dv-areas__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .s3dv-layout-surface-studio .s3dv-stone-item {
    grid-template-columns: 108px minmax(0, 1fr);
    min-height: 116px;
  }

  .s3dv-layout-surface-studio .s3dv-stone-thumb {
    min-height: 116px;
  }

  .s3dv-hotspot-pill {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 12px;
  }
}
