/*
 * Lingxuan AI authenticated product system.
 * One restrained vocabulary for all 57 customer-facing tools.
 */

.tb-app[data-ui-style="playful"] {
  --lx-brand: #ea580c;
  --lx-brand-deep: #9a3412;
  --lx-brand-soft: #fff7ed;
  --lx-ink: #1c1917;
  --lx-ink-2: #44403c;
  --lx-muted: #78716c;
  --lx-faint: #a8a29e;
  --lx-line: #e7e2dd;
  --lx-line-strong: #d6cfc7;
  --lx-canvas: #faf8f5;
  --lx-surface: #ffffff;
  --lx-surface-2: #f5f1ec;
  --lx-mint: #dff7ed;
  --lx-mint-ink: #176b57;
  --lx-yellow: #fef3c7;
  --lx-yellow-ink: #7c3d00;
  --lx-blue: #e6f1ff;
  --lx-blue-ink: #245f9a;
  --lx-danger: #ba3340;
  --lx-danger-soft: #fff0f2;
  --lx-radius: 8px;
  --lx-sidebar: 232px;
  --lx-ease: cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  min-height: 100dvh;
  color: var(--lx-ink);
  background: var(--lx-canvas);
  font-family: "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0;
}

.tb-app[data-ui-style="playful"] *,
.tb-app[data-ui-style="playful"] *::before,
.tb-app[data-ui-style="playful"] *::after {
  box-sizing: border-box;
}

.tb-app[data-ui-style="playful"] :where(a, button, input, textarea, select, summary) {
  font: inherit;
  letter-spacing: 0;
  -webkit-tap-highlight-color: transparent;
}

.tb-app[data-ui-style="playful"] :where(a, button, summary) { touch-action: manipulation; }

.tb-app[data-ui-style="playful"] :where(a, button, input, textarea, select, summary):focus-visible {
  outline: 3px solid rgb(229 72 61 / 22%);
  outline-offset: 2px;
}

.tb-app[data-ui-style="playful"] :where(h1, h2, h3, h4) {
  color: var(--lx-ink);
  letter-spacing: -.015em;
  text-wrap: balance;
}

.tb-app[data-ui-style="playful"] :where(p, li, figcaption) { text-wrap: pretty; }

/* App shell */

.tb-app[data-ui-style="playful"] .tb-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex: 0 0 var(--lx-sidebar);
  flex-direction: column;
  width: var(--lx-sidebar);
  height: 100dvh;
  max-height: 100dvh;
  padding: 12px 10px 10px;
  border-right: 1px solid var(--lx-line);
  background: #fff;
  box-shadow: 4px 0 8px rgb(36 42 57 / 4%);
  overflow: hidden;
}

.tb-app[data-ui-style="playful"] .tb-sidebar-head {
  display: flex;
  align-items: center;
  min-height: 56px;
  margin: 0 2px 8px;
  padding: 2px 2px 10px;
  border-bottom: 1px solid var(--lx-surface-2);
  gap: 6px;
}

.tb-app[data-ui-style="playful"] .tb-sidebar .tb-brand {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  color: var(--lx-ink);
  text-decoration: none;
  gap: 9px;
}

.tb-app[data-ui-style="playful"] :where(.tb-sidebar, .tb-mobile-topbar) .tb-brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 0 #f2a49d;
  overflow: hidden;
}

.tb-app[data-ui-style="playful"] :where(.tb-sidebar, .tb-mobile-topbar) .tb-brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tb-app[data-ui-style="playful"] .tb-brand-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  color: var(--lx-ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.18;
}

.tb-app[data-ui-style="playful"] .tb-brand-text small {
  margin-top: 3px;
  color: var(--lx-muted);
  font-size: 10px;
  font-weight: 560;
}

.tb-app[data-ui-style="playful"] :where([data-sidebar-collapse], [data-sidebar-close], [data-sidebar-open]) {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid var(--lx-line);
  border-radius: 8px;
  color: var(--lx-ink-2);
  background: var(--lx-surface-2);
  box-shadow: 0 2px 0 var(--lx-line-strong);
  overflow: hidden;
  transition: color 170ms var(--lx-ease), background-color 170ms var(--lx-ease), box-shadow 170ms var(--lx-ease), transform 170ms var(--lx-ease);
}

.tb-app[data-ui-style="playful"] :where([data-sidebar-collapse], [data-sidebar-close], [data-sidebar-open]):hover {
  color: var(--lx-brand);
  background: var(--lx-brand-soft);
}

.tb-app[data-ui-style="playful"] :where([data-sidebar-collapse], [data-sidebar-close], [data-sidebar-open]):active {
  box-shadow: 0 1px 0 var(--lx-line-strong);
  transform: translateY(1px);
}

.tb-app[data-ui-style="playful"] .tb-side-nav {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 0 3px 8px 0;
  gap: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.tb-app[data-ui-style="playful"] .tb-side-hubs,
.tb-app[data-ui-style="playful"] .tb-side-group {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 3px;
}

.tb-app[data-ui-style="playful"] .tb-side-hubs > strong,
.tb-app[data-ui-style="playful"] .tb-side-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding: 7px 8px 3px;
  color: #7a8293;
  font-size: 10px;
  font-weight: 720;
}

.tb-app[data-ui-style="playful"] .tb-side-group-title em {
  color: #949bab;
  font-size: 10px;
  font-style: normal;
}

.tb-app[data-ui-style="playful"] :where(.tb-side-hubs > a, .tb-side-group > a, .tb-side-pill) {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--lx-ink-2);
  background: transparent;
  font-size: 13px;
  font-weight: 620;
  text-decoration: none;
  gap: 9px;
  transition: color 170ms var(--lx-ease), background-color 170ms var(--lx-ease), transform 170ms var(--lx-ease);
}

.tb-app[data-ui-style="playful"] :where(.tb-side-hubs > a, .tb-side-group > a, .tb-side-pill) > i {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: #6f788b;
  background: var(--lx-surface-2);
  transition: color 170ms var(--lx-ease), background-color 170ms var(--lx-ease), transform 170ms var(--lx-ease);
}

.tb-app[data-ui-style="playful"] :where(.tb-side-hubs > a, .tb-side-group > a, .tb-side-pill):hover {
  color: var(--lx-ink);
  background: var(--lx-surface-2);
  transform: translateX(2px);
}

.tb-app[data-ui-style="playful"] :where(.tb-side-hubs > a, .tb-side-group > a, .tb-side-pill):hover > i {
  color: var(--lx-brand);
  background: var(--lx-brand-soft);
  transform: rotate(-3deg);
}

.tb-app[data-ui-style="playful"] :where(.tb-side-hubs > a.active, .tb-side-group > a.active, .tb-side-pill.active) {
  color: #9a3412;
  background: var(--lx-brand-soft);
  font-weight: 740;
}

.tb-app[data-ui-style="playful"] :where(.tb-side-hubs > a.active, .tb-side-group > a.active, .tb-side-pill.active) > i {
  color: #fff;
  background: var(--lx-brand);
  box-shadow: 0 3px 0 var(--lx-brand-deep);
}

.tb-app[data-ui-style="playful"] :where(.tb-side-hubs > a, .tb-side-group > a) > span {
  min-width: 0;
  flex: 1 1 auto;
}

.tb-app[data-ui-style="playful"] :where(.tb-side-hubs > a, .tb-side-group > a) > small {
  padding: 3px 6px;
  border-radius: 999px;
  color: #9a3412;
  background: var(--lx-brand-soft);
  font-size: 11px;
  font-weight: 760;
}

.tb-app[data-ui-style="playful"] .tb-side-primary {
  padding-top: 8px;
  border-top: 1px solid var(--lx-surface-2);
}

.tb-app[data-ui-style="playful"] .tb-sidebar-foot {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--lx-surface-2);
}

.tb-app[data-ui-style="playful"] .tb-sidebar-profile {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 54px;
  padding: 8px;
  border-radius: 8px;
  color: var(--lx-ink);
  background: var(--lx-surface-2);
  text-decoration: none;
  gap: 8px;
}

.tb-app[data-ui-style="playful"] .tb-sidebar-profile > span,
.tb-app[data-ui-style="playful"] .tb-topbar-profile > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #fff;
  background: #252936;
  font-size: 13px;
  font-weight: 780;
}

.tb-app[data-ui-style="playful"] .tb-sidebar-profile div,
.tb-app[data-ui-style="playful"] .tb-topbar-profile div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.tb-app[data-ui-style="playful"] .tb-sidebar-profile strong,
.tb-app[data-ui-style="playful"] .tb-topbar-profile strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 740;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tb-app[data-ui-style="playful"] .tb-sidebar-profile small,
.tb-app[data-ui-style="playful"] .tb-topbar-profile small {
  color: var(--lx-muted);
  font-size: 11px;
}

.tb-app[data-ui-style="playful"] .tb-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 14px 22px 48px;
  background: transparent;
}

.tb-app[data-ui-style="playful"] .tb-main > * {
  width: min(100%, 1320px);
  margin-right: auto;
  margin-left: auto;
}

.tb-app[data-ui-style="playful"] .tb-mobile-topbar { display: none; }

.tb-app[data-ui-style="playful"] .tb-topbar {
  position: sticky;
  top: 10px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  margin-bottom: 12px;
  padding: 7px 9px 7px 16px;
  border: 1px solid var(--lx-line);
  border-radius: 8px;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 4px 8px rgb(34 40 55 / 6%);
  gap: 16px;
}

