:root,
body.theme-b-pro {
  --ink: #143044;
  --ink-soft: #4a6576;
  --ocean: #129ed0;
  --ocean-deep: #076f9a;
  --foam: #f2fbff;
  --paper: #fffdf7;
  --sun: #ffd83d;
  --sun-deep: #e2b900;
  --mint: #66d6c2;
  --coral: #ff7567;
  --line: rgba(20, 48, 68, 0.14);
  --line-strong: rgba(20, 48, 68, 0.26);
  --panel: rgba(255, 255, 255, 0.88);
  --panel-solid: #ffffff;
  --yellow: var(--sun);
  --red: var(--coral);
  --blue: var(--ocean);
  --green: var(--mint);
  --shadow: 0 20px 60px rgba(7, 111, 154, 0.16);
  --radius: 8px;
  --topbar: 64px;
  --muted-copy: var(--ink-soft);
  --accent-copy: var(--ocean-deep);
  --canvas-head: rgba(255, 255, 255, 0.88);
  --canvas-foot: rgba(255, 255, 255, 0.9);
  --stage-bg: linear-gradient(135deg, rgba(18, 158, 208, 0.04), rgba(255, 216, 61, 0.08));
  color: var(--ink);
}

html {
  min-width: 320px;
  height: 100%;
  overflow: hidden;
  background: var(--foam);
}

