:root {
  --bg: #efefef;
  --panel: #ffffff;
  --ink: #14181f;
  --muted: #64748b;
  --line: #e5e7eb;
  --accent: #0066cc;
  --accent-dark: #004c99;
  --pill-dark: #181a1f;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; }

/* Main Atelier 2-Column Split Layout (448px uncluttered configurator sidebar) */
.konfi-shell {
  display: grid; grid-template-columns: 1fr 448px; height: 100vh; width: 100vw; overflow: hidden;
}

/* LEFT: 3D STAGE */
.stage-pane {
  position: relative; background: var(--bg); display: flex; flex-direction: column; overflow: hidden;
}
.stage-topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 36;
  padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  pointer-events: none;
}
.stage-topbar > * { pointer-events: auto; }
.stage-logo {
  display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink);
  background: rgba(255,255,255,0.92); backdrop-filter: blur(8px);
  padding: 7px 13px; border-radius: 10px; border: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 4px 14px rgba(15,23,42,0.06); font-size: 13.5px;
}
.stage-logo-badge {
  display: inline-grid; place-items: center; width: 28px; height: 22px;
  background: var(--accent); color: #fff; border-radius: 5px; font-size: 11px; font-weight: 900;
}
.stage-breadcrumb {
  font-size: 12px; color: var(--muted); font-weight: 600;
  background: rgba(255,255,255,0.84); padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line);
}
.stage-mode-pills {
  display: flex; gap: 4px; background: rgba(255,255,255,0.92); padding: 4px;
  border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(15,23,42,0.06);
}
.mode-pill {
  background: transparent; border: none; color: #475569; padding: 6px 11px;
  border-radius: 7px; font-size: 12px; font-weight: 700; cursor: pointer; transition: all .15s;
}
.mode-pill:hover { color: var(--ink); background: #f1f5f9; }
.mode-pill.active { background: var(--pill-dark); color: #fff; }

/* Left Floating 3D Toolbox (Exact Atelier Frameless Minimal Icons — Zero Stage Obstruction!) */
.toolbox {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%); z-index: 20;
  display: flex; flex-direction: column; gap: 4px;
  background: rgba(255,255,255,0.88); backdrop-filter: blur(8px);
  padding: 5px; border-radius: 12px; border: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 6px 20px rgba(15,23,42,0.06);
}
.toolbox.atelier-minimal {
  left: 12px;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 2px;
  gap: 3px;
}
.tb-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: transparent; border: none; border-radius: 8px; color: #1e293b; cursor: pointer;
  transition: all .14s;
}
.tb-btn:hover { background: rgba(255,255,255,0.94); color: var(--accent); box-shadow: 0 2px 8px rgba(15,23,42,0.08); }
.tb-btn.active { background: var(--accent); color: #fff; }
.tb-btn:disabled { opacity: 0.28; cursor: not-allowed; }
.tb-sep { height: 1px; background: rgba(15,23,42,0.12); margin: 2px 6px; }

/* 3D Viewer Canvas Container */
.viewer-3d {
  width: 100%; height: 100%; cursor: grab;
}
.viewer-3d:active { cursor: grabbing; }

/* 9:16 Reel Guide Overlay */
.reel-guide {
  position: absolute; inset: 0; z-index: 15; pointer-events: none;
  display: flex; justify-content: center; align-items: center;
}
.rg-box {
  height: 82%; aspect-ratio: 9 / 16;
  border: 2px dashed #10b981; border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(10,14,20,0.46);
  display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 12px;
}
.rg-top, .rg-bot {
  background: rgba(10,14,20,0.82); color: #34d399; font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.08em; padding: 4px 10px; border-radius: 6px;
}
.rg-bot { color: #e2e8f0; }

/* 2D Sublimation Pattern & DXF CAD Workbench (Zero 3D stage bleed-through + 1-Click Full-Screen Mode!) */
.pattern-view {
  position: absolute; inset: 0; padding-top: 56px; z-index: 32; background: #0f172a; color: #f8fafc;
  display: flex; flex-direction: column; overflow: hidden;
}
.pattern-view.is-fullscreen {
  position: fixed; inset: 0; padding-top: 0; z-index: 160;
}
.pattern-view[hidden] { display: none !important; }
.pv-header {
  padding: 8px 14px; background: #1e293b; border-bottom: 1px solid #334155;
  display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; flex: none;
}
.pv-title-col { min-width: 180px; flex: 1 1 210px; }
.pv-header strong { display: block; font-size: 13px; line-height: 1.2; color: #f8fafc; }
.pv-header span { display: block; font-size: 10.5px; color: #94a3b8; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pv-actions { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.pv-btn {
  background: #334155; color: #f8fafc; border: 1px solid #475569; padding: 5px 9px;
  border-radius: 7px; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px; transition: all .14s;
}
.pv-btn:hover { background: #475569; border-color: #94a3b8; }
.pv-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.pv-btn.accent-full {
  background: #10b981; border-color: #059669; color: #ffffff; font-weight: 800;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.30);
}
.pv-btn.accent-full:hover { background: #059669; }
.pv-btn.accent-full.active { background: #f59e0b; border-color: #d97706; color: #111827; }
.pv-btn.back-3d { background: #0f172a; border-color: #64748b; }
.pv-zoom-group {
  display: inline-flex; align-items: center; background: #0f172a; border: 1px solid #475569;
  border-radius: 7px; overflow: hidden;
}
.pv-zbtn {
  background: transparent; color: #e2e8f0; border: none; border-right: 1px solid #334155;
  padding: 5px 8px; font-size: 11px; font-weight: 800; cursor: pointer; line-height: 1;
}
.pv-zbtn:last-child { border-right: none; }
.pv-zbtn:hover { background: #334155; color: #fff; }
.pv-body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; padding: 8px 10px; gap: 6px; }
.pv-canvas-host {
  flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
  background: #ffffff; border-radius: 10px; padding: 6px; overflow: auto; position: relative;
}
.pv-canvas-host.is-zoomed { align-items: flex-start; justify-content: flex-start; cursor: grab; }
.pv-canvas-host.is-zoomed:active { cursor: grabbing; }
.pv-canvas-host svg {
  max-width: 100%; max-height: 100%; width: auto; height: auto; display: block;
  transition: width .12s ease;
}
.pv-dxf-bar {
  background: #1e293b; border: 1px solid #334155; border-radius: 7px; padding: 6px 12px;
  font-size: 11px; color: #cbd5e1; flex: none;
}

/* Bottom Stage Camera + Kinetic 3D GPU Motion Bar (Single Low-Profile Horizontal Row — Zero Garment Obstruction!) */
.stage-bottombar {
  position: absolute; bottom: 13px; left: 50%; transform: translateX(-50%); z-index: 20;
  display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 8px; width: max-content; max-width: 96%;
}
.cam-pills, .motion-pills {
  display: flex; gap: 3px; background: rgba(255,255,255,0.94); padding: 3.5px;
  border-radius: 99px; border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(15,23,42,0.08);
}
.cam-pill, .mot-pill {
  background: transparent; border: none; color: #475569; padding: 5.5px 11.5px;
  border-radius: 99px; font-size: 11.5px; font-weight: 700; cursor: pointer; transition: all .14s;
}
.cam-pill:hover, .mot-pill:hover { color: var(--ink); background: #f1f5f9; }
.cam-pill.active { background: var(--pill-dark); color: #fff; }
.mot-pill.active { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(0,102,204,0.28); }
.stage-tip {
  font-size: 11px; color: #64748b; background: rgba(255,255,255,0.85);
  padding: 3px 10px; border-radius: 99px; border: 1px solid rgba(15,23,42,0.06);
}

/* RIGHT: EXACT Atelier CONFIGURATOR SIDEBAR */
.config-pane {
  position: relative;
  background: var(--panel); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; height: 100vh; overflow: hidden;
  box-shadow: -8px 0 30px rgba(15,23,42,0.05);
}
.cfg-header {
  padding: 13px 18px 6px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px;
}
.cfg-title-block h1 { margin: 0; font-size: 17.5px; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }
.cfg-sub-links { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.link-btn {
  background: none; border: none; padding: 0; color: var(--muted); text-decoration: underline;
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.link-btn:hover { color: var(--accent); }
.price-pill {
  background: #eff6ff; color: var(--accent); border: 1px solid #bfdbfe;
  font-weight: 800; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; cursor: pointer;
  transition: all .14s;
}
.price-pill:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.cfg-header-icons { display: flex; align-items: center; gap: 3px; }
.hdr-ico-btn {
  position: relative; width: 33px; height: 33px; display: grid; place-items: center;
  background: transparent; border: 1px solid transparent; border-radius: 8px; color: #1e293b; cursor: pointer;
}
.hdr-ico-btn:hover { background: #f1f5f9; border-color: var(--line); }
.bag-badge {
  position: absolute; top: 1px; right: 1px; background: var(--accent); color: #fff;
  font-size: 9.5px; font-weight: 800; padding: 1px 5px; border-radius: 99px; line-height: 1.2;
}

/* Sleek Atelier De-Congested Quick Spec Pills (Fabric, Pocket Toggle, Cut/Collar) */
.cfg-quick-pills {
  padding: 0 18px 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px;
  border-bottom: 1px solid var(--line);
}
.qspec-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: #f8fafc; border: 1px solid #cbd5e1; color: #334155;
  padding: 3.5px 9px; border-radius: 99px; font-size: 11px; font-weight: 700;
  cursor: pointer; transition: all .14s;
}
.qspec-pill:hover { border-color: var(--pill-dark); color: var(--ink); background: #f1f5f9; }
.qspec-pill.pocket-pill { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.qspec-pill.pocket-pill.clean-front { background: #ecfdf5; border-color: #6ee7b7; color: #047857; }

/* Exact Atelier 4 Oval Pill Tabs */
.st-tabs {
  padding: 9px 16px 6px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.st-tab {
  padding: 7.5px 6px; border-radius: 99px; border: 1px solid #cbd5e1;
  background: #fff; color: #334155; font-size: 12.5px; font-weight: 700; cursor: pointer;
  transition: all .15s;
}
.st-tab:hover { border-color: #181a1f; color: #181a1f; }
.st-tab.active { background: var(--pill-dark); color: #fff; border-color: var(--pill-dark); }

/* Scrollable Tab Body (Styled Thin Scrollbar) */
.cfg-body {
  flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 12px;
}
.cfg-body::-webkit-scrollbar, .sd-body::-webkit-scrollbar { width: 6px; }
.cfg-body::-webkit-scrollbar-thumb, .sd-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
.tab-panel[hidden] { display: none; }

/* TAB 1: EXACT Atelier 4x3 DESIGN GRID (12 PER PAGE, 3D SHADED THUMBNAILS) */
.design-carousel-wrap {
  display: grid; grid-template-columns: 28px 1fr 28px; align-items: center; gap: 5px; margin-top: 2px;
}
.page-arrow {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid #cbd5e1; background: #ffffff;
  color: #1e293b; font-size: 18px; line-height: 1; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 2px 6px rgba(15,23,42,0.05); transition: all .14s;
}
.page-arrow:hover { background: var(--pill-dark); color: #fff; border-color: var(--pill-dark); }
.design-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px 6px;
}
.design-tile {
  background: #fff; border: 1.5px solid transparent; border-radius: 10px;
  padding: 5px 3px 6px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; transition: all .14s;
}
.design-tile:hover { background: #f8fafc; border-color: #cbd5e1; }
.design-tile.active { background: #f8fafc; border-color: var(--pill-dark); box-shadow: 0 3px 10px rgba(15,23,42,0.06); }
.design-tile img { width: 78px; height: 84px; object-fit: contain; display: block; }
.design-tile span { font-size: 11px; font-weight: 600; color: #1e293b; text-align: center; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.design-dots-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 4px 6px;
}
.design-page-dots { display: flex; align-items: center; gap: 6px; }
.page-dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; border: none; padding: 0; cursor: pointer; transition: all .15s; }
.page-dot.active { background: var(--pill-dark); width: 20px; border-radius: 99px; }

.pal-suggest-pill {
  background: #fff; border: 1.5px solid var(--accent); color: var(--accent);
  padding: 5px 13px; border-radius: 99px; font-size: 11.5px; font-weight: 700; cursor: pointer;
  transition: all .14s;
}
.pal-suggest-pill:hover, .pal-suggest-pill.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.pal-drawer {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
  background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 9px; margin-bottom: 10px;
}
.pal-chip {
  display: flex; align-items: center; gap: 7px; padding: 6px 8px;
  background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; cursor: pointer; text-align: left;
  transition: all .14s;
}
.pal-chip:hover { border-color: var(--accent); background: #eff6ff; }
.pal-dots { display: inline-flex; gap: 2px; flex: none; }
.pal-dots i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.16); display: block; }
.pal-chip span { font-size: 10.5px; font-weight: 700; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.fabric-card {
  margin-top: 8px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-size: 12px; color: #334155;
}
.fabric-card strong { display: block; font-size: 12.5px; color: var(--ink); margin-bottom: 3px; }

/* TAB 2: COLORS */
.sec-lbl { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 10px 0 8px; }
.color-zones { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.color-zones.single-zone { grid-template-columns: 1fr; }
.zone-btn {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer;
  text-align: left; transition: all .14s;
}
.zone-btn.active { border-color: var(--pill-dark); background: #f8fafc; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.zone-dot { width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.18); flex: none; }
.zone-meta strong { display: block; font-size: 12.5px; color: var(--ink); }
.zone-meta small { font-size: 10.5px; color: var(--muted); font-family: monospace; }

.swatch-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 7px; }
.sw-btn {
  width: 100%; aspect-ratio: 1; border-radius: 50%; border: 1.5px solid rgba(15,23,42,0.16);
  cursor: pointer; padding: 0; transition: transform .12s;
}
.sw-btn:hover { transform: scale(1.14); }
.sw-btn.active { outline: 2.5px solid var(--pill-dark); outline-offset: 2px; }
.custom-hex-row {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700;
}
.custom-hex-row label { display: flex; align-items: center; gap: 8px; }
.pantone-tag { background: #f1f5f9; padding: 4px 9px; border-radius: 6px; font-family: monospace; font-size: 11px; color: #334155; }

/* TAB 3 & 4: TEXT & LOGOS */
.quick-add-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-bottom: 12px; }
.qa-btn {
  background: #f8fafc; border: 1px solid #cbd5e1; color: var(--ink); padding: 8px 10px;
  border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; transition: all .14s;
}
.qa-btn:hover { background: var(--pill-dark); color: #fff; border-color: var(--pill-dark); }

.layer-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.layer-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer;
}
.layer-item.active { border-color: var(--accent); background: #eff6ff; }
.layer-item-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.layer-item-left img { width: 26px; height: 26px; object-fit: contain; background: #1e293b; border-radius: 4px; padding: 2px; }
.layer-item-title { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.layer-item-sub { font-size: 10.5px; color: var(--muted); }
.layer-del-btn { background: none; border: none; color: #ef4444; font-size: 16px; cursor: pointer; padding: 2px 6px; }

.layer-editor {
  background: #f8fafc; border: 1px solid var(--line); border-radius: 11px; padding: 12px 13px;
  display: flex; flex-direction: column; gap: 10px;
}
.ed-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ed-field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; color: #475569; }
.ed-field input[type="text"], .ed-field select {
  padding: 7px 9px; border-radius: 7px; border: 1px solid #cbd5e1; background: #fff; font-size: 12.5px; font-weight: 600;
}
.ed-field input[type="range"] { width: 100%; accent-color: var(--accent); }
.ed-checks { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; font-weight: 600; }
.ed-checks label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.ed-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.ed-sm-btn {
  padding: 6px 10px; border-radius: 7px; border: 1px solid #cbd5e1; background: #fff;
  font-size: 11.5px; font-weight: 700; cursor: pointer; color: #1e293b;
}
.ed-sm-btn:hover { background: #eef2f7; }
.ed-sm-btn.danger { color: #dc2626; border-color: #fecaca; }

/* Atelier 2x2 4-Card Logo Entry Hub & Custom Crest Builder */
.ow-logo-hub {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-bottom: 12px;
}
.st-lhub-card {
  background: #ffffff; border: 1.5px solid #e2e8f0; border-radius: 12px;
  padding: 13px 10px; display: flex; flex-direction: column; align-items: center; gap: 5px;
  text-align: center; cursor: pointer; transition: all .15s; color: var(--ink);
}
.st-lhub-card:hover {
  border-color: var(--pill-dark); background: #f8fafc; transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}
.st-lhub-card.active {
  border-color: var(--accent); background: #eff6ff;
}
.st-lhub-ico {
  width: 42px; height: 42px; border-radius: 50%; background: #f1f5f9; color: #1e293b;
  display: grid; place-items: center; margin-bottom: 2px; transition: all .15s;
}
.st-lhub-card:hover .st-lhub-ico, .st-lhub-card.active .st-lhub-ico {
  background: var(--pill-dark); color: #ffffff;
}
.st-lhub-card strong { font-size: 12.5px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.st-lhub-card span { font-size: 10.5px; font-weight: 600; color: var(--muted); line-height: 1.2; }

.custom-badge-box {
  background: #f8fafc; border: 1.5px solid #cbd5e1; border-radius: 11px;
  padding: 11px 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 9px;
}

.logo-pool-drawer {
  background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 12px;
}
.pool-cats { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.pool-cat-btn {
  background: #fff; border: 1px solid var(--line); border-radius: 99px;
  padding: 4px 9px; font-size: 11px; font-weight: 700; color: #475569; cursor: pointer;
}
.pool-cat-btn.active { background: var(--pill-dark); color: #fff; border-color: var(--pill-dark); }
.pool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; max-height: 210px; overflow-y: auto; }
.pool-tile {
  background: #14181f; border: 1.5px solid #2a3240; border-radius: 8px; padding: 6px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
}
.pool-tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.pool-tile img { width: 48px; height: 48px; object-fit: contain; }
.pool-tile span { font-size: 9.5px; color: #cbd5e1; text-align: center; line-height: 1.15; }

/* Exact Atelier Bottom 5-Action Dock + 2-Pill Primary CTA Row */
.ow-dock {
  border-top: 1px solid var(--line); background: #fff;
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px 5px;
}
.dock-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: transparent; border: none; border-radius: 8px; padding: 5px 2px;
  color: #334155; font-size: 10.5px; font-weight: 700; cursor: pointer; transition: all .14s;
}
.dock-btn:hover { background: #f1f5f9; color: var(--ink); }
.dock-btn.accent { color: var(--accent); }
.dock-btn.accent:hover { background: #eff6ff; }

.ow-bottom-cta {
  background: #ffffff; border-top: 1px solid #f1f5f9;
  padding: 7px 12px 10px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center;
}
.ow-cta-pill {
  padding: 9px 12px; border-radius: 99px; font-size: 12px; font-weight: 800;
  cursor: pointer; transition: all .15s; white-space: nowrap; text-align: center;
}
.ow-cta-pill.outline {
  background: #ffffff; color: #181a1f; border: 1.5px solid #cbd5e1;
}
.ow-cta-pill.outline:hover {
  border-color: #181a1f; background: #f8fafc;
}
.ow-cta-pill.solid {
  background: var(--accent); color: #ffffff; border: 1.5px solid var(--accent);
}
.ow-cta-pill.solid:hover {
  background: var(--accent-dark); border-color: var(--accent-dark);
}

/* ENTERPRISE MODALS */
.ow-modal {
  border: none; border-radius: 16px; padding: 0; width: 640px; max-width: 94vw; max-height: min(90vh, 840px);
  box-shadow: 0 28px 70px rgba(15,23,42,0.34); overflow: hidden;
}
.ow-modal[open] {
  display: flex; flex-direction: column;
}
.ow-modal.wide { width: 920px; }
.ow-modal::backdrop { background: rgba(15,23,42,0.58); backdrop-filter: blur(3px); }
.modal-head {
  padding: 14px 22px; border-bottom: 1px solid var(--line); flex: none;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.modal-eyebrow { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; color: var(--accent); text-transform: uppercase; }
.modal-head h2 { margin: 2px 0 0; font-size: 18px; font-weight: 800; }
.modal-close { background: none; border: none; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; }
.modal-foot {
  padding: 12px 22px; border-top: 1px solid var(--line); background: #f8fafc; flex: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.foot-note { font-size: 12px; color: var(--muted); }

/* Change Product Modal */
.prod-modal-layout { display: grid; grid-template-columns: 220px 1fr; height: 64vh; }
.pm-sports { border-right: 1px solid var(--line); overflow-y: auto; padding: 10px; background: #f8fafc; }
.pm-sport-btn {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 9px 12px; border: none; border-radius: 8px; background: transparent;
  font-size: 13px; font-weight: 600; color: #334155; cursor: pointer; text-align: left;
}
.pm-sport-btn:hover { background: #e2e8f0; }
.pm-sport-btn.active { background: var(--pill-dark); color: #fff; }
.pm-grid { padding: 16px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 12px; align-content: start; }
.pm-card {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; background: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; text-align: center;
}
.pm-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.pm-card.active { border-color: var(--pill-dark); background: #f8fafc; }
.pm-card img { width: 104px; height: 104px; object-fit: contain; }
.pm-card strong { font-size: 13px; line-height: 1.25; }
.pm-card small { font-size: 11px; color: var(--muted); }

/* Roster Modal */
.roster-body { padding: 14px 22px 0; display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.roster-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.roster-summary { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--ink); background: #eff6ff; padding: 6px 12px; border-radius: 8px; }
.r-btn {
  padding: 8px 14px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff;
  font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.r-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.r-btn.wa { background: #16a34a; border-color: #15803d; color: #fff; }
.r-btn.wa:hover { background: #15803d; border-color: #166534; color: #fff; }
.r-btn.wa-prominent {
  padding: 9px 18px; border-radius: 99px; font-size: 13px; font-weight: 800; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.28); flex: none;
}
.bulk-paste-box { display: flex; flex-direction: column; gap: 8px; background: #f8fafc; padding: 10px; border-radius: 10px; border: 1px solid var(--line); }
.bulk-paste-box textarea { width: 100%; border: 1px solid #cbd5e1; border-radius: 7px; padding: 8px; font-family: monospace; font-size: 12px; }
.roster-table-wrap { overflow-y: auto; max-height: 36vh; border: 1px solid var(--line); border-radius: 10px; }
.roster-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.roster-table th, .roster-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.roster-table th { background: #f8fafc; font-size: 11px; text-transform: uppercase; color: var(--muted); }
.roster-table input, .roster-table select { padding: 5px 7px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 12px; width: 100%; }
.roster-tiers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding-bottom: 12px; }
.tier-box { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; text-align: center; font-size: 11.5px; }
.tier-box.active { border-color: var(--accent); background: #eff6ff; font-weight: 800; color: var(--accent); }

/* Saved Designs Modal */
.saved-body { padding: 16px 22px 22px; display: flex; flex-direction: column; gap: 14px; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.restore-code-row { display: flex; gap: 8px; }
.restore-code-row input { flex: 1; padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; }
.saved-list { display: flex; flex-direction: column; gap: 8px; }
.saved-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.saved-row-left { display: flex; align-items: center; gap: 12px; }
.saved-row-left img { width: 48px; height: 48px; object-fit: contain; background: #f8fafc; border-radius: 8px; }

/* Intake Lead Form Modal (Scrollable Body + Sticky Submit Footer!) */
.intake-form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.intake-scroll-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-bottom: 6px; }
.intake-desc { margin: 12px 22px 10px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.intake-grid { padding: 0 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px 14px; }
.intake-grid label, .intake-notes { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; font-weight: 700; color: #334155; }
.intake-grid input, .intake-grid select, .intake-notes input {
  padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 12.5px;
}
.intake-notes { padding: 9px 22px 0; }
.intake-consent {
  padding: 10px 22px 4px; display: flex; align-items: flex-start; gap: 8px; font-size: 11.5px; color: #334155; cursor: pointer; line-height: 1.4;
}
.intake-error { margin: 0 22px 6px; color: #dc2626; font-size: 12px; font-weight: 700; min-height: 14px; }

/* Export Hub Modal (Scrollable Cards + Always-Visible Sticky Share & WhatsApp Bar!) */
.export-hub-body, .export-scroll-body {
  padding: 12px 22px 14px; display: flex; flex-direction: column; gap: 11px;
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
}
.export-previews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.export-previews img { width: 100%; height: 116px; object-fit: contain; background: #f6f7f9; border: 1px solid var(--line); border-radius: 10px; }
.export-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.exp-card {
  background: #f8fafc; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 13px;
  text-align: left; cursor: pointer; transition: all .14s;
}
.exp-card:hover { border-color: var(--accent); background: #eff6ff; }
.exp-card strong { display: block; font-size: 12.5px; color: var(--ink); line-height: 1.25; }
.exp-card span { font-size: 11px; color: var(--muted); line-height: 1.3; }
.share-link-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.share-link-bar.sticky-export-foot {
  padding: 11px 22px; border-top: 1px solid var(--line); background: #f8fafc; flex: none;
  justify-content: space-between;
}
.share-url-wrap { display: flex; align-items: center; gap: 7px; flex: 1 1 320px; min-width: 0; }
.share-lbl { font-size: 11.5px; font-weight: 800; color: #334155; white-space: nowrap; }
.share-link-bar input {
  flex: 1; min-width: 140px; padding: 7.5px 10px; border: 1px solid #cbd5e1; border-radius: 8px;
  font-size: 11.5px; font-family: monospace; background: #ffffff; color: #0f172a;
}
.copy-btn { white-space: nowrap; flex: none; }

/* Toast Notification (Positioned cleanly at top-center of stage with pointer-events:none so bottom camera/motion pills never get covered) */
.toast {
  position: fixed; top: 64px; left: 32%; transform: translateX(-50%); z-index: 999; pointer-events: none;
  background: rgba(15, 23, 42, 0.92); color: #fff; padding: 8px 16px; border-radius: 99px;
  font-size: 12px; font-weight: 700; box-shadow: 0 10px 26px rgba(0,0,0,0.20);
}

/* v3.0 Atelier 3D + Atelier Enterprise Additions */
.st-tabs.five { grid-template-columns: repeat(5, 1fr); gap: 5px; padding: 12px 16px 8px; }
.st-tabs.five .st-tab { padding: 8px 4px; font-size: 12px; }

.measure-hud {
  position: absolute; top: 68px; left: 50%; transform: translateX(-50%); z-index: 25;
  background: rgba(16, 185, 129, 0.94); color: #fff; padding: 7px 14px; border-radius: 99px;
  display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 800;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}
.measure-hud button {
  background: rgba(255,255,255,0.22); color: #fff; border: none; border-radius: 99px;
  padding: 3px 9px; font-size: 11px; font-weight: 700; cursor: pointer;
}
.measure-hud button:hover { background: rgba(255,255,255,0.35); }

.pv-select {
  background: #0f172a; color: #f8fafc; border: 1px solid #475569; border-radius: 7px;
  padding: 5px 8px; font-size: 11px; font-weight: 700; cursor: pointer;
}
.pv-seam-bar {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center; flex: none;
  padding: 5px 14px; background: #0b1220; border-bottom: 1px solid #1e293b;
}
.seam-chip {
  background: rgba(16, 185, 129, 0.14); border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6ee7b7; font-size: 10.5px; font-weight: 700; padding: 2.5px 8px; border-radius: 99px;
  font-family: monospace;
}

.drape-section {
  background: #f8fafc; border: 1px solid var(--line); border-radius: 11px;
  padding: 11px 13px; margin-bottom: 10px;
}
.drape-section .sec-lbl { margin-top: 0; }
.drape-section input[type="color"] { width: 100%; height: 34px; border: 1px solid #cbd5e1; border-radius: 7px; padding: 2px; background: #fff; cursor: pointer; }

.roster-link-note {
  background: #fefce8; border: 1px solid #fde047; color: #854d0e;
  font-size: 11px; font-weight: 700; padding: 6px 9px; border-radius: 7px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.roster-link-note button {
  background: #fff; border: 1px solid #eab308; color: #854d0e; border-radius: 5px;
  padding: 2px 7px; font-size: 10.5px; font-weight: 800; cursor: pointer;
}

.export-actions-grid.three { grid-template-columns: repeat(2, 1fr); gap: 9px; }
.exp-card.highlight { border-color: #93c5fd; background: #eff6ff; }
.exp-card.highlight:hover { border-color: var(--accent); background: #dbeafe; }

/* === v4.0 NUCLEAR PHOTOREALISM, TOOLTIPS, MACRO FABRIC LAB & SIZE CHART STYLES === */
.stage-crumb-group { display: flex; align-items: center; gap: 7px; }
.clo-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, #0f172a, #1e3a8a); color: #e0f2fe;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 99px; border: 1px solid rgba(147, 197, 253, 0.35);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16); cursor: help;
}
.clo-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: #34d399;
  box-shadow: 0 0 6px #34d399;
}

/* Custom Instant Dark-Glass Floating Tooltips ([data-tip]) */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute; z-index: 9999; pointer-events: none;
  background: rgba(15, 23, 42, 0.94); color: #f8fafc;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 11px; font-weight: 600; line-height: 1.35;
  padding: 6px 10px; border-radius: 8px;
  width: max-content; max-width: 230px; white-space: normal; text-align: left;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  opacity: 0; visibility: hidden; transition: opacity .14s ease, transform .14s ease;
  bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px);
}
[data-tip]:hover::after {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
[data-tip-pos="right"]::after {
  bottom: auto; top: 50%; left: calc(100% + 10px);
  transform: translateY(-50%) translateX(-4px);
}
[data-tip-pos="right"]:hover::after {
  transform: translateY(-50%) translateX(0);
}
[data-tip-pos="bottom"]::after {
  bottom: auto; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(-4px);
}
[data-tip-pos="bottom"]:hover::after {
  transform: translateX(-50%) translateY(0);
}
/* Prevent edge clipping on leftmost & rightmost sidebar controls */
.cfg-header-icons [data-tip]:last-child::after,
.ow-dock [data-tip]:last-child::after,
.st-tabs [data-tip]:last-child::after,
.pal-suggest-pill[data-tip]::after {
  left: auto; right: 0; transform: translateY(4px);
}
.cfg-header-icons [data-tip]:last-child:hover::after,
.ow-dock [data-tip]:last-child:hover::after,
.st-tabs [data-tip]:last-child:hover::after,
.pal-suggest-pill[data-tip]:hover::after {
  transform: translateY(0);
}
.ow-dock [data-tip]:first-child::after,
.st-tabs [data-tip]:first-child::after,
.cfg-quick-pills [data-tip]:first-child::after {
  left: 0; transform: translateY(4px);
}
.ow-dock [data-tip]:first-child:hover::after,
.st-tabs [data-tip]:first-child:hover::after,
.cfg-quick-pills [data-tip]:first-child:hover::after {
  transform: translateY(0);
}

/* Live 8x Macro Fabric Swatch Lab Card */
.fabric-card-pro {
  display: flex; flex-direction: column; gap: 10px;
}
.fab-macro-row {
  display: flex; align-items: center; gap: 12px;
}
.fab-macro-swatch {
  width: 68px; height: 68px; border-radius: 10px; flex: none;
  border: 2px solid #cbd5e1; object-fit: cover;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.22), 0 4px 10px rgba(15,23,42,0.10);
}
.fab-meta-col { flex: 1; min-width: 0; }
.fab-meta-col strong { display: block; font-size: 13px; color: var(--ink); line-height: 1.25; }
.fab-meta-sub { font-size: 11px; color: #475569; margin-top: 2px; line-height: 1.3; }
.fab-pills { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.fab-pill {
  background: #e2e8f0; color: #1e293b; font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: 99px; letter-spacing: 0.02em;
}
.fab-pill.hi { background: #dbeafe; color: #1d4ed8; }
.fab-quick-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px;
  padding-top: 8px; border-top: 1px dashed #cbd5e1;
}
.fab-chip {
  background: #fff; border: 1.5px solid #cbd5e1; border-radius: 7px;
  padding: 5px 4px; font-size: 10px; font-weight: 700; color: #334155;
  cursor: pointer; text-align: center; transition: all .14s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fab-chip:hover { border-color: var(--accent); color: var(--accent); }
.fab-chip.active { background: var(--pill-dark); color: #fff; border-color: var(--pill-dark); }

/* Sample Team Kit / Clean Garment Quick Bar */
.sample-kit-bar {
  display: grid; grid-template-columns: 1.35fr 0.85fr; gap: 6px; margin-bottom: 8px;
}
.sk-btn {
  padding: 8px 10px; border-radius: 8px; border: 1px solid #cbd5e1;
  background: #f8fafc; color: #334155; font-size: 11.5px; font-weight: 700; cursor: pointer;
  transition: all .14s;
}
.sk-btn:hover { border-color: var(--pill-dark); color: var(--pill-dark); }
.sk-btn.primary { background: #eff6ff; border-color: #93c5fd; color: var(--accent); }
.sk-btn.primary:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Interactive Size Chart & Smart Fit Finder Modal */
.sizechart-body { padding: 14px 22px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.sc-controls-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.sc-fit-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.sc-tab {
  background: #f1f5f9; border: 1px solid #cbd5e1; color: #334155; padding: 6px 12px;
  border-radius: 99px; font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.sc-tab.active { background: var(--pill-dark); color: #fff; border-color: var(--pill-dark); }
.sc-region-tabs { display: flex; background: #f1f5f9; padding: 3px; border-radius: 99px; border: 1px solid #cbd5e1; gap: 2px; }
.sc-reg {
  background: transparent; border: none; padding: 4.5px 10px; border-radius: 99px;
  font-size: 11.5px; font-weight: 800; color: #475569; cursor: pointer; transition: all .14s;
}
.sc-reg:hover { color: var(--ink); }
.sc-reg.active { background: #0f766e; color: #fff; }
.sc-unit-toggle { display: flex; background: #f1f5f9; padding: 3px; border-radius: 99px; border: 1px solid #cbd5e1; }
.sc-unit {
  background: transparent; border: none; padding: 4.5px 11px; border-radius: 99px;
  font-size: 11.5px; font-weight: 700; color: #475569; cursor: pointer;
}
.sc-unit.active { background: var(--accent); color: #fff; }

.fit-finder-bar {
  display: grid; grid-template-columns: 1.2fr 0.85fr 0.85fr 1.15fr 0.9fr auto; gap: 10px; align-items: end;
  background: linear-gradient(135deg, #eff6ff, #f8fafc); border: 1.5px solid #bfdbfe;
  border-radius: 12px; padding: 12px 14px;
}
.ff-title strong { display: block; font-size: 13px; color: #1e3a8a; }
.ff-title span { font-size: 11px; color: #475569; }
.fit-finder-bar label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; color: #334155; }
.fit-finder-bar input, .fit-finder-bar select {
  padding: 7px 9px; border-radius: 7px; border: 1px solid #93c5fd; background: #fff; font-size: 12.5px; font-weight: 700;
}
.ff-result {
  background: #10b981; color: #fff; border-radius: 9px; padding: 6px 12px; text-align: center;
}
.ff-result small { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.9; }
.ff-result strong { font-size: 15px; font-weight: 900; }

.sc-main-grid { display: grid; grid-template-columns: 235px 1fr; gap: 16px; align-items: start; }
.sc-diagram-card {
  background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 12px;
}
.sc-legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: #334155; }
.sc-legend li { display: flex; align-items: center; gap: 6px; }
.sc-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sc-table-wrap { display: flex; flex-direction: column; gap: 8px; }
.sc-table tbody tr { cursor: pointer; transition: background .12s; }
.sc-table tbody tr:hover { background: #f1f5f9; }
.sc-table tbody tr.recommended { background: #ecfdf5 !important; font-weight: 800; color: #065f46; }
.sc-table tbody tr.recommended td:first-child::after {
  content: ' ★ FIT'; font-size: 10px; color: #059669; font-weight: 900;
}
.sc-footnote { font-size: 11.5px; color: var(--muted); }

/* === v6.0 Atelier INTERACTIVE ON-GARMENT ART GIZMO, PRINTABLE ZONE, DPI BADGE, LOUPE HUD & SLIDE-OVERS === */
.art-stage-overlay {
  position: absolute; inset: 0; z-index: 18; pointer-events: none; overflow: hidden;
}
.printable-zone-box {
  position: absolute; pointer-events: none;
  background: rgba(59, 130, 246, 0.28);
  border: 1.5px solid rgba(59, 130, 246, 0.88);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.28);
  transition: opacity .12s ease;
}
.pz-tag {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  background: rgba(37, 99, 235, 0.92); color: #fff;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 4px; white-space: nowrap;
}
.center-snap-guide {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.9);
}

.art-gizmo {
  position: absolute; pointer-events: auto; cursor: move;
  border: 1.8px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1.2px rgba(15, 23, 42, 0.72), 0 6px 20px rgba(15, 23, 42, 0.16);
  border-radius: 3px;
  user-select: none; touch-action: none;
}
.art-gizmo.dragging {
  border-color: #60a5fa;
  box-shadow: 0 0 0 1.5px #1d4ed8, 0 10px 26px rgba(29, 78, 216, 0.28);
}
.gz-handle {
  position: absolute; width: 25px; height: 25px; border-radius: 5px;
  background: #ffffff; color: #181a1f;
  border: 1.5px solid rgba(15, 23, 42, 0.24);
  box-shadow: 0 3px 9px rgba(15, 23, 42, 0.22);
  display: grid; place-items: center; padding: 0;
  font-size: 10.5px; font-weight: 900; cursor: pointer;
  transition: transform .12s, background .12s, color .12s;
}
.gz-handle:hover {
  background: var(--pill-dark); color: #ffffff; border-color: var(--pill-dark); transform: scale(1.12);
}
.gz-handle.danger:hover {
  background: #dc2626; color: #fff; border-color: #dc2626;
}
.gz-tl { top: -13px; left: -13px; }
.gz-tr { top: -13px; right: -13px; cursor: grab; }
.gz-bl { bottom: -13px; left: -13px; }
.gz-bc { bottom: -13px; left: 50%; transform: translateX(-50%); width: 28px; font-size: 10px; }
.gz-bc:hover { transform: translateX(-50%) scale(1.12); }
.gz-br { bottom: -13px; right: -13px; cursor: nwse-resize; }

/* Atelier Mint-Green / Amber Physical Size + DPI Badge (Bottom-Left Stage) */
.dpi-quality-badge {
  position: absolute; left: 18px; bottom: 20px; z-index: 22;
  background: #48c78e; color: #ffffff;
  padding: 9px 14px; border-radius: 10px; min-width: 146px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
  display: flex; flex-direction: column; gap: 1px; pointer-events: none;
}
.dpi-quality-badge.warn { background: #f59e0b; color: #fff; }
.dpi-quality-badge.low { background: #ef4444; color: #fff; }
.dpi-lbl { font-size: 10.5px; font-weight: 600; opacity: 0.94; }
.dpi-cm { font-size: 13.5px; font-weight: 800; line-height: 1.25; }
.dpi-val { font-size: 12px; font-weight: 700; opacity: 0.96; }

/* Transient 8x Optical Textile Weave Toast (hidden at rest; fades in cleanly above bottom-left without touching camera pills!) */
.fabric-loupe-hud {
  position: absolute; left: 18px; bottom: 68px; z-index: 21;
  display: flex; align-items: center; gap: 9px;
  background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(8px);
  padding: 6px 13px 6px 7px; border-radius: 99px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.14);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
  cursor: pointer;
}
.fabric-loupe-hud.visible {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateY(0);
}
.fabric-loupe-hud img {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  border: 2px solid #cbd5e1; box-shadow: inset 0 0 8px rgba(0,0,0,0.24);
}
.loupe-hud-meta { display: flex; flex-direction: column; line-height: 1.18; }
.loupe-hud-meta small { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); }
.loupe-hud-meta strong { font-size: 11.5px; font-weight: 800; color: var(--ink); max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loupe-hud-meta span { font-size: 10px; font-weight: 600; color: var(--muted); }

/* Right-Pane Docked "Product Features & Fabric" Sheet (Zero 3D Stage Obstruction & Zero Clipped Cards!) */
.side-drawer.features-drawer {
  top: 0; left: 0; right: 0; bottom: 0; z-index: 50;
}
.fo-body {
  flex: 1; min-height: 0; overflow-y: auto; padding: 14px 18px 24px;
  display: flex; flex-direction: column; gap: 15px;
}
.fo-sec-title {
  font-size: 11px; font-weight: 800; color: #475569; text-transform: uppercase;
  letter-spacing: 0.05em; margin-bottom: 7px;
}
.fo-cards-row {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
}
.fo-card {
  background: #fff; border: 1.5px solid var(--line); border-radius: 11px; padding: 9px 10px;
  display: flex; align-items: center; gap: 9px; cursor: pointer; text-align: left;
  transition: all .14s; min-width: 0;
}
.fo-card:hover { border-color: #94a3b8; background: #f8fafc; }
.fo-card.active { border-color: var(--pill-dark); background: #f1f5f9; box-shadow: 0 3px 10px rgba(15,23,42,0.07); }
.fo-circle {
  width: 44px; height: 44px; flex: none; border-radius: 50%; background: #f1f5f9; border: 1.5px solid #cbd5e1;
  display: grid; place-items: center; overflow: hidden; color: #1e293b;
}
.fo-card.active .fo-circle { border-color: var(--pill-dark); background: #fff; }
.fo-circle img { width: 100%; height: 100%; object-fit: cover; }
.fo-card-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fo-card strong { font-size: 12px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.fo-card small { font-size: 10.5px; color: var(--muted); line-height: 1.2; }
.fo-foot {
  padding: 11px 18px; border-top: 1px solid var(--line); background: #f8fafc;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.fo-foot-note { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.fo-continue-btn {
  background: var(--pill-dark); color: #fff; border: none; border-radius: 99px;
  padding: 9px 22px; font-size: 12.5px; font-weight: 800; cursor: pointer; transition: background .14s;
}
.fo-continue-btn:hover { background: var(--accent); }

/* Step Back / Next Navigation Strip */
.step-nav-strip {
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.step-nav-hint { font-size: 11px; font-weight: 700; color: var(--muted); }
.step-nav-btn {
  padding: 7px 13px; border-radius: 99px; border: 1px solid #cbd5e1;
  background: #fff; color: #1e293b; font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.step-nav-btn:hover { border-color: var(--pill-dark); }
.step-nav-btn.primary { background: var(--pill-dark); color: #fff; border-color: var(--pill-dark); }
.step-nav-btn.primary:hover { background: var(--accent); border-color: var(--accent); }

/* Right-Pane Slide-Over Drawers: "Edit logo" & "Price and delivery time" */
.side-drawer {
  position: absolute; top: 0; left: 0; right: 0; bottom: 108px; z-index: 40;
  background: #ffffff; display: flex; flex-direction: column;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}
.sd-head {
  padding: 15px 18px 12px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.sd-head h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.sd-close {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line);
  background: #f8fafc; color: #1e293b; font-size: 21px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.sd-close:hover { background: #e2e8f0; }
.sd-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 18px 22px; display: flex; flex-direction: column; gap: 14px; }

/* Atelier Edit Logo Slide-Over Internals */
.eld-top-card {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 12px; align-items: center;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.eld-checker {
  width: 92px; height: 92px; border-radius: 8px; border: 1px solid #cbd5e1;
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
    linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
  display: grid; place-items: center; padding: 6px; overflow: hidden;
}
.eld-checker img { max-width: 100%; max-height: 100%; object-fit: contain; }
.eld-meta { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: #475569; min-width: 0; }
.eld-meta strong { font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eld-trash-btn {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid #fecaca;
  background: #fef2f2; color: #dc2626; cursor: pointer; display: grid; place-items: center;
}
.eld-trash-btn:hover { background: #dc2626; color: #fff; }

.eld-place-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.eld-place-btn {
  padding: 7px 5px; border-radius: 8px; border: 1px solid #cbd5e1; background: #f8fafc;
  font-size: 10.5px; font-weight: 700; color: #334155; cursor: pointer; text-align: center;
}
.eld-place-btn:hover { border-color: var(--pill-dark); color: var(--pill-dark); }
.eld-place-btn.active { background: var(--pill-dark); color: #fff; border-color: var(--pill-dark); }

.eld-ctrl-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 0;
}
.eld-ctrl-lbl { font-size: 13px; font-weight: 600; color: var(--ink); }
.eld-pill-pair { display: flex; gap: 6px; }
.eld-step-btn {
  min-width: 58px; height: 34px; border-radius: 99px; border: 1px solid #cbd5e1;
  background: #fff; color: #181a1f; font-size: 16px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 12px;
}
.eld-step-btn:hover { border-color: #181a1f; background: #f1f5f9; }
.eld-select {
  width: 100%; padding: 9px 11px; border-radius: 8px; border: 1.5px solid #cbd5e1;
  background: #fff; font-size: 13px; font-weight: 600; color: var(--ink);
}

/* Atelier Price & Delivery Time Drawer */
.pd-prod-name { font-size: 14px; font-weight: 800; color: var(--ink); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.pd-form-row { display: grid; grid-template-columns: 105px 1fr; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.pd-qty-wrap { display: flex; align-items: center; gap: 8px; }
.pd-qty-wrap input {
  width: 92px; padding: 8px 10px; border-radius: 8px; border: 1.5px solid #cbd5e1;
  font-size: 14px; font-weight: 800; text-align: center;
}
.pd-form-row select {
  width: 100%; padding: 8px 10px; border-radius: 8px; border: 1.5px solid #cbd5e1;
  font-size: 13px; font-weight: 600; background: #fff;
}
.pd-calc-btn {
  width: 100%; padding: 10px 16px; border-radius: 99px; border: none;
  background: var(--pill-dark); color: #fff; font-size: 13px; font-weight: 800; cursor: pointer;
}
.pd-calc-btn:hover { background: var(--accent); }
.pd-results { display: flex; flex-direction: column; gap: 8px; }
.pd-summary-banner {
  background: #eff6ff; border: 1.5px solid #bfdbfe; border-radius: 10px; padding: 11px 14px;
  display: flex; justify-content: space-between; align-items: center;
}
.pd-summary-banner strong { font-size: 18px; font-weight: 900; color: var(--accent); }
.pd-ship-card {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer;
  background: #fff; transition: all .14s;
}
.pd-ship-card:hover { border-color: #94a3b8; }
.pd-ship-card.active { border-color: var(--pill-dark); background: #f8fafc; }
.pd-ship-left strong { display: block; font-size: 13px; color: var(--ink); }
.pd-ship-left span { font-size: 11.5px; color: #059669; font-weight: 700; }
.pd-ship-right { text-align: right; }
.pd-ship-right strong { display: block; font-size: 13.5px; color: var(--ink); }
.pd-ship-right small { font-size: 11px; color: var(--muted); font-weight: 700; }
.pd-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 8px; margin-top: auto; padding-top: 8px; }

/* Atelier Wide Split Product Browser Modal */
.ow-modal.xwide { width: 1040px; }
.prod-modal-layout.atelier-split { grid-template-columns: 1fr 240px; height: 70vh; }
.prod-modal-layout.atelier-split .pm-sports {
  border-right: none; border-left: 1px solid var(--line); background: #f8fafc; padding: 12px;
}
.prod-modal-layout.atelier-split .pm-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 18px;
}
.pm-card.atelier-card {
  align-items: center; text-align: center; padding: 14px 12px 16px; gap: 6px;
}
.pm-card.atelier-card img { width: 132px; height: 132px; object-fit: contain; margin-bottom: 4px; }
.pm-card-title { font-size: 14px; font-weight: 800; color: var(--accent); line-height: 1.25; }
.pm-spec-list {
  list-style: none; margin: 2px 0 4px; padding: 0;
  display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: #475569; line-height: 1.35;
}
.pm-start-price { font-size: 12.5px; font-weight: 800; color: var(--ink); margin-top: auto; padding-top: 4px; }

@media (max-width: 960px) {
  html, body { overflow: auto; }
  .konfi-shell { grid-template-columns: 1fr; grid-template-rows: 54vh auto; height: auto; min-height: 100vh; }
  .config-pane { height: auto; border-left: none; border-top: 1px solid var(--line); }
  .stage-breadcrumb, .stage-tip, .clo-badge, .fabric-loupe-hud { display: none; }
  .prod-modal-layout, .prod-modal-layout.atelier-split, .sc-main-grid, .fit-finder-bar { grid-template-columns: 1fr; }
  .prod-modal-layout.atelier-split .pm-grid { grid-template-columns: repeat(2, 1fr); }
  .intake-grid, .export-actions-grid, .export-actions-grid.three { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .stage-topbar {
    padding: 8px 10px; flex-wrap: wrap; gap: 6px;
    background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.68) 78%, transparent 100%);
  }
  .stage-brand-nav { flex: 1 1 auto; gap: 6px; }
  .stage-logo { padding: 5px 9px; }
  .stage-logo-text { display: none; }
  .stage-products-btn { padding: 6px 10px; font-size: 12px; }
  .stage-mode-pills { width: 100%; justify-content: space-between; padding: 3px; gap: 3px; }
  .mode-pill { flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 5px 6px; font-size: 10.5px; }
  .viewer-3d { padding-top: 76px; }
  .toolbox, .toolbox.atelier-minimal { left: 6px; top: 96px; transform: none; padding: 2px; gap: 2px; }
  .tb-btn { width: 29px; height: 29px; }
  .tb-btn svg { width: 15px; height: 15px; }
  .cam-pill { padding: 5px 9px; font-size: 11px; }
  .prod-modal-layout.atelier-split .pm-grid { grid-template-columns: 1fr; }
}

/* === v8.2 Atelier ZERO-OBSTRUCTION RIGHT-PANE DRAWERS, WIDE COLOR BARS + PATTERNS & VISUAL 8-SPOT PLACEMENT === */
.side-drawer.full-pane-drawer {
  top: 0; left: 0; right: 0; bottom: 0; z-index: 52;
}
.sd-eyebrow {
  display: block; font-size: 10px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 2px;
}

/* Right-Pane Change Product Browser (#productBrowserDrawer) */
.pbd-cats-strip {
  display: flex; gap: 6px; overflow-x: auto; padding: 9px 16px;
  border-bottom: 1px solid var(--line); background: #f8fafc; flex: none;
}
.pbd-cats-strip::-webkit-scrollbar { height: 4px; }
.pbd-cats-strip::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
.pbd-cat-pill {
  flex: none; padding: 5.5px 12px; border-radius: 99px; border: 1px solid #cbd5e1;
  background: #ffffff; color: #334155; font-size: 11.5px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px; transition: all .14s;
}
.pbd-cat-pill:hover { border-color: var(--pill-dark); color: var(--ink); }
.pbd-cat-pill.active { background: var(--pill-dark); color: #ffffff; border-color: var(--pill-dark); }
.pbd-cat-pill small { font-size: 10px; opacity: 0.78; font-weight: 800; }

.sd-body.pbd-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
  padding: 14px 16px 24px; align-content: start;
}
.pbd-card {
  background: #ffffff; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 11px 10px 12px; display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 4px; cursor: pointer; transition: all .15s;
}
.pbd-card:hover {
  border-color: var(--accent); background: #f8fafc; transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}
.pbd-card.active {
  border-color: var(--pill-dark); background: #f8fafc;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}
.pbd-card img { width: 106px; height: 112px; object-fit: contain; display: block; margin-bottom: 2px; }
.pbd-card-title { font-size: 12.5px; font-weight: 800; color: var(--accent); line-height: 1.2; }
.pbd-card-specs { font-size: 10.5px; color: #475569; line-height: 1.3; }
.pbd-card-price { font-size: 11.5px; font-weight: 800; color: var(--ink); margin-top: auto; padding-top: 4px; }

/* Right-Pane Palette 3D Colorway Suggestions Drawer (#paletteSuggestionsDrawer) */
.sd-body.pal-3d-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px;
  padding: 14px 16px 22px; align-content: start;
}
.pal-3d-card {
  background: #ffffff; border: 1.5px solid var(--line); border-radius: 11px;
  padding: 8px 6px 9px; display: flex; flex-direction: column; align-items: center;
  gap: 4px; cursor: pointer; text-align: center; transition: all .14s;
}
.pal-3d-card:hover { border-color: var(--accent); background: #eff6ff; transform: translateY(-1px); }
.pal-3d-card img { width: 84px; height: 88px; object-fit: contain; display: block; }
.pal-3d-card span { font-size: 10.5px; font-weight: 700; color: #1e293b; line-height: 1.15; }

/* Atelier Wide Horizontal Color Bars + Zone Pattern Dropdown */
.color-zones.atelier-bars {
  display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px;
}
.zone-row {
  display: grid; grid-template-columns: 1fr 122px; gap: 6px; align-items: stretch;
}
.zone-bar-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px; border-radius: 9px; border: 2px solid rgba(15, 23, 42, 0.14);
  cursor: pointer; transition: all .14s; min-height: 40px;
}
.zone-bar-btn.active {
  border-color: var(--pill-dark);
  box-shadow: 0 0 0 2px rgba(24, 26, 31, 0.16), 0 4px 10px rgba(15, 23, 42, 0.08);
}
.zone-bar-pill {
  background: rgba(255, 255, 255, 0.94); color: #14181f;
  padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 800;
  box-shadow: 0 1px 4px rgba(0,0,0,0.14);
}
.zone-bar-hex {
  background: rgba(15, 23, 42, 0.68); color: #ffffff;
  padding: 2px 7px; border-radius: 6px; font-size: 10px; font-family: monospace; font-weight: 700;
}
.zone-pat-select {
  border-radius: 9px; border: 1.5px solid #cbd5e1; background: #f8fafc;
  padding: 0 8px; font-size: 11.5px; font-weight: 700; color: #1e293b; cursor: pointer;
}
.zone-pat-select:hover, .zone-pat-select.active-pat {
  border-color: var(--accent); background: #eff6ff; color: var(--accent);
}

/* Atelier Clean Text & Logo Blue-Outline Pill Cards */
.ow-text-entry-card {
  background: #f8fafc; border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 14px; margin-bottom: 10px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
}
.ow-entry-lead { margin: 0; font-size: 12px; color: #475569; line-height: 1.4; }
.ow-blue-pill-btn {
  background: #ffffff; border: 1.8px solid var(--accent); color: var(--accent);
  padding: 8px 20px; border-radius: 99px; font-size: 12.5px; font-weight: 800;
  cursor: pointer; transition: all .14s; width: 100%; max-width: 280px;
}
.ow-blue-pill-btn:hover { background: var(--accent); color: #ffffff; }

.ow-card-pill {
  margin-top: 3px; display: inline-block;
  border: 1.5px solid var(--accent); color: var(--accent); background: #ffffff;
  padding: 4px 12px; border-radius: 99px; font-size: 11px; font-weight: 800;
  transition: all .14s;
}
.st-lhub-card:hover .ow-card-pill,
.st-lhub-card.active .ow-card-pill {
  background: var(--accent); color: #ffffff; border-color: var(--accent);
}

/* 8-Spot Visual Mini-Garment Placement Buttons (Edit Logo + Edit Text) */
.eld-place-btn.visual {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 4px 7px; border-radius: 9px;
}
.eld-place-btn.visual svg { width: 32px; height: 32px; display: block; }
.eld-place-btn.visual span { font-size: 10px; font-weight: 700; line-height: 1.1; }

/* Edit Text Visual Font Chips */
.etd-font-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
}
.etd-font-btn {
  padding: 7px 6px; border-radius: 8px; border: 1.5px solid #cbd5e1; background: #ffffff;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: all .14s;
}
.etd-font-btn:hover { border-color: var(--accent); background: #f8fafc; }
.etd-font-btn.active { border-color: var(--pill-dark); background: #eff6ff; box-shadow: 0 2px 6px rgba(15,23,42,0.06); }
.etd-font-sample { font-size: 15px; line-height: 1.1; color: var(--ink); }
.etd-font-name { font-size: 9.5px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* IBJJF Tournament Legal Lock & Belt Rank Color Bar (VoizerGear Combat Mode) */
.ibjjf-compliance-bar {
  margin: 0 18px 8px; padding: 7px 10px; border-radius: 10px;
  background: #f8fafc; border: 1px solid #e2e8f0;
  display: flex; flex-direction: column; gap: 6px;
}
.ibjjf-top-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ibjjf-lock-btn {
  border: 1.2px solid #cbd5e1; background: #ffffff; color: #0f172a;
  font-size: 10.5px; font-weight: 800; padding: 3px 9px; border-radius: 99px; cursor: pointer;
  transition: all .14s;
}
.ibjjf-lock-btn.active { background: #0f172a; color: #ffffff; border-color: #0f172a; }
.ibjjf-rule-note { font-size: 10px; color: #475569; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ibjjf-belts-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.ibjjf-belt-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 99px; border: 1.2px solid #cbd5e1; background: #ffffff;
  font-size: 10px; font-weight: 800; color: #1e293b; cursor: pointer; transition: all .14s;
}
.ibjjf-belt-pill:hover, .ibjjf-belt-pill.active { border-color: var(--accent); background: #fff7ed; }
.ibjjf-belt-dot { width: 9px; height: 9px; border-radius: 50%; border: 1px solid rgba(15,23,42,0.28); display: inline-block; }

/* === v9.2.0 TOPBAR PRODUCTS ROOT BUTTON, SPLIT TWO-PANE SHOWCASE, PBR SWATCH TILES & LIVE CREST BUILDER === */
.stage-brand-nav {
  display: inline-flex; align-items: center; gap: 8px;
}
.stage-products-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px);
  color: var(--ink); border: 1.5px solid rgba(15, 23, 42, 0.12);
  padding: 7px 14px; border-radius: 10px; font-size: 13px; font-weight: 800;
  cursor: pointer; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transition: all .15s ease;
}
.stage-products-btn:hover {
  border-color: var(--pill-dark); background: #ffffff; color: var(--accent);
}
.stage-products-btn.active {
  background: var(--pill-dark); color: #ffffff; border-color: var(--pill-dark);
}
.stage-products-btn.active .spb-caret {
  transform: rotate(180deg);
}
.spb-caret { transition: transform .16s ease; }

/* Left-Stage 3-Column Studio Product Showcase (#stageProductShowcase) */
.stage-product-showcase {
  position: absolute; inset: 0; z-index: 44;
  background: #ffffff;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: spsFadeIn .16s ease-out;
}
@keyframes spsFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.sps-header {
  padding: 18px 28px 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.sps-eyebrow {
  display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 2px;
}
.sps-title-wrap h2 {
  margin: 0; font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em;
}
.sps-header-controls {
  display: flex; align-items: center; gap: 10px;
}
.sps-search-wrap {
  display: flex; align-items: center; gap: 8px;
  background: #f8fafc; border: 1.5px solid #cbd5e1; border-radius: 99px;
  padding: 6px 14px; min-width: 260px; color: #64748b;
  transition: border-color .14s, background .14s;
}
.sps-search-wrap:focus-within {
  border-color: var(--accent); background: #ffffff; color: var(--accent);
}
.sps-search-wrap input {
  border: none; outline: none; background: transparent; width: 100%;
  font-size: 12.5px; font-weight: 600; color: var(--ink);
}
.sps-close-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: #f8fafc; color: #1e293b; font-size: 23px; line-height: 1;
  cursor: pointer; display: grid; place-items: center; transition: all .14s;
}
.sps-close-btn:hover { background: var(--pill-dark); color: #ffffff; border-color: var(--pill-dark); }

.sps-grid {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 24px 28px 36px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
  align-content: start;
}
.sps-grid::-webkit-scrollbar { width: 7px; }
.sps-grid::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
.sps-card {
  background: #ffffff; border: 1.5px solid #e2e8f0; border-radius: 14px;
  padding: 18px 16px 18px; display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 6px; cursor: pointer; transition: all .16s ease;
}
.sps-card:hover {
  border-color: var(--accent); transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.sps-card.active {
  border-color: var(--pill-dark); background: #f8fafc;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.09);
}
.sps-card-img-wrap {
  width: 156px; height: 156px; display: grid; place-items: center;
  margin-bottom: 4px;
}
.sps-card-img-wrap img {
  max-width: 100%; max-height: 100%; object-fit: contain; display: block;
}
.sps-card-title {
  font-size: 14.5px; font-weight: 800; color: var(--accent); line-height: 1.25;
}
.sps-card-specs {
  list-style: none; margin: 2px 0 6px; padding: 0;
  display: flex; flex-direction: column; gap: 2.5px;
  font-size: 12px; color: #475569; line-height: 1.35;
}
.sps-card-price {
  margin-top: auto; padding-top: 6px;
  font-size: 13px; font-weight: 800; color: var(--ink);
}

/* Right-Pane Grouped Root Category Directory (#pbdRootColumns) */
.sd-body.pbd-root-body {
  padding: 14px 18px 26px; display: flex; flex-direction: column; gap: 14px;
}
.pbd-root-groups {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px;
  align-items: start;
}
.pbd-group-col {
  display: flex; flex-direction: column; gap: 3px;
}
.pbd-group-heading {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  color: #64748b; padding: 0 8px 5px; border-bottom: 1px solid #e2e8f0; margin-bottom: 3px;
}
.pbd-root-link {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 6.5px 9px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: #1e293b; font-size: 12.5px; font-weight: 600;
  cursor: pointer; text-align: left; transition: all .12s ease;
}
.pbd-root-link:hover {
  background: #f1f5f9; color: var(--accent);
}
.pbd-root-link.active {
  background: var(--pill-dark); color: #ffffff; font-weight: 800;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.12);
}
.pbd-root-link small {
  font-size: 10.5px; font-weight: 700; opacity: 0.72;
}
.pbd-mobile-divider {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); padding-top: 8px; border-top: 1px dashed #cbd5e1;
}
.pbd-inline-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}

/* Photorealistic PBR Normal-Lit Draped Swatch Tiles & Active Textile Spec Banner */
.fo-active-spec-banner {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
  border: 1.5px solid #bfdbfe; border-radius: 12px;
  padding: 10px 12px; margin-bottom: 9px;
}
.fo-active-spec-banner img {
  width: 56px; height: 56px; border-radius: 10px; flex: none; object-fit: cover;
  border: 1.5px solid #93c5fd;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}
.fo-asb-meta { flex: 1; min-width: 0; font-size: 11px; color: #334155; line-height: 1.35; }
.fo-asb-meta strong { display: block; font-size: 12.5px; color: #0f172a; margin-bottom: 2px; }
.fo-swatch-tile {
  width: 50px; height: 50px; flex: none; border-radius: 9px;
  background: #f1f5f9; border: 1.5px solid #cbd5e1;
  overflow: hidden; box-shadow: 0 2px 7px rgba(15, 23, 42, 0.10);
}
.fo-card.active .fo-swatch-tile {
  border-color: var(--pill-dark); box-shadow: 0 3px 10px rgba(15, 23, 42, 0.18);
}
.fo-swatch-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

.qspec-pill.collar-pill {
  background: #f0f9ff; border-color: #7dd3fc; color: #0369a1;
}
.qspec-pill.collar-pill:hover {
  border-color: #0284c7; background: #e0f2fe; color: #0c4a6e;
}

/* Custom Vector Crest Live SVG Preview & Help Note */
.cb-head-row {
  display: grid; grid-template-columns: 1fr 78px; gap: 10px; align-items: center;
}
.cb-help-note {
  margin: 4px 0 0; font-size: 11px; line-height: 1.38; color: #475569;
}
.cb-live-preview {
  width: 76px; height: 76px; border-radius: 10px; border: 1.5px solid #cbd5e1;
  background: #ffffff; display: grid; place-items: center; padding: 5px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}
.cb-live-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }

@media (max-width: 1180px) {
  .sps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .stage-product-showcase { display: none !important; }
  .pbd-root-groups { grid-template-columns: 1fr; }
}