.tb-app[data-ui-style="playful"] .tb-topbar-title {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.tb-app[data-ui-style="playful"] .tb-topbar-title > span {
  color: var(--lx-muted);
  font-size: 11px;
  font-weight: 680;
}

.tb-app[data-ui-style="playful"] .tb-topbar h1 {
  margin: 1px 0 0;
  color: var(--lx-ink);
  font-size: 17px;
  font-weight: 810;
  line-height: 1.25;
}

.tb-app[data-ui-style="playful"] .tb-userbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.tb-app[data-ui-style="playful"] :where(.tb-topbar-create, .tb-points-pill, .tb-topbar-profile, .tb-icon-button) {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border-radius: 8px;
  color: var(--lx-ink-2);
  text-decoration: none;
  overflow: hidden;
  transition: color 170ms var(--lx-ease), background-color 170ms var(--lx-ease), box-shadow 170ms var(--lx-ease), transform 170ms var(--lx-ease);
}

.tb-app[data-ui-style="playful"] .tb-topbar-create {
  padding: 0 13px;
  color: #fff;
  background: var(--lx-brand);
  box-shadow: 0 3px 0 var(--lx-brand-deep);
  font-size: 12px;
  font-weight: 740;
  gap: 6px;
}

.tb-app[data-ui-style="playful"] .tb-points-pill {
  padding: 0 11px;
  color: var(--lx-yellow-ink);
  background: var(--lx-yellow);
  font-size: 11px;
  gap: 5px;
}

.tb-app[data-ui-style="playful"] .tb-points-pill strong { color: #563b00; font-size: 13px; }

.tb-app[data-ui-style="playful"] .tb-topbar-profile {
  padding: 4px 9px 4px 5px;
  background: var(--lx-surface-2);
  gap: 7px;
}

.tb-app[data-ui-style="playful"] .tb-icon-button {
  justify-content: center;
  width: 42px;
  padding: 0;
  border: 1px solid var(--lx-line);
  background: #fff;
  box-shadow: 0 2px 0 var(--lx-line-strong);
}

.tb-app[data-ui-style="playful"] :where(.tb-topbar-create, .tb-points-pill, .tb-topbar-profile, .tb-icon-button):hover { transform: translateY(-1px); }
.tb-app[data-ui-style="playful"] .tb-topbar-create:hover { background: #ea580c; box-shadow: 0 4px 0 #9a3412; }
.tb-app[data-ui-style="playful"] .tb-icon-button:hover { color: var(--lx-brand); background: var(--lx-brand-soft); }
.tb-app[data-ui-style="playful"] :where(.tb-topbar-create, .tb-icon-button):active { box-shadow: 0 1px 0 var(--lx-line-strong); transform: translateY(2px); }

.tb-app[data-ui-style="playful"] .tb-destination-context {
  display: flex;
  align-items: center;
  min-height: 48px;
  margin-bottom: 12px;
  padding: 6px 8px;
  border: 1px solid var(--lx-line);
  border-radius: 8px;
  background: #fff;
  gap: 8px;
}

.tb-app[data-ui-style="playful"] .tb-destination-context :where(a, button) {
  min-height: 36px;
  border-radius: 7px;
}

.tb-app[data-ui-style="playful"] .tb-destination-crumb {
  min-width: 0;
  color: var(--lx-muted);
  font-size: 11px;
}

/* Universal controls */

.tb-app[data-ui-style="playful"] .tb-btn,
.tb-app[data-ui-style="playful"] :where(button, input[type="button"], input[type="submit"]):not([data-sidebar-backdrop]):not([data-sidebar-collapse]):not([data-sidebar-close]):not([data-sidebar-open]) {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--lx-line-strong);
  border-radius: 8px;
  color: #343b4c;
  background: #fff;
  box-shadow: 0 3px 0 var(--lx-line-strong);
  font-size: 12px;
  font-weight: 710;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  transition: color 170ms var(--lx-ease), background-color 170ms var(--lx-ease), border-color 170ms var(--lx-ease), box-shadow 170ms var(--lx-ease), transform 170ms var(--lx-ease);
}

.tb-app[data-ui-style="playful"] :where(.tb-btn, button):hover { transform: translateY(-1px); }

.tb-app[data-ui-style="playful"] :where(.tb-btn, button).primary,
.tb-app[data-ui-style="playful"] :where(.tb-btn, button)[data-primary-action] {
  border-color: var(--lx-brand);
  color: #fff;
  background: var(--lx-brand);
  box-shadow: 0 4px 0 var(--lx-brand-deep);
}

.tb-app[data-ui-style="playful"] :where(.tb-btn, button).primary:hover,
.tb-app[data-ui-style="playful"] :where(.tb-btn, button)[data-primary-action]:hover {
  border-color: #ea580c;
  background: #ea580c;
  box-shadow: 0 5px 0 #9a3412;
}

.tb-app[data-ui-style="playful"] :where(.tb-btn, button):active,
.tb-app[data-ui-style="playful"] :where(.tb-btn, button)[data-ui-pressed="true"] {
  box-shadow: 0 1px 0 var(--lx-line-strong);
  transform: translateY(2px) scale(.99);
}

.tb-app[data-ui-style="playful"] :where(.tb-btn, button).primary:active,
.tb-app[data-ui-style="playful"] :where(.tb-btn, button).primary[data-ui-pressed="true"] {
  box-shadow: 0 1px 0 var(--lx-brand-deep);
}

.tb-app[data-ui-style="playful"] :where(.tb-btn, button, input[type="submit"]):disabled,
.tb-app[data-ui-style="playful"] :where(.tb-btn, button)[aria-disabled="true"] {
  border-color: #dfe2e8;
  color: #929aaa;
  background: #eceef2;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.tb-app[data-ui-style="playful"] .tb-btn.compact { min-height: 36px; padding: 0 11px; }
.tb-app[data-ui-style="playful"] .tb-btn.big { min-height: 48px; padding: 0 20px; font-size: 13px; }
.tb-app[data-ui-style="playful"] .tb-btn.full { width: 100%; }

.tb-app[data-ui-style="playful"] .ui-press-wave {
  position: absolute;
  z-index: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgb(255 255 255 / 40%);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  animation: lx-press-wave 180ms var(--lx-ease) forwards;
}

@keyframes lx-press-wave {
  to { opacity: 0; transform: translate(-50%, -50%) scale(14); }
}

/* Panels, typography and form system */

.tb-app[data-ui-style="playful"] :where(.tb-panel, .tb-specific-form, .tb-reference-creator-card, .tb-template-creator-form, .tb-account-panel, .tb-template-market-studio) {
  border: 1px solid var(--lx-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 6px rgb(33 39 54 / 5%);
}

.tb-app[data-ui-style="playful"] :where(.tb-panel, .tb-specific-form, .tb-reference-creator-card, .tb-template-creator-form, .tb-account-panel) {
  padding: 20px;
}

.tb-app[data-ui-style="playful"] :where(.tb-panel, .tb-specific-form, .tb-reference-creator-card, .tb-template-creator-form) :where(.tb-panel, section section) {
  box-shadow: none;
}

.tb-app[data-ui-style="playful"] :where(.tb-panel-head, .tb-studio-head, .tb-reference-pagehead) {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.tb-app[data-ui-style="playful"] :where(.tb-panel-head, .tb-studio-head, .tb-reference-pagehead) :where(h2, h3) {
  margin: 0;
  font-size: 18px;
  font-weight: 810;
}

.tb-app[data-ui-style="playful"] :where(.tb-panel-head, .tb-studio-head, .tb-reference-pagehead) p {
  max-width: 68ch;
  margin: 6px 0 0;
  color: var(--lx-muted);
  font-size: 12px;
}

.tb-app[data-ui-style="playful"] .tb-form-grid,
.tb-app[data-ui-style="playful"] .tb-product-fields,
.tb-app[data-ui-style="playful"] .tb-context-editor-fields,
.tb-app[data-ui-style="playful"] .tb-template-branch-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tb-app[data-ui-style="playful"] :where(.tb-field, .tb-form-grid > label, .tb-product-fields > label, .tb-context-editor-fields > label, .tb-template-branch-field) {
  display: grid;
  min-width: 0;
  color: #41495a;
  font-size: 11px;
  font-weight: 710;
  gap: 6px;
}

.tb-app[data-ui-style="playful"] :where(.tb-field.full, .tb-form-grid > .full, .tb-product-fields > .full) { grid-column: 1 / -1; }

.tb-app[data-ui-style="playful"] :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea, select) {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--lx-line-strong);
  border-radius: 8px;
  outline: 0;
  color: var(--lx-ink);
  background: #fff;
  box-shadow: inset 0 1px 2px rgb(31 37 50 / 4%);
  font-size: 13px;
  font-weight: 500;
  transition: border-color 170ms var(--lx-ease), box-shadow 170ms var(--lx-ease), background-color 170ms var(--lx-ease);
}

.tb-app[data-ui-style="playful"] textarea { min-height: 104px; line-height: 1.65; resize: vertical; }

.tb-app[data-ui-style="playful"] :where(input, textarea)::placeholder { color: #667085; opacity: 1; }

.tb-app[data-ui-style="playful"] :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea, select):focus {
  border-color: var(--lx-brand);
  box-shadow: 0 0 0 4px rgb(229 72 61 / 10%);
}

.tb-app[data-ui-style="playful"] :where(input[type="checkbox"], input[type="radio"]) { accent-color: var(--lx-brand); }

.tb-app[data-ui-style="playful"] :where(.tb-form-actions, .tb-studio-submit, .tb-product-submit) {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e8eaf0;
  gap: 10px;
}

.tb-app[data-ui-style="playful"] .tb-studio-submit {
  position: sticky;
  bottom: 10px;
  z-index: 18;
  padding: 10px;
  border: 1px solid var(--lx-line);
  border-radius: 8px;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 5px 10px rgb(32 38 52 / 9%);
}

/* Mode selectors */

.tb-app[data-ui-style="playful"] :where(.tb-mode-tabs, .tb-tool-mode-tabs, .tb-aicopy-mode-tabs, .tb-aicopy-modes, .tb-content-tabs, .tb-design-center-tabs, .tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row, .tb-choice-cards) {
  display: flex;
  align-items: stretch;
  padding: 5px;
  border-radius: 8px;
  background: var(--lx-surface-2);
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tb-app[data-ui-style="playful"] :where(.tb-mode-tabs, .tb-tool-mode-tabs, .tb-aicopy-mode-tabs, .tb-aicopy-modes, .tb-content-tabs, .tb-design-center-tabs, .tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row, .tb-choice-cards)::-webkit-scrollbar { display: none; }

.tb-app[data-ui-style="playful"] :where(.tb-mode-tabs, .tb-tool-mode-tabs, .tb-aicopy-mode-tabs, .tb-aicopy-modes, .tb-content-tabs, .tb-design-center-tabs, .tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row, .tb-choice-cards) :where(label, button, a) {
  position: relative;
  flex: 1 0 max-content;
  min-width: 0;
  min-height: 48px;
  padding: 9px 12px;
  border: 0;
  border-radius: 7px;
  color: var(--lx-ink-2);
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  font-weight: 680;
  text-decoration: none;
  transition: color 180ms var(--lx-ease), background-color 180ms var(--lx-ease), box-shadow 180ms var(--lx-ease), transform 180ms var(--lx-ease);
}

.tb-app[data-ui-style="playful"] :where(.tb-mode-tabs, .tb-tool-mode-tabs, .tb-aicopy-mode-tabs, .tb-aicopy-modes, .tb-content-tabs, .tb-design-center-tabs, .tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row, .tb-choice-cards) input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tb-app[data-ui-style="playful"] :where(.tb-mode-tabs, .tb-tool-mode-tabs, .tb-aicopy-mode-tabs, .tb-aicopy-modes, .tb-content-tabs, .tb-design-center-tabs, .tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row, .tb-choice-cards) :where(.active, [aria-selected="true"], :has(input:checked)) {
  color: #9a3412;
  background: #fff;
  box-shadow: 0 3px 0 var(--lx-line-strong);
}

.tb-app[data-ui-style="playful"] [data-ui-selection-transition="entering"] {
  animation: lx-selection-enter 180ms var(--lx-ease);
}

@keyframes lx-selection-enter {
  from { opacity: .68; transform: translateY(2px) scale(.985); }
  to { opacity: 1; transform: none; }
}

/* Upload and saved context */

.tb-app[data-ui-style="playful"] :where(.tb-upload-drop, .tb-upload-box, [data-commercial-upload]) {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 132px;
  padding: 18px;
  border: 1px dashed var(--lx-line-strong);
  border-radius: 8px;
  color: var(--lx-ink-2);
  background: var(--lx-surface-2);
  text-align: center;
  cursor: pointer;
  gap: 7px;
  overflow: hidden;
  transition: border-color 180ms var(--lx-ease), background-color 180ms var(--lx-ease), box-shadow 180ms var(--lx-ease), transform 180ms var(--lx-ease);
}

.tb-app[data-ui-style="playful"] :where(.tb-upload-drop, .tb-upload-box, [data-commercial-upload]):hover {
  border-color: var(--lx-brand);
  background: #fff7f5;
}

.tb-app[data-ui-style="playful"] :where(.tb-upload-drop, .tb-upload-box, [data-commercial-upload]).is-ui-dragging,
.tb-app[data-ui-style="playful"] :where(.tb-upload-drop, .tb-upload-box, [data-commercial-upload])[data-ui-drag-state="active"] {
  border-color: var(--lx-brand);
  background: var(--lx-brand-soft);
  box-shadow: inset 0 0 0 2px rgb(229 72 61 / 12%);
  transform: scale(.995);
}

.tb-app[data-ui-style="playful"] :where(.tb-upload-drop, .tb-upload-box, [data-commercial-upload])[data-ui-upload-state="filled"] {
  border-style: solid;
  border-color: #9fcfbe;
  color: var(--lx-mint-ink);
  background: #effaf6;
}

.tb-app[data-ui-style="playful"] :where(.tb-upload-drop, .tb-upload-box, [data-commercial-upload])[data-ui-upload-state="disabled"] {
  opacity: .6;
  cursor: not-allowed;
}

.tb-app[data-ui-style="playful"] :where(.tb-upload-drop, .tb-upload-box) input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.tb-app[data-ui-style="playful"] .tb-upload-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  color: #fff;
  background: var(--lx-brand);
  box-shadow: 0 4px 0 var(--lx-brand-deep);
}

.tb-app[data-ui-style="playful"] .tb-upload-mark::before {
  content: "+";
  font-size: 25px;
  font-weight: 500;
}

.tb-app[data-ui-style="playful"] .tb-generation-context {
  margin: 14px 0;
  padding: 14px;
  border-radius: 8px;
  background: var(--lx-surface-2);
}

.tb-app[data-ui-style="playful"] .tb-generation-context > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}

.tb-app[data-ui-style="playful"] .tb-generation-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tb-app[data-ui-style="playful"] .tb-context-picker {
  position: relative;
  min-width: 0;
}

.tb-app[data-ui-style="playful"] .tb-context-picker > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--lx-line-strong);
  border-radius: 8px;
  color: var(--lx-ink-2);
  background: #fff;
  cursor: pointer;
  list-style: none;
  gap: 10px;
}