body.theme-b-pro {
  min-height: 100svh;
  height: 100%;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(18, 158, 208, 0.08) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(0deg, rgba(255, 216, 61, 0.09) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(135deg, #f5fdff 0%, #ffffff 48%, #fff8dd 100%);
  color: var(--ink);
  font-family: "Avenir Next Rounded", "Nunito Sans", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  line-height: 1.35;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(18, 158, 208, 0.28);
  outline-offset: 2px;
}

.editor {
  min-height: 100svh;
  display: grid;
  grid-template-rows: var(--topbar) minmax(0, 1fr);
}

.is-embedded-editor .v4-topbar {
  display: none;
}

.is-embedded-editor .editor {
  grid-template-rows: minmax(0, 1fr);
}

.v4-topbar {
  min-height: var(--topbar);
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
  position: relative;
  z-index: 80;
}

.v4-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.v4-brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(18, 158, 208, 0.28);
  border-radius: 50%;
  background: #fff;
  color: var(--ocean);
  box-shadow: 0 8px 20px rgba(18, 158, 208, 0.12);
}

.v4-brand-mark img,
.v4-primary-action img {
  width: 18px;
  height: 18px;
  display: block;
}

.v4-brand-name {
  display: block;
  color: var(--ink);
  font-family: "Cooper Black", "Arial Rounded MT Bold", "PingFang SC", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
}

.v4-brand-name span {
  color: var(--sun-deep);
  text-shadow: 0 1px 0 var(--ink);
}

.v4-brand-sub {
  display: block;
  margin-top: 1px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.v4-primary-action {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.v4-top-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.v4-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border-color: rgba(20, 48, 68, 0.34);
  background: var(--sun);
  box-shadow: 0 3px 0 var(--ink);
  color: var(--ink);
}

.workspace {
  height: calc(100svh - var(--topbar));
  min-height: 0;
  display: grid;
  grid-template-columns: 264px minmax(420px, 1fr) 304px;
  gap: 12px;
  padding: 12px;
  isolation: isolate;
}

.is-embedded-editor .workspace {
  height: 100svh;
  padding: 10px;
}

.panel,
.canvas,
.dialog,
.toast {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  min-width: 0;
  height: 100%;
  display: block;
  padding: 0;
  overflow: auto;
}

.left-panel {
  overflow: visible;
}

.left-panel,
.right-panel {
  scrollbar-width: thin;
  scrollbar-color: rgba(20, 48, 68, 0.24) transparent;
}

.left-panel::before,
.right-panel::before {
  display: block;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 24px;
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: 0;
  white-space: pre-line;
}

.left-panel::before {
  content: "工作台设置\a一屏看清所有选择";
}

.right-panel::before {
  content: "订单设置\a价格与阶梯折扣";
}

html[lang="en"] .left-panel::before {
  content: "Studio settings\aKeep every choice visible";
}

html[lang="en"] .right-panel::before {
  content: "Order setup\aPrice and volume tiers";
}

.section {
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.section:last-child {
  border-bottom: 0;
}

.label {
  margin: 0;
  color: var(--ocean-deep);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.copy,
.panel-copy,
.small-copy {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
}

.print-switch,
.segmented,
.canvas-tabs,
.mobile-print-switch,
.canvas-side-switch {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.print-switch button,
.segmented button,
.canvas-tabs button,
.mobile-print-switch button,
.canvas-side-switch button {
  min-height: 36px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 900;
}

.print-switch button:last-child,
.segmented button:last-child,
.canvas-tabs button:last-child,
.mobile-print-switch button:last-child,
.canvas-side-switch button:last-child {
  border-right: 0;
}

.print-switch button.is-active,
.segmented button.is-active,
.canvas-tabs button.is-active,
.mobile-print-switch button.is-active,
.canvas-side-switch button.is-active {
  background: var(--ink);
  color: #fff;
}

.upload-zone {
  gap: 9px;
  min-height: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
}

.upload-zone h2 {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
}

.button-row {
  gap: 8px;
}

.button,
.tool,
.option,
.choice-card,
.tier,
.swatch,
.gear-button,
.product-menu-trigger,
.product-menu-panel button,
.mobile-summary-cell,
.mobile-sheet-close,
.mobile-sheet-tabs button,
.mobile-sheet-grid button,
.mobile-sheet-quantity button,
.quantity button,
.quantity input {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}

.button,
.tool,
.option {
  min-height: 42px;
  font-size: 13px;
  font-weight: 900;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 13px;
}

.button.primary,
.right-panel .order-actions .button.primary {
  border-color: transparent;
  background: var(--ocean);
  color: #fff;
}

.button.danger,
.right-panel .order-actions .button.danger {
  border-color: rgba(20, 48, 68, 0.34);
  background: var(--sun);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
}

.button.dark,
.right-panel .order-actions .button.dark {
  background: var(--ink);
  color: #fff;
}

.button.secondary,
.right-panel .order-actions .button.secondary {
  border-color: rgba(18, 158, 208, 0.36);
  background: #ecfaff;
  color: var(--ocean-deep);
}

.button:disabled,
.button[disabled],
.tool:disabled,
.tool[disabled] {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.tool-grid {
  gap: 8px;
}

.left-panel .tool-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.left-panel .action-grid {
  opacity: 0.84;
}

.tool {
  padding: 9px 10px;
  text-align: center;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.tool:hover,
.tool:focus-visible,
.option:hover,
.option:focus-visible,
.button:hover,
.button:focus-visible,
.tier:hover,
.tier:focus-visible,
.v4-primary-action:hover,
.v4-primary-action:focus-visible {
  border-color: var(--ocean);
  transform: translateY(-1px);
}

.tool.is-active,
.option.is-active,
.bg-toggle.is-active {
  border-color: rgba(18, 158, 208, 0.72);
  background: rgba(18, 158, 208, 0.12);
  color: var(--ink);
}

.tool.danger-soft {
  border-color: rgba(255, 216, 61, 0.72);
  background: var(--sun);
  color: var(--ink);
}

.tool[data-action="start-over"] {
  background: rgba(255, 117, 103, 0.14);
  color: var(--ink);
}

.node-help {
  border: 1px solid rgba(255, 216, 61, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 248, 221, 0.9);
  color: var(--ink);
  font-weight: 800;
}

.settings-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.gear-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 950;
}

.gear-button.bg-toggle {
  width: auto;
  min-width: 92px;
  padding: 0 11px;
  font-size: 12px;
}

.range-row input {
  accent-color: var(--ocean);
}

.select-popover {
  border: 1px solid rgba(20, 48, 68, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 24px 60px rgba(20, 48, 68, 0.22);
  backdrop-filter: blur(18px);
}

.settings-popover.is-open {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 76px;
  top: auto;
  z-index: 120;
  width: min(360px, calc(100vw - 28px));
  transform: translateX(-50%);
}

.choice-card {
  min-width: 0;
  padding: 10px;
  text-align: left;
  background: rgba(255, 255, 255, 0.92);
}

.choice-card.is-active,
.choice-card:hover,
.choice-card:focus-visible {
  border-color: var(--ocean);
  background: #ecfaff;
}

.choice-thumb {
  border-radius: 50%;
  background: #e8f8ff;
}

.canvas {
  min-width: 0;
  height: 100%;
  min-height: 0;
  max-height: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.canvas-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--canvas-head);
}

.canvas-head > div:first-child {
  min-width: 0;
}

.canvas-head h2 {
  color: var(--ink);
  font-size: clamp(28px, 2.6vw, 40px);
  font-weight: 950;
  line-height: 1.02;
  letter-spacing: 0;
  text-wrap: balance;
}

.canvas-head .label {
  margin-bottom: 5px;
}

.canvas-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 166px;
  padding: 5px;
  border-radius: var(--radius);
}

.canvas-tabs button {
  min-width: 72px;
  min-height: 34px;
  border-right: 0;
  border-radius: calc(var(--radius) - 2px);
}

.product-menu {
  z-index: 35;
}

.product-menu-trigger {
  width: auto;
  min-width: 160px;
  min-height: 44px;
  padding: 0 34px 0 13px;
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.product-menu-trigger::before {
  width: 16px;
  height: 16px;
  border: 0;
  background: var(--ocean);
  -webkit-mask: url("/editor-ymq/assets/icons/package.svg") center / contain no-repeat;
  mask: url("/editor-ymq/assets/icons/package.svg") center / contain no-repeat;
}

.product-menu-trigger::after {
  right: 13px;
  width: 7px;
  height: 7px;
  border-width: 1.5px;
}

.product-menu-trigger:hover,
.product-menu-trigger[aria-expanded="true"] {
  border-color: var(--ocean);
  background: #ecfaff;
}

.product-menu-panel {
  border: 1px solid rgba(20, 48, 68, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 24px 60px rgba(20, 48, 68, 0.22);
}

.product-menu-panel button {
  min-height: 62px;
}

.product-menu-panel button.is-active {
  border-color: var(--ocean);
  background: #ecfaff;
}

.stage {
  min-height: 0;
  padding: clamp(20px, 4.2vh, 56px) clamp(18px, 4vw, 70px);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--stage-bg);
}

.stage::before {
  inset: clamp(12px, 3vh, 32px) clamp(14px, 4vw, 70px);
  border: 1px solid rgba(18, 158, 208, 0.32);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 42%, rgba(18, 158, 208, 0.12), transparent 42%),
    linear-gradient(135deg, rgba(18, 158, 208, 0.05), rgba(255, 216, 61, 0.08));
}

.stage::after {
  inset: clamp(28px, 5.5vh, 54px) clamp(26px, 6vw, 92px);
  border: 1px dashed rgba(7, 111, 154, 0.26);
  border-radius: 28px;
}

.artboard {
  width: min(50vh, 430px, 68%);
  max-width: 100%;
  z-index: 2;
}

.acrylic-glow {
  inset: 34px;
  border: 10px solid rgba(255, 255, 255, 0.36);
  border-radius: 42px;
  filter: drop-shadow(0 22px 48px rgba(20, 48, 68, 0.18));
}

.design-surface {
  filter: drop-shadow(0 24px 42px rgba(20, 48, 68, 0.16));
}

.cutline-path {
  stroke: var(--coral);
  stroke-width: 2.5;
  stroke-dasharray: 6 6;
}

.safe-margin-path {
  display: block;
  stroke: rgba(18, 158, 208, 0.55);
  stroke-width: 2;
  stroke-dasharray: 7 7;
}

.hole::before {
  border-color: var(--coral);
}

.hole::after {
  border-color: var(--coral);
}

.sample-cat {
  width: min(258px, 70%);
  height: min(284px, 72%);
}

.sample-cat-label {
  top: 8px;
  min-width: min(244px, 78vw);
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--sun);
  box-shadow: 0 3px 0 var(--ink);
  color: var(--ink);
  font-size: 16px;
}

.mobile-replace-button {
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.canvas-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  background: var(--canvas-foot);
  position: relative;
  z-index: 50;
}

.mobile-canvas-tools[data-mobile-tool-dock] {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.mobile-canvas-tools .tool {
  width: 42px;
  height: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink);
  font-size: 0;
  line-height: 1;
  position: relative;
}

.mobile-canvas-tools .tool::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--tool-icon, url("/editor-ymq/assets/icons/sparkle.svg")) center / contain no-repeat;
  mask: var(--tool-icon, url("/editor-ymq/assets/icons/sparkle.svg")) center / contain no-repeat;
}

.mobile-canvas-tools .tool::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  z-index: 80;
  width: max-content;
  max-width: 180px;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(20, 48, 68, 0.94);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.12;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 140ms ease, transform 140ms ease;
  box-shadow: 0 14px 28px rgba(20, 48, 68, 0.2);
}

.mobile-canvas-tools .tool:hover::after,
.mobile-canvas-tools .tool:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.mobile-canvas-tools .tool[data-tool="add-hole"] {
  --tool-icon: url("/editor-ymq/assets/icons/circle-dot.svg");
}

.mobile-canvas-tools .tool[data-tool="add-hole"]::after {
  content: "添加孔位/底座";
}

.mobile-canvas-tools .tool[data-tool="rotate"] {
  --tool-icon: url("/editor-ymq/assets/icons/rotate-cw.svg");
}

.mobile-canvas-tools .tool[data-tool="rotate"]::after {
  content: "旋转";
}

.mobile-canvas-tools .tool[data-tool="mirror"] {
  --tool-icon: url("/editor-ymq/assets/icons/flip-horizontal.svg");
}

.mobile-canvas-tools .tool[data-tool="mirror"]::after {
  content: "镜像";
}

.mobile-canvas-tools .tool[data-popover-trigger="settings"] {
  --tool-icon: url("/editor-ymq/assets/icons/sliders-horizontal.svg");
}

.mobile-canvas-tools .tool[data-popover-trigger="settings"]::after {
  content: "刀线调整";
}

.mobile-canvas-tools .tool[data-action="toggle-strip-background"] {
  --tool-icon: url("/editor-ymq/assets/icons/sparkle.svg");
}

.mobile-canvas-tools .tool[data-action="toggle-strip-background"]::after {
  content: "清背景";
}

.mobile-canvas-tools .tool[data-tool="remove-hole"] {
  --tool-icon: url("/editor-ymq/assets/icons/minus.svg");
}

.mobile-canvas-tools .tool[data-tool="remove-hole"]::after {
  content: "删除孔位/底座";
}

.mobile-canvas-tools .tool[data-tool="node-edit"] {
  --tool-icon: url("/editor-ymq/assets/icons/move.svg");
}

.mobile-canvas-tools .tool[data-tool="node-edit"]::after {
  content: "节点编辑";
}

.mobile-canvas-tools .tool[data-action="check-design"] {
  --tool-icon: url("/editor-ymq/assets/icons/check-circle.svg");
  width: auto;
  min-width: 116px;
  grid-auto-flow: column;
  gap: 8px;
  padding: 0 12px;
  background: var(--sun);
  font-size: 13px;
  font-weight: 950;
}

.mobile-canvas-tools .tool[data-action="check-design"]::before {
  width: 17px;
  height: 17px;
}

.mobile-canvas-tools .tool[data-action="check-design"]::after {
  content: "";
}

.mobile-canvas-tools .tool[data-cart-view-button] {
  --tool-icon: url("/editor-ymq/assets/icons/shopping-cart.svg");
}

.mobile-canvas-tools .tool[data-cart-view-button]::after {
  content: "查看购物车";
}

html[lang="en"] .mobile-canvas-tools .tool[data-tool="add-hole"]::after {
  content: "Add hole/base";
}

html[lang="en"] .mobile-canvas-tools .tool[data-tool="rotate"]::after {
  content: "Rotate";
}

html[lang="en"] .mobile-canvas-tools .tool[data-tool="mirror"]::after {
  content: "Mirror";
}

html[lang="en"] .mobile-canvas-tools .tool[data-popover-trigger="settings"]::after {
  content: "Cutline settings";
}

html[lang="en"] .mobile-canvas-tools .tool[data-action="toggle-strip-background"]::after {
  content: "Remove BG";
}

html[lang="en"] .mobile-canvas-tools .tool[data-tool="remove-hole"]::after {
  content: "Remove hole/base";
}

html[lang="en"] .mobile-canvas-tools .tool[data-tool="node-edit"]::after {
  content: "Node edit";
}

html[lang="en"] .mobile-canvas-tools .tool[data-cart-view-button]::after {
  content: "View cart";
}

.mobile-node-panel {
  gap: 9px;
}

.right-panel {
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.right-panel::before {
  order: 0;
}

.right-panel > .section:nth-of-type(3) {
  order: 1;
}

.right-panel > .section:nth-of-type(1) {
  order: 2;
}

.right-panel > .section:nth-of-type(2) {
  order: 3;
}

.right-panel > .mobile-order-summary {
  order: 4;
}

.right-panel > .mobile-quantity-discount {
  order: 5;
}

.right-panel > .order-actions {
  order: 6;
}

.right-panel .section:last-child {
  position: sticky;
  bottom: 0;
  margin: 0;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  z-index: 5;
  backdrop-filter: blur(18px);
}

.config-stack {
  gap: 8px;
}

.option {
  min-height: 66px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px;
  background: rgba(255, 255, 255, 0.92);
  text-align: left;
}

.option span:first-child {
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option .mini {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.price-box {
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.price-box .price {
  color: var(--ink);
  font-size: 42px;
  font-weight: 950;
  line-height: 0.96;
}

.quantity {
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.quantity button,
.quantity input {
  min-height: 40px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
}

.quantity button:first-child {
  border-right: 1px solid var(--line);
}

.quantity button:last-child {
  border-left: 1px solid var(--line);
}

.tier-ladder {
  grid-template-columns: 1fr;
  gap: 8px;
}

.tier {
  min-height: 52px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.tier strong {
  color: var(--ink);
  font-size: 13px;
}

.tier span {
  color: var(--ocean-deep);
  font-size: 12px;
  font-weight: 950;
}

.tier.is-active {
  border-color: rgba(18, 158, 208, 0.72);
  background: rgba(18, 158, 208, 0.12);
  box-shadow: inset 3px 0 0 var(--ocean);
}

.order-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.order-actions .button {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 950;
}

.order-actions .button.dark {
  grid-column: 1 / -1;
}

.cart-added-actions {
  grid-column: 1 / -1;
}

.toast {
  right: 16px;
  top: 16px;
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 46px rgba(20, 48, 68, 0.2);
}

.dialog {
  border-color: var(--line-strong);
}

.mobile-order-summary,
.mobile-quantity-discount,
.mobile-config-sheet {
  border-color: var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
}

.mobile-sheet-grid button.is-active,
.mobile-sheet-tabs button.is-active,
.mobile-summary-cell.is-active,
.mobile-tier-preview-choice.is-active {
  border-color: var(--ocean);
  background: rgba(18, 158, 208, 0.12);
  color: var(--ink);
}

@media (min-width: 1321px) {
  .canvas-head {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
}

@media (max-width: 1320px) {
  .canvas-head .product-menu {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 244px minmax(360px, 1fr) 286px;
  }

  .canvas-head h2 {
    font-size: 32px;
  }
}

@media (max-width: 980px) {
  html {
    height: auto;
    overflow: auto;
  }

  body.theme-b-pro {
    height: auto;
    overflow: auto;
  }

  .editor {
    min-height: 100svh;
    display: block;
  }

  .v4-topbar {
    position: sticky;
    top: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 0 14px;
  }

  .v4-brand-sub {
    display: none;
  }

  .workspace,
  .is-embedded-editor .workspace {
    height: auto;
    min-height: 100svh;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .canvas {
    order: 1;
    height: auto;
    min-height: 560px;
  }

  .left-panel {
    order: 2;
    height: auto;
    overflow: visible;
  }

  .right-panel {
    order: 3;
    height: auto;
    overflow: visible;
  }

  .left-panel::before,
  .right-panel::before {
    padding: 12px;
    font-size: 22px;
  }

  .canvas-head {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .canvas-head h2 {
    font-size: 30px;
  }

  .canvas-tabs {
    width: 100%;
  }

  .product-menu-trigger {
    width: 100%;
  }

  .stage {
    min-height: 380px;
    padding: 18px;
  }

  .stage::before {
    inset: 10px;
  }

  .stage::after {
    inset: 28px;
  }

  .artboard {
    width: min(62vw, 330px);
  }

  .canvas-foot {
    padding: 10px;
  }

  .mobile-canvas-tools[data-mobile-tool-dock] {
    justify-content: space-between;
  }

  .mobile-canvas-tools .tool {
    width: 40px;
    height: 40px;
    min-height: 40px;
  }

  .mobile-canvas-tools .tool[data-action="check-design"] {
    min-width: 108px;
  }

  .left-panel .tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .order-actions {
    position: sticky;
    bottom: 0;
    background: rgba(255, 255, 255, 0.94);
  }

  .select-popover {
    left: 10px !important;
    right: 10px !important;
    width: auto;
    max-height: min(72svh, 620px);
    overflow: auto;
  }

  .settings-popover.is-open {
    left: 10px !important;
    right: 10px !important;
    bottom: 72px;
    width: auto;
    transform: none;
  }
}

@media (max-width: 520px) {
  :root,
  body.theme-b-pro {
    --topbar: 60px;
  }

  .v4-topbar {
    min-height: var(--topbar);
  }

  .v4-brand-name {
    font-size: 21px;
  }

  .v4-brand-mark {
    width: 32px;
    height: 32px;
  }

  .v4-primary-action {
    min-height: 38px;
    padding: 8px 11px;
  }

  .left-panel .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .canvas {
    min-height: 520px;
  }

  .canvas-head h2 {
    font-size: 27px;
  }

  .stage {
    min-height: 332px;
  }

  .artboard {
    width: min(76vw, 286px);
  }

  .mobile-canvas-tools[data-mobile-tool-dock] {
    justify-content: flex-start;
  }

  .mobile-canvas-tools .tool {
    width: 39px;
    height: 39px;
  }

  .mobile-canvas-tools .tool[data-action="check-design"] {
    min-width: 100%;
    justify-content: center;
  }

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

  .order-actions .button.dark {
    grid-column: auto;
  }
}

body[data-v4-layout-mounted="true"] .left-panel::before,
body[data-v4-layout-mounted="true"] .right-panel::before {
  display: none;
  content: none;
}

body[data-v4-layout-mounted="true"] .panel-header {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--line);
}

body[data-v4-layout-mounted="true"] .workspace {
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
}

body[data-v4-layout-mounted="true"] .eyebrow {
  margin: 0 0 5px;
  color: var(--ocean-deep);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

body[data-v4-layout-mounted="true"] .panel-title {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: 0;
}

body[data-v4-layout-mounted="true"] .panel-copy {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
}

body[data-v4-layout-mounted="true"] .v4-config-panel,
body[data-v4-layout-mounted="true"] .v4-order-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  backdrop-filter: blur(18px);
}

body[data-v4-layout-mounted="true"] .v4-config-panel:has(.select-popover.is-open),
body[data-v4-layout-mounted="true"] .v4-config-panel:has(.product-menu-panel:not([hidden])) {
  overflow: visible;
}

body[data-v4-layout-mounted="true"] .v4-field-stack,
body[data-v4-layout-mounted="true"] .right-panel .compact-stack {
  display: grid;
  gap: 9px;
  padding: 12px;
  align-content: start;
  min-height: 0;
  overflow: auto;
}

body[data-v4-layout-mounted="true"] .v4-field-wrapper,
body[data-v4-layout-mounted="true"] .v4-field-group {
  position: relative;
  display: grid;
  gap: 8px;
  z-index: 1;
}

body[data-v4-layout-mounted="true"] .v4-field-wrapper:has(.select-popover.is-open),
body[data-v4-layout-mounted="true"] .v4-field-group:has(.select-popover.is-open) {
  z-index: 70;
}

body[data-v4-layout-mounted="true"] .field-button,
body[data-v4-layout-mounted="true"] .product-menu-trigger.field-button,
body[data-v4-layout-mounted="true"] .standee-base-field .option {
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  text-align: left;
  box-shadow: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

body[data-v4-layout-mounted="true"] .field-button:hover,
body[data-v4-layout-mounted="true"] .field-button:focus-visible,
body[data-v4-layout-mounted="true"] .product-menu-trigger.field-button:hover,
body[data-v4-layout-mounted="true"] .product-menu-trigger.field-button:focus-visible {
  border-color: var(--ocean);
  outline: none;
  transform: translateY(-1px);
}

body[data-v4-layout-mounted="true"] .field-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #e8f8ff;
  color: var(--ocean-deep);
}

body[data-v4-layout-mounted="true"] .field-icon .icon,
body[data-v4-layout-mounted="true"] .field-chevron {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

body[data-v4-layout-mounted="true"] .field-text {
  min-width: 0;
  display: grid;
  gap: 1px;
}

body[data-v4-layout-mounted="true"] .field-label,
body[data-v4-layout-mounted="true"] .option .mini {
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
}

body[data-v4-layout-mounted="true"] .field-value,
body[data-v4-layout-mounted="true"] .option .field-text > span:first-child,
body[data-v4-layout-mounted="true"] .product-menu-trigger.field-button {
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-v4-layout-mounted="true"] .field-meta {
  display: block;
  margin-top: 1px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-v4-layout-mounted="true"] .product-menu-trigger.field-button {
  position: relative;
  padding-left: 53px;
  padding-right: 38px;
}

body[data-v4-layout-mounted="true"] .product-menu-trigger.field-button::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e8f8ff;
  transform: translateY(-50%);
}

body[data-v4-layout-mounted="true"] .product-menu-trigger.field-button::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-62%) rotate(45deg);
}

body[data-v4-layout-mounted="true"] .product-menu-trigger.field-button > .field-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

body[data-v4-layout-mounted="true"] .product-menu-trigger.field-button > .field-chevron {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

body[data-v4-layout-mounted="true"] .v4-field-panel {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
}

body[data-v4-layout-mounted="true"] .v4-field-panel[hidden] {
  display: none;
}

body[data-v4-layout-mounted="true"] .v4-upload-zone {
  padding: 0;
  border: 0;
  background: transparent;
}

body[data-v4-layout-mounted="true"] .v4-upload-zone h2 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.1;
}

body[data-v4-layout-mounted="true"] .v4-upload-zone .button-row {
  display: grid;
  gap: 8px;
}

body[data-v4-layout-mounted="true"] .v4-field-popover,
body[data-v4-layout-mounted="true"] .product-menu-panel.v4-field-popover {
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  z-index: 90;
  width: min(520px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 96px));
  overflow: auto;
  border: 1px solid rgba(20, 48, 68, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 24px 60px rgba(20, 48, 68, 0.22);
  backdrop-filter: blur(18px);
}

body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover,
body[data-v4-layout-mounted="true"] .sku-popover.v4-field-popover,
body[data-v4-layout-mounted="true"] .material-popover.v4-field-popover {
  width: min(690px, calc(100vw - 32px));
}

body[data-v4-layout-mounted="true"] .choice-card {
  border-width: 1px;
  border-color: var(--line);
  box-shadow: none;
}

body[data-v4-layout-mounted="true"] .choice-card.is-active,
body[data-v4-layout-mounted="true"] .choice-card:hover,
body[data-v4-layout-mounted="true"] .choice-card:focus-visible {
  border-color: var(--ocean);
  background: #ecfaff;
}

body[data-v4-layout-mounted="true"] .panel-footer {
  padding: 12px;
  border-top: 1px solid var(--line);
}

body[data-v4-layout-mounted="true"] .proof-mini {
  display: grid;
  gap: 7px;
}

body[data-v4-layout-mounted="true"] .proof-mini-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

body[data-v4-layout-mounted="true"] .proof-mini-row strong {
  color: var(--ink);
}

body[data-v4-layout-mounted="true"] .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(102, 214, 194, 0.16);
  flex: 0 0 auto;
}

body[data-v4-layout-mounted="true"] .canvas-panel {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: visible;
  z-index: 40;
}

body[data-v4-layout-mounted="true"] .canvas-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

body[data-v4-layout-mounted="true"] .tool-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--line);
  background: var(--canvas-foot);
  position: relative;
  z-index: 90;
}

body[data-v4-layout-mounted="true"] .tool-strip .tools {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

body[data-v4-layout-mounted="true"] .tool-strip .tool-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 0;
  line-height: 1;
  position: relative;
  box-shadow: none;
}

body[data-v4-layout-mounted="true"] .tool-strip .tool-button[data-action="check-design"] {
  width: 42px;
  min-width: 42px;
  padding: 0;
  justify-content: center;
}

body[data-v4-layout-mounted="true"] .tool-strip .tool-button::before,
body[data-v4-layout-mounted="true"] .tool-strip .tool-button::after {
  display: none;
  content: none;
}

body[data-v4-layout-mounted="true"] .tool-strip .tool-button.is-active {
  border-color: rgba(18, 158, 208, 0.72);
  background: rgba(18, 158, 208, 0.12);
}

body[data-v4-layout-mounted="true"] .tool-strip .tool-icon {
  width: 18px;
  height: 18px;
  display: block;
}

body[data-v4-layout-mounted="true"] .tool-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  z-index: 120;
  width: max-content;
  max-width: 180px;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(20, 48, 68, 0.94);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.12;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 140ms ease, transform 140ms ease;
  box-shadow: 0 14px 28px rgba(20, 48, 68, 0.2);
}

body[data-v4-layout-mounted="true"] .tool-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(20, 48, 68, 0.94);
}

body[data-v4-layout-mounted="true"] .tool-label-mobile {
  display: none;
}

body[data-v4-layout-mounted="true"] .tool-label-full {
  display: inline;
}

body[data-v4-layout-mounted="true"] .tool-strip .tool-button:hover .tool-tooltip,
body[data-v4-layout-mounted="true"] .tool-strip .tool-button:focus-visible .tool-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

body[data-v4-layout-mounted="true"] .tool-strip .upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

body[data-v4-layout-mounted="true"] .tool-strip .upload-button .icon {
  width: 18px;
  height: 18px;
}

body[data-v4-layout-mounted="true"] .mobile-replace-button {
  display: none !important;
}

body[data-v4-layout-mounted="true"] .canvas-edit-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}

body[data-v4-layout-mounted="true"] .canvas-edit-actions button {
  min-width: 0;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, border-color 120ms ease;
  -webkit-tap-highlight-color: transparent;
}

body[data-v4-layout-mounted="true"] .canvas-edit-actions button:hover,
body[data-v4-layout-mounted="true"] .canvas-edit-actions button:focus-visible {
  border-color: var(--ink);
  background: #f7fbff;
  box-shadow: 0 2px 0 rgba(20, 48, 68, 0.42);
  outline: none;
}

body[data-v4-layout-mounted="true"] .canvas-edit-actions button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(20, 48, 68, 0.42);
}

