/* Demo kit presenter chrome — same company as the marketing site.
 * Tokens come from ../kit.css (generated from site-v2-src/site.css).
 * The mall's own variables are mapped onto those tokens here so the rest of
 * this file follows both light and dark themes. Demos INSIDE the iframe keep
 * their own product styling. */

:root {
  --mall-void: var(--surface);
  --mall-800: var(--bg-2);
  --mall-700: var(--bg-3);
  --mall-600: var(--line-strong);
  --mall-line: var(--line);
  --mall-ink: var(--ink);
  --mall-body: var(--ink-2);
  --mall-mute: var(--ink-2);
  --mall-dim: var(--ink-3);
  --mall-cyan: var(--accent-ink);
  --mall-cyan-deep: var(--accent-ink);
  --mall-cyan-soft: var(--accent-ink);
  --mall-b47-from: var(--ink);
  --mall-b47-to: var(--ink);
  --mall-b47-ink: var(--bg);
  --mall-accent-soft: var(--accent-soft);
  --mall-font: var(--font-body);
  --mall-r: var(--radius);
  --mall-r-lg: var(--radius-lg);
}

.mall-body {
  margin: 0;
  font-family: var(--mall-font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--mall-ink);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

.mall-shell {
  display: grid;
  grid-template-columns: 272px 1fr;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
}

.mall-side {
  background: var(--bg-2);
  color: var(--mall-body);
  border-right: 1px solid var(--mall-line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.mall-side.is-hidden { display: none; }
.mall-shell.side-hidden { grid-template-columns: 1fr; }

.mall-side-head {
  padding: 16px 14px 12px;
  border-bottom: 1px solid var(--mall-line);
  flex-shrink: 0;
}

.mall-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.mall-logo {
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.mall-logo-mark {
  width: 36px;
  height: 36px;
}

.mall-brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--mall-ink);
}

.mall-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mall-dim);
  margin-top: 3px;
}

.mall-search {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--mall-r);
  border: 1px solid var(--mall-line);
  background: var(--surface);
  color: var(--mall-ink);
  font: inherit;
  font-size: 13px;
}
.mall-search::placeholder { color: var(--ink-3); }

.mall-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.mall-search-wrap { display: block; }

.mall-modes { display: none !important; }
.mall-mode-hint {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--mall-dim);
}

.mall-branch { margin-bottom: 4px; }
.mall-branch--d0 {
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--mall-line);
}
.mall-branch--d0:last-child { border-bottom: 0; }

.mall-branch-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--mall-body);
  font: inherit;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 8px;
  border-radius: var(--mall-r);
  cursor: pointer;
}
.mall-branch-head:hover { background: var(--mall-700); }
.mall-branch-head.is-open {
  color: var(--mall-ink);
  background: transparent;
}
.mall-branch-head:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.mall-branch-chevron {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid var(--mall-dim);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.mall-branch-head.is-open .mall-branch-chevron {
  transform: rotate(90deg);
  border-left-color: var(--mall-mute);
}
.mall-branch-label { flex: 1; min-width: 0; }
.mall-branch-body {
  padding: 2px 0 6px 6px;
  margin-left: 6px;
  border-left: 1px solid var(--mall-line);
}
.mall-branch--d1 > .mall-branch-head {
  font-family: var(--font-body);
  font-size: 12.5px;
  padding: 8px 8px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--mall-body);
}
.mall-branch--d1 .mall-branch-body { margin-left: 10px; }
.mall-branch--d2 > .mall-branch-head {
  font-family: var(--font-body);
  font-size: 12px;
  padding: 6px 8px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--mall-mute);
}
.mall-item--hint {
  cursor: default;
  opacity: 0.9;
  pointer-events: none;
}
.mall-branch.is-empty { display: none; }

.mall-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 8px 20px;
  scroll-padding-bottom: 24px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.mall-group { margin-bottom: 12px; }

.mall-group-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mall-mute);
  padding: 6px 10px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: default;
}

.mall-group-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--accent) !important; /* one accent — catalog colors are ignored */
  opacity: 0.85;
}

