/* Product UI v2: final presentation layer for user-facing pages. */

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) {
  --ui-sidebar: 216px;
  --ui-bg: #f7f8fa;
  --ui-surface: #ffffff;
  --ui-surface-soft: #f3f4f6;
  --ui-surface-muted: #eceef1;
  --ui-ink: #17191f;
  --ui-text: #333740;
  --ui-muted: #7b818c;
  --ui-line: #e2e4e8;
  --ui-line-strong: #cdd0d6;
  --ui-accent: #e9487b;
  --ui-accent-soft: #fff0f5;
  --ui-success: #168357;
  --ui-danger: #c43d4b;
  min-width: 0;
  background: var(--ui-bg) !important;
  color: var(--ui-text);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) *,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) *::before,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) *::after {
  box-sizing: border-box;
  letter-spacing: 0 !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed)::before,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed)::after {
  display: none !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .app-layout {
  min-width: 0;
  background: var(--ui-bg) !important;
}

/* Sidebar */
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar {
  --user-drawer-width: var(--ui-sidebar);
  top: 0 !important;
  bottom: 0 !important;
  width: var(--ui-sidebar) !important;
  overflow: hidden !important;
  border: 0 !important;
  border-right: 1px solid var(--ui-line) !important;
  border-radius: 0 !important;
  background: var(--ui-surface) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-header {
  min-height: 72px;
  padding: 14px 12px !important;
  border-bottom: 1px solid #f0f1f3 !important;
  background: var(--ui-surface) !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-brand {
  min-width: 0;
  min-height: 42px !important;
  padding: 3px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px !important;
  box-shadow: none !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-brand-text h1 {
  height: auto !important;
  color: var(--ui-ink) !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-brand-text small {
  color: var(--ui-muted) !important;
  font-size: 10px !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-collapse-btn {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid var(--ui-line) !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: #7d828c !important;
  box-shadow: none !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-nav {
  gap: 2px !important;
  padding: 7px 9px 12px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-nav-section {
  margin-top: 0 !important;
  padding: 11px 9px 5px !important;
  color: #a0a4ad !important;
  font-size: 10px !important;
  font-weight: 750 !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-nav-item,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-nav-item.is-agent-hub {
  min-height: 34px !important;
  gap: 9px !important;
  margin: 0 !important;
  padding: 7px 9px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #555b65 !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 680 !important;
  line-height: 1.25;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-nav-item svg {
  width: 16px !important;
  height: 16px !important;
  flex: 0 0 16px;
  color: #747a85 !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-nav-item:hover,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-nav-item.is-agent-hub:hover {
  background: #f4f5f6 !important;
  color: var(--ui-ink) !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-nav-item.active,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-nav-item.is-agent-hub.active {
  background: #eceef1 !important;
  color: #111318 !important;
  box-shadow: inset 3px 0 0 var(--ui-accent) !important;
  font-weight: 820 !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-footer {
  gap: 6px !important;
  padding: 9px !important;
  border-top: 1px solid var(--ui-line) !important;
  background: var(--ui-surface) !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-user,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-action-btn,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-balance {
  border: 1px solid var(--ui-line) !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: #565c66 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-user:hover,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-action-btn:hover {
  border-color: var(--ui-line-strong) !important;
  background: #f7f8f9 !important;
}

/* Main layout and typography */
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .main-area {
  min-width: 0;
  margin-left: var(--ui-sidebar) !important;
  padding: 30px clamp(24px, 3.2vw, 52px) 64px !important;
  background: var(--ui-bg) !important;
}

html[data-theme] body.sidebar-collapsed:not(.page-admin):not(.page-auth):not(.page-embed) .main-area {
  margin-left: 0 !important;
}

html[data-theme] body:is(.page-video,.page-audio,.page-records,.page-gallery,.page-shop,.page-credits,.page-earnings,.page-invite,.page-ucenter,.page-api-tokens):not(.page-admin) main {
  width: min(100%, 1280px) !important;
  max-width: 1280px !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .page-hd {
  min-height: 68px !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 20px !important;
  margin: 0 0 22px !important;
  padding: 0 0 18px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .page-hd h1,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .agent-workspace-head h1 {
  margin: 0 !important;
  color: var(--ui-ink) !important;
  font-size: clamp(26px, 2.4vw, 32px) !important;
  font-weight: 880 !important;
  line-height: 1.15 !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .page-hd p,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .agent-workspace-head p {
  margin: 7px 0 0 !important;
  color: var(--ui-muted) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.5;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .page-hd-actions {
  min-width: 0;
  gap: 7px !important;
  flex-wrap: wrap;
}

/* Shared controls and surfaces */
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .card-v3,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .records-storage,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .credits-stat,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .earn-metric,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .earn-section,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .earn-form,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .invite-section,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .invite-stat,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .uc-panel,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .uc-profile-hero {
  border: 1px solid var(--ui-line) !important;
  border-radius: 8px !important;
  background: var(--ui-surface) !important;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .025) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .card-v3:hover,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .credits-stat:hover {
  transform: none !important;
  border-color: var(--ui-line-strong) !important;
  box-shadow: 0 4px 14px rgba(17, 24, 39, .04) !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .card-v3-head {
  min-height: 58px;
  padding: 15px 18px !important;
  border-bottom: 1px solid var(--ui-line) !important;
  background: #fbfbfc !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .card-v3-head h3,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .shop-section-head h2 {
  margin: 0 !important;
  color: var(--ui-ink) !important;
  font-size: 17px !important;
  font-weight: 820 !important;
  line-height: 1.3;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .card-v3-head .sub,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .shop-section-head p {
  margin: 3px 0 0 !important;
  color: var(--ui-muted) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .card-v3-body {
  padding: 18px !important;
  background: var(--ui-surface) !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .grid-2 {
  grid-template-columns: minmax(380px, .82fr) minmax(0, 1.18fr) !important;
  gap: 18px !important;
  align-items: start !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .form,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .field-v3 {
  gap: 9px;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .field-v3 > label,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .field > span,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .compact-param-field > label {
  color: #4d535d !important;
  font-size: 12px !important;
  font-weight: 760 !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="hidden"]),
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) select,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) textarea {
  border: 1px solid var(--ui-line-strong) !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: var(--ui-ink) !important;
  box-shadow: none !important;
  font-size: 13px !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="hidden"]),
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) select {
  min-height: 40px !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) textarea {
  min-height: 92px;
  line-height: 1.55;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) input:focus,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) select:focus,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) textarea:focus {
  border-color: #9da2ab !important;
  outline: 0 !important;
  box-shadow: 0 0 0 3px rgba(17, 19, 24, .055) !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .field-hint,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .hint {
  color: var(--ui-muted) !important;
  font-size: 11px !important;
  line-height: 1.55;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) :is(.btn,.button,.pkg-btn,.uc-action) {
  min-height: 36px !important;
  padding: 0 13px !important;
  border: 1px solid var(--ui-line-strong) !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: #353a43 !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 760 !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) :is(.btn,.button,.pkg-btn,.uc-action):hover {
  border-color: #aeb2ba !important;
  background: #f4f5f6 !important;
  transform: none !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) :is(.btn-primary,.btn.primary,.button.primary,.pkg-btn.primary,.uc-action-primary) {
  border-color: #17191f !important;
  background: #17191f !important;
  color: #fff !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) :is(.btn-primary,.btn.primary,.button.primary,.pkg-btn.primary,.uc-action-primary):hover {
  border-color: #2c3037 !important;
  background: #2c3037 !important;
  color: #fff !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) :is(.btn-lg,.btn.lg) {
  min-height: 44px !important;
  font-size: 13px !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .badge-balance {
  min-height: 36px !important;
  padding: 0 12px !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: var(--ui-text) !important;
  box-shadow: none !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) :is(.tabs,.mode-toggle,.video-reference-modes) {
  gap: 3px !important;
  padding: 3px !important;
  overflow-x: auto;
  border: 1px solid var(--ui-line) !important;
  border-radius: 8px !important;
  background: var(--ui-surface-soft) !important;
  box-shadow: none !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) :is(.tab,.mode-toggle label,.video-reference-modes label) {
  min-height: 32px !important;
  padding: 0 11px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #656b75 !important;
  box-shadow: none !important;
  font-size: 11px !important;
  font-weight: 720 !important;
  white-space: nowrap;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .tab.active,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .mode-toggle label:has(input:checked),
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .video-reference-modes label:has(input:checked) {
  background: #fff !important;
  color: var(--ui-ink) !important;
  box-shadow: 0 1px 3px rgba(17, 24, 39, .08) !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .cost-hint,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .generation-notice,
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .alert {
  padding: 10px 12px !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: 7px !important;
  background: #fafafb !important;
  color: #606671 !important;
  box-shadow: none !important;
  font-size: 11px !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .compact-param-row {
  gap: 8px !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .edit-upload-box {
  min-height: 76px !important;
  border: 1px dashed var(--ui-line-strong) !important;
  border-radius: 7px !important;
  background: #fafafb !important;
  box-shadow: none !important;
}

/* Video and audio workbenches */
html[data-theme] body:is(.page-video,.page-audio):not(.page-admin) .grid-2 > .card-v3:first-child {
  position: sticky;
  top: 20px;
}

html[data-theme] body:is(.page-video,.page-audio):not(.page-admin) .grid-2 > .card-v3:last-child .card-v3-body {
  min-height: 520px;
}

html[data-theme] body:is(.page-video,.page-audio):not(.page-admin) .grid-auto {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

/* Records and gallery */
html[data-theme] body.page-records:not(.page-admin) .records-storage {
  display: grid !important;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, .8fr) auto !important;
  gap: 18px !important;
  margin-bottom: 16px !important;
  padding: 16px 18px !important;
}

html[data-theme] body.page-records:not(.page-admin) .records-storage h2 {
  margin: 0 0 4px !important;
  color: var(--ui-ink) !important;
  font-size: 15px !important;
}

html[data-theme] body.page-records:not(.page-admin) .records-storage p {
  margin: 0 !important;
  color: var(--ui-muted) !important;
  font-size: 11px !important;
}

html[data-theme] body.page-records:not(.page-admin) .records-waterfall {
  column-gap: 10px !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .media-card,
html[data-theme] body.page-gallery:not(.page-admin) .gallery-waterfall .home-public-gallery-card {
  margin-bottom: 10px !important;
  overflow: hidden;
  border: 1px solid var(--ui-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .media-card:hover,
html[data-theme] body.page-gallery:not(.page-admin) .gallery-waterfall .home-public-gallery-card:hover {
  border-color: var(--ui-line-strong) !important;
  box-shadow: 0 8px 22px rgba(17, 24, 39, .07) !important;
  transform: translateY(-1px) !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .media-card-body,
html[data-theme] body.page-gallery:not(.page-admin) .gallery-waterfall .home-public-gallery-body {
  gap: 7px !important;
  padding: 11px 12px 12px !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .media-card .prompt,
html[data-theme] body.page-gallery:not(.page-admin) .home-public-gallery-prompt {
  color: var(--ui-ink) !important;
  font-size: 12px !important;
  font-weight: 760 !important;
  line-height: 1.5 !important;
}

html[data-theme] body.page-gallery:not(.page-admin) .gallery-tag-nav {
  gap: 6px !important;
  margin-bottom: 18px !important;
  overflow-x: auto;
  flex-wrap: nowrap;
}

html[data-theme] body.page-gallery:not(.page-admin) .gallery-tag-chip {
  min-height: 30px !important;
  padding: 0 11px !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: #646a74 !important;
  font-size: 11px !important;
  white-space: nowrap;
}

html[data-theme] body.page-gallery:not(.page-admin) .gallery-tag-chip.active {
  border-color: var(--ui-ink) !important;
  background: var(--ui-ink) !important;
  color: #fff !important;
}

/* Shop */
html[data-theme] body.page-shop:not(.page-admin) .balance-banner {
  gap: 16px !important;
  margin-bottom: 22px !important;
  padding: 17px 18px !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
}

html[data-theme] body.page-shop:not(.page-admin) .balance-banner .icon {
  width: 40px !important;
  height: 40px !important;
  border-radius: 8px !important;
  background: var(--ui-ink) !important;
  font-size: 16px !important;
}

html[data-theme] body.page-shop:not(.page-admin) .balance-banner .info .value {
  color: var(--ui-ink) !important;
  font-size: 24px !important;
}

html[data-theme] body.page-shop:not(.page-admin) .shop-section-head {
  margin: 30px 0 14px !important;
}

html[data-theme] body.page-shop:not(.page-admin) .pricing-row,
html[data-theme] body.page-shop:not(.page-admin) .storage-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 12px !important;
}

html[data-theme] body.page-shop:not(.page-admin) .pricing-card,
html[data-theme] body.page-shop:not(.page-admin) .storage-card,
html[data-theme] body.page-shop:not(.page-admin) .storage-overview {
  border: 1px solid var(--ui-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
}

html[data-theme] body.page-shop:not(.page-admin) .pricing-card {
  padding: 24px 20px 20px !important;
}

html[data-theme] body.page-shop:not(.page-admin) .pricing-card:hover,
html[data-theme] body.page-shop:not(.page-admin) .storage-card:hover {
  border-color: var(--ui-line-strong) !important;
  box-shadow: 0 8px 22px rgba(17, 24, 39, .06) !important;
  transform: translateY(-1px) !important;
}

html[data-theme] body.page-shop:not(.page-admin) .pricing-card.featured {
  border-color: var(--ui-ink) !important;
  box-shadow: inset 0 3px 0 var(--ui-accent) !important;
}

html[data-theme] body.page-shop:not(.page-admin) .pricing-card.featured::before {
  background: var(--ui-accent) !important;
}

html[data-theme] body.page-shop:not(.page-admin) .pricing-card .pkg-price {
  color: var(--ui-ink) !important;
  font-size: 32px !important;
}

html[data-theme] body.page-shop:not(.page-admin) .pricing-card .pkg-credits {
  color: var(--ui-accent) !important;
}

html[data-theme] body.page-shop:not(.page-admin) .order-item {
  border-bottom: 1px solid var(--ui-line) !important;
  background: transparent !important;
}

/* Account, credits, earnings, and invites */
html[data-theme] body.page-ucenter:not(.page-admin) .uc-page {
  max-width: 1120px !important;
}

html[data-theme] body.page-ucenter:not(.page-admin) .uc-profile-hero {
  margin-bottom: 16px;
  padding: 22px 24px !important;
}

html[data-theme] body.page-ucenter:not(.page-admin) .uc-profile-main .uc-avatar {
  width: 58px !important;
  height: 58px !important;
  border-radius: 8px !important;
  background: var(--ui-ink) !important;
  color: #fff !important;
  font-size: 25px !important;
  box-shadow: none !important;
}

html[data-theme] body.page-ucenter:not(.page-admin) .uc-header-info h1 {
  font-size: 24px !important;
}

html[data-theme] body.page-ucenter:not(.page-admin) .uc-panel {
  padding: 20px !important;
}

html[data-theme] body.page-ucenter:not(.page-admin) .uc-balance-icon {
  border-radius: 6px !important;
}

html[data-theme] body.page-credits:not(.page-admin) .credits-stats,
html[data-theme] body.page-earnings:not(.page-admin) .earn-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-bottom: 16px !important;
}

html[data-theme] body.page-earnings:not(.page-admin) .earn-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

html[data-theme] body.page-credits:not(.page-admin) .credits-stat,
html[data-theme] body.page-earnings:not(.page-admin) .earn-metric,
html[data-theme] body.page-invite:not(.page-admin) .invite-stat {
  padding: 16px !important;
}

html[data-theme] body.page-credits:not(.page-admin) .credits-stat .value,
html[data-theme] body.page-earnings:not(.page-admin) .earn-metric strong,
html[data-theme] body.page-invite:not(.page-admin) .invite-stat .num {
  color: var(--ui-ink) !important;
  font-size: 22px !important;
  font-weight: 850 !important;
}

html[data-theme] body.page-credits:not(.page-admin) .credits-item {
  border: 0 !important;
  border-bottom: 1px solid var(--ui-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-theme] body.page-earnings:not(.page-admin) .earn-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .65fr) !important;
  gap: 16px !important;
}

html[data-theme] body.page-earnings:not(.page-admin) .earn-section,
html[data-theme] body.page-earnings:not(.page-admin) .earn-form {
  border-radius: 8px !important;
  box-shadow: none !important;
}

html[data-theme] body.page-earnings:not(.page-admin) :is(.earn-table th,.earn-table td),
html[data-theme] body.page-invite:not(.page-admin) :is(.invite-table th,.invite-table td) {
  border-bottom-color: var(--ui-line) !important;
  font-size: 12px !important;
}

html[data-theme] body.page-invite:not(.page-admin) .invite-hero {
  margin-bottom: 16px !important;
  padding: 24px !important;
  border: 1px solid #24272d !important;
  border-radius: 8px !important;
  background: #17191f !important;
  box-shadow: none !important;
}

html[data-theme] body.page-invite:not(.page-admin) .invite-copy-box {
  border-radius: 7px !important;
  background: rgba(255,255,255,.08) !important;
}

html[data-theme] body.page-invite:not(.page-admin) .invite-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

html[data-theme] body.page-invite:not(.page-admin) .invite-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .7fr) !important;
  gap: 16px !important;
}

/* Agent hub */
html[data-theme] body.page-agents:not(.page-admin) .main-area {
  padding: 24px clamp(20px, 2.8vw, 42px) 42px !important;
  background: var(--ui-bg) !important;
}

html[data-theme] body.page-agents:not(.page-admin) .agent-hub-page {
  width: min(100%, 1380px) !important;
  min-height: calc(100dvh - 48px) !important;
  gap: 12px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
}

html[data-theme] body.page-agents:not(.page-admin) .agent-workspace-head {
  margin: 0 !important;
  padding: 0 0 17px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

html[data-theme] body.page-agents:not(.page-admin) .agent-shell {
  grid-template-columns: 224px minmax(0, 1fr) !important;
  min-height: calc(100dvh - 148px) !important;
  overflow: hidden !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html[data-theme] body.page-agents:not(.page-admin) .agent-drawer {
  gap: 3px !important;
  padding: 12px 10px !important;
  border-right: 1px solid var(--ui-line) !important;
  background: #f8f9fa !important;
}

html[data-theme] body.page-agents:not(.page-admin) .agent-drawer-item {
  min-height: 40px !important;
  padding: 9px 10px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #5c626d !important;
  box-shadow: none !important;
}

html[data-theme] body.page-agents:not(.page-admin) .agent-drawer-item:hover {
  background: #eef0f2 !important;
  color: var(--ui-ink) !important;
}

html[data-theme] body.page-agents:not(.page-admin) .agent-drawer-item.is-active {
  background: var(--ui-ink) !important;
  color: #fff !important;
  box-shadow: none !important;
}

html[data-theme] body.page-agents:not(.page-admin) .agent-stage {
  padding: 18px !important;
  background: #fff !important;
}

html[data-theme] body.page-agents:not(.page-admin) .agent-view-head {
  padding: 0 0 15px !important;
  border-bottom: 1px solid var(--ui-line) !important;
}

html[data-theme] body.page-agents:not(.page-admin) .agent-view-head h2 {
  color: var(--ui-ink) !important;
  font-size: 22px !important;
}

html[data-theme] body.page-agents:not(.page-admin) :is(.agent-card,.agent-placeholder,.commerce-workbench,.role-swap-workbench) {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html[data-theme] body.page-agents:not(.page-admin) :is(.commerce-panel,.role-swap-panel,.agent-card-panel,.commerce-analysis-card,.commerce-plan-card,.role-swap-form-card,.role-swap-result-card,.role-swap-summary-card,.commerce-prompt-box,.agent-deliverable) {
  border: 1px solid var(--ui-line) !important;
  border-radius: 8px !important;
  background: #fafafb !important;
  box-shadow: none !important;
}

html[data-theme] body.page-agents:not(.page-admin) :is(.commerce-upload,.role-swap-upload) {
  border: 1px dashed var(--ui-line-strong) !important;
  border-radius: 8px !important;
  background: #fafafb !important;
  box-shadow: none !important;
}

html[data-theme] body.page-agents:not(.page-admin) :is(.agent-card-actions button,.commerce-actions button,.commerce-actions a,.role-swap-actions button,.role-swap-actions a) {
  min-height: 38px !important;
  border: 1px solid var(--ui-line-strong) !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: var(--ui-text) !important;
  box-shadow: none !important;
}

html[data-theme] body.page-agents:not(.page-admin) :is(.agent-card-actions .primary,.commerce-actions .primary,.role-swap-actions .primary) {
  border-color: var(--ui-ink) !important;
  background: var(--ui-ink) !important;
  color: #fff !important;
}

html[data-theme] body.page-agents:not(.page-admin) :is(.agent-setting-field input,.agent-setting-field select,.commerce-field input,.commerce-field select,.commerce-field textarea,.role-swap-field input,.role-swap-field select,.role-swap-field textarea) {
  border-radius: 7px !important;
  background: #fff !important;
  box-shadow: none !important;
}

html[data-theme] body.page-agents:not(.page-admin) :is(.agent-card-badge,.agent-tags span,.role-swap-panel-note span,.role-swap-model-meta span,.commerce-chip.is-active,.commerce-chip.is-selected) {
  border-color: #f0c5d4 !important;
  border-radius: 6px !important;
  background: var(--ui-accent-soft) !important;
  color: #b92e60 !important;
}

/* Creation room */
html[data-theme] body.page-creation:not(.page-admin) .main-area {
  height: 100dvh !important;
  overflow: hidden !important;
  padding: 18px !important;
  background: var(--ui-bg) !important;
}

html[data-theme] body.page-creation:not(.page-admin) .creation-workspace {
  width: min(100%, 1460px) !important;
  height: calc(100dvh - 36px) !important;
  max-height: calc(100dvh - 36px) !important;
  grid-template-columns: 224px minmax(0, 1fr) !important;
  overflow: hidden !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
}

html[data-theme] body.page-creation:not(.page-admin) .creation-sidebar {
  border-right: 1px solid var(--ui-line) !important;
  background: #f8f9fa !important;
}

html[data-theme] body.page-creation:not(.page-admin) .creation-main,
html[data-theme] body.page-creation:not(.page-admin) .creation-topbar,
html[data-theme] body.page-creation:not(.page-admin) .creation-thread {
  background: #fff !important;
}

html[data-theme] body.page-creation:not(.page-admin) .creation-topbar {
  border-bottom: 1px solid var(--ui-line) !important;
}

html[data-theme] body.page-creation:not(.page-admin) .creation-composer.home-console {
  width: min(calc(100% - 32px), 880px) !important;
  max-width: calc(100% - 32px) !important;
  margin: 0 auto 14px !important;
  overflow: hidden !important;
  border: 1px solid var(--ui-line-strong) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 8px 26px rgba(17, 24, 39, .08) !important;
  backdrop-filter: none !important;
}

html[data-theme] body.page-creation:not(.page-admin) .creation-composer .home-prompt-field textarea {
  min-height: 58px !important;
  height: 58px !important;
  max-height: 160px !important;
  border-radius: 7px !important;
}

/* Canvas workspaces: keep interaction geometry, simplify the chrome. */
html[data-theme] body:is(.page-canvas,.page-designer-canvas):not(.page-admin) .main-area {
  min-height: 100dvh !important;
  overflow: hidden !important;
  padding: 14px !important;
  background: #eef0f3 !important;
}

html[data-theme] body.page-canvas:not(.page-admin) .canvas-page,
html[data-theme] body.page-designer-canvas:not(.page-admin) .designer-canvas-page {
  border: 1px solid var(--ui-line-strong) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
}

html[data-theme] body:is(.page-canvas,.page-designer-canvas):not(.page-admin) :is(.canvas-toolbar,.designer-toolbar,.canvas-panel,.designer-sidebar,.designer-inspector) {
  border-color: var(--ui-line) !important;
  box-shadow: none !important;
}

/* Dark mode */
html[data-theme="dark"] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) {
  --ui-bg: #121418;
  --ui-surface: #191b20;
  --ui-surface-soft: #202329;
  --ui-surface-muted: #272a31;
  --ui-ink: #f2f3f5;
  --ui-text: #d4d7dd;
  --ui-muted: #959ba6;
  --ui-line: #2d3037;
  --ui-line-strong: #3b3f48;
  --ui-accent-soft: #351d28;
}

html[data-theme="dark"] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) :is(.sidebar,.sidebar-header,.sidebar-footer,.sidebar-user,.sidebar-action-btn,.sidebar-balance,.card-v3,.card-v3-body,.records-storage,.credits-stat,.earn-metric,.earn-section,.earn-form,.invite-section,.invite-stat,.uc-panel,.uc-profile-hero,.balance-banner,.pricing-card,.storage-card,.storage-overview,.media-card),
html[data-theme="dark"] body.page-agents:not(.page-admin) :is(.agent-shell,.agent-stage),
html[data-theme="dark"] body.page-creation:not(.page-admin) :is(.creation-workspace,.creation-main,.creation-topbar,.creation-thread,.creation-composer.home-console) {
  background: var(--ui-surface) !important;
}

html[data-theme="dark"] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) :is(.card-v3-head,.tabs,.mode-toggle,.video-reference-modes,.cost-hint,.generation-notice,.alert,.edit-upload-box),
html[data-theme="dark"] body.page-agents:not(.page-admin) :is(.agent-drawer,.commerce-panel,.role-swap-panel,.agent-card-panel,.commerce-analysis-card,.commerce-plan-card,.role-swap-form-card,.role-swap-result-card,.role-swap-summary-card,.commerce-prompt-box,.agent-deliverable,.commerce-upload,.role-swap-upload),
html[data-theme="dark"] body.page-creation:not(.page-admin) .creation-sidebar {
  background: var(--ui-surface-soft) !important;
}

html[data-theme="dark"] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="hidden"]),
html[data-theme="dark"] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) select,
html[data-theme="dark"] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) textarea,
html[data-theme="dark"] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) :is(.btn,.button,.pkg-btn,.uc-action),
html[data-theme="dark"] body.page-agents:not(.page-admin) :is(.agent-card-actions button,.commerce-actions button,.commerce-actions a,.role-swap-actions button,.role-swap-actions a) {
  border-color: var(--ui-line-strong) !important;
  background: #202329 !important;
  color: var(--ui-text) !important;
}

html[data-theme="dark"] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) :is(.btn-primary,.btn.primary,.button.primary,.pkg-btn.primary,.uc-action-primary),
html[data-theme="dark"] body.page-agents:not(.page-admin) :is(.agent-drawer-item.is-active,.agent-card-actions .primary,.commerce-actions .primary,.role-swap-actions .primary) {
  border-color: #f0f1f3 !important;
  background: #f0f1f3 !important;
  color: #15171b !important;
}

/* Responsive */
@media (max-width: 1180px) {
  html[data-theme] body:not(.page-admin):not(.page-auth):not(.page-embed) .sidebar {
    top: 0 !important;
    bottom: 0 !important;
    width: min(280px, calc(100vw - 44px)) !important;
    border-radius: 0 !important;
    transform: translate3d(-105%, 0, 0) !important;
  }

  html[data-theme] body.sidebar-open:not(.page-admin):not(.page-auth):not(.page-embed) .sidebar {
    transform: translate3d(0, 0, 0) !important;
  }

  html[data-theme] body:not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-toggle {
    z-index: 1002;
    display: grid !important;
  }

  html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .main-area {
    margin-left: 0 !important;
    padding: 24px 20px 52px !important;
  }

  html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .page-hd {
    padding-left: 44px !important;
  }

  html[data-theme] body.page-creation:not(.page-admin) .main-area,
  html[data-theme] body:is(.page-canvas,.page-designer-canvas):not(.page-admin) .main-area {
    padding: 12px !important;
  }

  html[data-theme] body.page-credits:not(.page-admin) .credits-stats,
  html[data-theme] body.page-earnings:not(.page-admin) .earn-summary,
  html[data-theme] body.page-invite:not(.page-admin) .invite-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 860px) {
  html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .grid-2,
  html[data-theme] body.page-earnings:not(.page-admin) .earn-grid,
  html[data-theme] body.page-invite:not(.page-admin) .invite-grid {
    grid-template-columns: 1fr !important;
  }

  html[data-theme] body:is(.page-video,.page-audio):not(.page-admin) .grid-2 > .card-v3:first-child {
    position: static;
  }

  html[data-theme] body.page-records:not(.page-admin) .records-storage {
    grid-template-columns: 1fr !important;
  }

  html[data-theme] body.page-agents:not(.page-admin) .agent-shell {
    grid-template-columns: 1fr !important;
  }

  html[data-theme] body.page-agents:not(.page-admin) .agent-drawer {
    max-height: 210px;
    border-right: 0 !important;
    border-bottom: 1px solid var(--ui-line) !important;
  }

  html[data-theme] body.page-creation:not(.page-admin) .creation-workspace {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
  }
}

@media (max-width: 640px) {
  html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .main-area {
    padding: 16px 12px 38px !important;
  }

  html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .page-hd {
    min-height: 58px !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
    padding: 0 0 14px 42px !important;
  }

  html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .page-hd h1,
  html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .agent-workspace-head h1 {
    font-size: 24px !important;
  }

  html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .page-hd-actions {
    width: 100%;
  }

  html[data-theme] body:is(.page-video,.page-audio):not(.page-admin) .grid-auto {
    grid-template-columns: 1fr !important;
  }

  html[data-theme] body.page-shop:not(.page-admin) .balance-banner,
  html[data-theme] body.page-ucenter:not(.page-admin) .uc-profile-hero {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  html[data-theme] body.page-shop:not(.page-admin) .balance-banner .info + .info {
    width: 100%;
    padding: 12px 0 0 !important;
    border-top: 1px solid var(--ui-line);
    border-left: 0 !important;
  }

  html[data-theme] body.page-credits:not(.page-admin) .credits-stats,
  html[data-theme] body.page-earnings:not(.page-admin) .earn-summary,
  html[data-theme] body.page-invite:not(.page-admin) .invite-stats,
  html[data-theme] body.page-ucenter:not(.page-admin) .uc-overview-grid {
    grid-template-columns: 1fr !important;
  }

  html[data-theme] body.page-invite:not(.page-admin) .invite-copy-grid {
    grid-template-columns: 1fr !important;
  }

  html[data-theme] body.page-agents:not(.page-admin) .main-area {
    padding: 14px 12px 30px !important;
  }

  html[data-theme] body.page-agents:not(.page-admin) .agent-workspace-head {
    padding: 0 0 14px 42px !important;
  }

  html[data-theme] body.page-agents:not(.page-admin) .agent-stage {
    padding: 12px !important;
  }

  html[data-theme] body.page-creation:not(.page-admin) .main-area {
    padding: 8px !important;
  }

  html[data-theme] body.page-creation:not(.page-admin) .creation-workspace {
    height: calc(100dvh - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
  }

  html[data-theme] body.page-creation:not(.page-admin) .creation-composer.home-console {
    width: calc(100% - 16px) !important;
    max-width: calc(100% - 16px) !important;
    margin-bottom: 8px !important;
  }
}

/* Homepage brand and workspace composition */
html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-logo {
  width: 56px !important;
  height: 32px !important;
  flex: 0 0 56px !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-logo img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  object-fit: contain !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-brand-text.is-platform-only h1 {
  color: #061b49 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

html[data-theme] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-brand-text.is-platform-only small {
  display: block !important;
  overflow: hidden;
  color: #7a818d !important;
  font-size: 8px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme] body.page-app:not(.page-admin) .sidebar-header {
  min-height: 70px !important;
  padding: 13px 12px !important;
}

html[data-theme] body.page-app:not(.page-admin) .sidebar-brand {
  min-width: 0 !important;
  gap: 9px !important;
}

html[data-theme] body.page-app:not(.page-admin) .sidebar-logo {
  width: 58px !important;
  height: 34px !important;
  flex: 0 0 58px !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-theme] body.page-app:not(.page-admin) .sidebar-logo img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  object-fit: contain !important;
}

html[data-theme] body.page-app:not(.page-admin) .sidebar-brand-text.is-platform-only {
  min-width: 0 !important;
  display: grid !important;
  gap: 2px !important;
}

html[data-theme] body.page-app:not(.page-admin) .sidebar-brand-text.is-platform-only h1 {
  color: #061b49 !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
}

html[data-theme] body.page-app:not(.page-admin) .sidebar-brand-text.is-platform-only small {
  display: block !important;
  overflow: hidden;
  color: #7a818d !important;
  font-size: 8px !important;
  font-weight: 650 !important;
  line-height: 1.25 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme] body.page-app:not(.page-admin) .home-dashboard,
html[data-theme] body.page-app.sidebar-collapsed:not(.page-admin) .home-dashboard {
  width: min(100%, 1360px) !important;
  max-width: 1360px !important;
}

html[data-theme] body.page-app:not(.page-admin) .home-dashboard > .page-hd {
  min-height: 60px !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 20px !important;
}

html[data-theme] body.page-app:not(.page-admin) .home-top-nav {
  min-width: 0;
  gap: 4px !important;
}

html[data-theme] body.page-app:not(.page-admin) .home-top-nav a {
  min-height: 34px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
}

html[data-theme] body.page-app:not(.page-admin) .home-studio-intro {
  width: min(100%, 960px) !important;
  min-height: 142px;
  display: grid !important;
  grid-template-columns: 172px minmax(0, 1fr) !important;
  align-items: center !important;
  justify-content: stretch !important;
  gap: 28px !important;
  margin: 34px auto 20px !important;
  padding: 0 8px !important;
  text-align: left !important;
}

html[data-theme] body.page-app:not(.page-admin) .home-studio-intro-logo {
  width: 172px !important;
  height: 142px !important;
  display: block;
  object-fit: contain;
}

html[data-theme] body.page-app:not(.page-admin) .home-studio-intro-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 7px 0 7px 28px;
  border-left: 1px solid #e3e5e9;
}

html[data-theme] body.page-app:not(.page-admin) .home-studio-intro-kicker {
  color: #858b96;
  font-size: 10px;
  font-weight: 800;
}

html[data-theme] body.page-app:not(.page-admin) .home-studio-intro h1 {
  margin: 0 !important;
  color: #111318 !important;
  font-size: clamp(24px, 2.4vw, 31px) !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
}

html[data-theme] body.page-app:not(.page-admin) .home-studio-intro p {
  max-width: 640px;
  margin: 0 !important;
  color: #737984 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.55;
}

html[data-theme] body.page-app:not(.page-admin) .home-console {
  width: min(100%, 960px) !important;
  border-color: #dfe1e5 !important;
  box-shadow: 0 12px 34px rgba(17, 24, 39, .055) !important;
}

html[data-theme] body.page-app:not(.page-admin) .home-console-head {
  min-height: 52px !important;
  padding: 10px 14px !important;
}

html[data-theme] body.page-app:not(.page-admin) .home-console-head h3 {
  font-size: 14px !important;
}

html[data-theme] body.page-app:not(.page-admin) .home-prompt-field textarea {
  min-height: 84px !important;
  border-radius: 8px !important;
}

html[data-theme] body.page-app:not(.page-admin) .home-workflow-strip {
  width: min(100%, 960px) !important;
  margin-top: 12px !important;
}

html[data-theme] body.page-app:not(.page-admin) .home-workflow-grid {
  justify-content: flex-start !important;
}

html[data-theme] body.page-app:not(.page-admin) .home-showcase-grid,
html[data-theme] body.page-app.sidebar-collapsed:not(.page-admin) .home-showcase-grid {
  width: min(100%, 1240px) !important;
  margin-top: 54px !important;
}

html[data-theme="dark"] body.page-app:not(.page-admin) .sidebar-brand-text.is-platform-only h1 {
  color: #f4f6fa !important;
}

html[data-theme="dark"] body:not(.page-app):not(.page-admin):not(.page-auth):not(.page-embed) .sidebar-brand-text.is-platform-only h1 {
  color: #f4f6fa !important;
}

html[data-theme="dark"] body.page-app:not(.page-admin) .home-studio-intro-logo {
  padding: 6px;
  border-radius: 7px;
  background: #fff;
}

html[data-theme="dark"] body.page-app:not(.page-admin) .home-studio-intro-copy {
  border-left-color: #30333a;
}

html[data-theme="dark"] body.page-app:not(.page-admin) .home-studio-intro h1 {
  color: #f3f4f6 !important;
}

@media (max-width: 760px) {
  html[data-theme] body.page-app:not(.page-admin) .sidebar-toggle {
    border: 1px solid #dfe1e5 !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #20242b !important;
    box-shadow: 0 4px 14px rgba(17, 24, 39, .08) !important;
  }

  html[data-theme] body.page-app:not(.page-admin) .sidebar-toggle svg {
    stroke: currentColor !important;
  }

  html[data-theme] body.page-app:not(.page-admin) .home-dashboard > .page-hd {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  html[data-theme] body.page-app:not(.page-admin) .home-studio-intro {
    min-height: 104px;
    grid-template-columns: 104px minmax(0, 1fr) !important;
    gap: 16px !important;
    margin: 28px auto 16px !important;
    padding: 0 2px !important;
  }

  html[data-theme] body.page-app:not(.page-admin) .home-studio-intro-logo {
    width: 104px !important;
    height: 92px !important;
  }

  html[data-theme] body.page-app:not(.page-admin) .home-studio-intro-copy {
    gap: 4px;
    padding-left: 16px;
  }

  html[data-theme] body.page-app:not(.page-admin) .home-studio-intro-kicker {
    font-size: 8px;
  }

  html[data-theme] body.page-app:not(.page-admin) .home-studio-intro h1 {
    font-size: 19px !important;
  }

  html[data-theme] body.page-app:not(.page-admin) .home-studio-intro p {
    font-size: 11px !important;
  }
}

@media (max-width: 460px) {
  html[data-theme] body.page-app:not(.page-admin) .home-studio-intro {
    grid-template-columns: 84px minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  html[data-theme] body.page-app:not(.page-admin) .home-studio-intro-logo {
    width: 84px !important;
    height: 76px !important;
  }

  html[data-theme] body.page-app:not(.page-admin) .home-studio-intro-copy {
    padding-left: 12px;
  }

  html[data-theme] body.page-app:not(.page-admin) .home-studio-intro h1 {
    font-size: 17px !important;
  }

  html[data-theme] body.page-app:not(.page-admin) .home-studio-intro p {
    display: none;
  }
}