body[data-v4-layout-mounted="true"] .canvas-edit-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

body[data-v4-layout-mounted="true"] .canvas-edit-actions .canvas-confirm-node-action {
  border-color: rgba(20, 48, 68, 0.34);
  background: var(--sun);
  box-shadow: 0 3px 0 var(--ink);
}

body[data-v4-layout-mounted="true"]:not(.is-node-editing) .canvas-edit-actions .canvas-confirm-node-action {
  display: none;
}

body[data-v4-layout-mounted="true"]:not(.is-node-editing) .canvas-edit-actions {
  grid-template-columns: minmax(0, 1fr);
}

body[data-v4-layout-mounted="true"].is-node-editing .canvas-edit-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column: 1 / -1;
}

body[data-v4-layout-mounted="true"].is-node-editing .mobile-node-panel {
  display: none !important;
}

body[data-v4-layout-mounted="true"] .settings-popover.cutline-panel {
  position: absolute;
  left: 14px;
  right: auto;
  bottom: calc(100% + 12px);
  top: auto;
  z-index: 110;
  width: min(360px, calc(100vw - 28px));
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 13px;
  transform: none;
}

body[data-v4-layout-mounted="true"] .sample-cat {
  width: min(310px, 76%);
  height: min(310px, 76%);
}

body[data-v4-layout-mounted="true"] .mascot-graphic {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 24px;
  filter: drop-shadow(0 18px 30px rgba(20, 48, 68, 0.16));
}