.mall-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--mall-body);
  border-radius: var(--mall-r);
  padding: 9px 10px;
  cursor: pointer;
  font-family: inherit;
  margin: 2px 0;
}
.mall-item:hover { background: var(--mall-700); }
.mall-item.is-active {
  background: var(--surface);
  border-color: var(--mall-line);
  color: var(--mall-ink);
  box-shadow: inset 2px 0 0 var(--accent);
}
.mall-item-title {
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mall-item-title-text { min-width: 0; }
.mall-item-blurb {
  font-size: 11px;
  color: var(--mall-dim);
  margin-top: 2px;
  display: block;
}
.mall-item.is-hidden { display: none; }
.mall-group.is-empty { display: none; }

.mall-side-foot {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--mall-line);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mall-cta {
  display: block;
  padding: 10px 10px 9px;
  border: 1px solid var(--mall-line);
  border-radius: var(--mall-r);
  background: var(--surface);
  text-decoration: none;
  color: var(--mall-ink);
  transition: border-color 0.2s;
}
.mall-cta:hover { border-color: var(--line-strong); }
.mall-cta-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--accent-ink);
}
.mall-cta-eyebrow::after {
  content: "→";
  margin-left: auto;
  font-weight: 400;
  transition: transform 0.3s var(--ease-out);
}
.mall-cta:hover .mall-cta-eyebrow::after { transform: translateX(3px); }
.mall-cta-phone {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--mall-body);
}

.mall-site-exit {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding: 0 2px 2px;
}
.mall-site-exit-link {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--mall-ink);
  text-decoration: none;
}
.mall-site-exit-link:hover { color: var(--accent-ink); }
.mall-site-exit-link--muted {
  color: var(--mall-dim);
  font-weight: 400;
}
.mall-site-exit-link--muted:hover { color: var(--mall-ink); }

.mall-hide {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--mall-dim);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 4px;
  text-align: left;
  cursor: pointer;
  border-radius: var(--mall-r);
}
.mall-hide:hover {
  color: var(--mall-ink);
  background: var(--mall-700);
}

.mall-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--bg);
  height: 100%;
  overflow: hidden;
}

.mall-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 10px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--mall-line);
}

.mall-top-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mall-crumb {
  font-size: 13px;
  color: var(--mall-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mall-crumb strong { color: var(--mall-ink); font-weight: 600; }
.mall-crumb-sep { margin: 0 6px; opacity: 0.45; }

.mall-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.mall-status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--mall-dim);
}
#local-badge {
  color: var(--mall-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10.5px;
}
#pos-pill { color: var(--mall-dim); font-variant-numeric: tabular-nums; }

.mall-icon-btn {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--mall-ink);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 16px;
  transition: border-color 0.3s, background-color 0.3s;
}
.mall-icon-btn:hover { border-color: var(--mall-ink); background: var(--accent-soft); }
.mall-mode-btn svg { display: block; }
.mall-mode-btn .mall-mode-moon { display: none; }
html[data-theme="dark"] .mall-mode-btn .mall-mode-sun { display: none; }
html[data-theme="dark"] .mall-mode-btn .mall-mode-moon { display: block; }

.mall-chip {
  border: 1px solid transparent;
  background: transparent;
  color: var(--mall-mute);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}

.mall-device {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--bg-2);
  border: 1px solid var(--mall-line);
  border-radius: 999px;
}

.mall-device .mall-chip { color: var(--mall-mute); }
.mall-device .mall-chip:hover { color: var(--mall-ink); }
.mall-device .mall-chip.is-on {
  background: var(--surface);
  color: var(--mall-ink);
  border-color: var(--mall-line);
}

.mall-tour {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* Buttons mirror kit .btn / .btn-ghost / .btn-primary at .btn-sm scale */
.mall-ghost,
.mall-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.005em;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  min-height: 36px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease-out), background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.mall-ghost {
  background: transparent;
  color: var(--mall-ink);
  border-color: var(--line-strong);
}
.mall-ghost:hover:not(:disabled) {
  border-color: var(--mall-ink);
  background: var(--accent-soft);
}
.mall-ghost:disabled {
  opacity: 0.35;
  cursor: default;
}
/* Kit strip owns Back — do not show a second Back in the top tour row */
.mall-top-actions #btn-back {
  display: none !important;
}
.mall-next {
  background: var(--ink);
  color: var(--bg);
}
.mall-next:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.5);
}
.mall-next:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}