.tb-app[data-ui-style="playful"] .tb-context-picker > summary::-webkit-details-marker { display: none; }
.tb-app[data-ui-style="playful"] .tb-context-picker > summary em { color: var(--lx-brand-deep); font-size: 11px; font-style: normal; }

.tb-app[data-ui-style="playful"] .tb-context-picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 45;
  max-height: 260px;
  padding: 8px;
  border: 1px solid var(--lx-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 14px rgb(28 33 46 / 14%);
  overflow: auto;
}

.tb-app[data-ui-style="playful"] .tb-context-selected {
  display: flex;
  flex-wrap: wrap;
  margin-top: 9px;
  gap: 6px;
}

.tb-app[data-ui-style="playful"] .tb-context-selected:empty { display: none; }

.tb-app[data-ui-style="playful"] .tb-context-selected > * {
  padding: 6px 9px;
  border-radius: 999px;
  color: #9a3412;
  background: var(--lx-brand-soft);
  font-size: 10px;
  font-weight: 680;
}

/* Hub pages */

.tb-app[data-ui-style="playful"] .tb-tool-hub {
  display: grid;
  gap: 12px;
}

.tb-app[data-ui-style="playful"] .tb-tool-hub-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 210px;
  padding: 28px 30px;
  border-radius: 8px;
  color: #fff;
  background: #2b241d;
  overflow: hidden;
  gap: 20px;
}

.tb-app[data-ui-style="playful"] .tb-tool-hub-head::after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -82px;
  width: 220px;
  height: 220px;
  border: 44px solid rgb(229 72 61 / 42%);
  border-radius: 50%;
  pointer-events: none;
}

.tb-app[data-ui-style="playful"] .tb-tool-hub-head > * { position: relative; z-index: 1; }

.tb-app[data-ui-style="playful"] .tb-tool-hub-head > div > span {
  display: block;
  margin-bottom: 6px;
  color: #f3a29b;
  font-size: 11px;
  font-weight: 720;
}

.tb-app[data-ui-style="playful"] .tb-tool-hub-head h2 {
  margin: 0;
  color: #fff;
  font-size: 30px;
  font-weight: 830;
}

.tb-app[data-ui-style="playful"] .tb-tool-hub-head p {
  max-width: 62ch;
  margin: 8px 0 16px;
  color: var(--lx-line-strong);
  font-size: 12px;
}

.tb-app[data-ui-style="playful"] .tb-tool-hub-head ol {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 7px;
}

.tb-app[data-ui-style="playful"] .tb-tool-hub-head ol li {
  min-width: 150px;
  padding: 9px 11px;
  border-radius: 8px;
  color: var(--lx-line);
  background: #2b241d;
  font-size: 10px;
}

.tb-app[data-ui-style="playful"] .tb-tool-hub-head > .tb-btn {
  align-self: start;
  border-color: #444a5a;
  color: #fff;
  background: #2a2e3b;
  box-shadow: 0 3px 0 #0f1118;
}

.tb-app[data-ui-style="playful"] .tb-tool-hub-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr) auto;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--lx-line);
  border-radius: 8px;
  background: #fff;
  gap: 10px;
}

.tb-app[data-ui-style="playful"] .tb-tool-hub-toolbar > label {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 36px;
  align-items: center;
}

.tb-app[data-ui-style="playful"] .tb-tool-hub-toolbar > label > i {
  position: absolute;
  left: 10px;
  z-index: 1;
  color: #7b8496;
}

.tb-app[data-ui-style="playful"] .tb-tool-hub-toolbar > label input { padding-right: 38px; padding-left: 34px; }

.tb-app[data-ui-style="playful"] .tb-tool-hub-toolbar > label button {
  position: absolute;
  right: 3px;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.tb-app[data-ui-style="playful"] .tb-tool-hub-toolbar > nav {
  display: flex;
  min-width: 0;
  padding-bottom: 3px;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tb-app[data-ui-style="playful"] .tb-tool-hub-toolbar > nav::-webkit-scrollbar { display: none; }

.tb-app[data-ui-style="playful"] .tb-tool-hub-toolbar > nav button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.tb-app[data-ui-style="playful"] .tb-tool-hub-toolbar > nav button.active {
  color: #9a3412;
  background: var(--lx-brand-soft);
}

.tb-app[data-ui-style="playful"] .tb-tool-hub-toolbar > output {
  color: var(--lx-muted);
  font-size: 10px;
  white-space: nowrap;
}

.tb-app[data-ui-style="playful"] .tb-tool-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tb-app[data-ui-style="playful"] [data-tool-hub-card] {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--lx-line);
  border-radius: 8px;
  color: var(--lx-ink);
  background: #fff;
  text-decoration: none;
  gap: 12px;
  overflow: hidden;
  transition: border-color 190ms var(--lx-ease), box-shadow 190ms var(--lx-ease), transform 190ms var(--lx-ease);
}

.tb-app[data-ui-style="playful"] [data-tool-hub-card] > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: var(--lx-blue-ink);
  background: var(--lx-blue);
  font-size: 18px;
}

.tb-app[data-ui-style="playful"] [data-tool-hub-card]:nth-child(3n + 2) > span { color: var(--lx-mint-ink); background: var(--lx-mint); }
.tb-app[data-ui-style="playful"] [data-tool-hub-card]:nth-child(3n + 3) > span { color: var(--lx-yellow-ink); background: var(--lx-yellow); }

.tb-app[data-ui-style="playful"] [data-tool-hub-card] > div { min-width: 0; }
.tb-app[data-ui-style="playful"] [data-tool-hub-card] small { color: var(--lx-muted); font-size: 10px; }
.tb-app[data-ui-style="playful"] [data-tool-hub-card] strong { display: block; margin-top: 4px; font-size: 15px; font-weight: 790; }
.tb-app[data-ui-style="playful"] [data-tool-hub-card] p { margin: 6px 0 0; color: var(--lx-muted); font-size: 11px; line-height: 1.6; }
.tb-app[data-ui-style="playful"] [data-tool-hub-card] > em { align-self: start; padding: 4px 7px; border-radius: 999px; color: var(--lx-ink-2); background: var(--lx-surface-2); font-size: 11px; font-style: normal; font-weight: 690; }

.tb-app[data-ui-style="playful"] [data-tool-hub-card]:hover {
  border-color: #c9d0dc;
  box-shadow: 0 5px 0 var(--lx-line);
  transform: translateY(-3px);
}

.tb-app[data-ui-style="playful"] [data-tool-hub-card].featured,
.tb-app[data-ui-style="playful"] [data-tool-hub-primary] {
  grid-column: span 2;
  border-color: var(--lx-brand);
  color: #fff;
  background: var(--lx-brand);
  box-shadow: 0 5px 0 var(--lx-brand-deep);
}

.tb-app[data-ui-style="playful"] [data-tool-hub-primary] > span { color: var(--lx-brand-deep); background: #fff; }
.tb-app[data-ui-style="playful"] [data-tool-hub-primary] :where(small, p) { color: #fff7ed; }
.tb-app[data-ui-style="playful"] [data-tool-hub-primary] > em { color: #9a3412; background: #fff; }
.tb-app[data-ui-style="playful"] [data-tool-hub-primary]:hover { border-color: #ea580c; box-shadow: 0 7px 0 #9a3412; }

.tb-app[data-ui-style="playful"] .tb-tool-hub-empty {
  padding: 40px 20px;
  border: 1px dashed #c8ced9;
  border-radius: 8px;
  color: var(--lx-muted);
  background: var(--lx-surface-2);
  text-align: center;
}

/* Creator and editor pages */

.tb-app[data-ui-style="playful"][data-page-family="creator"] .tb-specific-form,
.tb-app[data-ui-style="playful"][data-page-family="editor"] .tb-specific-form {
  max-width: 1160px;
}

.tb-app[data-ui-style="playful"] :where(.tb-tool-hero, .tb-studio-hero, .tb-ecom-title, .tb-product-note-title, .tb-template-creator > header) {
  margin-bottom: 12px;
  padding: 22px 24px;
  border: 1px solid var(--lx-line);
  border-radius: 8px;
  background: #fff;
}

.tb-app[data-ui-style="playful"] :where(.tb-tool-hero, .tb-studio-hero, .tb-ecom-title, .tb-product-note-title, .tb-template-creator > header) h1,
.tb-app[data-ui-style="playful"] :where(.tb-tool-hero, .tb-studio-hero, .tb-ecom-title, .tb-product-note-title, .tb-template-creator > header) h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 830;
}

.tb-app[data-ui-style="playful"] :where(.tb-tool-hero, .tb-studio-hero, .tb-ecom-title, .tb-product-note-title, .tb-template-creator > header) p {
  max-width: 70ch;
  margin: 7px 0 0;
  color: var(--lx-muted);
  font-size: 12px;
}

.tb-app[data-ui-style="playful"] :where(.tb-yiju-reference, .tb-product-note-reference, .tb-template-reference) {
  display: grid;
  gap: 12px;
}

.tb-app[data-ui-style="playful"] .tb-reference-notice,
.tb-app[data-ui-style="playful"] .tb-alert {
  padding: 11px 13px;
  border-radius: 8px;
  color: #644b12;
  background: #fff5cf;
  font-size: 11px;
}

.tb-app[data-ui-style="playful"] .tb-alert.error,
.tb-app[data-ui-style="playful"] .tb-status.error,
.tb-app[data-ui-style="playful"] [data-ui-feedback="error"] {
  color: #992c34;
  background: var(--lx-danger-soft);
}

.tb-app[data-ui-style="playful"] .tb-alert.ok,
.tb-app[data-ui-style="playful"] .tb-status.ok,
.tb-app[data-ui-style="playful"] [data-ui-feedback="success"] {
  color: var(--lx-mint-ink);
  background: var(--lx-mint);
}

.tb-app[data-ui-style="playful"] .tb-empty,
.tb-app[data-ui-style="playful"] [data-ui-feedback="empty"] {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 24px;
  border: 1px dashed var(--lx-line-strong);
  border-radius: 8px;
  color: var(--lx-muted);
  background: var(--lx-surface-2);
  text-align: center;
  gap: 5px;
}

.tb-app[data-ui-style="playful"] .tb-empty.compact { min-height: 92px; padding: 16px; }

.tb-app[data-ui-style="playful"] .tb-status:not(:empty) {
  display: block;
  padding: 9px 11px;
  border-radius: 8px;
  color: var(--lx-ink-2);
  background: var(--lx-surface-2);
  font-size: 11px;
}

.tb-app[data-ui-style="playful"] [data-ui-submit-state="loading"],
.tb-app[data-ui-style="playful"] [data-loading="true"],
.tb-app[data-ui-style="playful"] [data-ui-loading="true"] {
  cursor: progress;
}

.tb-app[data-ui-style="playful"] :where(button, .tb-btn)[data-ui-loading="true"]::before,
.tb-app[data-ui-style="playful"] :where(button, .tb-btn)[data-loading="true"]::before {
  content: "";
  width: 14px;
  height: 14px;
  margin-right: 7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: lx-spin .7s linear infinite;
}

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

/* Templates and effect examples */

.tb-app[data-ui-style="playful"] .tb-template-market-studio {
  padding: 18px;
}

.tb-app[data-ui-style="playful"] :where(.tb-template-type-nav, .tb-template-industry-row .tb-chip-row) {
  display: flex;
  min-width: 0;
  padding-bottom: 4px;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tb-app[data-ui-style="playful"] :where(.tb-template-type-nav, .tb-template-industry-row .tb-chip-row)::-webkit-scrollbar { display: none; }

.tb-app[data-ui-style="playful"] :where(.tb-template-type-nav, .tb-template-industry-row .tb-chip-row) :where(a, button, label) {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 12px;
  box-shadow: none;
}

.tb-app[data-ui-style="playful"] .tb-template-market-grid,
.tb-app[data-ui-style="playful"] .tb-template-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(174px, 1fr));
  gap: 12px;
}

.tb-app[data-ui-style="playful"] :where(.tb-template-market-card, .tb-template-card, .tb-popular-template-card) {
  position: relative;
  min-width: 0;
  border: 1px solid var(--lx-line);
  border-radius: 8px;
  color: var(--lx-ink);
  background: #fff;
  overflow: hidden;
  transition: border-color 190ms var(--lx-ease), box-shadow 190ms var(--lx-ease), transform 190ms var(--lx-ease);
}

.tb-app[data-ui-style="playful"] :where(.tb-template-market-card, .tb-template-card, .tb-popular-template-card):hover,
.tb-app[data-ui-style="playful"] :where(.tb-template-market-card, .tb-template-card, .tb-popular-template-card)[data-ui-template-state="hover"],
.tb-app[data-ui-style="playful"] :where(.tb-template-market-card, .tb-template-card, .tb-popular-template-card):focus-within {
  border-color: var(--lx-line-strong);
  box-shadow: 0 6px 0 var(--lx-line);
  transform: translateY(-3px);
}

.tb-app[data-ui-style="playful"] .tb-template-market-thumb {
  display: block;
  background: var(--lx-surface-2);
  overflow: hidden;
}

.tb-app[data-ui-style="playful"] .tb-template-market-thumb img,
.tb-app[data-ui-style="playful"] :where(.tb-template-market-card, .tb-template-card, .tb-popular-template-card) > img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  transition: transform 240ms var(--lx-ease);
}

.tb-app[data-ui-style="playful"] :where(.tb-template-market-card, .tb-template-card, .tb-popular-template-card):hover img { transform: scale(1.025); }

.tb-app[data-ui-style="playful"] .tb-template-market-copy {
  display: grid;
  padding: 10px;
  gap: 3px;
}

.tb-app[data-ui-style="playful"] .tb-template-market-copy strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tb-app[data-ui-style="playful"] .tb-template-market-copy em {
  color: var(--lx-muted);
  font-size: 10px;
  font-style: normal;
}

.tb-app[data-ui-style="playful"] .tb-template-market-hover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  background: rgb(19 22 30 / 68%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--lx-ease);
}