body[data-v4-layout-mounted="true"] .right-panel.v4-order-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

body[data-v4-layout-mounted="true"] .right-panel .v4-price-section {
  order: 0;
  overflow: auto;
}

body[data-v4-layout-mounted="true"] .right-panel .price-box {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

body[data-v4-layout-mounted="true"] .right-panel .qty-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(106px, 0.58fr);
  align-items: center;
  gap: 10px;
}

body[data-v4-layout-mounted="true"] .right-panel .v4-price-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

body[data-v4-layout-mounted="true"] .right-panel .price {
  color: var(--ink);
  font-size: 36px;
  font-weight: 950;
  line-height: 0.96;
  letter-spacing: 0;
}

body[data-v4-layout-mounted="true"] .right-panel .qty-stepper {
  display: grid;
  grid-template-columns: 38px minmax(42px, 1fr) 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

body[data-v4-layout-mounted="true"] .right-panel .qty-stepper button,
body[data-v4-layout-mounted="true"] .right-panel .qty-stepper input {
  min-height: 38px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  text-align: center;
  font-weight: 950;
}

body[data-v4-layout-mounted="true"] .right-panel .qty-stepper button:first-child {
  border-right: 1px solid var(--line);
}

body[data-v4-layout-mounted="true"] .right-panel .qty-stepper button:last-child {
  border-left: 1px solid var(--line);
}

body[data-v4-layout-mounted="true"] .right-panel .tier-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 850;
}

body[data-v4-layout-mounted="true"] .right-panel .tier-summary strong {
  color: var(--ink);
  font-size: 12px;
  text-align: right;
}

body[data-v4-layout-mounted="true"] .right-panel .tier-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

body[data-v4-layout-mounted="true"] .right-panel .tier-button {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  text-align: left;
}

body[data-v4-layout-mounted="true"] .right-panel .tier-button.is-active {
  border-color: rgba(18, 158, 208, 0.72);
  background: rgba(18, 158, 208, 0.12);
  box-shadow: inset 3px 0 0 var(--ocean);
}

body[data-v4-layout-mounted="true"] .right-panel .tier-button strong,
body[data-v4-layout-mounted="true"] .right-panel .tier-button span {
  display: block;
}

body[data-v4-layout-mounted="true"] .right-panel .tier-button span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 850;
}

body[data-v4-layout-mounted="true"] .right-panel .dock-actions {
  order: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

body[data-v4-layout-mounted="true"] .right-panel .dock-actions .button {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 950;
}

body[data-v4-layout-mounted="true"] .right-panel .dock-actions .confirm-action {
  border-color: rgba(20, 48, 68, 0.34);
  background: var(--sun);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
}

body[data-v4-layout-mounted="true"] .right-panel .dock-actions .cart-action {
  border-color: transparent;
  background: var(--ocean);
  color: #fff;
}

body[data-v4-layout-mounted="true"] .right-panel .dock-actions .buy-action {
  grid-column: 1 / -1;
  background: var(--ink);
}

body[data-v4-layout-mounted="true"] .right-panel .dock-actions .view-cart-action {
  grid-column: 1 / -1;
  border-color: rgba(18, 158, 208, 0.36);
  background: #ecfaff;
  color: var(--ocean-deep);
}

@media (max-width: 980px) {
  body[data-v4-layout-mounted="true"] .v4-config-panel,
  body[data-v4-layout-mounted="true"] .v4-order-panel {
    display: block;
    overflow: visible;
  }

  body[data-v4-layout-mounted="true"] .v4-field-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px;
  }

  body[data-v4-layout-mounted="true"] .v4-upload-field,
  body[data-v4-layout-mounted="true"] .v4-field-group {
    grid-column: 1 / -1;
  }

  body[data-v4-layout-mounted="true"] .tool-strip {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  body[data-v4-layout-mounted="true"] .tool-strip .tools {
    justify-content: space-between;
  }

  body[data-v4-layout-mounted="true"] .tool-strip .upload-button {
    width: 100%;
  }

  body[data-v4-layout-mounted="true"] .canvas-edit-actions {
    width: 100%;
    gap: 8px;
  }

  body[data-v4-layout-mounted="true"] .settings-popover.cutline-panel {
    position: fixed;
    left: 10px !important;
    right: 10px !important;
    bottom: 72px;
    top: auto;
    width: auto;
    transform: none;
  }

  body[data-v4-layout-mounted="true"] .right-panel .tier-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  body[data-v4-layout-mounted="true"] .v4-field-stack {
    grid-template-columns: 1fr;
  }

  body[data-v4-layout-mounted="true"] .tool-strip .tools {
    justify-content: flex-start;
  }

  body[data-v4-layout-mounted="true"] .tool-strip .tool-button {
    width: 39px;
    height: 39px;
    min-height: 39px;
  }

  body[data-v4-layout-mounted="true"] .right-panel .qty-row,
  body[data-v4-layout-mounted="true"] .right-panel .tier-grid,
  body[data-v4-layout-mounted="true"] .right-panel .dock-actions {
    grid-template-columns: 1fr;
  }

  body[data-v4-layout-mounted="true"] .right-panel .dock-actions .buy-action {
    grid-column: auto;
  }
}

body[data-v4-layout-mounted="true"] {
  --radius: 6px;
  --shadow: 0 18px 44px rgba(7, 111, 154, 0.14);
  --panel: rgba(255, 255, 255, 0.9);
}

body[data-v4-layout-mounted="true"] .workspace *,
body[data-v4-layout-mounted="true"] .workspace *::before,
body[data-v4-layout-mounted="true"] .workspace *::after {
  box-sizing: border-box;
}

body[data-v4-layout-mounted="true"] .panel,
body[data-v4-layout-mounted="true"] .canvas,
body[data-v4-layout-mounted="true"] .field-button,
body[data-v4-layout-mounted="true"] .v4-field-panel,
body[data-v4-layout-mounted="true"] .v4-field-popover,
body[data-v4-layout-mounted="true"] .choice-card,
body[data-v4-layout-mounted="true"] .product-menu-panel button,
body[data-v4-layout-mounted="true"] .image-choice,
body[data-v4-layout-mounted="true"] .price-box,
body[data-v4-layout-mounted="true"] .right-panel .tier,
body[data-v4-layout-mounted="true"] .tier-button,
body[data-v4-layout-mounted="true"] .tool-strip .tool-button,
body[data-v4-layout-mounted="true"] .tool-strip .upload-button,
body[data-v4-layout-mounted="true"] .right-panel .dock-actions .button {
  border-radius: var(--radius);
}

body.theme-b-pro[data-v4-layout-mounted="true"] .right-panel .tier,
body.theme-b-pro[data-v4-layout-mounted="true"] .right-panel .tier-button {
  border-radius: var(--radius);
}

body[data-v4-layout-mounted="true"] .left-panel.v4-config-panel {
  position: relative;
  z-index: 70;
  overflow: visible;
  border-color: rgba(18, 158, 208, 0.22);
}

body[data-v4-layout-mounted="true"] .left-panel.v4-config-panel:has(.select-popover.is-open),
body[data-v4-layout-mounted="true"] .left-panel.v4-config-panel:has(.product-menu-panel:not([hidden])) {
  z-index: 240;
}

body[data-v4-layout-mounted="true"] .canvas-panel {
  z-index: 30;
}

body[data-v4-layout-mounted="true"] .right-panel.v4-order-panel {
  z-index: 50;
  border-color: rgba(20, 48, 68, 0.18);
}

body[data-v4-layout-mounted="true"] .v4-field-stack:has(.select-popover.is-open),
body[data-v4-layout-mounted="true"] .v4-field-stack:has(.product-menu-panel:not([hidden])) {
  overflow: visible;
  z-index: 220;
}

body[data-v4-layout-mounted="true"] .v4-field-wrapper:has(.select-popover.is-open),
body[data-v4-layout-mounted="true"] .v4-field-wrapper:has(.product-menu-panel:not([hidden])),
body[data-v4-layout-mounted="true"] .v4-field-group:has(.select-popover.is-open) {
  z-index: 230;
}

body[data-v4-layout-mounted="true"] .v4-field-popover,
body[data-v4-layout-mounted="true"] .product-menu-panel.v4-field-popover {
  top: calc(100% + 7px);
  bottom: auto;
  z-index: 260;
  max-height: min(460px, calc(100svh - 96px));
  border-color: rgba(7, 111, 154, 0.24);
  box-shadow: 0 18px 42px rgba(20, 48, 68, 0.2);
}

body[data-v4-layout-mounted="true"] .v4-field-popover.v4-open-up,
body[data-v4-layout-mounted="true"] .product-menu-panel.v4-field-popover.v4-open-up {
  top: auto;
  bottom: calc(100% + 7px);
}

body[data-v4-layout-mounted="true"] .product-menu-trigger.field-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  padding: 9px;
  overflow: visible;
}