.mall-looks-btn { border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.mall-looks-btn::before { content: ""; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; display: inline-block; vertical-align: -2px; background: linear-gradient(90deg, var(--accent) 0 33%, var(--ink) 33% 66%, var(--bg-3) 66%); }
.mall-looks-btn.is-on,
.mall-looks-btn[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.mall-pathbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 16px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--mall-line);
}
.mall-pathbar[hidden] { display: none; }
.mall-pathbar-main {
  min-width: 0;
  font-size: 13px;
  color: var(--mall-body);
}
.mall-pathbar-main strong { color: var(--mall-ink); font-weight: 500; }
.mall-pathbar-kicker {
  display: inline-block;
  margin-right: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.mall-pathbar-step { color: var(--mall-dim); font-family: var(--font-mono); font-size: 12px; }

.mall-coach {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--mall-line);
}
.mall-coach.is-hidden { display: none; }
.mall-coach-inner { flex: 1; min-width: 0; }
.mall-coach-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mall-dim);
}
.mall-coach-pitch {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: var(--mall-ink);
  font-weight: 400;
  line-height: 1.45;
  max-width: 90ch;
}
.mall-coach-look {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--mall-mute);
  line-height: 1.4;
}
.mall-coach-dismiss {
  border: 0;
  background: transparent;
  color: var(--mall-dim);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.mall-coach-dismiss:hover {
  background: var(--mall-700);
  color: var(--mall-ink);
}

.mall-coach-pairs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* Kit strip above the iframe — only shown when the left menu is collapsed on desktop. */
.mall-kitbar {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg-2);
  color: var(--mall-body);
  font: 500 12.5px var(--mall-font);
  border-bottom: 1px solid var(--mall-line);
  flex-shrink: 0;
}
.mall-shell.side-hidden .mall-kitbar { display: flex; }
.mall-kitbar-btn {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--mall-ink);
  border-radius: 999px;
  padding: 5px 11px;
  font: 500 12px var(--mall-font);
  cursor: pointer;
  line-height: 1.2;
}
.mall-kitbar-btn:hover {
  border-color: var(--mall-ink);
  background: var(--accent-soft);
}
.mall-kitbar-note {
  margin-left: auto;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--mall-dim);
}
.mall-coach-pairs[hidden] { display: none; }
.mall-pair-btn {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--mall-ink);
  font: 500 12px var(--mall-font);
  border-radius: 999px;
  padding: 5px 11px;
  cursor: pointer;
  line-height: 1.2;
}
.mall-pair-btn:hover {
  border-color: var(--mall-ink);
  background: var(--accent-soft);
}
.mall-pair-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mall-work {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 280px;
}
.mall-work.theme-hidden { grid-template-columns: 1fr; }
.mall-work.theme-hidden .theme-studio,
.theme-studio[hidden] { display: none !important; }

.mall-item--action {
  width: 100%;
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: var(--mall-r);
  padding: 10px 12px;
  margin-top: 6px;
  font: inherit;
  color: var(--mall-ink);
}
.mall-item--action:hover,
.mall-item--action:focus-visible {
  border-color: var(--mall-ink);
  background: var(--accent-soft);
  outline: none;
}
.mall-item--action[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.theme-close-btn { font-weight: 500; color: var(--mall-mute); }
.theme-close-btn:hover { color: var(--mall-ink); }

.mall-stage-wrap {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  background: var(--bg);
}

.theme-studio {
  background: var(--bg-2);
  border-left: 1px solid var(--mall-line);
  padding: 12px 12px 16px;
  overflow-y: auto;
  min-height: 0;
  color: var(--mall-body);
}
.theme-studio-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}
.theme-studio-head strong {
  font-size: 13px;
  letter-spacing: -0.02em;
  display: block;
  color: var(--mall-ink);
}
.theme-studio-sub {
  font-size: 11px;
  color: var(--mall-dim);
  margin-top: 2px;
}
.theme-studio-hint,
.theme-studio-foot {
  font-size: 11px;
  color: var(--mall-dim);
  line-height: 1.4;
  margin: 0 0 12px;
}
.theme-studio-foot { margin-top: 12px; margin-bottom: 0; }
.theme-block { margin-bottom: 14px; }
.theme-block-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mall-mute);
  margin-bottom: 8px;
  cursor: default;
}