.tb-app[data-ui-style="playful"] .tb-template-market-card:is(:hover, :focus-within) .tb-template-market-hover {
  opacity: 1;
  pointer-events: auto;
}

.tb-app[data-ui-style="playful"] .tb-template-market-hover :where(button, a) {
  min-height: 40px;
  color: #fff;
  background: var(--lx-brand);
  border-color: var(--lx-brand);
  box-shadow: 0 3px 0 var(--lx-brand-deep);
}

.tb-app[data-ui-style="playful"] .tb-selected-template {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 8px;
  color: #3f4658;
  background: #eef6ff;
  gap: 12px;
}

.tb-app[data-ui-style="playful"] .tb-selected-template > img {
  width: 76px;
  height: 76px;
  border-radius: 7px;
  object-fit: cover;
}

/* Libraries, works, billing and tables */

.tb-app[data-ui-style="playful"] :where(.tb-library-record-list, .tb-post-grid, .tb-material-grid) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.tb-app[data-ui-style="playful"] :where(.tb-library-record, .tb-material-card, .tb-post-card) {
  min-width: 0;
  border: 1px solid var(--lx-line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  transition: border-color 180ms var(--lx-ease), box-shadow 180ms var(--lx-ease), transform 180ms var(--lx-ease);
}

.tb-app[data-ui-style="playful"] :where(.tb-library-record, .tb-material-card, .tb-post-card):hover {
  border-color: var(--lx-line-strong);
  box-shadow: 0 5px 0 var(--lx-line);
  transform: translateY(-2px);
}

.tb-app[data-ui-style="playful"] .tb-account-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  padding: 20px;
  border-radius: 8px;
  color: #fff;
  background: #2b241d;
  gap: 14px;
}

