:root {
  --logo-cocoa: #8B6C63;
  --deep-cocoa: #5C4741;
  --blush-background: #F6ECE9;
  --warm-ivory: #FFF9F5;
  --dusty-rose: #CDAFAA;
  --champagne-gold: #C5A477;
  --mineral-sage: #A8B0A1;
  --crystal-mist-blue: #B8C8C9;
  --soft-border: #E5D7D2;
  --ink: var(--deep-cocoa);
  --muted: var(--logo-cocoa);
  --line: var(--soft-border);
  --soft-line: color-mix(in srgb, var(--soft-border), transparent 20%);
  --paper: var(--blush-background);
  --panel: var(--warm-ivory);
  --mineral: var(--blush-background);
  --accent: var(--logo-cocoa);
  --accent-soft: #E8D7D2;
  --amethyst: var(--crystal-mist-blue);
  --gold: var(--champagne-gold);
  --danger: #a24d45;
  --shadow: 0 20px 70px rgba(39, 59, 52, 0.11);
  font-family: "Sora", sans-serif;
  color: var(--ink);
  background: var(--mineral);
}

/* 2026-08-19: Kiki single-flow 2D configurator and audited operations console */
.app[data-page="studio"] .topbar .top-actions,
.app[data-page="studio"] .view-tabs,
.app[data-page="studio"] .language-button,
.app[data-page="studio"] .ops-entry,
.app[data-page="studio"] .summary-panel,
.app[data-page="studio"] .mobile-builder-toolbar { display: none !important; }