.theme-block--custom-colors { margin-bottom: 14px; border: 0; padding: 0; }
button.theme-customize-toggle {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  border: 1px solid var(--mall-line);
  background: var(--mall-800);
  border-radius: var(--mall-r-lg);
  padding: 10px 12px;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  user-select: none;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}
button.theme-customize-toggle:hover,
button.theme-customize-toggle:focus-visible {
  border-color: var(--mall-cyan);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}
.theme-block--custom-colors.is-open > .theme-customize-toggle,
button.theme-customize-toggle[aria-expanded="true"] {
  border-color: var(--mall-cyan);
  background: var(--accent-soft);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.theme-customize-toggle-title {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--mall-ink);
}
.theme-customize-toggle-sub {
  display: block;
  font-size: 10.5px;
  color: var(--mall-dim);
  margin-top: 2px;
  font-weight: 500;
}
.theme-customize-chevron {
  flex-shrink: 0;
  color: var(--mall-mute);
  font-size: 12px;
  transition: transform 0.15s ease;
}
.theme-block--custom-colors.is-open > .theme-customize-toggle .theme-customize-chevron,
button.theme-customize-toggle[aria-expanded="true"] .theme-customize-chevron {
  transform: rotate(90deg);
}
.theme-customize-panel[hidden],
.theme-customize-panel:not(.is-open) { display: none !important; }
.theme-customize-panel.is-open {
  display: block !important;
  border: 1px solid var(--mall-line);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: var(--mall-800);
  padding: 10px 10px 12px;
  position: relative;
  z-index: 1;
}
.theme-customize-hint {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--mall-mute);
}
.theme-scheme-live {
  border: 1px solid var(--mall-line);
  border-radius: var(--mall-r);
  background: var(--mall-700);
  padding: 8px 10px;
  margin-bottom: 10px;
}
.theme-scheme-live-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.theme-scheme-live-lab {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mall-mute);
}
.theme-scheme-live-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--mall-ink);
}
.theme-scheme-compare {
  display: flex;
  align-items: center;
  gap: 10px;
}
.theme-scheme-compare-col { flex: 1; min-width: 0; }
.theme-scheme-compare-lab {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--mall-dim);
  margin-bottom: 4px;
}
.theme-scheme-compare-arrow { color: var(--mall-dim); font-size: 14px; flex-shrink: 0; }
.theme-swatch--lg { gap: 4px; }
.theme-swatch--lg i { width: 22px; height: 22px; border-radius: 6px; }
.theme-swatch.is-customized i,
.theme-swatch--lg.is-customized i {
  box-shadow: 0 0 0 2px var(--mall-800), 0 0 0 3px var(--mall-cyan);
}
.theme-roles {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: none;
  overflow: visible;
  margin-bottom: 8px;
}
.theme-roles--scheme { gap: 6px; }
.theme-role-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: var(--mall-700);
  border-radius: var(--mall-r);
  padding: 7px 8px;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}
.theme-role-row:hover {
  border-color: var(--line);
  background: var(--mall-600);
}
.theme-role-row.is-active {
  border-color: var(--mall-cyan);
  background: var(--accent-soft);
}
.theme-role-row.is-custom .theme-role-hex {
  color: var(--mall-cyan-soft);
  font-weight: 600;
}
.theme-role-chip-num {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--mall-600);
  color: var(--mall-mute);
  font-size: 10px;
  font-weight: 600;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.theme-role-row.is-active .theme-role-chip-num {
  background: var(--mall-cyan);
  color: var(--mall-void);
}
.theme-role-badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mall-b47-ink);
  background: var(--mall-b47-to);
  border-radius: var(--mall-r);
  padding: 2px 6px;
  flex-shrink: 0;
}
.theme-role-swatch {
  width: 28px;
  height: 28px;
  border-radius: var(--mall-r);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.theme-role-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}