body[data-v4-layout-mounted="true"] .product-menu-trigger.field-button::before,
body[data-v4-layout-mounted="true"] .product-menu-trigger.field-button::after {
  display: none;
  content: none;
}

body[data-v4-layout-mounted="true"] .product-menu-trigger.field-button > .field-icon,
body[data-v4-layout-mounted="true"] .product-menu-trigger.field-button > .field-chevron {
  position: static;
  transform: none;
}

body[data-v4-layout-mounted="true"] .product-menu-trigger.field-button > .field-text {
  min-width: 0;
}

body[data-v4-layout-mounted="true"] .product-menu-trigger.field-button > .field-text,
body[data-v4-layout-mounted="true"] .product-menu-trigger.field-button .field-value,
body[data-v4-layout-mounted="true"] .product-menu-trigger.field-button .field-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-v4-layout-mounted="true"] .right-panel .panel-header {
  padding: 10px 12px 8px;
}

body[data-v4-layout-mounted="true"] .right-panel .panel-title {
  font-size: 22px;
}

body[data-v4-layout-mounted="true"] .right-panel .compact-stack {
  gap: 8px;
  padding: 10px;
  overflow: auto;
}

body[data-v4-layout-mounted="true"] .right-panel .price-box {
  gap: 6px;
  padding: 8px;
}

body[data-v4-layout-mounted="true"] .right-panel .qty-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 98px);
  gap: 8px;
}

body[data-v4-layout-mounted="true"] .right-panel .price {
  font-size: 31px;
}

body[data-v4-layout-mounted="true"] .right-panel .copy,
body[data-v4-layout-mounted="true"] .right-panel [data-price-note] {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.2;
}

body[data-v4-layout-mounted="true"] .right-panel .v4-price-main .copy {
  color: var(--ocean-deep);
  font-weight: 900;
}

body[data-v4-layout-mounted="true"] .right-panel [data-price-note] {
  font-weight: 800;
}

body[data-v4-layout-mounted="true"] .right-panel .qty-stepper {
  width: 100%;
  min-width: 0;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
}

body[data-v4-layout-mounted="true"] .right-panel .qty-stepper button,
body[data-v4-layout-mounted="true"] .right-panel .qty-stepper input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 0;
  line-height: 1;
}

body[data-v4-layout-mounted="true"] .right-panel .tier-summary {
  padding-top: 6px;
}

body[data-v4-layout-mounted="true"] .right-panel .tier-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

body[data-v4-layout-mounted="true"] .right-panel .tier-button {
  min-height: 40px;
  gap: 5px;
  padding: 6px 8px;
}

body[data-v4-layout-mounted="true"] .right-panel .tier-button strong {
  font-size: 12px;
  line-height: 1.05;
}

body[data-v4-layout-mounted="true"] .right-panel .tier-button span {
  font-size: 11px;
  line-height: 1.05;
}

body[data-v4-layout-mounted="true"] .right-panel .dock-actions {
  gap: 8px;
  padding: 8px 10px 9px;
}

body[data-v4-layout-mounted="true"] .right-panel .dock-actions .button {
  min-height: 40px;
  padding: 9px 10px;
  font-size: 13px;
  box-shadow: none;
}

body[data-v4-layout-mounted="true"] .right-panel .dock-actions .confirm-action {
  box-shadow: 0 2px 0 var(--ink);
}

body[data-v4-layout-mounted="true"] .field-button:hover,
body[data-v4-layout-mounted="true"] .field-button:focus-visible,
body[data-v4-layout-mounted="true"] .tool-strip .tool-button:hover,
body[data-v4-layout-mounted="true"] .tool-strip .tool-button:focus-visible,
body[data-v4-layout-mounted="true"] .right-panel .tier-button:hover,
body[data-v4-layout-mounted="true"] .right-panel .tier-button:focus-visible {
  border-color: rgba(18, 158, 208, 0.82);
  background: #f0fbff;
}

@media (max-height: 760px) and (min-width: 981px) {
  body[data-v4-layout-mounted="true"] .left-panel .panel-header {
    padding: 10px 12px 8px;
  }

  body[data-v4-layout-mounted="true"] .left-panel .panel-title {
    font-size: 22px;
  }

  body[data-v4-layout-mounted="true"] .left-panel .panel-copy {
    margin-top: 5px;
    font-size: 11px;
  }

  body[data-v4-layout-mounted="true"] .left-panel .v4-field-stack {
    gap: 7px;
    padding: 10px 12px 8px;
  }

  body[data-v4-layout-mounted="true"] .left-panel .field-button,
  body[data-v4-layout-mounted="true"] .left-panel .product-menu-trigger.field-button,
  body[data-v4-layout-mounted="true"] .left-panel .standee-base-field .option {
    min-height: 58px;
    padding: 8px;
  }

  body[data-v4-layout-mounted="true"] .left-panel .field-icon {
    width: 30px;
    height: 30px;
  }

  body[data-v4-layout-mounted="true"] .left-panel .panel-footer {
    padding: 8px 10px;
  }

  body[data-v4-layout-mounted="true"] .left-panel .proof-mini {
    gap: 5px;
  }

  body[data-v4-layout-mounted="true"] .left-panel .proof-mini-row {
    font-size: 11px;
  }

  body[data-v4-layout-mounted="true"] .left-panel .proof-mini-row:nth-child(2) {
    display: none;
  }
}

@media (max-width: 1180px) {
  body[data-v4-layout-mounted="true"] .right-panel .price {
    font-size: 28px;
  }

  body[data-v4-layout-mounted="true"] .right-panel .tier-button {
    min-height: 38px;
  }
}

@media (max-width: 520px) {
  body[data-v4-layout-mounted="true"] .v4-field-popover,
  body[data-v4-layout-mounted="true"] .product-menu-panel.v4-field-popover {
    width: 100%;
    max-width: calc(100vw - 42px);
    max-height: min(72svh, 560px);
  }

  body[data-v4-layout-mounted="true"] .right-panel .qty-row,
  body[data-v4-layout-mounted="true"] .right-panel .dock-actions {
    grid-template-columns: 1fr;
  }

  body[data-v4-layout-mounted="true"] .right-panel .tier-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 2026-06-04 V4 selector polish: compact popovers, blue focus, and mobile sheets. */
body[data-v4-layout-mounted="true"] .product-menu-panel.v4-field-popover {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  padding: 8px;
}

body[data-v4-layout-mounted="true"] .product-menu-panel.v4-field-popover button {
  min-height: 52px;
  padding: 9px 10px;
}

body[data-v4-layout-mounted="true"] .material-popover.v4-field-popover {
  width: min(456px, calc(100vw - 32px));
  min-height: 222px;
  grid-template-columns: repeat(3, minmax(132px, 1fr));
}

body[data-v4-layout-mounted="true"] .sku-popover.v4-field-popover {
  width: min(540px, calc(100vw - 32px));
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover {
  width: min(612px, calc(100vw - 32px));
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
}

body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover.has-hardware-preview {
  width: min(788px, calc(100vw - 32px));
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 6px;
  max-height: min(430px, calc(100vh - 96px));
  overflow: auto;
}

body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .hardware-choice-grid {
  min-width: 0;
  max-height: min(414px, calc(100vh - 114px));
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 1px 3px 1px 1px;
  scrollbar-width: thin;
}

body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .hardware-choice-grid .detail-preview {
  display: none !important;
}

body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .image-choice {
  min-height: 84px;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 7px;
  padding: 8px;
}

body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .hardware-image-choice {
  position: relative;
  min-height: 0;
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  padding: 4px;
  border-radius: 8px;
}

body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .hardware-image-choice.is-active {
  border-color: rgba(18, 158, 208, 0.82);
  background: #eaf8ff;
  box-shadow: inset 0 0 0 2px rgba(18, 158, 208, 0.72);
}

body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .hardware-image-choice.is-active::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--ocean);
  box-shadow: 0 0 0 2px #fff;
}

body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .choice-thumb {
  width: 42px;
  height: 42px;
  border-width: 1px;
  border-radius: 6px;
}