.tb-app[data-ui-style="playful"] .tb-account-hero :where(h2, strong) { color: #fff; }
.tb-app[data-ui-style="playful"] .tb-account-avatar { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 8px; color: #fff; background: var(--lx-brand); font-size: 20px; font-weight: 800; }
.tb-app[data-ui-style="playful"] .tb-account-metrics { display: flex; flex-wrap: wrap; gap: 8px; }
.tb-app[data-ui-style="playful"] .tb-account-metrics > div { min-width: 120px; padding: 10px; border-radius: 8px; color: var(--lx-line); background: #2b241d; }

.tb-app[data-ui-style="playful"] .tb-account-tabs {
  display: flex;
  margin: 12px 0;
  padding: 5px;
  border-radius: 8px;
  background: #e9ecf1;
  gap: 5px;
  overflow-x: auto;
}

.tb-app[data-ui-style="playful"] .tb-account-tabs a {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 7px;
  color: var(--lx-ink-2);
  text-decoration: none;
  line-height: 40px;
}

.tb-app[data-ui-style="playful"] .tb-account-tabs a.active { color: #9a3412; background: #fff; box-shadow: 0 3px 0 var(--lx-line-strong); }

.tb-app[data-ui-style="playful"] table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--lx-line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.tb-app[data-ui-style="playful"] thead th {
  padding: 10px 12px;
  color: var(--lx-ink-2);
  background: #f2f4f7;
  font-size: 10px;
  font-weight: 760;
  text-align: left;
}

.tb-app[data-ui-style="playful"] tbody td {
  padding: 11px 12px;
  border-top: 1px solid var(--lx-surface-2);
  color: var(--lx-ink-2);
  font-size: 11px;
}

.tb-app[data-ui-style="playful"] tbody tr:hover td { background: #fafbfc; }

/* Dialogs */

.tb-app[data-ui-style="playful"] :where(.tb-commercial-dialog, .tb-membership-checkout-dialog, .tb-material-picker-dialog, .tb-template-preview-dialog, .tb-context-editor) {
  width: min(760px, calc(100vw - 28px));
  max-height: min(760px, calc(100dvh - 32px));
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: var(--lx-ink);
  background: #fff;
  box-shadow: 0 18px 48px rgb(18 21 29 / 24%);
  overflow: auto;
}

.tb-app[data-ui-style="playful"] :where(.tb-commercial-dialog, .tb-membership-checkout-dialog, .tb-material-picker-dialog, .tb-template-preview-dialog, .tb-context-editor)::backdrop {
  background: rgb(18 20 28 / 68%);
}

.tb-app[data-ui-style="playful"] :where(.tb-commercial-dialog, .tb-membership-checkout-dialog, .tb-material-picker-dialog, .tb-template-preview-dialog, .tb-context-editor)[data-ui-dialog-state="open"] {
  animation: lx-dialog-enter 190ms var(--lx-ease);
}

@keyframes lx-dialog-enter {
  from { opacity: .6; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: none; }
}

/* Responsive */

@media (max-width: 1180px) {
  .tb-app[data-ui-style="playful"] { --lx-sidebar: 216px; }
  .tb-app[data-ui-style="playful"] .tb-main { padding-right: 16px; padding-left: 16px; }
  .tb-app[data-ui-style="playful"] .tb-tool-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .tb-app[data-ui-style="playful"] { display: block; min-height: 100dvh; }

  .tb-app[data-ui-style="playful"] .tb-mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 55;
    display: grid;
    grid-template-columns: 44px 38px minmax(0, 1fr) 44px;
    align-items: center;
    height: 62px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--lx-line);
    background: #fff;
    box-shadow: 0 4px 8px rgb(31 36 50 / 7%);
    gap: 7px;
  }

  .tb-app[data-ui-style="playful"] .tb-mobile-topbar > strong {
    overflow: hidden;
    font-size: 14px;
    font-weight: 790;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tb-app[data-ui-style="playful"] .tb-mobile-topbar > a:last-child {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    color: #9a3412;
    background: var(--lx-brand-soft);
  }

  .tb-app[data-ui-style="playful"] .tb-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 70;
    width: min(320px, calc(100vw - 48px));
    max-width: 320px;
    height: 100dvh;
    transform: translateX(-106%);
    transition: transform 210ms var(--lx-ease);
  }

  .tb-app[data-ui-style="playful"].sidebar-open .tb-sidebar,
  .tb-app[data-ui-style="playful"] .tb-sidebar.open { transform: translateX(0); }

  .tb-app[data-ui-style="playful"] .tb-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 65;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgb(18 20 28 / 58%);
    box-shadow: none;
  }

  .tb-app[data-ui-style="playful"] .tb-sidebar-backdrop[hidden] { display: none; }
  .tb-app[data-ui-style="playful"] .tb-main { padding: 10px 10px 30px; }
  .tb-app[data-ui-style="playful"] .tb-topbar { display: none; }

  .tb-app[data-ui-style="playful"] .tb-destination-context {
    min-height: 44px;
    margin-bottom: 10px;
    overflow-x: auto;
  }

  .tb-app[data-ui-style="playful"] :where(.tb-panel, .tb-specific-form, .tb-reference-creator-card, .tb-template-creator-form, .tb-account-panel) { padding: 14px 12px; }
  .tb-app[data-ui-style="playful"] :where(.tb-tool-hero, .tb-studio-hero, .tb-ecom-title, .tb-product-note-title, .tb-template-creator > header) { padding: 18px 14px; }
  .tb-app[data-ui-style="playful"] :where(.tb-tool-hero, .tb-studio-hero, .tb-ecom-title, .tb-product-note-title, .tb-template-creator > header) h1,
  .tb-app[data-ui-style="playful"] :where(.tb-tool-hero, .tb-studio-hero, .tb-ecom-title, .tb-product-note-title, .tb-template-creator > header) h3 { font-size: 21px; }

  .tb-app[data-ui-style="playful"] .tb-tool-hub-head {
    display: block;
    min-height: 0;
    padding: 22px 18px;
  }

  .tb-app[data-ui-style="playful"] .tb-tool-hub-head h2 { font-size: 25px; }
  .tb-app[data-ui-style="playful"] .tb-tool-hub-head > .tb-btn { margin-top: 14px; }
  .tb-app[data-ui-style="playful"] .tb-tool-hub-head ol { display: grid; grid-template-columns: minmax(0, 1fr); }

  .tb-app[data-ui-style="playful"] .tb-tool-hub-toolbar {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .tb-app[data-ui-style="playful"] .tb-tool-hub-toolbar > output { display: none; }
  .tb-app[data-ui-style="playful"] .tb-tool-hub-grid { grid-template-columns: minmax(0, 1fr); }
  .tb-app[data-ui-style="playful"] [data-tool-hub-card],
  .tb-app[data-ui-style="playful"] [data-tool-hub-card].featured,
  .tb-app[data-ui-style="playful"] [data-tool-hub-primary] { grid-column: auto; min-height: 132px; padding: 15px; }

  .tb-app[data-ui-style="playful"] .tb-form-grid,
  .tb-app[data-ui-style="playful"] .tb-product-fields,
  .tb-app[data-ui-style="playful"] .tb-context-editor-fields,
  .tb-app[data-ui-style="playful"] .tb-template-branch-fields,
  .tb-app[data-ui-style="playful"] .tb-generation-context-grid { grid-template-columns: minmax(0, 1fr); }

  .tb-app[data-ui-style="playful"] :where(.tb-field.full, .tb-form-grid > .full, .tb-product-fields > .full) { grid-column: auto; }
  .tb-app[data-ui-style="playful"] :where(.tb-mode-tabs, .tb-tool-mode-tabs, .tb-aicopy-mode-tabs, .tb-aicopy-modes, .tb-content-tabs, .tb-design-center-tabs, .tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row, .tb-choice-cards) { align-items: stretch; }
  .tb-app[data-ui-style="playful"] :where(.tb-mode-tabs, .tb-tool-mode-tabs, .tb-aicopy-mode-tabs, .tb-aicopy-modes, .tb-content-tabs, .tb-design-center-tabs, .tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row, .tb-choice-cards) :where(label, button, a) { flex-basis: 82%; }

  .tb-app[data-ui-style="playful"] :where(.tb-form-actions, .tb-studio-submit, .tb-product-submit) {
    align-items: stretch;
    flex-direction: column;
  }

  .tb-app[data-ui-style="playful"] :where(.tb-form-actions, .tb-studio-submit, .tb-product-submit) :where(.tb-btn, button) { width: 100%; min-height: 46px; }
  .tb-app[data-ui-style="playful"] .tb-template-market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .tb-app[data-ui-style="playful"] .tb-selected-template { grid-template-columns: 64px minmax(0, 1fr); }
  .tb-app[data-ui-style="playful"] .tb-selected-template > img { width: 64px; height: 64px; }
  .tb-app[data-ui-style="playful"] .tb-selected-template > :last-child { grid-column: 1 / -1; }
  .tb-app[data-ui-style="playful"] .tb-account-hero { grid-template-columns: auto minmax(0, 1fr); }
  .tb-app[data-ui-style="playful"] .tb-account-metrics { grid-column: 1 / -1; }
  .tb-app[data-ui-style="playful"] table { display: block; overflow-x: auto; }
}

/*
 * Revision 3: production workbench language.
 * The legacy V2 sheet remains for structural compatibility; this final layer
 * deliberately owns the visible product shell and shared controls.
 */
.tb-app[data-ui-revision="3"][data-ui-style="playful"] {
  --lx-brand: #d33b32;
  --lx-brand-deep: #96251f;
  --lx-brand-soft: #fff7ed;
  --lx-ink: #1d2029;
  --lx-ink-2: #343a49;
  --lx-muted: #5f687a;
  --lx-faint: #7b8496;
  --lx-line: #dde2ea;
  --lx-line-strong: #c6ceda;
  --lx-canvas: #f3f5f8;
  --lx-surface-2: #f5f1ec;
  --lx-radius: 12px;
  --lx-sidebar: 228px;
  background: var(--lx-canvas) !important;
  font-size: 14px;
}

/* Shell */
.tb-app[data-ui-revision="3"] .tb-sidebar {
  width: var(--lx-sidebar) !important;
  padding: 12px 10px 10px !important;
  border-right: 1px solid var(--lx-line) !important;
  background: var(--lx-surface-2) !important;
  box-shadow: none !important;
}

.tb-app[data-ui-revision="3"] .tb-sidebar-head {
  min-height: 58px;
  margin: 0 0 10px;
  padding: 2px 2px 10px;
}

.tb-app[data-ui-revision="3"] :where(.tb-sidebar, .tb-mobile-topbar) .tb-brand-mark {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border: 1px solid #f0c4c0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 0 #e8b5b1;
}

.tb-app[data-ui-revision="3"] .tb-side-nav { gap: 5px; }
.tb-app[data-ui-revision="3"] .tb-side-hubs > strong { padding: 8px 9px 4px; color: #737d90; font-size: 11px; }

.tb-app[data-ui-revision="3"] :where(.tb-side-hubs > a, .tb-side-group > a, .tb-side-pill) {
  min-height: 45px !important;
  padding: 7px 9px !important;
  border: 1px solid transparent;
  border-radius: 10px !important;
  color: #465064 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 13px;
}

.tb-app[data-ui-revision="3"] :where(.tb-side-hubs > a, .tb-side-group > a, .tb-side-pill) > i {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: #657086;
  background: #edf0f4;
}

.tb-app[data-ui-revision="3"] :where(.tb-side-hubs > a, .tb-side-group > a, .tb-side-pill):hover {
  border-color: var(--lx-line);
  color: var(--lx-ink) !important;
  background: #fff !important;
  transform: translateX(2px);
}

.tb-app[data-ui-revision="3"] :where(.tb-side-hubs > a.active, .tb-side-group > a.active, .tb-side-pill.active) {
  border-color: #f0c6c2 !important;
  color: #9a3412 !important;
  background: #fff !important;
  box-shadow: 0 3px 0 #fdba74 !important;
}

.tb-app[data-ui-revision="3"] :where(.tb-side-hubs > a.active, .tb-side-group > a.active, .tb-side-pill.active) > i {
  color: #fff !important;
  background: var(--lx-brand) !important;
}

.tb-app[data-ui-revision="3"] .tb-sidebar-profile {
  border: 1px solid var(--lx-line);
  border-radius: 10px;
  background: #fff;
}

.tb-app[data-ui-revision="3"] .tb-main {
  padding: 0 24px 52px !important;
  background: var(--lx-canvas) !important;
}

.tb-app[data-ui-revision="3"] .tb-main > * { width: min(100%, 1280px); }

.tb-app[data-ui-revision="3"] .tb-topbar {
  top: 0 !important;
  min-height: 68px !important;
  margin-bottom: 18px !important;
  padding: 8px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--lx-line) !important;
  border-radius: 0 !important;
  background: rgb(243 245 248 / 96%) !important;
  box-shadow: none !important;
}

.tb-app[data-ui-revision="3"] .tb-topbar-title > span { display: none; }
.tb-app[data-ui-revision="3"] .tb-topbar h1 { font-size: 19px; font-weight: 800; }

.tb-app[data-ui-revision="3"] :where(.tb-topbar-create, .tb-points-pill, .tb-topbar-profile, .tb-icon-button) {
  min-height: 42px;
  border-radius: 10px;
}

.tb-app[data-ui-revision="3"] .tb-topbar-create {
  background: var(--lx-brand);
  box-shadow: 0 3px 0 var(--lx-brand-deep);
}

.tb-app[data-ui-revision="3"] .tb-points-pill { background: #ffedaa; }
.tb-app[data-ui-revision="3"] .tb-topbar-profile { border: 1px solid var(--lx-line); background: #fff; }

/* Universal controls */
.tb-app[data-ui-revision="3"] .tb-btn,
.tb-app[data-ui-revision="3"] :where(button, input[type="button"], input[type="submit"]):not([data-sidebar-backdrop]):not([data-sidebar-collapse]):not([data-sidebar-close]):not([data-sidebar-open]) {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid #cfd6e1;
  border-radius: 10px;
  color: #31394a;
  background: #fff;
  box-shadow: 0 2px 0 #d8dde6;
  font-size: 13px;
  font-weight: 700;
}

.tb-app[data-ui-revision="3"] :where(.tb-btn, button).primary,
.tb-app[data-ui-revision="3"] :where(.tb-btn, button)[data-primary-action] {
  border-color: var(--lx-brand);
  color: #fff;
  background: var(--lx-brand);
  box-shadow: 0 3px 0 var(--lx-brand-deep);
}

.tb-app[data-ui-revision="3"] :where(.tb-btn, button):hover { transform: translateY(-1px); }
.tb-app[data-ui-revision="3"] :where(.tb-btn, button):active { transform: translateY(1px) scale(.99); }

.tb-app[data-ui-revision="3"] :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea, select) {
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #cbd3df;
  border-radius: 10px;
  color: var(--lx-ink);
  background: #fff;
  box-shadow: none;
  font-size: 14px;
}

.tb-app[data-ui-revision="3"] textarea { min-height: 116px; }
.tb-app[data-ui-revision="3"] :where(input, textarea)::placeholder { color: #687286; }

/* Context and route switching */
.tb-app[data-ui-revision="3"] .tb-destination-context {
  min-height: 44px !important;
  margin-bottom: 12px !important;
  padding: 4px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--lx-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.tb-app[data-ui-revision="3"] .tb-destination-context :where(a, button, summary) { min-height: 36px; border-radius: 9px; }

/* Hub pages */
.tb-app[data-ui-revision="3"] .tb-tool-hub { gap: 16px; }

.tb-app[data-ui-revision="3"] .tb-tool-hub-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  min-height: 0 !important;
  padding: 10px 4px 22px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--lx-line) !important;
  border-radius: 0 !important;
  color: var(--lx-ink) !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible;
}

.tb-app[data-ui-revision="3"] .tb-tool-hub-head::after { display: none !important; }
.tb-app[data-ui-revision="3"] .tb-tool-hub-head > div > span { margin-bottom: 5px; color: #a52d27 !important; font-size: 12px; font-weight: 760; }
.tb-app[data-ui-revision="3"] .tb-tool-hub-head :where(h2, h3) { margin: 0; color: var(--lx-ink) !important; font-size: 30px !important; line-height: 1.2; }
.tb-app[data-ui-revision="3"] .tb-tool-hub-head p { max-width: 68ch; margin: 8px 0 15px; color: var(--lx-muted) !important; font-size: 13px; }

.tb-app[data-ui-revision="3"] .tb-tool-hub-head ol { display: flex; flex-wrap: wrap; gap: 16px; }
.tb-app[data-ui-revision="3"] .tb-tool-hub-head ol li {
  position: relative;
  min-width: 0;
  padding: 0 0 0 27px !important;
  border: 0 !important;
  color: #4d5669 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 12px;
}

.tb-app[data-ui-revision="3"] .tb-tool-hub-head ol li b {
  position: absolute;
  top: -1px;
  left: 0;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  color: #fff !important;
  background: var(--lx-brand);
  font-size: 10px;
}

.tb-app[data-ui-revision="3"] .tb-tool-hub-head ol li * { color: inherit !important; }
.tb-app[data-ui-revision="3"] .tb-tool-hub-head > .tb-btn { align-self: start; margin-top: 3px; color: #3f4758; background: #fff; }

.tb-app[data-ui-revision="3"] .tb-tool-hub-toolbar {
  display: grid !important;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr) auto !important;
  padding: 0 0 12px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--lx-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.tb-app[data-ui-revision="3"] .tb-tool-hub-toolbar > label { grid-template-columns: minmax(0, 1fr) 38px !important; }
.tb-app[data-ui-revision="3"] .tb-tool-hub-toolbar > label > input { grid-column: 1 !important; padding-left: 36px !important; background: #fff; }
.tb-app[data-ui-revision="3"] .tb-tool-hub-toolbar > label > button { grid-column: 2 !important; }
.tb-app[data-ui-revision="3"] .tb-tool-hub-toolbar > nav { gap: 5px; }
.tb-app[data-ui-revision="3"] .tb-tool-hub-toolbar > nav button { min-height: 38px !important; padding: 0 11px; border: 0 !important; color: #525c70 !important; background: transparent !important; box-shadow: none !important; }
.tb-app[data-ui-revision="3"] .tb-tool-hub-toolbar > nav button.active { color: #fff !important; background: #2b241d !important; }

.tb-app[data-ui-revision="3"] .tb-tool-hub-grid {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  grid-auto-flow: dense;
  gap: 12px !important;
}

.tb-app[data-ui-revision="3"] [data-tool-hub-card] {
  grid-column: span 4;
  min-height: 152px !important;
  padding: 18px !important;
  border: 1px solid var(--lx-line) !important;
  border-radius: 12px !important;
  color: var(--lx-ink) !important;
  background: #fff !important;
  box-shadow: none !important;
}

.tb-app[data-ui-revision="3"] [data-tool-hub-card] > span { width: 42px; height: 42px; border-radius: 10px; }
.tb-app[data-ui-revision="3"] [data-tool-hub-card] strong { margin-top: 3px; font-size: 16px; }
.tb-app[data-ui-revision="3"] [data-tool-hub-card] p { margin-top: 8px; color: #5f687a !important; font-size: 12px; line-height: 1.65; }
.tb-app[data-ui-revision="3"] [data-tool-hub-card]:hover { border-color: #e0a9a4 !important; box-shadow: 0 4px 0 #fdba74 !important; transform: translateY(-2px); }

.tb-app[data-ui-revision="3"] [data-tool-hub-card]:nth-child(2),
.tb-app[data-ui-revision="3"] [data-tool-hub-card]:nth-child(3) { grid-column: span 5; min-height: 112px !important; }

.tb-app[data-ui-revision="3"] [data-tool-hub-card].featured,
.tb-app[data-ui-revision="3"] [data-tool-hub-primary] {
  grid-column: span 7 !important;
  grid-row: span 2;
  min-height: 236px !important;
  border-color: #2b241d !important;
  color: #fff !important;
  background: #2b241d !important;
  box-shadow: 0 5px 0 #151821 !important;
}

.tb-app[data-ui-revision="3"] [data-tool-hub-primary] > span { color: #fff !important; background: var(--lx-brand) !important; }
.tb-app[data-ui-revision="3"] [data-tool-hub-primary] > div { max-width: 58%; }
.tb-app[data-ui-revision="3"] [data-tool-hub-primary] :where(strong, small) { color: #fff !important; }
.tb-app[data-ui-revision="3"] [data-tool-hub-primary] p { color: #d7dce6 !important; }
.tb-app[data-ui-revision="3"] [data-tool-hub-primary] > em { color: #8d261f !important; background: #fff7ed !important; }

.tb-app[data-ui-revision="3"] [data-tool-hub-primary]::after {
  content: "链接解析\A上传图文\A查找图文\A批量复刻";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 35%;
  padding: 12px 14px;
  border: 1px solid #444b5b;
  border-radius: 10px;
  color: #f4f6fa;
  background: #303643;
  font-size: 12px;
  font-weight: 700;
  line-height: 2.15;
  white-space: pre-line;
}

/* Creator, form and editor surfaces */
.tb-app[data-ui-revision="3"] :where(.tb-panel, .tb-specific-form, .tb-reference-creator-card, .tb-template-creator-form, .tb-account-panel, .tb-template-market-studio) {
  border: 1px solid var(--lx-line) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: none !important;
}

.tb-app[data-ui-revision="3"] :where(.tb-panel, .tb-specific-form, .tb-reference-creator-card, .tb-template-creator-form, .tb-account-panel) { padding: 24px !important; }
.tb-app[data-ui-revision="3"] :where(.tb-panel, .tb-specific-form, .tb-reference-creator-card, .tb-template-creator-form) :where(.tb-panel, section section) { border-radius: 10px; box-shadow: none !important; }

.tb-app[data-ui-revision="3"] :where(.tb-tool-hero, .tb-studio-hero, .tb-ecom-title, .tb-product-note-title, .tb-template-creator > header) {
  margin: -4px -4px 18px;
  padding: 6px 4px 18px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--lx-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.tb-app[data-ui-revision="3"] :where(.tb-tool-hero, .tb-studio-hero, .tb-ecom-title, .tb-product-note-title, .tb-template-creator > header) :where(h1, h3) { font-size: 25px; }
.tb-app[data-ui-revision="3"] :where(.tb-panel-head, .tb-studio-head, .tb-reference-pagehead) :where(h2, h3) { font-size: 20px; }
.tb-app[data-ui-revision="3"] :where(.tb-panel-head, .tb-studio-head, .tb-reference-pagehead) p { font-size: 13px; }

.tb-app[data-ui-revision="3"] :where(.tb-mode-tabs, .tb-tool-mode-tabs, .tb-aicopy-mode-tabs, .tb-aicopy-modes, .tb-content-tabs, .tb-design-center-tabs, .tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row, .tb-choice-cards) {
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  gap: 8px !important;
}

.tb-app[data-ui-revision="3"] :where(.tb-mode-tabs, .tb-tool-mode-tabs, .tb-aicopy-mode-tabs, .tb-aicopy-modes, .tb-content-tabs, .tb-design-center-tabs, .tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row, .tb-choice-cards) :where(label, button, a) {
  min-height: 54px !important;
  padding: 10px 13px !important;
  border: 1px solid var(--lx-line) !important;
  border-radius: 10px !important;
  color: #4d5669 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.tb-app[data-ui-revision="3"] :where(.tb-mode-tabs, .tb-tool-mode-tabs, .tb-aicopy-mode-tabs, .tb-aicopy-modes, .tb-content-tabs, .tb-design-center-tabs, .tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row, .tb-choice-cards) :where(.active, [aria-selected="true"], :has(input:checked)),
.tb-app[data-ui-revision="3"] .tb-product-note-modes input:checked + span,
.tb-app[data-ui-revision="3"] .tb-yiju-tabs input:checked + span,
.tb-app[data-ui-revision="3"] .tb-template-mode-row input:checked + span {
  border-color: var(--lx-brand) !important;
  color: #862720 !important;
  background: var(--lx-brand-soft) !important;
  box-shadow: 0 3px 0 #e9bab6 !important;
}

.tb-app[data-ui-revision="3"] :where(.tb-upload-drop, .tb-upload-box, [data-commercial-upload]) {
  min-height: 112px !important;
  padding: 16px !important;
  border: 1px dashed var(--lx-line-strong) !important;
  border-radius: 10px !important;
  color: #4f5a6f !important;
  background: var(--lx-surface-2) !important;
  box-shadow: none !important;
}

.tb-app[data-ui-revision="3"] .tb-upload-mark { width: 42px; height: 42px; border-radius: 10px; background: var(--lx-brand) !important; box-shadow: 0 3px 0 var(--lx-brand-deep) !important; }

.tb-app[data-ui-revision="3"] .tb-generation-context {
  margin: 18px 0;
  padding: 16px 0 !important;
  border-top: 1px solid var(--lx-line) !important;
  border-bottom: 1px solid var(--lx-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.tb-app[data-ui-revision="3"] .tb-context-picker > summary { min-height: 48px !important; border-radius: 10px !important; background: var(--lx-surface-2) !important; }
.tb-app[data-ui-revision="3"] .tb-context-picker-menu { border-radius: 10px; box-shadow: 0 12px 28px rgb(26 31 43 / 16%); }
.tb-app[data-ui-revision="3"] .tb-context-selected > * { color: #85261f; background: var(--lx-brand-soft); }

.tb-app[data-ui-revision="3"] :where(.tb-form-actions, .tb-studio-submit, .tb-product-submit) { margin-top: 20px; padding-top: 16px; }
.tb-app[data-ui-revision="3"] .tb-studio-submit { bottom: 12px; border-radius: 12px; box-shadow: 0 8px 20px rgb(30 35 48 / 12%); }

/* Templates, examples and libraries */
.tb-app[data-ui-revision="3"] .tb-template-market-grid,
.tb-app[data-ui-revision="3"] .tb-template-list { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important; gap: 14px !important; }

.tb-app[data-ui-revision="3"] :where(.tb-template-market-card, .tb-template-card, .tb-popular-template-card) {
  border: 1px solid var(--lx-line) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: none !important;
}

.tb-app[data-ui-revision="3"] :where(.tb-template-market-card, .tb-template-card, .tb-popular-template-card):hover,
.tb-app[data-ui-revision="3"] :where(.tb-template-market-card, .tb-template-card, .tb-popular-template-card):focus-within {
  border-color: #d9a19c !important;
  box-shadow: 0 4px 0 #fdba74 !important;
  transform: translateY(-2px);
}

.tb-app[data-ui-revision="3"] .tb-template-market-copy { padding: 11px 12px 13px; }
.tb-app[data-ui-revision="3"] .tb-template-market-copy strong { font-size: 13px; }
.tb-app[data-ui-revision="3"] .tb-template-market-hover { background: rgb(24 28 37 / 72%) !important; }

.tb-app[data-ui-revision="3"] .tb-selected-template {
  grid-template-columns: 68px minmax(0, 1fr) auto;
  padding: 10px;
  border: 1px solid #b9d7cc;
  border-radius: 10px;
  color: #244e41;
  background: #eef8f4;
}

.tb-app[data-ui-revision="3"] .tb-selected-template > img { width: 68px; height: 68px; border-radius: 8px; }

.tb-app[data-ui-revision="3"] :where(.tb-library-record, .tb-material-card, .tb-post-card) { border-radius: 12px; box-shadow: none; }
.tb-app[data-ui-revision="3"] :where(.tb-library-record, .tb-material-card, .tb-post-card):hover { box-shadow: 0 4px 0 var(--lx-line); }

.tb-app[data-ui-revision="3"] .tb-alert,
.tb-app[data-ui-revision="3"] .tb-reference-notice,
.tb-app[data-ui-revision="3"] .tb-status:not(:empty) { border-radius: 10px; font-size: 12px; }
.tb-app[data-ui-revision="3"] .tb-empty { min-height: 132px; border-radius: 10px !important; }

.tb-app[data-ui-revision="3"] table { border-radius: 10px; }
.tb-app[data-ui-revision="3"] thead th { padding: 11px 12px; font-size: 11px; }
.tb-app[data-ui-revision="3"] tbody td { padding: 12px; font-size: 12px; }

.tb-app[data-ui-revision="3"] :where(.tb-commercial-dialog, .tb-membership-checkout-dialog, .tb-material-picker-dialog, .tb-template-preview-dialog, .tb-context-editor) {
  border-radius: 14px;
  box-shadow: 0 24px 60px rgb(18 21 29 / 28%);
}

@media (max-width: 1180px) {
  .tb-app[data-ui-revision="3"] { --lx-sidebar: 214px; }
  .tb-app[data-ui-revision="3"] .tb-main { padding-right: 16px !important; padding-left: 16px !important; }
  .tb-app[data-ui-revision="3"] .tb-tool-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .tb-app[data-ui-revision="3"] [data-tool-hub-card],
  .tb-app[data-ui-revision="3"] [data-tool-hub-card]:nth-child(2),
  .tb-app[data-ui-revision="3"] [data-tool-hub-card]:nth-child(3) { grid-column: span 1; }
  .tb-app[data-ui-revision="3"] [data-tool-hub-card].featured,
  .tb-app[data-ui-revision="3"] [data-tool-hub-primary] { grid-column: span 2 !important; }
}

@media (max-width: 767px) {
  .tb-app[data-ui-revision="3"] .tb-main { padding: 8px 10px 32px !important; }
  .tb-app[data-ui-revision="3"] .tb-sidebar { width: min(320px, calc(100vw - 48px)) !important; }
  .tb-app[data-ui-revision="3"] .tb-tool-hub-head { display: block !important; padding: 8px 2px 18px !important; }
  .tb-app[data-ui-revision="3"] .tb-tool-hub-head :where(h2, h3) { font-size: 25px !important; }
  .tb-app[data-ui-revision="3"] .tb-tool-hub-head > .tb-btn { margin-top: 16px; }
  .tb-app[data-ui-revision="3"] .tb-tool-hub-head ol { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tb-app[data-ui-revision="3"] .tb-tool-hub-toolbar { grid-template-columns: minmax(0, 1fr) !important; padding-bottom: 10px !important; }
  .tb-app[data-ui-revision="3"] .tb-tool-hub-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .tb-app[data-ui-revision="3"] [data-tool-hub-card],
  .tb-app[data-ui-revision="3"] [data-tool-hub-card]:nth-child(2),
  .tb-app[data-ui-revision="3"] [data-tool-hub-card]:nth-child(3),
  .tb-app[data-ui-revision="3"] [data-tool-hub-card].featured,
  .tb-app[data-ui-revision="3"] [data-tool-hub-primary] { grid-column: auto !important; grid-row: auto; min-height: 132px !important; }
  .tb-app[data-ui-revision="3"] [data-tool-hub-primary] > div { max-width: 100%; }
  .tb-app[data-ui-revision="3"] [data-tool-hub-primary]::after { display: none; }
  .tb-app[data-ui-revision="3"] :where(.tb-panel, .tb-specific-form, .tb-reference-creator-card, .tb-template-creator-form, .tb-account-panel) { padding: 15px 13px !important; }
  .tb-app[data-ui-revision="3"] :where(.tb-mode-tabs, .tb-tool-mode-tabs, .tb-aicopy-mode-tabs, .tb-aicopy-modes, .tb-content-tabs, .tb-design-center-tabs, .tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row, .tb-choice-cards) :where(label, button, a) { flex-basis: 82%; }
  .tb-app[data-ui-revision="3"] .tb-template-market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 9px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .tb-app[data-ui-style="playful"] *,
  .tb-app[data-ui-style="playful"] *::before,
  .tb-app[data-ui-style="playful"] *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Cascade lock: the legacy V2 layer contains important declarations. */
.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] {
  color: var(--lx-ink) !important;
  background: var(--lx-canvas) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-sidebar {
  width: var(--lx-sidebar) !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  padding: 12px 10px 10px !important;
  border-right: 1px solid var(--lx-line) !important;
  background: #fff !important;
  box-shadow: 4px 0 8px rgb(36 42 57 / 4%) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-sidebar-head {
  min-height: 56px !important;
  margin: 0 2px 8px !important;
  padding: 2px 2px 10px !important;
  border-bottom: 1px solid var(--lx-surface-2) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] :where(.tb-side-hubs > a, .tb-side-group > a, .tb-side-pill) {
  min-height: 44px !important;
  padding: 6px 8px !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: var(--lx-ink-2) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] :where(.tb-side-hubs > a, .tb-side-group > a, .tb-side-pill):hover {
  color: var(--lx-ink) !important;
  background: var(--lx-surface-2) !important;
  transform: translateX(2px) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] :where(.tb-side-hubs > a.active, .tb-side-group > a.active, .tb-side-pill.active) {
  color: #9a3412 !important;
  background: var(--lx-brand-soft) !important;
  box-shadow: none !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] :where(.tb-side-hubs > a.active, .tb-side-group > a.active, .tb-side-pill.active) > i {
  color: #fff !important;
  background: var(--lx-brand) !important;
  box-shadow: 0 3px 0 var(--lx-brand-deep) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-side-hubs > a.active,
.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-side-group > a.active,
.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-side-pill.active {
  color: #9a3412 !important;
  background: var(--lx-brand-soft) !important;
  box-shadow: none !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-side-hubs > a.active > i,
.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-side-group > a.active > i,
.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-side-pill.active > i {
  color: #fff !important;
  background: var(--lx-brand) !important;
  box-shadow: 0 3px 0 var(--lx-brand-deep) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-sidebar-profile {
  min-height: 54px !important;
  padding: 8px !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: var(--lx-ink) !important;
  background: var(--lx-surface-2) !important;
  box-shadow: none !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-main {
  padding: 14px 22px 48px !important;
  background: transparent !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-main > * {
  width: min(100%, 1320px) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-topbar {
  min-height: 64px !important;
  margin-bottom: 12px !important;
  padding: 7px 9px 7px 16px !important;
  border: 1px solid var(--lx-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 4px 8px rgb(34 40 55 / 6%) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-topbar-title > span {
  color: var(--lx-muted) !important;
  font-size: 11px !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-topbar h1 {
  margin: 1px 0 0 !important;
  color: var(--lx-ink) !important;
  font-size: 17px !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-topbar-create {
  min-height: 42px !important;
  padding: 0 13px !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: #fff !important;
  background: var(--lx-brand) !important;
  box-shadow: 0 3px 0 var(--lx-brand-deep) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-points-pill {
  min-height: 42px !important;
  color: var(--lx-yellow-ink) !important;
  background: var(--lx-yellow) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-topbar-profile {
  min-height: 42px !important;
  color: var(--lx-ink) !important;
  background: var(--lx-surface-2) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-icon-button {
  width: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  border: 1px solid var(--lx-line) !important;
  color: var(--lx-ink-2) !important;
  background: #fff !important;
  box-shadow: 0 2px 0 var(--lx-line-strong) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-destination-context {
  min-height: 48px !important;
  margin-bottom: 12px !important;
  padding: 6px 8px !important;
  border: 1px solid var(--lx-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] :where(.tb-panel, .tb-specific-form, .tb-reference-creator-card, .tb-template-creator-form, .tb-account-panel, .tb-template-market-studio) {
  border: 1px solid var(--lx-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 3px 6px rgb(33 39 54 / 5%) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] :where(.tb-panel, .tb-specific-form, .tb-reference-creator-card, .tb-template-creator-form, .tb-account-panel) {
  padding: 20px !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea, select) {
  min-height: 44px !important;
  padding: 10px 12px !important;
  border: 1px solid var(--lx-line-strong) !important;
  border-radius: 8px !important;
  color: var(--lx-ink) !important;
  background: #fff !important;
  box-shadow: inset 0 1px 2px rgb(31 37 50 / 4%) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea, select):focus {
  border-color: var(--lx-brand) !important;
  box-shadow: 0 0 0 4px rgb(229 72 61 / 10%) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-btn,
.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] :where(button, input[type="button"], input[type="submit"]):not([data-sidebar-backdrop]):not([data-sidebar-collapse]):not([data-sidebar-close]):not([data-sidebar-open]) {
  min-height: 42px !important;
  border: 1px solid var(--lx-line-strong) !important;
  border-radius: 8px !important;
  color: #343b4c !important;
  background: #fff !important;
  box-shadow: 0 3px 0 var(--lx-line-strong) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] :where(.tb-btn, button).primary,
.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] :where(.tb-btn, button)[data-primary-action] {
  border-color: var(--lx-brand) !important;
  color: #fff !important;
  background: var(--lx-brand) !important;
  box-shadow: 0 4px 0 var(--lx-brand-deep) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] :where(.tb-mode-tabs, .tb-tool-mode-tabs, .tb-aicopy-mode-tabs, .tb-aicopy-modes, .tb-content-tabs, .tb-design-center-tabs, .tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row, .tb-choice-cards) {
  padding: 5px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--lx-surface-2) !important;
  box-shadow: none !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] :where(.tb-mode-tabs, .tb-tool-mode-tabs, .tb-aicopy-mode-tabs, .tb-aicopy-modes, .tb-content-tabs, .tb-design-center-tabs, .tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row, .tb-choice-cards) :where(label, button, a) {
  min-height: 48px !important;
  padding: 9px 12px !important;
  border: 0 !important;
  border-radius: 7px !important;
  color: var(--lx-ink-2) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] :where(.tb-mode-tabs, .tb-tool-mode-tabs, .tb-aicopy-mode-tabs, .tb-aicopy-modes, .tb-content-tabs, .tb-design-center-tabs, .tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row, .tb-choice-cards) :where(.active, [aria-selected="true"], :has(input:checked)) {
  color: #9a3412 !important;
  background: #fff !important;
  box-shadow: 0 3px 0 var(--lx-line-strong) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] :where(.tb-upload-drop, .tb-upload-box, [data-commercial-upload]) {
  min-height: 132px !important;
  padding: 18px !important;
  border: 1px dashed var(--lx-line-strong) !important;
  border-radius: 8px !important;
  color: var(--lx-ink-2) !important;
  background: var(--lx-surface-2) !important;
  box-shadow: none !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] :where(.tb-upload-drop, .tb-upload-box, [data-commercial-upload]).is-ui-dragging,
.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] :where(.tb-upload-drop, .tb-upload-box, [data-commercial-upload])[data-ui-drag-state="active"] {
  border-color: var(--lx-brand) !important;
  background: var(--lx-brand-soft) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-upload-mark {
  color: #fff !important;
  background: var(--lx-brand) !important;
  box-shadow: 0 4px 0 var(--lx-brand-deep) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-generation-context {
  padding: 14px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--lx-surface-2) !important;
  box-shadow: none !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-context-picker > summary {
  min-height: 46px !important;
  border: 1px solid var(--lx-line-strong) !important;
  border-radius: 8px !important;
  color: var(--lx-ink-2) !important;
  background: #fff !important;
  box-shadow: none !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-context-selected {
  background: transparent !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-product-note-modes input:checked + span,
.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-yiju-tabs input:checked + span,
.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-template-mode-row input:checked + span {
  border-color: var(--lx-brand) !important;
  color: #9a3412 !important;
  background: var(--lx-brand-soft) !important;
  box-shadow: 0 3px 0 #e5b3af !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-product-note-modes input:checked + span :where(b, i, em, small),
.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-yiju-tabs input:checked + span :where(b, i, em, small),
.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-template-mode-row input:checked + span :where(b, i, em, small) {
  color: inherit !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] input[type="radio"],
.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] input[type="checkbox"] {
  accent-color: var(--lx-brand) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-aicopy-reference-head h2 span,
.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-template-market-hero > span,
.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] :where(.tb-tool-hero, .tb-product-note-title, .tb-studio-hero) > span {
  color: var(--lx-brand-deep) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-aicopy-reference-head .bi-check2 {
  color: var(--lx-brand) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-destination-switch a.active {
  border-color: #efb8b3 !important;
  color: #9a3412 !important;
  background: var(--lx-brand-soft) !important;
  box-shadow: none !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-destination-switch a.active i {
  color: #fff !important;
  background: var(--lx-brand) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-upload-mark {
  border-color: var(--lx-brand) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-tool-hub-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  min-height: 210px !important;
  padding: 28px 30px !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: #fff !important;
  background: #2b241d !important;
  box-shadow: none !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-tool-hub-head :where(h2, h3) {
  color: #fff !important;
  font-size: 30px !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-tool-hub-head p {
  color: var(--lx-line-strong) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-tool-hub-head ol li {
  border: 0 !important;
  border-radius: 8px !important;
  color: var(--lx-line) !important;
  background: #2b241d !important;
  box-shadow: none !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-tool-hub-head ol li * {
  color: var(--lx-line) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-tool-hub-toolbar {
  display: grid !important;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr) auto !important;
  padding: 10px !important;
  border: 1px solid var(--lx-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-tool-hub-toolbar > label {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 36px !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-tool-hub-toolbar > label > input {
  grid-column: 1 !important;
  width: 100% !important;
  padding-left: 34px !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-tool-hub-toolbar > label > button {
  grid-column: 2 !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-tool-hub-toolbar > nav button {
  min-height: 38px !important;
  border: 0 !important;
  color: var(--lx-ink-2) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-tool-hub-toolbar > nav button.active {
  color: #9a3412 !important;
  background: var(--lx-brand-soft) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-tool-hub-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] [data-tool-hub-card] {
  min-height: 150px !important;
  padding: 18px !important;
  border: 1px solid var(--lx-line) !important;
  border-radius: 8px !important;
  color: var(--lx-ink) !important;
  background: #fff !important;
  box-shadow: none !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] [data-tool-hub-card] :where(strong, small, p) {
  color: inherit !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] [data-tool-hub-card].featured,
.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] [data-tool-hub-primary] {
  grid-column: span 2 !important;
  border-color: var(--lx-brand) !important;
  color: #fff !important;
  background: var(--lx-brand) !important;
  box-shadow: 0 5px 0 var(--lx-brand-deep) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] [data-tool-hub-primary] :where(small, p) {
  color: #fff7ed !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] [data-tool-hub-primary] > span {
  color: var(--lx-brand-deep) !important;
  background: #fff !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-template-market-grid,
.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-template-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(174px, 1fr)) !important;
  gap: 12px !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] :where(.tb-template-market-card, .tb-template-card, .tb-popular-template-card) {
  border: 1px solid var(--lx-line) !important;
  border-radius: 8px !important;
  color: var(--lx-ink) !important;
  background: #fff !important;
  box-shadow: none !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-template-market-hover {
  background: rgb(19 22 30 / 68%) !important;
}

.tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-empty {
  border: 1px dashed var(--lx-line-strong) !important;
  border-radius: 8px !important;
  color: var(--lx-muted) !important;
  background: var(--lx-surface-2) !important;
  box-shadow: none !important;
}

@media (max-width: 1180px) {
  .tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-tool-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 767px) {
  .tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-sidebar {
    width: min(320px, calc(100vw - 48px)) !important;
    max-width: 320px !important;
    height: 100dvh !important;
  }
  .tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-main { padding: 10px 10px 30px !important; }
  .tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-panel,
  .tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-specific-form { padding: 14px 12px !important; }
  .tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-tool-hub-head { display: block !important; min-height: 0 !important; padding: 22px 18px !important; }
  .tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-tool-hub-head :where(h2, h3) { font-size: 25px !important; }
  .tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-tool-hub-toolbar { grid-template-columns: minmax(0, 1fr) !important; }
  .tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-tool-hub-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] [data-tool-hub-card],
  .tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] [data-tool-hub-card].featured,
  .tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] [data-tool-hub-primary] { grid-column: auto !important; min-height: 132px !important; padding: 15px !important; }
  .tb-app[data-ui-version="2"]:not([data-ui-revision="3"])[data-ui-style="playful"] .tb-template-market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 9px !important; }
}

/* Precision lock: neutralize late legacy feature-specific purple rules. */
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :where(.tb-side-hubs > a.active, .tb-side-group > a.active, .tb-side-pill.active) > i {
  border-color: var(--lx-brand) !important;
  color: #fff !important;
  background: var(--lx-brand) !important;
  box-shadow: none !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-sidebar-profile > span {
  border-color: #fdba74 !important;
  color: #9a3412 !important;
  background: var(--lx-brand-soft) !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-destination-switch a.active {
  border-color: #fdba74 !important;
  color: #9a3412 !important;
  background: var(--lx-brand-soft) !important;
  box-shadow: none !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-aicopy-reference-head {
  display: block !important;
  padding: 18px 20px 15px !important;
  text-align: left !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-aicopy-reference-head h2 {
  margin: 0 !important;
  color: var(--lx-ink) !important;
  font-size: 25px !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-aicopy-reference-head h2 span,
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-aicopy-reference-head p strong,
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-template-market-hero > span,
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :where(.tb-tool-hero, .tb-product-note-title, .tb-studio-hero) > span {
  color: var(--lx-brand) !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-aicopy-creation-tip {
  margin: 0 !important;
  border: 0 !important;
  border-top: 1px solid #eadba9 !important;
  border-bottom: 1px solid #eadba9 !important;
  border-radius: 0 !important;
  background: #fff9e8 !important;
  box-shadow: none !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-aicopy-workspace {
  border: 1px solid var(--lx-line) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: none !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-aicopy-form {
  padding: 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-replicate-mode-shell .tb-aicopy-modes {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  gap: 8px !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-replicate-mode-shell .tb-aicopy-modes > :where(button, a),
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-replicate-mode-tab {
  min-height: 72px !important;
  padding: 12px 13px !important;
  border: 1px solid var(--lx-line) !important;
  border-radius: 10px !important;
  color: #424b5e !important;
  background: #fff !important;
  box-shadow: none !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-replicate-mode-shell .tb-aicopy-modes > :where(button.active, button[aria-selected="true"], a.active),
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-replicate-mode-tab.active {
  border-color: var(--lx-brand) !important;
  color: #9a3412 !important;
  background: var(--lx-brand-soft) !important;
  box-shadow: 0 3px 0 #fdba74 !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-replicate-mode-shell .tb-aicopy-modes > :where(button, a) :where(b, span),
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-replicate-mode-tab :where(b, span) {
  color: inherit !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-aicopy-link-panel {
  padding: 14px 0 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-aicopy-link-panel textarea { min-height: 96px !important; }
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-aicopy-result { border-color: var(--lx-line) !important; background: var(--lx-surface-2) !important; }

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-product-note-modes input:checked + span,
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-yiju-tabs input:checked + span,
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-template-mode-row input:checked + span {
  border-color: var(--lx-brand) !important;
  color: #9a3412 !important;
  background: var(--lx-brand-soft) !important;
  box-shadow: 0 3px 0 #fdba74 !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-product-note-modes input:checked + span :where(b, i, em, small),
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-yiju-tabs input:checked + span :where(b, i, em, small),
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-template-mode-row input:checked + span :where(b, i, em, small) {
  color: inherit !important;
  background-image: none !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-generation-context > header div > span {
  color: #9a3412 !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-context-picker > summary i {
  color: #9a3412 !important;
  background: var(--lx-brand-soft) !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-context-selected {
  border-color: #efd0cd !important;
  color: #71302b !important;
  background: #fff8f7 !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-upload-mark {
  border-color: var(--lx-brand) !important;
  color: #fff !important;
  background: var(--lx-brand) !important;
}

@media (max-width: 767px) {
  .toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-replicate-mode-shell .tb-aicopy-modes {
    display: flex !important;
    overflow-x: auto !important;
  }

  .toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-replicate-mode-shell .tb-aicopy-modes > :where(button, a),
  .toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-replicate-mode-tab {
    flex: 0 0 82% !important;
  }
}

/* Shared component completion for every authenticated tool route. */
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] {
  --lx-text: var(--lx-ink);
  --lx-text-soft: var(--lx-muted);
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] input[type="radio"],
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] input[type="checkbox"] {
  accent-color: var(--lx-brand) !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-main.tb-main-tool > .tb-topbar {
  display: flex !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-main.tb-main-tool { padding-top: 0 !important; }

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-tool-workbench-full {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-tool-workbench-full > .tb-special-tool-panel {
  margin: 0 !important;
  border-radius: 12px !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :is(.tb-product-note-modes, .tb-yiju-tabs, .tb-template-mode-row) > label {
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :is(.tb-product-note-modes, .tb-yiju-tabs, .tb-template-mode-row) > label > span {
  display: grid !important;
  min-height: 84px !important;
  padding: 13px 14px !important;
  border: 1px solid var(--lx-line-strong) !important;
  border-radius: 10px !important;
  color: #3e4759 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :is(.tb-product-note-modes, .tb-yiju-tabs, .tb-template-mode-row) > label > input:checked + span {
  border-color: var(--lx-brand) !important;
  color: #9a3412 !important;
  background: var(--lx-brand-soft) !important;
  box-shadow: 0 3px 0 #fdba74 !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :is(.tb-upload-drop, .tb-upload-box, .tb-ref-uploader, [data-commercial-upload]) {
  min-height: 112px !important;
  padding: 16px !important;
  border: 1px dashed var(--lx-line-strong) !important;
  border-radius: 10px !important;
  color: #4f5a6f !important;
  background: var(--lx-surface-2) !important;
  box-shadow: none !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :is(.tb-upload-drop, .tb-upload-box, .tb-ref-uploader, [data-commercial-upload]):hover,
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :is(.tb-upload-drop, .tb-upload-box, .tb-ref-uploader, [data-commercial-upload]).is-dragging,
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :is(.tb-upload-drop, .tb-upload-box, .tb-ref-uploader, [data-commercial-upload]).is-ui-dragging,
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :is(.tb-upload-drop, .tb-upload-box, .tb-ref-uploader, [data-commercial-upload])[data-ui-drag-state="active"] {
  border-color: var(--lx-brand) !important;
  background: var(--lx-brand-soft) !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :is(.tb-upload-drop, .tb-upload-box, .tb-ref-uploader, [data-commercial-upload]).has-files,
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :is(.tb-upload-drop, .tb-upload-box, .tb-ref-uploader, [data-commercial-upload])[data-ui-upload-state="filled"] {
  border-style: solid !important;
  border-color: #93cbb8 !important;
  color: #176b57 !important;
  background: #effaf6 !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-upload-mark {
  width: 42px !important;
  height: 42px !important;
  border-radius: 10px !important;
  box-shadow: 0 3px 0 var(--lx-brand-deep) !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :is(.tb-form-actions, .tb-studio-submit, .tb-product-submit, .tb-compose-submit, .tb-ecom-submit-bar, .tb-generate-footer, .tb-batch-classic-submit, .tb-replicate-search-footer, .tb-replicate-batch-footer) {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  min-height: 66px !important;
  margin-top: 18px !important;
  padding: 10px 12px !important;
  border: 1px solid var(--lx-line) !important;
  border-radius: 12px !important;
  color: var(--lx-ink) !important;
  background: var(--lx-surface-2) !important;
  background-image: none !important;
  box-shadow: none !important;
  gap: 10px !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :is(.tb-studio-submit, .tb-compose-submit, .tb-ecom-submit-bar, .tb-product-submit) > div { margin-right: auto; }

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :is(.tb-studio-submit, .tb-compose-submit, .tb-ecom-submit-bar, .tb-product-submit) > div > strong {
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #9a3412 !important;
  background: transparent !important;
  font-size: 13px !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :is(.tb-form-actions, .tb-studio-submit, .tb-product-submit, .tb-compose-submit, .tb-ecom-submit-bar, .tb-generate-footer, .tb-batch-classic-submit, .tb-replicate-search-footer, .tb-replicate-batch-footer) .tb-btn.primary {
  border-color: var(--lx-brand) !important;
  border-radius: 10px !important;
  color: #fff !important;
  background: var(--lx-brand) !important;
  background-image: none !important;
  box-shadow: 0 3px 0 var(--lx-brand-deep) !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-setting-row > strong {
  width: 112px !important;
  min-height: 32px !important;
  flex: 0 0 112px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #343d50 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 12px !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-setting-row { min-height: 50px; padding: 10px 0; }

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :is(.tb-status, .tb-result-state):not(:empty) {
  border: 1px solid var(--lx-line) !important;
  border-radius: 10px !important;
  color: #4e586b !important;
  background: var(--lx-surface-2) !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :is(.tb-status, .tb-result-state).ok,
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] [data-ui-feedback="success"] {
  border-color: #a5d8c7 !important;
  color: #176b57 !important;
  background: #eaf8f3 !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :is(.tb-status, .tb-result-state).error,
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] [data-ui-feedback="error"] {
  border-color: #efb6bb !important;
  color: #992c34 !important;
  background: #fff0f2 !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :is(.tb-tool-result, .tb-task-replay) {
  border-color: var(--lx-line) !important;
  border-radius: 10px !important;
  background: var(--lx-surface-2) !important;
  box-shadow: none !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-template-market-hero > div > span,
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-template-market-hero > span {
  color: var(--lx-brand) !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :is(.tb-commercial-dialog, .tb-membership-checkout-dialog, .tb-material-picker-dialog, .tb-template-preview-dialog, .tb-context-editor) {
  border-radius: 14px !important;
  box-shadow: 0 24px 60px rgb(18 21 29 / 28%) !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] table { border-radius: 10px !important; }

@media (max-width: 767px) {
  .toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :is(.tb-form-actions, .tb-studio-submit, .tb-product-submit, .tb-compose-submit, .tb-ecom-submit-bar, .tb-generate-footer, .tb-batch-classic-submit, .tb-replicate-search-footer, .tb-replicate-batch-footer) {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  .toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :is(.tb-form-actions, .tb-studio-submit, .tb-product-submit, .tb-compose-submit, .tb-ecom-submit-bar, .tb-generate-footer, .tb-batch-classic-submit, .tb-replicate-search-footer, .tb-replicate-batch-footer) :is(.tb-btn, button) {
    width: 100% !important;
    min-height: 46px !important;
  }

  .toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-btn.compact { min-height: 44px !important; }
}

/* Reference creators: keep mode choice and form in one readable document flow. */
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :where(.tb-yiju-reference, .tb-product-note-reference, .tb-template-reference) {
  width: min(1120px, 100%) !important;
  margin-inline: auto !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-reference-pagehead {
  min-height: 0 !important;
  display: block !important;
  padding: 20px 4px 16px !important;
  text-align: left !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-reference-pagehead > div {
  display: block !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-reference-pagehead :where(h2, h3) {
  color: var(--lx-ink) !important;
  font-size: 26px !important;
  letter-spacing: -.015em !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-reference-pagehead :where(h2, h3) span {
  color: var(--lx-brand) !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-reference-pagehead p {
  max-width: 72ch;
  margin-top: 7px !important;
  color: var(--lx-muted) !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :where(.tb-yiju-card, .tb-reference-creator-card, .tb-template-creator-form) {
  border: 1px solid var(--lx-line) !important;
  border-radius: 12px !important;
  background: #fff !important;
  padding: 20px !important;
  box-shadow: none !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :where(.tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row) {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin: 0 0 14px !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-yiju-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :where(.tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row) > label > span,
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :where(.tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row) > label:first-child > span,
.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :where(.tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row) > label:last-child > span {
  min-height: 82px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-content: center !important;
  justify-content: initial !important;
  gap: 3px 8px !important;
  border: 1px solid var(--lx-line-strong) !important;
  border-radius: 10px !important;
  color: #3e4759 !important;
  background: #fff !important;
  padding: 12px 14px !important;
  box-shadow: none !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :where(.tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row) > label > input:checked + span {
  border-color: var(--lx-brand) !important;
  color: #9a3412 !important;
  background: var(--lx-brand-soft) !important;
  box-shadow: 0 3px 0 #fdba74 !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :where(.tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row) :where(b, em, small, i) {
  color: inherit !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-product-note-modes :where(em, small) {
  display: block !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :where(.tb-main-prompt, .tb-reference-main-input, .tb-template-primary-field) textarea {
  min-height: 168px !important;
  padding: 16px 44px 32px 16px !important;
  font-size: 13px !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-product-upload-inline .tb-upload-drop {
  min-height: 92px !important;
  border-color: var(--lx-line-strong) !important;
  border-radius: 10px !important;
  background: var(--lx-surface-2) !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-product-upload-inline .tb-upload-mark {
  width: 40px !important;
  height: 40px !important;
  flex-basis: 40px !important;
}

.toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :where(.tb-yiju-reference, .tb-product-note-reference, .tb-template-reference) .tb-context-picker > summary {
  min-height: 46px !important;
  border-color: var(--lx-line) !important;
  border-radius: 10px !important;
  background: var(--lx-surface-2) !important;
}

@media (max-width: 767px) {
  .toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-reference-pagehead { padding: 14px 2px !important; }
  .toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] .tb-reference-pagehead :where(h2, h3) { font-size: 23px !important; }
  .toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :where(.tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row) { display: flex !important; overflow-x: auto !important; }
  .toolbox-body .tb-app[data-app-shell][data-ui-revision="3"] :where(.tb-yiju-tabs, .tb-product-note-modes, .tb-template-mode-row) > label { flex: 0 0 84% !important; }
}