.theme-role-name { font-size: 12px; font-weight: 600; color: var(--mall-ink); }
.theme-role-hex {
  font-size: 10px;
  font-family: inherit;
  color: var(--mall-dim);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.theme-swatch-drawer {
  border: 1px solid var(--mall-line);
  border-radius: var(--mall-r);
  background: var(--mall-700);
  padding: 8px;
  margin-bottom: 8px;
}
.theme-swatch-drawer[hidden] { display: none !important; }
.theme-swatch-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--mall-ink);
  margin-bottom: 6px;
}
.theme-swatch-replacing {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  padding: 6px 8px;
  border-radius: var(--mall-r);
  background: var(--mall-800);
  border: 1px dashed var(--line);
  font-size: 11px;
  line-height: 1.35;
  color: var(--mall-mute);
}
.theme-swatch-replacing[hidden] { display: none !important; }
.theme-swatch-replacing strong { color: var(--mall-ink); }
.theme-replacing-swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.theme-replacing-swatch.is-now { box-shadow: 0 0 0 2px var(--mall-cyan); }
.theme-swatch-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
  max-height: 160px;
  overflow-y: auto;
}
.theme-swatch-cell {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  min-height: 22px;
}
.theme-swatch-cell:hover {
  transform: scale(1.08);
  z-index: 1;
}
.theme-swatch-cell.is-active {
  outline: 2px solid var(--surface);
  outline-offset: 1px;
  box-shadow: 0 0 0 2px var(--mall-800), 0 0 0 4px var(--mall-cyan);
}
.theme-customize-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.theme-opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.theme-opts--layouts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.theme-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--mall-line);
  background: var(--mall-800);
  border-radius: var(--mall-r);
  padding: 8px 10px;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}
.theme-opt:hover {
  border-color: var(--line);
  background: var(--mall-700);
}
.theme-opt.is-active {
  border-color: var(--mall-cyan);
  background: var(--accent-soft);
}
.theme-opt-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--mall-ink);
}
.theme-opt-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.theme-badge {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mall-cyan-soft);
  background: var(--accent-soft);
  padding: 1px 5px;
  border-radius: 4px;
}
.theme-badge--safe {
  color: var(--accent-ink);
  background: var(--accent-soft);
}
.theme-swatch { display: flex; gap: 3px; flex-shrink: 0; }
.theme-swatch i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid var(--line);
  display: block;
}
.theme-layout-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--mall-mute);
  background: var(--mall-700);
  border-radius: 6px;
  border: 1px solid var(--mall-line);
  flex-shrink: 0;
}
.theme-opt--layout {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-height: 0;
  min-width: 0;
  padding: 10px 10px 9px;
}
.theme-opt--layout .theme-opt-label {
  display: block;
  width: 100%;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.theme-opt-why {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--mall-mute);
  white-space: normal;
}

.theme-ab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.theme-ab-row button,
.theme-recipe-btns button {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--mall-ink);
  border-radius: 999px;
  padding: 7px 11px;
  font: 500 12px var(--mall-font);
  cursor: pointer;
}
.theme-ab-row button:hover,
.theme-recipe-btns button:hover { border-color: var(--mall-ink); background: var(--accent-soft); }
.theme-recipe-btns button.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.theme-ab-row button.primary,
#theme-ab-safe {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.theme-recipe-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.theme-budget-note {
  font-size: 11px;
  color: var(--mall-dim);
  margin: 8px 0 0;
}

.mall-frame-shell {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--mall-r-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--mall-line);
  overflow: hidden;
  width: 100%;
  height: 100%;
  max-width: 100%;
  transition: max-width 0.25s ease, height 0.25s ease;
}
.mall-frame-shell[data-device="tablet"] {
  max-width: 834px;
  height: min(100%, 1100px);
}
.mall-frame-shell[data-device="phone"] {
  max-width: 390px;
  height: min(100%, 844px);
  border-radius: 24px;
}
.mall-frame-shell iframe {
  width: 100%;
  flex: 1;
  min-height: 0;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
}

.mall-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg);
  border-top: 1px solid var(--mall-line);
  font-size: 12.5px;
  color: var(--mall-dim);
}
.mall-sep { margin: 0 6px; opacity: 0.4; }
.mall-foot-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--mall-dim);
}