body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .hardware-image-choice .choice-thumb {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .hardware-image-choice .choice-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .hardware-image-choice > strong,
body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .hardware-image-choice > span:not(.choice-thumb) {
  display: none !important;
}

body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .choice-card strong,
body[data-v4-layout-mounted="true"] .sku-popover.v4-field-popover .choice-card strong,
body[data-v4-layout-mounted="true"] .material-popover.v4-field-popover .choice-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .choice-card > span:not(.detail-preview):not(.choice-thumb),
body[data-v4-layout-mounted="true"] .sku-popover.v4-field-popover .choice-card > span:not(.detail-preview):not(.choice-thumb),
body[data-v4-layout-mounted="true"] .material-popover.v4-field-popover .choice-card > span:not(.detail-preview):not(.choice-thumb) {
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

body[data-v4-layout-mounted="true"] .material-popover.v4-field-popover.has-choice-groups {
  width: min(640px, calc(100vw - 32px));
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 10px;
  padding: 10px;
}

body[data-v4-layout-mounted="true"] .material-popover.v4-field-popover.has-choice-groups .material-choice-group {
  min-width: 0;
  display: grid;
  gap: 7px;
}

body[data-v4-layout-mounted="true"] .material-popover.v4-field-popover.has-choice-groups .material-choice-group__title {
  margin: 0;
  color: #597184;
  font-size: 11px;
  font-weight: 950;
  line-height: 1.2;
  text-transform: uppercase;
}

body[data-v4-layout-mounted="true"] .material-popover.v4-field-popover.has-choice-groups .material-choice-group__items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body[data-v4-layout-mounted="true"] .material-popover.v4-field-popover.has-choice-groups .choice-card {
  min-height: 58px;
  align-content: start;
}

body[data-v4-layout-mounted="true"] .material-popover.v4-field-popover.has-choice-groups .choice-card strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.18;
}

body[data-v4-layout-mounted="true"] .stage::after {
  border-color: rgba(18, 158, 208, 0.46);
  border-radius: var(--radius);
}

body[data-v4-layout-mounted="true"] .canvas.is-canvas-focused .artboard {
  outline: 2px dashed rgba(18, 158, 208, 0.7);
  outline-offset: 10px;
}

body[data-v4-layout-mounted="true"] .sample-cat-label {
  border-color: rgba(18, 158, 208, 0.54);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(18, 158, 208, 0.14);
  color: var(--ocean-deep);
}

body[data-v4-layout-mounted="true"] .toast {
  position: fixed;
  left: auto;
  right: 18px;
  top: calc(var(--topbar, 64px) + 12px);
  width: min(360px, calc(100vw - 28px));
  max-height: min(128px, calc(100svh - 96px));
  transform: none;
  grid-template-columns: 4px 24px minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 2px;
  padding: 11px 14px 11px 0;
  border: 1px solid rgba(7, 111, 154, 0.26);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(7, 111, 154, 0.18);
  backdrop-filter: blur(14px);
  z-index: 520;
}

body[data-v4-layout-mounted="true"] .toast::before {
  content: "";
  grid-row: 1 / span 2;
  width: 4px;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0 999px 999px 0;
  background: var(--ocean);
  box-shadow: none;
}

body[data-v4-layout-mounted="true"] .toast::after {
  content: "i";
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  align-self: center;
  border: 1px solid rgba(7, 111, 154, 0.24);
  border-radius: 50%;
  background: #eaf8ff;
  color: var(--ocean-deep);
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
}

body[data-v4-layout-mounted="true"] .toast.is-success {
  border-color: rgba(31, 170, 111, 0.34);
}

body[data-v4-layout-mounted="true"] .toast.is-success::before {
  background: var(--mint);
}

body[data-v4-layout-mounted="true"] .toast.is-success::after {
  content: "✓";
  border-color: rgba(31, 170, 111, 0.32);
  background: #eafaf2;
  color: #0f7b4f;
  animation: none;
}

body[data-v4-layout-mounted="true"] .toast.is-error {
  border-color: rgba(255, 111, 97, 0.42);
}

body[data-v4-layout-mounted="true"] .toast.is-error::before {
  background: var(--coral);
}

body[data-v4-layout-mounted="true"] .toast.is-error::after {
  content: "!";
  border-color: rgba(255, 111, 97, 0.38);
  background: #fff0ee;
  color: #b3352a;
}

body[data-v4-layout-mounted="true"] .toast.is-loading::before {
  background: var(--ocean);
}

body[data-v4-layout-mounted="true"] .toast.is-loading::after {
  content: "";
  border-color: rgba(7, 111, 154, 0.18);
  border-top-color: var(--ocean);
  background: #fff;
  animation: toast-spin 0.72s linear infinite;
}

body[data-v4-layout-mounted="true"] .toast strong,
body[data-v4-layout-mounted="true"] .toast span {
  grid-column: 3;
}

body[data-v4-layout-mounted="true"] .toast strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

body[data-v4-layout-mounted="true"] .toast span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 980px) {
  body[data-v4-layout-mounted="true"] .workspace,
  body[data-v4-layout-mounted="true"].is-embedded-editor .workspace {
    overflow: visible;
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-backdrop {
    z-index: 500;
    background: rgba(20, 48, 68, 0.46);
  }

  body[data-v4-layout-mounted="true"] .mobile-config-sheet {
    max-height: min(62svh, 520px);
    gap: 8px;
    padding: 8px 10px 12px;
    border: 1px solid rgba(7, 111, 154, 0.2);
    border-bottom: 0;
    border-radius: var(--radius) var(--radius) 0 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -18px 42px rgba(7, 111, 154, 0.2);
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-handle {
    width: 42px;
    height: 4px;
    background: rgba(7, 111, 154, 0.28);
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-head {
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 8px;
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-head h2 {
    margin: 0;
    color: var(--ink);
    font-size: 17px;
    line-height: 1.1;
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-close {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(7, 111, 154, 0.24);
    border-radius: var(--radius);
    background: #eefaff;
    color: var(--ocean-deep);
    font-size: 22px;
    box-shadow: none;
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-tabs {
    border: 1px solid rgba(7, 111, 154, 0.18);
    border-radius: var(--radius);
    background: #f7fcff;
    overflow: hidden;
  }

  body[data-v4-layout-mounted="true"] [data-mobile-config-sheet][data-mobile-sheet-mode="price-only"] .mobile-sheet-tabs {
    display: none;
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-tabs button {
    min-height: 34px;
    border-right: 1px solid rgba(7, 111, 154, 0.16);
    color: var(--ink-soft);
    font-size: 12px;
    box-shadow: none;
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-tabs button.is-active {
    background: #e8f8ff;
    color: var(--ocean-deep);
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-body {
    max-height: min(42svh, 360px);
    padding-right: 0;
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-panel {
    gap: 7px;
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-label {
    margin-top: 2px;
    color: var(--ocean-deep);
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-grid {
    gap: 6px;
  }

  body[data-v4-layout-mounted="true"] .mobile-hardware-grid,
  body[data-v4-layout-mounted="true"] .mobile-color-grid {
    max-height: min(32svh, 224px);
  }

  body[data-v4-layout-mounted="true"] .mobile-hardware-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
    overflow: auto;
    overscroll-behavior: contain;
    padding-right: 1px;
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-choice {
    min-height: 38px;
    padding: 7px;
    border: 1px solid rgba(20, 48, 68, 0.16);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: none;
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-choice strong {
    font-size: 12px;
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-choice span {
    font-size: 10.5px;
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-choice.is-active {
    border-color: rgba(18, 158, 208, 0.7);
    background: #eaf8ff;
    box-shadow: inset 3px 0 0 var(--ocean);
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-thumb {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(7, 111, 154, 0.18);
    border-radius: var(--radius);
    background: #f7fcff;
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-choice.has-thumb {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-choice.mobile-hardware-choice {
    position: relative;
    min-height: 0;
    aspect-ratio: 1 / 1;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    padding: 3px;
    border-radius: 8px;
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-choice.mobile-hardware-choice.is-active {
    box-shadow: inset 0 0 0 2px rgba(18, 158, 208, 0.72);
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-choice.mobile-hardware-choice.is-active::after {
    content: "";
    position: absolute;
    right: 4px;
    top: 4px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--ocean);
    box-shadow: 0 0 0 2px #fff;
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-choice.mobile-hardware-choice .mobile-sheet-thumb {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 6px;
    background: transparent;
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-choice.mobile-hardware-choice .mobile-sheet-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-choice.mobile-hardware-choice strong,
  body[data-v4-layout-mounted="true"] .mobile-sheet-choice.mobile-hardware-choice span:not(.mobile-sheet-thumb) {
    display: none !important;
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-price {
    padding: 9px;
    border: 1px solid rgba(7, 111, 154, 0.2);
    border-radius: var(--radius);
    background: #eaf8ff;
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-quantity,
  body[data-v4-layout-mounted="true"] .mobile-compact-quantity {
    border: 1px solid rgba(7, 111, 154, 0.2);
    border-radius: var(--radius);
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-quantity button:first-child,
  body[data-v4-layout-mounted="true"] .mobile-compact-quantity button:first-child {
    border-right: 1px solid rgba(7, 111, 154, 0.16);
  }

  body[data-v4-layout-mounted="true"] .mobile-sheet-quantity button:last-child,
  body[data-v4-layout-mounted="true"] .mobile-compact-quantity button:last-child {
    border-left: 1px solid rgba(7, 111, 154, 0.16);
  }

  body[data-v4-layout-mounted="true"] .v4-field-popover,
  body[data-v4-layout-mounted="true"] .product-menu-panel.v4-field-popover {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto !important;
    right: auto !important;
    max-height: min(48svh, 380px);
    margin-top: 8px;
  }

  body[data-v4-layout-mounted="true"] .v4-field-popover.v4-open-up,
  body[data-v4-layout-mounted="true"] .product-menu-panel.v4-field-popover.v4-open-up {
    top: auto;
    bottom: auto;
  }

  body[data-v4-layout-mounted="true"] .product-menu-panel.v4-field-popover {
    width: 100%;
    max-width: 100%;
  }

  body[data-v4-layout-mounted="true"] .material-popover.v4-field-popover,
  body[data-v4-layout-mounted="true"] .sku-popover.v4-field-popover,
  body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover {
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover.has-hardware-preview {
    grid-template-columns: 1fr;
    max-height: min(46svh, 380px);
    overflow: auto;
  }

  body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .hardware-choice-grid {
    max-height: none;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    overflow: visible;
  }

  body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .image-choice {
    min-height: 76px;
    grid-template-columns: 36px minmax(0, 1fr);
  }

  body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .choice-thumb {
    width: 36px;
    height: 36px;
  }

  body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .hardware-image-choice {
    min-height: 0;
    grid-template-columns: 1fr;
    padding: 3px;
  }

  body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .hardware-image-choice .choice-thumb {
    width: 100%;
    height: 100%;
  }

  body[data-v4-layout-mounted="true"] .toast {
    left: 10px;
    right: 10px;
    top: calc(var(--topbar, 60px) + 8px);
    width: auto;
    max-width: none;
  }
}

@media (max-width: 520px) {
  body[data-v4-layout-mounted="true"] .material-popover.v4-field-popover,
  body[data-v4-layout-mounted="true"] .sku-popover.v4-field-popover,
  body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover {
    grid-template-columns: 1fr;
  }

  body[data-v4-layout-mounted="true"] .material-popover.v4-field-popover.has-choice-groups .material-choice-group__items {
    grid-template-columns: 1fr;
  }

  body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover {
    max-height: min(42svh, 330px);
  }

  body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover.has-hardware-preview {
    max-height: min(42svh, 330px);
  }

  body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .hardware-choice-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  body[data-v4-layout-mounted="true"] .material-popover.v4-field-popover {
    max-height: min(34svh, 260px);
  }
}

/* 2026-06-04 V4 header and selector correction pass. */
body[data-v4-layout-mounted="true"] .canvas-head h2 {
  display: none;
}

body[data-v4-layout-mounted="true"] .canvas-head .label {
  margin: 0;
  color: var(--ocean-deep);
  font-size: clamp(18px, 1.7vw, 24px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.01em;
}

body[data-v4-layout-mounted="true"] .canvas-header {
  align-items: center;
  min-height: 66px;
}

body[data-v4-layout-mounted="true"] .canvas-tabs {
  min-width: 178px;
  padding: 5px;
  border: 1px solid rgba(7, 111, 154, 0.28);
  background: rgba(255, 255, 255, 0.92);
}

body[data-v4-layout-mounted="true"] .canvas-side-switch {
  border: 1px solid rgba(7, 111, 154, 0.28);
  background: rgba(255, 255, 255, 0.92);
}

body[data-v4-layout-mounted="true"] .canvas-tabs button,
body[data-v4-layout-mounted="true"] .canvas-side-switch button {
  color: #657786;
  background: transparent;
}

body[data-v4-layout-mounted="true"] .canvas-tabs button.is-active,
body[data-v4-layout-mounted="true"] .canvas-side-switch button.is-active {
  color: var(--ink);
  background: var(--sun);
}

body[data-v4-layout-mounted="true"] .toast {
  left: 50%;
  right: auto;
  top: calc(var(--topbar, 64px) + 14px);
  transform: translateX(-50%);
}

@media (min-width: 981px) {
  body[data-v4-layout-mounted="true"] .toast {
    top: calc(var(--topbar, 64px) + 88px);
  }
}

body[data-v4-layout-mounted="true"] .left-panel .panel-footer {
  display: none;
}

body[data-v4-layout-mounted="true"] .v4-field-group .v4-field-stack {
  padding: 0;
  overflow: visible;
}

body[data-v4-layout-mounted="true"] .v4-field-group .config-field {
  width: 100%;
}

body[data-v4-layout-mounted="true"] .v4-field-group .field-button {
  width: 100%;
  min-height: 58px;
}

body[data-v4-layout-mounted="true"] .v4-field-group {
  width: 100%;
}

body[data-v4-layout-mounted="true"] [data-hardware-section].v4-field-group {
  padding: 0;
}

body[data-v4-layout-mounted="true"] .v4-field-popover,
body[data-v4-layout-mounted="true"] .product-menu-panel.v4-field-popover {
  position: absolute;
}

body[data-v4-layout-mounted="true"] .material-popover.v4-field-popover,
body[data-v4-layout-mounted="true"] .sku-popover.v4-field-popover,
body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover {
  overflow: auto;
  overflow-x: hidden;
}

body[data-v4-layout-mounted="true"] .material-popover.v4-field-popover .choice-card,
body[data-v4-layout-mounted="true"] .sku-popover.v4-field-popover .choice-card,
body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .choice-card {
  position: static;
}

body[data-v4-layout-mounted="true"] .material-popover.v4-field-popover .detail-preview,
body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .detail-preview {
  left: auto;
  right: 8px;
  top: 8px;
  bottom: auto;
  width: min(218px, calc(100% - 16px));
  min-height: 178px;
  max-height: calc(100% - 16px);
  transform: none;
  padding: 10px;
  border: 1px solid rgba(7, 111, 154, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 34px rgba(7, 111, 154, 0.18);
  overflow: auto;
}

body[data-v4-layout-mounted="true"] .material-popover.v4-field-popover .choice-card:nth-child(n) .detail-preview,
body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover .choice-card:nth-child(n) .detail-preview {
  left: auto;
  right: 8px;
  top: 8px;
  transform: none;
}

body[data-v4-layout-mounted="true"] .detail-preview::before {
  border: 1px solid rgba(18, 158, 208, 0.22);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 52%, rgba(18, 158, 208, 0.16) 0 34px, transparent 35px),
    linear-gradient(135deg, rgba(18, 158, 208, 0.08), rgba(102, 214, 194, 0.12));
}

body[data-v4-layout-mounted="true"] .image-detail::before {
  display: none;
}

body[data-v4-layout-mounted="true"] .image-detail img {
  height: 118px;
  border: 1px solid rgba(18, 158, 208, 0.22);
  border-radius: var(--radius);
}

body[data-v4-layout-mounted="true"] .stage::after {
  display: none;
}

body[data-v4-layout-mounted="true"] .canvas.is-canvas-focused .artboard {
  outline: none;
}

body[data-v4-layout-mounted="true"] .cutline-path {
  stroke: var(--ocean);
  stroke-dasharray: 6 6;
}

body[data-v4-layout-mounted="true"] .safe-margin-path {
  stroke: rgba(18, 158, 208, 0.55);
}

@media (max-width: 980px) {
  body[data-v4-layout-mounted="true"] .canvas-head > div:first-child {
    display: block;
    min-width: 0;
  }

  body[data-v4-layout-mounted="true"] .canvas-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body[data-v4-layout-mounted="true"] .v4-field-popover,
  body[data-v4-layout-mounted="true"] .product-menu-panel.v4-field-popover {
    position: absolute;
    top: calc(100% + 8px);
    bottom: auto;
    left: 0 !important;
    right: auto !important;
    margin-top: 0;
    z-index: 260;
  }

  body[data-v4-layout-mounted="true"] .v4-field-popover.v4-open-up,
  body[data-v4-layout-mounted="true"] .product-menu-panel.v4-field-popover.v4-open-up {
    top: auto;
    bottom: calc(100% + 8px);
  }

  body[data-v4-layout-mounted="true"] .material-popover.v4-field-popover,
  body[data-v4-layout-mounted="true"] .sku-popover.v4-field-popover,
  body[data-v4-layout-mounted="true"] .catalog-popover.v4-field-popover {
    width: min(100%, calc(100vw - 20px));
    max-width: 100%;
  }

  body[data-v4-layout-mounted="true"] .canvas-head .label {
    font-size: 18px;
  }

  body[data-v4-layout-mounted="true"] .canvas-tabs button {
    color: #657786;
  }

  body[data-v4-layout-mounted="true"] .toast {
    left: 50%;
    right: auto;
    width: min(360px, calc(100vw - 20px));
    transform: translateX(-50%);
  }
}

/* 2026-06-04 V4 size/base/mobile correction pass. */
body[data-v4-layout-mounted="true"] .base-shape-popover.v4-field-popover {
  left: 0 !important;
  right: auto !important;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  transform: none;
}

body[data-v4-layout-mounted="true"] .base-shape-popover.v4-field-popover .shape-choice {
  min-height: 64px;
  grid-template-columns: 1fr;
  align-content: center;
  justify-items: center;
  gap: 5px;
  padding: 8px 6px;
  text-align: center;
}

body[data-v4-layout-mounted="true"] .base-shape-popover.v4-field-popover .shape-icon {
  width: 38px;
  height: 26px;
  display: grid;
  place-items: center;
}

body[data-v4-layout-mounted="true"] .base-shape-popover.v4-field-popover .shape-icon svg {
  width: 38px;
  height: 26px;
  fill: rgba(18, 158, 208, 0.1);
  stroke: var(--ocean);
  stroke-width: 2.5;
}

body[data-v4-layout-mounted="true"] .base-shape-popover.v4-field-popover .shape-choice strong {
  font-size: 12px;
  line-height: 1.05;
  white-space: nowrap;
}

body[data-v4-layout-mounted="true"] .base-shape-popover.v4-field-popover .shape-choice > span:not(.shape-icon) {
  display: none;
}

body[data-v4-layout-mounted="true"] .right-panel .v4-price-section {
  align-content: start;
  gap: 7px;
  grid-template-rows: auto auto minmax(0, 1fr);
  padding-top: 8px;
  padding-bottom: 8px;
}

body[data-v4-layout-mounted="true"] .right-panel .v4-price-section > .label {
  margin-bottom: 0;
}

body[data-v4-layout-mounted="true"] .right-panel .price-box {
  margin-top: 0;
}

body[data-v4-layout-mounted="true"] .right-panel .tier-grid {
  align-content: start;
  height: 100%;
  grid-auto-rows: minmax(42px, 1fr);
}

@media (max-width: 980px) {
  body[data-v4-layout-mounted="true"] .canvas {
    height: auto;
    min-height: 0;
    max-height: none;
    grid-template-rows: auto auto auto;
  }

  body[data-v4-layout-mounted="true"] .canvas-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 54px;
    padding: 8px 10px;
    align-items: center;
  }

  body[data-v4-layout-mounted="true"] .canvas-head > div:first-child {
    display: grid;
    min-width: 0;
    align-items: center;
  }

  body[data-v4-layout-mounted="true"] .canvas-head .label {
    display: none;
  }

  body[data-v4-layout-mounted="true"] .v4-mobile-product-menu.mobile-product-menu {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    z-index: 160;
    display: block;
    width: min(172px, 100%);
    min-width: 0;
    max-width: 100%;
  }

  body[data-v4-layout-mounted="true"] .v4-mobile-product-menu .mobile-product-trigger {
    width: 100%;
    min-height: 36px;
    padding: 0 28px 0 10px;
    border: 1px solid rgba(7, 111, 154, 0.42);
    border-radius: var(--radius);
    background: var(--sun);
    box-shadow: 0 2px 0 var(--ink);
    color: var(--ink);
    font-size: 12px;
    font-weight: 950;
    line-height: 1.05;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body[data-v4-layout-mounted="true"] .v4-mobile-product-menu .mobile-product-panel {
    top: calc(100% + 6px);
    bottom: auto;
    left: 0 !important;
    right: auto !important;
    width: min(228px, calc(100vw - 22px));
    max-height: min(260px, calc(100svh - 96px));
    overflow: auto;
    transform: none;
  }

  body[data-v4-layout-mounted="true"] .mobile-print-switch {
    width: min(138px, 38vw);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid rgba(7, 111, 154, 0.34);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    overflow: hidden;
  }

  body[data-v4-layout-mounted="true"] .mobile-print-switch button {
    min-height: 34px;
    padding: 0 5px;
    border: 0;
    border-right: 1px solid rgba(7, 111, 154, 0.24);
    background: transparent;
    color: #657786;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.05;
  }

  body[data-v4-layout-mounted="true"] .mobile-print-switch button:last-child {
    border-right: 0;
  }

  body[data-v4-layout-mounted="true"] .mobile-print-switch button.is-active {
    background: var(--ink);
    color: #fff;
  }

  body[data-v4-layout-mounted="true"] .stage {
    min-height: 292px;
    padding: 48px 10px 10px;
  }

  body[data-v4-layout-mounted="true"] .canvas-side-switch {
    top: 9px;
    left: 10px;
    width: calc(100% - 20px);
    box-shadow: none;
  }

  body[data-v4-layout-mounted="true"] .canvas-side-switch button {
    min-height: 34px;
  }

  body[data-v4-layout-mounted="true"] .artboard {
    width: min(70vw, 270px);
    margin-top: 0;
  }

  body[data-v4-layout-mounted="true"] .canvas-foot {
    gap: 8px;
    padding: 8px 10px 10px;
  }

  body[data-v4-layout-mounted="true"] .mobile-canvas-tools[data-mobile-tool-dock] {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
  }

  body[data-v4-layout-mounted="true"] .mobile-canvas-tools .tool[data-tool="rotate"],
  body[data-v4-layout-mounted="true"] .mobile-canvas-tools .tool[data-tool="mirror"],
  body[data-v4-layout-mounted="true"] .mobile-canvas-tools .tool[data-action="toggle-strip-background"] {
    display: none !important;
  }

  body[data-v4-layout-mounted="true"] .tool-strip .tool-button {
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 40px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px !important;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.08;
  }

  body[data-v4-layout-mounted="true"] .tool-strip .tool-button[data-action="check-design"] {
    width: auto !important;
    min-width: 0 !important;
    background: var(--sun);
    color: var(--ink);
  }

  body[data-v4-layout-mounted="true"] .tool-strip .tool-icon {
    display: none !important;
  }

  body[data-v4-layout-mounted="true"] .tool-strip .tool-tooltip {
    position: static;
    width: auto;
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.08;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    opacity: 1;
    pointer-events: none;
    transform: none;
    transition: none;
  }

  body[data-v4-layout-mounted="true"] .tool-label-full {
    display: none;
  }

  body[data-v4-layout-mounted="true"] .tool-label-mobile {
    display: inline;
  }

  body[data-v4-layout-mounted="true"] .tool-strip .tool-tooltip::after {
    display: none;
  }

  body[data-v4-layout-mounted="true"] .tool-strip .tool-button:hover .tool-tooltip,
  body[data-v4-layout-mounted="true"] .tool-strip .tool-button:focus-visible .tool-tooltip {
    opacity: 1;
    transform: none;
  }

  body[data-v4-layout-mounted="true"] .tool-strip .upload-button {
    min-height: 38px;
    padding: 8px 12px;
  }

  body[data-v4-layout-mounted="true"] .canvas-edit-actions button {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 12px;
  }
}

@media (max-width: 430px) {
  body[data-v4-layout-mounted="true"] .canvas {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  body[data-v4-layout-mounted="true"] .canvas-header {
    min-height: 52px;
  }

  body[data-v4-layout-mounted="true"] .stage {
    min-height: 284px;
    padding-top: 46px;
  }

  body[data-v4-layout-mounted="true"] .artboard {
    width: min(66vw, 258px);
  }

  body[data-v4-layout-mounted="true"] .tool-strip .tool-button {
    height: auto !important;
    min-height: 38px !important;
    padding: 0 6px !important;
  }

  body[data-v4-layout-mounted="true"] .tool-strip .tool-tooltip {
    font-size: 10.5px;
  }

  body[data-v4-layout-mounted="true"] .tool-strip .upload-button {
    min-height: 38px;
  }

  body[data-v4-layout-mounted="true"] .canvas-edit-actions button {
    min-height: 38px;
    padding: 8px 8px;
    font-size: 11.5px;
  }
}

body[data-v4-layout-mounted="true"] .stage {
  position: relative;
}

body[data-v4-layout-mounted="true"] .node-edit-hints {
  position: absolute;
  top: clamp(18px, 4vh, 38px);
  left: clamp(18px, 3vw, 36px);
  z-index: 8;
  display: grid;
  gap: 7px;
  width: min(320px, 34vw);
  padding: 14px 16px 13px;
  border: 1px solid #d6a91b;
  border-radius: 8px 8px 10px 8px;
  background: #ffe26a;
  box-shadow: 0 16px 24px rgba(20, 48, 68, 0.18), inset 0 -2px 0 rgba(226, 185, 0, 0.36);
  color: var(--ink);
  transform: rotate(-1.2deg);
  pointer-events: none;
}

body[data-v4-layout-mounted="true"] .node-edit-hints::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 64px;
  height: 16px;
  border: 1px solid rgba(20, 48, 68, 0.1);
  background: rgba(255, 255, 255, 0.56);
  box-shadow: 0 4px 10px rgba(20, 48, 68, 0.08);
  transform: translateX(-50%) rotate(1.5deg);
}

body[data-v4-layout-mounted="true"] .node-edit-hints strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.15;
}

body[data-v4-layout-mounted="true"] .node-edit-hints ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 17px;
}

body[data-v4-layout-mounted="true"] .node-edit-hints li {
  color: #284454;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.3;
}

body[data-v4-layout-mounted="true"] .node-edit-hints kbd {
  display: inline-block;
  min-width: 34px;
  padding: 1px 5px 2px;
  border: 1px solid rgba(20, 48, 68, 0.28);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 11px;
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
  box-shadow: inset 0 -1px 0 rgba(20, 48, 68, 0.18);
}

body[data-v4-layout-mounted="true"] .canvas.is-node-editing,
body[data-v4-layout-mounted="true"] .canvas.is-node-editing .stage,
body[data-v4-layout-mounted="true"] .canvas.is-node-editing .artboard,
body[data-v4-layout-mounted="true"] .canvas.is-node-editing .design-surface,
body[data-v4-layout-mounted="true"] .canvas.is-node-editing [data-design-surface],
body[data-v4-layout-mounted="true"] .canvas.is-node-editing .sample-cat,
body[data-v4-layout-mounted="true"] .canvas.is-node-editing .uploaded-art {
  cursor: default;
}

body[data-v4-layout-mounted="true"] .canvas.is-node-editing .cut-node {
  width: 33px;
  height: 33px;
  cursor: grab;
}

body[data-v4-layout-mounted="true"] .canvas.is-node-editing .cut-node::after {
  width: 9px;
  height: 9px;
  border: 2px solid rgba(20, 48, 68, 0.5);
  background: var(--sun);
  box-shadow: 0 0 0 3px rgba(255, 216, 61, 0.22);
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

body[data-v4-layout-mounted="true"] .canvas.is-node-editing .cut-node:hover::after,
body[data-v4-layout-mounted="true"] .canvas.is-node-editing .cut-node:focus-visible::after {
  border-color: #fff;
  background: var(--ocean);
  box-shadow: 0 0 0 5px rgba(18, 158, 208, 0.24), 0 0 0 1px var(--ocean);
}

body[data-v4-layout-mounted="true"] .canvas.is-node-editing .cut-node.is-selected::after {
  border-color: #fff;
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(255, 117, 103, 0.22), 0 0 0 1px var(--coral);
}

body[data-v4-layout-mounted="true"] .canvas.is-node-editing .cut-node:active {
  cursor: grabbing;
}

@media (max-width: 980px) {
  html,
  body.theme-b-pro,
  body[data-v4-layout-mounted="true"] .editor,
  body[data-v4-layout-mounted="true"] .workspace,
  body[data-v4-layout-mounted="true"] .canvas,
  body[data-v4-layout-mounted="true"] .canvas-panel,
  body[data-v4-layout-mounted="true"] .stage,
  body[data-v4-layout-mounted="true"] .tool-strip {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  body[data-v4-layout-mounted="true"] .workspace {
    justify-items: stretch;
  }

  body[data-v4-layout-mounted="true"] .canvas,
  body[data-v4-layout-mounted="true"] .canvas-panel {
    justify-self: stretch;
  }

  body[data-v4-layout-mounted="true"] .node-edit-hints {
    display: none;
  }

  body[data-v4-layout-mounted="true"] .canvas-panel:has(.settings-popover.cutline-panel.is-open) {
    z-index: 650;
  }

  body[data-v4-layout-mounted="true"] .settings-popover.cutline-panel,
  body[data-v4-layout-mounted="true"] .settings-popover.cutline-panel.v4-field-popover,
  body[data-v4-layout-mounted="true"] .settings-popover.cutline-panel.is-v4-mobile-portal {
    position: fixed !important;
    left: var(--cutline-panel-left, 10px) !important;
    right: auto !important;
    top: auto !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 82px) !important;
    z-index: 700 !important;
    width: var(--cutline-panel-width, calc(100vw - 20px)) !important;
    max-width: none !important;
    max-height: min(46svh, 360px) !important;
    margin: 0 !important;
    overflow: auto;
    transform: none !important;
  }
}