.app[data-page="studio"] .builder-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(350px, .72fr);
  grid-template-areas: "stage catalog";
  height: 100vh;
  height: var(--orbit-viewport-height, 100dvh);
  min-height: 620px;
  gap: 0;
}
.app[data-page="studio"] .stage-panel { grid-area: stage; min-width: 0; min-height: 0; border-radius: 0; }
.app[data-page="studio"] .catalog-panel { grid-area: catalog; min-width: 0; min-height: 0; border-radius: 0; }
.stage-live-badges { position: absolute; inset: 18px 18px auto; z-index: 12; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; pointer-events: none; }
.stage-live-badges > span,.stage-wrist-control { min-width: 112px; min-height: 52px; padding: 8px 12px; display: grid; gap: 2px; color: #18382f; background: rgba(255,255,255,.9); border: 1px solid rgba(42,77,67,.13); border-radius: 15px; box-shadow: 0 8px 24px rgba(31,55,48,.1); backdrop-filter: blur(12px); }
.stage-live-badges > span:last-child { text-align: right; }
.stage-live-badges strong { font: 700 13px/1.2 Sora, sans-serif; }
.stage-live-badges small { color: #697a75; font: 600 10px/1.2 Sora, sans-serif; }
.stage-wrist-control { min-width: 184px; grid-template-columns: 32px minmax(84px,1fr) 32px; align-items: center; gap: 5px; padding: 5px; pointer-events: auto; }
.stage-wrist-control > span { display: grid; gap: 2px; text-align: center; }
.stage-wrist-control button { width: 32px; height: 40px; border: 0; border-radius: 11px; color: var(--runtime-accent); background: color-mix(in srgb,var(--runtime-accent),white 91%); font-size: 18px; font-weight: 700; cursor: pointer; }
.stage-wrist-control button:disabled { opacity: .3; cursor: default; }
.floating-done-button { position: fixed; right: 24px; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 70; min-width: 138px; min-height: 52px; padding: 0 20px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 999px; color: #fff; background: var(--runtime-accent, #236b5a); box-shadow: 0 16px 40px rgba(24,72,59,.3); font: 800 15px/1 Sora, sans-serif; cursor: pointer; }
.floating-done-button:disabled { opacity: .38; cursor: not-allowed; }
.component-card { min-height: 154px; grid-template-rows: auto auto auto !important; }
.component-card .component-name { display: block !important; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.component-size-select { display: none !important; }

.checkout-review-modal .modal-content { overflow: auto; }
.checkout-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checkout-facts span { padding: 12px; display: flex; align-items: baseline; gap: 6px; border-radius: 12px; background: #f1f5f3; color: #667670; font-size: 12px; }
.checkout-facts strong { color: #17372f; font-size: 16px; }
.checkout-bom-list .bom-row { grid-template-columns: 38px minmax(0,1fr) auto auto; align-items: center; gap: 10px; }
.bom-list.checkout-bom-list { max-height: 336px; overflow-y: auto; overscroll-behavior-y: auto; -webkit-overflow-scrolling: touch; }
.checkout-bom-list .component-swatch { width: 36px; height: 36px; }
.checkout-bom-list .bom-row > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.checkout-bom-list .bom-row > span:nth-child(2) strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checkout-bom-list .bom-row small { color: #7b8985; }
.checkout-service-notes { display: grid; gap: 8px; }
.checkout-service-notes p { margin: 0; padding: 11px 12px; display: grid; gap: 3px; border: 1px solid rgba(45,75,66,.1); border-radius: 12px; }
.checkout-service-notes strong { color: #244d42; font-size: 12px; }
.checkout-service-notes span { color: #6c7975; font-size: 11px; line-height: 1.45; }

.simple-admin-page { width: min(1420px, 100%); margin: 0 auto; padding: 24px clamp(16px, 3vw, 42px) 72px; display: grid; gap: 18px; }
.admin-command-bar { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 24px 26px; border-radius: 24px; color: #fff; background: linear-gradient(135deg, #173f35, #2e7965); box-shadow: 0 18px 50px rgba(25,67,56,.17); }
.admin-command-bar h1 { margin: 5px 0 7px; font: 600 clamp(24px, 3vw, 38px)/1.12 "Bodoni Moda", serif; }
.admin-command-bar p { margin: 0; max-width: 700px; color: rgba(255,255,255,.75); font-size: 13px; }
.admin-command-bar > div > span { color: #b9e3d8; font-size: 11px; font-weight: 800; letter-spacing: .13em; }
.admin-command-bar label { min-width: 230px; display: grid; gap: 7px; font-size: 11px; }
.admin-command-bar select { min-height: 42px; padding: 0 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 12px; color: #173b32; background: #fff; }
.admin-role-strip { min-height: 50px; padding: 8px 14px; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(41,77,67,.11); border-radius: 16px; background: #fff; color: #687872; font-size: 12px; }
.admin-role-strip a { margin-left: auto; color: #236b5a; font-weight: 700; }
.role-pill { padding: 6px 9px; border-radius: 999px; color: #fff; background: #788782; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.role-pill.operator { background: #a2732f; }.role-pill.admin { background: #236b5a; }
.simple-admin-grid { display: grid; grid-template-columns: minmax(320px,.8fr) minmax(420px,1.2fr); gap: 18px; }
.simple-admin-card { min-width: 0; padding: 20px; border: 1px solid rgba(41,77,67,.11); border-radius: 22px; background: rgba(255,255,255,.92); box-shadow: 0 12px 34px rgba(38,67,58,.07); }
.batch-import-card { display: grid; gap: 2px; }
.batch-import-intro { margin: -5px 0 16px; color: #6d7c77; font-size: 12px; line-height: 1.6; }
.batch-import-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.batch-import-item { min-width: 0; padding: 12px; display: grid; grid-template-columns: 154px minmax(0,1fr); gap: 14px; border: 1px solid rgba(41,77,67,.11); border-radius: 16px; background: #f8faf9; }
.batch-import-item.locked { border-color: rgba(35,107,90,.22); background: #f0f6f4; }
.batch-import-photo { position: relative; width: 100%; min-height: 0; aspect-ratio: 1; align-self: start; overflow: hidden; border-radius: 13px; background: #e9efed; }
.batch-import-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.batch-import-photo button { position: absolute; right: 7px; bottom: 7px; min-height: 30px; padding: 0 9px; border: 0; border-radius: 999px; color: #fff; background: rgba(20,50,42,.78); font-size: 10px; font-weight: 800; cursor: pointer; }
.batch-import-body { min-width: 0; display: grid; align-content: start; gap: 9px; }
.batch-import-file { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }.batch-import-file strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #203f37; font-size: 12px; }.batch-import-file span { flex: 0 0 auto; color: #8a7770; font-size: 9px; font-weight: 800; }
.batch-import-body label { min-width: 0; display: grid; gap: 5px; color: #65756f; font-size: 10px; }
.batch-import-body input { width: 100%; min-width: 0; min-height: 38px; padding: 0 9px; border: 1px solid rgba(41,77,67,.16); border-radius: 9px; background: #fff; }
.batch-field-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.batch-quality-note { padding: 8px 9px; display: grid; gap: 2px; border-radius: 9px; color: #855a22; background: #fff5df; font-size: 9px; line-height: 1.45; }.batch-quality-note strong { font-size: 10px; }
.batch-import-body > .primary-button { min-height: 38px; }
.pending-quality-warning { color: #996421 !important; white-space: normal !important; }
.simple-admin-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.simple-admin-heading span { color: #2c7663; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.simple-admin-heading h2 { margin: 4px 0 0; color: #17372f; font: 600 23px/1.15 "Bodoni Moda", serif; }
.simple-admin-heading > strong { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; color: #fff; background: #236b5a; }
.simple-image-upload { min-height: 220px; padding: 20px; display: grid; place-items: center; align-content: center; gap: 9px; border: 1.5px dashed #aac4bc; border-radius: 18px; color: #356f60; background: #f3f8f6; text-align: center; cursor: pointer; overflow: hidden; }
.simple-image-upload input { position: absolute; opacity: 0; pointer-events: none; }
.simple-image-upload img { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 10px 10px rgba(30,53,46,.18)); }
.simple-image-upload span { font-weight: 800; }.simple-image-upload small { max-width: 330px; color: #76847f; line-height: 1.45; }
.admin-processing-error,.admin-processing-success { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 12px; font-weight: 700; line-height: 1.45; }
.admin-processing-error { color: #8b3030; background: #fff0f0; border: 1px solid rgba(139,48,48,.18); }
.admin-processing-success { color: #246553; background: #edf8f4; border: 1px solid rgba(36,101,83,.16); }
.four-field-grid { margin: 14px 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.four-field-grid label { display: grid; gap: 6px; color: #61716b; font-size: 11px; }
.four-field-grid input,.account-add input,.account-add select { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid rgba(41,77,67,.16); border-radius: 11px; background: #fff; }
.pending-change-list { max-height: 540px; overflow: auto; display: grid; gap: 9px; }
.pending-change { padding: 10px; display: grid; grid-template-columns: 54px minmax(0,1fr) auto; align-items: center; gap: 10px; border: 1px solid rgba(41,77,67,.1); border-radius: 14px; background: #f8faf9; }
.pending-change > img,.pending-delete-icon { width: 54px; height: 54px; object-fit: contain; border-radius: 50%; background: #edf2f0; }
.pending-change > div:not(.review-actions) { min-width: 0; display: grid; gap: 2px; }
.pending-change > div > span { color: #a06d27; font-size: 10px; font-weight: 800; text-transform: uppercase; }.pending-change small { color: #798680; }
.pending-change > button,.review-actions button,.admin-catalog-list button,.simple-admin-heading button,.account-add button { min-height: 34px; padding: 0 10px; border: 1px solid rgba(41,77,67,.15); border-radius: 9px; color: #275f50; background: #fff; font-weight: 700; cursor: pointer; }
.review-actions { grid-column: 2 / -1; display: flex; justify-content: flex-end; gap: 7px; }.review-actions button:last-child { color: #fff; background: #236b5a; }
.pending-change.approved { opacity: .62; }.pending-change.rejected { opacity: .52; }
.admin-catalog-list { max-height: 660px; overflow: auto; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.admin-catalog-list article { padding: 9px; display: grid; grid-template-columns: 48px minmax(0,1fr) auto auto auto; align-items: center; gap: 8px; border: 1px solid rgba(41,77,67,.1); border-radius: 13px; }
.admin-catalog-list .component-swatch { width: 46px; height: 46px; }.admin-catalog-list article > div { min-width: 0; display: grid; gap: 3px; }.admin-catalog-list small { color: #75827e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-list { display: grid; gap: 7px; }.account-list article { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: #f4f7f6; }.account-list article > div { flex: 1; display: grid; }.account-list small { color: #7a8783; }.account-list select { min-height: 36px; border: 1px solid #cbd7d3; border-radius: 9px; background: #fff; }
.account-add { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr 140px auto; gap: 8px; }
.admin-preview-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(15,29,25,.55); backdrop-filter: blur(10px); }
.admin-preview-backdrop > section { position: relative; width: min(430px,100%); padding: 22px; display: grid; justify-items: center; gap: 10px; border-radius: 24px; background: #f8fbfa; box-shadow: 0 28px 80px rgba(8,24,19,.28); }.admin-preview-backdrop > section > button { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; border: 0; border-radius: 50%; color: var(--muted); background: transparent; appearance: none; -webkit-appearance: none; font-size: 0; line-height: 0; cursor: pointer; }.admin-preview-stage { width: 280px; height: 280px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle,#fff,#e9f0ed); }.admin-preview-stage .component-swatch { width: 150px; height: 150px; box-shadow: 0 18px 28px rgba(33,54,47,.24); }

@media (max-width: 900px) {
  .app[data-page="studio"] .topbar { height: 50px !important; min-height: 50px !important; padding: 6px 14px !important; }
  .app[data-page="studio"] .brand-sub { display: none; }
  .app[data-page="studio"] .builder-layout { display: grid !important; grid-template-columns: 1fr !important; grid-template-rows: 50% 50% !important; grid-template-areas: "stage" "catalog" !important; height: calc(var(--orbit-viewport-height, 100dvh) - 50px) !important; min-height: 560px !important; overflow: hidden; }
  .app[data-page="studio"] .stage-panel,.app[data-page="studio"] .catalog-panel { position: relative !important; inset: auto !important; width: auto !important; height: auto !important; max-height: none !important; display: flex !important; border: 0 !important; transform: none !important; }
  .app[data-page="studio"] .catalog-panel { border-top: 1px solid rgba(32,65,55,.12) !important; padding-bottom: 0 !important; }
  .app[data-page="studio"] .catalog-panel::before { display: none !important; }
  .stage-live-badges { inset: 9px 9px auto; gap: 6px; }.stage-live-badges > span { min-width: 95px; padding: 8px 10px; border-radius: 12px; }.stage-live-badges strong { font-size: 11px; }.stage-live-badges small { font-size: 8px; }
  .stage-quick-actions { bottom: 8px !important; }.stage-count { display: none !important; }
  .floating-done-button { right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); min-width: 112px; min-height: 46px; padding: 0 16px; }
  .catalog-panel .panel-head { padding: 10px 12px 7px !important; }.catalog-panel .catalog-toolbar { margin-top: 0 !important; }
  .catalog-scroll { padding-bottom: 76px !important; }
  .component-card { min-height: 126px !important; }.component-card .component-name { font-size: 11px !important; }.component-card .component-meta { font-size: 9px !important; }
  .checkout-review-modal { width: 100% !important; max-height: 96dvh !important; grid-template-columns: 1fr !important; }.checkout-review-modal .modal-preview { min-height: 250px !important; }.checkout-review-modal .modal-content { padding: 18px !important; }
  .simple-admin-page { padding: 12px 12px 56px; }.admin-command-bar { align-items: stretch; flex-direction: column; padding: 18px; }.admin-command-bar label { min-width: 0; }.simple-admin-grid,.batch-import-grid { grid-template-columns: 1fr; }.batch-import-item { grid-template-columns: 116px minmax(0,1fr); }.batch-field-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }.four-field-grid { grid-template-columns: 1fr; }.admin-catalog-list { grid-template-columns: 1fr; }.admin-catalog-list article { grid-template-columns: 42px minmax(0,1fr) auto auto auto; }.account-add { grid-template-columns: 1fr; }
}

* {
  box-sizing: border-box;
}

.boot-shell {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  background: #eaf1ef;
  color: #23433c;
  font-family: Sora, system-ui, sans-serif;
}

.boot-shell strong {
  font-size: 12px;
  letter-spacing: 0.04em;
}

.boot-shell span {
  color: #698079;
  font-size: 12px;
}

.boot-preview {
  width: min(540px, 88vw);
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(32, 67, 57, 0.14);
}

.boot-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.boot-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.boot-orbit {
  width: 18px;
  height: 18px;
  border: 2px solid #bdd0ca;
  border-top-color: #236b5a;
  border-radius: 50%;
  animation: boot-spin 1s linear infinite;
}

@keyframes boot-spin {
  to { transform: rotate(360deg); }
}

html,
body,
#root {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -12%, rgba(255, 255, 255, 0.92), transparent 36%),
    linear-gradient(145deg, #eef3f1 0%, #e2ebe8 46%, #edf1ee 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent), white 54%);
  outline-offset: 2px;
}

button {
  color: inherit;
}

.app {
  min-height: 100vh;
  --runtime-accent: var(--accent);
}

.app[data-tone="ink"] {
  --paper: #ecf0ee;
  --panel: rgba(246, 248, 247, 0.88);
  --mineral: #dce4e1;
}

.app[data-tone="violet"] {
  --paper: #f7f5f8;
  --panel: rgba(255, 255, 255, 0.84);
  --mineral: #ebe8ee;
}

.topbar {
  height: 72px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 248, 247, 0.74);
  backdrop-filter: blur(18px) saturate(130%);
  position: sticky;
  top: 0;
  z-index: 40;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(23, 35, 31, 0.4);
  border-radius: 50%;
  position: relative;
  flex: 0 0 auto;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--runtime-accent);
}

.brand-mark::before {
  width: 7px;
  height: 7px;
  top: 3px;
  left: 13px;
}

.brand-mark::after {
  width: 5px;
  height: 5px;
  bottom: 5px;
  right: 4px;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-sub {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.view-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--soft-line);
  background: rgba(255, 255, 255, 0.52);
  border-radius: 999px;
}

.tab-button {
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.tab-button:hover {
  color: var(--ink);
}

.tab-button.active {
  color: white;
  background: var(--runtime-accent);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--runtime-accent), transparent 74%);
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.ops-entry {
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--runtime-accent);
  background: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
}

.status-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4b947a;
  box-shadow: 0 0 0 4px rgba(75, 148, 122, 0.12);
}

.icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.68);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease;
}

.language-button {
  min-width: 44px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.language-button:hover {
  background: white;
}

.icon-button:hover {
  transform: translateY(-1px);
  background: white;
}

.icon-button svg {
  width: 18px;
  height: 18px;
  display: block;
  margin: 0;
}

.builder-layout {
  height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 326px minmax(440px, 1fr) 352px;
  gap: 1px;
  background: var(--line);
  overflow: hidden;
}

.panel {
  min-width: 0;
  min-height: 0;
  background: var(--panel);
  backdrop-filter: blur(18px) saturate(115%);
}

.catalog-panel,
.summary-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-head {
  padding: 22px 20px 16px;
  display: grid;
  gap: 12px;
  border-bottom: 1px solid var(--soft-line);
}

.eyebrow {
  color: var(--runtime-accent);
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.panel-title {
  margin: 0;
  font-family: "Bodoni Moda", serif;
  font-size: 27px;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.panel-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.material-source-note {
  min-height: 30px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(35, 107, 90, 0.14);
  border-radius: 10px;
  color: var(--runtime-accent);
  background: color-mix(in srgb, var(--runtime-accent), white 93%);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.35;
}

.material-source-note .status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
}

.material-proof {
  height: 76px;
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #c9d2ce;
}

.material-proof img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 58%;
}

.material-proof-placeholder {
  display: block;
  width: 100%;
  height: 76px;
  background: linear-gradient(110deg, #d9e5e1 8%, #eef3f1 36%, #d8e3df 64%);
}

.material-proof::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17,27,24,.76), rgba(17,27,24,.08) 78%);
}

.material-proof figcaption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 9px;
  z-index: 1;
  display: grid;
  gap: 2px;
  color: white;
}

.material-proof strong {
  font-size: 10px;
}

.material-proof span {
  color: rgba(255,255,255,.76);
  font-size: 7px;
}

.search-field {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
}

.search-field svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
  flex: 0 0 auto;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
}

.filter-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.catalog-toolbar .filter-row { flex: 1; }

.catalog-search-toggle {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255,255,255,.72);
  cursor: pointer;
}

.catalog-search-toggle.active {
  color: white;
  border-color: var(--runtime-accent);
  background: var(--runtime-accent);
}

.catalog-search-expanded { animation: catalog-search-reveal 140ms ease-out both; }
.catalog-search-expanded small {
  display: block;
  margin: -3px 2px 1px;
  color: var(--runtime-accent);
  font-size: 9px;
  font-weight: 700;
}
@keyframes catalog-search-reveal { from { opacity: 0; transform: translateY(-3px); } }

.filter-chip {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.filter-chip.active {
  border-color: var(--runtime-accent);
  background: var(--accent-soft);
  color: var(--runtime-accent);
}

.catalog-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}

.catalog-body.with-color-menu { grid-template-columns: 74px minmax(0, 1fr); }

.color-family-menu {
  min-height: 0;
  padding: 10px 7px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  border-right: 1px solid var(--soft-line);
  background: rgba(238,244,242,.72);
  scrollbar-width: none;
}

.color-family-menu::-webkit-scrollbar { display: none; }

.color-family-menu button {
  min-height: 36px;
  padding: 0 5px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.color-family-menu button.active {
  color: white;
  background: var(--runtime-accent);
  box-shadow: 0 5px 12px color-mix(in srgb, var(--runtime-accent), transparent 76%);
}

.catalog-scroll {
  min-height: 0;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 9px;
  overflow: auto;
}

.component-card {
  position: relative;
  min-width: 0;
  min-height: 142px;
  padding: 12px;
  display: grid;
  grid-template-rows: 54px auto auto;
  gap: 8px;
  border: 1px solid var(--soft-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.64);
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-drag: none;
}

.component-count-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 6;
  min-width: 25px;
  height: 25px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,.94);
  border-radius: 999px;
  color: white;
  background: var(--runtime-accent);
  box-shadow: 0 6px 14px rgba(23,35,31,.2);
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.catalog-section-label {
  grid-column: 1 / -1;
  min-height: 28px;
  padding: 5px 2px 1px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
}

.catalog-section-label strong { color: var(--ink); font-size: 11px; }
.catalog-section-label span { font-size: 8px; }

.catalog-load-sentinel {
  grid-column: 1 / -1;
  min-height: 28px;
  display: grid;
  place-items: center;
}

.catalog-load-sentinel span {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(35,107,90,.18);
  border-top-color: var(--runtime-accent);
  border-radius: 50%;
  animation: catalog-spin 700ms linear infinite;
}

@keyframes catalog-spin { to { transform: rotate(360deg); } }

.component-card img,
.component-card .component-swatch,
.component-card .component-swatch-wrap {
  -webkit-user-drag: none;
  user-select: none;
}

.component-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--runtime-accent), transparent 55%);
  box-shadow: 0 12px 26px rgba(38, 58, 51, 0.09);
}

.catalog-load-more {
  grid-column: 1 / -1;
  min-height: 54px;
  border: 1px dashed rgba(35, 107, 90, 0.34);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #245c50;
  display: grid;
  place-content: center;
  gap: 3px;
  cursor: pointer;
}

.catalog-load-more strong {
  font-size: 13px;
}

.catalog-load-more span {
  color: #74877f;
  font-size: 10px;
}

.component-card.selected {
  border-color: var(--runtime-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--runtime-accent), transparent 82%);
}

.component-card.is-dragging {
  opacity: 0.5;
  transform: scale(0.97);
}

.component-swatch-wrap {
  min-height: 58px;
  display: grid;
  place-items: center;
  position: relative;
  touch-action: none;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}

.component-drag-handle {
  position: absolute;
  top: -3px;
  right: -3px;
  z-index: 3;
  width: 30px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  color: white;
  background: rgba(31, 67, 57, 0.9);
  box-shadow: 0 5px 12px rgba(23, 35, 31, 0.18);
  cursor: grab;
  touch-action: none;
  opacity: 0;
  transition: opacity 140ms ease, transform 140ms ease;
}

.component-drag-handle span { font-size: 10px; line-height: 1; }
.component-drag-handle small { font-size: 6px; line-height: 1; font-weight: 800; }
.component-card:hover .component-drag-handle,
.component-card:focus-visible .component-drag-handle { opacity: 1; }
.component-drag-handle:active { cursor: grabbing; transform: scale(0.96); }

.real-texture-tag {
  position: absolute;
  right: 0;
  bottom: -2px;
  padding: 2px 4px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 999px;
  color: white;
  background: rgba(23,35,31,.68);
  box-shadow: 0 3px 8px rgba(23,35,31,.12);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: .05em;
}

.component-swatch {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  position: relative;
  box-shadow:
    inset -8px -8px 13px rgba(23, 35, 31, 0.22),
    inset 8px 8px 14px rgba(255, 255, 255, 0.78),
    0 6px 13px rgba(23, 35, 31, 0.15);
  overflow: hidden;
}

.component-card .component-swatch::after {
  display: none;
}

.component-card.is-dragging .component-swatch {
  transform: scale(1.06);
  box-shadow: 0 10px 24px rgba(35, 107, 90, .24);
}

.component-drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 300;
  max-width: 150px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 999px;
  color: white;
  background: rgba(25,48,41,.9);
  box-shadow: 0 14px 34px rgba(18,35,30,.24);
  pointer-events: none;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.component-swatch > img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 120ms ease;
}

.component-swatch.spacer {
  height: 20px;
  border-radius: 5px;
}

.component-swatch.charm {
  border-radius: 12px 50% 50% 50%;
  transform: rotate(45deg);
}

.component-swatch::before,
.component-swatch::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.component-swatch.photo-texture::before {
  mix-blend-mode: screen;
}

.component-swatch::before {
  width: 16px;
  height: 9px;
  top: 6px;
  left: 8px;
  background: rgba(255, 255, 255, 0.72);
  filter: blur(2px);
  transform: rotate(-24deg);
}

.component-swatch::after {
  width: 8px;
  height: 8px;
  right: 8px;
  bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.component-name {
  min-width: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.component-meta {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.stage-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  background:
    radial-gradient(circle at 50% 47%, rgba(255, 255, 255, 0.94) 0 10%, rgba(255, 255, 255, 0.45) 30%, transparent 58%),
    repeating-radial-gradient(circle at 50% 48%, transparent 0 77px, rgba(23, 35, 31, 0.038) 78px 79px),
    linear-gradient(145deg, rgba(238, 244, 242, 0.95), rgba(218, 230, 226, 0.85));
}

.app[data-tone="ink"] .stage-panel {
  background:
    radial-gradient(circle at 50% 47%, rgba(252, 254, 253, 0.85) 0 8%, rgba(235, 241, 239, 0.32) 34%, transparent 58%),
    repeating-radial-gradient(circle at 50% 48%, transparent 0 77px, rgba(23, 35, 31, 0.052) 78px 79px),
    linear-gradient(145deg, rgba(222, 231, 228, 0.96), rgba(198, 213, 208, 0.88));
}

.app[data-tone="violet"] .stage-panel {
  background:
    radial-gradient(circle at 50% 47%, rgba(255, 255, 255, 0.92) 0 10%, rgba(249, 245, 252, 0.4) 31%, transparent 58%),
    repeating-radial-gradient(circle at 50% 48%, transparent 0 77px, rgba(85, 66, 111, 0.046) 78px 79px),
    linear-gradient(145deg, rgba(244, 239, 247, 0.96), rgba(222, 216, 230, 0.88));
}

.stage-panel::before {
  content: "";
  position: absolute;
  inset: 28px;
  z-index: -1;
  border: 1px solid rgba(23, 35, 31, 0.08);
  border-radius: 50%;
  opacity: 0.7;
}

.stage-top {
  position: absolute;
  top: 20px;
  left: 22px;
  right: 22px;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.stage-title {
  display: grid;
  gap: 5px;
}

.stage-title h1 {
  margin: 0;
  max-width: 420px;
  font-family: "Bodoni Moda", serif;
  font-size: clamp(28px, 3vw, 48px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.stage-title p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.view-controls {
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(23, 35, 31, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(12px);
  pointer-events: auto;
}

.view-button {
  min-height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.view-button.active {
  color: white;
  background: var(--ink);
}

.canvas-wrap {
  position: absolute;
  inset: 0;
}

.bracelet-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

.bracelet-webgl-mount {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.bracelet-interaction-shell {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.bracelet-interaction-shell canvas,
.bracelet-photo2d,
.bracelet-photo2d-canvas,
.bracelet-quickgl,
.bracelet-quickgl-canvas {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

.bracelet-photo2d,
.bracelet-photo2d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bracelet-photo2d {
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.bracelet-photo2d:active { cursor: grabbing; }
.bracelet-photo2d-canvas { display: block; pointer-events: none; }
.bracelet-photo2d-hit-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.bracelet-photo2d-hit-ring {
  pointer-events: stroke;
  touch-action: none;
  cursor: grab;
}
.bracelet-photo2d-hit-ring:active { cursor: grabbing; }

.bracelet-delete-mask {
  position: absolute;
  inset: 0;
  z-index: 13;
  display: grid;
  place-items: end center;
  padding: 0 0 12px;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  transition: opacity 140ms ease, visibility 140ms ease;
  pointer-events: none;
}

.bracelet-delete-mask.visible { opacity: 1; visibility: visible; }

.bracelet-delete-dock {
  position: relative;
  z-index: 1;
  min-width: 150px;
  min-height: 46px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(164,67,58,.26);
  border-radius: 999px;
  color: #9a4038;
  background: rgba(255,248,247,.94);
  box-shadow: 0 12px 30px rgba(93,39,34,.18);
  opacity: 0;
  transform: translateY(16px) scale(.92);
  transition: opacity 140ms ease, transform 140ms ease, background 120ms ease, color 120ms ease;
  pointer-events: none;
}

.bracelet-delete-dock.visible { opacity: 1; transform: translateY(0) scale(1); }
.bracelet-delete-dock.pending { color: #82433d; background: rgba(255,235,231,.98); box-shadow: 0 0 0 4px rgba(164,67,58,.09), 0 12px 30px rgba(93,39,34,.18); }
.bracelet-delete-dock.active { color: white; background: #a4433a; transform: translateY(0) scale(1.06); }
.bracelet-delete-dock span { font-size: 10px; font-weight: 750; }

.bracelet-bead-drag-ghost {
  position: absolute;
  z-index: 15;
  width: 58px;
  height: 58px;
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.94);
  border-radius: 50%;
  background: #eef3f1;
  box-shadow: 0 24px 34px rgba(42,38,42,.22), 0 8px 12px rgba(42,38,42,.13);
  transform: translate(-50%, -50%) scale(1.07);
  transition: box-shadow 120ms ease, transform 120ms ease;
  pointer-events: none;
}

.bracelet-bead-drag-ghost img,
.bracelet-bead-drag-ghost > span { width: 100%; height: 100%; display: block; object-fit: cover; }

.bracelet-upgrade-stack,
.bracelet-lite-layer,
.bracelet-detailed-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bracelet-detailed-layer {
  opacity: 0;
  pointer-events: none;
}

.bracelet-upgrade-stack.is-detailed .bracelet-detailed-layer {
  opacity: 1;
  pointer-events: auto;
}

.bracelet-quickgl,
.bracelet-quickgl-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bracelet-quickgl { overflow: hidden; cursor: grab; touch-action: none; }
.bracelet-quickgl:active { cursor: grabbing; }
.bracelet-quickgl-canvas { display: block; }

.bracelet-real3d-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  color: #31554c;
  background: radial-gradient(circle at 50% 48%, rgba(255,255,255,.82), rgba(231,240,237,.48) 42%, transparent 72%);
}

.bracelet-real3d-loading strong { font-size: 12px; }
.bracelet-real3d-loading small { color: var(--muted); font-size: 8px; }
.real3d-spinner { width: 28px; height: 28px; border: 3px solid #bfd2cc; border-top-color: var(--runtime-accent); border-radius: 50%; animation: real3d-spin .8s linear infinite; }
@keyframes real3d-spin { to { transform: rotate(360deg); } }

.bracelet-drop-target.is-drag-over {
  box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--runtime-accent), transparent 24%);
}

.bracelet-fast-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #eaf1ef;
  transition: opacity 180ms ease;
}

.bracelet-webgl-mount.is-render-ready .bracelet-fast-fallback {
  opacity: 0;
  pointer-events: none;
}

.bracelet-webgl-mount:active {
  cursor: grabbing;
}

.bracelet-3d-error {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.bracelet-canvas:active {
  cursor: grabbing;
}

.bracelet-dom3d { position:absolute;inset:0;overflow:hidden;cursor:grab;touch-action:none;perspective:900px; }
.bracelet-dom3d:active { cursor:grabbing; }
.bracelet-dom-ring { position:absolute;left:11%;right:11%;top:13%;bottom:13%;border:3px solid rgba(174,151,137,.46);border-radius:50%;box-shadow:inset 0 0 18px rgba(255,255,255,.42); }
.bracelet-dom3d.view-front .bracelet-dom-ring { top:11%;bottom:11%; }
.bracelet-dom3d.view-wrist .bracelet-dom-ring { top:20%;bottom:20%; }
.bracelet-dom-bead { position:absolute;padding:0;border:0;border-radius:50%;box-shadow:inset -10px -12px 18px rgba(0,0,0,.25),inset 9px 9px 13px rgba(255,255,255,.58),0 8px 16px rgba(35,52,46,.14);background-repeat:no-repeat;cursor:pointer;transition:outline-color 100ms ease,filter 100ms ease; }
.bracelet-dom-bead::after { content:"";position:absolute;left:18%;top:15%;width:28%;height:14%;border-radius:50%;background:rgba(255,255,255,.7);filter:blur(2px);transform:rotate(-24deg); }
.bracelet-dom-bead.is-accessory { border:5px solid #8a6729;background:radial-gradient(circle at 30% 25%,#fff0a9,#b68b44 66%)!important; }
.bracelet-dom-bead.selected { outline:3px solid var(--runtime-accent,#236b5a);outline-offset:4px;filter:saturate(1.12); }
.bracelet-dom-channel { position:absolute;left:-2%;right:-2%;top:47%;height:7%;border-top:1px solid rgba(85,95,92,.36);border-bottom:1px solid rgba(255,255,255,.48);background:rgba(181,151,135,.26);pointer-events:none; }

.stage-bottom {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 16px;
  pointer-events: none;
}

.stage-count {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
  min-width: 34px;
  height: 30px;
  padding: 0 9px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23,35,31,.1);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(12px);
  font-size: 10px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.stage-quick-actions {
  position: absolute;
  top: auto;
  left: 12px;
  bottom: 12px;
  z-index: 8;
  display: flex;
  gap: 6px;
}

.stage-quick-actions button {
  min-width: 58px;
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(23,35,31,.12);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255,255,255,.84);
  box-shadow: 0 5px 16px rgba(23,35,31,.08);
  backdrop-filter: blur(12px);
  font: inherit;
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}

.stage-quick-actions button:disabled {
  opacity: .38;
  cursor: default;
}

.material-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 420;
  padding: 18px;
  display: grid;
  place-items: center;
  background: rgba(19,30,27,.38);
  backdrop-filter: blur(8px);
}

.material-detail-card {
  width: min(390px, 100%);
  max-height: min(620px, 90dvh);
  padding: 14px;
  display: grid;
  gap: 12px;
  overflow: auto;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 22px;
  background: #fbfcfc;
  box-shadow: 0 28px 70px rgba(15,31,26,.28);
}

.material-detail-head { display: flex; align-items: center; justify-content: space-between; }
.material-detail-head strong { font-size: 15px; }
.material-detail-head button { position: relative; width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; border: 0; border-radius: 50%; color: var(--muted); background: #eef2f0; appearance: none; -webkit-appearance: none; font-size: 0; line-height: 0; cursor: pointer; }
.material-detail-head button::before,
.material-detail-head button::after,
.capture-remove::before,
.capture-remove::after,
.admin-preview-backdrop > section > button::before,
.admin-preview-backdrop > section > button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--close-mark-size, 13px);
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}
.material-detail-head button::before,
.capture-remove::before,
.admin-preview-backdrop > section > button::before { transform: translate(-50%, -50%) rotate(45deg); }
.material-detail-head button::after,
.capture-remove::after,
.admin-preview-backdrop > section > button::after { transform: translate(-50%, -50%) rotate(-45deg); }
.capture-remove { --close-mark-size: 11px; }
.admin-preview-backdrop > section > button { --close-mark-size: 14px; }
.material-detail-photo { min-height: 210px; display: grid; place-items: center; overflow: hidden; border-radius: 16px; background: #eef3f1; }
.material-detail-photo img { width: 100%; height: 240px; display: block; object-fit: contain; background: white; }
.material-detail-photo .component-swatch { width: min(240px, 72vw); height: min(240px, 72vw); }
.material-detail-copy { display: grid; gap: 9px; }
.material-detail-copy h3 { margin: 0; font-size: 18px; }
.material-detail-copy dl { margin: 0; display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.material-detail-copy dl > div { padding: 10px; display: grid; gap: 3px; border-radius: 12px; background: #f0f4f2; }
.material-detail-copy dt { color: var(--muted); font-size: 9px; }
.material-detail-copy dd { margin: 0; font-size: 13px; font-weight: 750; }
.material-detail-add { min-height: 48px; border: 0; border-radius: 14px; color: white; background: var(--runtime-accent); font-size: 14px; font-weight: 750; cursor: pointer; }

.stage-note {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
  letter-spacing: 0.03em;
}

.stage-note strong {
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
}

.stage-note.right {
  text-align: right;
}

.selected-editor {
  min-width: 210px;
  min-height: 54px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(23, 35, 31, 0.11);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 35px rgba(31, 51, 44, 0.1);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.selected-editor-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.selected-editor-copy span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.selected-editor-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
}

.editor-actions {
  display: flex;
  gap: 4px;
}

.mini-button {
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.mini-button:hover {
  background: white;
}

.mini-button.danger {
  color: var(--danger);
}

.mini-button svg {
  width: 15px;
  height: 15px;
  display: block;
  margin: 0;
}

.summary-scroll {
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 16px;
  overflow: auto;
}

.summary-block {
  display: grid;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--soft-line);
}

.block-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.template-strip {
  display: grid;
  gap: 7px;
}

.template-button {
  padding: 11px 12px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.54);
  cursor: pointer;
  text-align: left;
}

.template-button:hover {
  border-color: var(--runtime-accent);
}

.template-button strong {
  font-size: 11px;
  font-weight: 600;
}

.template-button span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.ai-box {
  display: grid;
  gap: 8px;
}

.native-sheet-heading {
  display: grid;
  gap: 3px;
}

.native-sheet-heading > span {
  color: var(--runtime-accent);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.native-sheet-heading > strong {
  font-size: 15px;
  line-height: 1.2;
}

.native-mode-tabs {
  padding: 3px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  border-radius: 12px;
  background: rgba(23, 35, 31, .055);
}

.native-mode-tabs button {
  min-width: 0;
  min-height: 34px;
  padding: 0 6px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
}

.native-mode-tabs button.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 3px 10px rgba(27, 45, 39, .08);
}

.native-prompt-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.native-prompt-chips::-webkit-scrollbar { display: none; }

.native-prompt-chips button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  color: #42534d;
  background: rgba(255, 255, 255, .76);
  cursor: pointer;
  font-size: 8px;
  white-space: nowrap;
}

.native-composer {
  overflow: hidden;
  border: 1px solid rgba(23, 35, 31, .13);
  border-radius: 16px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 8px 24px rgba(29, 49, 42, .06);
}

.native-composer .ai-input {
  width: 100%;
  min-height: 88px;
  padding: 11px 12px 6px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  resize: none;
}

.native-composer-bar {
  min-height: 48px;
  padding: 6px 7px 7px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--soft-line);
}

.native-composer-bar > span {
  color: var(--muted);
  font-size: 7px;
}

.native-composer-bar .intent-actions {
  display: flex;
  gap: 6px;
}

.intent-field {
  display: grid;
  gap: 5px;
}

.intent-field > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.intent-field select {
  width: 100%;
  min-height: 40px;
  padding: 0 34px 0 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: rgba(255,255,255,.72);
  font-size: 10px;
}

.prompt-guide {
  padding: 10px 11px;
  display: grid;
  gap: 4px;
  border-left: 3px solid var(--runtime-accent);
  border-radius: 0 10px 10px 0;
  background: color-mix(in srgb, var(--runtime-accent), white 94%);
}

.prompt-guide strong {
  font-size: 10px;
  font-weight: 700;
}

.prompt-guide span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.ai-input {
  min-height: 112px;
  padding: 11px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  line-height: 1.55;
}

.intent-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px;
}

.voice-button {
  min-height: 44px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255,255,255,.7);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.voice-button.listening {
  border-color: var(--runtime-accent);
  color: var(--runtime-accent);
  background: var(--accent-soft);
  animation: voice-pulse 1.2s ease-in-out infinite;
}

.intent-generate {
  gap: 7px;
  padding: 0 12px;
}

.mobile-wrist-stepper,
.mobile-cart-section { display: none; }

.recommendation-card {
  padding: 14px;
  display: grid;
  gap: 11px;
  border: 1px solid color-mix(in srgb, var(--runtime-accent), transparent 70%);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--runtime-accent), transparent 88%), transparent 42%),
    rgba(255,255,255,.78);
  box-shadow: 0 12px 34px rgba(31,51,44,.08);
}

.recommendation-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.recommendation-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: white;
  background: var(--runtime-accent);
}

.recommendation-head > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.recommendation-head span:not(.recommendation-mark) {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.recommendation-head strong {
  font-family: "Bodoni Moda", serif;
  font-size: 16px;
  line-height: 1.12;
}

.recommendation-card > p {
  margin: 0;
  color: var(--ink);
  font-size: 10px;
  line-height: 1.65;
}

.recommendation-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.recommendation-tags span {
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--runtime-accent);
  background: var(--accent-soft);
  font-size: 8px;
  font-weight: 700;
}

.recommendation-card details {
  border-top: 1px solid var(--soft-line);
  padding-top: 10px;
}

.recommendation-card summary {
  color: var(--runtime-accent);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

.reason-list {
  padding-top: 10px;
  display: grid;
  gap: 8px;
}

.reason-row {
  display: grid;
  gap: 2px;
}

.reason-row strong {
  font-size: 9px;
}

.reason-row span,
.recommendation-card small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.55;
}

.modal-intent {
  padding: 12px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: rgba(255,255,255,.55);
}

.modal-intent > span {
  color: var(--runtime-accent);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.modal-intent strong {
  font-size: 11px;
}

.modal-intent p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.secondary-button:disabled,
.mini-button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.primary-button {
  border: 0;
  color: white;
  background: var(--runtime-accent);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--runtime-accent), transparent 75%);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px color-mix(in srgb, var(--runtime-accent), transparent 68%);
}

.primary-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
}

.secondary-button:hover,
.ghost-button:hover {
  background: white;
}

.ghost-button {
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
}

.slider-line {
  display: grid;
  gap: 7px;
}

.bead-count-line {
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(35, 107, 90, 0.16);
  border-radius: 14px;
  background: rgba(35, 107, 90, 0.055);
}

.bead-count-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.bead-count-copy strong {
  font-size: 11px;
  font-weight: 650;
}

.bead-count-copy span {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.bead-stepper {
  flex: 0 0 auto;
  min-height: 38px;
  display: grid;
  grid-template-columns: 34px minmax(50px, auto) 34px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(23, 35, 31, 0.12);
  border-radius: 11px;
  background: white;
}

.bead-stepper button {
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 0;
  color: var(--runtime-accent);
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.bead-stepper button:hover:not(:disabled) {
  background: rgba(35, 107, 90, 0.08);
}

.bead-stepper button:disabled {
  color: rgba(23, 35, 31, 0.2);
  cursor: not-allowed;
}

.bead-stepper output {
  padding: 0 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-left: 1px solid var(--soft-line);
  border-right: 1px solid var(--soft-line);
  font-variant-numeric: tabular-nums;
}

.bead-stepper output strong {
  font-size: 14px;
  line-height: 1;
}

.bead-stepper output span {
  color: var(--muted);
  font-size: 8px;
  line-height: 1;
}

.clear-design-button:not(:disabled) { color: var(--danger); }
.clear-design-mobile {
  min-height: 42px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(162,77,69,.2);
  border-radius: 13px;
  color: var(--danger);
  background: rgba(162,77,69,.05);
  font-size: 10px;
  font-weight: 700;
}
.clear-design-mobile:disabled { opacity: .38; }

.slider-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.slider-top strong {
  font-size: 12px;
  font-weight: 600;
}

.slider-top span {
  color: var(--muted);
  font-size: 9px;
}

.wrist-number {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
}

.wrist-number input {
  width: 54px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.slider-helper {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.range-input {
  width: 100%;
  accent-color: var(--runtime-accent);
}

.wrist-guide {
  border: 1px solid color-mix(in srgb, var(--runtime-accent), transparent 78%);
  border-radius: 13px;
  background: color-mix(in srgb, var(--runtime-accent), white 94%);
  overflow: hidden;
}

.wrist-guide-trigger {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.wrist-guide-trigger span:first-child {
  display: grid;
  gap: 2px;
}

.wrist-guide-trigger strong {
  font-size: 10px;
  font-weight: 700;
}

.wrist-guide-trigger small {
  color: var(--runtime-accent);
  font-size: 8px;
  font-weight: 650;
}

.wrist-guide-trigger > span:last-child {
  color: var(--runtime-accent);
  font-size: 17px;
}

.wrist-guide-body {
  padding: 0 10px 10px;
  display: grid;
  gap: 9px;
  border-top: 1px solid color-mix(in srgb, var(--runtime-accent), transparent 86%);
}

.wrist-method-tabs {
  margin-top: 9px;
  padding: 3px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
}

.wrist-method-tabs button {
  min-height: 31px;
  padding: 4px 6px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 7px;
  font-weight: 650;
}

.wrist-method-tabs button.active {
  color: white;
  background: var(--runtime-accent);
  box-shadow: 0 4px 10px color-mix(in srgb, var(--runtime-accent), transparent 72%);
}

.wrist-estimate-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.wrist-estimate-fields label,
.wrist-measure-fields label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 8px;
}

.wrist-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.wrist-input input {
  min-width: 0;
  width: 100%;
  height: 29px;
  padding: 0 4px 0 8px;
  border: 0;
  outline: none;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.wrist-input em {
  padding-right: 7px;
  color: var(--muted);
  font-size: 7px;
  font-style: normal;
}

.wrist-estimate-fields p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.5;
}

.wrist-measure-fields {
  display: grid;
  gap: 8px;
}

.wrist-measure-fields ol {
  margin: 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.5;
}

.wrist-result {
  display: grid;
  grid-template-columns: 1.25fr .7fr 1fr;
  gap: 5px;
}

.wrist-result > span {
  min-width: 0;
  padding: 7px;
  display: grid;
  gap: 2px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.wrist-result small {
  color: var(--muted);
  font-size: 6px;
}

.wrist-result strong {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.wrist-result-note {
  margin: 0;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.45;
}

.wrist-apply {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  color: white;
  background: var(--runtime-accent);
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
}

.segmented {
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  border-radius: 12px;
  background: rgba(23, 35, 31, 0.055);
}

.segmented button {
  min-height: 32px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 600;
}

.segmented button.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 2px 9px rgba(30, 47, 41, 0.08);
}

.bracelet-size-options button {
  min-height: 48px;
  display: grid;
  place-content: center;
  gap: 2px;
}

.bracelet-size-options button strong { font-size: 10px; }
.bracelet-size-options button small { font-size: 8px; font-weight: 500; opacity: .72; }

.mobile-builder-toolbar { display: none; }

.fit-meter {
  display: grid;
  gap: 7px;
}

.fit-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 35, 31, 0.08);
}

.fit-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--runtime-accent);
  transition: width 240ms ease, background 240ms ease;
}

.fit-fill.warning {
  background: #b67d44;
}

.fit-copy {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
}

.totals {
  display: grid;
  gap: 8px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
}

.total-row strong {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.total-row.grand {
  padding-top: 8px;
  border-top: 1px solid var(--soft-line);
  align-items: baseline;
}

.total-row.grand span {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.total-row.grand strong {
  font-family: "Bodoni Moda", serif;
  font-size: 28px;
  font-weight: 600;
}

.summary-footer {
  margin-top: auto;
  padding: 14px 18px 18px;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--soft-line);
  background: rgba(250, 252, 251, 0.84);
}

.footer-note {
  margin: 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
  text-align: center;
}

.intake-page {
  min-height: calc(100vh - 72px);
  padding: 28px;
  display: grid;
  align-content: start;
  gap: 22px;
}

.intake-ops-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.intake-ops-nav a {
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
}

.intake-ops-nav a:first-child,
.intake-ops-nav a.has-pending {
  color: white;
  border-color: var(--runtime-accent);
  background: var(--runtime-accent);
}

.intake-type-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.intake-type-switch button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.64);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.intake-type-switch button.active {
  color: white;
  border-color: var(--runtime-accent);
  background: var(--runtime-accent);
}

.accessory-capture-note,
.ai-detection-note {
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--runtime-accent), transparent 80%);
  border-radius: 11px;
  color: var(--muted);
  background: color-mix(in srgb, var(--runtime-accent), transparent 95%);
  font-size: 9px;
  line-height: 1.55;
}

.intake-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.intake-heading {
  max-width: 720px;
  display: grid;
  gap: 8px;
}

.intake-heading h1 {
  margin: 0;
  font-family: "Bodoni Moda", serif;
  font-size: clamp(38px, 5vw, 70px);
  line-height: 0.95;
  font-weight: 500;
  letter-spacing: -0.045em;
}

.intake-heading p {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.throughput-card {
  min-width: 210px;
  padding: 16px 18px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.throughput-card strong {
  font-family: "Bodoni Moda", serif;
  font-size: 30px;
  font-weight: 600;
}

.throughput-card span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.intake-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.intake-card {
  min-width: 0;
  padding: 22px;
  display: grid;
  align-content: start;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
}

.review-pool-card {
  scroll-margin-top: 90px;
}

.review-count {
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--runtime-accent);
  font-size: 11px;
  font-weight: 800;
}

.review-pool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.review-pool-item {
  min-width: 0;
  padding: 10px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 16px;
  background: rgba(247, 250, 249, 0.82);
}

.review-model {
  height: 170px;
  overflow: hidden;
  border-radius: 12px;
  background: #eaf0ee;
}

.review-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.review-copy span,
.review-copy small {
  color: var(--muted);
  font-size: 8px;
}

.review-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.review-actions {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: 7px;
}

.review-actions button {
  min-width: 0;
  min-height: 38px;
  padding: 0 9px;
  font-size: 9px;
}

.review-empty {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  color: var(--runtime-accent);
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: rgba(247, 250, 249, 0.64);
}

.review-empty div {
  display: grid;
  gap: 4px;
}

.review-empty strong { font-size: 10px; }
.review-empty span { color: var(--muted); font-size: 9px; }

.intake-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.intake-card-head h2 {
  margin: 0;
  font-family: "Bodoni Moda", serif;
  font-size: 25px;
  font-weight: 600;
}

.step-index {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--runtime-accent);
  font-size: 10px;
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.field textarea.optical-note {
  min-height: 84px;
  padding: 11px 12px;
  resize: vertical;
  line-height: 1.55;
}

.optical-video-upload {
  min-height: 132px;
}

.optical-video-card {
  width: 100%;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.optical-video-card video {
  width: 132px;
  height: 112px;
  object-fit: cover;
  border-radius: 12px;
  background: #17201e;
}

.optical-video-card > div {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.optical-video-card strong,
.optical-video-card span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.optical-video-card strong {
  font-size: 10px;
  white-space: nowrap;
}

.optical-video-card span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.optical-video-card button {
  width: max-content;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 8px;
}

.optical-confirm {
  margin-top: 10px;
  padding: 11px 12px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid color-mix(in srgb, var(--runtime-accent), transparent 80%);
  border-radius: 11px;
  color: var(--muted);
  background: color-mix(in srgb, var(--runtime-accent), transparent 96%);
  font-size: 9px;
  line-height: 1.55;
}

.optical-confirm input {
  margin-top: 2px;
  accent-color: var(--runtime-accent);
}

.field input[type="color"] {
  padding: 5px;
}

.capture-standard {
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid var(--soft-line);
}

.capture-standard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.capture-standard-head h3 {
  margin: 2px 0 0;
  font-family: "Bodoni Moda", serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.capture-badge {
  min-height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--runtime-accent), transparent 72%);
  border-radius: 999px;
  color: var(--runtime-accent);
  background: color-mix(in srgb, var(--runtime-accent), transparent 92%);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.capture-rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.capture-rules div {
  min-height: 86px;
  padding: 11px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: rgba(246, 248, 247, 0.72);
}

.capture-rules strong {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--runtime-accent);
  font-size: 9px;
}

.capture-rules span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.capture-rules .capture-hole-rule {
  border-color: color-mix(in srgb, var(--runtime-accent), transparent 55%);
  background: color-mix(in srgb, var(--runtime-accent), white 94%);
}

.upload-zone {
  min-height: 142px;
  padding: 18px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(23, 35, 31, 0.27);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(232, 239, 237, 0.48);
  cursor: pointer;
  text-align: center;
}

.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-copy {
  display: grid;
  justify-items: center;
  gap: 8px;
  font-size: 10px;
  line-height: 1.5;
}

.upload-copy svg {
  width: 24px;
  height: 24px;
  color: var(--runtime-accent);
}

.upload-preview {
  width: 100%;
  height: 118px;
  object-fit: cover;
  border-radius: 11px;
}

.capture-upload {
  min-height: 178px;
  padding: 12px;
  text-transform: none;
}

.capture-group-label {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.capture-group-label strong {
  font-size: 11px;
  letter-spacing: 0.03em;
}

.capture-group-label span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.reference-upload {
  min-height: 154px;
  border-color: color-mix(in srgb, var(--runtime-accent), transparent 60%);
  background: color-mix(in srgb, var(--runtime-accent), white 97%);
}

.capture-uploaded-strip {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.capture-uploaded-strip.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.capture-shot {
  position: relative;
  min-width: 0;
  min-height: 142px;
  padding: 7px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 6px;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.capture-shot.pass {
  border-color: color-mix(in srgb, var(--runtime-accent), transparent 48%);
}

.capture-shot.selected {
  border-color: var(--runtime-accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--runtime-accent), transparent 45%);
  background: color-mix(in srgb, var(--runtime-accent), white 94%);
}

.capture-shot.fail {
  border-color: rgba(172, 70, 62, 0.55);
  background: rgba(172, 70, 62, 0.045);
}

.capture-shot img,
.shot-empty {
  width: 100%;
  height: 106px;
  display: grid;
  place-items: center;
  object-fit: contain;
  border-radius: 8px;
  color: var(--muted);
  background:
    linear-gradient(45deg, rgba(23, 35, 31, 0.035) 25%, transparent 25% 75%, rgba(23, 35, 31, 0.035) 75%),
    linear-gradient(45deg, rgba(23, 35, 31, 0.035) 25%, rgba(255, 255, 255, 0.74) 25% 75%, rgba(23, 35, 31, 0.035) 75%);
  background-position: 0 0, 6px 6px;
  background-size: 12px 12px;
}

.capture-shot small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}

.capture-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(23, 35, 31, 0.14);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  appearance: none;
  -webkit-appearance: none;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
}

.capture-add {
  min-height: 142px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 1px dashed color-mix(in srgb, var(--runtime-accent), transparent 55%);
  border-radius: 12px;
  color: var(--runtime-accent);
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.capture-add span {
  font-size: 24px;
  line-height: 1;
}

.capture-add small {
  font-size: 8px;
  font-weight: 700;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.form-actions button {
  min-width: 126px;
  padding: 0 16px;
}

.analysis-panel {
  display: grid;
  gap: 18px;
}

.asset-preview {
  min-height: 220px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--soft-line);
  border-radius: 18px;
  background:
    repeating-radial-gradient(circle at center, transparent 0 39px, rgba(23, 35, 31, 0.045) 40px 41px),
    #edf3f1;
}

.asset-preview .component-swatch {
  width: 112px;
  height: 112px;
  box-shadow:
    inset -18px -18px 28px rgba(23, 35, 31, 0.24),
    inset 20px 20px 32px rgba(255, 255, 255, 0.78),
    0 28px 38px rgba(23, 35, 31, 0.18);
}

.asset-preview .component-swatch.spacer {
  height: 38px;
}

.intake-reference-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intake-webgl-mount,
.intake-webgl-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.intake-reference-thumb {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 58px;
  height: 58px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.84);
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(23, 35, 31, 0.2);
}

.intake-evidence-tray {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 6px;
}

.intake-evidence-tray figure {
  width: 60px;
  margin: 0;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 7px 16px rgba(23, 35, 31, 0.15);
}

.intake-evidence-tray img {
  width: 52px;
  height: 42px;
  display: block;
  object-fit: contain;
  border-radius: 7px;
  background: #eef2f0;
}

.intake-evidence-tray figcaption {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.validator-page {
  min-height: 100vh;
  padding: 40px;
  color: var(--ink);
  background: radial-gradient(circle at 18% 10%, rgba(117, 84, 161, 0.11), transparent 32%), radial-gradient(circle at 84% 14%, rgba(117, 160, 153, 0.14), transparent 30%), #edf3f1;
}

.validator-hero { max-width: 920px; margin: 0 auto 28px; text-align: center; }
.validator-hero > span { color: var(--runtime-accent); font-size: 11px; font-weight: 800; letter-spacing: 0.14em; }
.validator-hero h1 { margin: 10px 0; font-family: "Bodoni Moda", serif; font-size: clamp(34px, 5vw, 64px); font-weight: 500; }
.validator-hero p { margin: 0 auto; max-width: 720px; color: var(--muted); line-height: 1.8; }
.validator-grid { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.validator-card { padding: 20px; border: 1px solid rgba(23,35,31,.1); border-radius: 28px; background: rgba(255,255,255,.78); box-shadow: 0 24px 70px rgba(23,35,31,.1); }
.validator-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.validator-card-head span { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.validator-card-head h2 { margin: 5px 0 14px; font-family: "Bodoni Moda", serif; font-size: 28px; font-weight: 500; }
.validator-card-head > strong { padding: 8px 11px; border-radius: 999px; color: var(--runtime-accent); background: rgba(35,107,90,.08); font-size: 12px; }
.validator-stage { height: 480px; overflow: hidden; border-radius: 22px; background: #eaf1ef; }
.validator-stage .bracelet-webgl-mount { width: 100%; height: 100%; }
.validator-evidence { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.validator-evidence.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.validator-evidence figure { margin: 0; padding: 7px; border: 1px solid var(--soft-line); border-radius: 14px; background: rgba(255,255,255,.76); }
.validator-evidence img { width: 100%; height: 76px; display: block; object-fit: contain; border-radius: 9px; background: #eef2f0; }
.validator-evidence figcaption { margin-top: 5px; color: var(--muted); font-size: 8px; font-weight: 700; text-align: center; }
.validator-checks { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.validator-checks span { padding: 7px 9px; border-radius: 999px; color: var(--runtime-accent); background: rgba(35,107,90,.07); font-size: 8px; font-weight: 700; }
.validator-source { display: inline-block; margin-top: 11px; color: var(--runtime-accent); font-size: 10px; font-weight: 750; text-decoration: none; }
.validator-source + .validator-source { margin-left: 12px; }
.validator-source.muted { color: var(--muted); }
.validator-summary { width: max-content; margin: 18px auto 0; display: flex; align-items: baseline; gap: 8px; padding: 9px 14px; border: 1px solid rgba(35,107,90,.12); border-radius: 999px; background: rgba(255,255,255,.72); }
.validator-summary strong { color: var(--runtime-accent); font-size: 24px; }
.validator-summary span { color: var(--muted); font-size: 11px; }
.validator-loading, .validator-error { max-width: 620px; margin: 100px auto; padding: 30px; border-radius: 20px; background: white; text-align: center; }
.validator-error { display: grid; justify-items: center; gap: 12px; color: var(--ink); }
.validator-error span { color: var(--muted); line-height: 1.6; }
.validator-error a, .validator-error button { padding: 10px 16px; border: 0; border-radius: 999px; color: white; background: var(--runtime-accent, var(--accent)); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
@media (max-width: 900px) { .validator-page { padding: 22px 14px; } .validator-grid { grid-template-columns: 1fr; } .validator-stage { height: 380px; } }

.validator-hero.compact { max-width: 1060px; margin-bottom: 20px; }
.validator-hero.compact h1 { font-size: clamp(30px, 4vw, 52px); }
.validator-workbench { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.validator-picker { position: sticky; top: 18px; max-height: calc(100vh - 36px); padding: 14px; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; border: 1px solid rgba(23,35,31,.1); border-radius: 24px; background: rgba(255,255,255,.82); box-shadow: 0 24px 70px rgba(23,35,31,.08); }
.validator-picker-head { display: grid; gap: 10px; padding: 4px 4px 12px; }
.validator-picker-head > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.validator-picker-head span { color: var(--muted); font-size: 10px; }
.validator-picker-head strong { color: var(--runtime-accent); font-size: 12px; }
.validator-picker-head input { width: 100%; padding: 10px 12px; border: 1px solid var(--soft-line); border-radius: 12px; background: rgba(242,247,245,.9); font: inherit; font-size: 11px; outline: none; }
.validator-material-list { display: grid; gap: 5px; overflow: auto; padding-right: 3px; }
.validator-material-list button { width: 100%; padding: 7px; display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 9px; align-items: center; border: 1px solid transparent; border-radius: 13px; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.validator-material-list button:hover, .validator-material-list button.active { border-color: rgba(35,107,90,.2); background: rgba(35,107,90,.075); }
.validator-material-list img { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; background: #edf2f0; }
.validator-material-list span { min-width: 0; display: grid; gap: 2px; }
.validator-material-list strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.validator-material-list small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.validator-material-list em { padding: 4px 6px; border-radius: 999px; color: var(--runtime-accent); background: rgba(35,107,90,.08); font-size: 8px; font-style: normal; }
.validator-card.validator-focus { padding: 20px; }
.validator-focus .validator-stage { height: min(58vw, 620px); min-height: 480px; }
.validator-nav { margin-top: 10px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; align-items: center; }
.validator-nav button { padding: 8px 12px; border: 1px solid var(--soft-line); border-radius: 999px; color: var(--runtime-accent); background: white; cursor: pointer; }
.validator-nav span { color: var(--muted); font-size: 10px; text-align: center; }
.validator-audit-views { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.validator-audit-views button.active { color: white; border-color: var(--runtime-accent); background: var(--runtime-accent); }
.validator-capture-mode { box-sizing: border-box; width: 100vw; min-height: 100vh; padding: 18px; display: grid; grid-template-rows: auto 1fr; gap: 12px; background: #edf3f1; }
.validator-capture-mode header { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.84); }
.validator-capture-mode header strong { font-size: 16px; }
.validator-capture-mode header span { color: var(--muted); font-size: 12px; }
.validator-capture-stage { min-height: 0; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: #f6f3fb; box-shadow: var(--shadow); }
.validator-capture-stage .bracelet-canvas { width: 100%; height: 100%; min-height: 0; }
.validator-focus .validator-evidence img { height: 160px; }
.validator-description { margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.advanced-fields { border-top: 1px solid var(--soft-line); padding-top: 10px; }
.advanced-fields summary { color: var(--runtime-accent); font-size: 10px; font-weight: 700; cursor: pointer; }
.ai-detection-note { margin: 10px 0; padding: 9px 10px; border-radius: 10px; color: var(--muted); background: rgba(35,107,90,.06); font-size: 9px; line-height: 1.55; }
.form-grid.compact { margin-top: 10px; }
@media (max-width: 900px) { .validator-workbench { grid-template-columns: 1fr; } .validator-picker { position: static; max-height: 350px; } .validator-focus .validator-stage { min-height: 360px; height: 70vw; } }

.asset-label {
  position: absolute;
  left: 14px;
  bottom: 12px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.analysis-list {
  display: grid;
  gap: 8px;
}

.analysis-item {
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--soft-line);
  font-size: 10px;
}

.analysis-item span {
  color: var(--muted);
}

.analysis-item strong {
  font-weight: 600;
}

.confidence {
  color: var(--runtime-accent);
}

.capture-issues {
  display: grid;
  gap: 6px;
}

.capture-issues span {
  min-height: 30px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  border-radius: 9px;
  font-size: 8px;
  line-height: 1.35;
}

.capture-issues .warn {
  color: #73581d;
  background: rgba(190, 145, 46, 0.12);
}

.capture-issues .fail {
  color: #873b35;
  background: rgba(172, 70, 62, 0.1);
}

.publish-ready {
  padding: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--runtime-accent), transparent 72%);
  border-radius: 12px;
  color: var(--runtime-accent);
  background: color-mix(in srgb, var(--runtime-accent), transparent 93%);
}

.publish-ready div {
  display: grid;
  gap: 4px;
}

.publish-ready strong {
  font-size: 10px;
}

.publish-ready span {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.queue-card {
  grid-column: 1 / -1;
}

.queue-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.queue-table th,
.queue-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--soft-line);
  text-align: left;
  font-size: 10px;
}

.queue-table th {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.queue-table td {
  color: var(--ink);
}

.queue-table td:first-child {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.queue-status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--runtime-accent);
  background: color-mix(in srgb, var(--runtime-accent), transparent 88%);
  font-size: 8px;
  font-weight: 700;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(16, 27, 23, 0.48);
  backdrop-filter: blur(18px);
  animation: fade-in 180ms ease both;
}

.modal {
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 26px;
  background: #f7f9f8;
  box-shadow: 0 34px 100px rgba(8, 18, 14, 0.35);
  animation: modal-up 260ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.modal-preview {
  min-height: 570px;
  padding: 24px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at center, white 0 14%, rgba(255, 255, 255, 0.56) 38%, transparent 65%),
    repeating-radial-gradient(circle at center, transparent 0 72px, rgba(23, 35, 31, 0.045) 73px 74px),
    #dfe9e6;
}

.modal-preview img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  filter: drop-shadow(0 25px 28px rgba(29, 49, 42, 0.13));
}

.modal-preview-label {
  position: absolute;
  left: 20px;
  top: 18px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.modal-content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.modal-title-row h2 {
  margin: 4px 0 0;
  font-family: "Bodoni Moda", serif;
  font-size: 34px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.modal-close {
  flex: 0 0 auto;
}

.design-id {
  padding: 9px 10px;
  border: 1px solid var(--soft-line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(232, 239, 237, 0.55);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  overflow-wrap: anywhere;
}

.checkout-title-copy {
  min-width: 0;
}

.design-id-under-title {
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
}

.action-loading-backdrop {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--deep-cocoa);
  background: rgba(92, 71, 65, .26);
  backdrop-filter: blur(9px) saturate(112%);
  -webkit-backdrop-filter: blur(9px) saturate(112%);
}

.action-loading-card {
  width: min(330px, calc(100vw - 40px));
  padding: 26px 24px 24px;
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 1px solid var(--soft-border);
  border-radius: 22px;
  background: var(--warm-ivory);
  box-shadow: 0 24px 70px rgba(92, 71, 65, .24);
  text-align: center;
}

.action-loading-card > strong {
  color: var(--logo-cocoa);
  font: 600 24px/1.1 "Bodoni Moda", serif;
}

.action-loading-card > span:last-child {
  max-width: 270px;
  color: var(--deep-cocoa);
  font-size: 11px;
  line-height: 1.55;
}

.action-loading-orbit {
  width: 74px;
  height: 74px;
  position: relative;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}

.action-loading-orbit::before,
.action-loading-orbit::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--logo-cocoa), transparent 62%);
  animation: action-loading-ring 1.65s ease-out infinite;
}

.action-loading-orbit::after {
  inset: 12px;
  animation-delay: .55s;
}

.action-loading-logo {
  width: 42px;
  height: 42px;
  border-color: var(--logo-cocoa);
  animation: action-loading-logo 1.15s ease-in-out infinite;
}

.action-loading-logo::before {
  width: 9px;
  height: 9px;
  top: 4px;
  left: 16px;
}

.action-loading-logo::after {
  width: 7px;
  height: 7px;
  right: 5px;
  bottom: 6px;
}

@keyframes action-loading-logo {
  0%, 100% { transform: rotate(0deg) scale(.96); }
  50% { transform: rotate(180deg) scale(1.05); }
}

@keyframes action-loading-ring {
  0% { opacity: 0; transform: scale(.62); }
  35% { opacity: .72; }
  100% { opacity: 0; transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .action-loading-logo,
  .action-loading-orbit::before,
  .action-loading-orbit::after {
    animation-duration: 2.8s;
  }
}

.bom-list {
  max-height: 180px;
  display: grid;
  overflow: auto;
  border-top: 1px solid var(--soft-line);
}

.bom-row {
  padding: 10px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  border-bottom: 1px solid var(--soft-line);
  font-size: 9px;
}

.bom-row span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bom-row span:not(:first-child) {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.modal-actions {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.download-guide {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.payload-box {
  max-height: 260px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  color: #d7e7e2;
  background: #17231f;
  font: 9px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
}

.success-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--runtime-accent);
}

.success-mark svg {
  width: 24px;
  height: 24px;
}

.toast-stack {
  position: fixed;
  right: 18px;
  top: 88px;
  z-index: 120;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 280px;
  max-width: 360px;
  padding: 13px 14px;
  display: grid;
  gap: 3px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 13px;
  color: var(--ink);
  background: rgba(250, 252, 251, 0.9);
  box-shadow: 0 16px 38px rgba(27, 45, 39, 0.17);
  backdrop-filter: blur(16px);
  animation: toast-in 220ms ease both;
}

.toast strong {
  font-size: 10px;
}

.toast span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.empty-state {
  padding: 28px 14px;
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
}

.empty-state svg {
  width: 26px;
  height: 26px;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-up {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--runtime-accent), transparent 80%); }
  50% { box-shadow: 0 0 0 5px transparent; }
}

@media (max-width: 1120px) {
  .builder-layout {
    grid-template-columns: 286px minmax(400px, 1fr) 304px;
  }

  .catalog-scroll {
    grid-template-columns: 1fr;
  }

  .status-pill {
    display: none;
  }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr auto;
    height: auto;
    min-height: 66px;
    padding: 11px 14px;
  }

  .brand-sub,
  .top-actions .status-pill {
    display: none;
  }

  .view-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }

  .tab-button {
    flex: 1;
  }

  .top-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .builder-layout {
    height: auto;
    min-height: calc(100vh - 116px);
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .stage-panel {
    min-height: 550px;
    order: 1;
  }

  .catalog-panel {
    min-height: 520px;
    order: 2;
  }

  .summary-panel {
    min-height: 620px;
    order: 3;
  }

  .catalog-scroll {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stage-top {
    flex-direction: column;
  }

  .stage-bottom {
    grid-template-columns: 1fr;
  }

  .stage-note {
    display: none;
  }

  .selected-editor {
    justify-self: center;
  }

  .intake-page {
    padding: 18px 14px;
  }

  .intake-hero,
  .intake-card-head {
    align-items: flex-start;
  }

  .intake-grid {
    grid-template-columns: 1fr;
  }

  .review-pool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .queue-card {
    grid-column: auto;
    overflow-x: auto;
  }

  .queue-table {
    min-width: 680px;
  }

  .modal {
    grid-template-columns: 1fr;
  }

  .modal-preview {
    min-height: 360px;
  }
}

@media (max-width: 620px) {
  .brand-name {
    font-size: 11px;
  }

  .language-button {
    min-width: 42px;
    padding: 0 9px;
  }

  .ops-entry {
    min-height: 34px;
    padding: 0 10px;
    font-size: 9px;
  }

  .intake-hero {
    display: grid;
  }

  .throughput-card {
    width: 100%;
  }

  .intake-ops-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .intake-ops-nav a {
    padding: 0 7px;
    justify-content: center;
    text-align: center;
    font-size: 8px;
  }

  .review-pool-grid {
    grid-template-columns: 1fr;
  }

  .review-model {
    height: 210px;
  }

  .catalog-scroll {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .stage-panel {
    min-height: 500px;
  }

  .stage-title h1 {
    font-size: 31px;
  }

  .view-controls {
    align-self: flex-end;
  }

  .view-button {
    padding: 0 8px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field.full {
    grid-column: auto;
  }

  .capture-standard-head {
    display: grid;
  }

  .capture-badge {
    justify-self: start;
  }

  .capture-rules {
    grid-template-columns: 1fr;
  }

  .capture-rules div {
    min-height: 0;
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .capture-uploaded-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .capture-shot {
    min-height: 116px;
    padding: 4px;
  }

  .capture-shot img,
  .shot-empty {
    height: 82px;
  }

  .form-actions {
    display: grid;
  }

  .form-actions button {
    width: 100%;
  }

  .intake-hero {
    display: grid;
  }

  .throughput-card {
    min-width: 0;
  }

  .modal-backdrop {
    padding: 0;
    align-items: end;
  }

  .modal {
    max-height: 94vh;
    border-radius: 24px 24px 0 0;
  }

  .modal-content {
    padding: 22px;
  }

  .modal-preview {
    min-height: 300px;
  }

  .toast-stack {
    left: 12px;
    right: 12px;
    top: 118px;
  }

  .toast {
    min-width: 0;
    max-width: none;
  }
}

/* Mobile customer studio: the 3D bracelet remains visible while a compact
   bottom workspace switches between materials, fixed size and AI intent. */
@media (max-width: 900px) {
  html.orbit-studio-active,
  html.orbit-studio-active body,
  html.orbit-studio-active body #root {
    width: 100%;
    height: var(--orbit-viewport-height, 100dvh);
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .app[data-page="studio"] {
    width: 100%;
    height: var(--orbit-viewport-height, 100dvh);
    min-height: 0;
    display: grid;
    grid-template-rows: 54px minmax(0, 1fr);
    overflow: hidden;
  }

  .topbar {
    min-height: 54px;
    height: 54px;
    padding: 8px 12px;
    grid-template-columns: 1fr auto;
  }

  .app[data-page="studio"] .topbar {
    position: relative;
    top: auto;
    grid-row: 1;
  }

  .app[data-page="studio"] .brand-mark { width: 30px; height: 30px; }
  .app[data-page="studio"] .brand-name { font-size: 11px; letter-spacing: .1em; }
  .app[data-page="studio"] .brand-sub,
  .app[data-page="studio"] .status-pill,
  .app[data-page="studio"] .top-actions > .icon-button { display: none; }
  .app[data-page="studio"] .language-button { min-width: 40px; height: 34px; }

  .view-tabs { display: none; }
  .top-actions { grid-column: 2; grid-row: 1; }

  .builder-layout {
    position: relative;
    grid-row: 2;
    width: 100%;
    height: auto;
    min-height: 0;
    display: block;
    overflow: hidden;
    background: var(--panel);
    --mobile-toolbar-height: calc(58px + env(safe-area-inset-bottom));
    --mobile-drawer-height: calc(50% - var(--mobile-toolbar-height));
  }

  .app[data-mobile-panel="size"] .builder-layout,
  .app[data-mobile-panel="intent"] .builder-layout,
  .app[data-mobile-panel="cart"] .builder-layout { --mobile-drawer-height: calc(50% - var(--mobile-toolbar-height)); }

  .stage-panel {
    position: absolute;
    inset: 0 0 calc(var(--mobile-drawer-height) + var(--mobile-toolbar-height));
    z-index: 1;
    min-height: 0;
    border: 0;
  }

  .stage-panel:has(.bracelet-interaction-shell.is-component-dragging) {
    z-index: 520;
    overflow: visible;
  }

  .bracelet-interaction-shell.is-component-dragging { overflow: visible; }

  .bracelet-delete-mask {
    position: fixed;
    inset: calc(50% + 27px) 0 calc(58px + env(safe-area-inset-bottom));
    z-index: 500;
    padding: 0;
    place-items: center;
    background: rgba(239,244,242,.88);
    backdrop-filter: blur(10px);
  }

  .bracelet-delete-dock {
    min-width: 132px;
    min-height: 88px;
    padding: 14px 18px;
    flex-direction: column;
    border-radius: 22px;
  }

  .bracelet-delete-dock span { font-size: 11px; }

  .stage-top {
    top: 8px;
    left: 10px;
    right: 10px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
  }

  .stage-title { max-width: 48%; }
  .stage-title p { display: none; }
  .stage-title h1 {
    max-width: 160px;
    font-family: "Sora", sans-serif;
    font-size: 16px;
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -.025em;
  }
  .stage-count { top: 8px; right: 8px; }
  .stage-quick-actions {
    top: auto;
    left: 8px;
    bottom: 8px;
    gap: 4px;
  }
  .stage-quick-actions button {
    width: 34px;
    min-width: 34px;
    height: 30px;
    padding: 0;
  }
  .stage-quick-actions button span { display: none; }
  .view-controls { gap: 2px; padding: 3px; }
  .view-button { min-height: 28px; padding: 0 7px; font-size: 8px; }
  .stage-bottom { left: 8px; right: 8px; bottom: 8px; }
  .selected-editor { max-width: calc(100vw - 20px); padding: 8px 10px; }

  .catalog-panel,
  .summary-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: var(--mobile-toolbar-height);
    z-index: 12;
    height: var(--mobile-drawer-height);
    min-height: 0;
    max-height: none;
    border-radius: 18px 18px 0 0;
    border-top: 1px solid rgba(23,35,31,.12);
    box-shadow: 0 -12px 36px rgba(25,45,38,.12);
    background: rgba(249,252,251,.97);
    backdrop-filter: blur(20px);
    overscroll-behavior: contain;
    contain: layout paint;
  }

  .catalog-panel::before,
  .summary-panel::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 50%;
    z-index: 4;
    width: 34px;
    height: 3px;
    border-radius: 999px;
    background: rgba(74, 91, 85, .25);
    transform: translateX(-50%);
  }

  .app[data-mobile-panel="materials"] .summary-panel,
  .app[data-mobile-panel="size"] .catalog-panel,
  .app[data-mobile-panel="intent"] .catalog-panel,
  .app[data-mobile-panel="cart"] .catalog-panel { display: none; }

  .app[data-mobile-panel="size"] .summary-panel,
  .app[data-mobile-panel="intent"] .summary-panel,
  .app[data-mobile-panel="cart"] .summary-panel { display: flex; }

  .catalog-panel .panel-head {
    padding: 12px 10px 8px;
    gap: 7px;
  }
  .catalog-panel .eyebrow,
  .catalog-panel .material-source-note,
  .catalog-panel .material-proof { display: none; }
  .catalog-panel .search-field { min-height: 34px; }
  .catalog-panel .filter-row { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 1px; }
  .catalog-panel .filter-chip { min-height: 28px; }
  .catalog-toolbar { gap: 6px; }
  .catalog-search-toggle { width: 30px; height: 30px; flex-basis: 30px; }

  .catalog-body.with-color-menu { grid-template-columns: 64px minmax(0, 1fr); }
  .color-family-menu { padding: 8px 5px 12px; gap: 4px; }
  .color-family-menu button { min-height: 39px; padding: 0 3px; border-radius: 9px; font-size: 9px; }

  .catalog-scroll {
    padding: 8px 8px calc(12px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    overscroll-behavior: contain;
  }
  .component-card {
    min-height: 104px;
    padding: 7px;
    grid-template-rows: 48px auto auto;
    gap: 4px;
    border-radius: 12px;
    transition: none;
    -webkit-tap-highlight-color: transparent;
  }
  .component-card:hover,
  .component-card:active {
    transform: none;
    border-color: var(--soft-line);
    box-shadow: none;
  }
  .component-card.selected,
  .component-card.selected:hover,
  .component-card.selected:active { border-color: var(--runtime-accent); }
  .component-swatch-wrap { min-height: 48px; }
  .component-swatch { width: 46px; height: 46px; }
  .component-name { font-size: 10px; }
  .component-meta { font-size: 8px; }

  .summary-panel > .panel-head { display: none; }
  .summary-scroll { padding: 16px 12px 14px; gap: 10px; }
  .summary-footer { display: none; }
  .app[data-mobile-panel="size"] .mobile-intent-section,
  .app[data-mobile-panel="size"] .mobile-total-section,
  .app[data-mobile-panel="size"] .mobile-cart-section,
  .app[data-mobile-panel="intent"] .mobile-size-section,
  .app[data-mobile-panel="intent"] .mobile-total-section,
  .app[data-mobile-panel="intent"] .mobile-cart-section,
  .app[data-mobile-panel="cart"] .mobile-size-section,
  .app[data-mobile-panel="cart"] .mobile-intent-section,
  .app[data-mobile-panel="cart"] .mobile-total-section { display: none; }
  .app[data-mobile-panel="cart"] .mobile-cart-section { display: grid; }

  .summary-block { padding-bottom: 0; border-bottom: 0; }
  .native-sheet-heading > span { font-size: 8px; }
  .native-sheet-heading > strong { font-size: 18px; }
  .ai-box { gap: 10px; }
  .native-mode-tabs { position: sticky; top: 0; z-index: 3; }
  .native-mode-tabs button { min-height: 38px; font-size: 9px; }
  .native-prompt-chips { margin-inline: -12px; padding-inline: 12px; }
  .native-prompt-chips button { min-height: 34px; font-size: 9px; }
  .native-composer { border-radius: 18px; }
  .native-composer .ai-input { min-height: 92px; font-size: 13px; line-height: 1.5; }
  .native-composer-bar { min-height: 52px; }
  .native-composer-bar > span { font-size: 8px; }
  .native-composer-bar .intent-actions { display: flex; grid-template-columns: none; }
  .native-composer-bar .voice-button,
  .native-composer-bar .intent-generate {
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 50%;
  }
  .native-composer-bar .voice-button span,
  .native-composer-bar .intent-generate span { display: none; }
  .native-composer-bar .intent-generate { color: white; background: var(--runtime-accent); }
  .recommendation-card { border-radius: 18px; }

  .bead-count-line { min-height: 62px; padding: 10px 12px; border-radius: 16px; background: white; }
  .bead-stepper { min-height: 42px; grid-template-columns: 38px minmax(54px, auto) 38px; border-radius: 13px; }
  .clear-design-mobile { display: flex; }
  .slider-line { display: none; }
  .mobile-wrist-stepper {
    min-height: 62px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--soft-line);
    border-radius: 16px;
    background: white;
  }
  .mobile-wrist-stepper > div:first-child { display: grid; gap: 3px; }
  .mobile-wrist-stepper > div:first-child span { font-size: 11px; font-weight: 700; }
  .mobile-wrist-stepper > div:first-child small { color: var(--muted); font-size: 8px; }
  .mobile-wrist-stepper > div:last-child { height: 40px; display: grid; grid-template-columns: 34px minmax(66px, auto) 34px; align-items: center; overflow: hidden; border: 1px solid var(--soft-line); border-radius: 12px; }
  .mobile-wrist-stepper button { height: 100%; padding: 0; display: inline-grid; place-items: center; border: 0; color: var(--runtime-accent); background: transparent; appearance: none; -webkit-appearance: none; font-size: 18px; line-height: 1; }
  .mobile-wrist-stepper output { text-align: center; font-size: 13px; font-weight: 750; font-variant-numeric: tabular-nums; }
  .mobile-wrist-stepper output small { color: var(--muted); font-size: 8px; font-weight: 500; }
  .wrist-guide { border-radius: 16px; background: white; }
  .wrist-guide-trigger { min-height: 54px; padding: 10px 12px; }
  .bracelet-size-options { position: sticky; top: 0; z-index: 2; border-radius: 15px; }
  .bracelet-size-options button { min-height: 56px; border-radius: 12px; }

  .mobile-cart-section { align-content: start; gap: 13px; }
  .mobile-cart-summary { overflow: hidden; border: 1px solid var(--soft-line); border-radius: 17px; background: white; }
  .mobile-cart-summary > div { min-height: 52px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--soft-line); }
  .mobile-cart-summary > div:last-child { border-bottom: 0; }
  .mobile-cart-summary span { color: var(--muted); font-size: 9px; }
  .mobile-cart-summary strong { font-size: 11px; text-align: right; }
  .mobile-review-button { min-height: 52px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 16px; color: white; background: var(--runtime-accent); box-shadow: 0 10px 24px color-mix(in srgb, var(--runtime-accent), transparent 75%); font-size: 12px; font-weight: 750; }
  .mobile-review-button:disabled { opacity: .42; }
  .mobile-cart-note { color: var(--muted); font-size: 8px; line-height: 1.5; text-align: center; }

  .mobile-builder-toolbar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    width: 100%;
    height: var(--mobile-toolbar-height);
    padding: 4px 8px env(safe-area-inset-bottom);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    border-top: 1px solid rgba(23,35,31,.12);
    background: rgba(252,253,253,.96);
    backdrop-filter: blur(18px);
    transform: translateZ(0);
    will-change: transform;
  }
  .mobile-builder-toolbar button {
    min-width: 0;
    border: 0;
    border-radius: 12px;
    color: var(--muted);
    background: transparent;
    display: grid;
    place-content: center;
    gap: 1px;
    cursor: pointer;
  }
  .mobile-builder-toolbar .mobile-tab-icon { width: 25px; height: 22px; margin-inline: auto; position: relative; display: grid; place-items: center; font-size: 18px; line-height: 1; }
  .mobile-builder-toolbar .mobile-tab-icon svg { width: 19px; height: 19px; }
  .mobile-builder-toolbar .mobile-tab-icon em { position: absolute; top: -5px; right: -8px; min-width: 16px; height: 16px; padding: 0 4px; display: grid; place-items: center; border: 2px solid rgba(252,253,253,.96); border-radius: 999px; color: white; background: #a24d45; font-size: 7px; font-style: normal; font-weight: 800; }
  .mobile-builder-toolbar button strong { font-size: 9px; }
  .mobile-builder-toolbar button.active { color: var(--runtime-accent); background: color-mix(in srgb, var(--runtime-accent), white 88%); }

  .modal { max-height: 94dvh; overflow: auto; }
}

@media (max-width: 370px) {
  .catalog-scroll { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stage-title h1 { max-width: 130px; font-size: 14px; }
  .view-button { padding: 0 6px; }
}

@media (max-width: 900px) and (max-height: 700px) {
  .app[data-page="studio"] { grid-template-rows: 50px minmax(0, 1fr); }
  .app[data-page="studio"] .topbar { min-height: 50px; height: 50px; padding-block: 6px; }
  .builder-layout {
    --mobile-toolbar-height: calc(54px + env(safe-area-inset-bottom));
    --mobile-drawer-height: calc(50% - var(--mobile-toolbar-height));
  }
  .app[data-mobile-panel="size"] .builder-layout,
  .app[data-mobile-panel="intent"] .builder-layout,
  .app[data-mobile-panel="cart"] .builder-layout { --mobile-drawer-height: calc(50% - var(--mobile-toolbar-height)); }
  .bracelet-delete-mask { top: calc(50% + 25px); }
  .catalog-panel .panel-head { padding-top: 10px; }
  .catalog-panel .panel-subtitle { display: none; }
  .stage-title h1 { font-size: 14px; }
  .stage-bottom { bottom: 5px; }
}

.component-size-select {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 0 7px;
  border: 1px solid rgba(35, 107, 90, .18);
  border-radius: 9px;
  color: var(--ink);
  background: rgba(247, 250, 249, .94);
  font: inherit;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.material-size-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 7px;
}
.material-size-options button {
  min-height: 50px;
  padding: 7px;
  display: grid;
  place-content: center;
  gap: 2px;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  color: var(--ink);
  background: white;
  cursor: pointer;
}
.material-size-options button.active { border-color: var(--runtime-accent); background: color-mix(in srgb, var(--runtime-accent), white 91%); }
.material-size-options strong { font-size: 11px; }
.material-size-options span { color: var(--muted); font-size: 9px; }
.material-evidence-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.material-evidence-grid > div { min-height: 116px; padding: 8px; display: grid; align-content: start; gap: 6px; overflow: hidden; border: 1px solid var(--soft-line); border-radius: 12px; background: #f4f7f6; }
.material-evidence-grid strong { font-size: 9px; }
.material-evidence-grid img { width: 100%; height: 92px; border-radius: 8px; object-fit: contain; background: white; }
.material-evidence-grid span { min-height: 70px; display: grid; place-items: center; color: var(--muted); font-size: 8px; line-height: 1.45; text-align: center; }

.inspiration-community { display: grid; gap: 10px; }
.community-heading { display: grid; gap: 4px; }
.community-heading > div { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.community-heading span { display: inline-flex; align-items: center; gap: 6px; color: var(--runtime-accent); font-size: 10px; font-weight: 800; }
.community-heading strong { font-size: 13px; }
.community-heading small { color: var(--muted); font-size: 8px; line-height: 1.45; }
.community-design-list { display: grid; gap: 8px; }
.community-design-card { padding: 10px; display: grid; grid-template-columns: 98px minmax(0, 1fr) auto; align-items: center; gap: 9px; border: 1px solid var(--soft-line); border-radius: 15px; background: rgba(255,255,255,.86); }
.community-design-preview { height: 48px; display: flex; align-items: center; padding-left: 4px; overflow: hidden; }
.community-design-preview .component-swatch { width: 32px; height: 32px; flex: 0 0 32px; margin-left: -14px; border: 2px solid white; box-shadow: 0 4px 9px rgba(22,39,33,.16); }
.community-design-preview .component-swatch:first-child { margin-left: 0; }
.community-design-card > div:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.community-design-card > div:nth-child(2) span { color: var(--runtime-accent); font-size: 7px; font-weight: 800; }
.community-design-card > div:nth-child(2) strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.community-design-card p { margin: 0; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.community-design-card > button { min-height: 32px; padding: 0 9px; border: 0; border-radius: 10px; color: white; background: var(--runtime-accent); font-size: 8px; font-weight: 800; cursor: pointer; }

.review-override { grid-column: 1 / -1; border: 1px solid var(--soft-line); border-radius: 12px; background: #f7faf9; }
.review-override summary { padding: 10px; color: var(--runtime-accent); font-size: 10px; font-weight: 800; cursor: pointer; }
.review-override > div { padding: 0 10px 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.review-override label { display: grid; gap: 4px; }
.review-override label.full { grid-column: 1 / -1; }
.review-override label span { color: var(--muted); font-size: 8px; }
.review-override input, .review-override select { width: 100%; min-height: 34px; padding: 0 8px; border: 1px solid var(--soft-line); border-radius: 9px; background: white; font: inherit; font-size: 9px; }

.catalog-manager-card { display: grid; gap: 14px; }
.catalog-manager-toolbar { display: flex; align-items: center; gap: 12px; }
.catalog-manager-toolbar > input { flex: 1; min-height: 42px; padding: 0 12px; border: 1px solid var(--soft-line); border-radius: 12px; font: inherit; }
.catalog-manager-toolbar label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.catalog-manager-list { max-height: 620px; display: grid; gap: 8px; overflow: auto; }
.catalog-manager-row { padding: 9px; display: grid; grid-template-columns: 58px minmax(130px, 1.2fr) minmax(98px, .7fr) 82px minmax(170px, 1fr) auto auto; align-items: center; gap: 8px; border: 1px solid var(--soft-line); border-radius: 14px; background: rgba(255,255,255,.84); }
.catalog-manager-row.is-hidden { opacity: .58; }
.catalog-manager-identity { min-width: 0; display: grid; gap: 3px; }
.catalog-manager-identity strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.catalog-manager-identity span, .catalog-manager-row label > span { color: var(--muted); font-size: 8px; }
.catalog-manager-row label { min-width: 0; display: grid; gap: 3px; }
.catalog-manager-row input, .catalog-manager-row select { width: 100%; min-width: 0; min-height: 34px; padding: 0 7px; border: 1px solid var(--soft-line); border-radius: 9px; background: white; font: inherit; font-size: 9px; }
.catalog-manager-more summary { color: var(--runtime-accent); font-size: 9px; font-weight: 800; cursor: pointer; }
.catalog-manager-more > div { position: absolute; z-index: 20; right: 20px; width: min(480px, calc(100vw - 40px)); padding: 12px; display: grid; gap: 8px; border: 1px solid var(--soft-line); border-radius: 14px; background: white; box-shadow: 0 18px 44px rgba(20,39,32,.18); }

@media (max-width: 900px) {
  .component-card { padding-bottom: 25px; }
  .component-size-select { position: absolute; left: 5px; right: 5px; bottom: 4px; width: calc(100% - 10px); height: 19px; padding: 0 3px; border-radius: 6px; font-size: 7px; }
  .material-detail-photo { min-height: 160px; }
  .material-detail-photo img { height: 184px; }
  .community-design-card { grid-template-columns: 84px minmax(0, 1fr) auto; padding: 8px; }
  .community-design-preview { width: 84px; }
  .catalog-manager-row { grid-template-columns: 48px minmax(0, 1fr) 88px; }
  .catalog-manager-row > label, .catalog-manager-row > details { grid-column: span 1; }
  .catalog-size-editor { grid-column: 1 / -1 !important; }
  .catalog-manager-row > button { grid-column: 1 / -1; }
  .review-override > div { grid-template-columns: 1fr; }
  .review-override label.full { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Final cascade guard for the Kiki single-flow layout. */
.app[data-page="studio"] .summary-panel,
.app[data-page="studio"] .mobile-builder-toolbar,
.app[data-page="studio"] .topbar .top-actions { display: none !important; }
.app[data-page="studio"] { height: var(--orbit-viewport-height,100dvh) !important; min-height: 0 !important; }
.app[data-page="studio"] .builder-layout { display: grid !important; grid-template-columns: minmax(0,1.45fr) minmax(350px,.72fr) !important; grid-template-areas: "stage catalog" !important; height: var(--orbit-viewport-height,100dvh) !important; gap: 0 !important; }
.app[data-page="studio"] .stage-panel { grid-area: stage !important; }.app[data-page="studio"] .catalog-panel { grid-area: catalog !important; }
.component-size-select { display: none !important; }.component-card .component-name { display: block !important; }
@media (max-width: 900px) {
  .app[data-page="studio"] { display: block !important; grid-template-rows: none !important; }
  .app[data-page="studio"] .builder-layout { grid-row: auto !important; grid-template-columns: 1fr !important; grid-template-rows: 50% 50% !important; grid-template-areas: "stage" "catalog" !important; height: var(--orbit-viewport-height,100dvh) !important; min-height: 0 !important; overflow: hidden !important; }
  .app[data-page="studio"] .stage-panel,.app[data-page="studio"] .catalog-panel { position: relative !important; inset: auto !important; width: auto !important; height: auto !important; max-height: none !important; min-height: 0 !important; transform: none !important; display: flex !important; }
  .app[data-page="studio"] .catalog-panel { border-top: 1px solid rgba(32,65,55,.12) !important; padding-bottom: 0 !important; }
  .app[data-page="studio"] .catalog-panel::before { display: none !important; }
  .stage-live-badges { inset: 8px 8px auto; gap: 6px; }
  .stage-live-badges > span,.stage-wrist-control { min-width: 0; min-height: 44px; padding: 5px 8px; border-radius: 12px; }
  .stage-wrist-control { width: 174px; grid-template-columns: 30px minmax(78px,1fr) 30px; padding: 3px; }
  .stage-wrist-control button { width: 30px; height: 36px; border-radius: 9px; }
  .stage-live-badges strong { font-size: 11px; }
  .stage-live-badges small { font-size: 8px; }
  .stage-quick-actions { top: auto !important; bottom: 8px !important; }
}

/* 2026-08-19 staging hardening: controls occupy real layout space and the
   bracelet renderer owns a matching safe rectangle. */
.app[data-page="studio"] .stage-panel::before { display: none !important; }
.app[data-page="studio"] .stage-live-badges {
  display: grid !important;
  grid-template-columns: minmax(190px, 1fr) 96px;
  align-items: start;
}
.app[data-page="studio"] .stage-wrist-control { width: min(224px, 100%); }
.app[data-page="studio"] .stage-wrist-control > span { min-width: 0; }
.app[data-page="studio"] .stage-wrist-control strong,
.app[data-page="studio"] .stage-wrist-control small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app[data-page="studio"] .stage-live-badges > span:last-child { min-width: 0; }

.catalog-primary-footer {
  flex: 0 0 auto;
  padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--soft-line);
  background: rgba(251,253,252,.96);
  box-shadow: 0 -8px 22px rgba(25,49,41,.06);
}
.catalog-primary-action.has-notice { background: #9d4b3a; }
.catalog-primary-action .catalog-action-notice {
  margin: 0;
  color: white;
  font: 700 10px/1.2 Sora,sans-serif;
  text-align: center;
}
.catalog-primary-action {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--runtime-accent,#236b5a);
  box-shadow: 0 9px 22px color-mix(in srgb,var(--runtime-accent),transparent 76%);
  font: 800 12px/1 Sora,sans-serif;
  cursor: pointer;
}
.catalog-primary-action:disabled { opacity: .38; cursor: default; }

@media (max-width: 900px) {
  .app[data-page="studio"] .stage-live-badges {
    inset: 8px 8px auto !important;
    grid-template-columns: minmax(0,1fr) 78px !important;
    gap: 6px !important;
  }
  .app[data-page="studio"] .stage-wrist-control {
    width: auto !important;
    min-width: 0 !important;
    grid-template-columns: 30px minmax(0,1fr) 30px !important;
  }
  .app[data-page="studio"] .stage-live-badges > span:last-child {
    width: 78px;
    padding-inline: 5px;
  }
  .app[data-page="studio"] .stage-live-badges > span:last-child strong,
  .app[data-page="studio"] .stage-live-badges > span:last-child small { white-space: nowrap; }
  .app[data-page="studio"] .catalog-panel .panel-head {
    flex: 0 0 auto;
    padding: 6px 8px !important;
    gap: 5px !important;
  }
  .app[data-page="studio"] .catalog-toolbar { min-height: 32px; }
  .app[data-page="studio"] .catalog-search-toggle { width: 30px; height: 30px; flex-basis: 30px; }
  .app[data-page="studio"] .filter-chip { min-height: 30px !important; padding-inline: 10px; }
  .app[data-page="studio"] .catalog-body { flex: 1 1 auto; }
  .app[data-page="studio"] .catalog-scroll {
    padding: 6px !important;
    gap: 5px !important;
    scroll-padding-bottom: 8px;
  }
  .app[data-page="studio"] .component-card {
    min-height: 70px !important;
    padding: 4px !important;
    grid-template-rows: 36px auto auto !important;
    gap: 2px !important;
    border-radius: 10px !important;
  }
  .app[data-page="studio"] .component-swatch-wrap,
  .app[data-page="studio"] .component-swatch { width: 36px !important; height: 36px !important; }
  .app[data-page="studio"] .component-name { font-size: 9px !important; line-height: 1.15; }
  .app[data-page="studio"] .component-meta { font-size: 7px !important; }
  .app[data-page="studio"] .component-count-badge { top: 3px; right: 3px; }
  .app[data-page="studio"] .catalog-primary-footer { padding: 6px 8px max(6px, env(safe-area-inset-bottom)); }
  .app[data-page="studio"] .catalog-primary-action { min-height: 40px; border-radius: 12px; font-size: 11px; }
  .app[data-page="studio"] .stage-quick-actions { left: 8px !important; bottom: 7px !important; }
  .bracelet-delete-mask.bracelet-global-delete-mask {
    position: fixed !important;
    inset: 50% 0 0 !important;
    padding: 0 !important;
    place-items: center !important;
    background: rgba(239,244,242,.9) !important;
    backdrop-filter: blur(10px);
  }
}

@media (max-width: 345px) {
  .app[data-page="studio"] .stage-live-badges { grid-template-columns: minmax(0,1fr) 70px !important; }
  .app[data-page="studio"] .stage-live-badges > span:last-child { width: 70px; }
  .app[data-page="studio"] .stage-wrist-control { grid-template-columns: 28px minmax(0,1fr) 28px !important; }
  .app[data-page="studio"] .stage-wrist-control button { width: 28px; }
  .app[data-page="studio"] .catalog-scroll { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
}

/* A 320 x 568 viewport still keeps the requested half-screen bracelet preview,
   so the material rows themselves become denser instead of stealing height
   from the preview. Three complete rows remain visible above the real footer. */
@media (max-width: 345px) and (max-height: 650px) {
  .app[data-page="studio"] .component-card {
    min-height: 56px !important;
    grid-template-columns: 30px minmax(0,1fr) !important;
    grid-template-rows: auto auto !important;
    align-content: center !important;
    column-gap: 5px !important;
    row-gap: 1px !important;
  }
  .app[data-page="studio"] .component-swatch-wrap,
  .app[data-page="studio"] .component-swatch {
    width: 30px !important;
    height: 30px !important;
    grid-row: 1 / 3 !important;
  }
  .app[data-page="studio"] .component-name,
  .app[data-page="studio"] .component-meta { min-width: 0; }
}

/* Keep the existing compact circumference pill; only its text now names the
   value as Wrist. Search alignment remains explicit for iOS WebKit. */
.catalog-search-toggle,
.app[data-page="studio"] .catalog-search-toggle {
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  appearance: none;
  -webkit-appearance: none;
  font-size: 0 !important;
  line-height: 0 !important;
}
.catalog-search-toggle > svg,
.app[data-page="studio"] .catalog-search-toggle > svg {
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  display: block !important;
  flex: 0 0 18px;
  transform: none !important;
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .app[data-page="studio"] .builder-layout {
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important;
    grid-template-rows: 1fr !important;
    grid-template-areas: "stage catalog" !important;
    padding-left: env(safe-area-inset-left) !important;
    padding-right: env(safe-area-inset-right) !important;
  }
  .app[data-page="studio"] .catalog-panel {
    border-top: 0 !important;
    border-left: 1px solid rgba(32,65,55,.12) !important;
  }
  .app[data-page="studio"] .stage-live-badges > span { min-height: 38px !important; }
  .app[data-page="studio"] .stage-quick-actions button { height: 28px !important; }
  .bracelet-delete-mask.bracelet-global-delete-mask {
    inset: 0 max(0px, env(safe-area-inset-right)) 0 50% !important;
  }
}

/* 2026-08-27 follow-up: review is text-first; PNG appears only after a save
   failure. Material details fit one mobile viewport without internal scroll. */
.app[data-page="studio"] .checkout-review-without-preview {
  width: min(620px, 100%);
  grid-template-columns: minmax(0, 1fr);
}
.app[data-page="studio"] .checkout-review-without-preview .modal-content {
  min-width: 0;
}
.download-fallback.mobile-download-ready {
  grid-template-columns: minmax(0, 1fr);
  padding: 12px;
}
.download-fallback .mobile-download-image-link {
  width: 100%;
  min-width: 0;
}
.download-fallback .mobile-download-image-link img {
  width: 100%;
  height: auto;
  max-height: none;
  border: 1px solid var(--soft-border);
  border-radius: 12px;
  object-fit: contain;
  -webkit-touch-callout: default;
  user-select: auto;
}

.app[data-page="studio"] .material-detail-card {
  width: min(680px, 100%);
  max-height: min(720px, calc(var(--orbit-visual-height, 100dvh) - 24px));
  padding: 16px;
  gap: 12px;
  overflow: hidden;
}
.material-detail-hero {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}
.app[data-page="studio"] .material-detail-hero .material-detail-photo {
  min-height: 220px;
}
.app[data-page="studio"] .material-detail-hero .material-detail-photo .component-swatch.large {
  width: 200px !important;
  height: 200px !important;
}
.material-detail-kicker {
  color: var(--champagne-gold);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
}
.material-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.material-insight-card {
  min-width: 0;
  margin: 0;
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--soft-border);
  border-radius: 14px;
  background: var(--warm-ivory);
}
.material-insight-card.quick { border-left: 4px solid var(--champagne-gold); }
.material-insight-card.properties { border-left: 4px solid var(--mineral-sage); }
.material-insight-card > div { display: flex; align-items: center; gap: 7px; }
.material-insight-card > div span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--warm-ivory);
  background: var(--logo-cocoa);
  font-size: 8px;
  font-weight: 800;
}
.material-insight-card > div strong { color: var(--logo-cocoa); font-size: 10px; }
.material-insight-card p { margin: 0; color: var(--deep-cocoa); font-size: 9px; line-height: 1.5; }
.material-real-photo { display: grid; gap: 6px; }
.material-real-photo strong { font-size: 9px; }
.material-real-photo-image { width: 100%; height: 110px; display: block; background-position: center; background-size: contain; background-repeat: no-repeat; border-radius: 10px; }

.clear-design-backdrop {
  position: fixed;
  inset: 0;
  z-index: 460;
  padding: 16px;
  display: grid;
  place-items: center;
  background: rgba(92, 71, 65, .48);
  backdrop-filter: blur(12px);
}
.clear-design-dialog {
  width: min(360px, 100%);
  padding: 22px;
  display: grid;
  justify-items: center;
  gap: 12px;
  border: 1px solid var(--soft-border);
  border-radius: 22px;
  color: var(--deep-cocoa);
  background: var(--warm-ivory);
  box-shadow: 0 28px 70px rgba(92, 71, 65, .24);
  text-align: center;
}
.clear-design-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--danger); background: color-mix(in srgb, var(--danger), white 91%); }
.clear-design-dialog h2 { margin: 0; color: var(--logo-cocoa); font: 600 24px/1.1 "Bodoni Moda", serif; }
.clear-design-dialog p { margin: 0; color: var(--deep-cocoa); font-size: 10px; line-height: 1.55; }
.clear-design-dialog > div { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.clear-design-dialog button { min-height: 44px; }
.clear-confirm-button { background: var(--logo-cocoa) !important; }

@media (max-width: 900px) {
  .app[data-page="studio"] .checkout-review-without-preview {
    width: 100% !important;
    max-height: calc(var(--orbit-visual-height, 100dvh) - 12px) !important;
  }
  .app[data-page="studio"] .material-detail-backdrop { padding: 6px; }
  .app[data-page="studio"] .material-detail-card {
    width: 100%;
    max-height: calc(var(--orbit-visual-height, 100dvh) - 12px);
    padding: 10px;
    gap: 8px;
    border-radius: 18px;
    overflow: hidden;
  }
  .material-detail-head { min-height: 28px; }
  .material-detail-head button { width: 28px; height: 28px; }
  .material-detail-hero { grid-template-columns: 116px minmax(0, 1fr); gap: 10px; }
  .app[data-page="studio"] .material-detail-hero .material-detail-photo { min-height: 116px; border-radius: 14px; }
  .app[data-page="studio"] .material-detail-hero .material-detail-photo .component-swatch.large {
    width: 108px !important;
    height: 108px !important;
  }
  .material-detail-copy { gap: 6px; }
  .material-detail-copy h3 { font-size: 16px; line-height: 1.12; }
  .material-detail-copy dl { gap: 5px; }
  .material-detail-copy dl > div { padding: 7px; border-radius: 9px; }
  .material-insight-grid { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .material-insight-card { padding: 8px 9px; gap: 5px; border-radius: 11px; }
  .material-insight-card > div span { width: 20px; height: 20px; font-size: 7px; }
  .material-insight-card > div strong { font-size: 9px; }
  .material-insight-card p { font-size: 8px; line-height: 1.35; }
  .app[data-page="studio"] .material-detail-add { min-height: 42px; }
  .download-fallback .mobile-download-image-link img { width: 100%; max-height: none; }
}

/* 2026-08-27 customer brand system and one-source bead-effect rendering. */
html,
body,
.app[data-page="studio"] {
  color: var(--deep-cocoa);
  background: var(--blush-background);
}

.app[data-page="studio"] {
  --runtime-accent: var(--logo-cocoa) !important;
  --accent-soft: #E8D7D2 !important;
}

.app[data-page="studio"] .builder-layout {
  background: var(--soft-border) !important;
}

.app[data-page="studio"] .panel,
.app[data-page="studio"] .catalog-panel,
.app[data-page="studio"] .modal,
.app[data-page="studio"] .material-detail-card {
  border-color: var(--soft-border);
  background: var(--warm-ivory);
}

.app[data-page="studio"] .stage-panel {
  background:
    radial-gradient(circle at 50% 47%, rgba(255, 249, 245, .98) 0 12%, rgba(255, 249, 245, .62) 34%, transparent 62%),
    repeating-radial-gradient(circle at 50% 48%, transparent 0 77px, rgba(139, 108, 99, .055) 78px 79px),
    linear-gradient(145deg, var(--blush-background), color-mix(in srgb, var(--crystal-mist-blue), var(--warm-ivory) 72%)) !important;
}

.app[data-page="studio"] .stage-live-badges > span,
.app[data-page="studio"] .stage-wrist-control,
.app[data-page="studio"] .component-card,
.app[data-page="studio"] .catalog-search-toggle,
.app[data-page="studio"] .filter-chip,
.app[data-page="studio"] .secondary-button,
.app[data-page="studio"] .checkout-facts span,
.app[data-page="studio"] .checkout-service-notes p,
.app[data-page="studio"] .design-id {
  color: var(--deep-cocoa);
  border-color: var(--soft-border);
  background: var(--warm-ivory);
}

.app[data-page="studio"] .component-card:hover,
.app[data-page="studio"] .component-card.selected {
  border-color: var(--logo-cocoa);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--logo-cocoa), transparent 84%), 0 12px 28px rgba(92, 71, 65, .10);
}

.app[data-page="studio"] .filter-chip.active,
.app[data-page="studio"] .catalog-search-toggle.active {
  color: var(--deep-cocoa);
  border-color: var(--dusty-rose);
  background: color-mix(in srgb, var(--dusty-rose), var(--warm-ivory) 48%);
}

.app[data-page="studio"] .catalog-primary-footer {
  border-color: var(--soft-border);
  background: var(--warm-ivory);
  box-shadow: 0 -8px 22px rgba(92, 71, 65, .06);
}

.app[data-page="studio"] .catalog-primary-action,
.app[data-page="studio"] .primary-button,
.app[data-page="studio"] .material-detail-add {
  color: var(--warm-ivory);
  background: var(--logo-cocoa);
}

.app[data-page="studio"] .catalog-primary-action:hover,
.app[data-page="studio"] .primary-button:hover,
.app[data-page="studio"] .material-detail-add:hover {
  background: #6F514A;
}

.app[data-page="studio"] .eyebrow,
.app[data-page="studio"] .component-name,
.app[data-page="studio"] .material-detail-head strong,
.app[data-page="studio"] .material-detail-copy h3,
.app[data-page="studio"] .modal-title-row h2,
.app[data-page="studio"] .total-row strong {
  color: var(--logo-cocoa);
}

.app[data-page="studio"] .component-meta,
.app[data-page="studio"] .download-guide,
.app[data-page="studio"] .modal-preview-label {
  color: var(--deep-cocoa);
}

.app[data-page="studio"] .modal-backdrop,
.app[data-page="studio"] .material-detail-backdrop {
  background: rgba(92, 71, 65, .46);
}

.app[data-page="studio"] .modal-preview {
  background:
    radial-gradient(circle at center, var(--warm-ivory) 0 16%, rgba(255, 249, 245, .62) 40%, transparent 68%),
    repeating-radial-gradient(circle at center, transparent 0 72px, rgba(139, 108, 99, .055) 73px 74px),
    color-mix(in srgb, var(--crystal-mist-blue), var(--warm-ivory) 65%);
}

/* The effect asset itself is the only bead surface. Cards no longer add a
   second synthetic highlight/inset shading that the bracelet canvas lacks. */
.component-swatch.photo-texture.bead {
  background-color: transparent !important;
  box-shadow: 0 6px 13px rgba(92, 71, 65, .16);
}
.component-swatch.photo-texture.bead::before,
.component-swatch.photo-texture.bead::after {
  display: none !important;
}
.component-swatch.photo-texture.bead > img {
  z-index: 2;
  object-fit: cover;
  background: transparent;
}

.app[data-page="studio"] .material-detail-photo {
  min-height: 250px;
  background: color-mix(in srgb, var(--crystal-mist-blue), var(--warm-ivory) 76%);
}
.app[data-page="studio"] .material-detail-photo .component-swatch.large {
  width: min(240px, 72vw) !important;
  height: min(240px, 72vw) !important;
}
.app[data-page="studio"] .material-detail-photo .component-swatch.large > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
}

.mobile-download-ready {
  padding: 10px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--soft-border);
  border-radius: 14px;
  background: var(--warm-ivory);
}
.mobile-download-ready > img {
  width: 74px;
  height: 74px;
  grid-row: 1 / 3;
  border: 1px solid var(--soft-border);
  border-radius: 10px;
  object-fit: cover;
}
.mobile-download-ready > div { min-width: 0; display: grid; gap: 3px; }
.mobile-download-ready > div strong { color: var(--logo-cocoa); font-size: 11px; }
.mobile-download-ready > div span { color: var(--deep-cocoa); font-size: 8px; line-height: 1.4; }
.mobile-download-ready > button { min-height: 38px; }

@media (max-width: 900px) {
  .app[data-page="studio"] .material-detail-photo { min-height: 210px; }
  .app[data-page="studio"] .material-detail-photo .component-swatch.large {
    width: min(200px, 62vw) !important;
    height: min(200px, 62vw) !important;
    min-height: 0 !important;
    grid-row: auto !important;
  }
  .mobile-download-ready {
    grid-template-columns: minmax(0, 1fr);
  }
  .mobile-download-ready > img {
    width: 100%;
    height: auto;
    max-height: 52dvh;
    grid-row: auto;
    object-fit: contain;
    -webkit-touch-callout: default;
    user-select: auto;
  }
}

/* 2026-08-27 compact checkout review requested by the operator. */
.app[data-page="studio"] .checkout-review-modal .modal-preview {
  min-height: 440px;
  height: 440px;
  padding: 20px;
}
.app[data-page="studio"] .checkout-review-modal .modal-preview img {
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 400px;
}
.app[data-page="studio"] .checkout-bom-list {
  width: auto;
  margin-inline: 16px;
}
.app[data-page="studio"] .checkout-bom-list .bom-row {
  grid-template-columns: 38px minmax(88px, 140px) 44px 66px minmax(0, 1fr);
  gap: 8px;
}
.app[data-page="studio"] .checkout-bom-list .bom-row > span:nth-child(3),
.app[data-page="studio"] .checkout-bom-list .bom-row > span:nth-child(4) {
  justify-self: start;
  text-align: left;
}
.mobile-download-image-link { display: block; }
.mobile-download-image-link img { display: block; }
.mobile-download-direct-link { display: flex; align-items: center; justify-content: center; text-decoration: none; }
@media (max-width: 900px) {
  .app[data-page="studio"] .checkout-review-modal .modal-preview {
    min-height: 220px !important;
    height: 220px !important;
    padding: 14px !important;
  }
  .app[data-page="studio"] .checkout-review-modal .modal-preview img {
    width: auto !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 190px !important;
  }
  .app[data-page="studio"] .checkout-bom-list {
    margin-inline: 12px;
  }
  .app[data-page="studio"] .checkout-review-modal .modal-content {
    overflow: visible !important;
  }
}

/* 2026-08-21 dynamic circumference and compact mobile catalog. */
.app[data-page="studio"] .stage-live-badges {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 8px !important;
}
.app[data-page="studio"] .stage-live-badges > .stage-metric-pill {
  width: auto !important;
  min-width: 0 !important;
  min-height: 34px !important;
  padding: 0 11px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  text-align: center !important;
}
.app[data-page="studio"] .stage-live-badges > .stage-metric-pill strong {
  overflow: visible !important;
  font-size: 10px !important;
  line-height: 1 !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}
.app[data-page="studio"] .stage-total { margin-left: auto; }

@media (max-width: 900px) {
  .app[data-page="studio"] .stage-live-badges {
    inset: 7px 7px auto !important;
    grid-template-columns: none !important;
  }
  .app[data-page="studio"] .stage-live-badges > .stage-metric-pill {
    min-height: 30px !important;
    padding-inline: 8px !important;
  }
  .app[data-page="studio"] .stage-live-badges > .stage-metric-pill strong { font-size: 9px !important; }
  .app[data-page="studio"] .component-card {
    justify-items: center !important;
    text-align: center !important;
  }
  .app[data-page="studio"] .component-swatch-wrap {
    width: 100% !important;
    min-height: 36px !important;
    height: 36px !important;
    display: grid !important;
    place-items: center !important;
  }
  .app[data-page="studio"] .component-swatch { width: 36px !important; height: 36px !important; }
  .app[data-page="studio"] .component-name {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 10px !important;
    text-align: center !important;
  }
  .app[data-page="studio"] .component-meta {
    width: 100% !important;
    justify-content: center !important;
    gap: 6px !important;
    text-align: center !important;
  }
  .app[data-page="studio"] .catalog-action-notice { font-size: 8.5px; }
}

@media (max-width: 345px) {
  .app[data-page="studio"] .stage-live-badges { grid-template-columns: none !important; }
  .app[data-page="studio"] .stage-live-badges > .stage-metric-pill { width: auto !important; }
}

@media (max-width: 345px) and (max-height: 650px) {
  .app[data-page="studio"] .component-card {
    grid-template-columns: 1fr !important;
    grid-template-rows: 30px auto auto !important;
    align-content: center !important;
    justify-items: center !important;
  }
  .app[data-page="studio"] .component-swatch-wrap,
  .app[data-page="studio"] .component-swatch {
    width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    grid-row: auto !important;
  }
}

/* Final cascade guard for the no-scroll Material Details layout. */
@media (max-width: 900px) {
  .app[data-page="studio"] .material-detail-hero .material-detail-photo {
    min-height: 116px !important;
    height: 116px !important;
  }
  .app[data-page="studio"] .material-detail-hero .material-detail-photo .component-swatch.large {
    width: 108px !important;
    height: 108px !important;
    min-height: 0 !important;
    grid-row: auto !important;
  }
}

/* 2026-08-27 operator round 2: branded design stage, explicit maximum-length
   state, cart-only review, and an inert Material Details image on touch. */
.app[data-page="studio"] .stage-panel {
  background-color: var(--warm-ivory) !important;
  background-image:
    linear-gradient(rgba(255, 249, 245, .58), rgba(255, 249, 245, .58)),
    url("assets/branding/download-preview-background.png?v=20260830-cart-image-hd-v19") !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}

.app[data-page="studio"] .catalog-primary-action.has-notice,
.app[data-page="studio"] .catalog-primary-action.has-notice:hover {
  color: var(--deep-cocoa) !important;
  background: var(--champagne-gold) !important;
  box-shadow: 0 9px 22px rgba(197, 164, 119, .32) !important;
}
.app[data-page="studio"] .catalog-primary-action.has-notice .catalog-action-notice {
  color: var(--deep-cocoa) !important;
}

.app[data-page="studio"] .checkout-cart-only {
  grid-template-columns: minmax(0, 1fr) !important;
}
.app[data-page="studio"] .checkout-cart-only .primary-button {
  width: 100%;
}

.app[data-page="studio"] .material-detail-photo,
.app[data-page="studio"] .material-detail-photo .component-swatch,
.app[data-page="studio"] .material-detail-photo .component-swatch > img {
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-user-drag: none !important;
}
.app[data-page="studio"] .material-detail-photo .component-swatch,
.app[data-page="studio"] .material-detail-photo .component-swatch > img {
  pointer-events: none !important;
}