.linkish {
  background: none;
  border: 0;
  color: var(--mall-ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  border-radius: 2px;
}
.linkish:hover { color: var(--accent-ink); }

.mall-tooltip {
  position: fixed;
  z-index: 300;
  max-width: 280px;
  padding: 8px 11px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  line-height: 1.4;
  border-radius: var(--mall-r);
  border: 1px solid transparent;
  box-shadow: var(--shadow);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.mall-tooltip.is-on { opacity: 1; }

.mall-pin-btn.is-on,
.theme-pin-btn.is-on {
  color: var(--accent-ink);
  font-weight: 500;
}
.theme-studio-head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.theme-pin-btn { font-size: 12px; }

.mall-body :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.mall-item:focus-visible {
  background: var(--mall-700);
  outline-offset: -2px;
}

.mall-sr-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.mall-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(10, 15, 26, 0.45);
  border: 0;
  padding: 0;
  cursor: pointer;
}
.mall-scrim.is-on { display: block; }

@media (max-width: 1100px) {
  .mall-work { grid-template-columns: 1fr; }
  .theme-studio {
    border-left: 0;
    border-top: 1px solid var(--mall-line);
    max-height: min(40vh, 280px);
    min-height: 0;
  }
  .theme-opts--layouts { grid-template-columns: 1fr 1fr; }
  .theme-opts:not(.theme-opts--layouts) {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .theme-opt { min-height: 44px; }
}

@media (max-width: 900px) {
  .mall-shell { grid-template-columns: 1fr; }
  .mall-shell { min-height: 0; }
  .mall-side {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px, 92vw);
    z-index: 40;
    box-shadow: var(--shadow);
    border-right: 1px solid var(--mall-line);
    height: 100%;
    height: 100dvh;
  }
  .mall-side.is-hidden { display: none; }
  #btn-show-side {
    display: inline-grid !important;
    min-width: 44px;
    min-height: 44px;
  }
  .mall-item {
    min-height: 44px;
    padding: 12px 10px;
  }
  .mall-side-foot .mall-hide { min-height: 44px; }
  .mall-top { padding: 8px 12px; gap: 8px 12px; }
  .mall-top-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }
  .mall-status,
  .mall-mode-hint,
  .mall-coach-look,
  .mall-top-actions #btn-back,
  .mall-top-actions #btn-external,
  .mall-bottom-right,
  .mall-kitbar,
  .mall-device {
    display: none !important;
  }
  .mall-looks-btn {
    display: inline-flex;
    min-height: 44px;
  }
  .mall-coach { display: none; }
  .mall-top-actions .mall-ghost,
  .mall-top-actions .mall-next {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 13px;
  }
  .mall-icon-btn { width: 44px; height: 44px; }
  /* Let the demo fill the viewport width — no device frame on phones */
  .mall-stage-wrap { padding: 0; }
  .mall-frame-shell,
  .mall-frame-shell[data-device="tablet"],
  .mall-frame-shell[data-device="phone"] {
    max-width: 100%;
    height: 100%;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }
  .mall-bottom {
    padding: 8px 12px;
    gap: 10px;
  }
  .mall-bottom .linkish {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 8px 4px;
    text-decoration: none;
  }
  /* Phones: toolbar already has Color & layout; keep the footer to two actions */
  .mall-bottom #btn-toggle-theme,
  .mall-bottom #btn-pin-looks,
  .mall-bottom .mall-sep:nth-of-type(n + 2) {
    display: none;
  }
}

@media (max-width: 560px) {
  .mall-top-actions #btn-prev { display: none; }
  .mall-top-actions #btn-next { flex: 1 1 auto; }
  .mall-top-actions .mall-looks-btn { font-size: 12px; padding: 10px 12px; }
  .mall-crumb { max-width: calc(100vw - 80px); }
  .mall-top-actions #btn-next { font-size: 13px; }
  .mall-bottom-left { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .mall-tooltip { transition: none; }
  .mall-frame-shell { transition: none; }
  .mall-nav { scroll-behavior: auto; }
  .mall-next:hover { transform: none; }
}
