:root {
  --canvas: #f0f2f5;
  --surface: #ffffff;
  --surface-soft: #f5f7fa;
  --sidebar: #304156;
  --sidebar-hover: #263445;
  --sidebar-nested: #1f2d3d;
  --sidebar-nested-hover: #001528;
  --sidebar-text: #bfcbd9;
  --sidebar-active: #409eff;
  --text: #303133;
  --text-regular: #606266;
  --text-secondary: #909399;
  --border: #dcdfe6;
  --border-light: #ebeef5;
  --primary: #1890ff;
  --primary-hover: #66b1ff;
  --primary-active: #1682e6;
  --success: #13ce66;
  --success-soft: #f0f9eb;
  --warning: #ffba00;
  --warning-soft: #fdf6ec;
  --danger: #ff4949;
  --danger-soft: #fef0f0;
  --info: #909399;
  --tag-active: #42b983;
  --sidebar-width: 210px;
  --navbar-height: 50px;
  --tags-height: 34px;
  --content-padding: 20px;
  --radius: 4px;
  --shadow-nav: 0 1px 4px rgba(0, 21, 41, 0.08);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04);
}

body[data-shell="mobile"].mobile-keyboard-open main {
  min-height: auto !important;
  padding-bottom: 16px !important;
}

body[data-shell="mobile"].mobile-keyboard-open .mobile-bottom-nav {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  width: calc(100% - 20px) !important;
  margin: 8px 10px calc(10px + env(safe-area-inset-bottom)) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
  transition: none !important;
}

body[data-shell="mobile"][data-page="login"] .password-field {
  position: relative !important;
  display: block !important;
}

body[data-shell="mobile"][data-page="login"] .password-field input {
  padding-right: 58px !important;
}

body[data-shell="mobile"][data-page="login"] button.password-toggle.icon-password-toggle,
body[data-shell="mobile"][data-page="login"] .auth-page .password-toggle.icon-password-toggle {
  position: absolute !important;
  top: 50% !important;
  right: 6px !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 0 !important;
  border-left: 1px solid var(--mobile-line) !important;
  border-radius: 0 var(--mobile-radius-sm) var(--mobile-radius-sm) 0 !important;
  background: #ffffff !important;
  color: var(--mobile-muted) !important;
  box-shadow: none !important;
  transform: translateY(-50%) !important;
}

body[data-shell="mobile"][data-page="login"] button.password-toggle.icon-password-toggle::before,
body[data-shell="mobile"][data-page="login"] .auth-page .password-toggle.icon-password-toggle::before {
  width: 18px !important;
  height: 18px !important;
}

body[data-shell="mobile"][data-page="login"] button.password-toggle.icon-password-toggle:hover,
body[data-shell="mobile"][data-page="login"] button.password-toggle.icon-password-toggle:focus-visible {
  background: #ffffff !important;
  color: var(--primary) !important;
  outline: 2px solid rgba(226, 27, 60, 0.18) !important;
  outline-offset: -2px !important;
}

body[data-shell="mobile"] {
  --sidebar-width: 0px;
  --mobile-nav-height: 74px;
  background: #eef1f5;
  color: #12151b;
  overflow-x: hidden;
}

body[data-shell="mobile"] main {
  width: 100%;
  min-height: 100vh;
  padding: calc(12px + env(safe-area-inset-top)) 12px calc(112px + env(safe-area-inset-bottom));
}

body[data-shell="mobile"] .mobile-bottom-nav {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  width: 100%;
  height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
  padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
  border: 0;
  border-top: 1px solid rgba(18, 21, 27, .12);
  background: rgba(11, 15, 21, .96);
  box-shadow: 0 -14px 32px rgba(13, 17, 24, .24);
}

body[data-shell="mobile"] .mobile-bottom-nav .brand {
  display: none;
}

body[data-shell="mobile"] .mobile-bottom-nav nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: visible;
  overflow-y: hidden;
  scrollbar-width: none;
}

body[data-shell="mobile"] .mobile-bottom-nav nav::-webkit-scrollbar {
  display: none;
}

body[data-shell="mobile"] .mobile-bottom-nav a {
  min-width: 0;
  min-height: 58px;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 7px 4px;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, .68);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.15;
  justify-content: center;
  text-align: center;
  box-shadow: none;
}

body[data-shell="mobile"] .mobile-bottom-nav a svg {
  width: 19px;
  height: 19px;
}

body[data-shell="mobile"] .mobile-bottom-nav a.active {
  color: #fff;
  background: rgba(226, 27, 60, .22);
  box-shadow: none;
}

body[data-shell="mobile"] .mobile-bottom-nav a::before {
  display: none;
  content: none;
}

body[data-shell="mobile"] .mobile-bottom-nav a.active::before,
body[data-shell="mobile"] .mobile-bottom-nav a.active::after {
  display: none;
  content: none;
}

body[data-shell="mobile"] .mobile-more-menu {
  position: relative;
  min-width: 0;
}

body[data-shell="mobile"] .mobile-more-trigger {
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 4px;
  border-radius: 8px;
  color: rgba(255, 255, 255, .68);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.15;
  text-align: center;
  list-style: none;
  cursor: pointer;
}

body[data-shell="mobile"] .mobile-more-trigger::-webkit-details-marker {
  display: none;
}

body[data-shell="mobile"] .mobile-more-trigger svg {
  width: 19px;
  height: 19px;
  color: currentColor;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-shell="mobile"] .mobile-more-menu[open] .mobile-more-trigger,
body[data-shell="mobile"] .mobile-more-menu.active .mobile-more-trigger {
  color: #fff;
  background: rgba(226, 27, 60, .22);
}

body[data-shell="mobile"] .mobile-more-panel {
  position: fixed;
  right: 10px;
  bottom: calc(var(--mobile-nav-height) + 10px + env(safe-area-inset-bottom));
  z-index: 70;
  display: grid;
  min-width: 150px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  background: rgba(11, 15, 21, .98);
  box-shadow: 0 18px 44px rgba(13, 17, 24, .32);
}

body[data-shell="mobile"] .mobile-more-menu:not([open]) .mobile-more-panel {
  display: none;
}

body[data-shell="mobile"] .mobile-more-panel a,
body[data-shell="mobile"] .mobile-more-panel .mobile-more-logout {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  justify-content: start;
  gap: 8px;
  padding: 0 10px;
  text-align: left;
}

body[data-shell="mobile"] .mobile-more-panel .mobile-more-logout {
  margin-top: 4px;
  border: 1px solid rgba(226, 27, 60, 0.36);
  border-radius: 10px;
  background: rgba(226, 27, 60, 0.08);
  color: #ffffff;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

body[data-shell="mobile"] .mobile-more-panel .mobile-more-logout svg {
  width: 18px;
  height: 18px;
  align-self: center;
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-shell="mobile"] .mobile-more-panel .mobile-more-logout svg path {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

body[data-shell="mobile"] .mobile-more-panel .mobile-more-logout:active {
  transform: translateY(1px);
  background: rgba(226, 27, 60, 0.16);
}

body[data-shell="mobile"] .mobile-appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
}

body[data-shell="mobile"] .mobile-user {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
}

body[data-shell="mobile"] .mobile-user img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #f6f3ee;
}

body[data-shell="mobile"] .mobile-user strong,
body[data-shell="mobile"] .mobile-user span {
  display: block;
  max-width: 48vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-shell="mobile"] .mobile-user strong {
  font-size: 14px;
}

body[data-shell="mobile"] .mobile-user span {
  color: #68717e;
  font-size: 11px;
}

body[data-shell="mobile"] .mobile-runtime {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #12151b;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

body[data-shell="mobile"] .mobile-runtime.is-disabled {
  background: #6b7280;
}

body[data-shell="mobile"] .mobile-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

body[data-shell="mobile"] .mobile-kpi-grid article {
  min-width: 0;
  padding: 9px 8px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
}

body[data-shell="mobile"] .mobile-kpi-grid span {
  display: block;
  color: #68717e;
  font-size: 10px;
  white-space: nowrap;
}

body[data-shell="mobile"] .mobile-kpi-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-shell="mobile"] .topbar,
body[data-shell="mobile"] .tags-view,
body[data-shell="mobile"] .sidebar-panel {
  display: none;
}

body[data-shell="mobile"] .page-head {
  min-height: auto;
  margin: 0 0 10px;
  padding: 16px 16px;
  border-radius: 8px;
  background: #171e28;
}

body[data-shell="mobile"] .page-head::before,
body[data-shell="mobile"] .page-head::after {
  display: none;
}

body[data-shell="mobile"] .page-head h1 {
  font-size: clamp(26px, 7vw, 38px);
  line-height: 1.06;
}

body[data-shell="mobile"] .page-head p {
  max-width: none;
  font-size: 13px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

body[data-shell="mobile"] .page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

body[data-shell="mobile"] .page-actions > * {
  flex: 1 1 150px;
}

body[data-shell="mobile"] .metric-grid,
body[data-shell="mobile"] .workspace-shell,
body[data-shell="mobile"] .asset-layout,
body[data-shell="mobile"] .account-layout,
body[data-shell="mobile"] .support-grid,
body[data-shell="mobile"] .token-admin-grid,
body[data-shell="mobile"] .policy-form-grid,
body[data-shell="mobile"] .admin-module-grid,
body[data-shell="mobile"] .api-settings-grid,
body[data-shell="mobile"] .redeem-admin-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

body[data-shell="mobile"] .panel,
body[data-shell="mobile"] .metric-card {
  border-radius: 8px;
  box-shadow: none;
}

body[data-shell="mobile"] .panel {
  padding: 14px;
  margin-bottom: 10px;
}

body[data-shell="mobile"] .section-head {
  align-items: flex-start;
  gap: 10px;
}

body[data-shell="mobile"] .section-head h2 {
  font-size: 17px;
}

body[data-shell="mobile"] .button-group,
body[data-shell="mobile"] .card-actions,
body[data-shell="mobile"] .icon-actions,
body[data-shell="mobile"] .actions.vertical {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-shell="mobile"] button,
body[data-shell="mobile"] .ghost-link,
body[data-shell="mobile"] input,
body[data-shell="mobile"] select,
body[data-shell="mobile"] textarea,
body[data-shell="mobile"] .avatar-upload-button {
  min-height: 44px;
}

body[data-shell="mobile"] .toolbar-input,
body[data-shell="mobile"] .toolbar-select,
body[data-shell="mobile"] .button-group input,
body[data-shell="mobile"] .button-group select {
  width: 100%;
  min-width: 0;
}

body[data-shell="mobile"] .form-stack,
body[data-shell="mobile"] .profile-form-grid,
body[data-shell="mobile"] .member-edit-grid,
body[data-shell="mobile"] .profile-password-form,
body[data-shell="mobile"] .redeem-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

body[data-shell="mobile"] .workflow-asset-list,
body[data-shell="mobile"] .asset-grid,
body[data-shell="mobile"] .result-grid,
body[data-shell="mobile"] .template-grid,
body[data-shell="mobile"] .module-grid {
  grid-template-columns: 1fr;
}

body[data-shell="mobile"] .prompt-card,
body[data-shell="mobile"] .result-card,
body[data-shell="mobile"] .asset-card,
body[data-shell="mobile"] .template-card,
body[data-shell="mobile"] .module-card {
  border-radius: 8px;
}

body[data-shell="mobile"] .prompt-card-head,
body[data-shell="mobile"] .asset-picker-toolbar,
body[data-shell="mobile"] .selected-asset {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

body[data-shell="mobile"] textarea {
  min-height: 112px;
  resize: vertical;
}

body[data-shell="mobile"] .sticky-panel {
  position: static;
}

body[data-shell="mobile"] .table-wrap {
  margin-inline: -4px;
  overflow-x: auto;
  border-radius: 8px;
  -webkit-overflow-scrolling: touch;
}

body[data-shell="mobile"] table {
  min-width: 760px;
}

body[data-shell="mobile"][data-page="tasks"] table,
body[data-shell="mobile"][data-page="admin"] table,
body[data-shell="mobile"][data-page="redeem-codes"] table {
  min-width: 920px;
}

body[data-shell="mobile"] th,
body[data-shell="mobile"] td {
  padding: 10px 9px;
  font-size: 12px;
}

body[data-shell="mobile"] .preview-dialog,
body[data-shell="mobile"] .member-edit-dialog {
  width: calc(100vw - 16px);
  max-width: calc(100vw - 16px);
}

body[data-shell="mobile"] .preview-dialog img {
  max-height: 72vh;
}

body[data-shell="mobile"] .member-edit-shell {
  max-height: 88vh;
}

body[data-shell="mobile"] .dialog-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

body[data-shell="mobile"] .auth-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  grid-template-columns: 1fr;
  padding: 18px 12px;
}

body[data-shell="mobile"] .auth-brand {
  min-height: auto;
}

body[data-shell="mobile"] .auth-panel {
  width: 100%;
}

body[data-shell="mobile"] .auth-home-logo {
  max-width: 220px;
}

body[data-shell="mobile"][data-page="login"] .auth-page {
  align-items: start;
  padding: 14px 12px 28px;
}

body[data-shell="mobile"][data-page="login"] .auth-shell {
  width: min(100%, 430px);
  min-height: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body[data-shell="mobile"][data-page="login"] .auth-brand.auth-brand-logo-only {
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  justify-items: center;
  gap: 14px;
  padding: 16px 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(9, 12, 18, 0.74), rgba(9, 12, 18, 0.98)),
    radial-gradient(circle at 28% 20%, rgba(226, 27, 60, 0.2), transparent 30%),
    #0b0f15;
}

body[data-shell="mobile"][data-page="login"] .auth-brand.auth-brand-logo-only .auth-home-logo {
  width: min(100%, 332px);
  max-width: 100%;
  height: auto;
  max-height: 210px;
  object-fit: contain;
  object-position: center;
}

body[data-shell="mobile"][data-page="login"] .auth-brand-copy {
  width: min(100%, 342px);
  align-self: auto;
  gap: 8px;
  padding-top: 12px;
  border-top: 2px solid rgba(226, 27, 60, 0.9);
  color: rgba(255, 255, 255, 0.82);
  text-align: left;
}

body[data-shell="mobile"][data-page="login"] .auth-brand-copy p {
  max-width: none;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.58;
  text-indent: 2em;
}

body[data-shell="mobile"][data-page="login"] .auth-brand-copy p + p {
  color: rgba(255, 255, 255, 0.64);
  font-size: 10px;
  line-height: 1.5;
}

body[data-shell="mobile"][data-page="login"] .auth-panel {
  width: 100%;
  padding: 24px 26px 26px;
  background: #ffffff;
  box-shadow: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  background: var(--canvas);
  color: var(--text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
}

body:not([data-page="login"]):not(.app-ready):not(.fatal-page) {
  overflow: hidden;
}

body:not([data-page="login"]):not(.app-ready):not(.fatal-page) main {
  visibility: hidden;
}

body:not([data-page="login"]):not(.app-ready):not(.fatal-page)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: var(--canvas);
}

body:not([data-page="login"]):not(.app-ready):not(.fatal-page)::after {
  content: "系统加载中";
  position: fixed;
  z-index: 3001;
  top: 50%;
  left: calc(var(--sidebar-width) + (100vw - var(--sidebar-width)) / 2);
  width: 180px;
  height: 42px;
  margin: -21px 0 0 -90px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-card);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 860px) {
  body:not([data-page="login"]):not(.app-ready):not(.fatal-page)::after {
    left: 50%;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

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

.icon-password-toggle {
  width: 44px;
  min-width: 44px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 0;
  line-height: 0;
  color: var(--text-secondary);
  background: transparent;
  border-left: 1px solid var(--border);
}

.icon-password-toggle::before {
  content: "";
  width: 18px;
  height: 18px;
  display: block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z'/%3E%3Ccircle cx='12' cy='12' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z'/%3E%3Ccircle cx='12' cy='12' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.icon-password-toggle[aria-pressed="true"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z'/%3E%3Cpath d='M4 4l16 16'/%3E%3Cpath d='M9.9 9.9A3 3 0 0 0 14.1 14.1'/%3E%3C/g%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z'/%3E%3Cpath d='M4 4l16 16'/%3E%3Cpath d='M9.9 9.9A3 3 0 0 0 14.1 14.1'/%3E%3C/g%3E%3C/svg%3E");
}

.icon-password-toggle:hover {
  color: var(--primary);
  background: var(--surface-soft);
}

.icon-password-toggle svg {
  display: none;
}

.password-toggle.icon-password-toggle::after,
.auth-page .password-toggle.icon-password-toggle::after {
  content: none !important;
  display: none !important;
}

.auth-brand-logo-only {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: clamp(36px, 7vw, 72px);
}

.auth-home-logo {
  display: block;
  width: min(100%, 520px);
  max-height: min(70vh, 420px);
  object-fit: contain;
  object-position: center;
}

.auth-page .auth-brand-logo-only,
.auth-page .auth-hero.auth-brand-logo-only,
.auth-page .auth-showcase.auth-brand-logo-only,
.auth-page .auth-visual.auth-brand-logo-only {
  display: grid;
  grid-template-rows: minmax(0, auto) minmax(0, 1fr);
  align-content: center;
  justify-items: center;
  gap: 26px;
  min-height: 100%;
  padding: clamp(32px, 5.6vw, 62px) clamp(34px, 5.4vw, 58px);
  text-align: center;
}

.auth-page .auth-brand-logo-only .auth-home-logo {
  display: block;
  width: min(92%, 430px);
  max-width: 430px;
  max-height: 260px;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.auth-brand-copy {
  width: min(100%, 478px);
  display: grid;
  align-self: start;
  gap: 10px;
  padding-top: 18px;
  border-top: 2px solid rgba(226, 27, 60, 0.82);
  color: rgba(255, 255, 255, 0.78);
  text-align: left;
}

.auth-brand-copy p {
  margin: 0;
  color: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.62;
  letter-spacing: 0;
  text-indent: 2em;
  overflow-wrap: anywhere;
}

.auth-brand-copy p + p {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  line-height: 1.55;
}

.auth-page .password-toggle.icon-password-toggle {
  width: 44px !important;
  min-width: 44px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  font-size: 0 !important;
  line-height: 0 !important;
  color: var(--text-secondary) !important;
  background: transparent !important;
  border-left: 1px solid var(--border) !important;
}

.auth-page .password-toggle.icon-password-toggle:hover,
.auth-page .password-toggle.icon-password-toggle:focus-visible {
  color: var(--primary) !important;
  background: var(--surface-soft) !important;
}

.password-toggle.icon-password-toggle {
  width: 44px !important;
  min-width: 44px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1001;
  width: var(--sidebar-width);
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--sidebar);
  color: var(--sidebar-text);
  box-shadow: none;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(191, 203, 217, 0.28);
  border-radius: 20px;
}

.brand {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 12px;
  background: #2b2f3a;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
}

.brand-logo {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
}

.brand-logo-full {
  width: 100%;
  max-width: 218px;
  height: 76px;
  object-fit: contain;
  object-position: center;
}

.brand span {
  display: none;
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.1;
  text-overflow: ellipsis;
}

.brand small {
  display: none;
}

nav {
  display: block;
  padding: 8px 0;
  margin: 0;
}

nav a {
  position: relative;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  color: var(--sidebar-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 56px;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}

nav a::before {
  width: 18px;
  min-width: 18px;
  display: inline-flex;
  justify-content: center;
  color: #c0ccda;
  font-size: 16px;
  line-height: 1;
  opacity: 0.94;
}

nav a[data-page-link="workflow"]::before {
  content: "▦";
}

nav a[data-page-link="workflow-canvas"]::before {
  content: "▩";
}

nav a[data-page-link="assets"]::before {
  content: "▣";
}

nav a[data-page-link="results"]::before {
  content: "▤";
}

nav a[data-page-link="templates"]::before {
  content: "▧";
}

nav a[data-page-link="tasks"]::before {
  content: "▥";
}

nav a[data-page-link="video-edit"]::before {
  content: "▻";
}

nav a[data-page-link="account"]::before {
  content: "◉";
}

nav a[data-page-link="help"]::before {
  content: "?";
  font-weight: 700;
}

nav a[data-page-link="admin"]::before {
  content: "▨";
}

nav a[data-page-link="redeem-codes"]::before {
  content: "￥";
  font-weight: 700;
}

nav a:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

nav a.active {
  background: var(--sidebar-nested);
  color: var(--sidebar-active);
  font-weight: 500;
}

nav a.active::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 3px;
  background: var(--sidebar-active);
}

main {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: calc(var(--navbar-height) + var(--tags-height) + var(--content-padding)) var(--content-padding)
    44px;
  background: var(--canvas);
}

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-width);
  z-index: 999;
  height: var(--navbar-height);
  min-height: var(--navbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-nav);
  overflow: hidden;
}

.topbar::before {
  content: "☰";
  width: 54px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 54px;
  color: #5a5e66;
  font-size: 21px;
  transition: background 0.2s ease;
}

.topbar:hover::before {
  background: rgba(0, 0, 0, 0.025);
}

.topbar > div:first-child {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  color: var(--text);
}

.topbar strong {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 50px;
  white-space: pre;
}

.topbar strong::before {
  content: "首页 / ";
  color: var(--text-secondary);
  font-weight: 400;
}

#runtimePill {
  color: var(--success);
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  height: 50px;
  min-width: 0;
}

.status span,
.recharge-link {
  height: 50px;
  min-width: 0;
  max-width: 170px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #5a5e66;
  font-size: 13px;
  line-height: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.status span:hover,
.recharge-link:hover {
  background: rgba(0, 0, 0, 0.025);
}

#tokenPill {
  color: var(--primary);
}

#balancePill {
  color: var(--success);
}

#noticePill {
  color: var(--danger);
}

.recharge-link {
  color: var(--primary);
  font-weight: 500;
}

#userEmailPill::before {
  content: "";
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  margin-right: 8px;
  border-radius: 8px;
  background: var(--primary);
}

.tags-view {
  position: fixed;
  top: var(--navbar-height);
  right: 0;
  left: var(--sidebar-width);
  z-index: 998;
  height: var(--tags-height);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 15px;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--surface);
  border-bottom: 1px solid #d8dce5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 3px rgba(0, 0, 0, 0.04);
}

.tags-view::-webkit-scrollbar {
  height: 4px;
}

.tags-view::-webkit-scrollbar-thumb {
  background: #d8dce5;
  border-radius: 8px;
}

.tags-view a,
.tags-view span {
  height: 26px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 8px;
  border: 1px solid #d8dce5;
  background: #fff;
  color: #495060;
  font-size: 12px;
  line-height: 26px;
  cursor: pointer;
}

.tags-view .active {
  background: var(--tag-active);
  border-color: var(--tag-active);
  color: #fff;
}

.tags-view .active::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-radius: 50%;
  background: #fff;
}

main.workflow-canvas-page {
  height: 100vh;
  min-height: 100vh;
  padding: 16px;
  overflow: hidden;
  background: #eef1f5;
}

.workflow-canvas-host {
  width: 100%;
  height: calc(100vh - 88px);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(2, 3, 5, 0.14);
  border-radius: 8px;
  background: #020305;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.24);
}

.workflow-canvas-host #root {
  width: 100%;
  height: 100%;
}

.comfy-embed-shell {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #101217;
}

.comfy-embed-frame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #101217;
}

.comfy-embed-status {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: #ffffff;
  text-align: center;
  background: #202020;
  pointer-events: none;
}

.comfy-embed-status[hidden] {
  display: none;
}

.comfy-embed-status-logo {
  width: min(282px, 32vw);
  min-width: 188px;
  height: auto;
  display: block;
  object-fit: contain;
}

.comfy-embed-progress {
  width: min(430px, 36vw);
  min-width: 248px;
  height: 12px;
  overflow: hidden;
  padding: 4px;
  border: 3px solid #ff2a45;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 42, 69, 0.08);
}

.comfy-embed-progress span {
  position: relative;
  width: 8%;
  height: 100%;
  display: block;
  overflow: hidden;
  border-radius: 1px;
  background: #ff2a45;
  transition: width 360ms ease;
}

.comfy-embed-progress span::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 46%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.52), transparent);
  transform: translateX(-120%);
  animation: imgx-canvas-loader-sweep 1.05s linear infinite;
}

.comfy-embed-status[data-state="loading"] .comfy-embed-progress span {
  animation: imgx-canvas-loader-pulse 1.25s ease-in-out infinite;
}

.comfy-embed-status-message {
  display: none;
  max-width: min(520px, 72vw);
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.comfy-embed-status[data-state="error"] .comfy-embed-status-message {
  display: block;
}

.comfy-embed-actions {
  display: none;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
  pointer-events: auto;
}

.comfy-embed-status[data-state="error"] .comfy-embed-actions {
  display: inline-flex;
}

.comfy-embed-actions button {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: #ffffff;
  background: #e21b3c;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.comfy-embed-actions button:hover {
  border-color: rgba(255, 255, 255, 0.26);
  background: #c91633;
}

@keyframes imgx-canvas-loader-pulse {
  0% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.72;
  }
}

@keyframes imgx-canvas-loader-sweep {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(240%);
  }
}

.page-head,
.page-metrics,
.workspace-shell,
.asset-layout,
.account-layout,
.admin-layout,
.queue-board,
.support-grid,
.ops-strip,
main > .panel {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 20px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.page-head h1 {
  margin: 3px 0 6px;
  color: var(--text);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
}

.page-head p {
  max-width: 860px;
  margin: 0;
  color: var(--text-regular);
  font-size: 13px;
  line-height: 1.7;
}

.eyebrow {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}

.page-actions,
.button-group,
.actions,
.card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.page-actions {
  justify-content: flex-end;
  flex: 0 0 auto;
}

.page-metrics {
  margin: 0 0 20px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.metric-card,
.panel,
.module-card,
.support-card,
.help-steps article,
.asset-card,
.result-card,
.template-card,
.queue-lane,
.queue-item,
.profile-box,
.security-box {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.metric-card {
  position: relative;
  min-height: 108px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  grid-template-areas:
    "icon label"
    "icon value"
    "icon hint";
  gap: 2px 16px;
  align-items: center;
  padding: 22px 26px;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  grid-area: icon;
  width: 48px;
  height: 48px;
  align-self: center;
  justify-self: center;
  border-radius: 8px;
  background: rgba(64, 158, 255, 0.12);
}

.metric-card::after {
  content: "▦";
  position: absolute;
  left: 39px;
  top: 50%;
  color: var(--primary);
  font-size: 24px;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.metric-card:nth-child(2)::before {
  background: rgba(19, 206, 102, 0.13);
}

.metric-card:nth-child(2)::after {
  content: "✓";
  color: var(--success);
}

.metric-card:nth-child(3)::before {
  background: rgba(255, 73, 73, 0.1);
}

.metric-card:nth-child(3)::after {
  content: "!";
  color: var(--danger);
  font-weight: 700;
}

.metric-card:nth-child(4)::before {
  background: rgba(255, 186, 0, 0.14);
}

.metric-card:nth-child(4)::after {
  content: "￥";
  color: var(--warning);
  font-weight: 700;
}

.metric-card span {
  grid-area: label;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.metric-card strong {
  grid-area: value;
  color: var(--text);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.metric-card small {
  grid-area: hint;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ops-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 20px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.ops-item {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-right: 1px solid var(--border-light);
  background: var(--surface);
}

.ops-item:last-child {
  border-right: 0;
}

.ops-item span,
.ops-item small {
  color: var(--text-secondary);
  font-size: 12px;
}

.ops-item strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.panel {
  min-width: 0;
  padding: 20px;
}

.panel.tight {
  padding: 18px;
}

main > .panel {
  margin-top: 20px;
}

.section-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
}

.section-head span,
.summary-line {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.asset-upload-format-note {
  display: block;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.35;
}

label {
  display: grid;
  gap: 7px;
  color: var(--text-regular);
  font-size: 13px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  outline: 0;
  box-shadow: none;
  transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
}

input::placeholder,
textarea::placeholder {
  color: #c0c4cc;
}

textarea {
  resize: vertical;
  line-height: 1.6;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #c0c4cc;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
}

input[type="checkbox"] {
  width: 14px;
  min-height: 14px;
  accent-color: var(--primary);
}

button,
.ghost-link,
.text-link,
.recharge-link {
  -webkit-tap-highlight-color: transparent;
}

button,
.ghost-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 8px 15px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

button:hover,
.ghost-link:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

button:active,
.ghost-link:active {
  background: var(--primary-active);
  border-color: var(--primary-active);
}

button.secondary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

button.ghost,
.ghost-link {
  background: #fff;
  border-color: var(--border);
  color: var(--text-regular);
}

button.ghost:hover,
.ghost-link:hover {
  background: var(--surface-soft);
  border-color: #c6e2ff;
  color: var(--primary);
}

button.danger {
  background: #fff;
  border-color: #fbc4c4;
  color: var(--danger);
}

button.danger:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

button.mini {
  min-height: 28px;
  padding: 6px 10px;
  font-size: 12px;
}

button.icon,
.icon-button {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.ghost-link {
  text-decoration: none;
}

.text-link {
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.text-link:hover {
  color: #66b1ff;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(24, 144, 255, 0.32);
  outline-offset: 2px;
}

.workspace-shell {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(560px, 1fr);
  align-items: start;
  gap: 20px;
  margin-top: 0;
}

.workspace-left,
.workspace-right {
  min-width: 0;
  display: grid;
  gap: 20px;
}

.sticky-panel {
  position: sticky;
  top: calc(var(--navbar-height) + var(--tags-height) + 20px);
}

.asset-picker-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.asset-picker-toolbar strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.workflow-asset-list {
  display: grid;
  gap: 10px;
  max-height: 390px;
  overflow-y: auto;
  padding-right: 2px;
}

.workflow-asset-option {
  position: relative;
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 58px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.workflow-asset-option:hover,
.workflow-asset-option.is-selected {
  border-color: var(--primary);
  background: #ecf5ff;
}

.workflow-asset-option input {
  margin: 0;
}

.workflow-asset-option img {
  width: 58px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.workflow-asset-option span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.workflow-asset-option strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.workflow-asset-option small {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.workflow-asset-option.is-disabled {
  cursor: not-allowed;
  background: #f8fafc;
  border-color: #e4e7ec;
}

.workflow-asset-option.is-disabled:hover {
  background: #f8fafc;
  border-color: #d8dee8;
}

.workflow-asset-option.is-disabled img {
  opacity: 0.72;
}

.workflow-asset-option.is-disabled small {
  color: #9aa3af;
}

.selected-asset {
  min-height: 108px;
  margin-top: 14px;
  display: grid;
  grid-template-columns: 82px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.selected-asset.is-empty {
  grid-template-columns: 1fr;
  align-content: center;
}

.selected-asset img {
  width: 82px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface);
}

.selected-asset-stack {
  display: grid;
  grid-template-columns: repeat(2, 40px);
  gap: 6px;
}

.selected-asset .selected-asset-stack img {
  width: 40px;
}

.selected-asset strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-weight: 500;
}

.selected-asset span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.prompt-workbench {
  min-width: 0;
}

.has-theme-flow-border {
  position: relative;
  isolation: isolate;
  overflow: visible;
}

.has-theme-flow-line {
  position: relative;
  isolation: isolate;
}

body:not([data-shell="mobile"]) .page-head.has-theme-flow-line {
  overflow: hidden !important;
}

.has-theme-flow-border > :not(.theme-flow-border):not(.theme-flow-line) {
  position: relative;
  z-index: 1;
}

.theme-flow-border {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.theme-flow-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -27px;
  z-index: 4;
  width: 100%;
  height: 52px;
  overflow: visible;
  pointer-events: none;
}

.page-head > .theme-flow-line {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: -27px !important;
  z-index: 4 !important;
  flex: none !important;
  width: 100% !important;
  height: 52px !important;
}

body:not([data-shell="mobile"]) .page-head.has-theme-flow-line::after {
  z-index: 1 !important;
}

.theme-flow-border-base,
.theme-flow-border-segment,
.theme-flow-line-base,
.theme-flow-line-segment,
.theme-flow-line-core {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.theme-flow-border-base,
.theme-flow-line-base {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-flow-border-segment,
.theme-flow-line-segment,
.theme-flow-line-core {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-flow-line-core {
  filter: drop-shadow(0 0 10px var(--theme-flow-border-color, #B80000)) drop-shadow(0 0 20px var(--theme-flow-border-color, #B80000));
}

@media (prefers-reduced-motion: reduce) {
  .theme-flow-border-segment {
    opacity: 0.72;
  }

  .theme-flow-line-segment,
  .theme-flow-line-core {
    opacity: 1;
  }
}

.prompt-list {
  display: grid;
  gap: 12px;
  overflow: visible;
}

.prompt-list.is-storyboard-mode {
  gap: 14px;
}

.custom-storyboard-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.custom-storyboard-head,
.custom-storyboard-shot-head,
.custom-storyboard-foot,
.custom-storyboard-materials-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.custom-storyboard-head span,
.custom-storyboard-materials-title span,
.custom-storyboard-foot span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.custom-storyboard-head > div:first-child {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.custom-storyboard-head strong {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
}

.custom-storyboard-head strong::before {
  content: "";
  width: 4px;
  height: 17px;
  margin-right: 9px;
  background: var(--primary);
}

.custom-storyboard-head p {
  margin: 5px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.custom-storyboard-metrics {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.custom-storyboard-metrics span {
  min-width: 68px;
  display: grid;
  gap: 1px;
  padding: 6px 9px;
  border: 1px solid #e5e9f1;
  border-radius: 7px;
  background: #f8fafc;
  text-align: right;
}

.custom-storyboard-metrics small {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 750;
}

.custom-storyboard-metrics strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
}

.custom-storyboard-warning,
.custom-storyboard-empty {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(222, 153, 0, 0.24);
  border-radius: var(--radius);
  background: #fff9ed;
  color: #8a5a00;
  font-size: 12px;
  line-height: 1.6;
}

.custom-storyboard-materials {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  background: #f8fafc;
}

.custom-storyboard-material-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible;
  padding: 0;
}

.custom-storyboard-shot-materials {
  display: none;
}

.storyboard-material-chip {
  min-width: 124px;
  max-width: 168px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid rgba(226, 27, 60, 0.22);
  border-radius: 7px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.storyboard-material-chip.is-static {
  cursor: default;
}

.storyboard-material-chip.is-selected {
  border-color: rgba(226, 27, 60, 0.68);
  background: #fff4f6;
}

.storyboard-material-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-soft);
}

.storyboard-material-chip span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.storyboard-material-chip strong,
.storyboard-material-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storyboard-material-chip strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.storyboard-material-chip small {
  color: var(--text-secondary);
  font-size: 11px;
}

.custom-storyboard-shot-list {
  display: grid;
  gap: 12px;
}

.custom-storyboard-shot {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #e3e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.custom-storyboard-shot-head > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.custom-storyboard-shot-head > div:first-child span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 26px;
  border-radius: 6px;
  background: #fff1f4;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.custom-storyboard-shot-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.custom-storyboard-shot-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.custom-storyboard-duration {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #68717e;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.custom-storyboard-shot-controls select {
  min-width: 74px;
  height: 34px;
  padding: 4px 28px 4px 10px;
  border-radius: 7px;
  font-weight: 850;
}

.custom-storyboard-shot textarea {
  min-height: 104px;
  padding: 10px 12px;
  border: 1px solid #e0e6ef;
  border-radius: 8px;
  background: #fff;
  resize: vertical;
}

.custom-storyboard-shot textarea:focus {
  border-color: rgba(226, 27, 60, 0.58);
  box-shadow: 0 0 0 3px rgba(226, 27, 60, 0.08);
  outline: 0;
}

button.storyboard-shot-delete {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid #f1c8cf;
  border-radius: 7px;
  background: #fff7f8;
  color: var(--primary);
  box-shadow: none;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

button.storyboard-shot-delete:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

button.storyboard-shot-delete:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

button.storyboard-add-shot {
  min-width: 112px;
  height: 36px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(226, 27, 60, 0.34);
  border-radius: 7px;
  background: #fff7f8;
  color: var(--primary);
  box-shadow: none;
  font-size: 12px;
  font-weight: 900;
}

button.storyboard-add-shot::before {
  content: "+";
  margin-right: 7px;
  font-size: 16px;
  line-height: 1;
}

button.storyboard-add-shot:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.task-detail-storyboard-list {
  display: grid;
  gap: 10px;
}

.task-detail-storyboard-shot {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.task-detail-storyboard-shot div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-detail-storyboard-shot span,
.task-detail-storyboard-shot small {
  color: var(--text-secondary);
  font-size: 12px;
}

.task-detail-storyboard-shot strong {
  color: var(--text);
  font-size: 13px;
}

.task-detail-storyboard-shot p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

body[data-shell="mobile"] .custom-storyboard-panel {
  padding: 12px;
}

body[data-shell="mobile"] .custom-storyboard-head,
body[data-shell="mobile"] .custom-storyboard-shot-head,
body[data-shell="mobile"] .custom-storyboard-foot,
body[data-shell="mobile"] .custom-storyboard-materials-title {
  align-items: flex-start;
  flex-direction: column;
}

body[data-shell="mobile"] .custom-storyboard-metrics {
  width: 100%;
  justify-content: flex-start;
}

body[data-shell="mobile"] .storyboard-material-chip {
  min-width: 126px;
}

body[data-shell="mobile"] .custom-storyboard-shot-controls {
  width: 100%;
  justify-content: space-between;
}

.prompt-group {
  display: grid;
  gap: 8px;
}

.prompt-child-list {
  display: grid;
  gap: 8px;
  margin-left: 20px;
  padding-left: 14px;
  border-left: 2px solid color-mix(in srgb, var(--primary) 28%, var(--border));
}

.prompt-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--surface);
}

.prompt-card-secondary {
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, var(--surface-soft));
}

.prompt-card-secondary .prompt-title span {
  background: #fff;
}

.prompt-card-secondary .prompt-card-head em {
  font-size: 14px;
}

.prompt-card.is-disabled {
  opacity: 0.62;
}

.prompt-card.is-locked {
  border-color: #a0cfff;
  box-shadow: inset 3px 0 0 var(--primary);
}

.prompt-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.prompt-title {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px 9px;
}

.prompt-title span {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid #d9ecff;
  border-radius: 10px;
  background: #ecf5ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
}

.prompt-title strong {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prompt-title small {
  grid-column: 1 / -1;
  color: var(--text-secondary);
  font-size: 12px;
}

.prompt-card-head em {
  min-width: 34px;
  color: #c0c4cc;
  font-style: normal;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-align: left;
}

.prompt-delete-button {
  min-width: 46px;
  min-height: 28px;
  padding-inline: 10px;
  border-color: rgba(226, 27, 60, 0.22);
  color: var(--danger);
  font-size: 12px;
  font-weight: 750;
}

.prompt-delete-button:hover {
  border-color: rgba(226, 27, 60, 0.42);
  background: #fff4f6;
  color: var(--danger);
}

.prompt-card textarea {
  min-height: 96px;
  background: #fff;
}

.icon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompt-card .icon-actions button {
  min-width: 44px;
  min-height: 28px;
}

.prompt-card .icon-actions button.secondary {
  margin-left: auto;
}

.batch-prompt-summary {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.batch-summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.batch-summary-metrics span {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--surface);
}

.batch-summary-metrics small {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
}

.batch-summary-metrics strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.batch-prompt-summary p {
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.generation-command-bar {
  position: relative;
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
}

.generation-command-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.param-pill {
  min-width: 126px;
  min-height: 38px;
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 8px 18px rgba(13, 17, 24, 0.05);
}

.param-pill:hover {
  border-color: #c6e2ff;
  background: #ffffff;
  color: var(--primary);
}

.param-pill span {
  color: var(--text-secondary);
  font-size: 12px;
}

.param-pill strong {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.param-pill .model-param-icon,
.param-pill .workflow-param-icon {
  display: block;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  order: -1;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}

.param-pill .model-param-icon[hidden],
.param-pill .workflow-param-icon[hidden] {
  display: none !important;
}

.param-pill::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 2px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.generation-command-submit {
  display: grid;
  grid-template-columns: minmax(140px, 170px) minmax(240px, 1fr) auto;
  align-items: stretch;
  gap: 10px;
}

.command-cost {
  min-height: 72px;
  padding: 11px 13px;
}

.command-cost strong {
  font-size: 20px;
}

.generation-start-button {
  min-width: 126px;
  min-height: 72px;
  align-self: stretch;
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}

.generation-start-button:hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
}

.workflow-hidden-fields {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  pointer-events: none;
  opacity: 0;
}

.desktop-param-popover {
  position: absolute;
  z-index: 40;
  width: min(520px, calc(100% - 28px));
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 22px 54px rgba(13, 17, 24, 0.18);
}

.desktop-param-popover-head {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
}

.desktop-param-popover-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.desktop-param-popover-head span {
  color: var(--text-secondary);
  font-size: 12px;
}

.desktop-param-options {
  display: grid;
  gap: 7px;
  max-height: 320px;
  overflow-y: auto;
}

.desktop-param-option {
  width: 100%;
  min-height: 46px;
  display: grid;
  gap: 3px;
  justify-items: start;
  padding: 9px 11px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  text-align: left;
  box-shadow: none;
}

.desktop-param-option:hover,
.desktop-param-option.is-selected {
  border-color: #c6e2ff;
  background: #ecf5ff;
  color: var(--text);
}

.desktop-param-option strong {
  font-size: 13px;
  font-weight: 600;
}

.desktop-param-option small {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
}

.form-stack {
  display: grid;
  gap: 13px;
}

.toggle-list {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.toggle-list label,
.inline-check {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-regular);
  font-size: 13px;
  font-weight: 500;
}

.cost-box {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid #d9ecff;
  border-radius: var(--radius);
  background: #ecf5ff;
}

.cost-box span,
.cost-box small {
  color: var(--text-secondary);
  font-size: 12px;
}

.cost-box strong {
  color: var(--primary);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
}

.cost-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding-top: 9px;
  border-top: 1px solid #c6e2ff;
}

.actions.vertical {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.helper-text,
.form-message {
  min-height: 20px;
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.form-message {
  font-weight: 500;
  color: var(--warning);
}

.form-message[data-tone="success"] {
  color: var(--success);
}

.form-message[data-tone="error"] {
  color: var(--danger);
}

.form-message[data-tone="warning"] {
  color: #e6a23c;
}

.asset-layout,
.account-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  margin-top: 0;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
  gap: 20px;
  margin-top: 0;
}

.asset-layout > *,
.account-layout > *,
.admin-layout > *,
.workspace-shell > * {
  min-width: 0;
}

.asset-grid,
.result-grid,
.template-grid,
.module-grid,
.support-grid,
.help-steps {
  display: grid;
  gap: 20px;
}

.asset-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.result-grid {
  --result-card-min: 250px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--result-card-min)), 1fr));
}

.template-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.module-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.asset-card,
.result-card,
.template-card {
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.asset-card:hover,
.result-card:hover,
.template-card:hover,
.module-card:hover {
  border-color: #c6e2ff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.asset-card.selected {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.asset-card[data-media-type="video"] {
  position: relative;
}

.asset-card[data-media-type="video"]::after {
  content: "MP4";
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 4px;
  background: rgba(17, 24, 39, 0.86);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.asset-card img,
.result-card img,
.result-card video {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
  background: var(--surface-soft);
}

.result-card video {
  cursor: pointer;
}

.result-card .result-video-poster {
  background: #0b0f15;
}

body[data-page="results"] .result-card img,
body[data-page="results"] .result-card video,
body[data-page="results"] .result-card .result-video-poster {
  object-fit: contain !important;
  object-position: center center !important;
  background: #f6f7f9 !important;
}

.result-card {
  position: relative;
}

.result-card::before {
  content: attr(data-ratio);
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(48, 65, 86, 0.88);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
}

.result-card.compact img,
.result-card.compact video {
  aspect-ratio: 1;
}

.asset-card-body,
.result-body {
  display: grid;
  gap: 7px;
  padding: 14px;
}

.asset-card-body strong,
.result-body strong,
.template-card strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
}

.asset-card-body small,
.result-body span,
.result-body small,
.result-body p,
.template-card p,
.template-card small {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.result-created-time {
  color: #64748b;
  font-weight: 780;
}

.result-card > .result-created-time {
  display: block;
  margin: -6px 14px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-body span,
.result-body p {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span,
.template-card span {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 2px 8px;
  border: 1px solid #d9ecff;
  border-radius: 10px;
  background: #ecf5ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
}

.card-actions {
  padding: 0 14px 14px;
}

.card-actions button {
  box-shadow: none;
}

body[data-page="results"]:not([data-shell="mobile"]) .result-card .card-actions {
  display: grid;
  grid-template-columns: 45px 45px minmax(62px, 1fr) 45px;
  gap: 6px;
  align-items: center;
}

body[data-page="results"]:not([data-shell="mobile"]) .result-card .card-actions button {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 0 4px;
  white-space: nowrap;
}

.result-grid.list-mode {
  grid-template-columns: 1fr;
}

.result-grid.list-mode .result-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: start;
}

.result-grid.list-mode .result-card > .result-created-time {
  grid-column: 2;
}

.result-grid.list-mode .result-card img,
.result-grid.list-mode .result-card video {
  height: 100%;
}

.template-card,
.module-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  color: var(--text);
  text-decoration: none;
}

.module-card {
  min-height: 112px;
}

button.module-card {
  width: 100%;
  min-height: 112px;
  border: 1px solid var(--border);
  text-align: left;
  cursor: pointer;
}

.admin-module-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.admin-module-detail {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.admin-module-panel {
  display: none;
}

.admin-module-panel.is-active {
  display: block;
}

.admin-empty-state {
  display: grid;
  gap: 8px;
  min-height: 132px;
  align-content: center;
  border-style: dashed;
  color: var(--text-secondary);
}

.admin-empty-state strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}

.admin-empty-state.is-hidden {
  display: none;
}

.admin-back {
  white-space: nowrap;
}

.module-card.is-active {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 4px 0 0 var(--primary);
}

.module-card strong,
.support-card h2 {
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
}

.module-card span,
.module-card small,
.support-card p,
.support-card li,
.help-steps span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.module-card small {
  align-self: end;
  color: var(--primary);
  font-weight: 500;
}

.toolbar-input {
  width: min(320px, 36vw);
}

body[data-page="results"] .result-toolbar {
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 10px;
}

.result-size-control {
  position: relative;
  flex: 0 0 auto;
}

.toolbar-size-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
  box-shadow: none;
}

body[data-page="results"] .result-toolbar .toolbar-size-button {
  width: auto !important;
  min-width: 132px !important;
  height: 40px !important;
  min-height: 40px !important;
  justify-content: space-between !important;
  padding: 0 12px !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  color: var(--text-secondary) !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

body[data-page="results"] .result-toolbar .toolbar-size-button:hover,
body[data-page="results"] .result-toolbar .toolbar-size-button[aria-expanded="true"] {
  border-color: rgba(226, 27, 60, 0.38) !important;
  background: #fff7f8 !important;
  color: var(--text) !important;
}

body[data-page="results"] .result-toolbar .toolbar-size-button:focus-visible {
  outline: 2px solid rgba(226, 27, 60, 0.28);
  outline-offset: 2px;
}

.toolbar-size-button strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

body[data-page="results"] .result-toolbar .toolbar-size-button strong {
  color: var(--text) !important;
  font-weight: 900;
}

.result-size-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: 330px;
  padding: 13px 12px 12px;
  border: 1px solid #dfe5ee;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
}

.result-size-slider-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
}

.size-step-button {
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 20px;
  font-weight: 850;
  line-height: 1;
  box-shadow: none;
}

.result-size-slider {
  width: 100%;
  accent-color: var(--primary);
}

.result-size-marks {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin: 6px 28px 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 760;
  text-align: center;
}

.toolbar-select {
  width: auto;
  min-width: 150px;
}

.toolbar-refresh {
  min-width: 78px;
}

.toolbar-refresh.is-loading,
button.is-loading {
  cursor: progress;
  opacity: 0.72;
}

.empty-state {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-secondary);
}

.empty-state.compact {
  padding: 16px;
}

.empty-state strong {
  color: var(--text);
  font-weight: 500;
}

.fatal-page {
  display: grid;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(11, 15, 21, 0.96), rgba(23, 30, 40, 0.92)),
    var(--canvas);
}

.fatal-page .fatal-screen {
  display: grid;
  min-height: 100vh;
  margin: 0;
  padding: 32px;
  place-items: center;
}

.fatal-card {
  width: min(560px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.32);
}

.fatal-card h1 {
  margin: 12px 0 12px;
  color: #111827;
  font-size: 32px;
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: 0;
}

.fatal-card p {
  margin: 0;
  color: var(--text-regular);
  font-size: 14px;
  line-height: 1.7;
}

.fatal-card small {
  display: block;
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 12px;
}

.fatal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.queue-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0 0 20px;
}

.queue-lane {
  min-height: 230px;
  padding: 16px;
  background: var(--surface);
}

.queue-lane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.queue-lane-head strong {
  color: var(--text);
  font-weight: 500;
}

.queue-lane-head span {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.queue-items {
  display: grid;
  gap: 10px;
}

.queue-item {
  display: grid;
  gap: 9px;
  padding: 12px;
}

.queue-item strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.queue-item div:first-child {
  display: grid;
  gap: 4px;
}

.queue-item span {
  color: var(--text-secondary);
  font-size: 12px;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 20px;
  background: #ebeef5;
}

.progress span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--primary);
  transition: width 0.35s ease;
}

.progress.in-table {
  min-width: 110px;
}

.progress.is-live span {
  background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 76%, #ffffff 24%), var(--primary));
  background-size: 180% 100%;
  animation: progress-live 1.2s linear infinite;
}

@keyframes progress-live {
  from {
    background-position: 0% 0;
  }
  to {
    background-position: 180% 0;
  }
}

.redeem-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 130px;
  gap: 10px;
}

.redeem-admin-form {
  display: grid;
  grid-template-columns: 170px 130px 110px 155px minmax(220px, 1fr) 130px;
  align-items: end;
  gap: 12px;
}

.profile-box,
.security-box {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.security-box {
  margin-top: 12px;
  background: var(--surface-soft);
}

.security-box span {
  color: var(--text-secondary);
  line-height: 1.6;
}

.profile-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border-light);
}

.profile-line:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.profile-line span {
  color: var(--text-secondary);
}

.profile-avatar-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--border);
}

.profile-avatar-row img,
#profileAvatarPreview {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #eef1f5;
  border: 1px solid #d9dde5;
  color: transparent;
  display: block;
  flex: 0 0 auto;
  overflow: hidden;
}

.profile-avatar-row img.is-avatar-fallback,
#profileAvatarPreview.is-avatar-fallback,
.account-shortcut img.is-avatar-fallback {
  object-fit: cover;
  background: #eef1f5;
  border-color: #d9dde5;
}

.profile-avatar-row img.is-default-avatar,
#profileAvatarPreview.is-default-avatar,
.account-shortcut img.is-default-avatar,
.account-dropdown-head img.is-default-avatar,
.mobile-user img.is-default-avatar {
  object-fit: cover;
  object-position: center center;
  image-rendering: auto;
}

.profile-avatar-row img.is-default-avatar[data-avatar-gender="female"],
#profileAvatarPreview.is-default-avatar[data-avatar-gender="female"],
.account-shortcut img.is-default-avatar[data-avatar-gender="female"],
.account-dropdown-head img.is-default-avatar[data-avatar-gender="female"],
.mobile-user img.is-default-avatar[data-avatar-gender="female"] {
  object-position: center 42%;
}

.profile-avatar-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.profile-avatar-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 15px;
}

.profile-avatar-row div span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.profile-edit-form,
.profile-password-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.profile-avatar-editor {
  display: grid;
  grid-template-columns: 64px minmax(108px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.avatar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

#profileAvatarPreview {
  width: 64px;
  height: 64px;
}

.avatar-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.avatar-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 640px) {
  .profile-avatar-editor {
    grid-template-columns: 64px 1fr;
  }

  .profile-avatar-editor #resetDefaultAvatar {
    grid-column: auto;
  }
}

.table-wrap {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--surface);
}

.table-wrap::-webkit-scrollbar {
  height: 10px;
}

.table-wrap::-webkit-scrollbar-track-piece {
  background: #f5f7fa;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: #c0c4cc;
  border-radius: 20px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: var(--surface);
}

.admin-layout table,
.account-layout table {
  min-width: 640px;
}

#modelRows,
#adminTaskRows,
#operationLogRows,
#taskRows,
#redeemCodeRows,
#redeemRecordRows,
#tokenTransactionRows {
  min-width: inherit;
}

.task-table-identity {
  display: inline-grid;
  grid-template-columns: 36px minmax(0, max-content);
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.task-table-thumb {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: #f6f7f9;
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
}

.task-table-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center center;
  background: #f6f7f9;
}

.task-table-thumb.is-processing {
  border-color: rgba(226, 27, 60, 0.26);
  background: #fff7f8;
  color: var(--primary);
}

.task-table-id-text {
  min-width: 0;
  color: var(--text);
  font-weight: 850;
  white-space: nowrap;
}

#taskRows td {
  height: 44px;
  padding-top: 4px;
  padding-bottom: 4px;
}

th,
td {
  height: 44px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-regular);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  font-size: 13px;
}

th {
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

tbody tr {
  transition: background-color 0.2s ease;
}

tbody tr:hover {
  background: var(--surface-soft);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.badge {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.status-succeeded,
.status-used,
.status-enabled {
  border-color: #e1f3d8;
  background: var(--success-soft);
  color: #67c23a;
}

.status-failed,
.status-invalid,
.status-deleted,
.status-expired,
.status-disabled,
.status-cancelled {
  border-color: #fde2e2;
  background: var(--danger-soft);
  color: #f56c6c;
}

.status-unused,
.status-waiting,
.status-processing,
.status-locked {
  border-color: #faecd8;
  background: var(--warning-soft);
  color: #e6a23c;
}

.support-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.support-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.support-card > span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.support-card h2,
.support-card p,
.support-card ul {
  margin: 0;
}

.support-card ul {
  padding-left: 18px;
}

.help-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.help-steps article {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 16px;
  background: var(--surface);
}

.help-steps strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.preview-dialog {
  width: min(860px, 92vw);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.preview-dialog:focus {
  outline: none;
}

.preview-dialog::backdrop {
  background: rgba(48, 65, 86, 0.58);
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
}

.preview-title-editor {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-title-input {
  min-width: 0;
  width: min(360px, 100%);
  height: 32px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  outline: none;
}

.preview-title-input.is-editable {
  background: #ffffff;
  cursor: text;
}

.preview-title-input.is-editable:hover,
.preview-title-input.is-editable:focus {
  border-color: color-mix(in srgb, var(--primary) 50%, var(--border));
  box-shadow: 0 0 0 3px rgba(226, 27, 60, 0.08);
}

.preview-title-save[hidden] {
  display: none !important;
}

.preview-title-save:disabled {
  opacity: 0.48;
  cursor: default;
}

.dialog-head button.ghost,
.preview-dialog .dialog-head button.ghost {
  flex: 0 0 auto;
  min-width: 64px;
  border-color: #cfd5df;
  background: #ffffff;
  color: var(--text);
  box-shadow: none;
}

.dialog-head button.ghost:hover,
.preview-dialog .dialog-head button.ghost:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, #cfd5df);
  background: #fff7f8;
  color: var(--primary);
}

.dialog-head button.ghost::after,
.preview-dialog .dialog-head button.ghost::after {
  display: none;
}

.preview-dialog img {
  width: 100%;
  max-height: 72vh;
  display: block;
  object-fit: contain;
  background: var(--surface-soft);
}

.preview-dialog.has-prompt img {
  max-height: 60vh;
}

.preview-prompt-panel {
  display: grid;
  gap: 8px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--border-light);
  background: #ffffff;
}

.preview-prompt-panel[hidden] {
  display: none !important;
}

.preview-prompt-panel strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.preview-prompt-panel p {
  max-height: 116px;
  margin: 0;
  overflow: auto;
  color: var(--text);
  font-size: 13px;
  line-height: 1.58;
  white-space: pre-wrap;
}

.result-preview-dialog {
  width: min(1080px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border-color: #d7dce5;
  border-top: 0;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 34px 86px rgba(11, 15, 21, 0.32);
}

.result-preview-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.result-preview-dialog::backdrop {
  background: rgba(11, 15, 21, 0.68);
  backdrop-filter: blur(2px);
}

.result-preview-dialog .dialog-head {
  position: relative;
  min-height: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 10px 14px 10px 18px;
  border-bottom: 1px solid #e4e7ec;
  background: #ffffff;
}

.result-preview-dialog .dialog-head::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  width: 46px;
  height: 2px;
  background: var(--primary);
}

.result-preview-dialog .preview-title-editor {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(180px, 420px) auto;
  justify-content: start;
  align-items: center;
  gap: 10px;
}

.result-preview-dialog .preview-title-input {
  width: min(420px, 100%);
  height: 34px;
  padding: 4px 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #12151b;
  font-size: 16px;
  font-weight: 900;
  box-shadow: none;
}

.result-preview-dialog .preview-title-input.is-editable {
  background: transparent;
  cursor: text;
}

.result-preview-dialog .preview-title-input.is-editable:hover {
  border-color: transparent;
  background: transparent;
  box-shadow: inset 0 -1px 0 #dfe4eb;
}

.result-preview-dialog .preview-title-input.is-editable:focus {
  border-color: transparent;
  background: transparent;
  box-shadow: inset 0 -2px 0 rgba(226, 27, 60, 0.45);
}

.preview-dialog-actions {
  min-width: 0;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 14px;
  border-left: 1px solid #edf0f4;
}

.result-preview-dialog .dialog-head button.ghost {
  min-width: 58px;
  height: 32px;
  padding: 0 11px;
  border-color: #d9dee7;
  border-radius: 4px;
  background: #ffffff;
  color: #12151b;
  font-weight: 850;
}

.result-preview-dialog .dialog-head button.ghost:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, #d9dee7);
  background: #fff7f8;
  color: var(--primary);
}

.result-preview-dialog .preview-title-save:disabled {
  display: none;
  border-color: #e1e5ec;
  background: #f8fafc;
  color: #9aa3af;
  opacity: 1;
}

.result-preview-dialog .preview-favorite {
  border-color: color-mix(in srgb, var(--primary) 46%, #d9dee7) !important;
  background: #fff7f8 !important;
  color: var(--primary) !important;
}

.result-preview-dialog .preview-favorite:hover {
  border-color: var(--primary) !important;
  background: var(--primary) !important;
  color: #ffffff !important;
}

.result-preview-dialog .preview-download {
  border-color: #cfd5df !important;
  background: #ffffff !important;
  color: #12151b !important;
}

.result-preview-dialog .preview-download:hover {
  border-color: var(--primary) !important;
  background: #fff7f8 !important;
  color: var(--primary) !important;
}

.preview-media-stage {
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 18px;
  background: #121821;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.result-preview-dialog .preview-media-stage img,
.result-preview-dialog .preview-media-stage video {
  width: auto;
  max-width: 100%;
  max-height: min(68vh, 720px);
  display: block;
  object-fit: contain;
  border-radius: 6px;
  background: #0b0f15;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.result-preview-dialog .preview-media-stage img {
  cursor: zoom-in;
}

.result-preview-dialog .preview-media-stage video {
  width: min(100%, 920px);
}

.result-preview-dialog.has-prompt .preview-media-stage img,
.result-preview-dialog.has-prompt .preview-media-stage video {
  max-height: min(58vh, calc(100vh - 270px));
}

.result-preview-dialog.has-assets .preview-media-stage img,
.result-preview-dialog.has-assets .preview-media-stage video {
  max-height: min(56vh, calc(100vh - 320px));
}

.result-preview-dialog.has-assets.has-prompt .preview-media-stage img,
.result-preview-dialog.has-assets.has-prompt .preview-media-stage video {
  max-height: min(46vh, calc(100vh - 410px));
}

.preview-asset-panel[hidden] {
  display: none !important;
}

.result-preview-dialog .preview-asset-panel {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 13px 18px 14px;
  border-top: 1px solid #dfe4eb;
  background: #ffffff;
}

.result-preview-dialog .preview-asset-panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 18px;
  width: 46px;
  height: 2px;
  background: var(--primary);
}

.preview-asset-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preview-asset-head strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
}

.preview-asset-head span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.preview-asset-list {
  min-width: 0;
  max-height: 116px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(146px, 1fr));
  gap: 8px;
  overflow: auto;
  scrollbar-color: #aeb7c4 transparent;
}

.preview-asset-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid #e1e5ec;
  border-radius: 6px;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.preview-asset-item:hover,
.preview-asset-item:focus-visible {
  border-color: rgba(226, 27, 60, 0.42);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.10);
  outline: none;
  transform: translateY(-1px);
}

.preview-asset-thumb {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #121821;
  color: #ffffff;
  object-fit: cover;
  font-size: 11px;
  font-weight: 900;
}

.preview-asset-text {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.preview-asset-text strong,
.preview-asset-text span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-asset-text strong {
  color: #12151b;
  font-size: 12px;
  font-weight: 900;
}

.preview-asset-text span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.result-preview-dialog .preview-prompt-panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  gap: 10px;
  padding: 15px 18px 17px;
  border-top: 1px solid #dfe4eb;
  background: #f7f8fa;
}

.result-preview-dialog .preview-prompt-panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 18px;
  width: 46px;
  height: 2px;
  background: var(--primary);
}

.preview-prompt-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.preview-prompt-title-actions {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.result-preview-dialog .preview-prompt-panel strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
}

.preview-prompt-head span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.result-preview-dialog .preview-prompt-panel p {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  max-height: 138px;
  padding: 10px 12px;
  border: 1px solid #e1e5ec;
  border-radius: 6px;
  background: #ffffff;
  color: #1b2028;
  font-size: 13px;
  line-height: 1.62;
  overflow-x: hidden;
  overflow-y: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
  scrollbar-color: #aeb7c4 transparent;
}

.image-zoom-dialog {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  padding: 56px 24px 24px;
  border: 0;
  background: rgba(11, 15, 21, 0.94);
  overflow: hidden;
}

.image-zoom-dialog[open] {
  display: grid;
  place-items: center;
}

.image-zoom-dialog::backdrop {
  background: rgba(11, 15, 21, 0.72);
}

.image-zoom-dialog img {
  max-width: 100%;
  max-height: calc(100vh - 86px);
  display: block;
  object-fit: contain;
  border-radius: 8px;
  background: #0b0f15;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.46);
  cursor: zoom-out;
}

.image-zoom-close {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 1;
  min-width: 62px;
  height: 34px;
  border-color: rgba(255, 255, 255, 0.24) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.image-zoom-close:hover {
  border-color: rgba(255, 255, 255, 0.42) !important;
  background: rgba(255, 255, 255, 0.16) !important;
}

.app-confirm-dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border));
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 30px 72px rgba(11, 15, 21, 0.26);
}

.app-confirm-dialog::backdrop {
  background: rgba(11, 15, 21, 0.5);
}

.payment-dialog {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 30px 72px rgba(11, 15, 21, 0.24);
}

.payment-dialog::backdrop {
  background: rgba(11, 15, 21, 0.5);
}

.payment-dialog-shell {
  display: grid;
  gap: 5px;
  padding: 18px;
}

.payment-dialog .dialog-actions {
  width: fit-content;
  min-width: 0;
  height: fit-content;
  min-height: 0;
  margin-left: auto;
  gap: 8px;
  flex-wrap: nowrap;
  padding: 8px;
  border-top: 0;
}

.payment-dialog .dialog-actions button {
  width: auto;
  min-width: 0;
  max-width: none;
  min-height: 0;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.payment-dialog-body {
  display: grid;
  gap: 5px;
}

.payment-order-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 10px;
}

.payment-order-summary span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.payment-order-summary span:last-child {
  width: max-content;
  min-width: 116px;
}

.payment-order-summary strong {
  flex: 0 0 auto;
  color: var(--text-secondary);
  font-size: 12px;
}

.payment-order-summary small {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 13px;
}

.payment-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.payment-qr-panel {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 5px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: #fff;
}

.payment-qr-box {
  display: grid;
  place-items: center;
  width: 168px;
  aspect-ratio: 1;
  padding: 5px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: #fff;
}

.payment-qr-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.payment-success-state {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: pre;
  font-size: 13px;
  line-height: 1.4;
}

.payment-success-state strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.payment-qr-box span {
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
}

.payment-qr-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.payment-qr-copy strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 15px;
}

.payment-qr-pay-logo {
  display: block;
  width: auto;
  height: 30px;
  object-fit: contain;
  flex: 0 0 auto;
}

.payment-qr-copy span {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.payment-link-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: var(--radius);
  text-decoration: none;
}

.payment-safe-text {
  display: block;
  max-height: 120px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: #f8fafc;
  color: var(--text-regular);
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .payment-qr-panel {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .payment-qr-box {
    width: min(210px, 78vw);
  }
}

.app-confirm-shell {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 18px;
}

.app-confirm-shell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  width: 38px;
  height: 3px;
  background: var(--primary);
}

.app-confirm-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  align-self: start;
  border: 1px solid color-mix(in srgb, var(--primary) 36%, var(--border));
  border-radius: 6px;
  background: #fff7f8;
}

.app-confirm-mark::before {
  content: "!";
  color: var(--primary);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.app-confirm-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding-right: 2px;
}

.app-confirm-title {
  color: #05070a;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
}

.app-confirm-message {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.app-confirm-detail {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.app-confirm-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.app-confirm-actions button {
  min-width: 76px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 850;
}

.app-confirm-actions .app-confirm-cancel {
  border-color: var(--border);
  background: #ffffff;
  color: var(--text);
  box-shadow: none;
}

.app-confirm-actions .app-confirm-cancel:hover {
  border-color: color-mix(in srgb, var(--primary) 36%, var(--border));
  background: #fff7f8;
  color: var(--primary);
}

.app-confirm-actions .app-confirm-submit {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(226, 27, 60, 0.22);
}

.app-confirm-actions .app-confirm-submit:hover {
  border-color: var(--primary-active);
  background: var(--primary-active);
  color: #ffffff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1280px) {
  .workspace-shell {
    grid-template-columns: minmax(250px, 300px) minmax(420px, 1fr);
  }

  .generation-command-submit {
    grid-template-columns: minmax(130px, 160px) minmax(220px, 1fr);
  }

  .generation-start-button {
    grid-column: 1 / -1;
    min-height: 48px;
  }

  .workspace-right {
    grid-column: 1 / -1;
  }

  .sticky-panel {
    position: static;
  }

  .workspace-right .panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 16px;
  }

  .workspace-right .panel .section-head,
  .workspace-right .panel .form-stack,
  .workspace-right .panel .toggle-list {
    grid-column: 1;
  }

  .workspace-right .panel .cost-box,
  .workspace-right .panel .actions,
  .workspace-right .panel .helper-text,
  .workspace-right .panel .form-message {
    grid-column: 2;
  }

  .support-grid,
  .help-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .asset-layout,
  .account-layout,
  .admin-layout,
  .queue-board,
  .ops-strip,
  .workspace-shell {
    grid-template-columns: 1fr;
  }

  .generation-command-submit {
    grid-template-columns: minmax(0, 1fr);
  }

  .ops-item {
    border-right: 0;
    border-bottom: 1px solid var(--border-light);
  }

  .ops-item:last-child {
    border-bottom: 0;
  }

  .redeem-admin-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    gap: 8px;
  }

  .status span,
  .recharge-link {
    max-width: 120px;
    padding: 0 7px;
    font-size: 12px;
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar-width: 0px;
  }

  .sidebar {
    position: static;
    top: 0;
    z-index: 1002;
    width: 100%;
    height: auto;
    max-height: none;
    display: block;
    overflow: visible;
  }

  .brand {
    min-height: 72px;
    justify-content: center;
  }

  .brand-logo-full {
    max-width: 190px;
    height: 64px;
  }

  nav {
    display: flex;
    gap: 0;
    padding: 0;
    overflow-x: auto;
    background: var(--sidebar);
  }

  nav a {
    min-height: 42px;
    flex: 0 0 auto;
    padding: 0 14px;
    line-height: 42px;
  }

  nav a::before,
  nav a.active::after {
    display: none;
  }

  main {
    margin-left: 0;
    padding-top: var(--content-padding);
  }

  .topbar,
  .tags-view {
    position: static;
    inset: auto;
    width: 100%;
  }

  .topbar {
    margin-bottom: 0;
  }

  .tags-view {
    margin-bottom: var(--content-padding);
  }

  .workspace-right .panel,
  .redeem-form,
  .redeem-admin-form {
    grid-template-columns: 1fr;
  }

  .workspace-right .panel .section-head,
  .workspace-right .panel .form-stack,
  .workspace-right .panel .toggle-list,
  .workspace-right .panel .cost-box,
  .workspace-right .panel .actions,
  .workspace-right .panel .helper-text,
  .workspace-right .panel .form-message {
    grid-column: auto;
  }

  .toolbar-input,
  .toolbar-select {
    width: 100%;
  }

  .button-group {
    width: 100%;
  }
}

@media (max-width: 640px) {
  :root {
    --content-padding: 14px;
  }

  main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar {
    height: auto;
    min-height: 50px;
    align-items: flex-start;
    flex-direction: column;
    padding: 0;
    overflow: visible;
  }

  .topbar::before {
    position: absolute;
    top: 0;
    left: 0;
  }

  .topbar > div:first-child {
    width: 100%;
    min-height: 50px;
    padding-left: 54px;
    padding-right: 12px;
  }

  .status {
    width: 100%;
    height: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--border-light);
  }

  .status span,
  .status a {
    max-width: 100%;
    height: 34px;
    line-height: 34px;
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
  }

  #userEmailPill,
  .recharge-link {
    grid-column: 1 / -1;
  }

  main {
    padding-top: 14px;
  }

  .page-head,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .page-head {
    gap: 14px;
    padding: 16px;
  }

  .page-head h1 {
    font-size: 22px;
  }

  .page-actions,
  .button-group {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-actions > *,
  .button-group > * {
    width: 100%;
    min-width: 0;
  }

  .prompt-card .icon-actions button.secondary {
    margin-left: 0;
  }

  .result-grid.list-mode .result-card {
    grid-template-columns: 1fr;
  }

  .asset-card img,
  .result-card img {
    aspect-ratio: 4 / 3;
  }

  .support-grid,
  .help-steps {
    grid-template-columns: 1fr;
  }
}

/* Graphite CRM Command Center skin */
:root {
  --canvas: #f6f5f0;
  --surface: #ffffff;
  --surface-soft: #ebe9e2;
  --surface-quiet: #f1efe8;
  --sidebar: #0d0e10;
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --sidebar-nested: rgba(255, 255, 255, 0.1);
  --sidebar-nested-hover: rgba(255, 255, 255, 0.13);
  --sidebar-text: rgba(255, 255, 255, 0.68);
  --sidebar-active: #ffffff;
  --text: #171717;
  --text-regular: #34342f;
  --text-secondary: #6b6b62;
  --border: #d9d6cc;
  --border-light: #d9d6cc;
  --primary: #111827;
  --primary-hover: #1f2937;
  --primary-active: #030712;
  --primary-soft: #eceff3;
  --accent: #2563eb;
  --accent-soft: #eaf1ff;
  --success: #15803d;
  --success-soft: #eef8f1;
  --warning: #b7791f;
  --warning-soft: #fbf5e9;
  --danger: #c2412d;
  --danger-soft: #fbefed;
  --info: #6b6b62;
  --tag-active: #111827;
  --sidebar-width: 268px;
  --navbar-height: 74px;
  --tags-height: 0px;
  --content-padding: 30px;
  --radius: 8px;
  --shadow-nav: none;
  --shadow-card: 0 18px 36px rgba(20, 20, 20, 0.06);
}

html,
body {
  background: var(--canvas);
  color: var(--text);
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 16px;
  background: linear-gradient(180deg, #0d0e10, #181a1d);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: #f7efe7;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.brand {
  min-height: 170px;
  justify-content: flex-start;
  padding: 2px 0 12px;
  background: transparent;
}

.brand-logo {
  border-radius: 0;
}

.brand-logo-full {
  width: 236px;
  max-width: 236px;
  height: 132px;
  object-fit: contain;
  object-position: center;
}

nav {
  display: grid;
  gap: 4px;
  padding: 0;
}

nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  height: 40px;
  gap: 10px;
  padding: 0 10px;
  border-radius: 7px;
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 610;
  line-height: 40px;
  transition: background-color 0.16s ease, color 0.16s ease;
}

nav a::before {
  display: none;
  content: none;
}

nav a svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.54);
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color 0.16s ease;
}

nav a span,
nav a {
  min-width: 0;
}

nav a:hover,
nav a.active {
  background: var(--sidebar-nested);
  color: #ffffff;
}

nav a:hover svg,
nav a.active svg {
  color: #ffffff;
}

nav a.active {
  box-shadow: inset 3px 0 0 #ffffff;
  font-weight: 700;
}

nav a.active::after {
  display: none;
}

.sidebar-panel {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.panel-kicker {
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.health-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
}

.health-row strong {
  color: #ffffff;
}

.meter {
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.58));
}

main {
  margin-left: var(--sidebar-width);
  padding: 26px 30px 34px;
  background: var(--canvas);
}

.topbar {
  position: static;
  height: auto;
  min-height: 40px;
  margin: 0 0 20px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.topbar::before {
  display: none;
}

.topbar > div:first-child {
  display: grid;
  gap: 4px;
  align-items: start;
  margin-right: 0;
}

.topbar strong {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  text-transform: uppercase;
}

.topbar strong::before {
  content: "WORKSPACE / ";
  color: var(--text-secondary);
  font-weight: 750;
}

#runtimePill {
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
  white-space: pre;
}

.status {
  height: auto;
  gap: 10px;
}

.status span,
.recharge-link {
  height: 40px;
  max-width: 180px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  line-height: 40px;
}

.status span:hover,
.recharge-link:hover {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
  color: var(--text);
}

#tokenPill,
#balancePill,
#noticePill,
.recharge-link {
  color: var(--accent);
}

#balancePill {
  color: var(--success);
}

#noticePill {
  color: var(--danger);
}

#userEmailPill::before {
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border-radius: 7px;
  background: var(--primary);
}

#userEmailPill {
  max-width: 240px;
  justify-content: flex-start;
}

.tags-view {
  display: none;
}

.page-head,
.page-metrics,
.workspace-shell,
.asset-layout,
.account-layout,
.admin-layout,
.queue-board,
.support-grid,
.ops-strip,
main > .panel {
  max-width: none;
}

.page-head {
  align-items: flex-start;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.page-head h1 {
  margin: 4px 0 0;
  color: #000000;
  font-size: 28px;
  font-weight: 750;
  line-height: 1.14;
}

.page-head p {
  max-width: 900px;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.eyebrow {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.page-actions {
  gap: 10px;
  padding-top: 0;
}

.page-actions > :first-child {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.18);
}

.page-actions > :first-child:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
}

.page-metrics {
  margin: 0 0 16px;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

body[data-page="workflow"] .metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats.metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats .metric-card {
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(74px, auto) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  padding: 12px 18px;
}

body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats .metric-card span,
body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats .metric-card strong,
body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats .metric-card small {
  margin: 0;
}

body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats .metric-card strong {
  min-width: 34px;
  font-size: 27px;
}

body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats .metric-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#adminKpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric-card,
.panel,
.module-card,
.support-card,
.help-steps article,
.asset-card,
.result-card,
.template-card,
.queue-lane,
.queue-item,
.profile-box,
.security-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.metric-card {
  min-height: 110px;
  display: block;
  padding: 14px;
}

.metric-card::before,
.metric-card::after {
  display: none;
}

.metric-card span {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 750;
}

.metric-card strong {
  display: block;
  margin-top: 12px;
  color: #000000;
  font-size: 28px;
  font-weight: 760;
  line-height: 1;
}

.metric-card small {
  display: inline-flex;
  margin-top: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
}

.metric-card:nth-child(2) small,
.metric-card:nth-child(4) small {
  color: var(--success);
}

.metric-card:nth-child(3) small {
  color: var(--warning);
}

.ops-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.ops-item {
  padding: 14px 16px;
  border-right: 1px solid var(--border);
  background: transparent;
}

.panel {
  padding: 16px;
}

.panel.tight {
  padding: 16px;
}

main > .panel {
  margin-top: 16px;
}

.section-head {
  min-height: 34px;
  align-items: center;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  color: #000000;
  font-size: 14px;
  font-weight: 770;
}

.section-head span,
.summary-line {
  color: var(--text-secondary);
  font-size: 12px;
}

label {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 740;
}

input,
select,
textarea {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 86%, var(--canvas));
  color: var(--text);
  font-size: 13px;
}

input::placeholder,
textarea::placeholder {
  color: #908f86;
}

input:hover,
select:hover,
textarea:hover {
  border-color: color-mix(in srgb, var(--primary) 26%, var(--border));
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

input[type="checkbox"] {
  accent-color: var(--primary);
}

button,
.ghost-link {
  min-height: 40px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary);
  color: #ffffff;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 730;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.18);
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

button:hover,
.ghost-link:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

button.secondary {
  background: var(--primary);
  border-color: var(--primary);
}

button.ghost,
.ghost-link {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-secondary);
  box-shadow: none;
}

button.ghost:hover,
.ghost-link:hover {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--primary) 32%, var(--border));
  color: var(--text);
}

button.danger {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--danger) 36%, var(--border));
  color: var(--danger);
  box-shadow: none;
}

button.danger:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
}

button:disabled,
button[aria-disabled="true"] {
  box-shadow: none;
  cursor: not-allowed;
}

.is-demo,
tbody tr.is-demo,
.asset-card.is-demo,
.result-card.is-demo,
.queue-item.is-demo,
.workflow-asset-option.is-demo {
  position: relative;
  border-color: color-mix(in srgb, var(--border) 72%, #9ca3af);
  background: color-mix(in srgb, var(--surface) 58%, #e5e7eb);
  box-shadow: none;
  filter: grayscale(1);
}

.is-demo:hover,
tbody tr.is-demo:hover,
.asset-card.is-demo:hover,
.result-card.is-demo:hover,
.queue-item.is-demo:hover {
  border-color: color-mix(in srgb, var(--border) 72%, #9ca3af);
  background: color-mix(in srgb, var(--surface) 54%, #e5e7eb);
  box-shadow: none;
}

.is-demo img {
  opacity: 0.46;
}

.is-demo strong,
.is-demo small,
.is-demo span,
.is-demo p,
tbody tr.is-demo td {
  color: #7c818a;
}

.demo-badge,
.badge.demo-badge {
  width: fit-content;
  border-color: #c9ccd1;
  background: #eef0f2;
  color: #666b73;
}

button.demo-action,
button.demo-action:disabled {
  border-color: #c9ccd1;
  background: #eef0f2;
  color: #777c85;
  opacity: 1;
}

button.feature-disabled,
button.feature-disabled:disabled {
  border-color: #c9ccd1;
  background: #8b9098;
  color: #ffffff;
  opacity: 1;
}

#runtimePill.is-disabled {
  color: var(--danger);
}

button.mini,
.tiny {
  min-height: 28px;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 12px;
  box-shadow: none;
}

.text-link {
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
}

.text-link:hover {
  color: var(--primary);
}

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

.workspace-shell {
  grid-template-columns: 310px minmax(0, 1fr) 330px;
  gap: 16px;
}

.sticky-panel {
  top: 20px;
}

.workflow-asset-option,
.prompt-card,
.selected-asset,
.queue-item,
.toggle-row,
.state,
.profile-line {
  border-color: var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 78%, var(--canvas));
}

.workflow-asset-option:hover,
.workflow-asset-option.is-selected,
.prompt-card.is-locked,
.asset-card.selected {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

.prompt-title span,
.tag-row span,
.template-card span,
td em,
.badge {
  border-color: transparent;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
}

.prompt-title strong,
.asset-card-body strong,
.result-body strong,
.template-card strong,
.module-card strong,
.support-card h2,
.queue-item strong {
  color: #000000;
  font-weight: 740;
}

.prompt-card-head em {
  color: color-mix(in srgb, var(--text-secondary) 42%, transparent);
}

.cost-box {
  border-color: color-mix(in srgb, var(--accent) 22%, var(--border));
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.cost-box strong {
  color: var(--accent);
  font-size: 28px;
  font-weight: 760;
}

.cost-row {
  border-top-color: color-mix(in srgb, var(--accent) 24%, var(--border));
}

.asset-layout,
.account-layout {
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
}

.admin-layout {
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
}

.asset-grid,
.result-grid,
.template-grid,
.module-grid,
.support-grid,
.help-steps {
  gap: 16px;
}

.asset-card,
.result-card,
.template-card,
.module-card,
.support-card {
  box-shadow: none;
}

.asset-card:hover,
.result-card:hover,
.template-card:hover,
.module-card:hover {
  border-color: color-mix(in srgb, var(--primary) 26%, var(--border));
  box-shadow: 0 18px 36px rgba(20, 20, 20, 0.07);
}

.asset-card img,
.result-card img {
  background: var(--surface-quiet);
}

.result-card::before {
  background: rgba(17, 24, 39, 0.9);
}

.empty-state {
  border-color: var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 78%, var(--canvas));
}

.queue-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.queue-lane {
  background: color-mix(in srgb, var(--surface) 68%, var(--canvas));
}

.queue-lane-head span {
  background: var(--primary-soft);
  color: var(--primary);
}

.progress {
  background: var(--surface-soft);
}

.progress span {
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.redeem-form {
  grid-template-columns: minmax(240px, 1fr) 140px;
}

.redeem-admin-form {
  grid-template-columns: 170px 130px 110px 155px minmax(220px, 1fr) 140px;
}

.security-box {
  background: color-mix(in srgb, var(--surface) 76%, var(--canvas));
}

.profile-line {
  padding: 12px;
  border-bottom: 0;
}

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: auto;
  scrollbar-color: color-mix(in srgb, var(--primary) 24%, var(--border)) var(--surface-quiet);
}

.table-wrap::-webkit-scrollbar-track-piece {
  background: var(--surface-quiet);
}

.table-wrap::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--primary) 22%, var(--border));
}

table {
  background: var(--surface);
}

th,
td {
  height: auto;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
}

th {
  background: color-mix(in srgb, var(--surface) 72%, var(--canvas));
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
}

tbody tr:hover {
  background: color-mix(in srgb, var(--surface) 74%, var(--canvas));
}

.table-wrap table {
  min-width: 760px;
}

body[data-page="assets"] .table-wrap table,
body[data-page="templates"] .table-wrap table,
body[data-page="help"] .table-wrap table {
  min-width: 640px;
}

body[data-page="redeem-codes"] .table-wrap table,
body[data-page="admin"] .table-wrap table {
  min-width: 980px;
}

body[data-page="tasks"] .table-wrap table {
  min-width: 1248px;
  table-layout: fixed;
}

body[data-page="tasks"] .table-wrap th:nth-child(1),
body[data-page="tasks"] .table-wrap td:nth-child(1) {
  width: 150px;
}

body[data-page="tasks"] .table-wrap th:nth-child(2),
body[data-page="tasks"] .table-wrap td:nth-child(2) {
  width: 86px;
}

body[data-page="tasks"] .table-wrap th:nth-child(3),
body[data-page="tasks"] .table-wrap td:nth-child(3) {
  width: 116px;
}

body[data-page="tasks"] .table-wrap th:nth-child(4),
body[data-page="tasks"] .table-wrap td:nth-child(4) {
  width: 104px;
}

body[data-page="tasks"] .table-wrap th:nth-child(5),
body[data-page="tasks"] .table-wrap td:nth-child(5) {
  width: 130px;
}

body[data-page="tasks"] .table-wrap th:nth-child(6),
body[data-page="tasks"] .table-wrap td:nth-child(6) {
  width: 100px;
}

body[data-page="tasks"] .table-wrap th:nth-child(7),
body[data-page="tasks"] .table-wrap td:nth-child(7) {
  width: 154px;
}

body[data-page="tasks"] .table-wrap th:nth-child(8),
body[data-page="tasks"] .table-wrap td:nth-child(8) {
  width: 214px;
}

body[data-page="tasks"] .table-wrap th:nth-child(9),
body[data-page="tasks"] .table-wrap td:nth-child(9) {
  width: 76px;
}

body[data-page="tasks"] .table-wrap th:nth-child(10),
body[data-page="tasks"] .table-wrap td:nth-child(10) {
  width: 128px;
}

body[data-page="tasks"] .table-wrap td:nth-child(10) .button-group {
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 6px;
  white-space: nowrap;
}

body[data-page="tasks"] .table-wrap td:nth-child(10) button.mini {
  flex: 0 0 auto;
  min-width: 42px;
  padding: 0 8px;
}

body[data-page="tasks"] .table-wrap td,
body[data-page="tasks"] .table-wrap th {
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="tasks"] .table-wrap td:nth-child(4),
body[data-page="tasks"] .table-wrap td:nth-child(5),
body[data-page="tasks"] .table-wrap td:nth-child(1),
body[data-page="tasks"] .table-wrap td:nth-child(9),
body[data-page="tasks"] .table-wrap td:nth-child(10) {
  overflow: visible;
  text-overflow: clip;
}

.task-provider-id-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
  white-space: nowrap;
}

.task-provider-id-button:hover,
.task-provider-id-button:focus-visible {
  color: #e61b4f;
  text-decoration: underline;
  text-underline-offset: 3px;
  outline: none;
}

.task-provider-id-button.inline {
  min-height: 0;
  font-size: 11px;
}

.task-id-dialog {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #dfe4eb;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 24px 80px rgba(11, 15, 21, 0.28);
}

.task-id-dialog::backdrop {
  background: rgba(15, 23, 42, 0.38);
}

.task-id-shell {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.task-id-head {
  padding: 0;
  border: 0;
}

.task-id-head h3 {
  margin: 3px 0 0;
  font-size: 18px;
  line-height: 1.2;
}

.task-id-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.task-id-full {
  min-width: 0;
  padding: 12px;
  border: 1px solid #dfe4eb;
  border-radius: 6px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.task-id-message {
  min-height: 18px;
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

body[data-page="tasks"] .progress.in-table {
  width: 112px;
  min-width: 0;
  max-width: 100%;
}

body[data-page="tasks"] .error-cell {
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-detail-trigger {
  min-width: 54px;
  padding-inline: 10px;
}

.task-detail-dialog {
  width: min(520px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  height: min(100vh - 28px, 820px);
  max-height: calc(100vh - 28px);
  margin: auto 14px auto auto;
  padding: 0;
  border: 1px solid #dfe4eb;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 28px 84px rgba(11, 15, 21, 0.32);
}

.task-detail-dialog[open] {
  display: grid;
}

.task-detail-dialog::backdrop {
  background: rgba(11, 15, 21, 0.46);
  backdrop-filter: blur(1px);
}

.task-detail-shell {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.task-detail-head {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px 13px;
  border-bottom: 1px solid #e4e7ec;
  background: #ffffff;
}

.task-detail-head::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  width: 46px;
  height: 2px;
  background: var(--primary);
}

.task-detail-head > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.task-detail-head span {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.task-detail-head strong {
  min-width: 0;
  overflow: hidden;
  color: #11151b;
  font-size: 16px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-detail-head button.ghost {
  flex: 0 0 auto;
  min-width: 58px;
  height: 32px;
  border-color: #d9dee7;
  border-radius: 4px;
  background: #ffffff;
  color: #12151b;
  box-shadow: none;
}

.task-detail-head button.ghost:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, #d9dee7);
  background: #fff7f8;
  color: var(--primary);
}

.task-detail-body {
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px 16px 18px;
  overflow: auto;
  background: #f7f8fa;
  scrollbar-color: #aeb7c4 transparent;
}

.task-detail-section {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e1e5ec;
  border-radius: 8px;
  background: #ffffff;
}

.task-detail-section-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-detail-section-head strong {
  color: #12151b;
  font-size: 13px;
  font-weight: 950;
}

.task-detail-section-head span {
  flex: 0 0 auto;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 850;
}

.task-detail-empty,
.task-detail-prompt,
.task-detail-error {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.58;
}

.task-detail-prompt {
  max-height: 172px;
  overflow: auto;
  padding: 10px 11px;
  border: 1px solid #e1e5ec;
  border-radius: 6px;
  background: #f8fafc;
  color: #1b2028;
  white-space: pre-wrap;
  scrollbar-color: #aeb7c4 transparent;
}

.task-detail-error {
  padding: 10px 11px;
  border: 1px solid color-mix(in srgb, var(--danger) 24%, #f1c4ca);
  border-radius: 6px;
  background: #fff7f8;
  color: var(--danger);
  font-weight: 760;
}

.task-detail-asset-list {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.task-detail-asset {
  min-width: 0;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid #e1e5ec;
  border-radius: 6px;
  background: #f8fafc;
}

.task-detail-asset-thumb {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: #121821;
  color: #ffffff;
  object-fit: cover;
  font-size: 11px;
  font-weight: 900;
}

.task-detail-asset div,
.task-detail-asset strong,
.task-detail-asset span {
  min-width: 0;
}

.task-detail-asset div {
  display: grid;
  gap: 3px;
}

.task-detail-asset strong,
.task-detail-asset span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-detail-asset strong {
  color: #12151b;
  font-size: 12px;
  font-weight: 900;
}

.task-detail-asset span {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 780;
}

.task-detail-prompt-list {
  display: grid;
  gap: 8px;
}

.task-detail-prompt-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 8px;
  padding: 9px;
  border: 1px solid #e1e5ec;
  border-radius: 6px;
  background: #f8fafc;
}

.task-detail-prompt-item span {
  color: var(--primary);
  font-size: 11px;
  font-weight: 950;
}

.task-detail-prompt-item p {
  margin: 0;
  color: #1b2028;
  font-size: 12px;
  line-height: 1.55;
}

.task-detail-kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.task-detail-kv div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e8ebf0;
  border-radius: 6px;
  background: #f8fafc;
}

.task-detail-kv dt,
.task-detail-kv dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-detail-kv dt {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 900;
}

.task-detail-kv dd {
  margin-top: 4px;
  color: #12151b;
  font-size: 12px;
  font-weight: 850;
}

.task-detail-kv.is-error-detail dd {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
}

.error-cell {
  max-width: 320px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-wrap th:first-child,
.table-wrap td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: inherit;
  box-shadow: 1px 0 0 var(--border);
}

.table-wrap th:first-child {
  z-index: 2;
  background: color-mix(in srgb, var(--surface) 72%, var(--canvas));
}

.status-succeeded,
.status-used,
.status-enabled {
  background: var(--success-soft);
  color: var(--success);
}

.status-failed,
.status-invalid,
.status-deleted,
.status-expired,
.status-disabled,
.status-cancelled {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-unused,
.status-waiting,
.status-processing,
.status-locked {
  background: var(--warning-soft);
  color: var(--warning);
}

.support-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.help-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.preview-dialog {
  border-color: var(--border);
  border-radius: var(--radius);
}

@media (max-width: 1280px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-shell {
    grid-template-columns: minmax(250px, 300px) minmax(420px, 1fr);
  }
}

@media (max-width: 1080px) {
  .workspace-shell,
  .asset-layout,
  .account-layout,
  .admin-layout,
  .queue-board,
  .ops-strip {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
    gap: 14px;
  }

  .status {
    justify-content: start;
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar-width: 0px;
    --content-padding: 18px;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 16px 14px 0;
    gap: 12px;
    overflow: visible;
  }

  .brand {
    justify-content: center;
    padding: 0 0 10px;
  }

  .brand-logo-full {
    width: min(236px, calc(100vw - 32px));
    max-width: 236px;
    height: 160px;
    object-position: center;
  }

  nav {
    display: flex;
    gap: 6px;
    margin: 0 -14px;
    padding: 0 14px 12px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  nav a {
    flex: 0 0 auto;
    min-width: max-content;
  }

  nav a::before {
    display: none;
  }

  .sidebar-panel {
    display: none;
  }

  main {
    margin-left: 0;
    padding: 18px;
  }

  .topbar {
    margin-bottom: 16px;
  }
}

@media (max-width: 640px) {
  main {
    padding: 14px;
  }

  .topbar,
  .page-head,
  .section-head {
    display: grid;
    align-items: stretch;
  }

  .page-head h1 {
    font-size: 26px;
  }

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

  .status span,
  .status a {
    max-width: 100%;
    height: 38px;
    border: 1px solid var(--border);
    line-height: 38px;
    overflow: hidden;
    text-overflow: ellipsis;
    justify-content: center;
  }

  #userEmailPill,
  .recharge-link {
    grid-column: 1 / -1;
  }

  .metric-grid,
  .page-actions,
  .button-group,
  .support-grid,
  .help-steps {
    grid-template-columns: 1fr;
  }

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

  .table-wrap {
    margin-inline: -1px;
    border-radius: 7px;
  }

  body[data-page="workflow"] .metric-grid,
  #adminKpis {
    grid-template-columns: 1fr;
  }
}

/* Red Accent Audio Product Site UI skin
   Reference: E:/01.FTP/0.UIUX/UIUX-高设计感库/05-red-accent-audio-product-site
   UI-only layer. Keep DOM ids, page routes, API behavior, and all business functions unchanged. */
:root {
  --canvas: #eef1f5;
  --surface: #ffffff;
  --surface-soft: #f6f3ee;
  --surface-quiet: #f3f5f8;
  --sidebar: #171e28;
  --sidebar-hover: rgba(226, 27, 60, 0.12);
  --sidebar-nested: rgba(226, 27, 60, 0.18);
  --sidebar-nested-hover: rgba(226, 27, 60, 0.24);
  --sidebar-text: rgba(248, 250, 252, 0.7);
  --sidebar-active: #ffffff;
  --text: #12151b;
  --text-regular: #252a33;
  --text-secondary: #68717e;
  --border: #e4e7ec;
  --border-light: #edf0f4;
  --primary: #e21b3c;
  --primary-hover: #ba1230;
  --primary-active: #9f1029;
  --primary-soft: #fff0f2;
  --accent: #e21b3c;
  --accent-soft: #fff0f2;
  --success: #15803d;
  --success-soft: #eef8f1;
  --warning: #b7791f;
  --warning-soft: #fbf5e9;
  --danger: #ba1230;
  --danger-soft: #fff0f2;
  --info: #68717e;
  --tag-active: #e21b3c;
  --sidebar-width: 268px;
  --navbar-height: 78px;
  --content-padding: 30px;
  --radius: 8px;
  --shell-radius: 22px;
  --shadow-card: 0 24px 54px rgba(13, 17, 24, 0.1);
  --shadow-nav: 0 18px 42px rgba(13, 17, 24, 0.08);
}

html,
body {
  background:
    linear-gradient(180deg, #eef1f5 0%, #e5eaf0 100%);
  color: var(--text);
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 24px 22px 24px 22px;
  z-index: -1;
  border: 1px solid rgba(23, 30, 40, 0.08);
  background: linear-gradient(180deg, #171e28, #111720);
  box-shadow: 0 36px 80px rgba(16, 24, 38, 0.16);
  pointer-events: none;
}

.sidebar {
  padding: 28px 18px 24px;
  background:
    linear-gradient(180deg, rgba(23, 30, 40, 0.98), rgba(11, 15, 21, 0.98)),
    #171e28;
  border-right: 1px solid #283241;
  box-shadow: 18px 0 48px rgba(0, 0, 0, 0.18);
}

.brand {
  min-height: 170px;
  padding: 0 0 22px;
  border-bottom: 1px solid #334050;
  overflow: visible;
}

.brand::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 0;
  width: 78px;
  height: 4px;
  background: var(--primary);
}

.brand-logo-full {
  width: 224px;
  max-width: 224px;
  height: 120px;
  object-fit: contain;
  object-position: center;
}

nav {
  gap: 8px;
  padding-top: 4px;
}

nav a {
  min-height: 46px;
  height: 46px;
  padding: 0 12px;
  border-radius: 0;
  color: rgba(248, 250, 252, 0.72);
  font-size: 12px;
  font-weight: 820;
  line-height: 46px;
  text-transform: uppercase;
}

nav a svg {
  width: 17px;
  height: 17px;
  color: rgba(248, 250, 252, 0.46);
}

nav a:hover,
nav a.active {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

nav a.active {
  box-shadow: inset 4px 0 0 var(--primary);
}

nav a.active::before {
  content: "";
  position: absolute;
  left: 36px;
  right: 14px;
  bottom: 5px;
  display: block;
  height: 3px;
  background: var(--primary);
}

.sidebar-panel {
  border-color: #334050;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
}

.panel-kicker {
  color: rgba(248, 250, 252, 0.52);
  letter-spacing: 0;
}

.meter {
  background: rgba(255, 255, 255, 0.1);
}

.meter i {
  background: linear-gradient(90deg, var(--primary), #ffffff);
}

main {
  margin-left: var(--sidebar-width);
  padding: 26px 30px 42px;
  background: #eef1f5;
}

.topbar {
  min-height: 78px;
  margin: 0 0 18px;
  padding: 0 22px;
  border: 1px solid var(--border);
  border-radius: var(--shell-radius) var(--shell-radius) 0 0;
  background: #ffffff;
  box-shadow: var(--shadow-nav);
}

.topbar > div:first-child {
  gap: 5px;
}

.topbar strong {
  color: #12151b;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.topbar strong::before {
  content: "";
  display: inline-block;
  width: 42px;
  height: 3px;
  margin: 0 12px 3px 0;
  background: var(--primary);
  vertical-align: middle;
}

#runtimePill {
  color: var(--danger);
  font-size: 12px;
  font-weight: 850;
  white-space: pre;
}

.status {
  gap: 8px;
}

.status span,
.recharge-link {
  height: 40px;
  border-radius: 0;
  border-color: var(--border);
  background: #ffffff;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 850;
  line-height: 40px;
  box-shadow: none;
}

#tokenPill,
#balancePill,
#noticePill,
.recharge-link {
  color: var(--primary);
}

#balancePill,
.status-succeeded,
.status-used,
.status-enabled {
  color: var(--success);
}

#noticePill {
  color: var(--danger);
}

#userEmailPill::before {
  border-radius: 50%;
  background: #171e28;
}

#userEmailPill {
  padding: 0;
  overflow: visible;
}

#userEmailPill::before {
  display: none;
}

.account-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  color: #12151b;
  text-decoration: none;
}

.account-shortcut img {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #eef1f5;
  border: 1px solid #d9dde5;
  color: transparent;
  display: block;
}

.account-shortcut span {
  display: block;
  min-width: 0;
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: inherit;
  color: inherit;
  border: 0;
  background: transparent;
  padding: 0;
  height: auto;
  line-height: inherit;
  box-shadow: none;
}

#userEmailPill:hover .account-shortcut {
  color: var(--primary);
}

.page-head {
  position: relative;
  min-height: 150px;
  align-items: end;
  margin: 0 0 0;
  padding: 22px 48px 21px;
  overflow: hidden;
  border: 1px solid #0b111a;
  border-bottom: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(4, 6, 10, 0.96) 0%, rgba(8, 10, 14, 0.84) 54%, rgba(8, 10, 14, 0.66) 100%),
    radial-gradient(circle at 86% 28%, rgba(226, 27, 60, 0.24), transparent 30%),
    linear-gradient(135deg, #151c26, #070a0f);
  color: #ffffff;
  box-shadow: 0 26px 70px rgba(13, 17, 24, 0.24);
}

.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 36%, rgba(255, 255, 255, 0.03) 36% 36.08%, transparent 36.08% 68%, rgba(255, 255, 255, 0.03) 68% 68.08%, transparent 68.08%),
    linear-gradient(180deg, transparent 0 56%, rgba(255, 255, 255, 0.04) 56% 56.25%, transparent 56.25%);
  pointer-events: none;
}

.page-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--primary) 100%, transparent) 0%, color-mix(in srgb, var(--primary) 0%, transparent) 28%, transparent 28%, transparent 100%),
    #e9e1d8;
}

.page-head > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #d7dce5;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.eyebrow::after {
  content: "";
  width: 92px;
  height: 4px;
  background: var(--primary);
}

.page-head h1 {
  max-width: 620px;
  margin: 12px 0 0;
  color: #ffffff;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  font-size: clamp(38px, 4.4vw, 72px);
  font-weight: 950;
  line-height: 1.02;
  letter-spacing: 0;
}

.page-head p {
  max-width: 650px;
  margin-top: 9px;
  color: #d7dce5;
  font-size: 14px;
  line-height: 1.7;
}

.page-actions {
  align-self: start;
  justify-content: end;
  gap: 12px;
}

.page-actions > :first-child,
button,
.ghost-link {
  min-height: 40px;
  border-radius: 0;
}

button,
.ghost-link,
.page-actions > :first-child {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(226, 27, 60, 0.22);
}

button:hover,
.ghost-link:hover,
.page-actions > :first-child:hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
}

button::after,
.ghost-link::after {
  content: "";
  width: 28px;
  height: 1px;
  margin-left: 10px;
  display: inline-block;
  background: currentColor;
  opacity: 0.76;
  vertical-align: middle;
}

button.ghost,
.ghost-link,
.page-actions .ghost-link:not(:first-child) {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  box-shadow: none;
}

main > .panel button.ghost,
.panel button.ghost,
.asset-card button.ghost,
.result-card button.ghost,
.template-card button.ghost,
.queue-item button.ghost,
.ghost-link {
  border-color: var(--border);
  background: #ffffff;
  color: #12151b;
}

main > .panel button.ghost:hover,
.panel button.ghost:hover,
.asset-card button.ghost:hover,
.result-card button.ghost:hover,
.template-card button.ghost:hover,
.queue-item button.ghost:hover,
.ghost-link:hover {
  border-color: var(--primary);
  background: #ffffff;
  color: var(--primary);
}

.page-head .page-actions .ghost-link:not(:first-child),
.page-head .page-actions button.ghost,
.page-head .page-actions #exportCodes {
  border-color: #ffffff;
  background: #ffffff;
  color: #12151b;
}

.page-head .page-actions .ghost-link:not(:first-child):hover,
.page-head .page-actions button.ghost:hover,
.page-head .page-actions #exportCodes:hover {
  border-color: var(--primary);
  background: #ffffff;
  color: var(--primary);
}

button.secondary {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

button.danger {
  border-color: color-mix(in srgb, var(--danger) 42%, var(--border));
  background: #ffffff;
  color: var(--danger);
  box-shadow: none;
}

button.danger:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
}

button.mini::after,
.tiny::after,
.icon-actions button::after,
.card-actions button::after,
.button-group button::after,
.page-actions button::after,
.page-actions .ghost-link::after,
.recharge-link::after,
button.demo-action::after,
button.feature-disabled::after {
  display: none;
}

.metric-grid,
.page-metrics,
.workspace-shell,
.asset-layout,
.account-layout,
.admin-layout,
.queue-board,
.support-grid,
.ops-strip,
main > .panel {
  margin-top: 16px;
}

.metric-card,
.panel,
.module-card,
.support-card,
.help-steps article,
.asset-card,
.result-card,
.template-card,
.queue-lane,
.queue-item,
.profile-box,
.security-box {
  border-color: var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.metric-card {
  min-height: 118px;
  padding: 18px;
  background:
    linear-gradient(180deg, #ffffff, #ffffff 64%, #fbfcfd);
}

.metric-card::before {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  margin-bottom: 16px;
  background: var(--primary);
}

.metric-card span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.metric-card strong {
  color: #05070a;
  font-size: 32px;
  font-weight: 900;
}

.metric-card small {
  color: var(--primary);
  font-weight: 820;
}

.panel,
.queue-lane,
.profile-box,
.security-box {
  padding: 18px;
}

.section-head {
  align-items: start;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.section-head h2 {
  color: #05070a;
  font-size: 15px;
  font-weight: 900;
}

.section-head h2::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 3px;
  margin-right: 10px;
  background: var(--primary);
  vertical-align: middle;
}

.section-head span,
.summary-line {
  color: var(--text-secondary);
}

input,
select,
textarea {
  min-height: 40px;
  border-radius: 4px;
  border-color: var(--border);
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(226, 27, 60, 0.12);
}

input[type="checkbox"] {
  accent-color: var(--primary);
}

.workspace-shell {
  grid-template-columns: 310px minmax(0, 1fr) 330px;
  gap: 16px;
}

.workflow-asset-option,
.prompt-card,
.selected-asset,
.queue-item,
.toggle-row,
.profile-line,
.asset-card,
.result-card,
.template-card,
.module-card,
.support-card {
  border-radius: var(--radius);
}

.workflow-asset-option:hover,
.workflow-asset-option.is-selected,
.prompt-card.is-locked,
.asset-card.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.prompt-card.is-locked {
  box-shadow: inset 4px 0 0 var(--primary);
}

.prompt-title span,
.tag-row span,
.template-card span,
.badge {
  border-radius: 999px;
}

.prompt-title span,
.tag-row span,
.template-card span {
  background: var(--primary-soft);
  color: var(--primary);
}

.prompt-title strong,
.asset-card-body strong,
.result-body strong,
.template-card strong,
.module-card strong,
.support-card h2,
.queue-item strong {
  color: #05070a;
  font-weight: 900;
}

.prompt-card-head em {
  color: color-mix(in srgb, var(--text-secondary) 58%, #ffffff);
  font-family: Impact, Haettenschweiler, "Arial Narrow", Inter, sans-serif;
  font-size: 22px;
  font-style: normal;
}

.cost-box {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
  background: linear-gradient(180deg, #fff7f8, #ffffff);
}

.cost-box strong {
  color: var(--primary);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-weight: 950;
  letter-spacing: 0;
}

.cost-row {
  border-top-color: color-mix(in srgb, var(--primary) 24%, var(--border));
}

.asset-grid,
.result-grid,
.template-grid,
.module-grid,
.support-grid,
.help-steps {
  gap: 16px;
}

.asset-card:hover,
.result-card:hover,
.template-card:hover,
.module-card:hover {
  border-color: color-mix(in srgb, var(--primary) 36%, var(--border));
  box-shadow: 0 28px 62px rgba(13, 17, 24, 0.14);
}

.asset-card img,
.result-card img {
  border-radius: var(--radius) var(--radius) 0 0;
  background: #0b0f15;
}

.result-card::before {
  background: linear-gradient(90deg, var(--primary), transparent);
}

.queue-board {
  gap: 16px;
}

.queue-lane-head span {
  background: var(--primary-soft);
  color: var(--primary);
}

.progress {
  background: #edf0f4;
}

.progress span {
  background: linear-gradient(90deg, #171e28, var(--primary));
}

.redeem-form,
.redeem-admin-form {
  gap: 12px;
}

.table-wrap {
  border-color: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

th {
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 900;
}

td {
  color: #252a33;
  font-weight: 550;
}

tbody tr:hover {
  background: #fff9fa;
}

.table-wrap th:first-child {
  background: var(--surface-soft);
}

.status-failed,
.status-invalid,
.status-deleted,
.status-expired,
.status-disabled,
.status-cancelled {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-unused,
.status-waiting,
.status-processing,
.status-locked {
  background: var(--warning-soft);
  color: var(--warning);
}

.task-status-stack {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

tbody tr.has-missing-results {
  background: #fff7f8;
}

tbody tr.has-missing-results:hover {
  background: #fff1f3;
}

.is-demo,
tbody tr.is-demo,
.asset-card.is-demo,
.result-card.is-demo,
.queue-item.is-demo,
.workflow-asset-option.is-demo {
  border-color: #c9ccd1;
  background: #eef0f2;
  box-shadow: none;
  filter: grayscale(1);
}

button.demo-action,
button.demo-action:disabled,
button.feature-disabled,
button.feature-disabled:disabled {
  border-color: #c9ccd1;
  background: #8b9098;
  color: #ffffff;
  box-shadow: none;
  opacity: 1;
}

.preview-dialog {
  border-radius: var(--radius);
  border-color: var(--border);
}

@media (max-width: 1280px) {
  .workspace-shell {
    grid-template-columns: minmax(250px, 300px) minmax(420px, 1fr);
  }

  body[data-page="workflow"] .metric-grid,
  .metric-grid,
  #adminKpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .page-head {
    min-height: 190px;
    padding: 34px 32px 38px;
  }

  .workspace-shell,
  .asset-layout,
  .account-layout,
  .admin-layout,
  .queue-board,
  .ops-strip {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
    height: auto;
    gap: 14px;
    padding: 16px 18px;
  }
}

@media (max-width: 900px) {
  body::before {
    inset: 0;
    border: 0;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 18px 14px 0;
    overflow: visible;
  }

  .brand {
    min-height: 126px;
    justify-content: center;
    padding-bottom: 12px;
    overflow: visible;
  }

  .brand::after {
    right: calc(50% - 38px);
  }

  .brand-logo-full {
    width: min(220px, calc(100vw - 32px));
    height: min(105px, calc((100vw - 32px) / 2.086));
    object-position: center;
  }

  nav {
    display: flex;
    gap: 8px;
    margin: 0 -14px;
    padding: 0 14px 14px;
    overflow-x: auto;
  }

  nav a {
    flex: 0 0 auto;
    min-width: max-content;
  }

  nav a.active::before {
    left: 12px;
    right: 12px;
  }

  main {
    margin-left: 0;
    padding: 16px;
  }
}

@media (max-width: 640px) {
  main {
    padding: 12px;
  }

  .topbar {
    border-radius: 16px 16px 0 0;
  }

  .page-head {
    min-height: 138px;
    display: grid;
    padding: 16px 20px 18px;
  }

  .page-head h1 {
    font-size: 40px;
  }

  .page-head p {
    font-size: 13px;
  }

  .page-actions {
    justify-content: stretch;
  }

  .page-actions,
  .button-group,
  .status {
    grid-template-columns: 1fr;
  }

  .status span,
  .status a {
    max-width: 100%;
  }

  .status .logout-button {
    width: 100%;
  }

  .account-shortcut {
    width: 100%;
    justify-content: center;
  }

  body[data-page="workflow"] .metric-grid,
  .metric-grid,
  #adminKpis,
  .support-grid,
  .help-steps {
    grid-template-columns: 1fr;
  }
}

body[data-page="admin"] .admin-module-picker {
  overflow: hidden;
  padding: 16px 18px 18px;
  border: 1px solid #d9e1eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

body[data-page="admin"] .admin-module-picker .section-head {
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8edf4;
}

body[data-page="admin"] .admin-module-picker .section-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #111827;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
}

body[data-page="admin"] .admin-module-picker .section-head h2::before {
  content: "";
  width: 24px;
  height: 3px;
  border-radius: 999px;
  background: #e60033;
}

body[data-page="admin"] .admin-module-picker .section-head span {
  color: #64748b;
  font-weight: 700;
}

body[data-page="admin"] .admin-module-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid #dfe4eb;
  border-radius: 6px;
  background: #ffffff;
}

@media (max-width: 1320px) {
  body[data-page="admin"] .admin-module-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body[data-page="admin"] .admin-module-grid .module-card {
    border-bottom: 1px solid #e5eaf2;
  }

  body[data-page="admin"] .admin-module-grid .module-card:nth-child(4n) {
    border-right: 0;
  }
}

body[data-page="admin"] button.module-card,
body[data-page="admin"] a.module-card {
  position: relative;
  width: 100%;
  min-height: 74px;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  align-items: center;
  gap: 0;
  overflow: hidden;
  padding: 12px 14px;
  border: 0;
  border-right: 1px solid #e5eaf2;
  border-bottom: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

body[data-page="admin"] .admin-module-grid .module-card:nth-child(7n) {
  border-right: 0;
}

body[data-page="admin"] button.module-card::before,
body[data-page="admin"] a.module-card::before {
  content: "";
  position: absolute;
  inset: auto 12px 0;
  width: auto;
  height: 2px;
  background: #e60033;
  opacity: 0;
  transition: opacity 0.18s ease;
}

body[data-page="admin"] .module-card:hover,
body[data-page="admin"] .module-card:focus-visible {
  background: #f8fafc;
  box-shadow: none;
  outline: none;
}

body[data-page="admin"] .module-card.is-active {
  background: #fff7f9;
  box-shadow: inset 0 0 0 1px rgba(230, 0, 51, 0.14);
}

body[data-page="admin"] .module-card.is-active::before,
body[data-page="admin"] .module-card:hover::before,
body[data-page="admin"] .module-card:focus-visible::before {
  opacity: 1;
}

body[data-page="admin"] .module-card-top {
  display: grid;
  gap: 6px;
  min-width: 0;
}

body[data-page="admin"] .module-card-index {
  display: block;
  width: auto;
  margin: 0 0 6px;
  background: transparent;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0;
}

body[data-page="admin"] .module-card:hover .module-card-index,
body[data-page="admin"] .module-card:focus-visible .module-card-index {
  color: #1f2937;
}

body[data-page="admin"] .module-card.is-active .module-card-index {
  color: #b40029;
}

body[data-page="admin"] .module-card-copy {
  display: grid;
  align-content: center;
  gap: 0;
  min-width: 0;
  padding: 0;
}

body[data-page="admin"] .module-card-meta {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="admin"] .module-card.is-active .module-card-meta {
  border-color: transparent;
  background: transparent;
  color: #b40029;
}

body[data-page="admin"] .module-card-title {
  min-width: 0;
  color: #111827;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
}

body[data-page="admin"] .module-card-desc {
  display: none;
}

body[data-page="admin"] .admin-module-detail {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

body[data-page="admin"] .admin-module-panel {
  display: none;
}

body[data-page="admin"] .admin-module-panel.is-active {
  display: block;
}

body[data-page="admin"] .admin-empty-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 74px;
  overflow: hidden;
  padding: 15px 18px;
  border: 1px solid #dce3ec;
  border-left: 3px solid #1e3a8a;
  border-radius: 6px;
  background: linear-gradient(90deg, #f8fafc 0%, #ffffff 70%);
  box-shadow: none;
  color: #64748b;
}

body[data-page="admin"] .admin-empty-copy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 14px;
  align-items: center;
  min-width: 0;
}

body[data-page="admin"] .admin-empty-copy > span {
  grid-row: 1 / span 2;
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid #dfe7f1;
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

body[data-page="admin"] .admin-empty-state strong {
  color: #111827;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
}

body[data-page="admin"] .admin-empty-state small {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

body[data-page="admin"] .admin-empty-shortcuts {
  display: none;
}

body[data-page="admin"] .admin-empty-shortcuts span {
  min-width: 48px;
  padding: 6px 9px;
  border: 1px solid #dde4ee;
  border-radius: 4px;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  box-shadow: none;
}

body[data-page="admin"] .admin-empty-state.is-hidden {
  display: none;
}

body[data-page="admin"] .admin-back {
  white-space: nowrap;
}

body[data-page="admin"] .lokflow-admin-workbench {
  display: grid;
  gap: 14px;
}

body[data-page="admin"] .lokflow-admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body[data-page="admin"] .lokflow-admin-summary-grid article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #dfe6ef;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: none;
}

body[data-page="admin"] .lokflow-admin-summary-grid span,
body[data-page="admin"] .lokflow-admin-section .section-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

body[data-page="admin"] .lokflow-admin-summary-grid strong {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="admin"] .lokflow-admin-summary-grid small,
body[data-page="admin"] .lokflow-admin-notes span,
body[data-page="admin"] .lokflow-navigation-pill small {
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="admin"] .lokflow-admin-notes {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid #e5eaf2;
  border-left: 3px solid #e60033;
  border-radius: 6px;
  background: #fbfdff;
}

body[data-page="admin"] .lokflow-admin-section {
  display: grid;
  gap: 10px;
  min-width: 0;
}

body[data-page="admin"] .lokflow-admin-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body[data-page="admin"] .lokflow-admin-entry-grid article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #dfe6ef;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: none;
}

body[data-page="admin"] .lokflow-admin-entry-grid article div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

body[data-page="admin"] .lokflow-admin-entry-grid strong {
  color: #111827;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

body[data-page="admin"] .lokflow-admin-entry-grid span {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

body[data-page="admin"] .lokflow-admin-entry-grid button {
  flex: 0 0 auto;
  white-space: nowrap;
}

body[data-page="admin"] .lokflow-admin-embed {
  display: grid;
  min-width: 0;
  min-height: 620px;
  overflow: visible;
  border: 1px solid #dfe6ef;
  border-radius: 6px;
  background: #ffffff;
}

body[data-page="admin"] .lokflow-admin-embed.is-hidden {
  display: none;
}

body[data-page="admin"] .lokflow-admin-embed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border-bottom: 1px solid #e5eaf2;
  background: #fbfdff;
}

body[data-page="admin"] .lokflow-admin-embed-head div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body[data-page="admin"] .lokflow-admin-embed-head strong {
  color: #111827;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

body[data-page="admin"] .lokflow-admin-embed-head span {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="admin"] .lokflow-admin-embed iframe {
  display: block;
  width: 100%;
  height: 560px;
  min-height: 560px;
  overflow: hidden;
  border: 0;
  background: #050505;
}

body[data-page="admin"] .section-head.compact {
  margin: 0;
  padding: 0;
  border: 0;
}

body[data-page="admin"] .section-head.compact h3 {
  margin: 0;
  color: #111827;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
}

body[data-page="admin"] .lokflow-diagnostics-table th,
body[data-page="admin"] .lokflow-diagnostics-table td {
  vertical-align: top;
}

body[data-page="admin"] .lokflow-diagnostics-table td:first-child {
  min-width: 220px;
}

body[data-page="admin"] .lokflow-diagnostics-table td:first-child strong,
body[data-page="admin"] .lokflow-diagnostics-table td:first-child span {
  display: block;
}

body[data-page="admin"] .lokflow-diagnostics-table td:first-child span {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
}

body[data-page="admin"] .lokflow-navigation-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

body[data-page="admin"] .lokflow-navigation-pill {
  display: grid;
  gap: 2px;
  min-width: 120px;
  max-width: 220px;
  padding: 8px 10px;
  border: 1px solid #dfe6ef;
  border-radius: 6px;
  background: #ffffff;
}

body[data-page="admin"] .lokflow-navigation-pill[data-visible="false"] {
  border-color: #d9f0e4;
  background: #f6fef9;
}

body[data-page="admin"] .lokflow-navigation-pill strong {
  overflow: hidden;
  color: #111827;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  body[data-page="admin"] .lokflow-admin-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body[data-page="admin"] .lokflow-admin-summary-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="admin"] .lokflow-admin-entry-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="admin"] .lokflow-admin-entry-grid article,
  body[data-page="admin"] .lokflow-admin-embed-head {
    align-items: stretch;
    flex-direction: column;
  }
}

body[data-page="admin"] .api-settings-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1.16fr) minmax(360px, 0.84fr);
  align-items: start;
  gap: 10px;
}

body[data-page="admin"] .api-model-category-card {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: none;
}

body[data-page="admin"] .api-model-category-label {
  flex: 0 0 auto;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

body[data-page="admin"] .api-model-category-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1px 1px 2px;
  scrollbar-width: thin;
}

body[data-page="admin"] .api-model-category-button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid #d9e1ec;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
}

body[data-page="admin"] .api-model-category-button:hover,
body[data-page="admin"] .api-model-category-button:focus-visible {
  border-color: rgba(230, 0, 51, 0.42);
  color: #be123c;
  outline: none;
}

body[data-page="admin"] .api-model-category-button.is-active {
  border-color: rgba(230, 0, 51, 0.58);
  background: #fff1f4;
  color: #be123c;
}

body[data-page="admin"] .provider-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

@media (max-width: 1320px) {
  body[data-page="admin"] .api-settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  body[data-page="admin"] .api-settings-grid {
    grid-template-columns: 1fr;
  }
}

body[data-page="admin"] .api-info-card {
  display: grid;
  gap: 7px;
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: none;
}

body[data-page="admin"] .api-info-card span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 900;
}

body[data-page="admin"] .api-info-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #05070a;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
}

body[data-page="admin"] .api-info-card small {
  color: var(--text-secondary);
  font-size: 12px;
}

body[data-page="admin"] .api-settings-form-card {
  grid-column: 1;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
}

body[data-page="admin"] .provider-settings-form-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
}

body[data-page="admin"] .api-settings-form-card label,
body[data-page="admin"] .provider-settings-form-card label,
body[data-page="admin"] .api-field {
  display: grid;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 900;
}

body[data-page="admin"] .api-settings-form-card input,
body[data-page="admin"] .api-settings-form-card select,
body[data-page="admin"] .api-settings-form-card textarea,
body[data-page="admin"] .provider-settings-form-card input,
body[data-page="admin"] .provider-settings-form-card select,
body[data-page="admin"] .provider-settings-form-card textarea {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

body[data-page="admin"] .api-settings-form-card input,
body[data-page="admin"] .api-settings-form-card select,
body[data-page="admin"] .provider-settings-form-card input,
body[data-page="admin"] .provider-settings-form-card select {
  height: 36px;
}

body[data-page="admin"] .api-settings-form-card textarea,
body[data-page="admin"] .provider-settings-form-card textarea {
  min-height: 62px;
  padding-top: 8px;
  resize: vertical;
}

body[data-page="admin"] .api-form-head,
body[data-page="admin"] .api-form-actions,
body[data-page="admin"] .api-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body[data-page="admin"] .api-form-head {
  padding-bottom: 2px;
}

body[data-page="admin"] .api-toggle-row {
  justify-content: flex-start;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfcfd;
}

body[data-page="admin"] .api-toggle-row input {
  width: 16px;
  min-height: 16px;
  height: 16px;
  accent-color: var(--primary);
}

body[data-page="admin"] .api-form-actions {
  align-self: end;
  justify-content: space-between;
  padding-top: 2px;
}

body[data-page="admin"] .api-field small,
body[data-page="admin"] .api-form-actions small {
  display: block;
}

body[data-page="admin"] .api-form-actions button {
  white-space: nowrap;
}

body[data-page="admin"] .api-channel-list {
  display: grid;
  gap: 6px;
}

body[data-page="admin"] .api-channel-row {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
}

body[data-page="admin"] .api-channel-row.is-hidden {
  display: none;
}

body[data-page="admin"] .api-channel-empty,
body[data-page="admin"] .model-whitelist-empty {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 10px;
  border: 1px dashed #d8e0eb;
  border-radius: 6px;
  background: #fbfcfd;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

body[data-page="admin"] .api-channel-empty.is-hidden,
body[data-page="admin"] .model-whitelist-empty.is-hidden {
  display: none;
}

body[data-page="admin"] .api-channel-row summary {
  display: grid;
  grid-template-columns: minmax(128px, 0.72fr) minmax(0, 1.48fr) minmax(128px, auto);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 7px 10px;
  color: var(--text);
  cursor: pointer;
}

body[data-page="admin"] .api-channel-row summary:hover {
  background: #f8fafc;
}

body[data-page="admin"] .api-channel-title {
  display: grid;
  gap: 1px;
  min-width: 0;
}

body[data-page="admin"] .api-channel-title b {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="admin"] .api-channel-title small,
body[data-page="admin"] .api-channel-summary {
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="admin"] .api-channel-summary {
  font-size: 12px;
}

body[data-page="admin"] .api-channel-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

body[data-page="admin"] .api-channel-status {
  min-width: 64px;
  padding: 4px 8px;
  border: 1px solid #d7dee8;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

body[data-page="admin"] .api-channel-test {
  width: 54px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid #d9e1ec;
  border-radius: 6px;
  background: #ffffff;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: none;
}

body[data-page="admin"] .api-channel-test:hover:not(:disabled),
body[data-page="admin"] .api-channel-test:focus-visible:not(:disabled) {
  border-color: var(--brand);
  background: #fff5f6;
  color: var(--brand);
}

body[data-page="admin"] .api-channel-test:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

body[data-page="admin"] .api-channel-row.is-ready .api-channel-status {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

body[data-page="admin"] .api-channel-row.is-draft .api-channel-status {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

body[data-page="admin"] .api-channel-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #e8eef5;
  background: #fcfdff;
}

body[data-page="admin"] .api-channel-fields .api-toggle-row,
body[data-page="admin"] .api-wide-field {
  grid-column: 1 / -1;
}

body[data-page="admin"] .seedance-gateway-top {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
}

body[data-page="admin"] .seedance-provider-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

body[data-page="admin"] .seedance-provider-row {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: none;
}

body[data-page="admin"] .seedance-provider-row > summary {
  display: grid;
  grid-template-columns: 6px auto minmax(180px, 0.9fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 10px 0 0;
  cursor: pointer;
  list-style: none;
}

body[data-page="admin"] .seedance-provider-row > summary::-webkit-details-marker {
  display: none;
}

body[data-page="admin"] .seedance-provider-row > summary:hover,
body[data-page="admin"] .seedance-provider-row > summary:focus-visible {
  background: #f8fafc;
  outline: none;
}

body[data-page="admin"] .seedance-provider-row.is-active {
  border-color: rgba(230, 0, 51, 0.32);
}

body[data-page="admin"] .seedance-provider-row.is-moxing {
  background: linear-gradient(90deg, #fff7f9 0, #ffffff 42%);
}

body[data-page="admin"] .seedance-provider-row.is-zhizhi {
  background: linear-gradient(90deg, #f8fbff 0, #ffffff 42%);
}

body[data-page="admin"] .seedance-provider-accent {
  align-self: stretch;
  width: 6px;
  background: #e60033;
}

body[data-page="admin"] .seedance-provider-row.is-zhizhi .seedance-provider-accent {
  background: #2563eb;
}

body[data-page="admin"] .seedance-provider-enable {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: 4px;
  border: 1px solid #dbe4ef;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
}

body[data-page="admin"] .seedance-provider-enable input {
  width: 16px;
  height: 16px;
  accent-color: #e60033;
  cursor: pointer;
}

body[data-page="admin"] .seedance-provider-row.is-zhizhi .seedance-provider-enable input {
  accent-color: #2563eb;
}

body[data-page="admin"] .seedance-provider-row .api-channel-title b {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body[data-page="admin"] .seedance-provider-row .api-channel-title em {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border: 1px solid rgba(230, 0, 51, 0.22);
  border-radius: 999px;
  background: #fff1f4;
  color: #be123c;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

body[data-page="admin"] .seedance-provider-row.is-zhizhi .api-channel-title em {
  border-color: rgba(37, 99, 235, 0.2);
  background: #eff6ff;
  color: #1d4ed8;
}

body[data-page="admin"] .seedance-provider-row.is-ready .api-channel-status {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

body[data-page="admin"] .seedance-provider-row.is-draft .api-channel-status {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

body[data-page="admin"] .seedance-provider-row.is-idle .api-channel-status {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}

body[data-page="admin"] .seedance-provider-row-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #e8eef5;
  background: #fcfdff;
}

body[data-page="admin"] .seedance-provider-row-fields .api-toggle-row,
body[data-page="admin"] .seedance-provider-row-fields .seedance-advanced-box {
  grid-column: 1 / -1;
}

body[data-page="admin"] .seedance-advanced-box {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}

body[data-page="admin"] .seedance-advanced-box summary {
  display: block;
  min-height: 34px;
  padding: 8px 10px;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

body[data-page="admin"] .seedance-advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

body[data-page="admin"] .api-channel-link-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
}

body[data-page="admin"] .api-channel-link-card strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

body[data-page="admin"] .api-channel-link-card span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

body[data-page="admin"] .api-channel-link-card button {
  justify-self: start;
}

body[data-page="admin"] .seedance-api-provider-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

body[data-page="admin"] .seedance-api-provider-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-left: 6px solid #e60033;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
}

body[data-page="admin"] .seedance-api-provider-toggle.is-zhizhi {
  border-left-color: #2563eb;
}

body[data-page="admin"] .seedance-api-provider-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #e60033;
  cursor: pointer;
}

body[data-page="admin"] .seedance-api-provider-toggle.is-zhizhi input {
  accent-color: #2563eb;
}

body[data-page="admin"] .seedance-api-provider-toggle span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body[data-page="admin"] .seedance-api-provider-toggle b {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

body[data-page="admin"] .seedance-api-provider-toggle em {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border: 1px solid rgba(230, 0, 51, 0.22);
  border-radius: 999px;
  background: #fff1f4;
  color: #be123c;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

body[data-page="admin"] .seedance-api-provider-toggle.is-zhizhi em {
  border-color: rgba(37, 99, 235, 0.2);
  background: #eff6ff;
  color: #1d4ed8;
}

body[data-page="admin"] .seedance-api-provider-toggle small {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="admin"] .seedance-api-provider-toggle strong {
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

body[data-page="admin"] .seedance-api-provider-test {
  justify-self: end;
}

body[data-page="admin"] .seedance-mapping-box {
  grid-column: 1 / -1;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
}

body[data-page="admin"] .seedance-mapping-box summary {
  min-height: 34px;
  padding: 8px 10px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

body[data-page="admin"] .seedance-mapping-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border-top: 1px solid #e2e8f0;
}

body[data-page="admin"] .seedance-mapping-table th,
body[data-page="admin"] .seedance-mapping-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #edf2f7;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  vertical-align: middle;
}

body[data-page="admin"] .seedance-mapping-table th {
  color: #64748b;
  background: #f8fafc;
}

body[data-page="admin"] .seedance-mapping-table input {
  height: 32px;
  min-height: 32px;
  font-size: 12px;
}

body[data-page="admin"] .seedance-capability {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

body[data-page="admin"] .seedance-capability.is-ready {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

body[data-page="admin"] .seedance-capability.is-pending {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

body[data-page="admin"] .seedance-capability.is-off {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

@media (max-width: 900px) {
  body[data-page="admin"] .seedance-gateway-top,
  body[data-page="admin"] .seedance-provider-row-fields,
  body[data-page="admin"] .seedance-advanced-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="admin"] .seedance-provider-row > summary {
    grid-template-columns: 6px auto minmax(0, 1fr);
  }

  body[data-page="admin"] .seedance-provider-row .api-channel-summary,
  body[data-page="admin"] .seedance-provider-row .api-channel-actions {
    grid-column: 3;
    justify-self: start;
  }

  body[data-page="admin"] .seedance-mapping-table {
    min-width: 620px;
  }

  body[data-page="admin"] .seedance-mapping-box {
    overflow-x: auto;
  }
}

body[data-page="admin"] .api-model-whitelist-card {
  grid-column: 2;
  grid-row: auto;
  align-content: start;
}

@media (max-width: 1320px) {
  body[data-page="admin"] .api-settings-form-card,
  body[data-page="admin"] .api-model-whitelist-card {
    grid-column: 1;
    grid-row: auto;
  }
}

body[data-page="admin"] .model-whitelist-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 8px;
}

body[data-page="admin"] .model-whitelist-search {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #ffffff;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

body[data-page="admin"] .model-whitelist {
  display: grid;
  max-height: 286px;
  overflow: auto;
  gap: 0;
  border: 1px solid #e4e9f1;
  border-radius: 6px;
  background: #ffffff;
}

body[data-page="admin"] .model-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 9px;
  border: 0;
  border-bottom: 1px solid #eef2f6;
  border-radius: 0;
  background: #ffffff;
  cursor: pointer;
}

body[data-page="admin"] .model-check:last-child {
  border-bottom: 0;
}

body[data-page="admin"] .model-check.is-hidden {
  display: none;
}

body[data-page="admin"] .model-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
}

body[data-page="admin"] .model-check > span {
  display: grid;
  grid-template-columns: minmax(130px, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

body[data-page="admin"] .model-check b,
body[data-page="admin"] .model-check small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="admin"] .model-check b {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

body[data-page="admin"] .model-check small {
  margin-top: 0;
  color: #64748b;
  font-size: 11px;
}

body[data-page="admin"] .model-check:has(input:checked) {
  background: #ffffff;
}

body[data-page="admin"] .model-check:has(input:disabled) {
  opacity: 0.55;
  cursor: not-allowed;
}

body[data-page="admin"] .model-whitelist-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 2px;
}

body[data-page="admin"] .token-admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(360px, 1.14fr);
  gap: 16px;
}

body[data-page="admin"] .token-adjust-card,
body[data-page="admin"] .token-policy-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  background: #ffffff;
}

body[data-page="admin"] .subsection-title {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

body[data-page="admin"] .subsection-title strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

body[data-page="admin"] .subsection-title span {
  color: var(--text-secondary);
  font-size: 12px;
}

body[data-page="admin"] .finance-management-panel {
  display: none;
  gap: 16px;
}

body[data-page="admin"] .finance-management-panel.is-active {
  display: grid;
}

body[data-page="admin"] .finance-section {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
}

body[data-page="admin"] .finance-section .section-head {
  align-items: center;
  margin-bottom: 0;
}

body[data-page="admin"] .finance-section.is-expanded .section-head {
  margin-bottom: 16px;
}

body[data-page="admin"] .finance-section .data-panel-toggle {
  flex: 0 0 auto;
  min-width: 132px;
  padding-inline: 14px;
  white-space: nowrap;
}

body[data-page="admin"] .finance-section .data-panel-toolbar {
  justify-content: flex-end;
  margin-bottom: 12px;
}

body[data-page="admin"] .finance-section .data-panel-toolbar .toolbar-input {
  min-width: 280px;
}

body[data-page="admin"] .finance-section .data-panel-toolbar .toolbar-select {
  width: 150px;
}

body[data-page="admin"] .payment-management-panel {
  display: none;
  gap: 14px;
}

body[data-page="admin"] .payment-management-panel.is-active {
  display: grid;
}

body[data-page="admin"] .payment-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="admin"] .payment-section {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
}

body[data-page="admin"] .payment-settings-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="admin"] .payment-settings-form-v2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

body[data-page="admin"] .payment-config-block {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  background: #ffffff;
}

body[data-page="admin"] .payment-channel-extra-block.is-hidden {
  display: none !important;
}

body[data-page="admin"] .payment-config-block.is-hidden {
  display: none !important;
}

body[data-page="admin"] .payment-config-block-wide {
  grid-column: 1 / -1;
}

body[data-page="admin"] .payment-channel-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  background: #fbfcff;
}

body[data-page="admin"] .payment-channel-title {
  display: grid;
  gap: 3px;
}

body[data-page="admin"] .payment-channel-title strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

body[data-page="admin"] .payment-channel-title span,
body[data-page="admin"] .payment-channel-hint {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

body[data-page="admin"] .payment-channel-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}

body[data-page="admin"] .payment-channel-tab {
  display: grid;
  gap: 2px;
  min-width: 152px;
  padding: 8px 10px;
  border: 1px solid #d8e0eb;
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

body[data-page="admin"] .payment-channel-tab:hover {
  border-color: #c90f24;
  background: #fff7f7;
}

body[data-page="admin"] .payment-channel-tab.is-selected {
  border-color: #c90f24;
  background: #fff1f2;
}

body[data-page="admin"] .payment-channel-tab strong {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

body[data-page="admin"] .payment-channel-tab span {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.35;
}

body[data-page="admin"] .payment-config-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body[data-page="admin"] .payment-config-title strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

body[data-page="admin"] .payment-config-title span,
body[data-page="admin"] .payment-key-note span {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

body[data-page="admin"] .payment-key-block {
  background: #fbfcff;
}

body[data-page="admin"] .payment-key-note {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #e3e9f2;
  border-radius: 6px;
  background: #f6f8fb;
}

body[data-page="admin"] .payment-key-note strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

body[data-page="admin"] .payment-settings-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

body[data-page="admin"] .payment-settings-form input,
body[data-page="admin"] .payment-settings-form select,
body[data-page="admin"] .payment-settings-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

body[data-page="admin"] .payment-settings-form textarea {
  resize: vertical;
}

body[data-page="admin"] .payment-method-field small {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

body[data-page="admin"] .payment-switch-row {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

body[data-page="admin"] .payment-switch-row input {
  width: auto;
}

body[data-page="admin"] .payment-settings-actions,
body[data-page="admin"] .payment-settings-meta {
  grid-column: 1 / -1;
}

body[data-page="admin"] .payment-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-page="admin"] .payment-settings-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-page="admin"] .payment-settings-meta span {
  padding: 6px 8px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 12px;
}

.table-action-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

body[data-page="admin"] .policy-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="admin"] .system-function-block {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  background: #ffffff;
}

body[data-page="admin"] .system-function-block-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

body[data-page="admin"] .system-function-row {
  display: grid;
  align-items: end;
  gap: 12px;
  min-width: 0;
}

body[data-page="admin"] .system-function-row-cover {
  grid-template-columns: minmax(220px, 490px) minmax(0, 1fr);
}

body[data-page="admin"] .system-function-row-localization {
  grid-template-columns: minmax(180px, 1.05fr) minmax(170px, 1fr) minmax(170px, 1fr) auto minmax(220px, 1fr);
}

body[data-page="admin"] .system-function-row label {
  min-width: 0;
}

body[data-page="admin"] .system-function-row input,
body[data-page="admin"] .system-function-row select {
  width: 100%;
}

body[data-page="admin"] .system-function-row #scanResultLocalization {
  min-height: 40px;
  white-space: nowrap;
}

body[data-page="admin"] .system-function-row #resultLocalizationScanStatus {
  min-width: 0;
  padding-bottom: 9px;
  overflow: hidden;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="admin"] .navigation-menu-control-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

body[data-page="admin"] .navigation-menu-control-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(150px, auto) minmax(80px, auto) minmax(140px, auto);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}

body[data-page="admin"] .navigation-menu-control-row strong {
  min-width: 0;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.3;
}

body[data-page="admin"] .navigation-menu-visible {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

body[data-page="admin"] .navigation-menu-visible input {
  width: 16px;
  height: 16px;
}

body[data-page="admin"] .navigation-menu-role {
  display: grid;
  grid-template-columns: auto minmax(118px, 150px);
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

body[data-page="admin"] .navigation-menu-role select {
  width: 100%;
  min-width: 0;
}

body[data-page="admin"] .navigation-menu-sort {
  display: grid;
  grid-template-columns: auto minmax(72px, 90px);
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

body[data-page="admin"] .navigation-menu-sort input {
  width: 100%;
}

body[data-page="admin"] .policy-models {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

@media (max-width: 760px) {
  body[data-page="admin"] .api-settings-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="admin"] .api-model-category-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  body[data-page="admin"] .api-model-category-strip {
    width: 100%;
  }

  body[data-page="admin"] .system-function-row,
  body[data-page="admin"] .system-function-row-cover,
  body[data-page="admin"] .system-function-row-localization {
    grid-template-columns: 1fr;
  }

  body[data-page="admin"] .system-function-row #scanResultLocalization {
    width: 100%;
  }

  body[data-page="admin"] .system-function-row #resultLocalizationScanStatus {
    padding-bottom: 0;
    white-space: normal;
  }

  body[data-page="admin"] .navigation-menu-control-row {
    grid-template-columns: 1fr;
  }

  body[data-page="admin"] .api-model-whitelist-card {
    grid-column: span 1;
  }

  body[data-page="admin"] .model-whitelist-toolbar,
  body[data-page="admin"] .model-check > span,
  body[data-page="admin"] .api-channel-row summary,
  body[data-page="admin"] .api-channel-fields {
    grid-template-columns: 1fr;
  }

  body[data-page="admin"] .api-channel-actions,
  body[data-page="admin"] .api-channel-status {
    justify-self: start;
  }

  body[data-page="admin"] .api-form-head,
  body[data-page="admin"] .api-form-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  body[data-page="admin"] .model-whitelist-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  body[data-page="admin"] .token-admin-grid,
  body[data-page="admin"] .policy-form-grid {
    grid-template-columns: 1fr;
  }
}

.auth-page {
  min-height: 100vh;
  margin: 0;
  padding: 32px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(226, 27, 60, 0.16), transparent 28%),
    linear-gradient(135deg, #171e28, #070a0f);
}

body[data-page="login"]::before {
  display: none;
}

.auth-shell {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 420px;
  min-height: 580px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #ffffff;
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.26);
}

.auth-brand {
  display: grid;
  align-content: end;
  gap: 18px;
  padding: 48px;
  background:
    linear-gradient(180deg, rgba(9, 12, 18, 0.72), rgba(9, 12, 18, 0.98)),
    radial-gradient(circle at 28% 20%, rgba(226, 27, 60, 0.26), transparent 28%),
    #0b0f15;
  color: #ffffff;
}

.auth-brand img {
  width: 260px;
  height: 126px;
  object-fit: contain;
  object-position: left center;
}

.auth-brand.auth-brand-logo-only img.auth-home-logo {
  width: min(92%, 430px);
  height: auto;
  max-height: 260px;
  object-position: center;
}

.auth-brand span {
  color: #d7dce5;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-brand h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(40px, 5vw, 76px);
  font-weight: 950;
  line-height: 0.98;
  letter-spacing: 0;
}

.auth-brand p {
  max-width: 520px;
  margin: 0;
  color: #d7dce5;
  font-size: 14px;
  line-height: 1.7;
}

.auth-panel {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 42px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  min-height: 48px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--control-radius);
  background: #f6f3ee;
}

.auth-tabs button {
  min-width: 0 !important;
  min-height: 40px !important;
  height: 40px !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: calc(var(--control-radius) - 2px) !important;
  background: #ffffff !important;
  color: var(--text-secondary) !important;
  box-shadow: none !important;
  font-weight: 800 !important;
}

.auth-tabs button.is-active {
  background: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(226, 27, 60, 0.18) !important;
}

.auth-tabs button::after {
  content: none !important;
  display: none !important;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form.is-hidden {
  display: none;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 62px;
}

button.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  min-height: 28px;
  height: 28px;
  padding: 0 9px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  box-shadow: none;
  transform: translateY(-50%);
}

button.password-toggle:hover {
  background: #f6f3ee;
  color: var(--primary);
}

body[data-page="login"] .auth-page .password-field {
  position: relative;
  display: block;
}

body[data-page="login"] .auth-page .password-field input {
  width: 100%;
  padding-right: 54px;
}

body[data-page="login"] .auth-page button.password-toggle.icon-password-toggle {
  position: absolute !important;
  top: 1px !important;
  right: 1px !important;
  bottom: 1px !important;
  width: 46px !important;
  min-width: 46px !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 0 !important;
  border-left: 1px solid var(--border) !important;
  border-radius: 0 calc(var(--control-radius) - 1px) calc(var(--control-radius) - 1px) 0 !important;
  background: #ffffff !important;
  color: var(--text-secondary) !important;
  box-shadow: none !important;
  transform: none !important;
}

.sms-code-field > span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.sms-code-field button {
  min-height: var(--control-height);
  white-space: nowrap;
}

.remember-row .auth-inline-link {
  margin-left: auto;
  padding: 0;
  min-height: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  box-shadow: none;
}

@media (max-width: 520px) {
  .sms-code-field > span {
    grid-template-columns: 1fr;
  }
}

body[data-page="login"] .auth-page button.password-toggle.icon-password-toggle:hover,
body[data-page="login"] .auth-page button.password-toggle.icon-password-toggle:focus-visible {
  background: #f6f3ee !important;
  color: var(--primary) !important;
}

.remember-row {
  display: inline-flex;
  width: fit-content;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  margin-top: -4px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.remember-row input {
  margin: 0;
}

.gender-field {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.gender-field legend {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 850;
}

.gender-field label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.gender-field input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--primary);
}

.admin-member-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px;
  gap: 10px;
  margin-bottom: 12px;
}

#tokenAdjustUser {
  min-width: 150px;
}

body[data-page="admin"] #adminUserRows .member-level-select,
body[data-page="admin"] #adminUserRows .member-status-select {
  width: auto;
  min-width: 0;
  max-width: 12em;
  field-sizing: content;
  padding-inline: 14px 34px;
  text-align: left;
  white-space: nowrap;
}

body[data-page="admin"] #adminUserRows .member-status-select {
  max-width: 8em;
}

body[data-page="admin"] #admin-users .table-wrap table {
  min-width: 1180px;
}

body[data-page="admin"] #admin-users th:nth-child(2),
body[data-page="admin"] #admin-users td:nth-child(2) {
  width: 220px;
  min-width: 190px;
  max-width: 260px;
}

body[data-page="admin"] #admin-users th:nth-child(6),
body[data-page="admin"] #admin-users td:nth-child(6) {
  min-width: 150px;
  white-space: nowrap;
}

body[data-page="admin"] #adminUserRows td.member-contact-cell {
  max-width: 260px;
}

.member-contact-lines {
  min-width: 0;
  display: grid;
  gap: 3px;
  align-content: center;
}

.member-contact-lines strong,
.member-contact-lines span {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-contact-lines strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.member-contact-lines span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.25;
}

body[data-page="admin"] #adminUserRows td.member-token-cell {
  white-space: nowrap;
}

.member-action-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  white-space: nowrap;
}

.member-action-group > button {
  flex: 0 0 auto;
}

.member-ledger-trigger {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
  transition: color 180ms ease;
}

.member-ledger-trigger:hover,
.member-ledger-trigger:focus-visible {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.member-ledger-trigger:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 34%, transparent);
  outline-offset: 3px;
  border-radius: 4px;
}

.member-ledger-dialog {
  width: min(1040px, 94vw);
  max-height: min(88vh, calc(100dvh - 48px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.member-ledger-dialog::backdrop {
  background: rgba(48, 65, 86, 0.58);
}

.member-ledger-shell {
  display: flex;
  flex-direction: column;
  max-height: min(88vh, calc(100dvh - 48px));
}

.member-ledger-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.member-ledger-head strong {
  font-size: 16px;
  font-weight: 900;
}

.member-ledger-head span {
  color: var(--text-secondary);
  font-size: 12px;
}

.member-ledger-body {
  display: grid;
  gap: 14px;
  padding: 16px;
  overflow: auto;
}

.member-ledger-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.member-ledger-summary .metric-card {
  min-height: 82px;
  box-shadow: none;
}

.member-ledger-section {
  display: grid;
  gap: 8px;
}

.member-ledger-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.member-ledger-section-head strong {
  font-size: 14px;
  font-weight: 900;
}

.member-ledger-section-head span {
  color: var(--text-secondary);
  font-size: 12px;
}

.member-ledger-table-wrap {
  border-radius: 8px;
  box-shadow: none;
}

.member-ledger-table-wrap table {
  min-width: 760px;
}

.member-ledger-table-wrap th,
.member-ledger-table-wrap td {
  padding: 10px 12px;
}

.member-ledger-table-wrap th:first-child,
.member-ledger-table-wrap td:first-child,
.member-ledger-table-wrap th:nth-child(3),
.member-ledger-table-wrap td:nth-child(3),
.member-ledger-table-wrap th:nth-child(4),
.member-ledger-table-wrap td:nth-child(4) {
  white-space: nowrap;
}

.member-ledger-amount {
  font-weight: 900;
}

.member-ledger-amount.is-positive {
  color: #047857;
}

.member-ledger-amount.is-negative {
  color: var(--primary);
}

@media (max-width: 720px) {
  .member-ledger-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
  }

  .member-ledger-shell {
    max-height: calc(100dvh - 24px);
  }

  .member-ledger-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.member-edit-dialog {
  width: min(860px, 94vw);
  height: min(88vh, calc(100dvh - 48px));
  max-height: min(88vh, calc(100dvh - 48px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  overflow: hidden;
  box-shadow: 0 28px 84px rgba(13, 17, 24, 0.28);
}

.member-edit-dialog::backdrop {
  background: rgba(11, 15, 21, 0.62);
}

.member-edit-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

.member-edit-shell .dialog-head {
  align-items: flex-start;
  gap: 16px;
  background: #ffffff;
}

.member-edit-shell .dialog-head > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.member-edit-shell .dialog-head > .member-edit-head-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  white-space: nowrap;
}

.member-edit-shell .dialog-head button {
  flex: 0 0 auto;
  min-width: 64px;
  color: var(--text);
  background: #ffffff;
  border-color: #cfd5df;
  box-shadow: none;
}

.member-edit-shell .dialog-head button:hover {
  color: var(--primary);
  background: #fff7f8;
  border-color: color-mix(in srgb, var(--primary) 45%, #cfd5df);
}

.member-edit-shell .dialog-head .member-edit-head-actions button {
  min-width: 86px;
  justify-content: center;
  color: var(--danger);
  background: #ffffff;
  border-color: color-mix(in srgb, var(--danger) 42%, var(--border));
}

.member-edit-shell .dialog-head .member-edit-head-actions button:hover {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--danger) 62%, var(--border));
}

.member-edit-shell .dialog-head .member-edit-head-actions button.danger {
  color: #ffffff;
  background: var(--danger);
  border-color: var(--danger);
}

.member-edit-shell .dialog-head .member-edit-head-actions button.danger:hover {
  color: #ffffff;
  background: color-mix(in srgb, var(--danger) 88%, #000000);
  border-color: color-mix(in srgb, var(--danger) 88%, #000000);
}

.member-edit-shell .dialog-head .member-edit-head-actions button:disabled {
  color: #ffffff;
  background: #a8adb5;
  border-color: #a8adb5;
  opacity: 1;
}

.member-edit-shell .dialog-head span {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--text-muted);
  font-size: 12px;
}

.member-edit-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px 16px 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f6f3ee;
}

.member-edit-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.member-edit-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

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

.member-edit-grid label {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.member-edit-grid input,
.member-edit-grid select {
  width: 100%;
  min-width: 0;
}

.password-grid {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

body[data-page="admin"] .module-card strong,
body[data-page="admin"] .module-card span,
body[data-page="admin"] .module-card small {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body[data-page="admin"] #adminUserRows td:first-child {
  max-width: 260px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dialog-actions {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: #ffffff;
}

.member-edit-shell .dialog-actions button {
  min-width: 118px;
  box-shadow: none;
}

.member-edit-shell .dialog-actions button.ghost {
  color: var(--text);
  background: #ffffff;
  border-color: #cfd5df;
}

.member-edit-shell .dialog-actions button.ghost:hover {
  color: var(--primary);
  background: #fff7f8;
  border-color: color-mix(in srgb, var(--primary) 45%, #cfd5df);
}

.member-edit-shell #memberEditMessage {
  flex: 0 0 auto;
}

body[data-page="tasks"] .table-wrap th:nth-child(9),
body[data-page="tasks"] .table-wrap td:nth-child(9) {
  width: 148px;
}

.table-wrap td .button-group {
  width: auto;
  max-width: 100%;
  gap: 6px;
}

.table-wrap td .button-group button {
  min-width: max-content;
}

.status .logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  max-width: none;
  white-space: nowrap;
}

#memberEditMessage {
  margin: 0 16px 0;
}

.status button.logout-button,
button.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-height: 40px;
  min-width: 86px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 52%, var(--border));
  background: #ffffff;
  color: var(--primary);
  font-weight: 900;
  box-shadow: none;
  white-space: nowrap;
}

.status button.logout-button:hover,
button.logout-button:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

/* Commercial density corrections: unified page hero and desktop sidebar logo spacing. */
.page-head > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.page-head h1 {
  max-width: none;
  font-size: clamp(25px, 2.86vw, 47px);
  line-height: 1.05;
}

.page-head p {
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 901px) {
  :root {
    --sidebar-brand-width: 179px;
    --sidebar-width: 199px;
  }

  .sidebar {
    gap: 11px;
    padding: 20px 0 24px;
  }

  .brand {
    width: var(--sidebar-brand-width);
    max-width: var(--sidebar-brand-width);
    align-self: center;
    min-height: 64px;
    justify-content: center;
    padding-bottom: 4px;
  }

  .brand-logo-full {
    width: var(--sidebar-brand-width);
    max-width: var(--sidebar-brand-width);
    height: 59px;
  }

  nav {
    width: var(--sidebar-brand-width);
    max-width: var(--sidebar-brand-width);
    align-self: center;
    padding-top: 2px;
  }

  nav a {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .page-head h1 {
    font-size: 26px;
  }

  .page-head p {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .auth-page {
    padding: 14px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand,
  .auth-panel {
    padding: 26px;
  }

  .admin-member-toolbar {
    grid-template-columns: 1fr;
  }

  .member-edit-grid,
  .password-grid {
    grid-template-columns: 1fr;
  }

  .member-edit-dialog {
    width: min(92vw, 860px);
    height: min(88vh, calc(100dvh - 32px));
    max-height: min(88vh, calc(100dvh - 32px));
  }

  .member-edit-shell .dialog-head {
    flex-wrap: wrap;
  }

  .member-edit-shell .dialog-head > div:first-child {
    flex: 1 1 0;
  }

  .member-edit-shell .dialog-head > .member-edit-head-actions {
    order: 3;
    flex: 1 1 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-left: 0;
  }

  .member-edit-shell .dialog-head .member-edit-head-actions button {
    flex: 1 1 118px;
  }

  .member-edit-body {
    padding: 14px 16px 24px;
  }

  .member-edit-shell .dialog-actions {
    display: flex;
    justify-content: stretch;
    padding: 12px 16px;
  }

  .member-edit-shell .dialog-actions button {
    flex: 1 1 128px;
  }
}

/* Account page commercial layout: editable profile and security panels. */
body[data-page="account"] .account-layout {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "profile"
    "security";
  align-items: start;
  gap: 16px;
  margin-top: 16px;
}

body[data-page="account"] .account-layout > * {
  min-width: 0;
}

body[data-page="account"] .account-profile-panel {
  grid-area: profile;
}

body[data-page="account"] .account-security-panel {
  grid-area: security;
}

body[data-page="account"] .account-profile-panel,
body[data-page="account"] .account-security-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body[data-page="account"] #profileMessage {
  min-height: 22px;
  margin-top: 10px;
}

body[data-page="account"] .profile-edit-form,
body[data-page="account"] .profile-password-form {
  margin-top: 14px;
  padding-top: 0;
  border-top: 0;
}

body[data-page="account"] .profile-avatar-editor {
  grid-template-columns: 72px minmax(0, 1fr);
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 78%, var(--canvas));
}

body[data-page="account"] #profileAvatarPreview {
  width: 72px;
  height: 72px;
}

body[data-page="account"] .avatar-actions {
  justify-content: flex-start;
}

body[data-page="account"] .avatar-upload-button,
body[data-page="account"] #resetDefaultAvatar {
  min-width: 118px;
  height: 40px;
  white-space: nowrap;
}

body[data-page="account"] .profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

body[data-page="account"] .profile-form-sections {
  display: grid;
  gap: 16px;
  min-width: 0;
}

body[data-page="account"] .profile-form-section {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 86%, var(--canvas));
}

body[data-page="account"] .profile-form-section .subsection-title {
  margin: 0;
}

body[data-page="account"] .profile-form-section input[readonly] {
  background: #f7f8fa;
  color: var(--text-secondary);
  cursor: not-allowed;
}

body[data-page="account"] .profile-form-grid-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-page="account"] .profile-wide-field {
  grid-column: 1 / -1;
}

body[data-page="account"] textarea#profileBio {
  min-height: 84px;
  resize: vertical;
}

body[data-page="account"] .profile-gender-field {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

body[data-page="account"] .form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

body[data-page="account"] .form-actions button {
  min-width: 150px;
}

body[data-page="account"] .account-security-panel .profile-password-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px;
}

body[data-page="account"] .account-security-panel button {
  min-width: 120px;
  width: auto;
}

body[data-page="account"] main > .panel {
  margin-top: 16px;
}

body[data-page="account"] main > .panel .section-head {
  margin-bottom: 12px;
}

@media (max-width: 1280px) {
  body[data-page="account"] .account-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "profile"
      "security";
  }

  body[data-page="account"] .account-security-panel .profile-password-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body[data-page="account"] .account-security-panel button {
    width: 100%;
  }
}

@media (max-width: 1080px) {
  body[data-page="account"] .account-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "profile"
      "security";
  }
}

@media (max-width: 720px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .topbar,
  .page-head,
  .page-head > div:first-child,
  .status,
  .status span,
  .recharge-link {
    min-width: 0;
    max-width: 100%;
  }

  .topbar {
    overflow: hidden;
  }

  .topbar strong,
  .page-head p {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  nav {
    max-width: 100vw;
    overflow-x: auto;
    overflow-y: hidden;
  }

  main {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .table-wrap {
    max-width: 100%;
  }

  body[data-page="account"] .profile-form-grid,
  body[data-page="account"] .profile-gender-field,
  body[data-page="account"] .account-security-panel .profile-password-form {
    grid-template-columns: 1fr;
  }

  body[data-page="account"] .profile-avatar-editor {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  body[data-page="account"] #profileAvatarPreview {
    width: 64px;
    height: 64px;
  }

  body[data-page="account"] .avatar-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  body[data-page="account"] .avatar-upload-button,
  body[data-page="account"] #resetDefaultAvatar,
  body[data-page="account"] .form-actions button {
    width: 100%;
  }
}

/* Top account entry: natural greeting with a focused dropdown, no framed profile box. */
.topbar .status #userEmailPill {
  display: block;
  width: auto;
  min-width: 0;
  max-width: none;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  line-height: normal;
  box-shadow: none;
}

.topbar .status #userEmailPill:hover {
  background: transparent;
}

.account-menu-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.account-shortcut,
.status button.account-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: auto;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #12151b;
  font: inherit;
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
}

.account-shortcut::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(225, 20, 58, 0.1);
}

.account-shortcut:hover,
.status button.account-shortcut:hover,
.account-menu-shell.is-open .account-shortcut {
  color: var(--primary);
  background: transparent;
}

.account-shortcut img {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  object-fit: cover;
  background: #eef1f5;
  border: 1px solid #d9dde5;
  display: block;
}

.account-shortcut-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  max-width: 142px;
}

.account-shortcut-copy strong {
  min-width: 0;
  max-width: 142px;
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-shortcut-copy em {
  min-width: 0;
  max-width: 142px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-chevron {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.62;
}

.account-menu-shell.is-open .account-menu-chevron {
  transform: rotate(225deg) translate(-2px, -1px);
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1200;
  width: min(320px, calc(100vw - 40px));
  padding: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 0 22px 54px rgba(17, 24, 39, 0.18);
}

.account-dropdown[hidden] {
  display: none;
}

.account-dropdown::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 28px;
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  background: #ffffff;
  transform: rotate(45deg);
}

.account-dropdown-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 12px;
  border-bottom: 1px solid var(--border);
}

.account-dropdown-head img {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #eef1f5;
}

.account-dropdown-head div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.account-dropdown-head strong,
.account-dropdown-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-dropdown-head strong {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 900;
}

.account-dropdown-head span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
}

.account-dropdown-list {
  display: grid;
  gap: 2px;
  padding: 8px 0 6px;
}

.account-dropdown-list a,
.account-menu-logout {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 46px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.account-dropdown-list a:hover,
.account-menu-logout:hover {
  background: rgba(225, 20, 58, 0.06);
  color: var(--primary);
}

.account-dropdown-list a strong {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.account-dropdown-list a span {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
}

.account-dropdown-wallet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 8px;
  padding: 9px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.account-dropdown-wallet div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.account-dropdown-wallet strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.account-dropdown-wallet span {
  min-width: 0;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-dropdown-wallet a {
  min-height: 28px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.account-dropdown-wallet a:hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
  color: #fff;
}

.account-menu-logout {
  min-height: 42px;
  margin-top: 2px;
  border-top: 1px solid var(--border);
  color: var(--danger);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

@media (max-width: 760px) {
  .account-shortcut-copy em {
    display: none;
  }

  .account-shortcut-copy,
  .account-shortcut-copy strong {
    max-width: 112px;
  }

  .account-dropdown {
    right: -8px;
  }
}

/* Commercial layout stabilization: remove hard squeezes and account-page dead space. */
.topbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) max-content;
  align-items: center;
  gap: 16px;
  height: auto;
  min-height: 76px;
  padding: 12px 20px;
  overflow: visible;
}

.topbar > div:first-child {
  min-width: 0;
}

.topbar strong {
  min-width: 0;
  line-height: 1.25;
}

#runtimePill {
  display: block;
  max-width: min(760px, 52vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
}

.status {
  min-width: 0;
  height: auto;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.status span,
.status a,
.status button {
  flex: 0 0 auto;
  height: 38px;
  max-width: none;
  min-height: 38px;
  padding: 0 12px;
  line-height: 38px;
}

#tokenPill {
  min-width: 136px;
}

#balancePill {
  min-width: 88px;
}

#taskPill,
#noticePill {
  min-width: 64px;
}

#userEmailPill {
  min-width: 88px;
  max-width: 190px;
  overflow: hidden;
}

.account-shortcut {
  width: 100%;
  padding: 0 10px;
}

.account-shortcut span {
  max-width: 118px;
}

@media (max-width: 1320px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: start;
  }

  #runtimePill {
    max-width: 100%;
  }

  .status {
    justify-content: flex-start;
  }
}

body[data-page="account"] .account-layout {
  grid-template-columns: 1fr;
  grid-template-areas:
    "profile"
    "security";
  align-items: stretch;
  gap: 16px;
}

body[data-page="account"] .account-layout > * {
  align-self: stretch;
}

body[data-page="account"] .account-profile-panel .section-head,
body[data-page="account"] .account-security-panel .section-head {
  margin-bottom: 12px;
}

body[data-page="account"] .account-security-panel {
  justify-content: start;
}

body[data-page="account"] .account-profile-panel .profile-edit-form {
  display: grid;
  grid-template-columns: minmax(270px, 340px) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  margin-top: 14px;
}

body[data-page="account"] .profile-avatar-editor {
  align-self: stretch;
  grid-template-columns: 96px minmax(0, 1fr);
  margin: 0;
}

body[data-page="account"] .profile-form-grid {
  align-items: start;
  margin: 0;
}

body[data-page="account"] .profile-gender-field {
  min-height: 58px;
  align-items: center;
}

body[data-page="account"] .form-actions {
  grid-column: 1 / -1;
  align-self: end;
  margin-top: 0;
}

body[data-page="account"] .form-actions button {
  width: 100%;
  min-width: 150px;
}

body[data-page="account"] #profileAvatarInput {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

body[data-page="account"] .account-profile-panel #profileAvatarPreview {
  width: 96px;
  height: 96px;
}

body[data-page="account"] .account-security-panel .profile-password-form {
  grid-template-columns: repeat(3, minmax(120px, 1fr)) 120px;
}

body[data-page="account"] .account-security-panel button {
  min-width: 120px;
}

body[data-page="account"] .account-layout {
  grid-template-columns: 1fr;
  grid-template-areas:
    "profile"
    "security";
}

body[data-page="redeem-codes"] .account-redeem-panel {
  margin-bottom: 16px;
  padding-top: 10px;
  padding-bottom: 10px;
}

body[data-page="account"] .account-xcoin-card,
body[data-page="redeem-codes"] .account-recharge-panel {
  margin-bottom: 20px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.account-xcoin-card .section-head {
  align-items: center;
}

.account-xcoin-card .button-group {
  justify-content: flex-end;
}

.account-xcoin-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.account-xcoin-primary:hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
  color: #fff;
}

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

.account-xcoin-grid span {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.account-xcoin-grid strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recharge-package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

body[data-page="redeem-codes"] .account-recharge-panel .recharge-package-grid {
  margin-top: 16px;
}

.recharge-package {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: #fff;
}

.recharge-package.is-recommended {
  border-color: var(--border-light);
  background: #f7fbff;
}

.recharge-package-head {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}

.recharge-package-name {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recharge-package-head span {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ecf5ff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.recharge-price {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
}

.recharge-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  padding-right: 46px;
  white-space: nowrap;
}

.recharge-coins {
  flex: 0 0 auto;
  color: var(--text-regular);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.recharge-package-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.recharge-package button {
  width: auto;
  min-width: 0;
  min-height: 0;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text-regular);
  font-size: 10px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
}

.recharge-package button:hover {
  border-color: #c6e2ff;
  background: var(--surface-soft);
  color: var(--primary);
}

.recharge-package button:focus-visible {
  outline: 2px solid rgba(226, 27, 60, 0.22);
  outline-offset: 2px;
}

.recharge-package button.ghost[data-recharge-package] {
  min-height: 0;
  padding: 4px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
}

.recharge-orders-title {
  margin: 16px 0 10px;
}

body[data-page="redeem-codes"] .redeem-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 140px;
  align-items: stretch;
  gap: 12px;
  margin-top: 12px;
}

body[data-page="redeem-codes"] #redeemMessage {
  min-height: 22px;
  margin-top: 10px;
}

body[data-page="redeem-codes"] #rechargeMessage:empty,
body[data-page="redeem-codes"] #redeemMessage:empty {
  display: none;
  min-height: 0;
  margin-top: 0;
}

body[data-page="redeem-codes"] .collapsible-data-panel {
  overflow: hidden;
}

body[data-page="redeem-codes"] .collapsible-data-panel .section-head {
  align-items: center;
  margin-bottom: 0;
}

body[data-page="redeem-codes"] .collapsible-data-panel.is-expanded .section-head {
  margin-bottom: 16px;
}

body[data-page="redeem-codes"] .data-panel-toggle {
  flex: 0 0 auto;
  min-width: 132px;
  padding-inline: 14px;
  white-space: nowrap;
}

body[data-page="redeem-codes"] .data-panel-toolbar {
  justify-content: flex-end;
  margin-bottom: 12px;
}

body[data-page="redeem-codes"] .data-panel-toolbar .toolbar-input {
  min-width: 280px;
}

body[data-page="redeem-codes"] .data-panel-toolbar .toolbar-select {
  width: 150px;
}

.token-transaction-toolbar {
  gap: 8px;
}

.token-transaction-keyword {
  max-width: 320px;
}

.token-transaction-date {
  min-width: 128px !important;
  width: 128px;
}

.token-transaction-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.token-transaction-amount {
  font-weight: 700;
  white-space: nowrap;
}

.token-transaction-amount.is-positive {
  color: #0f8f4f;
}

.token-transaction-amount.is-negative {
  color: #b42318;
}

.token-transaction-amount.is-neutral {
  color: var(--muted);
}

body[data-page="redeem-codes"] .collapsible-panel-body[hidden] {
  display: none !important;
}

.topbar .status {
  width: auto;
  flex-wrap: nowrap;
  overflow: visible;
}

.topbar .status > #tokenPill,
.topbar .status > #balancePill,
.topbar .status > #taskPill,
.topbar .status > #noticePill,
.topbar .status > .recharge-link {
  display: none !important;
}

.redeem-status-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(132px, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.redeem-status-board span,
.redeem-status-board .recharge-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}

.redeem-status-board #tokenPill,
.redeem-status-board .recharge-link {
  color: var(--primary);
}

.redeem-status-board #balancePill {
  color: var(--success);
}

.redeem-status-board #noticePill {
  color: var(--danger);
}

.redeem-status-board .recharge-link:hover {
  background: rgba(225, 20, 58, 0.06);
}

@media (max-width: 1280px) {
  body[data-page="account"] .account-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "profile"
      "security";
  }

  body[data-page="account"] .account-profile-panel .profile-edit-form {
    grid-template-columns: 1fr;
  }

  body[data-page="account"] .form-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  body[data-page="account"] .form-actions button {
    width: auto;
  }
}

@media (max-width: 1080px) {
  body[data-page="account"] .account-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "profile"
      "security";
  }

  body[data-page="account"] .account-security-panel .profile-password-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body[data-page="account"] .account-security-panel button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .topbar {
    gap: 12px;
    padding: 14px;
  }

  .status {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: auto;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .status span,
  .status a,
  .status button,
  #tokenPill,
  #balancePill,
  #taskPill,
  #noticePill,
  #userEmailPill {
    width: auto;
    min-width: max-content;
    max-width: 100%;
  }

  #userEmailPill,
  .recharge-link,
  .status button {
    grid-column: auto;
    flex: 0 0 auto;
  }

  .redeem-status-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .redeem-status-board .recharge-link {
    grid-column: 1 / -1;
  }

  body[data-page="redeem-codes"] .collapsible-data-panel .section-head {
    align-items: stretch;
  }

  body[data-page="redeem-codes"] .data-panel-toggle {
    width: 100%;
    min-width: 0;
  }

  body[data-page="redeem-codes"] .data-panel-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  body[data-page="redeem-codes"] .data-panel-toolbar .toolbar-input,
  body[data-page="redeem-codes"] .data-panel-toolbar .toolbar-select {
    width: 100%;
    min-width: 0;
  }

  body[data-page="redeem-codes"] .redeem-form,
  body[data-page="account"] .account-profile-panel .profile-edit-form,
  body[data-page="account"] .profile-form-grid,
  body[data-page="account"] .profile-form-grid-wide,
  body[data-page="account"] .profile-gender-field,
  body[data-page="account"] .account-security-panel .profile-password-form {
    grid-template-columns: 1fr;
  }

  body[data-page="account"] .profile-form-section {
    padding: 12px;
  }

  body[data-page="account"] .profile-avatar-editor {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  body[data-page="account"] .account-profile-panel #profileAvatarPreview {
    width: 72px;
    height: 72px;
  }

  body[data-page="account"] .form-actions button {
    width: 100%;
  }
}

/* Mobile shell QA stabilization: keep status text inside the appbar and keep hidden autocomplete fields non-interactive. */
body[data-shell="mobile"] .mobile-appbar {
  min-width: 0;
  overflow: hidden;
}

body[data-shell="mobile"] .mobile-user {
  flex: 1 1 auto;
  min-width: 0;
}

body[data-shell="mobile"] .mobile-runtime {
  flex: 0 1 auto;
  max-width: min(44vw, 168px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-shell="mobile"] .mobile-bottom-nav {
  overflow: hidden;
}

body[data-shell="mobile"] .mobile-bottom-nav nav {
  display: flex;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

body[data-shell="mobile"] .mobile-bottom-nav a {
  flex: 0 0 58px;
  width: 58px;
  scroll-snap-align: start;
}

body[data-page="account"] .account-profile-panel .profile-edit-form {
  align-items: start;
}

body[data-page="account"] .account-profile-panel .profile-avatar-editor {
  align-self: start;
  height: auto;
}

body[data-shell="mobile"] input.visually-hidden,
body[data-shell="mobile"] .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  min-height: 1px !important;
  max-width: 1px !important;
  max-height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"] .mobile-compat-node {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  min-height: 1px !important;
  max-width: 1px !important;
  max-height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

/* Final account menu overrides after legacy header stabilization rules. */
.topbar .status #userEmailPill {
  min-width: 0;
  max-width: none;
  overflow: visible;
  border: 0;
  background: transparent;
}

.topbar .status #userEmailPill::before {
  display: none;
}

.topbar .status .account-shortcut {
  width: auto;
  padding: 0 2px;
  border: 0;
  background: transparent;
}

.topbar .status .account-shortcut span {
  max-width: none;
}

.topbar .status .account-shortcut-copy,
.topbar .status .account-shortcut-copy strong,
.topbar .status .account-shortcut-copy em {
  max-width: 142px;
}

.topbar .status .account-dropdown {
  line-height: normal;
}

.topbar .account-menu-shell strong,
.topbar .account-menu-shell span,
.topbar .account-menu-shell em {
  text-transform: none;
}

.topbar .account-menu-shell strong::before {
  display: none;
  content: none;
}

.topbar .status .account-dropdown-head span,
.topbar .status .account-dropdown-list a span {
  display: block;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 1.25;
}

.topbar .status .account-dropdown-list a,
.topbar .status .account-menu-logout {
  display: grid;
  width: 100%;
  max-width: none;
  min-height: 46px;
  height: auto;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  line-height: 1.2;
  box-shadow: none;
}

.topbar .status .account-menu-logout {
  min-height: 42px;
  border-top: 1px solid var(--border);
  color: var(--danger);
}

/* Final softened frame system: keep the product sharp, but remove harsh square corners. */
:root {
  --radius: 8px;
  --module-radius: 8px;
  --control-radius: 6px;
}

.topbar,
.page-head,
.metric-card,
.panel,
.module-card,
.support-card,
.help-steps article,
.asset-card,
.result-card,
.template-card,
.queue-lane,
.queue-item,
.profile-box,
.security-box,
.workspace-shell,
.ops-strip,
.sidebar-panel,
.redeem-status-board span,
.redeem-status-board .recharge-link,
.account-dropdown {
  border-radius: var(--module-radius);
}

.page-head {
  border-bottom: 1px solid #0b111a;
}

.page-head::after {
  border-radius: 0 0 var(--module-radius) var(--module-radius);
  overflow: hidden;
}

button,
.ghost-link,
.recharge-link,
.avatar-upload-button,
input,
select,
textarea,
.toolbar-input,
.toolbar-select,
.data-panel-toggle,
.auth-tabs button,
button.password-toggle,
.status span,
.redeem-status-board span,
.redeem-status-board .recharge-link {
  border-radius: var(--control-radius);
}

button.icon,
.icon-button,
.account-shortcut img,
.account-dropdown-head img,
.profile-avatar-row img,
#profileAvatarPreview,
.mobile-user img {
  border-radius: 50%;
}

.account-shortcut,
.topbar .status .account-shortcut {
  border-radius: var(--control-radius);
}

/* MuMu/WebView mobile QA fixes: the /m/ shell uses a compact native-phone frame without changing shared business DOM. */
body[data-shell="mobile"] {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body[data-shell="mobile"]::before {
  display: none;
}

body[data-shell="mobile"] main {
  margin-left: 0;
  max-width: 100vw;
  overflow-x: hidden;
}

body[data-shell="mobile"] .mobile-appbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  min-height: 60px;
}

body[data-shell="mobile"] .mobile-user strong,
body[data-shell="mobile"] .mobile-user span {
  max-width: none;
}

body[data-shell="mobile"] .mobile-runtime {
  max-width: 92px;
  min-width: 76px;
  white-space: nowrap;
}

body[data-shell="mobile"] .mobile-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-shell="mobile"] .mobile-kpi-grid article {
  min-height: 56px;
}

body[data-shell="mobile"] .mobile-kpi-grid span {
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-shell="mobile"] .mobile-bottom-nav {
  overscroll-behavior-x: none;
}

body[data-shell="mobile"] .mobile-bottom-nav nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: visible;
  overflow-y: hidden;
  overscroll-behavior-x: none;
  scroll-snap-type: none;
  -webkit-overflow-scrolling: auto;
  align-items: stretch;
}

body[data-shell="mobile"] .mobile-bottom-nav nav > a,
body[data-shell="mobile"] .mobile-bottom-nav nav > .mobile-more-menu {
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 58px;
  align-self: stretch;
  justify-self: stretch;
  scroll-snap-align: none;
}

body[data-shell="mobile"] .mobile-bottom-nav nav > a {
  flex: 0 1 auto;
}

body[data-shell="mobile"] .mobile-more-trigger {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

body[data-shell="mobile"] .mobile-bottom-nav a.is-hidden {
  display: none;
}

body[data-shell="mobile"] .mobile-bottom-nav a svg {
  flex: 0 0 auto;
}

body[data-shell="mobile"] .inline-check {
  width: 100%;
  min-height: 44px;
  justify-content: flex-start;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: #ffffff;
}

body[data-shell="mobile"] .inline-check input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
}

body[data-shell="mobile"] .inline-check,
body[data-shell="mobile"] .inline-check * {
  white-space: nowrap;
}

/* Mobile density pass: list pages and parameter forms must scan like an app, not like stacked desktop cards. */
body[data-shell="mobile"][data-page="results"] main > .panel,
body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel {
  padding: 12px;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel {
  padding: 0;
  overflow: hidden;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel .section-head {
  min-height: 52px;
  padding: 0 12px;
  align-items: center;
  cursor: pointer;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel .section-head::after {
  content: "+";
  margin-left: auto;
  color: var(--primary);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel .section-head span,
body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel form,
body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel #assetMessage {
  display: none;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel.mobile-expanded {
  padding: 12px;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel.mobile-expanded .section-head {
  min-height: auto;
  padding: 0 0 8px;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel.mobile-expanded .section-head::after {
  content: "-";
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel.mobile-expanded form,
body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel.mobile-expanded #assetMessage {
  display: grid;
}

body[data-shell="mobile"][data-page="results"] .result-grid,
body[data-shell="mobile"][data-page="assets"] .asset-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

body[data-shell="mobile"][data-page="results"] .result-card,
body[data-shell="mobile"][data-page="assets"] .asset-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: stretch;
  gap: 0;
  min-height: 132px;
  overflow: hidden;
  border-radius: 8px;
}

body[data-shell="mobile"][data-page="results"] .result-card img,
body[data-shell="mobile"][data-page="assets"] .asset-card img {
  grid-row: 1 / 3;
  width: 112px;
  height: 100%;
  min-height: 132px;
  aspect-ratio: auto;
  object-fit: cover;
}

body[data-shell="mobile"][data-page="results"] .result-card::before {
  top: 7px;
  left: 7px;
  min-height: 20px;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 10px;
}

body[data-shell="mobile"][data-page="results"] .result-body,
body[data-shell="mobile"][data-page="assets"] .asset-card-body {
  min-width: 0;
  gap: 4px;
  padding: 10px 10px 6px;
}

body[data-shell="mobile"][data-page="results"] .result-body strong,
body[data-shell="mobile"][data-page="assets"] .asset-card-body strong {
  font-size: 14px;
  line-height: 1.2;
}

body[data-shell="mobile"][data-page="results"] .result-body span,
body[data-shell="mobile"][data-page="results"] .result-body p,
body[data-shell="mobile"][data-page="assets"] .asset-card-body small {
  font-size: 11px;
  line-height: 1.35;
}

body[data-shell="mobile"][data-page="results"] .result-body p {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-shell="mobile"][data-page="assets"] .tag-row {
  display: none;
}

body[data-shell="mobile"][data-page="results"] .card-actions,
body[data-shell="mobile"][data-page="assets"] .card-actions {
  min-width: 0;
  align-self: end;
  gap: 5px;
  padding: 0 10px 10px;
}

body[data-shell="mobile"][data-page="results"] .card-actions {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

body[data-shell="mobile"][data-page="results"] .card-actions::-webkit-scrollbar {
  display: none;
}

body[data-shell="mobile"][data-page="assets"] .card-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

body[data-shell="mobile"][data-page="results"] .card-actions button,
body[data-shell="mobile"][data-page="assets"] .card-actions button {
  min-height: 34px;
  min-width: 54px;
  padding: 0 9px;
  font-size: 12px;
}

body[data-shell="mobile"][data-page="results"] .card-actions button {
  flex: 0 0 auto;
}

body[data-shell="mobile"][data-page="assets"] .card-actions button {
  width: 100%;
  min-width: 0;
  padding: 0 4px;
  font-size: 11px;
}

body[data-shell="mobile"][data-page="results"] .card-actions button.danger,
body[data-shell="mobile"][data-page="assets"] .card-actions button.danger {
  min-width: 0;
}

body[data-shell="mobile"][data-page="workflow"] .page-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 8px;
}

body[data-shell="mobile"][data-page="workflow"] .metric-card {
  min-height: 58px;
  grid-template-columns: 1fr;
  grid-template-areas:
    "label"
    "value";
  gap: 2px;
  padding: 8px 8px;
  border-radius: 8px;
}

body[data-shell="mobile"][data-page="workflow"] .metric-card::before,
body[data-shell="mobile"][data-page="workflow"] .metric-card::after {
  display: none;
}

body[data-shell="mobile"][data-page="workflow"] .metric-card span {
  font-size: 10px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-shell="mobile"][data-page="workflow"] .metric-card strong {
  font-size: 19px;
  line-height: 1;
}

body[data-shell="mobile"][data-page="workflow"] .metric-card small {
  display: none;
}

body[data-shell="mobile"] .workspace-shell {
  gap: 8px;
}

body[data-shell="mobile"][data-page="workflow"] .workspace-left .panel,
body[data-shell="mobile"][data-page="workflow"] .prompt-workbench {
  padding: 12px;
}

body[data-shell="mobile"][data-page="workflow"] .workspace-left .section-head,
body[data-shell="mobile"][data-page="workflow"] .prompt-workbench .section-head {
  gap: 6px;
}

body[data-shell="mobile"][data-page="workflow"] .workspace-left .section-head span,
body[data-shell="mobile"][data-page="workflow"] .prompt-workbench .section-head span {
  display: none;
}

body[data-shell="mobile"][data-page="workflow"] .asset-picker-toolbar {
  margin-bottom: 8px;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-asset-list {
  gap: 8px;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-asset-option {
  min-height: 62px;
  grid-template-columns: auto 50px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-asset-option img {
  width: 50px;
}

body[data-shell="mobile"][data-page="workflow"] .selected-asset {
  min-height: 74px;
  margin-top: 8px;
  padding: 10px;
}

body[data-shell="mobile"][data-page="workflow"] .selected-asset.is-empty {
  min-height: 54px;
}

body[data-shell="mobile"][data-page="workflow"] .prompt-list {
  gap: 8px;
}

body[data-shell="mobile"][data-page="workflow"] .prompt-group {
  gap: 6px;
}

body[data-shell="mobile"][data-page="workflow"] .prompt-child-list {
  gap: 6px;
  margin-left: 8px;
  padding-left: 8px;
}

body[data-shell="mobile"][data-page="workflow"] .prompt-card {
  gap: 8px;
  padding: 10px;
}

body[data-shell="mobile"][data-page="workflow"] .prompt-card textarea {
  min-height: 82px;
}

body[data-shell="mobile"][data-page="workflow"] .batch-prompt-summary {
  margin-top: 8px;
  padding: 10px;
}

body[data-shell="mobile"][data-page="workflow"] .batch-prompt-summary p {
  display: none;
}

body[data-shell="mobile"][data-page="workflow"] .batch-summary-metrics {
  gap: 6px;
}

body[data-shell="mobile"][data-page="workflow"] .batch-summary-metrics span {
  padding: 8px;
}

body[data-shell="mobile"][data-page="workflow"] .batch-summary-metrics small {
  font-size: 10px;
}

body[data-shell="mobile"][data-page="workflow"] .batch-summary-metrics strong {
  font-size: 16px;
}

body[data-shell="mobile"] .workspace-right .panel {
  display: grid;
  gap: 10px;
  padding: 12px;
}

body[data-shell="mobile"] .workspace-right .panel .section-head {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

body[data-shell="mobile"] .workspace-right .panel .section-head h2 {
  font-size: 16px;
}

body[data-shell="mobile"] .workspace-right .panel .form-stack {
  gap: 8px;
}

body[data-shell="mobile"] .workspace-right .panel .form-stack label {
  gap: 5px;
  font-size: 12px;
}

body[data-shell="mobile"] .workspace-right .panel select,
body[data-shell="mobile"] .workspace-right .panel input {
  min-height: 40px;
}

body[data-shell="mobile"] .workspace-right .toggle-list {
  gap: 6px;
  margin: 2px 0;
}

body[data-shell="mobile"] .workspace-right .toggle-list label {
  min-height: 36px;
  padding: 0 2px;
  font-size: 13px;
}

body[data-shell="mobile"] .workspace-right .toggle-list input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
}

body[data-shell="mobile"] .workspace-right .cost-box {
  gap: 4px;
  padding: 10px;
}

body[data-shell="mobile"] .workspace-right .cost-box strong {
  font-size: 20px;
}

body[data-shell="mobile"] .workspace-right .actions.vertical {
  gap: 6px;
}

body[data-shell="mobile"] .workspace-right #createTextTask {
  width: 100%;
  min-height: 42px;
}

/* Mobile nav preview inspired by the demo interaction model, adapted to IMGX colors. */
body[data-shell="mobile"] {
  --mobile-nav-height: 76px;
}

body[data-shell="mobile"] main {
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
}

body[data-shell="mobile"] .mobile-bottom-nav {
  inset: auto 8px 8px 8px;
  width: auto;
  height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
  padding: 6px 7px calc(6px + env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(23, 30, 40, 0.98), rgba(11, 15, 21, 0.98)),
    #101722;
  box-shadow:
    0 -18px 44px rgba(13, 17, 24, 0.28),
    0 8px 24px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

body[data-shell="mobile"] .mobile-bottom-nav nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  height: 100%;
  padding: 0;
}

body[data-shell="mobile"] .mobile-bottom-nav nav > a,
body[data-shell="mobile"] .mobile-bottom-nav nav > .mobile-more-menu {
  min-width: 0;
}

body[data-shell="mobile"] .mobile-bottom-nav nav > a {
  position: relative;
  min-height: 58px;
  padding: 7px 3px 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.12;
  box-shadow: none;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

body[data-shell="mobile"] .mobile-bottom-nav nav > a svg {
  width: 20px;
  height: 20px;
  margin-bottom: 4px;
  opacity: 0.92;
  stroke-width: 2;
}

body[data-shell="mobile"] .mobile-bottom-nav nav > a:active {
  transform: translateY(1px) scale(0.98);
}

body[data-shell="mobile"] .mobile-bottom-nav nav > a.active {
  background:
    linear-gradient(180deg, rgba(226, 27, 60, 0.34), rgba(226, 27, 60, 0.2)),
    rgba(226, 27, 60, 0.2);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(226, 27, 60, 0.22);
}

body[data-shell="mobile"] .mobile-bottom-nav nav > a.active::before {
  content: "";
  display: block;
  position: absolute;
  top: 6px;
  left: 50%;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
  transform: translateX(-50%);
}

body[data-shell="mobile"] .mobile-bottom-nav nav > a.active svg {
  color: #ffffff;
  opacity: 1;
}

body[data-shell="mobile"] .mobile-bottom-nav nav > a.is-hidden {
  display: none !important;
}

@media (max-width: 430px) {
  body[data-shell="mobile"] main {
    padding-inline: 10px;
  }

  body[data-shell="mobile"] .mobile-appbar {
    gap: 8px;
    padding: 9px 10px;
  }

  body[data-shell="mobile"] .mobile-user {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
  }

  body[data-shell="mobile"] .mobile-user img {
    width: 36px;
    height: 36px;
  }

  body[data-shell="mobile"] .mobile-kpi-grid {
    gap: 6px;
  }

  body[data-shell="mobile"] .mobile-kpi-grid article {
    padding-inline: 6px;
  }

  body[data-shell="mobile"] .mobile-kpi-grid span {
    font-size: 9px;
  }

  body[data-shell="mobile"] .mobile-kpi-grid strong {
    font-size: 15px;
  }

  body[data-shell="mobile"] .page-head {
    padding: 15px 14px;
  }
}

/* Mobile DEMO UX adaptation for IMGX: app-like flow, IMGX white/red/black palette only. */
body[data-shell="mobile"] {
  --mobile-surface: #ffffff;
  --mobile-canvas: #eef1f5;
  --mobile-soft: #f6f7f9;
  --mobile-ink: #12151b;
  --mobile-muted: #68717e;
  --mobile-line: #e4e7ec;
  --mobile-line-strong: #d8dde5;
  --mobile-accent: #e21b3c;
  --mobile-radius: 14px;
  --mobile-radius-sm: 10px;
  --mobile-shadow: 0 16px 34px rgba(13, 17, 24, 0.08);
  --mobile-shadow-soft: 0 8px 20px rgba(13, 17, 24, 0.06);
  --mobile-nav-height: 76px;
  width: 100%;
  max-width: 100vw;
  background:
    radial-gradient(circle at 50% -120px, rgba(226, 27, 60, 0.08), transparent 260px),
    linear-gradient(180deg, #f7f8fa 0%, var(--mobile-canvas) 100%);
  color: var(--mobile-ink);
  overflow-x: hidden;
}

body[data-shell="mobile"]::before,
body[data-shell="mobile"]::after {
  display: none;
  content: none;
}

body[data-shell="mobile"] main {
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  margin-left: 0;
  padding: calc(12px + env(safe-area-inset-top)) 12px calc(116px + env(safe-area-inset-bottom));
  overflow-x: hidden;
  background: transparent;
}

body[data-shell="mobile"] .topbar,
body[data-shell="mobile"] .tags-view,
body[data-shell="mobile"] .sidebar-panel,
body[data-shell="mobile"] .brand {
  display: none !important;
}

body[data-shell="mobile"] .mobile-appbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid rgba(228, 231, 236, 0.92);
  border-radius: var(--mobile-radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--mobile-shadow-soft);
  backdrop-filter: blur(12px);
}

body[data-shell="mobile"] .mobile-user {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body[data-shell="mobile"] .mobile-user img {
  width: 42px;
  height: 42px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  object-fit: cover;
  background: var(--mobile-soft);
  box-shadow: 0 0 0 1px var(--mobile-line), 0 6px 14px rgba(13, 17, 24, 0.08);
}

body[data-shell="mobile"] .mobile-user strong,
body[data-shell="mobile"] .mobile-user span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-shell="mobile"] .mobile-user strong {
  color: var(--mobile-ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
}

body[data-shell="mobile"] .mobile-user span {
  margin-top: 3px;
  color: var(--mobile-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

body[data-shell="mobile"] .mobile-user strong::before {
  content: "Hi, ";
  color: var(--primary);
}

body[data-shell="mobile"] .mobile-runtime {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  max-width: min(25vw, 96px);
  min-width: 82px;
  aspect-ratio: 762 / 240;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  box-shadow: none;
}

body[data-shell="mobile"] .mobile-runtime.is-disabled {
  background: transparent;
  color: #ffffff;
}

body[data-shell="mobile"] .mobile-runtime-banner {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 0;
}

body[data-shell="mobile"] .mobile-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 10px;
}

body[data-shell="mobile"] .mobile-kpi-grid article {
  min-width: 0;
  min-height: 64px;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: 5px;
  padding: 10px 8px;
  border: 1px solid var(--mobile-line);
  border-radius: 12px;
  background: var(--mobile-surface);
  box-shadow: var(--mobile-shadow-soft);
}

body[data-shell="mobile"] .mobile-kpi-grid span {
  display: block;
  width: 100%;
  color: var(--mobile-muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-shell="mobile"] .mobile-kpi-grid strong {
  display: block;
  width: 100%;
  color: var(--mobile-ink);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-shell="mobile"] .page-head {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: auto;
  margin: 0 0 10px;
  padding: 16px;
  overflow: hidden;
  border: 0;
  border-radius: var(--mobile-radius);
  background:
    linear-gradient(135deg, rgba(226, 27, 60, 0.18), rgba(226, 27, 60, 0) 46%),
    linear-gradient(180deg, #1b2430 0%, #101722 100%);
  box-shadow: 0 18px 38px rgba(13, 17, 24, 0.18);
}

body[data-shell="mobile"] .page-head::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  width: 54px;
  height: 3px;
  display: block;
  border-radius: 999px;
  background: var(--primary);
}

body[data-shell="mobile"] .page-head::after {
  display: none;
  content: none;
}

body[data-shell="mobile"] .page-head > div {
  position: relative;
  z-index: 1;
  min-width: 0;
}

body[data-shell="mobile"] .page-head .eyebrow {
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

body[data-shell="mobile"] .page-head h1 {
  margin: 6px 0 0;
  color: #ffffff;
  font-size: clamp(25px, 7vw, 34px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
}

body[data-shell="mobile"] .page-head p {
  max-width: none;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.48;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

body[data-shell="mobile"] .page-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  padding: 0;
}

body[data-shell="mobile"] .page-actions > * {
  width: 100%;
  min-width: 0;
}

body[data-shell="mobile"] .page-actions > :only-child,
body[data-shell="mobile"] .page-actions > :nth-child(3) {
  grid-column: 1 / -1;
}

body[data-shell="mobile"] .page-head .ghost-link,
body[data-shell="mobile"] .page-head button.ghost {
  min-height: 44px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  box-shadow: none;
}

body[data-shell="mobile"] .page-head .ghost-link:first-child,
body[data-shell="mobile"] .page-head button:first-child {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(226, 27, 60, 0.28);
}

body[data-shell="mobile"] .page-head .ghost-link:hover,
body[data-shell="mobile"] .page-head button.ghost:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

body[data-shell="mobile"] .metric-grid,
body[data-shell="mobile"] .workspace-shell,
body[data-shell="mobile"] .asset-layout,
body[data-shell="mobile"] .account-layout,
body[data-shell="mobile"] .support-grid,
body[data-shell="mobile"] .token-admin-grid,
body[data-shell="mobile"] .policy-form-grid,
body[data-shell="mobile"] .admin-module-grid,
body[data-shell="mobile"] .api-settings-grid,
body[data-shell="mobile"] .redeem-admin-form,
body[data-shell="mobile"] .profile-form-grid,
body[data-shell="mobile"] .profile-form-grid-wide,
body[data-shell="mobile"] .profile-password-form,
body[data-shell="mobile"] .redeem-form,
body[data-shell="mobile"] .form-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

body[data-shell="mobile"] .page-metrics {
  margin: 0 0 10px;
}

body[data-shell="mobile"] .page-metrics.metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body[data-shell="mobile"] .metric-card {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 13px 14px;
  border: 1px solid var(--mobile-line);
  border-radius: var(--mobile-radius);
  background: var(--mobile-surface);
  box-shadow: var(--mobile-shadow-soft);
}

body[data-shell="mobile"] .metric-card::before,
body[data-shell="mobile"] .metric-card::after {
  display: none !important;
  content: none !important;
}

body[data-shell="mobile"] .metric-card span {
  color: var(--mobile-muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-shell="mobile"] .metric-card strong {
  margin: 0;
  color: var(--mobile-ink);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

body[data-shell="mobile"] .metric-card small {
  margin: 0;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

body[data-shell="mobile"][data-page="workflow"] .page-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body[data-shell="mobile"][data-page="account"] .page-metrics,
body[data-shell="mobile"][data-page="admin"] .page-metrics,
body[data-shell="mobile"][data-page="redeem-codes"] .page-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-shell="mobile"][data-page="admin"] #adminKpis.page-metrics,
body[data-shell="mobile"][data-page="redeem-codes"] #adminKpis.page-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body[data-shell="mobile"][data-page="account"] .metric-card,
body[data-shell="mobile"][data-page="admin"] .metric-card,
body[data-shell="mobile"][data-page="redeem-codes"] .metric-card {
  min-height: 82px;
  padding: 11px 12px;
}

body[data-shell="mobile"][data-page="account"] .metric-card strong,
body[data-shell="mobile"][data-page="admin"] .metric-card strong,
body[data-shell="mobile"][data-page="redeem-codes"] .metric-card strong {
  font-size: clamp(20px, 6vw, 24px);
}

body[data-shell="mobile"][data-page="account"] .metric-card small,
body[data-shell="mobile"][data-page="admin"] .metric-card small,
body[data-shell="mobile"][data-page="redeem-codes"] .metric-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-shell="mobile"][data-page="workflow"] .metric-card {
  min-height: 66px;
  padding: 10px;
}

body[data-shell="mobile"][data-page="workflow"] .metric-card strong {
  font-size: 20px;
}

body[data-shell="mobile"][data-page="workflow"] .metric-card small {
  display: none;
}

body[data-shell="mobile"] .panel,
body[data-shell="mobile"] .module-card,
body[data-shell="mobile"] .support-card,
body[data-shell="mobile"] .help-steps article,
body[data-shell="mobile"] .asset-card,
body[data-shell="mobile"] .result-card,
body[data-shell="mobile"] .template-card,
body[data-shell="mobile"] .queue-lane,
body[data-shell="mobile"] .queue-item,
body[data-shell="mobile"] .profile-box,
body[data-shell="mobile"] .security-box,
body[data-shell="mobile"] .ops-strip,
body[data-shell="mobile"] .redeem-status-board span,
body[data-shell="mobile"] .redeem-status-board .recharge-link,
body[data-shell="mobile"] .profile-form-section,
body[data-shell="mobile"] .batch-prompt-summary,
body[data-shell="mobile"] .batch-summary-metrics span,
body[data-shell="mobile"] .cost-box,
body[data-shell="mobile"] .empty-state {
  border: 1px solid var(--mobile-line);
  border-radius: var(--mobile-radius);
  background: var(--mobile-surface);
  box-shadow: var(--mobile-shadow-soft);
}

body[data-shell="mobile"] .panel {
  margin: 0 0 10px;
  padding: 14px;
}

body[data-shell="mobile"] .panel.tight {
  padding: 14px;
}

body[data-shell="mobile"] main > .panel {
  margin-top: 0;
}

body[data-shell="mobile"] .section-head {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin: 0 0 12px;
}

body[data-shell="mobile"] .section-head > div {
  min-width: 0;
}

body[data-shell="mobile"] .section-head h2 {
  margin: 0;
  color: var(--mobile-ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
}

body[data-shell="mobile"] .section-head span,
body[data-shell="mobile"] .summary-line {
  margin-top: 3px;
  color: var(--mobile-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

body[data-shell="mobile"] label {
  min-width: 0;
  color: #3d4652;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

body[data-shell="mobile"] input,
body[data-shell="mobile"] select,
body[data-shell="mobile"] textarea,
body[data-shell="mobile"] .toolbar-input,
body[data-shell="mobile"] .toolbar-select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--mobile-line);
  border-radius: var(--mobile-radius-sm);
  background: #ffffff;
  color: var(--mobile-ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  box-shadow: inset 0 1px 0 rgba(13, 17, 24, 0.02);
}

body[data-shell="mobile"] textarea {
  min-height: 116px;
  resize: vertical;
}

body[data-shell="mobile"] input:focus,
body[data-shell="mobile"] select:focus,
body[data-shell="mobile"] textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(226, 27, 60, 0.12);
}

body[data-shell="mobile"] input::placeholder,
body[data-shell="mobile"] textarea::placeholder {
  color: #9aa2ad;
}

body[data-shell="mobile"] input[type="checkbox"],
body[data-shell="mobile"] input[type="radio"] {
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  accent-color: var(--primary);
}

body[data-shell="mobile"] button,
body[data-shell="mobile"] .ghost-link,
body[data-shell="mobile"] .avatar-upload-button,
body[data-shell="mobile"] .recharge-link {
  min-height: 46px;
  border-radius: var(--mobile-radius-sm);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

body[data-shell="mobile"] button,
body[data-shell="mobile"] button.secondary,
body[data-shell="mobile"] .ghost-link {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(226, 27, 60, 0.22);
}

body[data-shell="mobile"] button:hover,
body[data-shell="mobile"] button.secondary:hover,
body[data-shell="mobile"] .ghost-link:hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
  color: #ffffff;
}

body[data-shell="mobile"][data-page="login"] .auth-tabs {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--mobile-line);
  border-radius: var(--mobile-radius-sm);
  background: #ffffff;
  box-shadow: none;
}

body[data-shell="mobile"][data-page="login"] .auth-tabs button {
  min-width: 0;
  min-height: 40px !important;
  height: 40px;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: calc(var(--mobile-radius-sm) - 3px) !important;
  background: transparent !important;
  color: var(--mobile-muted) !important;
  box-shadow: none !important;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

body[data-shell="mobile"][data-page="login"] .auth-tabs button:hover,
body[data-shell="mobile"][data-page="login"] .auth-tabs button:focus-visible {
  background: #fff7f8 !important;
  color: var(--primary) !important;
  outline: none;
}

body[data-shell="mobile"][data-page="login"] .auth-tabs button.is-active {
  background: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(226, 27, 60, 0.18) !important;
}

body[data-shell="mobile"][data-page="login"] .auth-tabs button.is-active:hover,
body[data-shell="mobile"][data-page="login"] .auth-tabs button.is-active:focus-visible {
  background: var(--primary-hover) !important;
  color: #ffffff !important;
}

body[data-shell="mobile"][data-page="login"] .auth-tabs button::after {
  display: none !important;
  content: none !important;
}

body[data-shell="mobile"] button.ghost,
body[data-shell="mobile"] .ghost-link.ghost,
body[data-shell="mobile"] .text-link {
  border-color: var(--mobile-line);
  background: #ffffff;
  color: #252a33;
  box-shadow: none;
}

body[data-shell="mobile"] button.ghost:hover,
body[data-shell="mobile"] .ghost-link.ghost:hover {
  border-color: rgba(226, 27, 60, 0.32);
  background: #fff7f8;
  color: var(--primary);
}

body[data-shell="mobile"] button.danger {
  border-color: rgba(186, 18, 48, 0.32);
  background: #ffffff;
  color: var(--danger);
  box-shadow: none;
}

body[data-shell="mobile"] button.mini,
body[data-shell="mobile"] .tiny {
  min-height: 38px;
  border-radius: 9px;
  padding: 0 11px;
  font-size: 12px;
}

body[data-shell="mobile"] button.icon,
body[data-shell="mobile"] .icon-button {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
}

body[data-shell="mobile"] button:disabled,
body[data-shell="mobile"] button[aria-disabled="true"] {
  box-shadow: none;
  opacity: 0.62;
}

body[data-shell="mobile"] .button-group,
body[data-shell="mobile"] .card-actions,
body[data-shell="mobile"] .icon-actions,
body[data-shell="mobile"] .actions,
body[data-shell="mobile"] .actions.vertical {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-shell="mobile"] .button-group {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
}

body[data-shell="mobile"] .button-group > *,
body[data-shell="mobile"] .actions.vertical > *,
body[data-shell="mobile"] .form-actions > * {
  width: 100%;
  min-width: 0;
}

body[data-shell="mobile"][data-page="workflow"] .workspace-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
}

body[data-shell="mobile"] .workspace-left,
body[data-shell="mobile"] .workspace-right {
  display: grid;
  gap: 12px;
  min-width: 0;
}

body[data-shell="mobile"][data-page="workflow"] .workspace-left {
  gap: 8px !important;
}

body[data-shell="mobile"] .sticky-panel {
  position: static;
  top: auto;
}

body[data-shell="mobile"][data-page="workflow"] .workspace-left .panel,
body[data-shell="mobile"][data-page="workflow"] .prompt-workbench,
body[data-shell="mobile"] .workspace-right .panel {
  padding: 14px;
}

body[data-shell="mobile"][data-page="workflow"] .workspace-left > .panel {
  margin-bottom: 0 !important;
}

body[data-shell="mobile"] .asset-picker-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

body[data-shell="mobile"] .asset-picker-toolbar strong {
  color: var(--mobile-ink);
  font-size: 13px;
  font-weight: 900;
}

body[data-shell="mobile"] .workflow-asset-list {
  display: grid;
  gap: 9px;
  max-height: none;
  padding-right: 0;
  overflow: visible;
}

body[data-shell="mobile"] .workflow-asset-option {
  min-height: 76px;
  display: grid;
  grid-template-columns: 22px 58px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--mobile-line);
  border-radius: var(--mobile-radius);
  background: #ffffff;
  box-shadow: var(--mobile-shadow-soft);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

body[data-shell="mobile"] .workflow-asset-option:active {
  transform: scale(0.99);
}

body[data-shell="mobile"] .workflow-asset-option:hover,
body[data-shell="mobile"] .workflow-asset-option.is-selected,
body[data-shell="mobile"] .asset-card.selected {
  border-color: rgba(226, 27, 60, 0.5);
  background: #fff7f8;
  box-shadow: inset 3px 0 0 var(--primary), var(--mobile-shadow-soft);
}

body[data-shell="mobile"] .workflow-asset-option img {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--mobile-soft);
}

body[data-shell="mobile"] .workflow-asset-option strong {
  color: var(--mobile-ink);
  font-size: 13px;
  font-weight: 900;
}

body[data-shell="mobile"] .workflow-asset-option small {
  color: var(--mobile-muted);
  font-size: 11px;
  font-weight: 650;
}

body[data-shell="mobile"] .selected-asset {
  min-height: 84px;
  margin-top: 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px dashed rgba(226, 27, 60, 0.34);
  border-radius: var(--mobile-radius);
  background: #fff7f8;
  box-shadow: none;
}

body[data-shell="mobile"] .selected-asset.is-empty {
  grid-template-columns: 1fr;
  min-height: 66px;
  border-color: var(--mobile-line);
  background: var(--mobile-soft);
}

body[data-shell="mobile"] .selected-asset strong {
  color: var(--mobile-ink);
  font-size: 13px;
  font-weight: 900;
}

body[data-shell="mobile"] .selected-asset span {
  color: var(--mobile-muted);
  font-size: 12px;
  line-height: 1.45;
}

body[data-shell="mobile"] .selected-asset-stack {
  display: grid;
  grid-template-columns: repeat(2, 42px);
  gap: 6px;
}

body[data-shell="mobile"] .selected-asset .selected-asset-stack img {
  width: 42px;
  height: 42px;
  border: 2px solid #ffffff;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 5px 12px rgba(13, 17, 24, 0.12);
}

body[data-shell="mobile"] .prompt-list,
body[data-shell="mobile"] .prompt-group {
  display: grid;
  gap: 10px;
}

body[data-shell="mobile"] .prompt-child-list {
  display: grid;
  gap: 9px;
  margin-left: 8px;
  padding-left: 10px;
  border-left: 2px solid rgba(226, 27, 60, 0.22);
}

body[data-shell="mobile"] .prompt-card {
  display: grid;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--mobile-line);
  border-radius: var(--mobile-radius);
  background: #ffffff;
  box-shadow: var(--mobile-shadow-soft);
}

body[data-shell="mobile"] .prompt-card-secondary {
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

body[data-shell="mobile"] .prompt-card.is-locked {
  border-color: rgba(226, 27, 60, 0.42);
  box-shadow: inset 3px 0 0 var(--primary), var(--mobile-shadow-soft);
}

body[data-shell="mobile"] .prompt-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

body[data-shell="mobile"] .prompt-title {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 8px;
  align-items: center;
}

body[data-shell="mobile"] .prompt-title span,
body[data-shell="mobile"] .tag-row span,
body[data-shell="mobile"] .template-card span,
body[data-shell="mobile"] td em,
body[data-shell="mobile"] .badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 8px;
  border: 0;
  border-radius: 999px;
  background: #fff0f2;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}

body[data-shell="mobile"] .prompt-title strong {
  color: var(--mobile-ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-shell="mobile"] .prompt-title small {
  grid-column: 1 / -1;
  color: var(--mobile-muted);
  font-size: 11px;
  font-weight: 650;
}

body[data-shell="mobile"] .prompt-card-head em {
  min-width: 30px;
  color: rgba(18, 21, 27, 0.2);
  font-size: 19px;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  text-align: left;
}

body[data-shell="mobile"] .prompt-card textarea {
  min-height: 104px;
  background: #fbfcfd;
}

body[data-shell="mobile"] .prompt-card .icon-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

body[data-shell="mobile"] .prompt-card .icon-actions button {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding-inline: 7px;
  font-size: 12px;
}

body[data-shell="mobile"] .prompt-card .icon-actions button.secondary {
  margin-left: 0;
}

body[data-shell="mobile"] .app-confirm-dialog {
  width: min(342px, calc(100vw - 24px));
}

body[data-shell="mobile"] .app-confirm-shell {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 16px;
}

body[data-shell="mobile"] .app-confirm-shell::before {
  left: 16px;
  width: 34px;
}

body[data-shell="mobile"] .app-confirm-title {
  font-size: 15px;
}

body[data-shell="mobile"] .app-confirm-message {
  font-size: 13px;
}

body[data-shell="mobile"] .app-confirm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-shell="mobile"] .app-confirm-actions button {
  width: 100%;
  min-width: 0;
  min-height: 38px;
}

body[data-shell="mobile"] .batch-prompt-summary {
  margin-top: 10px;
  padding: 12px;
  background: #fbfcfd;
  box-shadow: none;
}

body[data-shell="mobile"] .batch-summary-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body[data-shell="mobile"] .batch-summary-metrics span {
  min-width: 0;
  padding: 10px;
  background: #ffffff;
  box-shadow: none;
}

body[data-shell="mobile"] .batch-summary-metrics small {
  color: var(--mobile-muted);
  font-size: 10px;
  font-weight: 800;
}

body[data-shell="mobile"] .batch-summary-metrics strong {
  color: var(--mobile-ink);
  font-size: 17px;
  font-weight: 900;
}

body[data-shell="mobile"] .batch-prompt-summary p {
  margin: 10px 0 0;
  color: var(--mobile-muted);
  font-size: 12px;
}

body[data-shell="mobile"] .workspace-right .panel {
  display: grid;
  gap: 12px;
}

body[data-shell="mobile"] .workspace-right .panel .section-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--mobile-line);
}

body[data-shell="mobile"] .workspace-right .panel .form-stack {
  gap: 10px;
}

body[data-shell="mobile"] .toggle-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

body[data-shell="mobile"] .toggle-list label,
body[data-shell="mobile"] .inline-check {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--mobile-line);
  border-radius: var(--mobile-radius-sm);
  background: #ffffff;
  color: #3d4652;
  font-size: 13px;
  font-weight: 800;
}

body[data-shell="mobile"] .cost-box {
  display: grid;
  gap: 6px;
  padding: 13px;
  border-color: rgba(226, 27, 60, 0.2);
  background: #fff7f8;
  box-shadow: none;
}

body[data-shell="mobile"] .cost-box span,
body[data-shell="mobile"] .cost-box small {
  color: var(--mobile-muted);
  font-size: 11px;
  font-weight: 750;
}

body[data-shell="mobile"] .cost-box strong {
  color: var(--primary);
  font-size: 27px;
  font-weight: 950;
  line-height: 1;
}

body[data-shell="mobile"] .cost-row {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(226, 27, 60, 0.16);
}

body[data-shell="mobile"] .workspace-right #createTextTask {
  width: 100%;
  min-height: 50px;
  border-radius: 12px;
  font-size: 15px;
}

body[data-shell="mobile"] .helper-text,
body[data-shell="mobile"] .form-message {
  min-height: 20px;
  margin: 0;
  color: var(--mobile-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}

body[data-shell="mobile"] .form-message:not(:empty) {
  padding: 10px 12px;
  border-radius: var(--mobile-radius-sm);
  background: var(--mobile-soft);
}

body[data-shell="mobile"] .form-message[data-tone="success"] {
  background: #eef8f1;
  color: var(--success);
}

body[data-shell="mobile"] .form-message[data-tone="error"],
body[data-shell="mobile"] .form-message[data-tone="warning"] {
  background: #fff0f2;
  color: var(--danger);
}

body[data-shell="mobile"] .generation-command-bar {
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border-color: var(--mobile-line);
  border-radius: var(--mobile-radius);
  background: #ffffff;
  box-shadow: var(--mobile-shadow-soft);
}

body[data-shell="mobile"] .generation-command-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body[data-shell="mobile"] .param-pill {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  padding: 7px 10px;
  border-color: var(--mobile-line);
  border-radius: var(--mobile-radius-sm);
  box-shadow: none;
}

body[data-shell="mobile"] .param-pill span,
body[data-shell="mobile"] .param-pill strong {
  min-width: 0;
  display: block;
  grid-column: 1;
  line-height: 1.1;
}

body[data-shell="mobile"] .param-pill span {
  font-size: 10px;
  font-weight: 800;
}

body[data-shell="mobile"] .param-pill strong {
  color: var(--mobile-ink);
  font-size: 13px;
  font-weight: 950;
}

body[data-shell="mobile"] .param-pill::after {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  margin: 0;
}

body[data-shell="mobile"] .generation-command-submit {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

body[data-shell="mobile"] .command-cost {
  min-height: 0;
  padding: 12px;
  border-color: rgba(226, 27, 60, 0.2);
  background: #fff7f8;
}

body[data-shell="mobile"] .command-cost strong {
  font-size: 24px;
  font-weight: 950;
}

body[data-shell="mobile"] .generation-start-button {
  width: 100%;
  min-height: 50px;
  border-radius: var(--mobile-radius-sm);
  font-size: 15px;
  font-weight: 950;
}

body[data-shell="mobile"] .desktop-param-popover {
  display: none;
}

body[data-shell="mobile"] .asset-grid,
body[data-shell="mobile"] .result-grid,
body[data-shell="mobile"] .template-grid,
body[data-shell="mobile"] .module-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

body[data-shell="mobile"][data-page="results"] .result-card,
body[data-shell="mobile"][data-page="assets"] .asset-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  grid-template-rows: minmax(76px, auto) auto;
  align-items: stretch;
  gap: 0;
  min-height: 146px;
  overflow: hidden;
  border-radius: var(--mobile-radius);
}

body[data-shell="mobile"][data-page="results"] .result-card img,
body[data-shell="mobile"][data-page="assets"] .asset-card img {
  grid-row: 1 / 3;
  width: 116px;
  height: 100%;
  min-height: 146px;
  aspect-ratio: auto;
  object-fit: cover;
  background: var(--mobile-soft);
}

body[data-shell="mobile"][data-page="results"] .result-body,
body[data-shell="mobile"][data-page="assets"] .asset-card-body {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 12px 12px 6px;
}

body[data-shell="mobile"][data-page="results"] .result-body strong,
body[data-shell="mobile"][data-page="assets"] .asset-card-body strong,
body[data-shell="mobile"] .template-card strong,
body[data-shell="mobile"] .module-card strong,
body[data-shell="mobile"] .support-card h2 {
  color: var(--mobile-ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

body[data-shell="mobile"][data-page="results"] .result-body span,
body[data-shell="mobile"][data-page="results"] .result-body p,
body[data-shell="mobile"][data-page="assets"] .asset-card-body small,
body[data-shell="mobile"] .template-card p,
body[data-shell="mobile"] .template-card small,
body[data-shell="mobile"] .module-card span,
body[data-shell="mobile"] .module-card small {
  color: var(--mobile-muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.38;
}

body[data-shell="mobile"][data-page="results"] .result-body p {
  display: block;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-shell="mobile"][data-page="assets"] .tag-row {
  display: none;
}

body[data-shell="mobile"][data-page="results"] .card-actions,
body[data-shell="mobile"][data-page="assets"] .card-actions {
  min-width: 0;
  align-self: end;
  padding: 0 10px 10px;
}

body[data-shell="mobile"][data-page="results"] .card-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

body[data-shell="mobile"][data-page="results"] .card-actions::-webkit-scrollbar {
  display: none;
}

body[data-shell="mobile"][data-page="assets"] .card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

body[data-shell="mobile"][data-page="results"] .card-actions button,
body[data-shell="mobile"][data-page="assets"] .card-actions button {
  min-height: 42px;
  min-width: 58px;
  padding: 0 9px;
  font-size: 12px;
  box-shadow: none;
}

body[data-shell="mobile"][data-page="results"] .card-actions button {
  flex: 0 0 auto;
}

body[data-shell="mobile"][data-page="assets"] .card-actions button {
  width: 100%;
  min-width: 0;
}

body[data-shell="mobile"] .template-card,
body[data-shell="mobile"] .module-card,
body[data-shell="mobile"] .support-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

body[data-shell="mobile"] .template-card button,
body[data-shell="mobile"] .module-card button {
  width: 100%;
}

body[data-shell="mobile"] .support-card p,
body[data-shell="mobile"] .support-card li,
body[data-shell="mobile"] .help-steps span {
  color: var(--mobile-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}

body[data-shell="mobile"] .support-card ul {
  margin: 0;
  padding-left: 18px;
}

body[data-shell="mobile"] .help-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

body[data-shell="mobile"] .help-steps article {
  display: grid;
  gap: 6px;
  padding: 13px;
}

body[data-shell="mobile"] .help-steps strong {
  color: var(--mobile-ink);
  font-size: 14px;
  font-weight: 900;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel {
  padding: 0;
  overflow: hidden;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel .section-head {
  min-height: 54px;
  margin: 0;
  padding: 0 14px;
  align-items: center;
  cursor: pointer;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel .section-head::after {
  content: "+";
  justify-self: end;
  grid-column: 1;
  grid-row: 1;
  color: var(--primary);
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel form,
body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel #assetMessage {
  display: none;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel.mobile-expanded {
  padding: 14px;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel.mobile-expanded .section-head {
  min-height: auto;
  margin-bottom: 12px;
  padding: 0;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel.mobile-expanded .section-head::after {
  content: "-";
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel.mobile-expanded form {
  display: grid;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel.mobile-expanded #assetMessage {
  display: block;
}

body[data-shell="mobile"] .account-layout {
  grid-template-areas: none;
}

body[data-shell="mobile"][data-page="account"] .account-layout {
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: stretch;
  justify-items: stretch;
  width: 100%;
  margin-top: 0;
}

body[data-shell="mobile"][data-page="account"] .account-layout > *,
body[data-shell="mobile"][data-page="account"] .account-profile-panel,
body[data-shell="mobile"][data-page="account"] .account-security-panel {
  grid-area: auto !important;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  justify-self: stretch;
  align-self: stretch;
}

body[data-shell="mobile"][data-page="account"] .account-profile-panel .profile-edit-form,
body[data-shell="mobile"][data-page="account"] .account-security-panel .profile-password-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px;
  width: 100%;
}

body[data-shell="mobile"][data-page="account"] .profile-avatar-editor {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 0;
}

body[data-shell="mobile"][data-page="account"] #profileAvatarPreview {
  width: 74px;
  height: 74px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--mobile-line), 0 10px 22px rgba(13, 17, 24, 0.12);
}

body[data-shell="mobile"][data-page="account"] .avatar-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

body[data-shell="mobile"][data-page="account"] .avatar-upload-button,
body[data-shell="mobile"][data-page="account"] #resetDefaultAvatar,
body[data-shell="mobile"][data-page="account"] .form-actions button,
body[data-shell="mobile"][data-page="account"] .account-security-panel button {
  width: 100%;
}

body[data-shell="mobile"][data-page="account"] .profile-form-sections {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

body[data-shell="mobile"][data-page="account"] .profile-form-section {
  padding: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  justify-self: stretch;
  box-shadow: none;
}

body[data-shell="mobile"][data-page="account"] .profile-form-section .subsection-title {
  margin-bottom: 10px;
}

body[data-shell="mobile"][data-page="account"] .profile-form-section .subsection-title strong {
  color: var(--mobile-ink);
  font-size: 14px;
  font-weight: 900;
}

body[data-shell="mobile"][data-page="account"] .profile-form-section .subsection-title span {
  color: var(--mobile-muted);
  font-size: 11px;
  font-weight: 650;
}

body[data-shell="mobile"][data-page="account"] .profile-gender-field {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: auto;
  padding: 0;
  border: 0;
}

body[data-shell="mobile"][data-page="account"] .profile-gender-field legend {
  grid-column: 1 / -1;
  color: #3d4652;
  font-size: 12px;
  font-weight: 850;
}

body[data-shell="mobile"][data-page="account"] .profile-gender-field label {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--mobile-line);
  border-radius: var(--mobile-radius-sm);
  background: #ffffff;
}

body[data-shell="mobile"] .redeem-status-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 10px;
}

body[data-shell="mobile"] .redeem-status-board span,
body[data-shell="mobile"] .redeem-status-board .recharge-link {
  min-width: 0;
  min-height: 52px;
  justify-content: center;
  padding: 0 10px;
  color: var(--mobile-ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

body[data-shell="mobile"] .redeem-status-board .recharge-link {
  grid-column: 1 / -1;
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(226, 27, 60, 0.22);
}

body[data-shell="mobile"][data-page="redeem-codes"] .redeem-form {
  grid-template-columns: 1fr;
}

body[data-shell="mobile"][data-page="redeem-codes"] .collapsible-data-panel {
  overflow: hidden;
}

body[data-shell="mobile"][data-page="redeem-codes"] .collapsible-data-panel .section-head {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 0;
}

body[data-shell="mobile"][data-page="redeem-codes"] .collapsible-data-panel.is-expanded .section-head {
  margin-bottom: 12px;
}

body[data-shell="mobile"][data-page="redeem-codes"] .data-panel-toggle {
  width: 100%;
  min-width: 0;
}

body[data-shell="mobile"] .ops-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  overflow: hidden;
}

body[data-shell="mobile"] .ops-item {
  padding: 13px;
  border-right: 0;
  border-bottom: 1px solid var(--mobile-line);
}

body[data-shell="mobile"] .ops-item:last-child {
  border-bottom: 0;
}

body[data-shell="mobile"] .mobile-task-list {
  display: grid;
  gap: 10px;
}

body[data-shell="mobile"] .mobile-task-empty {
  min-height: 104px;
  display: grid;
  place-items: center;
  padding: 16px;
  border: 1px dashed var(--mobile-line);
  border-radius: var(--mobile-radius);
  background: #fbfcfd;
  color: var(--mobile-muted);
  font-size: 13px;
  font-weight: 800;
}

body[data-shell="mobile"] .mobile-task-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--mobile-line);
  border-radius: var(--mobile-radius);
  background: #ffffff;
  box-shadow: var(--mobile-shadow-soft);
}

body[data-shell="mobile"] .mobile-task-card-head {
  display: grid;
  gap: 7px;
}

body[data-shell="mobile"] .mobile-task-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

body[data-shell="mobile"] .mobile-task-title strong {
  min-width: 0;
  overflow: hidden;
  color: var(--mobile-ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-shell="mobile"] .mobile-task-title span {
  flex: 0 0 auto;
  color: var(--mobile-muted);
  font-size: 11px;
  font-weight: 800;
}

body[data-shell="mobile"] .mobile-task-progress {
  min-width: 0;
}

body[data-shell="mobile"] .mobile-task-body {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-width: 0;
}

body[data-shell="mobile"] .mobile-task-preview {
  width: 82px;
  height: 82px;
  min-height: 82px;
  overflow: hidden;
  display: grid;
  place-items: center;
  align-self: start;
  border: 1px solid var(--mobile-line);
  border-radius: 8px;
  background: #f6f7f9;
  color: var(--mobile-muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

body[data-shell="mobile"] .mobile-task-preview img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  display: block;
}

body[data-shell="mobile"] .mobile-task-preview.is-processing {
  border-color: rgba(226, 27, 60, 0.2);
  background: #111827;
  color: #ffffff;
}

body[data-shell="mobile"] .mobile-task-preview.is-empty {
  background: #fbfcfd;
}

body[data-shell="mobile"] .mobile-task-main {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

body[data-shell="mobile"] .mobile-task-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

body[data-shell="mobile"] .mobile-task-meta div {
  min-width: 0;
  padding: 8px;
  border-radius: 9px;
  background: #f7f8fa;
}

body[data-shell="mobile"] .mobile-task-meta dt,
body[data-shell="mobile"] .mobile-task-meta dd {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-shell="mobile"] .mobile-task-meta dt {
  color: var(--mobile-muted);
  font-size: 10px;
  font-weight: 900;
}

body[data-shell="mobile"] .mobile-task-meta dd {
  margin-top: 3px;
  color: var(--mobile-ink);
  font-size: 12px;
  font-weight: 850;
}

body[data-shell="mobile"] .mobile-task-error {
  margin: 0;
  padding: 9px 10px;
  border-radius: 9px;
  background: #fff7f8;
  color: var(--danger);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

body[data-shell="mobile"] .mobile-task-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 2px 0 0;
}

body[data-shell="mobile"] .mobile-task-actions:has(> :nth-child(3)) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-shell="mobile"] .mobile-task-actions:has(> :only-child) {
  grid-template-columns: 1fr;
}

body[data-shell="mobile"] .mobile-task-actions > * {
  min-height: 40px;
  min-width: 0;
  padding-inline: 8px;
}

body[data-shell="mobile"] .mobile-task-created-time {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--mobile-muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-shell="mobile"] .mobile-task-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: -2px;
}

body[data-shell="mobile"] .mobile-task-foot .mobile-task-progress {
  width: 82px;
  justify-self: end;
  align-self: center;
  height: 8px;
}

body[data-shell="mobile"][data-page="tasks"] .task-table-wrap {
  display: none;
}

body[data-shell="mobile"] .table-wrap {
  max-width: 100%;
  margin-inline: 0;
  overflow-x: auto;
  border: 1px solid var(--mobile-line);
  border-radius: var(--mobile-radius);
  background: #ffffff;
  box-shadow: var(--mobile-shadow-soft);
  -webkit-overflow-scrolling: touch;
}

body[data-shell="mobile"] table {
  min-width: 760px;
}

body[data-shell="mobile"][data-page="tasks"] table,
body[data-shell="mobile"][data-page="admin"] table,
body[data-shell="mobile"][data-page="redeem-codes"] table {
  min-width: 920px;
}

body[data-shell="mobile"] th,
body[data-shell="mobile"] td {
  padding: 11px 10px;
  font-size: 12px;
}

body[data-shell="mobile"] th {
  background: #f6f7f9;
  color: var(--mobile-muted);
}

body[data-shell="mobile"] .empty-state {
  min-height: 124px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 18px;
  text-align: center;
  background: #fbfcfd;
}

body[data-shell="mobile"] .empty-state.compact {
  min-height: 86px;
}

body[data-shell="mobile"] .empty-state strong {
  color: var(--mobile-ink);
  font-size: 15px;
  font-weight: 900;
}

body[data-shell="mobile"] .empty-state span {
  max-width: 280px;
  color: var(--mobile-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}

body[data-shell="mobile"] .preview-dialog,
body[data-shell="mobile"] .member-edit-dialog {
  width: calc(100vw - 20px);
  max-width: calc(100vw - 20px);
  border: 0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(13, 17, 24, 0.26);
}

body[data-shell="mobile"] .dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
}

body[data-shell="mobile"] .preview-dialog img {
  max-height: 72vh;
  border-radius: 0 0 16px 16px;
}

body[data-shell="mobile"] .mobile-bottom-nav {
  position: fixed;
  inset: auto 8px 8px 8px;
  z-index: 80;
  width: auto;
  height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
  padding: 6px 7px calc(6px + env(safe-area-inset-bottom));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(23, 30, 40, 0.98), rgba(11, 15, 21, 0.98)),
    #101722;
  box-shadow: 0 -18px 44px rgba(13, 17, 24, 0.28), 0 8px 24px rgba(0, 0, 0, 0.28);
  overscroll-behavior-x: none;
  transform: translateY(0);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

body[data-shell="mobile"].mobile-more-open .mobile-bottom-nav {
  overflow: visible !important;
}

body[data-shell="mobile"] .mobile-bottom-nav nav {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
  gap: 5px;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: visible;
  scroll-snap-type: none;
}

body[data-shell="mobile"] .mobile-bottom-nav nav > a,
body[data-shell="mobile"] .mobile-bottom-nav nav > .mobile-more-menu {
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 58px;
  align-self: stretch;
  justify-self: stretch;
  scroll-snap-align: none;
}

body[data-shell="mobile"] .mobile-bottom-nav nav > a,
body[data-shell="mobile"] .mobile-more-trigger {
  position: relative;
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 58px;
  padding: 7px 3px 6px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.12;
  text-align: center;
  box-shadow: none;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

body[data-shell="mobile"] .mobile-bottom-nav nav > a svg,
body[data-shell="mobile"] .mobile-more-trigger svg {
  width: 20px;
  height: 20px;
  margin: 0 0 3px;
  color: currentColor;
  opacity: 0.94;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-shell="mobile"] .mobile-bottom-nav nav > a:active,
body[data-shell="mobile"] .mobile-more-trigger:active {
  transform: translateY(1px) scale(0.98);
}

body[data-shell="mobile"] .mobile-bottom-nav nav > a.active,
body[data-shell="mobile"] .mobile-more-menu[open] .mobile-more-trigger,
body[data-shell="mobile"] .mobile-more-menu.active .mobile-more-trigger {
  background: linear-gradient(180deg, rgba(226, 27, 60, 0.34), rgba(226, 27, 60, 0.2)), rgba(226, 27, 60, 0.2);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(226, 27, 60, 0.22);
}

body[data-shell="mobile"] .mobile-bottom-nav nav > a.active::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
  transform: translateX(-50%);
}

body[data-shell="mobile"] .mobile-more-trigger::-webkit-details-marker {
  display: none;
}

body[data-shell="mobile"] .mobile-more-panel {
  position: fixed;
  right: 10px;
  bottom: calc(var(--mobile-nav-height) + 14px + env(safe-area-inset-bottom));
  z-index: 120;
  display: grid;
  min-width: 172px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(11, 15, 21, 0.98);
  box-shadow: 0 18px 44px rgba(13, 17, 24, 0.32);
}

body[data-shell="mobile"] .mobile-more-menu:not([open]) .mobile-more-panel {
  display: none;
}

body[data-shell="mobile"] .mobile-more-panel a,
body[data-shell="mobile"] .mobile-more-panel .mobile-more-logout {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  justify-content: start;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-radius: 10px;
  text-align: left;
}

body[data-shell="mobile"] .mobile-more-panel .mobile-more-logout {
  margin-top: 4px;
  border: 1px solid rgba(226, 27, 60, 0.36);
  background: rgba(226, 27, 60, 0.08);
  color: #ffffff;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

body[data-shell="mobile"] .mobile-more-panel .mobile-more-logout svg {
  width: 18px;
  height: 18px;
  align-self: center;
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-shell="mobile"] .mobile-more-panel .mobile-more-logout:active {
  transform: translateY(1px);
  background: rgba(226, 27, 60, 0.16);
}

body[data-shell="mobile"] .mobile-bottom-nav a.is-hidden {
  display: none !important;
}

body[data-shell="mobile"] .mobile-compat-node,
body[data-shell="mobile"] input.visually-hidden,
body[data-shell="mobile"] .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  min-height: 1px !important;
  max-width: 1px !important;
  max-height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"] .is-demo,
body[data-shell="mobile"] tbody tr.is-demo,
body[data-shell="mobile"] .asset-card.is-demo,
body[data-shell="mobile"] .result-card.is-demo,
body[data-shell="mobile"] .queue-item.is-demo,
body[data-shell="mobile"] .workflow-asset-option.is-demo {
  border-color: color-mix(in srgb, var(--mobile-line) 72%, #9ca3af);
  background: color-mix(in srgb, #ffffff 58%, #e5e7eb);
  box-shadow: none;
  filter: grayscale(1);
}

/* Mobile KPI cards should follow the compact demo rhythm: text-only, no empty icon rail. */
body[data-shell="mobile"] .page-metrics.metric-grid {
  gap: 8px;
}

body[data-shell="mobile"] .page-metrics .metric-card {
  min-height: 72px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas:
    "label"
    "value"
    "hint" !important;
  align-content: center !important;
  gap: 4px !important;
  padding: 12px 13px !important;
}

body[data-shell="mobile"] .page-metrics .metric-card::before,
body[data-shell="mobile"] .page-metrics .metric-card::after {
  display: none !important;
  content: none !important;
}

body[data-shell="mobile"] .page-metrics .metric-card span,
body[data-shell="mobile"] .page-metrics .metric-card strong,
body[data-shell="mobile"] .page-metrics .metric-card small {
  min-width: 0;
  margin: 0 !important;
}

body[data-shell="mobile"] .page-metrics .metric-card span {
  grid-area: label;
}

body[data-shell="mobile"] .page-metrics .metric-card strong {
  grid-area: value;
}

body[data-shell="mobile"] .page-metrics .metric-card small {
  grid-area: hint;
}

body[data-shell="mobile"][data-page="workflow"] .page-metrics .metric-card {
  min-height: 58px !important;
  padding: 9px 8px !important;
}

/* Mobile secondary pages are tools, not marketing heroes: keep page heads compact and action-first. */
body[data-shell="mobile"]:not([data-page="workflow"]) .page-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px !important;
  min-height: 0 !important;
  margin: 0 0 8px !important;
  padding: 13px 14px !important;
  overflow: visible !important;
  border: 1px solid var(--mobile-line) !important;
  border-radius: var(--mobile-radius) !important;
  background: var(--mobile-surface) !important;
  box-shadow: var(--mobile-shadow-soft) !important;
}

body[data-shell="mobile"]:not([data-page="workflow"]) .page-head::before {
  top: 16px !important;
  left: 14px !important;
  width: 22px !important;
  height: 3px !important;
  border-radius: 999px !important;
  background: var(--primary) !important;
}

body[data-shell="mobile"]:not([data-page="workflow"]) .page-head::after {
  display: none !important;
  content: none !important;
}

body[data-shell="mobile"]:not([data-page="workflow"]) .page-head .eyebrow {
  display: block !important;
  padding-left: 34px !important;
  color: var(--mobile-muted) !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  text-transform: none !important;
}

body[data-shell="mobile"]:not([data-page="workflow"]) .page-head h1 {
  margin: 5px 0 0 !important;
  color: var(--mobile-ink) !important;
  font-size: 25px !important;
  font-weight: 900 !important;
  line-height: 1.08 !important;
}

body[data-shell="mobile"]:not([data-page="workflow"]) .page-head p {
  display: -webkit-box !important;
  max-width: none !important;
  margin: 7px 0 0 !important;
  color: var(--mobile-muted) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.42 !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

body[data-shell="mobile"]:not([data-page="workflow"]) .page-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body[data-shell="mobile"]:not([data-page="workflow"]) .page-actions > :only-child,
body[data-shell="mobile"]:not([data-page="workflow"]) .page-actions > :nth-child(3) {
  grid-column: auto !important;
}

body[data-shell="mobile"]:not([data-page="workflow"]) .page-head .ghost-link,
body[data-shell="mobile"]:not([data-page="workflow"]) .page-head button.ghost {
  min-height: 40px !important;
  padding: 0 12px !important;
  border: 1px solid var(--mobile-line) !important;
  border-radius: var(--mobile-radius-sm) !important;
  background: #ffffff !important;
  color: #252a33 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}

body[data-shell="mobile"]:not([data-page="workflow"]) .page-head .ghost-link:first-child,
body[data-shell="mobile"]:not([data-page="workflow"]) .page-head button:first-child {
  border-color: var(--primary) !important;
  background: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

/* Workflow page keeps the dark creation stage, but its quick actions behave like a compact toolbar. */
body[data-shell="mobile"][data-page="workflow"] .page-head {
  gap: 12px !important;
  padding: 14px 14px !important;
}

body[data-shell="mobile"][data-page="workflow"] .page-head::before {
  left: 14px !important;
  width: 38px !important;
}

body[data-shell="mobile"][data-page="workflow"] .page-head h1 {
  margin: 5px 0 0 !important;
  font-size: clamp(25px, 6.6vw, 31px) !important;
  line-height: 1.06 !important;
}

body[data-shell="mobile"][data-page="workflow"] .page-head .eyebrow {
  display: inline-flex !important;
  width: min(302px, 100%) !important;
  margin-top: 8px !important;
  align-items: center !important;
  gap: 14px !important;
}

body[data-shell="mobile"][data-page="workflow"] .page-head .eyebrow::after {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 72px !important;
  max-width: 92px !important;
}

body[data-shell="mobile"][data-page="workflow"] .page-head p {
  display: -webkit-box !important;
  margin-top: 7px !important;
  font-size: 12px !important;
  line-height: 1.42 !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

body[data-shell="mobile"][data-page="workflow"] .page-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 7px !important;
}

body[data-shell="mobile"][data-page="workflow"] .page-actions > :only-child,
body[data-shell="mobile"][data-page="workflow"] .page-actions > :nth-child(3) {
  grid-column: auto !important;
}

body[data-shell="mobile"][data-page="workflow"] .page-head .ghost-link,
body[data-shell="mobile"][data-page="workflow"] .page-head button.ghost {
  min-height: 40px !important;
  padding: 0 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: var(--mobile-radius-sm) !important;
  background: rgba(255, 255, 255, 0.09) !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

body[data-shell="mobile"][data-page="workflow"] .page-head .ghost-link:first-child,
body[data-shell="mobile"][data-page="workflow"] .page-head button:first-child {
  border-color: var(--primary) !important;
  background: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

/* Mobile account density: short avatar actions and readonly identity fields should fit one row. */
body[data-shell="mobile"][data-page="account"] .profile-avatar-editor {
  grid-template-columns: 68px minmax(0, 1fr) !important;
  gap: 10px !important;
  min-height: 0 !important;
  padding: 10px 12px !important;
  border: 1px solid var(--mobile-line) !important;
  border-radius: var(--mobile-radius-sm) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body[data-shell="mobile"][data-page="account"] #profileAvatarPreview {
  width: 68px !important;
  height: 68px !important;
}

body[data-shell="mobile"][data-page="account"] .avatar-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  flex-wrap: nowrap !important;
}

body[data-shell="mobile"][data-page="account"] .avatar-upload-button,
body[data-shell="mobile"][data-page="account"] #resetDefaultAvatar {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 8px !important;
  border-radius: var(--mobile-radius-sm) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

body[data-shell="mobile"][data-page="account"] .avatar-upload-button {
  border-color: var(--primary) !important;
  background: var(--primary) !important;
  color: #ffffff !important;
}

body[data-shell="mobile"][data-page="account"] #resetDefaultAvatar {
  border-color: var(--mobile-line-strong) !important;
  background: #ffffff !important;
  color: var(--mobile-ink) !important;
}

body[data-shell="mobile"][data-page="account"] .profile-form-section:first-child .profile-form-grid {
  gap: 8px !important;
}

body[data-shell="mobile"][data-page="account"] .profile-form-section:first-child label {
  min-height: 46px !important;
  display: grid !important;
  grid-template-columns: minmax(72px, 0.34fr) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 12px !important;
  border: 1px solid var(--mobile-line) !important;
  border-radius: var(--mobile-radius-sm) !important;
  background: #ffffff !important;
  color: var(--mobile-muted) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body[data-shell="mobile"][data-page="account"] .profile-form-section:first-child input[readonly] {
  min-height: 0 !important;
  height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--mobile-ink) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
  text-align: right !important;
  box-shadow: none !important;
  pointer-events: none !important;
}

/* Mobile account form density: each editable profile item should read as one row. */
body[data-shell="mobile"][data-page="account"] .account-profile-panel .profile-form-section .profile-form-grid,
body[data-shell="mobile"][data-page="account"] .account-profile-panel .profile-form-section .profile-form-grid-wide {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
}

body[data-shell="mobile"][data-page="account"] .account-profile-panel .profile-form-section label:not(.profile-wide-field) {
  min-height: 46px !important;
  display: grid !important;
  grid-template-columns: minmax(72px, 0.34fr) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 12px !important;
  border: 1px solid var(--mobile-line) !important;
  border-radius: var(--mobile-radius-sm) !important;
  background: #ffffff !important;
  color: var(--mobile-muted) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
}

body[data-shell="mobile"][data-page="account"] .account-profile-panel .profile-form-section label:not(.profile-wide-field):focus-within {
  border-color: rgba(226, 27, 60, 0.42) !important;
  box-shadow: 0 0 0 1px rgba(226, 27, 60, 0.08) !important;
}

body[data-shell="mobile"][data-page="account"] .account-profile-panel .profile-form-section label:not(.profile-wide-field) input,
body[data-shell="mobile"][data-page="account"] .account-profile-panel .profile-form-section label:not(.profile-wide-field) select {
  width: 100% !important;
  min-height: 24px !important;
  height: auto !important;
  padding: 0 0 0 7px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--mobile-ink) !important;
  caret-color: var(--mobile-accent, #e21b3c) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.35 !important;
  text-align: left !important;
  box-shadow: none !important;
  outline: 0 !important;
}

body[data-shell="mobile"][data-page="account"] .account-profile-panel .profile-form-section label:not(.profile-wide-field) input:focus,
body[data-shell="mobile"][data-page="account"] .account-profile-panel .profile-form-section label:not(.profile-wide-field) input:focus-visible,
body[data-shell="mobile"][data-page="account"] .account-profile-panel .profile-form-section label:not(.profile-wide-field) select:focus,
body[data-shell="mobile"][data-page="account"] .account-profile-panel .profile-form-section label:not(.profile-wide-field) select:focus-visible {
  border-color: transparent !important;
  box-shadow: inset 2px 0 0 rgba(226, 27, 60, 0.82) !important;
  outline: 0 !important;
}

body[data-shell="mobile"][data-page="account"] .account-profile-panel .profile-form-section label:not(.profile-wide-field) input::placeholder {
  color: color-mix(in srgb, var(--mobile-muted) 66%, #ffffff) !important;
  font-size: 13px !important;
  font-weight: 750 !important;
}

/* Mobile account security density: password fields should be one compact row each. */
body[data-shell="mobile"][data-page="account"] .account-security-panel .profile-password-form {
  gap: 8px !important;
}

body[data-shell="mobile"][data-page="account"] .account-security-panel .profile-password-form label {
  min-height: 46px !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(72px, 0.34fr) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 12px !important;
  border: 1px solid var(--mobile-line) !important;
  border-radius: var(--mobile-radius-sm) !important;
  background: #ffffff !important;
  color: var(--mobile-muted) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
}

body[data-shell="mobile"][data-page="account"] .account-security-panel .profile-password-form label:focus-within {
  border-color: rgba(226, 27, 60, 0.42) !important;
  box-shadow: 0 0 0 1px rgba(226, 27, 60, 0.08) !important;
}

body[data-shell="mobile"][data-page="account"] .account-security-panel .profile-password-form label input {
  width: 100% !important;
  min-height: 24px !important;
  height: auto !important;
  padding: 0 0 0 7px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--mobile-ink) !important;
  caret-color: var(--mobile-accent, #e21b3c) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.35 !important;
  text-align: left !important;
  box-shadow: none !important;
  outline: 0 !important;
}

body[data-shell="mobile"][data-page="account"] .account-security-panel .profile-password-form label input:focus,
body[data-shell="mobile"][data-page="account"] .account-security-panel .profile-password-form label input:focus-visible {
  border-color: transparent !important;
  box-shadow: inset 2px 0 0 rgba(226, 27, 60, 0.82) !important;
  outline: 0 !important;
}

body[data-shell="mobile"][data-page="account"] .account-security-panel .profile-password-form label input::placeholder {
  color: color-mix(in srgb, var(--mobile-muted) 66%, #ffffff) !important;
  font-size: 13px !important;
  font-weight: 750 !important;
}

/* Mobile compact form rows: short operational fields should use one row, not label-over-control. */
body[data-shell="mobile"][data-page="redeem-codes"] .redeem-admin-form,
body[data-shell="mobile"][data-page="admin"] #tokenAdjustForm,
body[data-shell="mobile"][data-page="admin"] .policy-form-grid,
body[data-shell="mobile"][data-page="assets"] #assetUploadForm {
  gap: 8px !important;
}

body[data-shell="mobile"][data-page="redeem-codes"] .redeem-admin-form label,
body[data-shell="mobile"][data-page="admin"] #tokenAdjustForm > label,
body[data-shell="mobile"][data-page="admin"] .policy-form-grid label,
body[data-shell="mobile"][data-page="admin"] .member-edit-grid label,
body[data-shell="mobile"][data-page="assets"] #assetUploadForm label {
  min-height: 46px !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(92px, 0.38fr) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 12px !important;
  border: 1px solid var(--mobile-line) !important;
  border-radius: var(--mobile-radius-sm) !important;
  background: #ffffff !important;
  color: var(--mobile-muted) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
}

body[data-shell="mobile"][data-page="redeem-codes"] .redeem-admin-form label input,
body[data-shell="mobile"][data-page="redeem-codes"] .redeem-admin-form label select,
body[data-shell="mobile"][data-page="admin"] #tokenAdjustForm > label input,
body[data-shell="mobile"][data-page="admin"] #tokenAdjustForm > label select,
body[data-shell="mobile"][data-page="admin"] .policy-form-grid label input,
body[data-shell="mobile"][data-page="admin"] .policy-form-grid label select,
body[data-shell="mobile"][data-page="admin"] .member-edit-grid label input,
body[data-shell="mobile"][data-page="admin"] .member-edit-grid label select,
body[data-shell="mobile"][data-page="assets"] #assetUploadForm label input,
body[data-shell="mobile"][data-page="assets"] #assetUploadForm label select {
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--mobile-ink) !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
  text-align: left !important;
  box-shadow: none !important;
}

body[data-shell="mobile"][data-page="redeem-codes"] .redeem-admin-form label input::placeholder,
body[data-shell="mobile"][data-page="admin"] #tokenAdjustForm > label input::placeholder,
body[data-shell="mobile"][data-page="admin"] .member-edit-grid label input::placeholder,
body[data-shell="mobile"][data-page="assets"] #assetUploadForm label input::placeholder {
  color: color-mix(in srgb, var(--mobile-muted) 66%, #ffffff) !important;
  font-size: 13px !important;
  font-weight: 750 !important;
}

/* Mobile compact cards: keep media, content and actions in the intended two-column grid. */
body[data-shell="mobile"][data-page="results"] .result-card img,
body[data-shell="mobile"][data-page="assets"] .asset-card img {
  grid-column: 1 !important;
  grid-row: 1 / 3 !important;
}

body[data-shell="mobile"][data-page="results"] .result-body,
body[data-shell="mobile"][data-page="assets"] .asset-card-body {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

body[data-shell="mobile"][data-page="results"] .result-card .card-actions,
body[data-shell="mobile"][data-page="assets"] .asset-card .card-actions {
  grid-column: 2 !important;
  grid-row: 2 !important;
}

body[data-shell="mobile"][data-page="results"] .result-card > .result-created-time {
  grid-column: 2 !important;
  grid-row: 3 !important;
  min-width: 0;
  margin: -4px 10px 10px !important;
  font-size: 11px;
  line-height: 1.35;
}

body[data-shell="mobile"][data-page="results"] .result-card .card-actions {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  overflow: hidden !important;
}

body[data-shell="mobile"][data-page="results"] .result-card .card-actions button {
  width: 100% !important;
  min-width: 0 !important;
  padding: 0 4px !important;
  font-size: 11px !important;
}

body[data-shell="mobile"][data-page="account"] .account-profile-panel .profile-form-section .profile-wide-field {
  display: grid !important;
  gap: 8px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Mobile parameter picker: replace rough native select popups with branded bottom sheets. */
body[data-shell="mobile"] .mobile-select-field,
body[data-shell="mobile"] .mobile-model-field {
  gap: 6px !important;
}

body[data-shell="mobile"] .mobile-native-select-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

body[data-shell="mobile"] .mobile-select-trigger,
body[data-shell="mobile"] .mobile-model-trigger {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 48px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 24px !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 13px !important;
  border: 1px solid rgba(226, 27, 60, 0.28) !important;
  border-radius: var(--mobile-radius-sm) !important;
  background: #ffffff !important;
  color: var(--mobile-ink) !important;
  text-align: left !important;
  box-shadow: 0 6px 14px rgba(13, 17, 24, 0.05) !important;
}

body[data-shell="mobile"] .mobile-select-trigger-copy,
body[data-shell="mobile"] .mobile-model-trigger-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

body[data-shell="mobile"] .mobile-select-toolbar {
  min-width: 0 !important;
}

body[data-shell="mobile"] .button-group .mobile-select-trigger,
body[data-shell="mobile"] .admin-member-toolbar .mobile-select-trigger,
body[data-shell="mobile"] .data-panel-toolbar .mobile-select-trigger,
body[data-shell="mobile"] .mobile-table-select-trigger,
body[data-shell="mobile"][data-page="tasks"] .mobile-task-status-trigger {
  width: 100% !important;
  min-width: 0 !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 10px !important;
  grid-template-columns: minmax(0, 1fr) 18px !important;
  gap: 6px !important;
  box-shadow: none !important;
}

body[data-shell="mobile"] .button-group .mobile-select-trigger .mobile-model-trigger-copy,
body[data-shell="mobile"] .admin-member-toolbar .mobile-select-trigger .mobile-model-trigger-copy,
body[data-shell="mobile"] .data-panel-toolbar .mobile-select-trigger .mobile-model-trigger-copy,
body[data-shell="mobile"] .mobile-table-select-trigger .mobile-model-trigger-copy,
body[data-shell="mobile"][data-page="tasks"] .mobile-task-status-trigger .mobile-model-trigger-copy {
  min-width: 0 !important;
}

body[data-shell="mobile"] .button-group .mobile-select-trigger strong,
body[data-shell="mobile"] .admin-member-toolbar .mobile-select-trigger strong,
body[data-shell="mobile"] .data-panel-toolbar .mobile-select-trigger strong,
body[data-shell="mobile"] .mobile-table-select-trigger strong,
body[data-shell="mobile"][data-page="tasks"] .mobile-task-status-trigger strong {
  color: var(--mobile-ink) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

body[data-shell="mobile"] .button-group .mobile-select-trigger small,
body[data-shell="mobile"] .admin-member-toolbar .mobile-select-trigger small,
body[data-shell="mobile"] .data-panel-toolbar .mobile-select-trigger small,
body[data-shell="mobile"] .mobile-table-select-trigger small,
body[data-shell="mobile"][data-page="tasks"] .mobile-task-status-trigger small {
  display: none !important;
}

body[data-shell="mobile"] .button-group .mobile-select-trigger .mobile-model-trigger-mark,
body[data-shell="mobile"] .admin-member-toolbar .mobile-select-trigger .mobile-model-trigger-mark,
body[data-shell="mobile"] .data-panel-toolbar .mobile-select-trigger .mobile-model-trigger-mark,
body[data-shell="mobile"] .mobile-table-select-trigger .mobile-model-trigger-mark,
body[data-shell="mobile"][data-page="tasks"] .mobile-task-status-trigger .mobile-model-trigger-mark {
  width: 16px !important;
  height: 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
}

body[data-shell="mobile"] .button-group .mobile-select-trigger .mobile-model-trigger-mark::after,
body[data-shell="mobile"] .admin-member-toolbar .mobile-select-trigger .mobile-model-trigger-mark::after,
body[data-shell="mobile"] .data-panel-toolbar .mobile-select-trigger .mobile-model-trigger-mark::after,
body[data-shell="mobile"] .mobile-table-select-trigger .mobile-model-trigger-mark::after,
body[data-shell="mobile"][data-page="tasks"] .mobile-task-status-trigger .mobile-model-trigger-mark::after {
  inset: 3px !important;
  border-right-width: 2px !important;
  border-bottom-width: 2px !important;
}

body[data-shell="mobile"] .mobile-select-trigger strong,
body[data-shell="mobile"] .mobile-model-trigger strong {
  min-width: 0;
  overflow: hidden;
  color: var(--mobile-ink);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-shell="mobile"] .mobile-select-trigger small,
body[data-shell="mobile"] .mobile-model-trigger small {
  color: var(--primary);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.15;
}

body[data-shell="mobile"] .mobile-select-trigger-mark,
body[data-shell="mobile"] .mobile-model-trigger-mark {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(226, 27, 60, 0.28);
  border-radius: 50%;
  position: relative;
}

body[data-shell="mobile"] .mobile-select-trigger-mark::after,
body[data-shell="mobile"] .mobile-model-trigger-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(45deg) translate(-1px, -2px);
}

body[data-shell="mobile"] .mobile-select-trigger.is-disabled,
body[data-shell="mobile"] .mobile-model-trigger.is-disabled {
  cursor: not-allowed !important;
  opacity: 0.58 !important;
}

body[data-shell="mobile"].mobile-select-picker-open,
body[data-shell="mobile"].mobile-model-picker-open {
  overflow: hidden;
}

.mobile-select-sheet[hidden],
.mobile-model-sheet[hidden] {
  display: none !important;
}

body[data-shell="mobile"] .mobile-select-sheet,
body[data-shell="mobile"] .mobile-model-sheet {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  align-items: end;
}

body[data-shell="mobile"] .mobile-model-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 20, 0.58);
}

body[data-shell="mobile"] .mobile-model-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: min(60vh, 420px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 9px;
  padding: 14px 14px calc(16px + env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px 18px 0 0;
  background: #ffffff;
  box-shadow: 0 -18px 42px rgba(13, 17, 24, 0.26);
}

body[data-shell="mobile"] .mobile-model-sheet-head {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

body[data-shell="mobile"] .mobile-model-sheet-head strong {
  display: block;
  color: var(--mobile-ink);
  font-size: 17px;
  font-weight: 950;
  line-height: 1.15;
}

body[data-shell="mobile"] .mobile-model-sheet-head span {
  display: block;
  margin-top: 3px;
  color: var(--mobile-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

body[data-shell="mobile"] .mobile-model-close {
  min-height: 36px !important;
  padding: 0 12px !important;
  border: 1px solid var(--mobile-line) !important;
  border-radius: var(--mobile-radius-sm) !important;
  background: #ffffff !important;
  color: var(--mobile-muted) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}

body[data-shell="mobile"] .mobile-model-options {
  min-height: 0;
  display: grid;
  gap: 7px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 0;
}

body[data-shell="mobile"] .mobile-select-empty {
  min-height: 52px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--mobile-line);
  border-radius: var(--mobile-radius-sm);
  color: var(--mobile-muted);
  font-size: 13px;
  font-weight: 850;
}

body[data-shell="mobile"] .mobile-select-option,
body[data-shell="mobile"] .mobile-model-option {
  min-height: 58px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 24px !important;
  align-items: center !important;
  gap: 11px !important;
  padding: 10px 13px !important;
  border: 1px solid var(--mobile-line) !important;
  border-radius: var(--mobile-radius) !important;
  background: #ffffff !important;
  color: var(--mobile-ink) !important;
  text-align: left !important;
  box-shadow: none !important;
}

body[data-shell="mobile"] .mobile-select-option:disabled,
body[data-shell="mobile"] .mobile-model-option:disabled {
  cursor: not-allowed !important;
  opacity: 0.48 !important;
}

body[data-shell="mobile"] .mobile-select-option.is-selected,
body[data-shell="mobile"] .mobile-model-option.is-selected {
  border-color: rgba(226, 27, 60, 0.56) !important;
  background: #fff7f8 !important;
}

body[data-shell="mobile"] .mobile-select-trigger::after,
body[data-shell="mobile"] .mobile-select-option::after,
body[data-shell="mobile"] .mobile-model-trigger::after,
body[data-shell="mobile"] .mobile-model-option::after,
body[data-shell="mobile"] .mobile-model-close::after {
  display: none !important;
  content: none !important;
}

body[data-shell="mobile"] .mobile-select-trigger,
body[data-shell="mobile"] .mobile-model-trigger,
body[data-shell="mobile"] .mobile-select-option,
body[data-shell="mobile"] .mobile-model-option,
body[data-shell="mobile"] .mobile-model-close {
  cursor: pointer !important;
}

body[data-shell="mobile"] .mobile-model-option-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

body[data-shell="mobile"] .mobile-model-option strong {
  min-width: 0;
  overflow: hidden;
  color: var(--mobile-ink);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-shell="mobile"] .mobile-model-option small {
  color: var(--mobile-muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

body[data-shell="mobile"] .mobile-select-option.is-selected small,
body[data-shell="mobile"] .mobile-model-option.is-selected small {
  color: var(--primary);
}

body[data-shell="mobile"] .mobile-model-option-check {
  width: 22px;
  height: 22px;
  border: 2px solid #a8b0bc;
  border-radius: 50%;
  position: relative;
}

body[data-shell="mobile"] .mobile-model-option.is-selected .mobile-model-option-check {
  border-color: var(--primary);
}

body[data-shell="mobile"] .mobile-model-option.is-selected .mobile-model-option-check::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--primary);
}

body[data-shell="mobile"] .mobile-workflow-param-panel {
  max-height: min(72vh, 620px);
  gap: 10px;
  padding-top: 13px;
  background: #f5f7fa;
}

body[data-shell="mobile"] .mobile-workflow-param-options {
  min-height: 0;
  display: grid;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1px 0 2px;
}

body[data-shell="mobile"] .mobile-workflow-param-section {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid #e3e8f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

body[data-shell="mobile"] .mobile-workflow-param-section-head {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

body[data-shell="mobile"] .mobile-workflow-param-section-head strong {
  flex: 0 0 auto;
  color: var(--mobile-ink);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.15;
}

body[data-shell="mobile"] .mobile-workflow-param-section-head span {
  min-width: 0;
  overflow: hidden;
  color: var(--mobile-muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.15;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-shell="mobile"] .mobile-workflow-param-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

body[data-shell="mobile"] #mobileWorkflowParameterSheet[data-workflow-param-media="video"] .mobile-workflow-param-section[data-param-field="ratio"] .mobile-workflow-param-grid,
body[data-shell="mobile"] #mobileWorkflowParameterSheet[data-workflow-param-media="video"] .mobile-workflow-param-section[data-param-field="audio"] .mobile-workflow-param-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-shell="mobile"] #mobileWorkflowParameterSheet[data-workflow-param-media="image"] .mobile-workflow-param-section[data-param-field="quality"] .mobile-workflow-param-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-shell="mobile"] .mobile-workflow-param-option {
  min-width: 0;
  min-height: 44px !important;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 8px 9px !important;
  border: 1px solid #dbe2ec !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: var(--mobile-ink) !important;
  box-shadow: none !important;
  text-align: left;
  cursor: pointer;
}

body[data-shell="mobile"] .mobile-workflow-param-option:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

body[data-shell="mobile"] .mobile-workflow-param-option.is-selected {
  border-color: rgba(226, 27, 60, 0.74) !important;
  background: #fff6f8 !important;
  color: var(--primary) !important;
  box-shadow: inset 0 0 0 1px rgba(226, 27, 60, 0.12) !important;
}

body[data-shell="mobile"] .mobile-workflow-param-option-mark {
  width: 18px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 4px;
  color: #7b8491;
  opacity: 0.84;
}

body[data-shell="mobile"] .mobile-workflow-param-option.is-selected .mobile-workflow-param-option-mark {
  color: var(--primary);
}

body[data-shell="mobile"] .mobile-workflow-param-option[data-param-value="smart"] .mobile-workflow-param-option-mark,
body[data-shell="mobile"] .mobile-workflow-param-option[data-param-value="1:1"] .mobile-workflow-param-option-mark {
  width: 15px;
  height: 15px;
}

body[data-shell="mobile"] .mobile-workflow-param-option[data-param-value="3:4"] .mobile-workflow-param-option-mark,
body[data-shell="mobile"] .mobile-workflow-param-option[data-param-value="4:5"] .mobile-workflow-param-option-mark,
body[data-shell="mobile"] .mobile-workflow-param-option[data-param-value="9:16"] .mobile-workflow-param-option-mark {
  width: 11px;
  height: 19px;
}

body[data-shell="mobile"] .mobile-workflow-param-section[data-param-field="quality"] .mobile-workflow-param-option,
body[data-shell="mobile"] .mobile-workflow-param-section[data-param-field="speed"] .mobile-workflow-param-option,
body[data-shell="mobile"] .mobile-workflow-param-section[data-param-field="audio"] .mobile-workflow-param-option {
  grid-template-columns: minmax(0, 1fr);
  text-align: center;
}

body[data-shell="mobile"] .mobile-workflow-param-section[data-param-field="quality"] .mobile-workflow-param-option-mark,
body[data-shell="mobile"] .mobile-workflow-param-section[data-param-field="speed"] .mobile-workflow-param-option-mark,
body[data-shell="mobile"] .mobile-workflow-param-section[data-param-field="audio"] .mobile-workflow-param-option-mark {
  display: none;
}

body[data-shell="mobile"] .mobile-workflow-param-option-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

body[data-shell="mobile"] .mobile-workflow-param-option-copy strong {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-shell="mobile"] .mobile-workflow-param-option-copy small {
  display: none;
}

body[data-shell="mobile"] .mobile-workflow-param-option.is-selected .mobile-workflow-param-option-copy small {
  color: var(--primary);
}

body[data-shell="mobile"] .mobile-workflow-param-size {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e3e8f0;
  border-radius: 8px;
  background: #ffffff;
}

body[data-shell="mobile"] .mobile-workflow-param-size span {
  color: var(--mobile-muted);
  font-size: 12px;
  font-weight: 850;
}

body[data-shell="mobile"] .mobile-workflow-param-size strong {
  min-width: 0;
  overflow: hidden;
  color: var(--mobile-ink);
  font-size: 13px;
  font-weight: 950;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-shell="mobile"] label:has(> .mobile-native-select-hidden) {
  align-items: stretch !important;
}

body[data-shell="mobile"][data-page="redeem-codes"] .redeem-admin-form label:has(> .mobile-native-select-hidden),
body[data-shell="mobile"][data-page="admin"] #tokenAdjustForm > label:has(> .mobile-native-select-hidden),
body[data-shell="mobile"][data-page="admin"] .policy-form-grid label:has(> .mobile-native-select-hidden),
body[data-shell="mobile"][data-page="admin"] .member-edit-grid label:has(> .mobile-native-select-hidden),
body[data-shell="mobile"][data-page="assets"] #assetUploadForm label:has(> .mobile-native-select-hidden) {
  align-items: center !important;
}

body[data-shell="mobile"][data-page="redeem-codes"] .redeem-admin-form label > .mobile-select-trigger,
body[data-shell="mobile"][data-page="admin"] #tokenAdjustForm > label > .mobile-select-trigger,
body[data-shell="mobile"][data-page="admin"] .policy-form-grid label > .mobile-select-trigger,
body[data-shell="mobile"][data-page="admin"] .member-edit-grid label > .mobile-select-trigger,
body[data-shell="mobile"][data-page="assets"] #assetUploadForm label > .mobile-select-trigger {
  min-height: 28px !important;
  height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-shell="mobile"][data-page="redeem-codes"] .redeem-admin-form label > .mobile-select-trigger strong,
body[data-shell="mobile"][data-page="admin"] #tokenAdjustForm > label > .mobile-select-trigger strong,
body[data-shell="mobile"][data-page="admin"] .policy-form-grid label > .mobile-select-trigger strong,
body[data-shell="mobile"][data-page="admin"] .member-edit-grid label > .mobile-select-trigger strong,
body[data-shell="mobile"][data-page="assets"] #assetUploadForm label > .mobile-select-trigger strong {
  font-size: 14px !important;
  font-weight: 850 !important;
}

body[data-shell="mobile"][data-page="redeem-codes"] .redeem-admin-form label > .mobile-select-trigger small,
body[data-shell="mobile"][data-page="admin"] #tokenAdjustForm > label > .mobile-select-trigger small,
body[data-shell="mobile"][data-page="admin"] .policy-form-grid label > .mobile-select-trigger small,
body[data-shell="mobile"][data-page="admin"] .member-edit-grid label > .mobile-select-trigger small,
body[data-shell="mobile"][data-page="assets"] #assetUploadForm label > .mobile-select-trigger small {
  display: none !important;
}

body[data-shell="mobile"][data-page="redeem-codes"] .redeem-admin-form label > .mobile-select-trigger .mobile-model-trigger-mark,
body[data-shell="mobile"][data-page="admin"] #tokenAdjustForm > label > .mobile-select-trigger .mobile-model-trigger-mark,
body[data-shell="mobile"][data-page="admin"] .policy-form-grid label > .mobile-select-trigger .mobile-model-trigger-mark,
body[data-shell="mobile"][data-page="admin"] .member-edit-grid label > .mobile-select-trigger .mobile-model-trigger-mark,
body[data-shell="mobile"][data-page="assets"] #assetUploadForm label > .mobile-select-trigger .mobile-model-trigger-mark {
  width: 18px !important;
  height: 18px !important;
  border: 0 !important;
  border-radius: 0 !important;
}

body[data-shell="mobile"] td > .mobile-select-trigger {
  min-width: 112px !important;
}

/* Mobile assets page: remove duplicate hero weight and keep the upload row aligned. */
body[data-shell="mobile"][data-page="assets"] .page-head {
  gap: 0 !important;
  min-height: 0 !important;
  padding: 13px 14px !important;
}

body[data-shell="mobile"][data-page="assets"] .page-head::before {
  content: none !important;
  display: none !important;
}

body[data-shell="mobile"][data-page="assets"] .page-head > div {
  display: grid !important;
  grid-template-columns: 24px max-content minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
}

body[data-shell="mobile"][data-page="assets"] .page-head > div::before {
  content: "" !important;
  width: 22px !important;
  height: 3px !important;
  border-radius: 999px !important;
  background: var(--primary) !important;
}

body[data-shell="mobile"][data-page="assets"] .page-head h1,
body[data-shell="mobile"][data-page="assets"] .page-head .page-actions {
  display: none !important;
}

body[data-shell="mobile"][data-page="assets"] .page-head .eyebrow {
  display: block !important;
  padding-left: 0 !important;
  color: var(--mobile-ink) !important;
  font-size: 16px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="assets"] .page-head p {
  display: block !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  color: var(--mobile-muted) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  -webkit-line-clamp: initial !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel .section-head {
  min-height: 54px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 24px !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  cursor: pointer !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel .section-head > div {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: 24px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel .section-head > div::before {
  content: "" !important;
  width: 22px !important;
  height: 3px !important;
  border-radius: 999px !important;
  background: var(--primary) !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel .section-head h2 {
  min-width: 0 !important;
  margin: 0 !important;
  color: var(--mobile-ink) !important;
  font-size: 16px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel .section-head h2::before {
  content: none !important;
  display: none !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel .section-head span {
  display: none !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel .section-head::after {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  align-self: center !important;
  margin: 0 !important;
  color: var(--primary) !important;
  font-size: 24px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel.mobile-expanded .section-head {
  min-height: 40px !important;
  margin-bottom: 12px !important;
  padding: 0 !important;
}

body[data-shell="mobile"][data-page="tasks"] .panel > .section-head {
  gap: 10px !important;
}

body[data-shell="mobile"][data-page="tasks"] .panel > .section-head .button-group {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 96px 64px !important;
  gap: 8px !important;
}

body[data-shell="mobile"][data-page="tasks"] #taskSearch {
  grid-column: auto !important;
  height: 38px !important;
  min-height: 38px !important;
  padding-block: 0 !important;
}

body[data-shell="mobile"][data-page="tasks"] #mobileTaskStatusPickerButton,
body[data-shell="mobile"][data-page="tasks"] #refreshTaskRows {
  min-height: 40px !important;
}

body[data-shell="mobile"][data-page="tasks"] #refreshTaskRows {
  padding: 0 12px !important;
}

@media (max-width: 430px) {
  body[data-shell="mobile"] main {
    padding-inline: 10px;
  }

  body[data-shell="mobile"] .mobile-appbar {
    min-height: 60px;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 13px;
  }

  body[data-shell="mobile"] .mobile-user {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
  }

  body[data-shell="mobile"] .mobile-user img {
    width: 38px;
    height: 38px;
  }

  body[data-shell="mobile"] .mobile-user strong {
    font-size: 14px;
  }

  body[data-shell="mobile"] .mobile-runtime {
    width: 96px;
    max-width: 24vw;
    min-width: 82px;
    height: auto;
    min-height: 0;
    padding: 0;
  }

  body[data-shell="mobile"] .mobile-kpi-grid {
    gap: 6px;
  }

  body[data-shell="mobile"] .mobile-kpi-grid article {
    min-height: 58px;
    padding: 8px 6px;
  }

  body[data-shell="mobile"] .mobile-kpi-grid span {
    font-size: 9px;
  }

  body[data-shell="mobile"] .mobile-kpi-grid strong {
    font-size: 15px;
  }

  body[data-shell="mobile"] .page-head {
    padding: 15px 14px;
  }

  body[data-shell="mobile"] .page-actions {
    grid-template-columns: 1fr;
  }

  body[data-shell="mobile"][data-page="workflow"] .page-metrics {
    gap: 6px;
  }

  body[data-shell="mobile"][data-page="workflow"] .metric-card {
    padding: 9px 7px;
  }

  body[data-shell="mobile"] .prompt-card .icon-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-shell="mobile"] .batch-summary-metrics {
    gap: 6px;
  }

  body[data-shell="mobile"] .batch-summary-metrics span {
    padding: 8px 6px;
  }

  body[data-shell="mobile"][data-page="results"] .result-card,
  body[data-shell="mobile"][data-page="assets"] .asset-card {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  body[data-shell="mobile"][data-page="results"] .result-card img,
  body[data-shell="mobile"][data-page="assets"] .asset-card img {
    width: 104px;
  }

  body[data-shell="mobile"] .mobile-bottom-nav {
    inset-inline: 7px;
    border-radius: 15px;
  }

  body[data-shell="mobile"] .mobile-bottom-nav nav {
    gap: 4px;
  }

  body[data-shell="mobile"] .mobile-bottom-nav nav > a,
  body[data-shell="mobile"] .mobile-more-trigger {
    font-size: 10px;
  }
}

/* Mobile DEMO UX parity pass: keep IMGX colors, but use compact workbench density. */
body[data-shell="mobile"] {
  --mobile-nav-clearance: calc(var(--mobile-nav-height) + 16px + env(safe-area-inset-bottom));
}

body[data-shell="mobile"] main {
  padding-bottom: var(--mobile-nav-clearance) !important;
}

body[data-shell="mobile"]:not([data-page="workflow"]):not([data-page="assets"]) .page-head {
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 0 8px !important;
  padding: 10px 12px !important;
  overflow: hidden !important;
}

body[data-shell="mobile"]:not([data-page="workflow"]):not([data-page="assets"]) .page-head > div:first-child {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr) !important;
  grid-template-areas:
    "rule title"
    "rule copy" !important;
  align-items: center !important;
  gap: 2px 8px !important;
}

body[data-shell="mobile"]:not([data-page="workflow"]):not([data-page="assets"]) .page-head > div:first-child::before {
  content: "" !important;
  grid-area: rule !important;
  width: 26px !important;
  height: 3px !important;
  border-radius: 999px !important;
  background: var(--primary) !important;
}

body[data-shell="mobile"]:not([data-page="workflow"]):not([data-page="assets"]) .page-head::before,
body[data-shell="mobile"]:not([data-page="workflow"]):not([data-page="assets"]) .page-head::after {
  display: none !important;
  content: none !important;
}

body[data-shell="mobile"]:not([data-page="workflow"]):not([data-page="assets"]) .page-head .eyebrow {
  grid-area: title !important;
  min-width: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  color: var(--mobile-ink) !important;
  font-size: 16px !important;
  font-weight: 950 !important;
  line-height: 1.1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"]:not([data-page="workflow"]):not([data-page="assets"]) .page-head h1 {
  display: none !important;
}

body[data-shell="mobile"]:not([data-page="workflow"]):not([data-page="assets"]) .page-head p {
  grid-area: copy !important;
  display: block !important;
  min-width: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  color: var(--mobile-muted) !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  -webkit-line-clamp: initial !important;
}

body[data-shell="mobile"]:not([data-page="workflow"]):not([data-page="assets"]) .page-actions {
  width: auto !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(64px, auto)) !important;
  gap: 6px !important;
}

body[data-shell="mobile"]:not([data-page="workflow"]):not([data-page="assets"]) .page-actions > * {
  width: auto !important;
  min-width: 0 !important;
  min-height: 34px !important;
  padding: 0 9px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"] .admin-only-panel.is-hidden,
body[data-shell="mobile"] .page-actions.admin-only-panel.is-hidden {
  display: none !important;
}

body[data-shell="mobile"][data-page="admin"] .page-head,
body[data-shell="mobile"][data-page="help"] .page-head,
body[data-shell="mobile"][data-page="account"] .page-head,
body[data-shell="mobile"][data-page="redeem-codes"] .page-head {
  min-height: 58px !important;
}

body[data-shell="mobile"][data-page="results"] main > .panel,
body[data-shell="mobile"][data-page="tasks"] main > .panel,
body[data-shell="mobile"][data-page="templates"] main > .panel,
body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel {
  padding: 12px !important;
}

body[data-shell="mobile"][data-page="results"] .section-head,
body[data-shell="mobile"][data-page="tasks"] .section-head,
body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel .section-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
}

body[data-shell="mobile"][data-page="results"] .section-head .button-group {
  display: flex !important;
  justify-content: flex-end !important;
  justify-self: end !important;
  width: auto !important;
  gap: 7px !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel .section-head .button-group {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(128px, 0.38fr) !important;
  gap: 7px !important;
}

body[data-shell="mobile"][data-page="results"] #resultSearch,
body[data-shell="mobile"][data-page="assets"] #assetSearch {
  grid-column: auto !important;
}

body[data-shell="mobile"][data-page="results"] .inline-check,
body[data-shell="mobile"][data-page="results"] #resultView,
body[data-shell="mobile"][data-page="results"] .toolbar-size-button,
body[data-shell="mobile"][data-page="assets"] #assetTypeFilter,
body[data-shell="mobile"][data-page="tasks"] #mobileTaskStatusPickerButton,
body[data-shell="mobile"][data-page="tasks"] #refreshTaskRows {
  min-height: 38px !important;
  height: 38px !important;
}

body[data-shell="mobile"][data-page="results"] .toolbar-size-button span {
  display: none !important;
}

body[data-shell="mobile"][data-page="results"] .toolbar-size-button {
  width: 100% !important;
  justify-content: center !important;
  padding: 0 6px !important;
}

body[data-shell="mobile"][data-page="results"] .result-size-panel {
  right: 0 !important;
  width: min(306px, calc(100vw - 28px)) !important;
}

body[data-shell="mobile"][data-page="tasks"] .panel > .section-head .button-group {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 96px 64px !important;
  gap: 7px !important;
}

body[data-shell="mobile"][data-page="tasks"] #taskSearch {
  grid-column: auto !important;
  height: 38px !important;
  min-height: 38px !important;
  padding-block: 0 !important;
}

body[data-shell="mobile"][data-page="tasks"] .mobile-task-list,
body[data-shell="mobile"][data-page="templates"] .template-grid {
  gap: 8px !important;
}

body[data-shell="mobile"][data-page="results"] .result-card,
body[data-shell="mobile"][data-page="assets"] .asset-card {
  grid-template-columns: 104px minmax(0, 1fr) !important;
  min-height: 126px !important;
}

body[data-shell="mobile"][data-page="results"] .result-card img,
body[data-shell="mobile"][data-page="assets"] .asset-card img {
  width: 104px !important;
  min-height: 126px !important;
}

body[data-shell="mobile"][data-page="results"] .result-body,
body[data-shell="mobile"][data-page="assets"] .asset-card-body {
  gap: 4px !important;
  padding: 10px 10px 5px !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-card .card-actions,
body[data-shell="mobile"][data-page="results"] .result-card .card-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  padding: 0 10px 10px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-card .card-actions::-webkit-scrollbar,
body[data-shell="mobile"][data-page="results"] .result-card .card-actions::-webkit-scrollbar {
  display: none !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-card .card-actions button,
body[data-shell="mobile"][data-page="results"] .result-card .card-actions button {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 54px !important;
  min-height: 36px !important;
  padding: 0 9px !important;
  font-size: 11px !important;
  box-shadow: none !important;
}

/* BF-01 compact action group for mobile result cards. */
body[data-shell="mobile"][data-page="results"] .result-card .card-actions {
  grid-column: 2 !important;
  grid-row: 2 !important;
  justify-self: start !important;
  width: calc(100% - 10px) !important;
  max-width: calc(100% - 10px) !important;
  margin: 0 10px 8px 0 !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 6px !important;
  border: 1px solid var(--border-light) !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body[data-shell="mobile"][data-page="results"] .result-card .card-actions[data-action-count="4"] {
  grid-template-columns: 42px 42px minmax(57px, 1fr) 42px !important;
}

body[data-shell="mobile"][data-page="results"] .result-card > .result-created-time {
  grid-column: 1 / -1 !important;
  grid-row: 4 !important;
  margin: 0 10px 10px !important;
  justify-self: end !important;
  text-align: right !important;
}

body[data-shell="mobile"][data-page="results"] .result-card .card-actions button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="results"] .result-card::after {
  display: none !important;
  content: none !important;
}

/* Mobile result thumbnails are preview-only: keep every poster the same size and fully visible. */
body[data-shell="mobile"][data-page="results"] .result-card img,
body[data-shell="mobile"][data-page="results"] .result-card video,
body[data-shell="mobile"][data-page="results"] .result-card .result-video-poster {
  width: 104px !important;
  height: 126px !important;
  min-height: 126px !important;
  max-height: 126px !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
  align-self: start !important;
  background: #f6f7f9 !important;
}

body[data-shell="mobile"][data-page="tasks"] .mobile-task-card {
  gap: 8px !important;
  padding: 12px !important;
}

body[data-shell="mobile"][data-page="tasks"] .mobile-task-actions {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 2px 0 0 !important;
}

body[data-shell="mobile"][data-page="tasks"] .mobile-task-actions:has(> :nth-child(3)) {
  grid-template-columns: none !important;
}

body[data-shell="mobile"][data-page="tasks"] .mobile-task-actions:has(> :only-child) {
  grid-template-columns: none !important;
}

body[data-shell="mobile"][data-page="tasks"] .mobile-task-actions > * {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="tasks"] .mobile-task-actions > button.ghost,
body[data-shell="mobile"][data-page="tasks"] .mobile-task-actions > .mobile-task-detail-button {
  border-color: var(--mobile-line, #e4e7ec) !important;
  background: #ffffff !important;
  color: #12151b !important;
}

body[data-shell="mobile"][data-page="tasks"] .mobile-task-actions > button.ghost:hover,
body[data-shell="mobile"][data-page="tasks"] .mobile-task-actions > .mobile-task-detail-button:hover {
  border-color: rgba(226, 27, 60, 0.36) !important;
  background: #fff7f8 !important;
  color: var(--primary, #e21b3c) !important;
}

body[data-shell="mobile"][data-page="tasks"] .mobile-task-actions > button.danger {
  border-color: rgba(186, 18, 48, 0.36) !important;
  background: #ffffff !important;
  color: var(--danger, #ba1230) !important;
}

body[data-shell="mobile"][data-page="tasks"] .mobile-task-main > .mobile-task-progress {
  display: none !important;
}

body[data-shell="mobile"][data-page="tasks"] .mobile-task-foot {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 82px !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  margin-top: -2px !important;
}

body[data-shell="mobile"][data-page="tasks"] .mobile-task-foot .mobile-task-progress {
  display: block !important;
  width: 82px !important;
  min-width: 82px !important;
  justify-self: end !important;
}

body[data-shell="mobile"][data-page="tasks"] .mobile-task-created-time {
  justify-self: stretch !important;
  min-width: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  text-align: left !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="templates"] .template-card {
  min-height: 0 !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas:
    "type action"
    "title action"
    "copy action"
    "meta action" !important;
  align-items: center !important;
  gap: 3px 10px !important;
  padding: 12px !important;
}

body[data-shell="mobile"][data-page="templates"] .template-card > span {
  grid-area: type !important;
  width: fit-content !important;
}

body[data-shell="mobile"][data-page="templates"] .template-card strong {
  grid-area: title !important;
}

body[data-shell="mobile"][data-page="templates"] .template-card p {
  grid-area: copy !important;
  display: -webkit-box !important;
  margin: 0 !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 1 !important;
}

body[data-shell="mobile"][data-page="templates"] .template-card small {
  grid-area: meta !important;
}

body[data-shell="mobile"][data-page="templates"] .template-card button {
  grid-area: action !important;
  width: auto !important;
  min-width: 92px !important;
  min-height: 38px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
}

body[data-shell="mobile"] .empty-state {
  min-height: 88px !important;
  gap: 6px !important;
  padding: 12px !important;
}

body[data-shell="mobile"] .empty-state button {
  min-height: 38px !important;
  padding: 0 12px !important;
}

body[data-shell="mobile"] .empty-state button + button {
  margin-top: 4px !important;
}

body[data-shell="mobile"][data-page="results"] .empty-state {
  min-height: 0 !important;
  grid-template-columns: 1fr 1fr !important;
  align-items: center !important;
  text-align: left !important;
}

body[data-shell="mobile"][data-page="results"] .empty-state strong,
body[data-shell="mobile"][data-page="results"] .empty-state span {
  grid-column: 1 / -1 !important;
  justify-self: stretch !important;
  max-width: none !important;
}

body[data-shell="mobile"][data-page="results"] .empty-state span {
  display: -webkit-box !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 1 !important;
}

body[data-shell="mobile"][data-page="results"] .empty-state button {
  width: 100% !important;
  min-height: 36px !important;
}

body[data-shell="mobile"][data-page="help"] .support-grid {
  gap: 8px !important;
}

body[data-shell="mobile"][data-page="help"] .support-card {
  grid-template-columns: 42px minmax(0, 1fr) !important;
  gap: 4px 10px !important;
  padding: 12px !important;
}

body[data-shell="mobile"][data-page="help"] .support-card > span {
  grid-row: 1 / 3 !important;
  display: grid !important;
  place-items: center !important;
  width: 38px !important;
  min-height: 38px !important;
  border-radius: var(--mobile-radius-sm) !important;
  background: #fff7f8 !important;
  color: var(--primary) !important;
}

body[data-shell="mobile"][data-page="help"] .support-card h2,
body[data-shell="mobile"][data-page="help"] .support-card p {
  margin: 0 !important;
}

body[data-shell="mobile"][data-page="help"] .support-card p {
  display: -webkit-box !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

body[data-shell="mobile"][data-page="help"] .support-card ul {
  grid-column: 2 !important;
  display: -webkit-box !important;
  max-height: 38px !important;
  margin-top: 2px !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

body[data-shell="mobile"] .redeem-status-board {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  overflow: visible !important;
  scrollbar-width: none !important;
}

body[data-shell="mobile"] .redeem-status-board::-webkit-scrollbar {
  display: none !important;
}

body[data-shell="mobile"] .redeem-status-board span {
  min-width: 0 !important;
  min-height: 40px !important;
  padding: 0 7px !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"] .redeem-status-board .recharge-link {
  grid-column: 1 / -1 !important;
  min-width: 0 !important;
  min-height: 38px !important;
}

body[data-shell="mobile"][data-page="redeem-codes"] .account-redeem-panel {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

body[data-shell="mobile"][data-page="redeem-codes"] .account-recharge-panel {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

body[data-shell="mobile"][data-page="redeem-codes"] .account-redeem-panel .section-head {
  margin-bottom: 8px !important;
}

body[data-shell="mobile"][data-page="redeem-codes"] .redeem-form {
  grid-template-columns: minmax(0, 1fr) minmax(98px, 0.32fr) !important;
  gap: 8px !important;
}

body[data-shell="mobile"][data-page="redeem-codes"] #redeemCode,
body[data-shell="mobile"][data-page="redeem-codes"] #redeemBtn {
  min-height: 42px !important;
}

body[data-shell="mobile"] .form-message:empty {
  display: none !important;
  min-height: 0 !important;
  padding: 0 !important;
}

body[data-shell="mobile"][data-page="admin"] #adminHealth {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body[data-shell="mobile"][data-page="admin"] .ops-item {
  min-height: 76px !important;
  padding: 11px !important;
  border-right: 1px solid var(--mobile-line) !important;
}

body[data-shell="mobile"][data-page="admin"] .ops-item:nth-child(2n) {
  border-right: 0 !important;
}

body[data-shell="mobile"][data-page="admin"] .ops-item:nth-last-child(-n + 2) {
  border-bottom: 0 !important;
}

body[data-shell="mobile"][data-page="admin"] #adminModuleEmpty {
  grid-template-columns: 1fr !important;
  min-height: 86px !important;
  padding: 14px !important;
  gap: 10px !important;
}

body[data-shell="mobile"][data-page="admin"] .admin-empty-copy {
  grid-template-columns: 1fr !important;
  gap: 6px !important;
}

body[data-shell="mobile"][data-page="admin"] .admin-module-grid {
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  border: 1px solid #dfe4eb !important;
  border-radius: 8px !important;
}

body[data-shell="mobile"][data-page="admin"] .admin-module-grid .module-card,
body[data-shell="mobile"][data-page="admin"] .admin-module-grid .module-card:nth-child(n + 4) {
  grid-column: auto !important;
}

body[data-shell="mobile"][data-page="admin"] button.module-card {
  min-height: 64px !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  align-content: center !important;
  align-items: center !important;
  gap: 0 !important;
  padding: 11px 12px !important;
  border-right: 0 !important;
  border-bottom: 1px solid #e5eaf2 !important;
}

body[data-shell="mobile"][data-page="admin"] .admin-module-grid .module-card:last-child {
  border-bottom: 0 !important;
}

body[data-shell="mobile"][data-page="admin"] .module-card-index {
  width: auto !important;
  margin: 0 0 5px !important;
  background: transparent !important;
}

body[data-shell="mobile"][data-page="admin"] .module-card-copy {
  gap: 0 !important;
  padding: 0 !important;
}

body[data-shell="mobile"][data-page="admin"] .module-card-top {
  width: 100% !important;
  gap: 8px !important;
}

body[data-shell="mobile"][data-page="admin"] .module-card-title,
body[data-shell="mobile"][data-page="admin"] .module-card-desc,
body[data-shell="mobile"][data-page="admin"] .module-card-meta {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="admin"] .module-card-title {
  font-size: 15px !important;
}

body[data-shell="mobile"][data-page="admin"] .module-card-desc {
  display: none !important;
  min-height: 0 !important;
}

body[data-shell="mobile"][data-page="admin"] .module-card-meta {
  max-width: 100% !important;
}

body[data-shell="mobile"][data-page="admin"] .module-card-action {
  display: none !important;
}

body[data-shell="mobile"][data-page="account"] .account-security-panel {
  min-height: 0 !important;
  padding: 12px !important;
}

body[data-shell="mobile"][data-page="account"] .account-security-panel .section-head {
  margin-bottom: 8px !important;
}

/* Mobile assets page: remove the duplicated mini hero and keep upload/list panels on one visual contract. */
body[data-shell="mobile"][data-page="assets"] main {
  gap: 8px !important;
}

body[data-shell="mobile"][data-page="assets"] .mobile-appbar {
  margin-bottom: 8px !important;
}

body[data-shell="mobile"][data-page="assets"] main > .page-head {
  display: none !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout {
  gap: 8px !important;
  margin-top: 8px !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel,
body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel {
  border: 1px solid var(--mobile-line) !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.08) !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel {
  padding: 0 !important;
  margin-bottom: 0 !important;
  overflow: hidden !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel {
  padding: 14px !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel .section-head,
body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel > .section-head {
  min-height: 56px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel .section-head {
  padding: 0 14px !important;
  cursor: pointer !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel > .section-head {
  padding: 0 0 10px !important;
  border-bottom: 1px solid var(--mobile-line) !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel .section-head > div,
body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel > .section-head > div {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: 26px minmax(0, 1fr) !important;
  grid-auto-rows: min-content !important;
  align-items: center !important;
  gap: 0 10px !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel .section-head > div::before,
body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel > .section-head > div::before {
  content: "" !important;
  width: 22px !important;
  height: 3px !important;
  border-radius: 999px !important;
  background: var(--primary) !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel .section-head h2,
body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel > .section-head h2 {
  min-width: 0 !important;
  margin: 0 !important;
  color: var(--mobile-ink) !important;
  font-size: 16px !important;
  font-weight: 950 !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel .section-head h2::before,
body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel > .section-head h2::before {
  content: none !important;
  display: none !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel .section-head > div > span,
body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel > .section-head > div > span {
  grid-column: 2 !important;
  min-width: 0 !important;
  color: var(--mobile-muted) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 1.25 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel .section-head span {
  display: none !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel .section-head::after {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  align-self: center !important;
  margin: 0 !important;
  color: var(--primary) !important;
  font-size: 24px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel.mobile-expanded {
  padding: 14px !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel.mobile-expanded .section-head {
  min-height: 44px !important;
  padding: 0 0 10px !important;
  border-bottom: 1px solid var(--mobile-line) !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > aside.panel.mobile-expanded .section-head span {
  display: block !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel > .section-head .button-group {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(128px, 0.38fr) !important;
  gap: 7px !important;
  margin-top: 6px !important;
}

/* Final asset-list correction: title red rule must not be inherited by the filter toolbar. */
body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel > .section-head > .button-group {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 112px !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin-top: 8px !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel > .section-head > .button-group::before {
  content: none !important;
  display: none !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel > .section-head > .button-group #assetSearch,
body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel > .section-head > .button-group #assetTypeFilter,
body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel > .section-head > .button-group #mobileAssetTypeFilterPickerButton {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 40px !important;
  min-height: 40px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  box-sizing: border-box !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel > .section-head > .button-group #mobileAssetTypeFilterPickerButton {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 16px !important;
  gap: 4px !important;
  padding: 0 8px !important;
  border-color: var(--mobile-line-strong) !important;
  border-radius: var(--mobile-radius-sm) !important;
  background: #ffffff !important;
  color: var(--mobile-ink) !important;
  box-shadow: none !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel > .section-head > .button-group #mobileAssetTypeFilterPickerButton .mobile-select-trigger-copy {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel > .section-head > .button-group #mobileAssetTypeFilterPickerButton strong {
  display: block !important;
  overflow: hidden !important;
  color: var(--mobile-ink) !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  text-align: center !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel > .section-head > .button-group #mobileAssetTypeFilterPickerButton small {
  display: none !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel > .section-head > .button-group #mobileAssetTypeFilterPickerButton .mobile-model-trigger-mark {
  width: 16px !important;
  height: 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-card .card-actions {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 0 10px 10px !important;
  overflow: hidden !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-card .card-actions button {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 36px !important;
  padding: 0 4px !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}

/* Final mobile account input affordance: clear caret without bringing back inner pink capsules. */
body[data-shell="mobile"][data-page="account"] .account-profile-panel .profile-form-section label:not(.profile-wide-field) input:not([readonly]),
body[data-shell="mobile"][data-page="account"] .account-profile-panel .profile-form-section label:not(.profile-wide-field) select,
body[data-shell="mobile"][data-page="account"] .account-security-panel .profile-password-form label input {
  min-height: 24px !important;
  padding-left: 7px !important;
  caret-color: var(--mobile-accent, #e21b3c) !important;
}

body[data-shell="mobile"][data-page="account"] .account-profile-panel .profile-form-section label:not(.profile-wide-field) input:not([readonly]):focus,
body[data-shell="mobile"][data-page="account"] .account-profile-panel .profile-form-section label:not(.profile-wide-field) input:not([readonly]):focus-visible,
body[data-shell="mobile"][data-page="account"] .account-profile-panel .profile-form-section label:not(.profile-wide-field) select:focus,
body[data-shell="mobile"][data-page="account"] .account-profile-panel .profile-form-section label:not(.profile-wide-field) select:focus-visible,
body[data-shell="mobile"][data-page="account"] .account-security-panel .profile-password-form label input:focus,
body[data-shell="mobile"][data-page="account"] .account-security-panel .profile-password-form label input:focus-visible {
  outline: 0 !important;
  border-color: transparent !important;
  box-shadow: inset 2px 0 0 rgba(226, 27, 60, 0.82) !important;
}

body[data-shell="mobile"][data-page="account"] .account-profile-panel .profile-form-section label:not(.profile-wide-field):focus-within input:not([readonly]),
body[data-shell="mobile"][data-page="account"] .account-profile-panel .profile-form-section label:not(.profile-wide-field):focus-within select,
body[data-shell="mobile"][data-page="account"] .account-security-panel .profile-password-form label:focus-within input {
  box-shadow: inset 2px 0 0 rgba(226, 27, 60, 0.82) !important;
}

/* Global input caret visibility: every editable text field should show a clear IMGX red caret. */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([readonly]):not([disabled]),
textarea:not([readonly]):not([disabled]) {
  caret-color: var(--primary, #e21b3c) !important;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([readonly]):not([disabled]):focus,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([readonly]):not([disabled]):focus-visible,
textarea:not([readonly]):not([disabled]):focus,
textarea:not([readonly]):not([disabled]):focus-visible {
  border-color: var(--primary, #e21b3c) !important;
  box-shadow: 0 0 0 3px rgba(226, 27, 60, 0.12) !important;
  outline: 0 !important;
}

body[data-shell="mobile"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([readonly]):not([disabled]),
body[data-shell="mobile"] textarea:not([readonly]):not([disabled]) {
  caret-color: var(--mobile-accent, #e21b3c) !important;
}

body[data-shell="mobile"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([readonly]):not([disabled]):focus,
body[data-shell="mobile"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([readonly]):not([disabled]):focus-visible,
body[data-shell="mobile"] textarea:not([readonly]):not([disabled]):focus,
body[data-shell="mobile"] textarea:not([readonly]):not([disabled]):focus-visible {
  border-color: var(--mobile-accent, #e21b3c) !important;
  box-shadow: 0 0 0 3px rgba(226, 27, 60, 0.12) !important;
  outline: 0 !important;
}

body[data-shell="mobile"][data-page="redeem-codes"] .redeem-admin-form label:focus-within,
body[data-shell="mobile"][data-page="admin"] #tokenAdjustForm > label:focus-within,
body[data-shell="mobile"][data-page="admin"] .policy-form-grid label:focus-within,
body[data-shell="mobile"][data-page="admin"] .member-edit-grid label:focus-within,
body[data-shell="mobile"][data-page="assets"] #assetUploadForm label:focus-within {
  border-color: rgba(226, 27, 60, 0.42) !important;
  box-shadow: 0 0 0 1px rgba(226, 27, 60, 0.08) !important;
}

body[data-shell="mobile"][data-page="redeem-codes"] .redeem-admin-form label:focus-within input:not([readonly]),
body[data-shell="mobile"][data-page="admin"] #tokenAdjustForm > label:focus-within input:not([readonly]),
body[data-shell="mobile"][data-page="admin"] .policy-form-grid label:focus-within input:not([readonly]),
body[data-shell="mobile"][data-page="admin"] .member-edit-grid label:focus-within input:not([readonly]),
body[data-shell="mobile"][data-page="assets"] #assetUploadForm label:focus-within input:not([readonly]) {
  box-shadow: inset 2px 0 0 rgba(226, 27, 60, 0.82) !important;
}

body[data-shell="mobile"][data-page="assets"] #assetSearch {
  min-height: 40px !important;
  height: 40px !important;
  font-size: 13px !important;
  line-height: 18px !important;
}

body[data-shell="mobile"][data-page="redeem-codes"] .redeem-admin-form label input:not([readonly]),
body[data-shell="mobile"][data-page="admin"] #tokenAdjustForm > label input:not([readonly]),
body[data-shell="mobile"][data-page="admin"] .policy-form-grid label input:not([readonly]),
body[data-shell="mobile"][data-page="admin"] .member-edit-grid label input:not([readonly]) {
  min-height: 24px !important;
  height: 24px !important;
  line-height: 24px !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-layout > .panel > .section-head > .button-group #assetSearch {
  min-height: 40px !important;
  height: 40px !important;
  font-size: 13px !important;
  line-height: 18px !important;
  caret-color: var(--mobile-accent, #e21b3c) !important;
}

/* Final DEMO-aligned account and button system: compact, readable, one primary action per cluster. */
.topbar .status #userEmailPill,
.topbar .status #userEmailPill:hover {
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  line-height: normal !important;
}

.topbar .status #userEmailPill::before,
.topbar .account-menu-shell strong::before,
.topbar .account-menu-shell span::before,
.topbar .account-menu-shell em::before {
  display: none !important;
  content: none !important;
}

.topbar .account-menu-shell {
  max-width: min(280px, 24vw) !important;
}

.topbar .status .account-shortcut,
.topbar .status button.account-shortcut {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 10px 0 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #12151b !important;
  box-shadow: none !important;
  line-height: normal !important;
}

.topbar .status .account-shortcut-copy {
  display: grid !important;
  grid-template-rows: auto auto !important;
  gap: 4px !important;
  min-width: 0 !important;
  max-width: 168px !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.topbar .status .account-shortcut-copy strong,
.topbar .status .account-shortcut-copy em {
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 168px !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  text-transform: none !important;
}

.topbar .status .account-shortcut-copy strong {
  color: #12151b !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.08 !important;
}

.topbar .status .account-shortcut-copy em {
  color: #68717e !important;
  font-size: 11px !important;
  font-style: normal !important;
  font-weight: 750 !important;
  line-height: 1.08 !important;
}

.topbar .status .account-menu-chevron {
  margin-left: 2px !important;
}

button,
.ghost-link,
.avatar-upload-button,
.data-panel-toggle {
  min-height: 40px !important;
  height: auto;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 15px !important;
  border: 1px solid var(--primary, #e21b3c) !important;
  border-radius: var(--control-radius, 6px) !important;
  background: var(--primary, #e21b3c) !important;
  color: #ffffff !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease !important;
}

button:hover,
.ghost-link:hover,
.avatar-upload-button:hover,
.data-panel-toggle:hover {
  border-color: var(--primary-hover, #ba1230) !important;
  background: var(--primary-hover, #ba1230) !important;
  color: #ffffff !important;
}

button.ghost,
.ghost-link,
button.mini,
.data-panel-toggle,
.avatar-upload-button {
  border-color: var(--border, #e4e7ec) !important;
  background: #ffffff !important;
  color: #12151b !important;
  box-shadow: none !important;
}

button.ghost:hover,
.ghost-link:hover,
button.mini:hover,
.data-panel-toggle:hover,
.avatar-upload-button:hover {
  border-color: rgba(226, 27, 60, 0.36) !important;
  background: #fff7f8 !important;
  color: var(--primary, #e21b3c) !important;
}

button.secondary,
.page-actions > :first-child,
.page-head .page-actions > :first-child {
  border-color: var(--primary, #e21b3c) !important;
  background: var(--primary, #e21b3c) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

button.secondary:hover,
.page-actions > :first-child:hover,
.page-head .page-actions > :first-child:hover {
  border-color: var(--primary-hover, #ba1230) !important;
  background: var(--primary-hover, #ba1230) !important;
  color: #ffffff !important;
}

.page-actions > :not(:first-child),
.page-head .page-actions > :not(:first-child),
.page-head .page-actions .ghost-link:not(:first-child),
.page-head .page-actions button.ghost,
.page-head .page-actions #exportCodes {
  border-color: #ffffff !important;
  background: #ffffff !important;
  color: #12151b !important;
  box-shadow: none !important;
}

.page-actions > :not(:first-child):hover,
.page-head .page-actions > :not(:first-child):hover,
.page-head .page-actions .ghost-link:not(:first-child):hover,
.page-head .page-actions button.ghost:hover,
.page-head .page-actions #exportCodes:hover {
  border-color: var(--primary, #e21b3c) !important;
  background: #ffffff !important;
  color: var(--primary, #e21b3c) !important;
}

body[data-page="admin"] .result-preview-dialog .dialog-head button.ghost {
  border-color: #d9dee7 !important;
  background: #ffffff !important;
  color: #12151b !important;
  box-shadow: none !important;
}

body[data-page="admin"] .result-preview-dialog .dialog-head button.ghost:hover {
  border-color: color-mix(in srgb, var(--primary) 44%, #d9dee7) !important;
  background: #fff7f8 !important;
  color: var(--primary) !important;
}

body[data-page="admin"] .result-preview-dialog .dialog-head .preview-download {
  min-width: 58px !important;
}

.page-head .page-actions > :first-child,
.page-head .page-actions > button.ghost:first-child,
.page-head .page-actions > .ghost-link:first-child {
  border-color: var(--primary, #e21b3c) !important;
  background: var(--primary, #e21b3c) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.page-head .page-actions > :first-child:hover,
.page-head .page-actions > button.ghost:first-child:hover,
.page-head .page-actions > .ghost-link:first-child:hover {
  border-color: var(--primary-hover, #ba1230) !important;
  background: var(--primary-hover, #ba1230) !important;
  color: #ffffff !important;
}

button.danger {
  border-color: rgba(186, 18, 48, 0.36) !important;
  background: #ffffff !important;
  color: var(--danger, #ba1230) !important;
  box-shadow: none !important;
}

button.danger:hover {
  border-color: var(--danger, #ba1230) !important;
  background: var(--danger-soft, #fef0f0) !important;
  color: var(--danger, #ba1230) !important;
}

body[data-page="admin"] .member-edit-shell .dialog-head .member-edit-head-actions button {
  border-color: rgba(186, 18, 48, 0.36) !important;
  background: #ffffff !important;
  color: var(--danger, #ba1230) !important;
}

body[data-page="admin"] .member-edit-shell .dialog-head .member-edit-head-actions button:hover {
  border-color: var(--danger, #ba1230) !important;
  background: var(--danger-soft, #fef0f0) !important;
  color: var(--danger, #ba1230) !important;
}

body[data-page="admin"] .member-edit-shell .dialog-head .member-edit-head-actions button.danger {
  border-color: var(--danger, #ba1230) !important;
  background: var(--danger, #ba1230) !important;
  color: #ffffff !important;
}

body[data-page="admin"] .member-edit-shell .dialog-head .member-edit-head-actions button.danger:hover {
  border-color: var(--primary-hover, #ba1230) !important;
  background: var(--primary-hover, #ba1230) !important;
  color: #ffffff !important;
}

body[data-page="admin"] .member-edit-shell .dialog-head .member-edit-head-actions button:disabled {
  border-color: #a8adb5 !important;
  background: #a8adb5 !important;
  color: #ffffff !important;
}

.app-confirm-actions .app-confirm-submit,
.app-confirm-actions button.app-confirm-submit.danger {
  border-color: var(--primary, #e21b3c) !important;
  background: var(--primary, #e21b3c) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(226, 27, 60, 0.22) !important;
}

.app-confirm-actions .app-confirm-submit:hover,
.app-confirm-actions button.app-confirm-submit.danger:hover {
  border-color: var(--primary-hover, #ba1230) !important;
  background: var(--primary-hover, #ba1230) !important;
  color: #ffffff !important;
}

button.mini,
.tiny {
  min-height: 32px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
}

button::after,
.ghost-link::after,
.avatar-upload-button::after,
.data-panel-toggle::after {
  display: none !important;
  content: none !important;
}

body[data-shell="mobile"] button,
body[data-shell="mobile"] .ghost-link,
body[data-shell="mobile"] .avatar-upload-button,
body[data-shell="mobile"] .data-panel-toggle {
  min-height: 40px !important;
  padding: 0 12px !important;
  border-radius: var(--mobile-radius-sm, 8px) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body[data-page="admin"] button.module-card,
body[data-shell="mobile"][data-page="admin"] button.module-card {
  display: grid !important;
  grid-template-columns: 1fr !important;
  align-content: center !important;
  align-items: center !important;
  justify-content: stretch !important;
  min-height: 74px !important;
  padding: 12px 14px !important;
  border-color: #e5eaf2 !important;
  background: transparent !important;
  color: #12151b !important;
  box-shadow: none !important;
  text-align: left !important;
  white-space: normal !important;
}

body[data-page="admin"] button.module-card:hover,
body[data-page="admin"] button.module-card:focus-visible,
body[data-shell="mobile"][data-page="admin"] button.module-card:hover,
body[data-shell="mobile"][data-page="admin"] button.module-card:focus-visible {
  border-color: #e5eaf2 !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}

body[data-page="admin"] button.module-card.is-active,
body[data-shell="mobile"][data-page="admin"] button.module-card.is-active {
  border-color: #e5eaf2 !important;
  background: #fff7f9 !important;
  box-shadow: 0 0 0 1px rgba(230, 0, 51, 0.12) !important;
}

body[data-shell="mobile"][data-page="admin"] button.module-card {
  min-height: 64px !important;
  padding: 11px 12px !important;
  border-right: 0 !important;
  border-bottom: 1px solid #e5eaf2 !important;
}

body[data-shell="mobile"][data-page="admin"] .admin-module-grid .module-card:last-child {
  border-bottom: 0 !important;
}

body[data-page="training-videos"] .training-share-shell:empty {
  display: none;
}

body[data-page="training-videos"]:has(.training-share-shell:not(:empty)) .training-app-only,
body[data-page="training-videos"]:has(.training-share-shell:not(:empty)) .topbar,
body[data-page="training-videos"]:has(.training-share-shell:not(:empty)) .sidebar,
body[data-page="training-videos"]:has(.training-share-shell:not(:empty)) .mobile-appbar,
body[data-page="training-videos"]:has(.training-share-shell:not(:empty)) .mobile-bottom-nav {
  display: none !important;
}

body[data-page="training-videos"]:has(.training-share-shell:not(:empty)) main {
  margin: 0 !important;
  min-height: 100vh;
  padding: 0;
  background: #eef1f5;
}

body[data-page="training-videos"] .page-head {
  min-height: 104px;
  align-items: center;
  margin: 0;
  padding: 18px 24px;
  border: 1px solid var(--border, #e4e7ec);
  border-radius: 8px;
  background: var(--surface, #ffffff);
  box-shadow: var(--shadow-card, 0 18px 50px rgba(15, 23, 42, 0.08));
  color: var(--text, #111827);
}

body[data-page="training-videos"] .page-head::before,
body[data-page="training-videos"] .page-head::after {
  display: none;
}

body[data-page="training-videos"] .page-head h1 {
  max-width: none;
  margin: 6px 0 0;
  color: var(--text, #111827);
  font-size: 30px;
  font-weight: 950;
  line-height: 1.05;
}

body[data-page="training-videos"] .page-head p {
  max-width: none;
  margin-top: 6px;
  color: var(--muted, #68717e);
  font-size: 13px;
  line-height: 1.45;
}

body[data-page="training-videos"] .page-head .eyebrow {
  color: var(--text, #111827);
}

body[data-page="training-videos"] .training-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--border, #e4e7ec);
  border-radius: 8px;
  background: var(--surface, #ffffff);
  box-shadow: var(--shadow-card, 0 18px 50px rgba(15, 23, 42, 0.08));
}

body[data-page="training-videos"] .training-status-strip article {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 12px 16px;
  border-right: 1px solid var(--border, #e4e7ec);
}

body[data-page="training-videos"] .training-status-strip article:last-child {
  border-right: 0;
}

body[data-page="training-videos"] .training-status-strip span,
body[data-page="training-videos"] .training-status-strip small {
  overflow: hidden;
  color: var(--muted, #68717e);
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="training-videos"] .training-status-strip strong {
  overflow: hidden;
  color: var(--text, #111827);
  font-size: 20px;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.training-layout,
.training-management {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, .85fr);
  gap: 16px;
  align-items: start;
}

.training-management {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  margin-top: 12px;
}

.training-side-tools {
  display: grid;
  gap: 12px;
}

body[data-page="training-videos"] .training-layout {
  margin-top: 12px;
}

body[data-page="training-videos"] .training-layout:has(.training-player-panel[hidden]) {
  display: none;
}

body[data-page="training-videos"] .training-management > .panel,
body[data-page="training-videos"] .training-side-tools > .panel {
  border-radius: 8px;
}

body[data-page="training-videos"] .training-management > .panel {
  min-height: 0;
}

body[data-page="training-videos"] .training-side-tools .panel.tight {
  padding: 16px;
}

body[data-page="training-videos"] .training-side-tools .form-stack {
  gap: 10px;
}

body[data-page="training-videos"] .training-side-tools label {
  gap: 5px;
  font-size: 12px;
  line-height: 1.35;
}

body[data-page="training-videos"] .training-side-tools input,
body[data-page="training-videos"] .training-side-tools select,
body[data-page="training-videos"] .training-side-tools textarea {
  min-height: 38px;
  font-size: 13px;
}

body[data-page="training-videos"] .training-side-tools textarea {
  min-height: 68px;
  resize: vertical;
}

body[data-page="training-videos"] .training-side-tools button:not(.mini) {
  min-height: 40px;
}

body[data-page="training-videos"] .panel .section-head {
  min-height: 46px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border, #e4e7ec);
}

body[data-page="training-videos"] .training-list-head {
  align-items: center;
  gap: 12px;
}

body[data-page="training-videos"] .training-list-head > div {
  min-width: 0;
}

body[data-page="training-videos"] .panel .section-head h2 {
  font-size: 16px;
  font-weight: 950;
}

body[data-page="training-videos"] .panel .section-head span {
  font-size: 12px;
  line-height: 1.35;
}

body[data-page="training-videos"] .training-refresh-button {
  flex: 0 0 auto;
  min-width: 64px !important;
  min-height: 32px !important;
  padding: 0 12px !important;
}

body[data-page="training-videos"] #trainingListMessage {
  margin-top: -2px;
}

.training-player-panel[hidden] {
  display: none !important;
}

.training-player-panel .section-head {
  align-items: center;
}

.training-player-panel video,
.training-share-player video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #06080c;
  border: 1px solid var(--border, #e4e7ec);
  border-radius: 8px;
  display: block;
}

.training-player-panel[data-aspect-ratio="9:16"] video,
.training-share-video-frame[data-aspect-ratio="9:16"] video {
  width: min(100%, 420px);
  max-height: min(76vh, 760px);
  margin-inline: auto;
  aspect-ratio: 9 / 16;
  object-fit: contain;
}

.training-player-panel[data-aspect-ratio="16:9"] video,
.training-share-video-frame[data-aspect-ratio="16:9"] video {
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.training-upload-progress {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid var(--border, #e4e7ec);
  border-radius: 8px;
  background: #fff;
}

.training-upload-progress[hidden] {
  display: none !important;
}

.training-upload-progress-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  line-height: 1.2;
}

.training-upload-progress-copy strong {
  color: var(--primary, #e21b3c);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.training-upload-progress-copy span {
  min-width: 0;
  color: var(--muted, #68717e);
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.training-upload-detail {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--muted, #68717e);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.training-upload-detail[hidden] {
  display: none !important;
}

.training-upload-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

body[data-page="training-videos"] .training-upload-actions button.mini {
  min-height: 30px;
  min-width: 48px;
  padding: 0 10px;
}

.training-upload-progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eadfe1;
}

.training-upload-progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--primary, #e21b3c);
  transition: width 0.18s ease;
}

.training-video-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.training-video-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid var(--border, #e4e7ec);
  border-radius: 8px;
  background: #ffffff;
}

.training-video-card.is-editing {
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
}

body[data-page="training-videos"] .training-video-card .card-actions {
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

body[data-page="training-videos"] .training-video-card .card-actions button {
  min-width: 48px;
  padding-inline: 10px;
}

body[data-page="training-videos"] .training-video-card .card-actions button:first-child {
  border-color: var(--primary, #e21b3c) !important;
  background: var(--primary, #e21b3c) !important;
  color: #ffffff !important;
}

body[data-page="training-videos"] .training-video-card .card-actions button:first-child:hover {
  border-color: var(--primary-hover, #ba1230) !important;
  background: var(--primary-hover, #ba1230) !important;
  color: #ffffff !important;
}

.training-video-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.training-video-meta strong {
  font-size: 14px;
  font-weight: 950;
}

.training-video-meta span,
.training-video-meta small {
  font-size: 12px;
  line-height: 1.35;
}

.training-video-meta strong,
.training-video-meta span,
.training-video-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.training-video-meta span,
.training-video-meta small,
.training-access-row small {
  color: var(--muted, #68717e);
}

.training-video-edit {
  grid-column: auto;
  display: grid;
  grid-template-columns: minmax(180px, .9fr) minmax(220px, 1.1fr) minmax(180px, .75fr) auto;
  gap: 8px;
  align-items: end;
  padding-top: 10px;
  border-top: 1px solid var(--border, #e4e7ec);
}

.training-video-edit label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted, #68717e);
  font-size: 12px;
  line-height: 1.25;
}

.training-video-edit input,
.training-video-edit textarea {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--border, #e4e7ec);
  border-radius: 6px;
  background: #fff;
  color: var(--text, #111827);
  font: inherit;
  font-size: 13px;
}

.training-video-edit textarea {
  min-height: 34px;
  resize: vertical;
}

.training-video-ratio-field {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.training-video-ratio-field legend {
  grid-column: 1 / -1;
  color: var(--muted, #68717e);
  font-size: 12px;
  line-height: 1.25;
}

.training-video-ratio-field label {
  position: relative;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid var(--border, #e4e7ec);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text, #111827);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.training-video-ratio-field label:has(input:checked) {
  border-color: var(--primary, #e21b3c);
  background: #fff7f8;
  color: var(--primary, #e21b3c);
  box-shadow: inset 0 0 0 1px var(--primary, #e21b3c);
}

.training-video-ratio-field input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.training-video-ratio-field span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.training-video-edit-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.training-radio-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.training-radio-row label {
  position: relative;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px 0 34px;
  border: 1px solid var(--border, #e4e7ec);
  border-radius: 6px;
  background: var(--surface, #ffffff);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
}

.training-radio-row label:has(input:checked) {
  border-color: var(--primary, #e21b3c);
  background: #fff7f8;
  color: var(--primary, #e21b3c);
  box-shadow: inset 0 0 0 1px var(--primary, #e21b3c);
}

.training-radio-row label::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  border: 1px solid #9aa3af;
  border-radius: 999px;
  background: #ffffff;
}

.training-radio-row label:has(input:checked)::before {
  border-color: var(--primary, #e21b3c);
  background: radial-gradient(circle at center, var(--primary, #e21b3c) 0 45%, transparent 49%);
}

.training-radio-row input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.training-radio-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.training-access-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.training-access-list > span {
  color: var(--muted, #68717e);
  font-size: 13px;
}

.training-access-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--border, #e4e7ec);
  border-radius: 6px;
  background: var(--surface-2, #f6f3ee);
}

.training-share-manage-row.is-editing {
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
}

.training-share-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.training-access-row > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.training-access-row strong,
.training-access-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.training-share-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border, #e4e7ec);
}

.training-share-edit label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted, #68717e);
  font-size: 12px;
  font-weight: 800;
}

.training-share-edit select,
.training-share-edit input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--border, #e4e7ec);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text, #12151b);
  font-size: 13px;
  font-weight: 750;
}

.training-share-edit .training-radio-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.training-share-edit .training-radio-row label {
  min-height: 36px;
  padding-left: 28px;
}

.training-share-edit .training-radio-row label::before {
  left: 8px;
}

.training-share-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.training-copy-dialog {
  width: min(620px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--border, #e4e7ec);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text, #111827);
  overflow: hidden;
  box-shadow: 0 24px 72px rgba(13, 17, 24, .26);
}

.training-copy-dialog::backdrop {
  background: rgba(11, 15, 21, .52);
}

.training-copy-shell {
  display: grid;
  min-width: 0;
}

.training-copy-head {
  align-items: flex-start;
  gap: 14px;
  margin: 0;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border, #e4e7ec);
  background: #ffffff;
}

.training-copy-head > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.training-copy-head strong {
  color: var(--text, #111827);
  font-size: 16px;
  font-weight: 950;
  line-height: 1.25;
}

.training-copy-head span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted, #68717e);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.training-copy-body {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  background: #f6f3ee;
}

.training-copy-body label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted, #68717e);
  font-size: 12px;
  font-weight: 900;
}

.training-copy-body input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border, #e4e7ec);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text, #111827);
  font-size: 13px;
  font-weight: 800;
}

.training-copy-actions {
  margin: 0;
  padding: 14px 18px;
}

.training-share-shell {
  width: min(960px, 100%);
  margin: 0 auto;
}

.training-share-page {
  min-height: 100vh;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 22px 22px 112px;
  color: var(--text, #111827);
}

.training-share-identity {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 18px 22px;
  border: 1px solid #e3e7ee;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

.training-temp-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 3px solid #eef1f5;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff5f7, #e21b3c);
  color: #ffffff;
  font-size: 22px;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6);
}

.training-share-identity strong,
.training-share-identity small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.training-share-identity strong {
  color: #12151b;
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 950;
  line-height: 1.05;
}

.training-share-identity strong span {
  margin-right: .3em;
  color: var(--primary, #e21b3c);
}

.training-share-identity small {
  margin-top: 8px;
  color: #68717e;
  font-size: 16px;
  font-weight: 900;
}

.training-share-identity img {
  width: 160px;
  max-height: 56px;
  object-fit: contain;
}

.training-share-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 18px;
  min-height: 260px;
  padding: 46px 38px 36px;
  border-radius: 28px;
  background: linear-gradient(145deg, #171c25 0%, #101722 52%, #090d14 100%);
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .22);
}

.training-share-hero > span {
  color: rgba(255, 255, 255, .64);
  font-size: 20px;
  font-weight: 950;
}

.training-share-hero h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(38px, 7vw, 66px);
  font-weight: 950;
  line-height: 1.06;
  letter-spacing: 0;
}

.training-share-hero p {
  max-width: 820px;
  margin: 0;
  color: rgba(255, 255, 255, .74);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.5;
}

.training-share-hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 6px;
}

.training-share-player {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid #e3e7ee;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

.training-share-section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #12151b;
  font-size: 24px;
  font-weight: 950;
}

.training-share-section-title i {
  width: 56px;
  height: 6px;
  background: var(--primary, #e21b3c);
}

.training-share-video-frame {
  overflow: hidden;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  background: #05070a;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .16);
}

.training-share-video-frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  display: block;
  border: 0;
  border-radius: 0;
  background: #05070a;
}

.training-share-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-page="training-videos"] .training-share-actions span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #e3e7ee;
  border-radius: 8px;
  background: #f8fafc;
  color: #4d5562;
  font-size: 13px;
  font-weight: 900;
}

.training-share-notice {
  padding: 10px 12px;
  border: 1px solid #f2c94c;
  border-radius: 8px;
  background: #fff8df;
  color: #6b4d00;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.training-share-notice[hidden] {
  display: none !important;
}

body[data-page="training-videos"] .training-share-hero-actions button,
body[data-page="training-videos"] .training-share-bottom-nav button {
  border-radius: 8px;
  font-weight: 950;
}

body[data-page="training-videos"] .training-share-hero-actions button {
  min-width: 168px;
  min-height: 56px;
}

.training-share-bottom-nav {
  position: fixed;
  left: max(14px, calc(50% - 480px));
  right: max(14px, calc(50% - 480px));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 24px;
  background: rgba(12, 17, 25, .97);
  box-shadow: 0 -14px 36px rgba(13, 17, 24, .28);
}

.training-share-bottom-nav button {
  min-height: 66px;
  display: grid;
  place-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .68);
  font-size: 13px;
  cursor: pointer;
}

.training-share-bottom-nav button span {
  font-size: 22px;
  line-height: 1;
}

.training-share-bottom-nav button.is-active {
  background: linear-gradient(145deg, #e21b3c, #8e1730);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.training-share-bottom-nav button:disabled {
  cursor: default;
  opacity: .72;
}

body[data-shell="mobile"][data-page="training-videos"] .training-layout,
body[data-shell="mobile"][data-page="training-videos"] .training-management {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-layout:has(.training-player-panel[hidden]) {
  display: none;
}

body[data-shell="mobile"][data-page="training-videos"] .page-head {
  min-height: 96px;
  padding: 16px;
}

body[data-shell="mobile"][data-page="training-videos"] .page-head h1 {
  font-size: 24px;
}

body[data-shell="mobile"][data-page="training-videos"] .page-head p {
  display: block;
  font-size: 12px;
  line-height: 1.45;
}

body[data-shell="mobile"][data-page="training-videos"] .training-status-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-status-strip article {
  min-height: 66px;
  padding: 10px 12px;
  border-right: 1px solid var(--border, #e4e7ec);
  border-bottom: 1px solid var(--border, #e4e7ec);
}

body[data-shell="mobile"][data-page="training-videos"] .training-status-strip article:nth-child(2n) {
  border-right: 0;
}

body[data-shell="mobile"][data-page="training-videos"] .training-status-strip article:nth-last-child(-n + 2) {
  border-bottom: 0;
}

body[data-shell="mobile"][data-page="training-videos"] .training-status-strip strong {
  font-size: 18px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-side-tools {
  gap: 12px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-list-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

body[data-shell="mobile"][data-page="training-videos"] .training-refresh-button {
  min-width: 60px !important;
  min-height: 36px !important;
  padding: 0 10px !important;
}

body[data-shell="mobile"][data-page="training-videos"] .training-video-card {
  grid-template-columns: 1fr;
  gap: 10px;
  min-height: 0;
  padding: 12px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-video-card .card-actions {
  overflow-x: auto;
  flex-wrap: nowrap;
  justify-content: flex-start;
  padding-bottom: 2px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-video-card .card-actions button {
  flex: 0 0 auto;
  min-width: 58px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-upload-detail {
  white-space: normal;
}

body[data-shell="mobile"][data-page="training-videos"] .training-upload-actions {
  justify-content: flex-start;
}

body[data-shell="mobile"][data-page="training-videos"] .training-video-edit {
  grid-template-columns: 1fr;
}

body[data-shell="mobile"][data-page="training-videos"] .training-video-ratio-field {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-shell="mobile"][data-page="training-videos"] .training-player-panel[data-aspect-ratio="9:16"] video,
body[data-shell="mobile"][data-page="training-videos"] .training-share-video-frame[data-aspect-ratio="9:16"] video {
  width: min(100%, 360px);
  max-height: 72vh;
}

body[data-shell="mobile"][data-page="training-videos"] .training-video-edit-actions {
  justify-content: flex-start;
}

body[data-shell="mobile"][data-page="training-videos"] .training-radio-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-shell="mobile"][data-page="training-videos"] .training-radio-row label {
  min-height: 42px;
  padding: 0 6px 0 28px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-radio-row label::before {
  left: 8px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-access-row {
  grid-template-columns: 1fr;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-row-actions,
body[data-shell="mobile"][data-page="training-videos"] .training-share-edit-actions {
  justify-content: stretch;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-row-actions button,
body[data-shell="mobile"][data-page="training-videos"] .training-share-edit-actions button {
  flex: 1 1 0;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-edit .training-radio-row {
  grid-template-columns: 1fr;
}

body[data-shell="mobile"][data-page="training-videos"] .training-copy-dialog {
  width: min(360px, calc(100vw - 20px));
}

body[data-shell="mobile"][data-page="training-videos"] .training-copy-head {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-copy-body {
  padding: 14px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-copy-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 12px 14px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-copy-actions button {
  width: 100%;
}

body[data-shell="mobile"][data-page="training-videos"]:has(.training-share-shell:not(:empty)) main {
  padding: 0;
  background: #eef1f5;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-page {
  gap: 10px;
  padding: 12px 12px calc(102px + env(safe-area-inset-bottom));
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-identity {
  grid-template-columns: 48px minmax(0, 1fr) 108px;
  gap: 10px;
  min-height: 96px;
  padding: 14px;
  border-radius: 22px;
}

.training-share-identity .training-temp-avatar,
body[data-shell="mobile"][data-page="training-videos"] .training-temp-avatar {
  width: 48px;
  height: 48px;
  font-size: 18px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-identity strong {
  font-size: 22px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-identity small {
  margin-top: 5px;
  font-size: 13px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-identity img {
  width: 108px;
  max-height: 40px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-hero {
  gap: 10px;
  min-height: 0;
  padding: 20px 18px 14px;
  border-radius: 8px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-hero h1 {
  font-size: clamp(16px, 7vw, 24px);
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-hero p {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-hero > span {
  font-size: 10px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-hero-actions {
  grid-template-columns: 1fr 1fr;
  display: grid;
  gap: 10px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-hero-actions button {
  width: 100%;
  min-width: 0;
  min-height: 48px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-player {
  padding: 18px;
  border-radius: 22px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-section-title {
  font-size: 13px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-video-frame {
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .18);
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-actions {
  display: flex;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-bottom-nav {
  left: 10px;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 10px;
  border-radius: 22px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-bottom-nav button {
  min-height: 60px;
  font-size: 12px;
}

body[data-page="training-videos"] .training-share-shell {
  width: min(760px, 100%);
  margin: 0 auto;
}

body[data-page="training-videos"] .training-share-page {
  gap: 10px;
  padding: 14px 14px calc(92px + env(safe-area-inset-bottom));
}

body[data-page="training-videos"] .training-share-identity {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 72px;
  padding: 12px;
  border-radius: 8px;
}

body[data-page="training-videos"] .training-temp-avatar {
  width: 42px;
  height: 42px;
  border: 1px solid #f2b8c3;
  border-radius: 8px;
  background: #e21b3c;
  font-size: 16px;
  line-height: 1;
  box-shadow: none;
}

body[data-page="training-videos"] .training-share-identity-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

body[data-page="training-videos"] .training-share-identity-copy span,
body[data-page="training-videos"] .training-share-identity-copy strong,
body[data-page="training-videos"] .training-share-identity-copy small {
  min-width: 0;
  overflow: hidden;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="training-videos"] .training-share-identity-copy span {
  color: var(--primary, #e21b3c);
  font-size: 12px;
  font-weight: 950;
}

body[data-page="training-videos"] .training-share-identity-copy strong {
  color: #12151b;
  font-size: 20px;
  font-weight: 950;
}

body[data-page="training-videos"] .training-share-identity-copy small {
  margin: 0;
  color: #68717e;
  font-size: 12px;
  font-weight: 800;
}

body[data-page="training-videos"] .training-share-identity img {
  width: 102px;
  max-height: 36px;
}

body[data-page="training-videos"] .training-share-hero {
  gap: 12px;
  min-height: 0;
  padding: 20px 18px 18px;
  border-radius: 8px;
  background: #101722;
}

body[data-page="training-videos"] .training-share-hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 94px;
  height: 4px;
  background: var(--primary, #e21b3c);
}

body[data-page="training-videos"] .training-share-kicker {
  color: rgba(255, 255, 255, .62);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

body[data-page="training-videos"] .training-share-hero h1 {
  font-size: clamp(16px, 7vw, 24px);
  line-height: 1.05;
}

body[data-page="training-videos"] .training-share-hero p {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

body[data-page="training-videos"] .training-share-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

body[data-page="training-videos"] .training-share-meta div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 6px;
  background: rgba(255, 255, 255, .05);
}

body[data-page="training-videos"] .training-share-meta dt,
body[data-page="training-videos"] .training-share-meta dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="training-videos"] .training-share-meta dt {
  color: rgba(255, 255, 255, .55);
  font-size: 11px;
  font-weight: 800;
}

body[data-page="training-videos"] .training-share-meta dd {
  margin-top: 3px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
}

body[data-page="training-videos"] .training-share-hero-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 2px;
}

body[data-page="training-videos"] .training-share-hero-actions button {
  min-width: 0;
  min-height: 42px;
  border-radius: 6px;
  font-size: 13px;
}

body[data-page="training-videos"] .training-share-player {
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
}

body[data-page="training-videos"] .training-share-section-title {
  gap: 10px;
  font-size: 13px;
  line-height: 1.2;
}

body[data-page="training-videos"] .training-share-section-title i {
  width: 38px;
  height: 4px;
}

body[data-page="training-videos"] .training-share-start {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-areas: "icon title";
  align-items: center;
  column-gap: 12px;
  padding: 8px 12px;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  background: #f7f8fb;
  color: #12151b;
  text-align: left;
}

body[data-page="training-videos"] .training-share-start[hidden],
body[data-page="training-videos"] .training-share-video-frame[hidden] {
  display: none !important;
}

body[data-page="training-videos"] .training-share-start-icon {
  grid-area: icon;
  width: 46px;
  height: 46px;
  position: relative;
  display: block;
  border-radius: 8px;
  background: #101722;
}

body[data-page="training-videos"] .training-share-start-icon::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 14px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #ffffff;
}

body[data-page="training-videos"] .training-share-start strong {
  grid-area: title;
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="training-videos"] .training-share-video-frame {
  border-radius: 8px;
  box-shadow: none;
}

body[data-page="training-videos"] .training-share-actions {
  gap: 6px;
}

body[data-page="training-videos"] .training-share-actions span {
  min-height: 30px;
  min-width: 0;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

body[data-page="training-videos"] .training-share-notice {
  padding: 9px 10px;
  border-radius: 6px;
}

body[data-page="training-videos"] .training-share-bottom-nav {
  left: max(10px, calc(50% - 380px));
  right: max(10px, calc(50% - 380px));
  bottom: max(10px, env(safe-area-inset-bottom));
  gap: 6px;
  padding: 8px;
  border-radius: 10px;
}

body[data-page="training-videos"] .training-share-bottom-nav button {
  min-width: 0;
  min-height: 52px;
  gap: 4px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

body[data-page="training-videos"] .training-share-bottom-nav button strong {
  overflow: hidden;
  max-width: 100%;
  font: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="training-videos"] .training-share-nav-icon {
  position: relative;
  width: 20px;
  height: 20px;
  display: block;
  font-size: 0;
  line-height: 1;
}

body[data-page="training-videos"] .training-share-nav-icon.is-play::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid currentColor;
}

body[data-page="training-videos"] .training-share-nav-icon.is-fullscreen::before,
body[data-page="training-videos"] .training-share-nav-icon.is-fullscreen::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid currentColor;
}

body[data-page="training-videos"] .training-share-nav-icon.is-fullscreen::after {
  inset: 7px;
  border-color: rgba(255, 255, 255, .18);
}

body[data-page="training-videos"] .training-share-nav-icon.is-replay::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid currentColor;
  border-left-color: transparent;
  border-radius: 999px;
}

body[data-page="training-videos"] .training-share-nav-icon.is-replay::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  border-top: 5px solid currentColor;
  border-right: 5px solid transparent;
}

body[data-page="training-videos"] .training-share-nav-icon.is-time::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

body[data-page="training-videos"] .training-share-nav-icon.is-time::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  width: 2px;
  height: 6px;
  background: currentColor;
  box-shadow: 3px 4px 0 0 currentColor;
}

body[data-page="training-videos"] .training-share-bottom-nav button.is-active {
  background: #e21b3c;
}

body[data-page="training-videos"] .training-share-bottom-nav button.is-playing .training-share-nav-icon.is-play::before,
body[data-page="training-videos"] .training-share-bottom-nav button.is-playing .training-share-nav-icon.is-play::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 4px;
  height: 12px;
  border: 0;
  background: currentColor;
}

body[data-page="training-videos"] .training-share-bottom-nav button.is-playing .training-share-nav-icon.is-play::before {
  left: 5px;
}

body[data-page="training-videos"] .training-share-bottom-nav button.is-playing .training-share-nav-icon.is-play::after {
  left: 12px;
}

body[data-page="training-videos"] .training-share-banner-stack {
  position: relative;
  display: grid;
  gap: 0;
  padding: 10px 12px 11px;
  overflow: hidden;
  border: 1px solid #e3e7ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(13, 17, 24, .08);
}

body[data-page="training-videos"] .training-share-banner-stack::before {
  content: "";
  position: absolute;
  pointer-events: none;
}

body[data-page="training-videos"] .training-share-banner-stack::before {
  left: 0;
  top: 0;
  width: 94px;
  height: 4px;
  background: var(--primary, #e21b3c);
}

body[data-page="training-videos"] .training-share-banner-image {
  position: relative;
  z-index: 1;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

body[data-page="training-videos"] .training-share-banner-image.is-left {
  width: min(92%, 640px);
  justify-self: start;
}

body[data-page="training-videos"] .training-share-banner-image.is-right {
  width: min(100%, 680px);
  justify-self: center;
  margin-top: 0;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-page {
  padding: 10px 10px calc(82px + env(safe-area-inset-bottom));
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-banner-stack {
  padding: 8px 13px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-banner-image.is-left {
  width: 92%;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-banner-image.is-right {
  width: 100%;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-identity {
  grid-template-columns: 40px minmax(0, 1fr) 92px;
  gap: 9px;
  min-height: 68px;
  padding: 10px;
  border-radius: 8px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-temp-avatar {
  width: 40px;
  height: 40px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-identity-copy strong {
  font-size: 18px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-identity img {
  width: 92px;
  max-height: 32px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-hero {
  padding: 18px 14px 14px;
  border-radius: 8px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-hero h1 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(16px, 7vw, 24px);
  line-height: 1.12;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-meta div {
  padding: 8px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-meta dt {
  font-size: 10px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-meta dd {
  font-size: 12px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-player {
  padding: 12px;
  border-radius: 8px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-bottom-nav {
  left: 8px;
  right: 8px;
  bottom: max(8px, env(safe-area-inset-bottom));
  border-radius: 10px;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-bottom-nav button {
  min-height: 50px;
}

body:not([data-shell="mobile"])[data-page="training-videos"] .training-share-page {
  padding-bottom: 18px;
}

body:not([data-shell="mobile"])[data-page="training-videos"] .training-share-bottom-nav {
  position: static;
  width: 360px !important;
  max-width: calc(100vw - 32px) !important;
  margin: 0 auto;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(12, 17, 25, .97);
  box-shadow: 0 10px 24px rgba(13, 17, 24, .18);
}

body:not([data-shell="mobile"])[data-page="training-videos"] .training-share-bottom-nav button {
  width: 104px !important;
  min-width: 104px !important;
  max-width: 104px !important;
  min-height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: #e21b3c !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  text-indent: 0 !important;
}

body:not([data-shell="mobile"])[data-page="training-videos"] .training-share-bottom-nav button strong {
  width: auto !important;
  max-width: none !important;
  display: inline !important;
  overflow: visible !important;
  color: inherit !important;
  font: inherit !important;
  line-height: 1 !important;
  text-indent: 0 !important;
  white-space: nowrap !important;
}

body:not([data-shell="mobile"])[data-page="training-videos"] .training-share-nav-icon {
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
  display: block !important;
}

body[data-shell="mobile"][data-page="training-videos"] .training-share-bottom-nav {
  position: fixed;
  display: grid;
}

/* Workflow simplified generation bar: final overrides after the global red button skin. */
body[data-page="workflow"] .workspace-shell {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 16px;
}

body[data-page="workflow"] .prompt-workbench {
  max-width: none;
}

body[data-page="workflow"] .workflow-composer {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #dfe5ee;
  border-radius: var(--radius);
  background: #f5f7fb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body[data-page="workflow"] .workflow-composer .prompt-list {
  gap: 10px;
}

body[data-page="workflow"] .workflow-composer .prompt-card {
  background: rgba(255, 255, 255, 0.92);
}

body[data-page="workflow"] .generation-command-bar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-top: 2px;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid #dde3ec;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-page="workflow"] .generation-command-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

body[data-page="workflow"] .param-pill {
  min-width: 126px !important;
  min-height: 38px !important;
  display: inline-grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 7px 12px !important;
  border: 1px solid var(--border) !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: var(--text) !important;
  box-shadow: 0 8px 18px rgba(13, 17, 24, 0.05) !important;
}

body[data-page="workflow"] .param-pill:hover {
  border-color: rgba(226, 27, 60, 0.34) !important;
  background: #ffffff !important;
  color: var(--primary) !important;
}

body[data-page="workflow"] .param-pill.is-open {
  border-color: rgba(226, 27, 60, 0.42) !important;
  background: #fff6f8 !important;
  color: var(--primary) !important;
  box-shadow: 0 10px 24px rgba(226, 27, 60, 0.10) !important;
}

body[data-page="workflow"] .param-pill span {
  color: var(--text-secondary);
  font-size: 12px;
}

body[data-page="workflow"] .param-pill strong {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="workflow"].is-video-workflow .param-pill[data-open-param="quality"],
body[data-page="workflow"].is-video-workflow .param-pill[data-open-param="speed"],
body[data-page="workflow"].is-video-workflow .param-pill[data-open-param="audio"] {
  border-color: rgba(226, 27, 60, 0.26) !important;
  background: #fffafb !important;
}

body[data-page="workflow"] .param-pill::after {
  content: "";
  width: 7px;
  height: 7px;
  margin: 0 0 2px 2px;
  display: block;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  background: transparent;
  opacity: 1;
  transform: rotate(45deg);
}

body[data-page="workflow"] .generation-command-submit {
  display: grid;
  grid-template-columns: auto minmax(108px, 124px);
  align-items: center;
  gap: 8px;
  justify-self: end;
}

body[data-page="workflow"] .generation-command-submit .command-cost {
  min-height: 46px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fff8f9;
}

body[data-page="workflow"] .generation-command-submit .command-cost > span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

body[data-page="workflow"] .generation-command-submit .command-cost > strong {
  color: var(--primary);
  font-size: 22px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

body[data-page="workflow"] .generation-command-bar > .form-message {
  grid-column: 1 / -1;
}

body[data-page="workflow"] .generation-start-button {
  min-width: 108px;
  min-height: 46px;
  align-self: stretch;
  border-color: var(--primary);
  border-radius: var(--radius);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(226, 27, 60, 0.18);
  font-size: 14px;
  font-weight: 850;
}

body[data-page="workflow"] .generation-start-button::after,
body[data-page="workflow"] .desktop-param-option::after {
  display: none;
  content: none;
}

body[data-page="workflow"] .workflow-hidden-fields,
body[data-page="workflow"] .workflow-hidden-fields label,
body[data-page="workflow"] .workflow-hidden-fields select {
  position: absolute !important;
  width: 1px !important;
  min-width: 1px !important;
  max-width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  max-height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

body[data-page="workflow"] .desktop-param-popover {
  position: absolute !important;
  left: 0;
  top: 100%;
  z-index: 40 !important;
  width: min(328px, calc(100% - 24px)) !important;
  max-width: calc(100% - 24px) !important;
  padding: 8px !important;
  border: 1px solid #dfe4ec !important;
  border-radius: var(--radius) !important;
  background: #ffffff !important;
  box-shadow: 0 12px 28px rgba(13, 17, 24, 0.12) !important;
  overscroll-behavior: contain;
}

body[data-page="workflow"] .desktop-param-popover.is-flipped {
  box-shadow: 0 -12px 28px rgba(13, 17, 24, 0.12) !important;
}

body[data-page="workflow"] .desktop-param-popover.is-composer-child {
  z-index: 70 !important;
}

body[data-page="workflow"] .desktop-param-popover.is-ratio,
body[data-page="workflow"] .desktop-param-popover.is-speed {
  width: min(300px, calc(100% - 24px)) !important;
}

body[data-page="workflow"] .desktop-param-popover.is-model {
  width: min(318px, calc(100% - 24px)) !important;
}

body[data-page="workflow"] .desktop-param-popover.is-styletemplate {
  width: min(360px, calc(100% - 24px)) !important;
}

/* Jimeng-inspired composer UX translated into the IMGX red/black/white system. */
body[data-page="workflow"] .workflow-composer {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-height: 214px;
  padding: 18px;
  border-color: #dde3ec;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(13, 17, 24, 0.08);
}

body[data-page="workflow"] .workflow-composer .prompt-list {
  min-width: 0;
  min-height: 118px;
  max-height: 330px;
  align-content: start;
  gap: 0;
  padding-right: 4px;
  overflow-y: auto;
}

body[data-page="workflow"] .workflow-composer .prompt-list::-webkit-scrollbar {
  width: 6px;
}

body[data-page="workflow"] .workflow-composer .prompt-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(104, 113, 126, 0.24);
}

body[data-page="workflow"] .workflow-composer .prompt-group {
  gap: 0;
  padding: 0;
  border: 0;
}

body[data-page="workflow"] .workflow-composer .prompt-group + .prompt-group {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eef1f5;
}

body[data-page="workflow"] .workflow-composer .prompt-child-list {
  margin: 8px 0 0 0;
  padding: 8px 0 0 0;
  border-left: 0;
  border-top: 1px dashed #e5e9f0;
}

body[data-page="workflow"] .workflow-composer .prompt-card {
  gap: 7px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-page="workflow"] .workflow-composer .prompt-card-head {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 26px;
}

body[data-page="workflow"] .workflow-composer .prompt-card-head em {
  min-width: 30px;
  color: color-mix(in srgb, var(--text-secondary) 56%, #ffffff);
  font-family: Impact, Haettenschweiler, "Arial Narrow", Inter, sans-serif;
  font-size: 21px;
  font-weight: 900;
}

body[data-page="workflow"] .workflow-composer .prompt-title span {
  min-height: 24px;
  padding: 3px 9px;
  border: 0;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
}

body[data-page="workflow"] .workflow-composer .prompt-title strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

body[data-page="workflow"] .workflow-composer .prompt-delete-button {
  min-width: 42px !important;
  min-height: 28px !important;
  border-radius: 7px !important;
}

body[data-page="workflow"] .workflow-composer .prompt-card textarea {
  min-height: 104px;
  padding: 8px 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  resize: vertical;
}

body[data-page="workflow"] .workflow-composer .prompt-group:not(:first-child) .prompt-card textarea {
  min-height: 66px;
}

body[data-page="workflow"] .workflow-composer .prompt-card textarea:focus {
  border: 0;
  outline: 0;
  box-shadow: inset 0 -2px 0 rgba(226, 27, 60, 0.72);
}

body[data-page="workflow"] .generation-command-bar {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 2px;
  padding-top: 12px;
  border-top-color: #e8edf4;
}

body[data-page="workflow"] .generation-command-main {
  align-items: center;
  gap: 6px;
}

body[data-page="workflow"] .generation-command-submit {
  grid-template-columns: auto minmax(108px, 124px);
}

body[data-page="workflow"] .form-message {
  margin-top: 0;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  margin-top: 10px;
  padding: 12px;
  border-radius: 16px;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .prompt-list {
  min-height: 104px;
  max-height: 460px;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .prompt-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .prompt-card-head {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .prompt-card-head em {
  min-width: 26px;
  font-size: 18px;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .prompt-title span {
  min-height: 22px;
  padding: 3px 8px;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .prompt-card textarea {
  min-height: 92px;
  padding-block: 7px;
  background: transparent;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .prompt-group:not(:first-child) .prompt-card textarea {
  min-height: 62px;
}

body[data-shell="mobile"][data-page="workflow"] .generation-command-bar {
  grid-template-columns: 1fr;
  gap: 10px;
  padding-top: 10px;
}

body[data-shell="mobile"][data-page="workflow"] .generation-command-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body[data-shell="mobile"][data-page="workflow"] .generation-command-submit {
  grid-template-columns: minmax(0, 1fr);
  justify-self: stretch;
}

body[data-page="workflow"] .desktop-param-popover-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 3px !important;
  margin: 0 0 6px !important;
  padding: 4px 4px 8px !important;
  border-bottom: 1px solid #eef1f5 !important;
}

body[data-page="workflow"] .desktop-param-popover-head strong {
  color: var(--text) !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}

body[data-page="workflow"] .desktop-param-popover-head span {
  min-width: 0 !important;
  overflow: visible !important;
  color: var(--text-secondary) !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
  text-align: left !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

body[data-page="workflow"] .desktop-param-options {
  display: grid !important;
  gap: 3px !important;
  max-height: 208px !important;
  overflow-y: auto !important;
  padding-right: 1px !important;
}

body[data-page="workflow"] .desktop-param-option {
  width: 100% !important;
  min-height: 42px !important;
  display: grid !important;
  grid-template-columns: 14px minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 6px !important;
  justify-items: stretch !important;
  padding: 5px 8px !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  color: var(--text) !important;
  text-align: left;
  box-shadow: none !important;
}

body[data-page="workflow"] .desktop-param-option:hover,
body[data-page="workflow"] .desktop-param-option.is-selected {
  border-color: rgba(226, 27, 60, 0.24) !important;
  background: #fff4f6 !important;
  color: var(--text) !important;
}

body[data-page="workflow"] .desktop-param-option-mark {
  width: 7px !important;
  height: 7px !important;
  justify-self: center !important;
  border: 1px solid #cbd3df !important;
  border-radius: 999px !important;
  background: transparent !important;
}

body[data-page="workflow"] .desktop-param-option.is-selected .desktop-param-option-mark {
  border-color: var(--primary) !important;
  background: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(226, 27, 60, 0.12) !important;
}

body[data-page="workflow"] .desktop-param-option-copy {
  min-width: 0 !important;
  display: grid !important;
  align-items: start !important;
  justify-content: stretch !important;
  gap: 3px !important;
}

body[data-page="workflow"] .desktop-param-option strong {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-page="workflow"] .desktop-param-option small {
  min-width: 0 !important;
  max-width: none !important;
  overflow: visible !important;
  color: var(--text-secondary) !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
  text-align: left !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

@media (max-width: 1280px) {
  body[data-page="workflow"] .generation-command-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-page="workflow"] .generation-command-submit {
    grid-template-columns: auto minmax(108px, 124px);
    justify-self: stretch;
    justify-content: end;
  }

  body[data-page="workflow"] .generation-start-button {
    grid-column: auto;
    min-height: 46px;
  }
}

@media (max-width: 1080px) {
  body[data-page="workflow"] .workspace-shell {
    grid-template-columns: 1fr;
  }

  body[data-page="workflow"] .generation-command-submit {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }

  body[data-page="workflow"] .generation-command-submit .command-cost {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

body[data-shell="mobile"][data-page="workflow"] .generation-command-bar {
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  margin-top: 2px;
  padding: 10px 0 0;
  border: 0;
  border-top: 1px solid var(--mobile-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-shell="mobile"][data-page="workflow"] .generation-command-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer {
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border-color: var(--mobile-line);
  border-radius: var(--mobile-radius);
  background: #f7f9fc;
}

body[data-shell="mobile"][data-page="workflow"] .param-pill {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 44px !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 4px 8px !important;
  padding: 7px 10px !important;
  border-color: var(--mobile-line) !important;
  border-radius: var(--mobile-radius-sm) !important;
  box-shadow: none !important;
}

body[data-shell="mobile"][data-page="workflow"] .param-pill span,
body[data-shell="mobile"][data-page="workflow"] .param-pill strong {
  min-width: 0;
  display: block;
  grid-column: 1;
  line-height: 1.1;
}

body[data-shell="mobile"][data-page="workflow"] .param-pill span {
  font-size: 10px;
  font-weight: 800;
}

body[data-shell="mobile"][data-page="workflow"] .param-pill strong {
  color: var(--mobile-ink);
  font-size: 13px;
  font-weight: 950;
}

body[data-shell="mobile"][data-page="workflow"] .param-pill::after {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
}

body[data-shell="mobile"][data-page="workflow"] .command-cost {
  min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px 8px;
  padding: 10px 12px;
  border-color: rgba(226, 27, 60, 0.2);
  background: #fff7f8;
}

body[data-shell="mobile"][data-page="workflow"] .command-cost > strong {
  font-size: 22px;
  text-align: right;
}

body[data-shell="mobile"][data-page="workflow"] .command-cost .cost-row {
  display: none;
}

body[data-shell="mobile"][data-page="workflow"] .generation-start-button {
  width: 100%;
  min-height: 44px;
  border-radius: var(--mobile-radius-sm);
  font-size: 14px;
  font-weight: 950;
}

.result-card video,
body[data-shell="mobile"][data-page="results"] .result-card video {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
  background: #0b0f15;
}

.result-card[data-media-type="视频"]::before {
  content: attr(data-media-type) " / " attr(data-ratio);
}

.result-card[data-media-type="视频"]::after {
  content: "";
  position: absolute;
  left: 50%;
  top: min(44%, 190px);
  width: 0;
  height: 0;
  transform: translate(-38%, -50%);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 21px solid rgba(255, 255, 255, 0.94);
  filter: drop-shadow(0 2px 7px rgba(0, 0, 0, 0.36));
  pointer-events: none;
  z-index: 1;
}

.preview-dialog video {
  width: min(78vw, 920px);
  max-height: 78vh;
  display: block;
  border-radius: var(--radius);
  background: #0b0f15;
}

.preview-dialog.has-prompt video {
  max-height: 58vh;
}

.preview-dialog video[hidden],
.preview-dialog img[hidden] {
  display: none !important;
}

body[data-shell="mobile"] .preview-dialog video {
  width: 100%;
  max-height: calc(100vh - 140px);
  border-radius: var(--mobile-radius-sm);
}

body[data-shell="mobile"] .preview-dialog.has-prompt img,
body[data-shell="mobile"] .preview-dialog.has-prompt video {
  max-height: calc(100vh - 260px);
}

body[data-shell="mobile"] .preview-title-editor {
  gap: 6px;
}

body[data-shell="mobile"] .preview-title-input {
  width: 100%;
  font-size: 14px;
}

body[data-shell="mobile"] .preview-prompt-panel {
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
}

body[data-shell="mobile"] .result-preview-dialog {
  width: calc(100vw - 16px);
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 20px);
  max-height: calc(100dvh - 20px);
  border: 1px solid #d7dce5;
  border-top: 0;
  border-radius: 14px;
  background: #ffffff;
}

body[data-shell="mobile"] .result-preview-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

body[data-shell="mobile"] .result-preview-dialog .dialog-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  align-content: start;
  padding: 4px 8px 0;
  border-bottom-color: #e4e7ec;
  background: #ffffff;
}

body[data-shell="mobile"] .result-preview-dialog .dialog-head::before {
  left: 8px;
}

body[data-shell="mobile"] .result-preview-dialog .preview-title-editor {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  height: 24px;
  min-height: 24px;
  margin: 0;
}

body[data-shell="mobile"] .result-preview-dialog .preview-title-input {
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  font-size: 14px;
  line-height: 1.15;
}

body[data-shell="mobile"] .preview-dialog-actions {
  width: fit-content;
  min-width: 0;
  height: fit-content;
  min-height: 0;
  justify-self: end;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px;
  border-left: 0;
}

body[data-shell="mobile"] .result-preview-dialog .dialog-head button.ghost {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 8px 10px !important;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1 !important;
  white-space: nowrap;
}

body[data-shell="mobile"] .image-zoom-dialog {
  padding: 52px 10px 14px;
}

body[data-shell="mobile"] .image-zoom-dialog img {
  max-height: calc(100vh - 76px);
  max-height: calc(100dvh - 76px);
  border-radius: 6px;
}

body[data-shell="mobile"] .image-zoom-close {
  top: 10px;
  right: 10px;
}

body[data-shell="mobile"] .task-detail-dialog {
  width: 100vw;
  max-width: 100vw;
  height: min(88vh, 760px);
  max-height: 88vh;
  margin: auto 0 0;
  border: 0;
  border-radius: 16px 16px 0 0;
}

body[data-shell="mobile"] .task-detail-head {
  padding: 14px 12px 11px;
}

body[data-shell="mobile"] .task-detail-head::before {
  left: 12px;
}

body[data-shell="mobile"] .task-detail-head strong {
  font-size: 15px;
}

body[data-shell="mobile"] .task-detail-body {
  gap: 10px;
  padding: 12px 10px calc(14px + env(safe-area-inset-bottom));
}

body[data-shell="mobile"] .task-detail-section {
  gap: 9px;
  padding: 11px;
  border-radius: 10px;
}

body[data-shell="mobile"] .task-detail-asset-list,
body[data-shell="mobile"] .task-detail-kv {
  grid-template-columns: 1fr;
}

body[data-shell="mobile"] .task-detail-asset {
  grid-template-columns: 48px minmax(0, 1fr);
  padding: 7px;
}

body[data-shell="mobile"] .task-detail-asset-thumb {
  width: 48px;
  height: 48px;
}

body[data-shell="mobile"] .task-detail-prompt-item {
  grid-template-columns: 56px minmax(0, 1fr);
  padding: 8px;
}

body[data-shell="mobile"] .task-detail-prompt,
body[data-shell="mobile"] .task-detail-error {
  max-height: 150px;
  font-size: 12px;
}

body[data-shell="mobile"] .preview-media-stage {
  padding: 10px;
}

body[data-shell="mobile"] .result-preview-dialog .preview-media-stage img,
body[data-shell="mobile"] .result-preview-dialog .preview-media-stage video {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 128px);
  max-height: calc(100dvh - 128px);
  border-radius: 6px;
}

body[data-shell="mobile"] .result-preview-dialog .preview-media-stage video {
  width: 100%;
}

body[data-shell="mobile"] .result-preview-dialog.has-prompt .preview-media-stage img,
body[data-shell="mobile"] .result-preview-dialog.has-prompt .preview-media-stage video {
  max-height: calc(100vh - 278px);
  max-height: calc(100dvh - 278px);
}

body[data-shell="mobile"] .result-preview-dialog.has-assets .preview-media-stage img,
body[data-shell="mobile"] .result-preview-dialog.has-assets .preview-media-stage video {
  max-height: calc(100vh - 238px);
  max-height: calc(100dvh - 238px);
}

body[data-shell="mobile"] .result-preview-dialog.has-assets.has-prompt .preview-media-stage img,
body[data-shell="mobile"] .result-preview-dialog.has-assets.has-prompt .preview-media-stage video {
  max-height: calc(100vh - 378px);
  max-height: calc(100dvh - 378px);
}

body[data-shell="mobile"] .result-preview-dialog .preview-asset-panel {
  gap: 8px;
  padding: 11px 10px 12px;
}

body[data-shell="mobile"] .result-preview-dialog .preview-asset-panel::before {
  left: 10px;
}

body[data-shell="mobile"] .preview-asset-list {
  max-height: 96px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

body[data-shell="mobile"] .preview-asset-item {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 7px;
  padding: 6px;
}

body[data-shell="mobile"] .preview-asset-thumb {
  width: 36px;
  height: 36px;
  font-size: 10px;
}

body[data-shell="mobile"] .preview-asset-text strong {
  font-size: 11px;
}

body[data-shell="mobile"] .preview-asset-text span {
  font-size: 10px;
}

body[data-shell="mobile"] .result-preview-dialog .preview-prompt-panel {
  gap: 8px;
  padding: 12px 10px calc(12px + env(safe-area-inset-bottom));
  background: #f7f8fa;
}

body[data-shell="mobile"] .result-preview-dialog .preview-prompt-panel::before {
  left: 10px;
}

body[data-shell="mobile"] .preview-prompt-head {
  align-items: flex-start;
}

body[data-shell="mobile"] .preview-prompt-head span {
  display: none;
}

body[data-shell="mobile"] .result-preview-dialog .preview-prompt-panel p {
  max-height: 118px;
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.56;
}

.result-preview-dialog .dialog-head .preview-title-save:disabled,
body[data-shell="mobile"] .result-preview-dialog .dialog-head .preview-title-save:disabled {
  display: none !important;
  border-color: #e1e5ec !important;
  background: #f8fafc !important;
  color: #9aa3af !important;
  opacity: 1 !important;
  cursor: default;
}

.result-preview-dialog .dialog-head .preview-title-input.is-editable:focus,
body[data-shell="mobile"] .result-preview-dialog .dialog-head .preview-title-input.is-editable:focus {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: inset 0 -2px 0 rgba(226, 27, 60, 0.45) !important;
}

.result-preview-dialog .dialog-head #previewTitle.preview-title-input.is-editable:focus,
body[data-shell="mobile"] .result-preview-dialog .dialog-head #previewTitle.preview-title-input.is-editable:focus {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: inset 0 -2px 0 rgba(226, 27, 60, 0.45) !important;
}

body[data-shell="mobile"] .preview-prompt-panel p {
  max-height: 130px;
  font-size: 12px;
}

body[data-page="workflow"] .workflow-composer .param-pill {
  width: auto !important;
  min-width: 0 !important;
  min-height: 34px !important;
  grid-template-columns: auto auto auto !important;
  gap: 6px !important;
  padding: 6px 10px !important;
  border-color: #dfe4ec !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: var(--text) !important;
  box-shadow: none !important;
  font-size: 12px !important;
}

body[data-page="workflow"] .workflow-composer .param-pill::before {
  content: attr(data-chip-label);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

body[data-page="workflow"] .workflow-composer .param-pill[data-open-param="model"]::before,
body[data-page="workflow"] .workflow-composer .param-pill[data-open-param="referenceMode"]::before,
body[data-page="workflow"] .workflow-composer .param-pill[data-open-param="ratio"]::before,
body[data-page="workflow"] .workflow-composer .param-pill[data-open-param="speed"]::before,
body[data-page="workflow"] .workflow-composer .param-pill[data-open-param="quality"]::before {
  color: var(--primary);
}

body[data-page="workflow"] .workflow-composer .param-pill[data-open-param="model"][data-chip-label=""]::before {
  display: none !important;
  content: none !important;
}

body[data-page="workflow"] .workflow-composer .param-pill span {
  display: none !important;
}

body[data-page="workflow"] .workflow-composer .param-pill strong {
  max-width: 138px;
  color: var(--text) !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
}

body[data-page="workflow"] .workflow-composer .param-pill::after {
  width: 6px !important;
  height: 6px !important;
  margin: 0 0 2px 1px !important;
  opacity: 0.74;
}

body[data-page="workflow"] .workflow-composer .param-pill:hover,
body[data-page="workflow"] .workflow-composer .param-pill.is-open {
  border-color: rgba(226, 27, 60, 0.42) !important;
  background: #fff8f9 !important;
  color: var(--primary) !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer {
  grid-template-columns: minmax(0, 1fr);
  background: #ffffff;
  border-color: var(--mobile-line);
  border-radius: 16px;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill {
  min-height: 38px !important;
  padding: 7px 9px !important;
  border-radius: 10px !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill::before {
  font-size: 11px;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill strong {
  max-width: 96px;
  font-size: 12px !important;
}

/* Jimeng UX second pass: compact parameter tools, IMGX palette preserved. */
@media (min-width: 1181px) {
  body[data-page="workflow"] .workspace-shell {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  }

  body[data-page="workflow"] .workflow-composer {
    min-height: 206px;
    padding: 16px 18px 14px;
  }

  body[data-page="workflow"] .generation-command-bar {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding-top: 10px;
    overflow: visible;
  }

  body[data-page="workflow"] .generation-command-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 1px 2px 3px 0;
    scrollbar-width: none;
  }

  body[data-page="workflow"] .generation-command-main::-webkit-scrollbar {
    display: none;
  }

  body[data-page="workflow"] .generation-command-submit {
    flex: 0 0 auto;
    display: flex;
    grid-template-columns: none;
    align-items: center;
    justify-self: auto;
    gap: 8px;
  }

  body[data-page="workflow"] .generation-command-submit .command-cost {
    min-width: 0;
    min-height: 34px;
    display: inline-flex;
    grid-template-columns: none;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  body[data-page="workflow"] .generation-command-submit .command-cost > span {
    font-size: 10px;
    line-height: 1;
  }

  body[data-page="workflow"] .generation-command-submit .command-cost > strong {
    font-size: 17px;
    line-height: 1;
  }

  body[data-page="workflow"] .generation-start-button {
    position: relative;
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    min-height: 36px;
    padding: 0 !important;
    border-radius: 999px;
    box-shadow: 0 10px 18px rgba(226, 27, 60, 0.16);
    overflow: hidden !important;
    color: transparent !important;
    font-size: 0 !important;
    text-indent: -999px;
  }

  body[data-page="workflow"] .generation-start-button::before {
    content: "" !important;
    position: absolute;
    left: 13px;
    top: 17px;
    width: 14px;
    height: 2px;
    display: block !important;
    border: 0;
    background: #ffffff;
  }

  body[data-page="workflow"] .generation-start-button::after {
    content: "" !important;
    position: absolute;
    left: 22px;
    top: 13px;
    width: 8px;
    height: 8px;
    display: block !important;
    border-top: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
    background: transparent;
    transform: rotate(45deg);
  }
}

body[data-page="workflow"] .workflow-composer .param-pill {
  flex: 0 0 auto;
  min-height: 32px !important;
  padding: 5px 7px !important;
  gap: 4px !important;
  border-color: #dce2eb !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body[data-page="workflow"] .workflow-composer .param-pill::before {
  font-size: 11px;
  font-weight: 800;
}

body[data-page="workflow"] .workflow-composer .param-pill strong {
  max-width: 86px;
  font-size: 11px !important;
  font-weight: 850 !important;
}

body[data-page="workflow"] .workflow-composer .param-pill[data-open-param="model"] strong {
  max-width: 128px;
}

body[data-page="workflow"] .workflow-composer .param-pill .workflow-param-icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
  order: -1;
}

body[data-page="workflow"] .workflow-composer .param-pill[data-open-param="referenceMode"] strong {
  max-width: 72px;
}

body[data-page="workflow"] .workflow-composer .param-pill[data-open-param="ratio"] strong,
body[data-page="workflow"] .workflow-composer .param-pill[data-open-param="quality"] strong,
body[data-page="workflow"] .workflow-composer .param-pill[data-open-param="speed"] strong {
  max-width: 82px;
}

body[data-page="workflow"] .workflow-composer .param-pill::after {
  width: 5px !important;
  height: 5px !important;
  margin: 0 0 2px 0 !important;
  border-right-width: 1.4px !important;
  border-bottom-width: 1.4px !important;
}

body[data-page="workflow"] .workflow-composer .param-pill:hover,
body[data-page="workflow"] .workflow-composer .param-pill.is-open {
  border-color: rgba(226, 27, 60, 0.46) !important;
  background: #fff7f8 !important;
}

body[data-shell="mobile"][data-page="workflow"] .generation-command-main {
  display: flex;
  grid-template-columns: none;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-right: -4px;
  padding: 0 4px 2px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

body[data-shell="mobile"][data-page="workflow"] .generation-command-main::-webkit-scrollbar {
  display: none;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill {
  width: auto !important;
  min-width: auto !important;
  min-height: 36px !important;
  padding: 6px 8px !important;
  gap: 5px !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill::before {
  font-size: 10px;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill strong {
  max-width: 84px;
  font-size: 11px !important;
}

/* Jimeng toolbar tools mapped to IMGX workflow controls. */
body[data-page="workflow"] .composer-tool-main {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

body[data-page="workflow"] .composer-tool-button[hidden],
body[data-page="workflow"] .param-pill[hidden] {
  display: none !important;
}

body[data-page="workflow"] .composer-tool-button {
  min-width: 0 !important;
  min-height: 32px !important;
  height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 0 9px !important;
  border: 1px solid #dfe4ec !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: var(--text) !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-page="workflow"] .composer-tool-button:hover,
body[data-page="workflow"] .composer-tool-button[aria-expanded="true"] {
  border-color: rgba(226, 27, 60, 0.42) !important;
  background: #fff7f8 !important;
  color: var(--primary) !important;
}

body[data-page="workflow"] .composer-mode-button strong {
  color: var(--primary);
}

body[data-page="workflow"] .composer-agent-button.is-manual strong {
  color: var(--text-secondary);
}

body[data-page="workflow"] .composer-tool-icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: currentColor;
}

body[data-page="workflow"] .composer-tool-image {
  display: block;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}

body[data-page="workflow"] .composer-mode-button .composer-tool-icon::before,
body[data-page="workflow"] .composer-mode-button .composer-tool-icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-48deg);
}

body[data-page="workflow"] .composer-mode-button .composer-tool-icon::before {
  left: 1px;
  top: 8px;
}

body[data-page="workflow"] .composer-mode-button .composer-tool-icon::after {
  right: 1px;
  top: 4px;
}

body[data-page="workflow"] #composerAutoButton .composer-tool-icon::before,
body[data-page="workflow"] #composerAutoButton .composer-tool-icon::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor;
}

body[data-page="workflow"] #composerAutoButton .composer-tool-icon::before {
  top: 3px;
}

body[data-page="workflow"] #composerAutoButton .composer-tool-icon::after {
  top: 8px;
  left: 5px;
  right: 5px;
  box-shadow: none;
}

body[data-page="workflow"] #composerSkillButton .composer-tool-icon::before {
  content: "";
  position: absolute;
  inset: 2px 1px 2px 5px;
  border: 2px solid currentColor;
  border-left-width: 0;
  border-radius: 7px 7px 7px 0;
  transform: rotate(-36deg);
}

body[data-page="workflow"] #composerSkillButton .composer-tool-icon::after {
  content: "";
  position: absolute;
  left: 1px;
  bottom: 2px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  border: 2px solid currentColor;
  background: #ffffff;
}

body[data-page="workflow"] .composer-floating-panel {
  position: absolute;
  z-index: 55;
  width: min(420px, calc(100% - 10px));
  padding: 10px;
  border: 1px solid #dfe4ec;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(13, 17, 24, 0.16);
  overscroll-behavior: contain;
}

body[data-page="workflow"] .composer-floating-panel.is-flipped {
  box-shadow: 0 -18px 42px rgba(13, 17, 24, 0.15);
}

body[data-page="workflow"] .image-param-popover {
  width: min(360px, calc(100% - 24px)) !important;
}

body[data-page="workflow"] .image-param-section {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

body[data-page="workflow"] .image-param-section > span,
body[data-page="workflow"] .image-param-size > span {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 800;
}

body[data-page="workflow"] .image-param-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

body[data-page="workflow"] .image-param-grid button {
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

body[data-page="workflow"] .image-param-grid button:hover,
body[data-page="workflow"] .image-param-grid button.is-selected {
  border-color: rgba(226, 27, 60, 0.46);
  background: #fff7f8;
  color: var(--primary);
}

body[data-page="workflow"] .video-param-audio-options {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .param-pill[data-open-param="audio"] {
  display: none !important;
}

body[data-page="workflow"] .image-param-size {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  background: #f8fafc;
}

body[data-page="workflow"] .image-param-size strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

body[data-page="workflow"] .composer-mode-menu,
body[data-page="workflow"] .composer-skill-menu {
  width: min(318px, calc(100% - 10px));
}

body[data-page="workflow"] .composer-panel-head {
  display: grid;
  gap: 3px;
  padding: 3px 4px 9px;
}

body[data-page="workflow"] .composer-panel-head strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

body[data-page="workflow"] .composer-panel-head span {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.35;
}

body[data-page="workflow"] .composer-preference-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

body[data-page="workflow"] .composer-preference-head > span {
  grid-column: 1 / -1;
}

body[data-page="workflow"] .composer-auto-toggle {
  min-width: 70px !important;
  min-height: 28px !important;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 4px 3px 8px !important;
  border: 1px solid #dfe4ec !important;
  border-radius: 999px !important;
  background: #f7f8fa !important;
  color: var(--text-secondary);
  box-shadow: none !important;
  font-size: 11px !important;
  font-weight: 800;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-page="workflow"] .composer-auto-toggle.is-on {
  border-color: rgba(226, 27, 60, 0.26) !important;
  background: #fff7f8 !important;
  color: var(--primary);
}

body[data-page="workflow"] .composer-auto-toggle i {
  position: relative;
  width: 28px;
  height: 16px;
  display: block;
  flex: 0 0 28px;
  border-radius: 999px;
  background: #ccd3dd;
  box-shadow: inset 0 0 0 1px rgba(13, 17, 24, 0.08);
}

body[data-page="workflow"] .composer-auto-toggle i::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 12px;
  height: 12px;
  display: block;
  border-radius: 999px;
  background: #ffffff;
  transition: transform 0.16s ease;
}

body[data-page="workflow"] .composer-auto-toggle.is-on i {
  background: var(--primary);
}

body[data-page="workflow"] .composer-auto-toggle.is-on i::before {
  transform: translateX(12px);
}

body[data-page="workflow"] .composer-mode-list,
body[data-page="workflow"] .composer-skill-list {
  display: grid;
  gap: 4px;
}

body[data-page="workflow"] .composer-menu-option {
  width: 100% !important;
  min-height: 44px !important;
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 8px !important;
  justify-content: stretch !important;
  padding: 7px 9px !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: var(--text) !important;
  box-shadow: none !important;
  text-align: left !important;
}

body[data-page="workflow"] .composer-menu-option:hover,
body[data-page="workflow"] .composer-menu-option.is-selected {
  border-color: rgba(226, 27, 60, 0.24) !important;
  background: #fff5f7 !important;
}

body[data-page="workflow"] .composer-menu-option:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

body[data-page="workflow"] .composer-menu-option > span:last-child {
  display: grid;
  gap: 3px;
}

body[data-page="workflow"] .composer-menu-option strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

body[data-page="workflow"] .composer-menu-option small {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.25;
}

body[data-page="workflow"] .composer-menu-mark {
  width: 10px;
  height: 10px;
  justify-self: center;
  border: 1px solid #cbd3df;
  border-radius: 999px;
}

body[data-page="workflow"] .composer-menu-option.is-selected .composer-menu-mark {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(226, 27, 60, 0.12);
}

body[data-page="workflow"] .composer-preference-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: #f5f7fa;
}

body[data-page="workflow"] .composer-preference-tabs button {
  min-height: 32px !important;
  padding: 0 10px !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: var(--text-secondary) !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}

body[data-page="workflow"] .composer-preference-tabs button.is-active {
  border-color: #ffffff !important;
  background: #ffffff !important;
  color: var(--text) !important;
  box-shadow: 0 6px 14px rgba(13, 17, 24, 0.06) !important;
}

body[data-page="workflow"] .composer-preference-label {
  display: block;
  margin: 8px 0 5px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 850;
}

body[data-page="workflow"] .composer-ratio-grid,
body[data-page="workflow"] .composer-quality-grid,
body[data-page="workflow"] .composer-duration-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

body[data-page="workflow"] .composer-ratio-grid button,
body[data-page="workflow"] .composer-quality-grid button,
body[data-page="workflow"] .composer-duration-grid button {
  min-width: 0 !important;
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 6px 12px !important;
  border: 1px solid #e4e8ef !important;
  border-radius: 9px !important;
  background: #ffffff !important;
  color: var(--text-secondary) !important;
  box-shadow: none !important;
  font-size: 11px !important;
  font-weight: 850 !important;
}

body[data-page="workflow"] .composer-ratio-grid button {
  flex: 0 0 86px;
}

body[data-page="workflow"] .composer-quality-grid button,
body[data-page="workflow"] .composer-duration-grid button {
  flex: 1 1 0;
}

body[data-page="workflow"] .composer-ratio-grid button span,
body[data-page="workflow"] .composer-quality-grid button span,
body[data-page="workflow"] .composer-duration-grid button span {
  width: 13px;
  height: 9px;
  flex: 0 0 auto;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

body[data-page="workflow"] .composer-quality-grid button span {
  width: 14px;
  height: 10px;
  border-radius: 2px;
}

body[data-page="workflow"] .composer-duration-grid button span {
  width: 14px;
  height: 14px;
  border-radius: 999px;
}

body[data-page="workflow"] .composer-ratio-grid button.is-active,
body[data-page="workflow"] .composer-quality-grid button.is-active,
body[data-page="workflow"] .composer-duration-grid button.is-active {
  border-color: rgba(226, 27, 60, 0.36) !important;
  background: #fff7f8 !important;
  color: var(--primary) !important;
}

body[data-page="workflow"] .composer-ratio-grid button:disabled,
body[data-page="workflow"] .composer-quality-grid button:disabled,
body[data-page="workflow"] .composer-duration-grid button:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

body[data-page="workflow"] .composer-preference-model {
  width: 100% !important;
  min-height: 38px !important;
  justify-content: space-between !important;
  margin-top: 8px;
  padding: 0 12px !important;
  border: 1px solid #edf0f5 !important;
  border-radius: 9px !important;
  background: #f7f8fa !important;
  color: var(--text) !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}

body[data-page="workflow"] .composer-preference-model span {
  color: var(--text-secondary);
}

@media (min-width: 1181px) {
  body[data-page="workflow"] .generation-command-bar {
    align-items: flex-end;
  }

  body[data-page="workflow"] .generation-command-main {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    align-items: center;
    gap: 7px 4px;
    overflow-x: auto;
    overflow-y: visible;
  }

  body[data-page="workflow"] .composer-tool-main {
    grid-column: 1 / -1;
  }
}

body[data-shell="mobile"][data-page="workflow"] .generation-command-main {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 7px 6px;
  width: 100%;
  overflow-x: visible;
  overflow-y: visible;
}

body[data-shell="mobile"][data-page="workflow"] .composer-tool-main {
  grid-column: 1;
  grid-row: 1;
  overflow-x: auto;
  padding-bottom: 1px;
  scrollbar-width: none;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="ratio"] {
  grid-column: 2;
  grid-row: 1;
  width: 100% !important;
  max-width: 160px !important;
  min-height: 36px !important;
  justify-content: start !important;
  overflow: hidden !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="ratio"]::before {
  flex: 0 0 auto;
  color: var(--primary) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="ratio"] strong {
  flex: 1 1 auto;
  max-width: none !important;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="model"] {
  grid-column: 1;
  grid-row: 2;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="referenceMode"] {
  grid-column: 2;
  grid-row: 2;
}

body[data-shell="mobile"][data-page="workflow"] .composer-tool-main::-webkit-scrollbar {
  display: none;
}

body[data-shell="mobile"][data-page="workflow"] .composer-tool-button {
  min-height: 36px !important;
  height: 36px !important;
}

body[data-shell="mobile"][data-page="workflow"] .composer-mode-button {
  min-width: 96px !important;
}

body[data-shell="mobile"][data-page="workflow"] .composer-floating-panel {
  width: auto;
  max-width: none;
  border-radius: 12px;
}

body[data-shell="mobile"][data-page="workflow"] .composer-floating-panel:not([hidden]) {
  position: fixed !important;
  left: 12px !important;
  right: 12px !important;
  top: auto !important;
  bottom: calc(var(--mobile-nav-height) + 18px + env(safe-area-inset-bottom)) !important;
  max-height: min(58vh, 480px);
  overflow-y: auto;
  z-index: 90;
}

body[data-shell="mobile"][data-page="workflow"] .composer-ratio-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-shell="mobile"][data-page="workflow"] .composer-duration-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Keep the composer submit area as a compact send control, not a second card. */
body[data-page="workflow"] .generation-command-bar {
  align-items: end !important;
}

body[data-page="workflow"] .generation-command-submit {
  width: auto !important;
  min-width: 0 !important;
  height: 40px !important;
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center !important;
  justify-content: flex-end !important;
  justify-self: end !important;
  align-self: end !important;
  gap: 8px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-page="workflow"] .generation-command-submit .command-cost {
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: 32px !important;
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 5px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}

body[data-page="workflow"] .generation-command-submit .command-cost > span {
  color: #6f7784 !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  line-height: 1 !important;
}

body[data-page="workflow"] .generation-command-submit .command-cost > strong {
  color: var(--primary) !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}

body[data-page="workflow"] .workflow-prompt-counter {
  min-width: 118px !important;
  min-height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 12px !important;
  border: 1px solid #dfe4ec !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  color: #68717e !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-page="workflow"] .workflow-prompt-counter.is-over-limit {
  border-color: rgba(226, 27, 60, 0.66) !important;
  background: #fff4f6 !important;
  color: var(--primary) !important;
}

body[data-page="workflow"] .workflow-prompt-counter[hidden] {
  display: none !important;
}

body[data-page="workflow"] .generation-start-button {
  position: relative !important;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  flex: 0 0 40px !important;
  align-self: center !important;
  padding: 0 !important;
  border-radius: 10px !important;
  border-color: var(--primary) !important;
  background: var(--primary) !important;
  box-shadow: 0 10px 20px rgba(226, 27, 60, 0.18) !important;
  overflow: hidden !important;
  color: transparent !important;
  font-size: 0 !important;
  text-indent: -999px !important;
}

body[data-page="workflow"] .generation-start-button::before {
  content: "" !important;
  position: absolute !important;
  left: 11px !important;
  top: 50% !important;
  width: 16px !important;
  height: 16px !important;
  display: block !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  clip-path: polygon(0 42%, 58% 42%, 58% 18%, 100% 50%, 58% 82%, 58% 58%, 0 58%) !important;
  transform: translateY(-50%) !important;
}

body[data-page="workflow"] .generation-start-button::after {
  display: none !important;
  content: none !important;
}

body[data-page="workflow"] .generation-start-button:hover:not(:disabled) {
  background: var(--primary-strong, #ba1230) !important;
  border-color: var(--primary-strong, #ba1230) !important;
  box-shadow: 0 12px 22px rgba(226, 27, 60, 0.24) !important;
}

body[data-page="workflow"] .generation-start-button:disabled {
  border-color: #f0b9c3 !important;
  background: #f0b9c3 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

body[data-page="workflow"] .generation-command-bar.is-submitting,
body[data-page="workflow"] .generation-command-bar:has(.workflow-submit-progress:not([hidden])) {
  flex-wrap: wrap !important;
}

body[data-page="workflow"] .workflow-submit-progress {
  flex: 1 0 100% !important;
  width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 6px 10px !important;
  margin-top: 2px !important;
  padding: 0 !important;
  color: #68717e !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

body[data-page="workflow"] .workflow-submit-progress[hidden] {
  display: none !important;
}

body[data-page="workflow"] .workflow-submit-progress > span,
body[data-page="workflow"] .workflow-submit-progress > strong {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-page="workflow"] .workflow-submit-progress > strong {
  color: #e21b3c !important;
  font-size: 11px !important;
  font-weight: 950 !important;
}

body[data-page="workflow"] .workflow-submit-progress > i {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  height: 7px !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  background: #f2d6dc !important;
  box-shadow: inset 0 0 0 1px rgba(226, 27, 60, 0.10) !important;
}

body[data-page="workflow"] .workflow-submit-progress > i > b {
  width: 0%;
  height: 100% !important;
  display: block !important;
  border-radius: inherit !important;
  background: linear-gradient(90deg, #e21b3c, #ba1230) !important;
  transition: width 220ms ease !important;
}

body[data-page="workflow"] .workflow-submit-progress[data-state="success"] > i > b {
  background: linear-gradient(90deg, #15803d, #22a15a) !important;
}

body[data-page="workflow"] .workflow-submit-progress[data-state="error"] > i > b {
  background: linear-gradient(90deg, #ba1230, #e21b3c) !important;
}

body[data-shell="mobile"][data-page="workflow"] .generation-command-submit {
  width: 100% !important;
  justify-self: stretch !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-prompt-counter {
  flex: 1 1 auto !important;
  min-width: 96px !important;
  justify-content: flex-start !important;
  padding: 0 10px !important;
  font-size: 12px !important;
}

/* Desktop composer controls stay in one scan line. */
@media (min-width: 1181px) {
  body[data-page="workflow"] .generation-command-main {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    padding: 1px 2px 3px 0 !important;
    scrollbar-width: none;
  }

  body[data-page="workflow"] .generation-command-main::-webkit-scrollbar {
    display: none;
  }

  body[data-page="workflow"] .composer-tool-main {
    grid-column: auto !important;
    flex: 0 0 auto !important;
  }

  body[data-page="workflow"] .workflow-composer .param-pill {
    flex: 0 0 auto !important;
  }

  body[data-page="workflow"] .generation-command-bar {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  body[data-page="workflow"] .generation-command-main {
    flex: 0 1 auto !important;
    max-width: none !important;
    overflow-x: visible !important;
  }

  body[data-page="workflow"] .composer-tool-main {
    gap: 4px !important;
  }

  body[data-page="workflow"] .composer-tool-button {
    min-height: 30px !important;
    height: 30px !important;
    gap: 4px !important;
    padding: 0 7px !important;
    font-size: 11px !important;
  }

  body[data-page="workflow"] .composer-tool-icon {
    width: 13px;
    height: 13px;
    flex-basis: 13px;
  }

  body[data-page="workflow"] .workflow-composer .param-pill {
    min-height: 30px !important;
    gap: 4px !important;
    padding: 5px 7px !important;
    font-size: 11px !important;
  }

  body[data-page="workflow"] .workflow-composer .param-pill::before,
  body[data-page="workflow"] .workflow-composer .param-pill strong {
    font-size: 11px !important;
  }

  body[data-page="workflow"] .workflow-composer .param-pill strong {
    max-width: 92px;
  }

  body[data-page="workflow"] .generation-command-submit {
    flex: 0 0 auto !important;
    height: 34px !important;
    justify-self: auto !important;
    align-self: center !important;
    margin-left: auto !important;
    gap: 6px !important;
  }

  body[data-page="workflow"] .generation-command-submit .command-cost {
    height: 30px !important;
    gap: 4px !important;
  }

  body[data-page="workflow"] .generation-command-submit .command-cost > span {
    font-size: 10px !important;
  }

  body[data-page="workflow"] .generation-command-submit .command-cost > strong {
    font-size: 14px !important;
  }

  body[data-page="workflow"] .generation-start-button {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    flex-basis: 34px !important;
    border-radius: 9px !important;
  }

  body[data-page="workflow"] .generation-start-button::before {
    left: 9px !important;
    width: 14px !important;
    height: 14px !important;
  }
}

body[data-page="admin"] .admin-result-toolbar {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 94px minmax(180px, 220px) minmax(130px, 150px);
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

body[data-page="admin"] .admin-result-refresh {
  width: 94px;
  min-width: 94px;
  height: 40px;
  padding-inline: 12px;
}

body[data-page="admin"] .admin-result-table-wrap table {
  width: 100%;
  min-width: 1040px;
  table-layout: auto;
}

body[data-page="admin"] .billing-price-video-table {
  width: 100%;
  min-width: 1500px;
  table-layout: fixed;
}

body[data-page="admin"] .billing-price-video-table th,
body[data-page="admin"] .billing-price-video-table td {
  text-align: center;
  vertical-align: middle;
}

body[data-page="admin"] .billing-price-video-table .billing-col-label {
  background: color-mix(in srgb, var(--surface) 88%, var(--canvas));
}

body[data-page="admin"] .billing-price-video-table .billing-col-base {
  background: color-mix(in srgb, #eaf5ff 82%, var(--surface));
}

body[data-page="admin"] .billing-price-video-table .billing-col-total {
  background: color-mix(in srgb, #fff0e5 82%, var(--surface));
}

body[data-page="admin"] .billing-price-video-table th.billing-col-base {
  background: color-mix(in srgb, #dbeeff 88%, var(--surface));
  color: #24577f;
}

body[data-page="admin"] .billing-price-video-table th.billing-col-total {
  background: color-mix(in srgb, #ffe0ca 88%, var(--surface));
  color: #8a4a1f;
}

body[data-page="admin"] .billing-price-video-table tbody tr:hover .billing-col-label {
  background: color-mix(in srgb, var(--surface) 78%, var(--canvas));
}

body[data-page="admin"] .billing-price-video-table tbody tr:hover .billing-col-base {
  background: color-mix(in srgb, #dff0ff 88%, var(--surface));
}

body[data-page="admin"] .billing-price-video-table tbody tr:hover .billing-col-total {
  background: color-mix(in srgb, #ffe8d8 88%, var(--surface));
}

body[data-page="admin"] .billing-price-video-table .billing-price-input {
  width: min(164px, 100%);
  margin-inline: auto;
  text-align: center;
}

body[data-page="admin"] #billing .table-wrap table {
  width: 100%;
  min-width: 1060px;
  table-layout: fixed;
}

body[data-page="admin"] #billing th,
body[data-page="admin"] #billing td {
  padding: 10px 12px;
  white-space: nowrap;
  vertical-align: middle;
}

body[data-page="admin"] #billing .toolbar-input,
body[data-page="admin"] #billing .toolbar-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 38px;
  box-sizing: border-box;
}

body[data-page="admin"] #billing .recharge-package-amount,
body[data-page="admin"] #billing .recharge-package-xcoin,
body[data-page="admin"] #billing .recharge-package-months {
  padding-right: 10px;
  appearance: textfield;
  -moz-appearance: textfield;
}

body[data-page="admin"] #billing .recharge-package-amount::-webkit-outer-spin-button,
body[data-page="admin"] #billing .recharge-package-amount::-webkit-inner-spin-button,
body[data-page="admin"] #billing .recharge-package-xcoin::-webkit-outer-spin-button,
body[data-page="admin"] #billing .recharge-package-xcoin::-webkit-inner-spin-button,
body[data-page="admin"] #billing .recharge-package-months::-webkit-outer-spin-button,
body[data-page="admin"] #billing .recharge-package-months::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

body[data-page="admin"] #billing th:nth-child(1),
body[data-page="admin"] #billing td:nth-child(1) {
  width: 18%;
}

body[data-page="admin"] #billing th:nth-child(2),
body[data-page="admin"] #billing td:nth-child(2) {
  width: 10%;
}

body[data-page="admin"] #billing th:nth-child(3),
body[data-page="admin"] #billing td:nth-child(3) {
  width: 12%;
}

body[data-page="admin"] #billing th:nth-child(4),
body[data-page="admin"] #billing td:nth-child(4) {
  width: 14%;
}

body[data-page="admin"] #billing th:nth-child(5),
body[data-page="admin"] #billing td:nth-child(5) {
  width: 9%;
}

body[data-page="admin"] #billing th:nth-child(6),
body[data-page="admin"] #billing td:nth-child(6),
body[data-page="admin"] #billing th:nth-child(7),
body[data-page="admin"] #billing td:nth-child(7) {
  width: 8%;
}

body[data-page="admin"] #billing th:nth-child(8),
body[data-page="admin"] #billing td:nth-child(8) {
  width: 8%;
}

body[data-page="admin"] #admin-results th:nth-child(1),
body[data-page="admin"] #admin-results td:nth-child(1) {
  width: clamp(150px, 14vw, 210px);
  min-width: 150px;
  max-width: 210px;
}

body[data-page="admin"] #admin-results th:nth-child(2),
body[data-page="admin"] #admin-results td:nth-child(2) {
  width: 150px;
  min-width: 136px;
  max-width: 170px;
}

body[data-page="admin"] #admin-results th:nth-child(3),
body[data-page="admin"] #admin-results td:nth-child(3) {
  width: 64px;
  min-width: 64px;
  text-align: center;
}

body[data-page="admin"] #admin-results th:nth-child(4),
body[data-page="admin"] #admin-results td:nth-child(4) {
  width: clamp(126px, 10vw, 160px);
  min-width: 126px;
}

body[data-page="admin"] #admin-results th:nth-child(5),
body[data-page="admin"] #admin-results td:nth-child(5) {
  width: 78px;
  min-width: 72px;
}

/* Final visibility guard for the workflow command bar. */
body[data-page="workflow"] #generationCommandBar [hidden] {
  display: none !important;
}

body[data-page="admin"] #admin-results th:nth-child(6),
body[data-page="admin"] #admin-results td:nth-child(6) {
  width: 104px;
  min-width: 96px;
}

body[data-page="admin"] #admin-results th:nth-child(7),
body[data-page="admin"] #admin-results td:nth-child(7) {
  width: 142px;
  min-width: 138px;
}

body[data-page="admin"] #admin-results th:nth-child(8),
body[data-page="admin"] #admin-results td:nth-child(8) {
  width: 190px;
  min-width: 188px;
}

body[data-page="admin"] #admin-results th,
body[data-page="admin"] #admin-results td {
  padding-inline: 8px;
}

body[data-page="admin"] .admin-result-work {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  white-space: normal;
}

body[data-page="admin"] .admin-result-thumb {
  position: relative;
  width: 58px;
  height: 58px;
  min-width: 58px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0b0f15;
  box-shadow: none;
  cursor: pointer;
}

body[data-page="admin"] .admin-result-thumb img,
body[data-page="admin"] .admin-result-thumb video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

body[data-page="admin"] .admin-result-thumb video {
  background: #0b0f15;
  pointer-events: none;
}

body[data-page="admin"] .admin-result-thumb.is-loading {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 42%),
    #0b0f15;
}

body[data-page="admin"] .admin-result-thumb[data-media-type="video"]::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform: translate(-38%, -50%);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #ffffff;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.34));
}

body[data-page="admin"] .admin-result-copy,
body[data-page="admin"] .admin-result-user {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 3px;
  white-space: normal;
}

body[data-page="admin"] .admin-result-copy strong,
body[data-page="admin"] .admin-result-user strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="admin"] .admin-result-copy span {
  min-width: 0;
  max-height: 36px;
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body[data-page="admin"] .admin-result-copy small,
body[data-page="admin"] .admin-result-user span {
  min-width: 0;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="admin"] .admin-result-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 6px;
  width: max-content;
  max-width: none;
  white-space: nowrap;
}

body[data-page="admin"] .admin-result-actions button {
  flex: 0 0 auto;
  min-width: 48px;
  padding-inline: 8px;
}

body[data-shell="mobile"][data-page="admin"] .admin-result-toolbar {
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

body[data-shell="mobile"][data-page="admin"] .admin-result-table-wrap table {
  min-width: 1080px;
}

body[data-shell="mobile"][data-page="admin"] .admin-result-work {
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
}

body[data-shell="mobile"][data-page="admin"] .admin-result-thumb {
  width: 52px;
  height: 52px;
  min-width: 52px;
}

body[data-page="admin"].has-admin-theme-banner .page-head,
body[data-page="workflow"].has-home-pc-theme-banner .page-head {
  position: relative;
  overflow: hidden;
  border-color: transparent;
  background-image:
    linear-gradient(90deg, rgba(12, 15, 22, 0.82), rgba(12, 15, 22, 0.42)),
    var(--theme-admin-banner-image);
  background-position: center;
  background-size: cover;
}

body[data-page="workflow"].has-home-pc-theme-banner .page-head {
  background-image:
    linear-gradient(90deg, rgba(12, 15, 22, 0.82), rgba(12, 15, 22, 0.38)),
    var(--theme-home-pc-banner-image);
}

body[data-page="admin"].has-admin-theme-banner .page-head .eyebrow,
body[data-page="admin"].has-admin-theme-banner .page-head h1,
body[data-page="admin"].has-admin-theme-banner .page-head p,
body[data-page="workflow"].has-home-pc-theme-banner .page-head .eyebrow,
body[data-page="workflow"].has-home-pc-theme-banner .page-head h1,
body[data-page="workflow"].has-home-pc-theme-banner .page-head p {
  color: #ffffff;
}

body[data-page="admin"] .theme-workbench {
  display: grid;
  gap: 16px;
}

body[data-page="admin"] .theme-action-bar {
  flex-wrap: wrap;
  justify-content: flex-end;
}

body[data-page="admin"] .theme-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="admin"] .theme-summary-grid article,
body[data-page="admin"] .theme-slot-card,
body[data-page="admin"] .theme-asset-row,
body[data-page="admin"] .theme-history-row {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

body[data-page="admin"] .theme-summary-grid article {
  display: grid;
  gap: 6px;
  min-height: 94px;
  padding: 14px;
}

body[data-page="admin"] .theme-summary-grid span,
body[data-page="admin"] .theme-summary-grid small,
body[data-page="admin"] .theme-slot-body small,
body[data-page="admin"] .theme-asset-row span,
body[data-page="admin"] .theme-asset-row small,
body[data-page="admin"] .theme-history-row span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

body[data-page="admin"] .theme-summary-grid strong,
body[data-page="admin"] .theme-slot-title strong,
body[data-page="admin"] .theme-asset-row strong,
body[data-page="admin"] .theme-history-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="admin"] .theme-draft-form,
body[data-page="admin"] .theme-section {
  display: grid;
  gap: 14px;
  min-width: 0;
}

body[data-page="admin"] .theme-section {
  padding-top: 2px;
}

body[data-page="admin"] .theme-name-field {
  display: grid;
  gap: 6px;
  width: min(360px, 100%);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 760;
}

body[data-page="admin"] .theme-name-field input {
  width: 100%;
}

body[data-page="admin"] .theme-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 10px;
}

body[data-page="admin"] .theme-color-field {
  display: grid;
  grid-template-columns: 1fr 38px;
  grid-template-areas:
    "label input"
    "code input";
  align-items: center;
  gap: 4px 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 82%, var(--canvas));
}

body[data-page="admin"] .theme-color-field span {
  grid-area: label;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="admin"] .theme-color-field code {
  grid-area: code;
  color: var(--text-secondary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

body[data-page="admin"] .theme-color-field input {
  grid-area: input;
  width: 38px;
  min-width: 38px;
  height: 32px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

body[data-page="admin"] .theme-flow-effect {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  min-width: 0;
}

body[data-page="admin"] .theme-flow-preview {
  display: grid;
  place-items: center;
  min-height: 104px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 84%, var(--canvas));
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

body[data-page="admin"] .theme-flow-preview span {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="admin"] .theme-flow-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  min-width: 0;
}

body[data-page="admin"] .theme-toggle-field,
body[data-page="admin"] .theme-flow-field {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 82%, var(--canvas));
}

body[data-page="admin"] .theme-toggle-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

body[data-page="admin"] .theme-toggle-field input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

body[data-page="admin"] .theme-flow-field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 760;
}

body[data-page="admin"] .theme-flow-field input {
  width: 100%;
  min-width: 0;
}

body[data-page="admin"] .theme-flow-field input[type="color"] {
  width: 46px;
  min-width: 46px;
  height: 32px;
  padding: 2px;
}

body[data-page="admin"] .theme-flow-field code {
  color: var(--text-secondary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

body[data-page="admin"] .theme-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

body[data-page="admin"] .theme-slot-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 12px;
}

body[data-page="admin"] .theme-slot-preview {
  width: 92px;
  height: 72px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 70%, var(--canvas));
}

body[data-page="admin"] .theme-slot-preview img,
body[data-page="admin"] .theme-asset-row img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

body[data-page="admin"] .theme-slot-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

body[data-page="admin"] .theme-slot-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

body[data-page="admin"] .theme-slot-title span {
  flex: 0 0 auto;
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--border));
  border-radius: 999px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 780;
}

body[data-page="admin"] .theme-slot-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: end;
}

body[data-page="admin"] .theme-slot-controls label,
body[data-page="admin"] .theme-upload-control {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 720;
}

body[data-page="admin"] .theme-slot-controls select,
body[data-page="admin"] .theme-upload-control input {
  width: 100%;
  min-width: 0;
}

body[data-page="admin"] .theme-upload-control input {
  overflow: hidden;
  font-size: 12px;
}

body[data-page="admin"] .theme-disabled-section {
  opacity: 0.82;
}

body[data-page="admin"] .theme-disabled-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body[data-page="admin"] .theme-disabled-grid label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 12px;
}

body[data-page="admin"] .theme-form-actions {
  justify-content: flex-start;
}

body[data-page="admin"] .theme-asset-list,
body[data-page="admin"] .theme-history-list {
  display: grid;
  gap: 8px;
}

body[data-page="admin"] .theme-asset-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
}

body[data-page="admin"] .theme-asset-row img {
  width: 58px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 72%, var(--canvas));
}

body[data-page="admin"] .theme-asset-row div,
body[data-page="admin"] .theme-history-row {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body[data-page="admin"] .theme-history-row {
  padding: 10px 12px;
}

body[data-shell="mobile"][data-page="admin"] .theme-summary-grid,
body[data-shell="mobile"][data-page="admin"] .theme-flow-effect,
body[data-shell="mobile"][data-page="admin"] .theme-slot-grid,
body[data-shell="mobile"][data-page="admin"] .theme-slot-controls {
  grid-template-columns: 1fr;
}

body[data-shell="mobile"][data-page="admin"] .theme-slot-card {
  grid-template-columns: 82px minmax(0, 1fr);
}

body[data-shell="mobile"][data-page="admin"] .theme-slot-preview {
  width: 82px;
  height: 66px;
}

body[data-shell="mobile"][data-page="admin"] .theme-asset-row {
  grid-template-columns: 52px minmax(0, 1fr);
}

body[data-shell="mobile"][data-page="admin"] .theme-asset-row button {
  grid-column: 1 / -1;
  width: max-content;
}

body[data-page="admin"] .comfyui-workbench {
  display: grid;
  gap: 14px;
  min-width: 0;
}

body[data-page="admin"] .comfyui-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body[data-page="admin"] .comfyui-summary-grid article {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

body[data-page="admin"] .comfyui-summary-grid span,
body[data-page="admin"] .comfyui-summary-grid small,
body[data-page="admin"] .comfyui-routing-table td span,
body[data-page="admin"] .comfyui-route-note {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

body[data-page="admin"] .comfyui-summary-grid strong,
body[data-page="admin"] .comfyui-routing-table td strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="admin"] .comfyui-routing-form {
  display: grid;
  gap: 12px;
  min-width: 0;
}

body[data-page="admin"] .comfyui-enable-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 84%, var(--canvas));
  color: var(--text);
  cursor: pointer;
}

body[data-page="admin"] .comfyui-enable-row input {
  flex: 0 0 auto;
}

body[data-page="admin"] .comfyui-enable-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body[data-page="admin"] .comfyui-enable-row strong {
  font-size: 13px;
  font-weight: 820;
}

body[data-page="admin"] .comfyui-enable-row small {
  color: var(--text-secondary);
  font-size: 12px;
}

body[data-page="admin"] .comfyui-routing-table-wrap {
  overflow-x: auto;
}

body[data-page="admin"] .comfyui-routing-table {
  min-width: 840px;
  table-layout: fixed;
}

body[data-page="admin"] .comfyui-routing-table th:nth-child(1),
body[data-page="admin"] .comfyui-routing-table td:nth-child(1) {
  width: 190px;
}

body[data-page="admin"] .comfyui-routing-table th:nth-child(2),
body[data-page="admin"] .comfyui-routing-table td:nth-child(2) {
  width: 180px;
}

body[data-page="admin"] .comfyui-routing-table th:nth-child(3),
body[data-page="admin"] .comfyui-routing-table td:nth-child(3) {
  width: 270px;
}

body[data-page="admin"] .comfyui-routing-table th:nth-child(4),
body[data-page="admin"] .comfyui-routing-table td:nth-child(4) {
  width: 112px;
}

body[data-page="admin"] .comfyui-routing-table td {
  vertical-align: middle;
}

body[data-page="admin"] .comfyui-routing-table td:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body[data-page="admin"] .comfyui-routing-table code {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="admin"] .comfyui-route-select {
  width: 100%;
  min-width: 0;
  height: 34px;
  font-size: 12px;
}

body[data-page="admin"] .comfyui-provider-status {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
}

body[data-page="admin"] .comfyui-provider-status.is-ready {
  border-color: color-mix(in srgb, #16a34a 35%, var(--border));
  color: #166534;
  background: color-mix(in srgb, #dcfce7 70%, var(--surface));
}

body[data-page="admin"] .comfyui-provider-status.is-draft {
  border-color: color-mix(in srgb, #ca8a04 35%, var(--border));
  color: #854d0e;
  background: color-mix(in srgb, #fef3c7 70%, var(--surface));
}

body[data-page="admin"] .comfyui-provider-status.is-missing {
  border-color: color-mix(in srgb, #dc2626 30%, var(--border));
  color: #991b1b;
  background: color-mix(in srgb, #fee2e2 70%, var(--surface));
}

body[data-page="admin"] .comfyui-route-note {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-shell="mobile"][data-page="admin"] .comfyui-summary-grid {
  grid-template-columns: 1fr;
}

body[data-shell="mobile"][data-page="admin"] .comfyui-enable-row {
  width: 100%;
}

body[data-shell="mobile"][data-page="admin"] .comfyui-routing-table {
  min-width: 760px;
}

body[data-page="admin"] .material-share-workbench {
  display: grid;
  gap: 18px;
}

body[data-page="admin"] .material-share-manual-form,
body[data-page="admin"] .material-share-library {
  display: grid;
  gap: 14px;
  min-width: 0;
}

body[data-page="admin"] .material-share-form-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px 14px;
}

body[data-page="admin"] .material-share-form-grid label {
  min-width: 0;
}

body[data-page="admin"] .material-share-form-grid .material-share-field {
  flex: 0 0 auto;
  width: var(--material-share-field-width, 12ch);
}

body[data-page="admin"] .material-share-form-grid .material-share-field-xs {
  --material-share-field-width: 12ch;
}

body[data-page="admin"] .material-share-form-grid .material-share-field-sm {
  --material-share-field-width: 16ch;
}

body[data-page="admin"] .material-share-form-grid .material-share-field-title {
  --material-share-field-width: 22ch;
}

body[data-page="admin"] .material-share-form-grid .material-share-field-model {
  --material-share-field-width: clamp(14ch, var(--material-share-select-width, 18ch), 28ch);
}

body[data-page="admin"] .material-share-form-grid .material-share-field-select {
  --material-share-field-width: clamp(10ch, var(--material-share-select-width, 12ch), 24ch);
}

body[data-page="admin"] .material-share-form-grid .material-share-field-select.material-share-field-model {
  --material-share-field-width: clamp(14ch, var(--material-share-select-width, 18ch), 28ch);
}

body[data-page="admin"] .material-share-form-grid .material-share-field input,
body[data-page="admin"] .material-share-form-grid .material-share-field select {
  width: 100%;
  min-width: 0;
}

body[data-page="admin"] .material-share-form-grid .material-share-field input {
  overflow-x: auto;
  text-overflow: clip;
  white-space: nowrap;
}

body[data-page="admin"] .material-share-field-wide {
  flex: 0 0 100%;
  width: 100%;
}

body[data-page="admin"] .material-share-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 94px minmax(130px, 160px) minmax(130px, 160px);
  gap: 10px;
  align-items: center;
}

body[data-page="admin"] .material-share-toolbar .ghost {
  height: 40px;
  min-width: 94px;
}

body[data-page="admin"] .material-share-list {
  display: grid;
  gap: 12px;
}

body[data-page="admin"] .material-share-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

body[data-page="admin"] .material-share-thumb {
  position: relative;
  width: 112px;
  height: 112px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0b0f15;
}

body[data-page="admin"] .material-share-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

body[data-page="admin"] .material-share-thumb[data-media-type="video"]::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform: translate(-38%, -50%);
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 16px solid #ffffff;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.36));
}

body[data-page="admin"] .material-share-card-main,
body[data-page="admin"] .material-share-card-head,
body[data-page="admin"] .material-share-card-head > div:first-child {
  min-width: 0;
}

body[data-page="admin"] .material-share-card-main {
  display: grid;
  gap: 10px;
}

body[data-page="admin"] .material-share-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

body[data-page="admin"] .material-share-card-head strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="admin"] .material-share-card-head span:not(.badge) {
  display: -webkit-box;
  max-height: 38px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body[data-page="admin"] .material-share-badges,
body[data-page="admin"] .material-share-meta,
body[data-page="admin"] .material-share-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body[data-page="admin"] .material-share-meta {
  color: var(--text-secondary);
  font-size: 12px;
}

body[data-page="admin"] .material-share-meta span {
  min-width: 0;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="admin"] .material-share-reference-strip {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

body[data-page="admin"] .material-share-reference-strip > strong {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 900;
}

body[data-page="admin"] .material-share-reference-strip > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-page="admin"] .material-share-reference-item {
  display: grid;
  grid-template-columns: 42px minmax(64px, 12ch) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 220px;
}

body[data-page="admin"] .material-share-reference-thumb {
  width: 42px;
  height: 42px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #111827;
}

body[data-page="admin"] .material-share-reference-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body[data-page="admin"] .material-share-reference-item > span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="admin"] .material-share-reference-delete {
  min-width: auto;
  padding-inline: 8px;
}

body[data-page="admin"] .material-share-grant-form {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(180px, 1fr) 96px;
  gap: 8px;
  align-items: center;
}

body[data-page="admin"] .material-share-grant-form select,
body[data-page="admin"] .material-share-grant-form input {
  min-width: 0;
  height: 36px;
}

body[data-page="admin"] .material-share-history {
  display: grid;
  gap: 6px;
  padding-top: 2px;
}

body[data-page="admin"] .material-share-history-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

body[data-page="admin"] .material-share-history ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body[data-page="admin"] .material-share-history li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text-secondary);
  font-size: 12px;
}

body[data-page="admin"] .material-share-history li span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

body[data-page="admin"] .material-share-history li strong,
body[data-page="admin"] .material-share-history li small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="admin"] .material-share-history li strong {
  color: var(--text);
  font-size: 12px;
}

body[data-page="admin"] .material-share-history li em {
  color: var(--text-secondary);
  font-size: 12px;
  font-style: normal;
}

body[data-page="admin"] .material-share-empty-history {
  display: block !important;
}

body[data-shell="mobile"][data-page="admin"] .material-share-form-grid,
body[data-shell="mobile"][data-page="admin"] .material-share-toolbar,
body[data-shell="mobile"][data-page="admin"] .material-share-card,
body[data-shell="mobile"][data-page="admin"] .material-share-card-head,
body[data-shell="mobile"][data-page="admin"] .material-share-grant-form {
  grid-template-columns: 1fr;
}

body[data-shell="mobile"][data-page="admin"] .material-share-form-grid {
  display: grid;
  grid-template-columns: 1fr;
}

body[data-shell="mobile"][data-page="admin"] .material-share-form-grid .material-share-field {
  width: 100%;
}

body[data-shell="mobile"][data-page="admin"] .material-share-card {
  padding: 12px;
}

body[data-shell="mobile"][data-page="admin"] .material-share-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
}

body[data-shell="mobile"][data-page="admin"] .material-share-toolbar .ghost,
body[data-shell="mobile"][data-page="admin"] .material-share-grant-form button {
  width: 100%;
}

body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats.page-metrics.metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats.page-metrics .metric-card {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  padding: 12px 18px;
  background: #ffffff;
}

body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats.page-metrics .metric-card::before,
body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats.page-metrics .metric-card::after {
  display: none;
}

body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats.page-metrics .metric-card span,
body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats.page-metrics .metric-card strong,
body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats.page-metrics .metric-card small {
  display: inline-flex;
  align-items: center;
  margin: 0;
  line-height: 1;
  white-space: nowrap;
}

body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats.page-metrics .metric-card span {
  grid-column: 1;
  grid-row: 1;
}

body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats.page-metrics .metric-card strong {
  grid-column: 2;
  grid-row: 1;
  min-width: 28px;
  font-size: 26px;
}

body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats.page-metrics .metric-card small {
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-shell="mobile"] main.workflow-canvas-page {
  height: 100vh;
  min-height: 100vh;
  padding: 104px 0 calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
  overflow: hidden;
  background: #0b0c0f;
}

body[data-shell="mobile"] .workflow-canvas-host {
  height: calc(100vh - 104px - var(--mobile-nav-height) - env(safe-area-inset-bottom));
  min-height: 0;
  border-radius: 0;
  border: 0;
}

body[data-shell="mobile"] .comfy-mobile-workbench {
  height: 104px;
  min-height: 104px;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) max-content;
  grid-template-rows: 44px 42px;
  gap: 8px 10px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: #0a0a0e;
}

body[data-shell="mobile"] .comfy-mobile-workbench .mobile-user {
  min-width: 0;
}

body[data-shell="mobile"] .comfy-mobile-workbench .mobile-runtime {
  min-width: max-content;
  color: #ffffff;
  background: rgba(226, 27, 60, 0.18);
}

body[data-shell="mobile"] .comfy-mobile-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

body[data-shell="mobile"] .comfy-mobile-actions a,
body[data-shell="mobile"] .comfy-mobile-actions button {
  height: 38px;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

body[data-shell="mobile"] .comfy-mobile-actions [data-comfy-action="run"] {
  border-color: #1f7cff;
  background: #1f7cff;
  color: #ffffff;
}

body[data-page="workflow-canvas"]:not([data-shell="mobile"]) main.workflow-canvas-page {
  height: 100vh !important;
  min-height: 100vh !important;
  display: grid !important;
  grid-template-rows: 48px minmax(0, 1fr) !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #0b0c0f !important;
}

body[data-page="workflow-canvas"]:not([data-shell="mobile"]) .workflow-canvas-page .topbar {
  display: none !important;
}

body[data-page="workflow-canvas"]:not([data-shell="mobile"]) .comfy-workbench-topbar {
  height: 48px;
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(220px, 306px) max-content minmax(150px, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: #0a0a0e;
  color: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

body[data-page="workflow-canvas"]:not([data-shell="mobile"]) .comfy-workbench-brand {
  min-width: 0;
  display: grid;
  gap: 2px;
}

body[data-page="workflow-canvas"]:not([data-shell="mobile"]) .comfy-workbench-brand strong {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="workflow-canvas"]:not([data-shell="mobile"]) .comfy-workbench-brand strong::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 2px;
  margin-right: 8px;
  vertical-align: middle;
  background: #e21b3c;
}

body[data-page="workflow-canvas"]:not([data-shell="mobile"]) .comfy-workbench-brand span {
  min-width: 0;
  overflow: hidden;
  color: #e21b3c;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="workflow-canvas"]:not([data-shell="mobile"]) .comfy-workbench-actions {
  min-width: max-content !important;
  width: max-content;
  display: flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  overflow: visible;
}

body[data-page="workflow-canvas"]:not([data-shell="mobile"]) .comfy-workbench-actions a,
body[data-page="workflow-canvas"]:not([data-shell="mobile"]) .comfy-workbench-actions button {
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  min-width: 34px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.045) !important;
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 12px !important;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none !important;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

body[data-page="workflow-canvas"]:not([data-shell="mobile"]) .comfy-workbench-actions a:hover,
body[data-page="workflow-canvas"]:not([data-shell="mobile"]) .comfy-workbench-actions button:hover {
  border-color: rgba(226, 27, 60, 0.34) !important;
  background: rgba(226, 27, 60, 0.13) !important;
  color: #ffffff !important;
}

body[data-page="workflow-canvas"]:not([data-shell="mobile"]) .comfy-workbench-runbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 7px;
  overflow: hidden;
}

body[data-page="workflow-canvas"]:not([data-shell="mobile"]) .comfy-workbench-clock {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

body[data-page="workflow-canvas"]:not([data-shell="mobile"]) .comfy-credit-pill,
body[data-page="workflow-canvas"]:not([data-shell="mobile"]) .comfy-user-pill {
  height: 30px;
  display: inline-flex;
  align-items: center;
  max-width: 160px;
  overflow: hidden;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="workflow-canvas"]:not([data-shell="mobile"]) .comfy-run-button {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  min-width: 118px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 7px !important;
  background: #e21b3c !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none !important;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

body[data-page="workflow-canvas"]:not([data-shell="mobile"]) .comfy-run-button::after {
  display: none;
  content: none;
}

body[data-page="workflow-canvas"]:not([data-shell="mobile"]) .comfy-run-button:hover {
  border-color: rgba(255, 255, 255, 0.18) !important;
  background: #c91633 !important;
}

body[data-page="workflow-canvas"]:not([data-shell="mobile"]) .workflow-canvas-host {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #101112 !important;
}

/* Restore IMGX workflow visual system after the canvas/button work: keep current logic, bring back the old black/white/red skin. */
body[data-page="workflow"]:not([data-shell="mobile"]) main {
  background: #eef1f5;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .topbar {
  min-height: 56px;
  margin-bottom: 16px;
  padding: 10px 16px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(13, 17, 24, 0.06);
}

body[data-page="workflow"]:not([data-shell="mobile"]) .topbar strong {
  color: #12151b;
  font-size: 15px;
  font-weight: 900;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .topbar strong::before {
  content: "";
  width: 12px;
  height: 12px;
  display: inline-block;
  margin-right: 8px;
  border-radius: 2px;
  background: #e21b3c;
  box-shadow: 0 0 0 4px rgba(226, 27, 60, 0.1);
  vertical-align: -1px;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .page-head {
  min-height: 150px !important;
  display: flex !important;
  align-items: center !important;
  margin: 0 0 14px !important;
  padding: 22px 48px 21px !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 8px !important;
  background: #000000 !important;
  box-shadow: 0 24px 54px rgba(13, 17, 24, 0.18) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .page-head-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
  opacity: 0.60;
  pointer-events: none;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .page-head::before {
  display: none !important;
  content: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .page-head::after {
  display: none !important;
  content: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .page-head > div {
  position: relative;
  z-index: 1;
  max-width: min(920px, 100%);
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .page-head .eyebrow {
  color: rgba(255, 255, 255, 0.62) !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .page-head h1 {
  max-width: 860px;
  margin: 0 !important;
  color: #ffffff !important;
  font-family: Impact, Haettenschweiler, "Arial Narrow", Inter, "Microsoft YaHei", sans-serif !important;
  font-size: clamp(32px, 3.2vw, 52px) !important;
  font-weight: 900 !important;
  line-height: 0.98 !important;
  letter-spacing: 0 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .page-head p {
  max-width: 900px !important;
  margin: 0 !important;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.74) !important;
  font-size: 14px !important;
  font-weight: 560 !important;
  line-height: 1.55 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats.page-metrics.metric-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin: 0 0 16px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats.page-metrics .metric-card {
  min-height: 58px !important;
  display: grid !important;
  grid-template-columns: auto auto minmax(0, 1fr) !important;
  align-items: center !important;
  column-gap: 12px !important;
  padding: 12px 18px !important;
  border: 1px solid #e4e7ec !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: 0 12px 30px rgba(13, 17, 24, 0.06) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats.page-metrics .metric-card::before,
body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats.page-metrics .metric-card::after {
  display: none !important;
  content: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats.page-metrics .metric-card span,
body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats.page-metrics .metric-card strong,
body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats.page-metrics .metric-card small {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats.page-metrics .metric-card span {
  grid-column: 1 !important;
  grid-row: 1 !important;
  color: #68717e !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats.page-metrics .metric-card strong {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 28px !important;
  color: #12151b !important;
  font-size: 26px !important;
  font-weight: 950 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) #workflowStats.page-metrics .metric-card small {
  grid-column: 3 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: #68717e !important;
  font-size: 12px !important;
  text-overflow: ellipsis !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workspace-shell {
  display: grid !important;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workspace-left,
body[data-page="workflow"]:not([data-shell="mobile"]) .workspace-left > .panel,
body[data-page="workflow"]:not([data-shell="mobile"]) .prompt-workbench {
  min-width: 0;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .panel,
body[data-page="workflow"]:not([data-shell="mobile"]) .panel.tight,
body[data-page="workflow"]:not([data-shell="mobile"]) .prompt-workbench {
  border: 1px solid #e4e7ec !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: 0 24px 54px rgba(13, 17, 24, 0.1) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .panel.tight {
  padding: 16px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .prompt-workbench {
  max-width: none !important;
  padding: 18px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .section-head {
  align-items: start !important;
  gap: 12px !important;
  margin-bottom: 14px !important;
  padding: 0 0 12px !important;
  border-bottom: 1px solid #eef1f5 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .section-head h2 {
  position: relative;
  margin: 0 !important;
  padding-left: 14px !important;
  color: #12151b !important;
  font-size: 17px !important;
  font-weight: 950 !important;
  line-height: 1.2 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 4px;
  height: 17px;
  border-radius: 0;
  background: #e21b3c;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .section-head span {
  color: #68717e !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .asset-picker-toolbar {
  min-height: 38px;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 10px !important;
  padding: 9px 10px !important;
  border: 1px solid #e4e7ec !important;
  border-radius: 8px !important;
  background: #f8fafc !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .asset-picker-toolbar strong {
  color: #12151b !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .asset-picker-toolbar .ghost,
body[data-page="workflow"]:not([data-shell="mobile"]) .section-head .ghost {
  min-height: 32px !important;
  padding: 0 10px !important;
  border: 1px solid #dfe4ec !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  color: #12151b !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .asset-picker-toolbar .ghost:hover,
body[data-page="workflow"]:not([data-shell="mobile"]) .section-head .ghost:hover {
  border-color: rgba(226, 27, 60, 0.32) !important;
  background: #fff7f8 !important;
  color: #e21b3c !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-asset-list {
  display: grid !important;
  gap: 8px !important;
  max-height: 330px !important;
  padding-right: 4px !important;
  overflow-y: auto !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-asset-option {
  min-height: 76px !important;
  display: grid !important;
  grid-template-columns: 18px 56px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 9px !important;
  border: 1px solid #e4e7ec !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-asset-option:hover,
body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-asset-option.is-selected {
  border-color: rgba(226, 27, 60, 0.5) !important;
  background: #fff7f8 !important;
  box-shadow: 0 10px 22px rgba(226, 27, 60, 0.08) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-asset-option input {
  accent-color: #e21b3c;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-asset-option img {
  width: 56px !important;
  height: 56px !important;
  border-radius: 6px !important;
  object-fit: cover !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-asset-option strong {
  color: #12151b !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-asset-option small {
  color: #68717e !important;
  font-size: 11px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-asset-option.is-disabled {
  cursor: not-allowed !important;
  border-color: #e4e7ec !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-asset-option.is-disabled:hover {
  border-color: #d8dee8 !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-asset-option.is-disabled img {
  opacity: 0.72 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-asset-option.is-disabled small {
  color: #9aa3af !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .selected-asset {
  min-height: 78px !important;
  margin-top: 10px !important;
  padding: 10px !important;
  border: 1px dashed #d8dee8 !important;
  border-radius: 8px !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .selected-asset:not(.is-empty) {
  border-color: rgba(226, 27, 60, 0.28) !important;
  background: #fff9fa !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .selected-asset img,
body[data-page="workflow"]:not([data-shell="mobile"]) .selected-asset-stack img {
  border-radius: 6px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer {
  min-height: 246px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 12px !important;
  margin-top: 12px !important;
  padding: 18px !important;
  border: 1px solid #dde3ec !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: 0 18px 44px rgba(13, 17, 24, 0.08) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .prompt-list {
  min-width: 0 !important;
  min-height: 132px !important;
  max-height: 360px !important;
  align-content: start !important;
  gap: 0 !important;
  padding-right: 4px !important;
  overflow-y: auto !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .prompt-group {
  gap: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .prompt-group + .prompt-group {
  margin-top: 10px !important;
  padding-top: 10px !important;
  border-top: 1px solid #eef1f5 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .prompt-card {
  gap: 7px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .prompt-card-head {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  gap: 8px !important;
  min-height: 26px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .prompt-card-head em {
  min-width: 30px !important;
  color: #b9c0cb !important;
  font-family: Impact, Haettenschweiler, "Arial Narrow", Inter, sans-serif !important;
  font-size: 21px !important;
  font-weight: 900 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .prompt-title span {
  min-height: 24px !important;
  padding: 3px 9px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: rgba(226, 27, 60, 0.09) !important;
  color: #e21b3c !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .prompt-title strong {
  color: #12151b !important;
  font-size: 13px !important;
  font-weight: 850 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .prompt-card textarea {
  min-height: 112px !important;
  padding: 8px 0 10px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #12151b !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
  resize: vertical !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .prompt-card textarea:focus {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: inset 0 -2px 0 rgba(226, 27, 60, 0.72) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .generation-command-bar {
  position: relative !important;
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  min-width: 0 !important;
  margin-top: 2px !important;
  padding: 12px 0 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-top: 1px solid #e8edf4 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .generation-command-main {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  max-width: none !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 1px 2px 3px 0 !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  scrollbar-width: none;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .generation-command-main::-webkit-scrollbar {
  display: none;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .composer-tool-main {
  order: 1;
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  min-width: 0 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .param-pill {
  order: 20;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .param-pill[data-open-param="ratio"] {
  order: 2;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .param-pill[data-open-param="model"] {
  order: 3;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .param-pill[data-open-param="referenceMode"] {
  order: 4;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .composer-tool-button,
body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .param-pill {
  width: auto !important;
  min-width: 0 !important;
  min-height: 32px !important;
  height: 32px !important;
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 0 9px !important;
  border: 1px solid #dfe4ec !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #12151b !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .composer-tool-button:hover,
body[data-page="workflow"]:not([data-shell="mobile"]) .composer-tool-button[aria-expanded="true"],
body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .param-pill:hover,
body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .param-pill.is-open {
  border-color: rgba(226, 27, 60, 0.46) !important;
  background: #fff7f8 !important;
  color: #e21b3c !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .param-pill::before {
  content: attr(data-chip-label);
  color: #68717e !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .param-pill[data-open-param="model"]::before,
body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .param-pill[data-open-param="referenceMode"]::before,
body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .param-pill[data-open-param="ratio"]::before,
body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .param-pill[data-open-param="speed"]::before,
body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .param-pill[data-open-param="quality"]::before {
  color: #e21b3c !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .param-pill[data-open-param="model"][data-chip-label=""]::before {
  display: none !important;
  content: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .param-pill span {
  display: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .param-pill strong,
body[data-page="workflow"]:not([data-shell="mobile"]) .composer-tool-button strong {
  max-width: 112px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: inherit !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .param-pill[data-open-param="model"] strong {
  max-width: 150px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .param-pill::after {
  content: "" !important;
  width: 6px !important;
  height: 6px !important;
  display: block !important;
  margin: 0 0 2px 0 !important;
  border-right: 1.4px solid currentColor !important;
  border-bottom: 1.4px solid currentColor !important;
  background: transparent !important;
  opacity: 0.74 !important;
  transform: rotate(45deg) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .generation-command-submit {
  width: auto !important;
  min-width: 0 !important;
  height: 40px !important;
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  align-self: center !important;
  justify-self: auto !important;
  gap: 8px !important;
  margin-left: auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .generation-command-submit .command-cost {
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 5px !important;
  margin-left: 2px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .generation-command-submit .command-cost > span {
  color: #68717e !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  line-height: 1 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .generation-command-submit .command-cost > strong {
  color: #e21b3c !important;
  font-size: 16px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}

body[data-page="workflow"] .workflow-project-name {
  min-height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  padding: 0 9px !important;
  border: 1px solid rgba(226, 27, 60, 0.24) !important;
  border-radius: 6px !important;
  background: #fff5f7 !important;
  color: #ba1230 !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-align: right !important;
  white-space: nowrap !important;
  box-shadow: inset 3px 0 0 rgba(226, 27, 60, 0.68) !important;
}

@media (min-width: 1181px) {
  body[data-page="workflow"] .workflow-project-name {
    min-height: 30px !important;
    padding-inline: 8px !important;
    font-size: 12px !important;
  }
}

body[data-shell="mobile"][data-page="workflow"] .workflow-project-name {
  min-height: 34px !important;
  padding-inline: 8px !important;
  font-size: 11px !important;
  justify-content: center !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .generation-start-button {
  position: relative !important;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  flex: 0 0 40px !important;
  align-self: center !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid #e21b3c !important;
  border-radius: 8px !important;
  background: #e21b3c !important;
  box-shadow: 0 10px 20px rgba(226, 27, 60, 0.18) !important;
  color: transparent !important;
  font-size: 0 !important;
  text-indent: -999px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .generation-start-button::before {
  content: "" !important;
  position: absolute !important;
  left: 11px !important;
  top: 50% !important;
  width: 16px !important;
  height: 16px !important;
  display: block !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  clip-path: polygon(0 42%, 58% 42%, 58% 18%, 100% 50%, 58% 82%, 58% 58%, 0 58%) !important;
  transform: translateY(-50%) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .generation-start-button::after {
  display: none !important;
  content: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .generation-start-button:hover:not(:disabled) {
  border-color: #ba1230 !important;
  background: #ba1230 !important;
  box-shadow: 0 12px 22px rgba(226, 27, 60, 0.24) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover,
body[data-page="workflow"]:not([data-shell="mobile"]) .composer-floating-panel {
  z-index: 80 !important;
  border: 1px solid #dfe4ec !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: 0 18px 42px rgba(13, 17, 24, 0.16) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover {
  padding: 10px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .composer-floating-panel {
  padding: 10px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover-head,
body[data-page="workflow"]:not([data-shell="mobile"]) .composer-panel-head {
  margin: 0 0 8px !important;
  padding: 4px 4px 9px !important;
  border-bottom: 1px solid #eef1f5 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover-head strong,
body[data-page="workflow"]:not([data-shell="mobile"]) .composer-panel-head strong {
  color: #12151b !important;
  font-size: 13px !important;
  font-weight: 950 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover-head span,
body[data-page="workflow"]:not([data-shell="mobile"]) .composer-panel-head span {
  color: #68717e !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-option,
body[data-page="workflow"]:not([data-shell="mobile"]) .composer-menu-option {
  border-radius: 6px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-option:hover,
body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-option.is-selected,
body[data-page="workflow"]:not([data-shell="mobile"]) .composer-menu-option:hover,
body[data-page="workflow"]:not([data-shell="mobile"]) .composer-menu-option.is-selected {
  border-color: rgba(226, 27, 60, 0.28) !important;
  background: #fff5f7 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-option.is-selected .desktop-param-option-mark,
body[data-page="workflow"]:not([data-shell="mobile"]) .composer-menu-option.is-selected .composer-menu-mark {
  border-color: #e21b3c !important;
  background: #e21b3c !important;
  box-shadow: 0 0 0 3px rgba(226, 27, 60, 0.12) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .composer-preference-tabs {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px !important;
  padding: 4px !important;
  border-radius: 8px !important;
  background: #f5f7fa !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .composer-preference-tabs button {
  min-height: 32px !important;
  border-radius: 6px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .composer-preference-tabs button.is-active {
  background: #ffffff !important;
  color: #12151b !important;
  box-shadow: 0 6px 14px rgba(13, 17, 24, 0.06) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .composer-ratio-grid,
body[data-page="workflow"]:not([data-shell="mobile"]) .composer-quality-grid,
body[data-page="workflow"]:not([data-shell="mobile"]) .composer-duration-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .composer-ratio-grid button,
body[data-page="workflow"]:not([data-shell="mobile"]) .composer-quality-grid button,
body[data-page="workflow"]:not([data-shell="mobile"]) .composer-duration-grid button,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-grid button {
  min-height: 34px !important;
  border: 1px solid #e4e8ef !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #68717e !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .composer-ratio-grid button.is-active,
body[data-page="workflow"]:not([data-shell="mobile"]) .composer-quality-grid button.is-active,
body[data-page="workflow"]:not([data-shell="mobile"]) .composer-duration-grid button.is-active,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-grid button.is-selected,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-grid button:hover {
  border-color: rgba(226, 27, 60, 0.36) !important;
  background: #fff7f8 !important;
  color: #e21b3c !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-popover {
  width: min(440px, calc(100% - 24px)) !important;
  padding: 14px !important;
  border: 1px solid rgba(226, 232, 240, 0.92) !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.14) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio.is-flipped,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-popover.is-flipped {
  box-shadow: 0 -18px 46px rgba(15, 23, 42, 0.14) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.video-param-popover {
  width: fit-content !important;
  min-width: 0 !important;
  max-width: calc(100% - 24px) !important;
  display: grid !important;
  gap: 6px !important;
  padding: 8px 9px !important;
  border-radius: 12px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.video-param-popover.is-flipped {
  box-shadow: 0 -14px 36px rgba(15, 23, 42, 0.13) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio .desktop-param-popover-head,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-popover .desktop-param-popover-head {
  margin: 0 0 10px !important;
  padding: 0 !important;
  border: 0 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .video-param-popover .desktop-param-popover-head {
  display: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio .desktop-param-popover-head strong,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-popover .desktop-param-popover-head strong,
body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-param-section > span,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-section > span,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-size > span {
  color: #8a94a3 !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio .desktop-param-popover-head span,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-popover .desktop-param-popover-head span {
  display: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio .desktop-param-options,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-grid {
  display: flex !important;
  gap: 4px !important;
  max-height: none !important;
  padding: 4px !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #f5f5f6 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .video-param-popover .desktop-param-options {
  width: fit-content !important;
  gap: 3px !important;
  padding: 3px !important;
  border-radius: 10px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio .desktop-param-option,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-grid button {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  min-height: 42px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  place-items: center !important;
  gap: 4px !important;
  padding: 6px 7px !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: #6f7784 !important;
  box-shadow: none !important;
  text-align: center !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio .desktop-param-option:hover,
body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio .desktop-param-option.is-selected,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-grid button:hover,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-grid button.is-selected {
  border-color: rgba(229, 232, 238, 0.96) !important;
  background: #ffffff !important;
  color: #151922 !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio .desktop-param-option-mark,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-ratio-grid button::before {
  content: "" !important;
  width: 18px !important;
  height: 12px !important;
  display: block !important;
  justify-self: center !important;
  border: 2px solid #262b33 !important;
  border-radius: 4px !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio .desktop-param-option[data-param-value="smart"] .desktop-param-option-mark,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-ratio-grid button[data-image-param-ratio="smart"]::before {
  width: 15px !important;
  height: 15px !important;
  border-width: 2px !important;
  border-radius: 5px !important;
  box-shadow: inset 0 0 0 2px #ffffff !important;
  background: #262b33 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio .desktop-param-option[data-param-value="1:1"] .desktop-param-option-mark,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-ratio-grid button[data-image-param-ratio="1:1"]::before {
  width: 15px !important;
  height: 15px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio .desktop-param-option[data-param-value="3:2"] .desktop-param-option-mark,
body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio .desktop-param-option[data-param-value="4:3"] .desktop-param-option-mark,
body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio .desktop-param-option[data-param-value="16:9"] .desktop-param-option-mark,
body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio .desktop-param-option[data-param-value="21:9"] .desktop-param-option-mark,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-ratio-grid button[data-image-param-ratio="4:3"]::before,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-ratio-grid button[data-image-param-ratio="16:9"]::before {
  width: 20px !important;
  height: 11px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio .desktop-param-option[data-param-value="3:4"] .desktop-param-option-mark,
body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio .desktop-param-option[data-param-value="2:3"] .desktop-param-option-mark,
body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio .desktop-param-option[data-param-value="9:16"] .desktop-param-option-mark,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-ratio-grid button[data-image-param-ratio="3:4"]::before,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-ratio-grid button[data-image-param-ratio="4:5"]::before,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-ratio-grid button[data-image-param-ratio="9:16"]::before {
  width: 11px !important;
  height: 20px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio .desktop-param-option-copy {
  display: grid !important;
  gap: 0 !important;
  place-items: center !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio .desktop-param-option strong,
body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-grid button {
  color: inherit !important;
  font-size: 11px !important;
  font-weight: 650 !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.is-ratio .desktop-param-option small {
  display: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-param-section {
  display: grid !important;
  grid-template-columns: 42px auto !important;
  align-items: center !important;
  column-gap: 8px !important;
  row-gap: 0 !important;
  margin-top: 0 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-param-section:first-of-type {
  margin-top: 0 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .video-param-popover .workflow-param-section > span {
  font-size: 11px !important;
  line-height: 1 !important;
  color: #8a94a3 !important;
  text-align: right !important;
  white-space: nowrap !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .video-param-popover .video-param-ratio-options .desktop-param-option {
  flex: 0 0 72px !important;
  width: 72px !important;
  min-height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 0 8px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .video-param-popover .video-param-ratio-options .desktop-param-option-mark {
  flex: 0 0 auto !important;
  justify-self: auto !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .video-param-popover .video-param-ratio-options .desktop-param-option-copy {
  min-height: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .video-param-popover .video-param-ratio-options .desktop-param-option strong {
  font-size: 11px !important;
  line-height: 1 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.video-param-popover .video-param-quality-options {
  align-items: center !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.video-param-popover .video-param-quality-options .desktop-param-option {
  box-sizing: border-box !important;
  flex: 0 0 42px !important;
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  min-height: 26px !important;
  height: 26px !important;
  display: inline-flex !important;
  grid-template-columns: none !important;
  grid-template-rows: none !important;
  align-items: center !important;
  justify-content: center !important;
  place-items: center !important;
  gap: 0 !important;
  padding: 0 4px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.video-param-popover .video-param-quality-options .desktop-param-option-mark {
  display: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.video-param-popover .video-param-quality-options .desktop-param-option-copy {
  min-height: 0 !important;
  height: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.video-param-popover .video-param-quality-options .desktop-param-option strong {
  font-size: 11px !important;
  line-height: 1 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-section {
  gap: 8px !important;
  margin-top: 15px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-section:first-of-type {
  margin-top: 0 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-quality-grid button::before {
  display: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-quality-grid button {
  min-height: 34px !important;
  grid-template-rows: auto !important;
  font-size: 13px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-size {
  min-height: 50px !important;
  margin-top: 15px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .image-param-size strong {
  min-height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 16px !important;
  border-radius: 10px !important;
  background: #f7f8fa !important;
  color: #cbd2dc !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}

@media (max-width: 1180px) {
  body[data-page="workflow"]:not([data-shell="mobile"]) .workspace-shell {
    grid-template-columns: 1fr !important;
  }

  body[data-page="workflow"]:not([data-shell="mobile"]) .page-head p {
    white-space: normal;
  }
}

body[data-page="video-edit"] {
  background: #0b0f15;
}

body[data-page="video-edit"] main.video-edit-page {
  height: 100vh;
  min-height: 720px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(226, 27, 60, 0.14), transparent 30%),
    linear-gradient(180deg, #121923 0%, #080b10 100%);
}

body[data-page="video-edit"] .video-edit-workbench-topbar {
  min-height: 62px;
  margin: 0;
  padding: 10px 12px 10px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(23, 30, 40, 0.98), rgba(11, 15, 21, 0.98));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

body[data-page="video-edit"] .video-edit-workbench-topbar::before {
  display: none;
}

body[data-page="video-edit"] .video-edit-workbench-topbar > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

body[data-page="video-edit"] .video-edit-workbench-topbar strong {
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}

body[data-page="video-edit"] .video-edit-workbench-topbar strong::before {
  background: var(--primary);
}

body[data-page="video-edit"] .video-edit-workbench-topbar span:not(.account-menu-chevron) {
  color: rgba(248, 250, 252, 0.68);
}

body[data-page="video-edit"] .video-edit-host {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #070a0f;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
}

body[data-page="video-edit"] .video-edit-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0b0f15;
}

body[data-page="video-edit"] .video-edit-status {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(17, 24, 35, 0.96), rgba(7, 10, 15, 0.96)),
    #070a0f;
  color: #ffffff;
}

body[data-page="video-edit"] .video-edit-status[hidden] {
  display: none;
}

body[data-page="video-edit"] .video-edit-status strong {
  display: block;
  position: relative;
  margin-bottom: 0;
  padding-top: 12px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
}

body[data-page="video-edit"] .video-edit-status strong::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 3px;
  border-radius: 999px;
  background: var(--primary);
}

body[data-page="video-edit"] .video-edit-status span {
  color: rgba(248, 250, 252, 0.66);
  font-size: 13px;
}

body[data-page="video-edit"] .video-edit-status span:empty,
body[data-page="video-edit"] .video-edit-status span[hidden] {
  display: none;
}

body[data-page="video-edit"] .video-edit-loading-progress {
  position: relative;
  width: min(352px, calc(100% - 48px));
  height: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 49, 84, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 18px rgba(226, 27, 60, 0.18);
}

body[data-page="video-edit"] .video-edit-loading-progress i {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(226, 27, 60, 0.2), #ff3154, rgba(255, 255, 255, 0.85));
  animation: imgx-video-edit-progress 1.2s ease-in-out infinite;
}

body[data-page="video-edit"] .video-edit-status[data-tone="error"] .video-edit-loading-progress {
  display: none;
}

@keyframes imgx-video-edit-progress {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(260%);
  }
}

body[data-shell="mobile"][data-page="video-edit"] main.video-edit-page {
  height: 100dvh;
  min-height: 0;
  padding: 8px 8px calc(var(--mobile-nav-height) + 18px + env(safe-area-inset-bottom));
  gap: 8px;
}

body[data-shell="mobile"][data-page="video-edit"] .video-edit-mobile-topbar {
  min-height: 58px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(23, 30, 40, 0.98), rgba(11, 15, 21, 0.98));
  color: #ffffff;
}

body[data-shell="mobile"][data-page="video-edit"] .video-edit-mobile-topbar .mobile-user {
  min-width: 0;
}

body[data-shell="mobile"][data-page="video-edit"] .video-edit-mobile-topbar .mobile-user img {
  width: 34px;
  height: 34px;
}

body[data-shell="mobile"][data-page="video-edit"] .video-edit-mobile-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

body[data-shell="mobile"][data-page="video-edit"] .video-edit-mobile-actions a {
  min-height: 34px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(248, 250, 252, 0.86);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

body[data-shell="mobile"][data-page="video-edit"] .video-edit-host {
  border-radius: 10px;
}

/* Asset page: upload, card actions and edit dialog follow the compact IMGX admin contract. */
body[data-page="assets"] #assetUploadForm {
  gap: 12px !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 112px !important;
  align-items: stretch !important;
  gap: 8px !important;
  margin-top: 2px !important;
  padding: 8px !important;
  border: 1px solid #e4e7ec !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: inset 0 1px 0 #f6f3ee !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field {
  position: relative !important;
  min-width: 0 !important;
  min-height: 44px !important;
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 5px 10px 5px 5px !important;
  border: 1px solid #dfe4eb !important;
  border-radius: 6px !important;
  background: #f8fafc !important;
  box-shadow: none !important;
  cursor: pointer !important;
  overflow: hidden !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field:hover,
body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field:focus-within {
  border-color: rgba(226, 27, 60, 0.42) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(226, 27, 60, 0.08) !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field.has-file {
  border-color: rgba(21, 128, 61, 0.34) !important;
  background: #fbfffd !important;
}

body[data-page="assets"] #assetUploadForm .asset-file-action {
  position: relative !important;
  z-index: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 32px !important;
  border: 1px solid #cfd5df !important;
  border-radius: 5px !important;
  background: #ffffff !important;
  color: #12151b !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  pointer-events: none !important;
}

body[data-page="assets"] #assetUploadForm .asset-file-field:hover .asset-file-action,
body[data-page="assets"] #assetUploadForm .asset-file-field:focus-within .asset-file-action {
  border-color: rgba(226, 27, 60, 0.36) !important;
  color: #ba1230 !important;
}

body[data-page="assets"] #assetUploadForm .asset-file-copy {
  min-width: 0 !important;
  min-height: 1px !important;
  display: grid !important;
  gap: 3px !important;
  align-content: center !important;
  line-height: 1.15 !important;
}

body[data-page="assets"] #assetUploadForm .asset-file-copy strong,
body[data-page="assets"] #assetUploadForm .asset-file-copy small {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-page="assets"] #assetUploadForm .asset-file-copy strong {
  color: #12151b !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

body[data-page="assets"] #assetUploadForm .asset-file-copy small {
  color: #68717e !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row #uploadAsset {
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  border-radius: 5px !important;
  background: var(--primary) !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

body[data-page="assets"] #assetFile {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer !important;
}

body[data-page="assets"] .asset-card .card-actions {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 0 12px 12px !important;
  overflow: hidden !important;
}

body[data-page="assets"] .asset-card .card-actions button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 7px !important;
  border-radius: 5px !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

body[data-page="assets"] .asset-card .card-actions button.secondary {
  border-color: var(--primary) !important;
  background: var(--primary) !important;
  color: #ffffff !important;
}

body[data-page="assets"] .asset-card .card-actions button.ghost {
  border-color: #d9dee7 !important;
  background: #ffffff !important;
  color: #12151b !important;
}

body[data-page="assets"] .asset-card .card-actions button.ghost:hover {
  border-color: rgba(226, 27, 60, 0.36) !important;
  background: #fff7f8 !important;
  color: var(--primary) !important;
}

body[data-page="assets"] .asset-card .card-actions button.danger {
  border-color: rgba(186, 18, 48, 0.22) !important;
  background: #ffffff !important;
  color: #ba1230 !important;
}

.asset-edit-dialog {
  width: min(640px, calc(100vw - 32px)) !important;
  max-height: min(720px, calc(100vh - 48px)) !important;
  padding: 0 !important;
  border: 1px solid #e4e7ec !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #12151b !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22) !important;
  overflow: hidden !important;
}

.asset-edit-dialog::backdrop {
  background: rgba(15, 23, 42, 0.46) !important;
}

.asset-edit-shell {
  display: grid !important;
  gap: 0 !important;
}

.asset-edit-dialog .dialog-head {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 16px 18px !important;
  border-bottom: 1px solid #eef1f5 !important;
  background: #ffffff !important;
}

.asset-edit-dialog .dialog-head::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 18px !important;
  width: 46px !important;
  height: 2px !important;
  background: var(--primary) !important;
}

.asset-edit-dialog .dialog-head > div {
  min-width: 0 !important;
  display: grid !important;
  gap: 4px !important;
}

.asset-edit-dialog .dialog-head strong {
  color: #12151b !important;
  font-size: 16px !important;
  font-weight: 950 !important;
  line-height: 1.2 !important;
}

.asset-edit-dialog .dialog-head span {
  color: #68717e !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 1.35 !important;
}

.asset-edit-body {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: 136px minmax(0, 1fr) !important;
  gap: 14px !important;
  padding: 16px 18px !important;
}

.asset-edit-preview-card {
  min-width: 0 !important;
  display: grid !important;
  gap: 8px !important;
  align-content: start !important;
}

.asset-edit-preview-card img {
  width: 136px !important;
  aspect-ratio: 1 !important;
  display: block !important;
  border: 1px solid #e4e7ec !important;
  border-radius: 6px !important;
  background: #f6f3ee !important;
  object-fit: cover !important;
}

.asset-edit-preview-card span {
  min-width: 0 !important;
  overflow: hidden !important;
  color: #68717e !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.asset-edit-fields {
  min-width: 0 !important;
  display: grid !important;
  align-content: start !important;
  gap: 12px !important;
}

.asset-edit-field {
  min-width: 0 !important;
  display: grid !important;
  gap: 7px !important;
  color: #68717e !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
}

.asset-edit-field input,
.asset-edit-field select,
.asset-edit-field > .mobile-select-trigger {
  width: 100% !important;
  min-width: 0 !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 10px !important;
  border: 1px solid #dfe4eb !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  color: #12151b !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

.asset-edit-field input:focus,
.asset-edit-field select:focus,
.asset-edit-field input:focus-visible,
.asset-edit-field select:focus-visible,
.asset-edit-field > .mobile-select-trigger:focus,
.asset-edit-field > .mobile-select-trigger:focus-visible {
  border-color: rgba(226, 27, 60, 0.48) !important;
  outline: 0 !important;
  box-shadow: 0 0 0 3px rgba(226, 27, 60, 0.08) !important;
}

.asset-edit-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  padding: 0 18px 16px !important;
}

.asset-edit-actions button {
  min-width: 86px !important;
  min-height: 38px !important;
  border-radius: 0 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}

.asset-edit-dialog #assetEditMessage {
  margin: 0 18px 16px !important;
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field {
    transition: none !important;
  }
}

body[data-shell="mobile"][data-page="assets"] #assetUploadForm .asset-upload-row {
  grid-template-columns: minmax(0, 1fr) 74px !important;
  gap: 7px !important;
  padding: 7px !important;
}

body[data-shell="mobile"][data-page="assets"] #assetUploadForm .asset-upload-row #uploadAsset {
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
}

body[data-shell="mobile"][data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field {
  min-height: 44px !important;
  grid-template-columns: 36px minmax(0, 1fr) !important;
  padding: 5px 8px 5px 5px !important;
  gap: 6px !important;
}

body[data-shell="mobile"][data-page="assets"] #assetUploadForm .asset-file-action {
  width: 36px !important;
  height: 30px !important;
  font-size: 11px !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-card .card-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  padding: 0 10px 10px !important;
}

body[data-shell="mobile"][data-page="assets"] .asset-card .card-actions button {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 4px !important;
  font-size: 10px !important;
}

body[data-shell="mobile"] .asset-edit-dialog {
  width: calc(100vw - 18px) !important;
  max-height: calc(100vh - 28px) !important;
}

body[data-shell="mobile"] .asset-edit-dialog .dialog-head {
  padding: 13px 12px !important;
}

body[data-shell="mobile"] .asset-edit-dialog .dialog-head::before {
  left: 12px !important;
}

body[data-shell="mobile"] .asset-edit-body {
  grid-template-columns: 82px minmax(0, 1fr) !important;
  gap: 10px !important;
  padding: 12px !important;
}

body[data-shell="mobile"] .asset-edit-preview-card img {
  width: 82px !important;
}

body[data-shell="mobile"] .asset-edit-preview-card span {
  font-size: 10px !important;
}

body[data-shell="mobile"] .asset-edit-fields {
  gap: 9px !important;
}

body[data-shell="mobile"] .asset-edit-field {
  gap: 5px !important;
  font-size: 11px !important;
}

body[data-shell="mobile"] .asset-edit-field input,
body[data-shell="mobile"] .asset-edit-field select,
body[data-shell="mobile"] .asset-edit-field > .mobile-select-trigger {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 9px !important;
  font-size: 13px !important;
}

body[data-shell="mobile"] .asset-edit-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  padding: 0 12px 12px !important;
}

body[data-shell="mobile"] .asset-edit-actions button {
  width: 100% !important;
  min-width: 0 !important;
}

/* IMGX repaint: compact VOD super-resolution workbench. */
body[data-page="imgx-repaint"]:not([data-shell="mobile"]) main {
  max-width: 1420px;
}

body[data-page="imgx-repaint"] .imgx-repaint-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
  gap: 14px;
}

body[data-page="imgx-repaint"] .imgx-repaint-panel,
body[data-page="imgx-repaint"] .imgx-repaint-side {
  border-radius: 8px;
  box-shadow: none;
}

body[data-page="imgx-repaint"] .imgx-repaint-form {
  display: grid;
  gap: 12px;
}

body[data-page="imgx-repaint"] .imgx-repaint-source-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(360px, 1.7fr);
  align-items: stretch;
  gap: 10px;
}

body[data-page="imgx-repaint"] .imgx-repaint-title-field {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 0 0 10px;
  border: 1px solid var(--border, #dcdfe6);
  border-radius: 6px;
  background: #fff;
  color: #303133;
  font-size: 13px;
  font-weight: 800;
}

body[data-page="imgx-repaint"] .imgx-repaint-title-field > span {
  color: #303133;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

body[data-page="imgx-repaint"] .imgx-repaint-form input[type="text"],
body[data-page="imgx-repaint"] .imgx-repaint-form input:not([type]) {
  width: 100%;
  height: 40px;
  min-width: 0;
  border: 0;
  border-left: 1px solid var(--border-light, #ebeef5);
  border-radius: 0 6px 6px 0;
  background: transparent;
  color: #303133;
  font-size: 13px;
  font-weight: 700;
}

body[data-page="imgx-repaint"] .imgx-repaint-title-field:focus-within {
  border-color: rgba(225, 18, 52, .38);
  background: #fffafa;
  box-shadow: 0 0 0 3px rgba(225, 18, 52, .07);
}

body[data-page="imgx-repaint"] .imgx-repaint-file {
  position: relative;
  min-height: 42px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid var(--border, #dcdfe6);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

body[data-page="imgx-repaint"] .imgx-repaint-file:hover,
body[data-page="imgx-repaint"] .imgx-repaint-file:focus-within {
  border-color: rgba(225, 18, 52, .38);
  background: #fffafa;
  box-shadow: 0 0 0 3px rgba(225, 18, 52, .07);
}

body[data-page="imgx-repaint"] .imgx-repaint-file.has-file {
  border-color: rgba(19, 206, 102, .36);
  background: #f7fffb;
}

body[data-page="imgx-repaint"] #imgxRepaintFile {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

body[data-page="imgx-repaint"] .imgx-repaint-file-mark {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: #f0f2f5;
  border: 1px solid rgba(48, 65, 86, .1);
}

body[data-page="imgx-repaint"] .imgx-repaint-file-mark::before {
  width: 15px;
  height: 15px;
  content: "";
  display: block;
  border: 2px solid #304156;
  border-radius: 3px;
  box-shadow: inset -4px 0 0 rgba(64, 158, 255, .18);
}

body[data-page="imgx-repaint"] .imgx-repaint-file-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

body[data-page="imgx-repaint"] .imgx-repaint-file-copy strong,
body[data-page="imgx-repaint"] .imgx-repaint-file-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="imgx-repaint"] .imgx-repaint-file-copy strong {
  color: #111827;
  font-size: 13px;
  font-weight: 900;
}

body[data-page="imgx-repaint"] .imgx-repaint-file-copy small {
  color: #6b7280;
  font-size: 11px;
  font-weight: 750;
}

body[data-page="imgx-repaint"] .imgx-repaint-job-card {
  display: grid;
  gap: 12px;
  margin-top: 2px;
  padding: 13px;
  border: 1px solid #dde3ec;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

body[data-page="imgx-repaint"] .imgx-repaint-job-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf0f4;
}

body[data-page="imgx-repaint"] .imgx-repaint-job-head > div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

body[data-page="imgx-repaint"] .imgx-repaint-job-head > div:first-child strong {
  color: #111827;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
}

body[data-page="imgx-repaint"] .imgx-repaint-job-head > div:first-child span {
  color: #667085;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

body[data-page="imgx-repaint"] .imgx-repaint-cost {
  min-width: 120px;
  min-height: 38px;
  display: inline-grid;
  align-content: center;
  justify-items: start;
  gap: 2px;
  padding: 5px 10px;
  border: 1px solid #f3c8d0;
  border-radius: 7px;
  background: #fff7f8;
}

body[data-page="imgx-repaint"] .imgx-repaint-cost span {
  color: #8a94a6;
  font-size: 11px;
  font-weight: 850;
}

body[data-page="imgx-repaint"] .imgx-repaint-cost strong {
  color: #c90f24;
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
}

body[data-page="imgx-repaint"] .imgx-repaint-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
}

body[data-page="imgx-repaint"] .imgx-repaint-control-block {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
}

body[data-page="imgx-repaint"] .imgx-repaint-control-label {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

body[data-page="imgx-repaint"] .imgx-repaint-control-label strong {
  color: #111827;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.1;
}

body[data-page="imgx-repaint"] .imgx-repaint-control-label span {
  min-width: 0;
  overflow: hidden;
  color: #8a94a6;
  font-size: 11px;
  font-weight: 780;
  line-height: 1.1;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="imgx-repaint"] .imgx-repaint-controls fieldset {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

body[data-page="imgx-repaint"] .imgx-repaint-controls .imgx-repaint-direction-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 1440px) {
  body[data-page="imgx-repaint"] .imgx-repaint-controls .imgx-repaint-quality-options {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

body[data-page="imgx-repaint"] .imgx-repaint-controls legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

body[data-page="imgx-repaint"] .imgx-repaint-controls fieldset label {
  position: relative;
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid #dfe4ec;
  border-radius: 6px;
  background: #ffffff;
  color: #303133;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

body[data-page="imgx-repaint"] .imgx-repaint-controls fieldset label:hover {
  border-color: rgba(201, 15, 36, .3);
  background: #fffafb;
}

body[data-page="imgx-repaint"] .imgx-repaint-controls input[type="radio"] {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

body[data-page="imgx-repaint"] .imgx-repaint-controls fieldset label > span {
  grid-column: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}

body[data-page="imgx-repaint"] .imgx-repaint-controls fieldset label strong {
  color: #111827;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.05;
}

body[data-page="imgx-repaint"] .imgx-repaint-controls fieldset label small {
  color: #7a8495;
  font-size: 10px;
  font-weight: 760;
  line-height: 1.15;
}

body[data-page="imgx-repaint"] .imgx-repaint-controls fieldset label:has(input:checked) {
  border-color: rgba(201, 15, 36, .56);
  background: #fff5f7;
  box-shadow: 0 0 0 2px rgba(201, 15, 36, .08);
}

body[data-page="imgx-repaint"] .imgx-repaint-controls fieldset label::after {
  grid-column: 2;
  width: 14px;
  height: 14px;
  content: "";
  justify-self: end;
  border: 1px solid #c7ceda;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 3px #fff;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

body[data-page="imgx-repaint"] .imgx-repaint-controls fieldset label:has(input:checked)::after {
  border-color: #c90f24;
  background: #c90f24;
  box-shadow: inset 0 0 0 3px #fff;
}

body[data-page="imgx-repaint"] .imgx-repaint-controls fieldset label:has(input:focus-visible) {
  outline: 2px solid rgba(201, 15, 36, .18);
  outline-offset: 2px;
}

body[data-page="imgx-repaint"] .imgx-repaint-progress {
  display: grid;
  gap: 7px;
}

body[data-page="imgx-repaint"] .imgx-repaint-progress[hidden] {
  display: none;
}

body[data-page="imgx-repaint"] .imgx-repaint-progress > span {
  height: 7px;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f5;
}

body[data-page="imgx-repaint"] .imgx-repaint-progress i {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: #c90f24;
  transition: width .18s ease;
}

body[data-page="imgx-repaint"] .imgx-repaint-progress strong {
  color: #606266;
  font-size: 12px;
  font-weight: 800;
}

body[data-page="imgx-repaint"] .imgx-repaint-submit {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 0;
}

body[data-page="imgx-repaint"] .imgx-repaint-submit button {
  min-width: 148px;
  min-height: 38px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 900;
}

body[data-page="imgx-repaint"] .imgx-repaint-task-list {
  display: grid;
  gap: 10px;
}

body[data-page="imgx-repaint"] .imgx-repaint-task {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border-light, #ebeef5);
  border-radius: 8px;
  background: #fff;
}

body[data-page="imgx-repaint"] .imgx-repaint-task-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body[data-page="imgx-repaint"] .imgx-repaint-task-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
}

body[data-page="imgx-repaint"] .imgx-repaint-task-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 10px;
  margin: 0;
}

body[data-page="imgx-repaint"] .imgx-repaint-task-meta div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

body[data-page="imgx-repaint"] .imgx-repaint-task-meta dt,
body[data-page="imgx-repaint"] .imgx-repaint-task-meta dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="imgx-repaint"] .imgx-repaint-task-meta dt {
  color: #909399;
  font-size: 11px;
  font-weight: 800;
}

body[data-page="imgx-repaint"] .imgx-repaint-task-meta dd {
  color: #303133;
  font-size: 12px;
  font-weight: 800;
}

body[data-page="imgx-repaint"] .imgx-repaint-task-progress {
  width: 100%;
}

body[data-page="imgx-repaint"] .imgx-repaint-task-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

body[data-page="imgx-repaint"] .imgx-repaint-task-actions button {
  min-width: 76px;
}

@media (max-width: 1120px) {
  body[data-page="imgx-repaint"] .imgx-repaint-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-page="imgx-repaint"] .imgx-repaint-source-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  body[data-page="imgx-repaint"] .imgx-repaint-side {
    order: 2;
  }

  body[data-page="imgx-repaint"] .imgx-repaint-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-page="imgx-repaint"] .imgx-repaint-controls fieldset {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body[data-page="imgx-repaint"] .imgx-repaint-job-head,
  body[data-page="imgx-repaint"] .imgx-repaint-control-label {
    align-items: flex-start;
    flex-direction: column;
  }

  body[data-page="imgx-repaint"] .imgx-repaint-cost {
    width: 100%;
    justify-items: start;
  }

  body[data-page="imgx-repaint"] .imgx-repaint-submit {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-page="imgx-repaint"] .imgx-repaint-submit button {
    width: 100%;
  }

  body[data-page="imgx-repaint"] .imgx-repaint-controls fieldset {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-page="imgx-repaint"] .imgx-repaint-controls .imgx-repaint-direction-options {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="imgx-repaint"] .imgx-repaint-file,
  body[data-page="imgx-repaint"] .imgx-repaint-controls fieldset label,
  body[data-page="imgx-repaint"] .imgx-repaint-controls fieldset label::after,
  body[data-page="imgx-repaint"] .imgx-repaint-progress i {
    transition: none;
  }
}

/* Match independent desktop page-head typography and compact height to Training Videos. */
body:is([data-page="workflow"], [data-page="imgx-repaint"], [data-page="assets"], [data-page="real-portrait"], [data-page="results"], [data-page="templates"], [data-page="tasks"], [data-page="help"], [data-page="admin"], [data-page="training-videos"], [data-page="redeem-codes"]):not([data-shell="mobile"]) .page-head {
  min-height: 118px !important;
  align-items: center !important;
  padding: 16px 32px !important;
}

body:is([data-page="workflow"], [data-page="imgx-repaint"], [data-page="assets"], [data-page="real-portrait"], [data-page="results"], [data-page="templates"], [data-page="tasks"], [data-page="help"], [data-page="admin"], [data-page="training-videos"], [data-page="redeem-codes"]):not([data-shell="mobile"]) .page-head > div:first-child {
  padding-top: 0 !important;
  gap: 0 !important;
}

body:is([data-page="workflow"], [data-page="imgx-repaint"], [data-page="assets"], [data-page="real-portrait"], [data-page="results"], [data-page="templates"], [data-page="tasks"], [data-page="help"], [data-page="admin"], [data-page="training-videos"], [data-page="redeem-codes"]):not([data-shell="mobile"]) .page-head .eyebrow {
  font-size: 12px !important;
}

body:is([data-page="workflow"], [data-page="imgx-repaint"], [data-page="assets"], [data-page="real-portrait"], [data-page="results"], [data-page="templates"], [data-page="tasks"], [data-page="help"], [data-page="admin"], [data-page="training-videos"], [data-page="redeem-codes"]):not([data-shell="mobile"]) .page-head h1 {
  margin-top: 6px !important;
  font-size: 30px !important;
  line-height: 1.05 !important;
}

body:is([data-page="workflow"], [data-page="imgx-repaint"], [data-page="assets"], [data-page="real-portrait"], [data-page="results"], [data-page="templates"], [data-page="tasks"], [data-page="help"], [data-page="admin"], [data-page="training-videos"], [data-page="redeem-codes"]):not([data-shell="mobile"]) .page-head p {
  margin-top: 6px !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .page-head .eyebrow::after {
  content: "" !important;
  width: 46px !important;
  height: 3px !important;
  display: inline-block !important;
  flex: 0 0 46px !important;
  border-radius: 0 !important;
  background: #e21b3c !important;
}

/* Keep the desktop page-head accent strip consistent across pages, including themed workflow banners. */
body[data-page="workflow"]:not([data-shell="mobile"]) .page-head::after {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  display: block !important;
  height: 8px !important;
  border-radius: 0 0 var(--module-radius) var(--module-radius) !important;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--primary) 100%, transparent) 0%, color-mix(in srgb, var(--primary) 0%, transparent) 28%, transparent 28%, transparent 100%),
    #e9e1d8 !important;
  pointer-events: none !important;
}

body:not([data-shell="mobile"]) .topbar strong::before {
  display: none !important;
  content: none !important;
}

body:not([data-shell="mobile"]) .sidebar-panel {
  display: grid !important;
  gap: 5px !important;
  width: var(--sidebar-brand-width, 179px) !important;
  min-width: 0 !important;
  max-width: 100% !important;
  justify-self: center !important;
  align-self: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
  padding: 8px !important;
  position: relative !important;
  z-index: 1400 !important;
  overflow: visible !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .sidebar-account-host {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-menu-shell {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  z-index: 1 !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-menu-shell.is-open {
  z-index: 2600 !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-shortcut,
body:not([data-shell="mobile"]) .sidebar-panel button.account-shortcut {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 30px !important;
  min-height: 30px !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.9) !important;
  box-shadow: none !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-shortcut::before {
  width: 6px !important;
  height: 6px !important;
  flex-basis: 6px !important;
  box-shadow: 0 0 0 3px rgba(225, 20, 58, 0.12) !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-shortcut:hover,
body:not([data-shell="mobile"]) .sidebar-panel .account-menu-shell.is-open .account-shortcut {
  color: #ffffff !important;
  background: transparent !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-shortcut img {
  width: 22px !important;
  height: 22px !important;
  flex: 0 0 22px !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-shortcut-copy {
  display: grid !important;
  gap: 2px !important;
  min-width: 0 !important;
  max-width: none !important;
  flex: 1 1 auto !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-shortcut-copy strong,
body:not([data-shell="mobile"]) .sidebar-panel .account-shortcut-copy em {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  text-transform: none !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-shortcut-copy strong {
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1.08 !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-shortcut-copy em {
  color: rgba(255, 255, 255, 0.52) !important;
  font-size: 10px !important;
  font-style: normal !important;
  font-weight: 700 !important;
  line-height: 1.08 !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-menu-chevron {
  margin-left: 0 !important;
  color: rgba(255, 255, 255, 0.58) !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-dropdown {
  top: auto !important;
  right: auto !important;
  bottom: calc(100% + 8px) !important;
  left: 0 !important;
  z-index: 5000 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  padding: 8px !important;
  overflow: visible !important;
  border-color: rgba(17, 24, 39, 0.12) !important;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28) !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-dropdown.is-sidebar-fixed {
  position: fixed !important;
  top: auto !important;
  right: auto !important;
  bottom: var(--account-menu-bottom, 98px) !important;
  left: var(--account-menu-left, 18px) !important;
  width: var(--account-menu-width, 231px) !important;
  max-width: calc(100vw - 16px) !important;
  pointer-events: auto !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-dropdown-head {
  gap: 8px !important;
  padding: 6px 6px 8px !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-dropdown-head img {
  width: 30px !important;
  height: 30px !important;
  flex-basis: 30px !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-dropdown-head strong {
  color: #12151b !important;
  font-size: 12px !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-dropdown-head span {
  color: #5f6875 !important;
  font-size: 10px !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-dropdown-list {
  padding: 6px 0 4px !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-dropdown-list a,
body:not([data-shell="mobile"]) .sidebar-panel .account-menu-logout {
  min-height: 38px !important;
  padding: 7px 8px !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-dropdown-list a strong {
  color: #12151b !important;
  font-size: 12px !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-dropdown-list a span {
  color: #657080 !important;
  font-size: 10px !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-menu-logout {
  font-size: 12px !important;
  font-weight: 850 !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-dropdown::before {
  display: none !important;
  content: none !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .health-row {
  margin-top: 0 !important;
  align-items: center !important;
  color: rgba(255, 255, 255, 0.58) !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .health-row strong {
  font-size: 11px !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .meter {
  height: 4px !important;
  margin-top: 0 !important;
}

/* Workflow video parameters: compact aligned rows for ratio, resolution, duration. */
body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.video-param-popover {
  width: 286px !important;
  min-width: 286px !important;
  max-width: calc(100vw - 32px) !important;
  display: grid !important;
  gap: 10px !important;
  padding: 12px !important;
  border: 1px solid #dfe5ee !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.14) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.video-param-popover.is-flipped {
  box-shadow: 0 -16px 38px rgba(15, 23, 42, 0.14) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .video-param-popover .desktop-param-popover-head {
  display: grid !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 0 8px !important;
  border: 0 !important;
  border-bottom: 1px solid #edf0f5 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .video-param-popover .desktop-param-popover-head strong {
  color: #151922 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .video-param-popover .desktop-param-popover-head span {
  display: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .video-param-popover .workflow-param-section {
  display: grid !important;
  grid-template-columns: 68px minmax(0, 1fr) !important;
  align-items: center !important;
  column-gap: 10px !important;
  row-gap: 0 !important;
  margin: 0 !important;
  min-height: 40px !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .video-param-popover .workflow-param-section > span {
  color: #354052 !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  text-align: left !important;
  white-space: nowrap !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .video-param-popover .desktop-param-options,
body[data-page="workflow"]:not([data-shell="mobile"]) .video-param-popover .video-param-ratio-options,
body[data-page="workflow"]:not([data-shell="mobile"]) .video-param-popover .video-param-quality-options,
body[data-page="workflow"]:not([data-shell="mobile"]) .video-param-popover .video-param-duration-options {
  width: 100% !important;
  display: grid !important;
  gap: 3px !important;
  max-height: none !important;
  padding: 3px !important;
  overflow: visible !important;
  border: 1px solid #e3e8f0 !important;
  border-radius: 8px !important;
  background: #f6f8fb !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .video-param-popover .video-param-ratio-options {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .video-param-popover .video-param-quality-options,
body[data-page="workflow"]:not([data-shell="mobile"]) .video-param-popover .video-param-duration-options {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.video-param-popover .desktop-param-option,
body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.video-param-popover .video-param-ratio-options .desktop-param-option,
body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.video-param-popover .video-param-quality-options .desktop-param-option,
body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.video-param-popover .video-param-duration-options .desktop-param-option {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 32px !important;
  height: 32px !important;
  flex: initial !important;
  justify-self: stretch !important;
  align-self: stretch !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  padding: 0 7px !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #626d7f !important;
  box-shadow: none !important;
  text-align: center !important;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.video-param-popover .desktop-param-option:hover {
  border-color: #dfe7f2 !important;
  background: #ffffff !important;
  color: #151922 !important;
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.06) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.video-param-popover .desktop-param-option.is-selected {
  border-color: #e11d48 !important;
  background: #ffffff !important;
  color: #9f1239 !important;
  box-shadow: 0 0 0 1px rgba(225, 29, 72, 0.08), 0 6px 14px rgba(15, 23, 42, 0.06) !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.video-param-popover .desktop-param-option-mark {
  display: none !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.video-param-popover .desktop-param-option-copy {
  min-width: 0 !important;
  min-height: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.video-param-popover .desktop-param-option strong {
  color: inherit !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .desktop-param-popover.video-param-popover .desktop-param-option small {
  display: none !important;
}

body:not([data-shell="mobile"]) .topbar {
  display: none !important;
}

/* Temporary asset upload and records: keep the new workflow surfaces aligned with the asset library tools. */
body[data-page="workflow"] .temporary-asset-upload-panel {
  overflow: visible !important;
}

body[data-page="workflow"] #tempAssetUploadForm.temporary-asset-upload-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
}

body[data-page="workflow"] #tempAssetUploadForm.temporary-asset-upload-form > label {
  min-width: 0 !important;
  margin: 0 !important;
}

body[data-page="workflow"] #tempAssetUploadForm.temporary-asset-upload-form > label:nth-child(3),
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row {
  grid-column: 1 / -1 !important;
}

body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 112px !important;
  align-items: stretch !important;
  gap: 8px !important;
}

body[data-page="workflow"] #tempAssetUploadForm .asset-file-field {
  position: relative !important;
  min-width: 0 !important;
  min-height: 52px !important;
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 8px 12px 8px 8px !important;
  border: 1px solid #e4e7ec !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02) !important;
  cursor: pointer !important;
  overflow: hidden !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease !important;
}

body[data-page="workflow"] #tempAssetUploadForm .asset-file-field:hover,
body[data-page="workflow"] #tempAssetUploadForm .asset-file-field:focus-within {
  border-color: rgba(225, 18, 52, 0.38) !important;
  background: #fffafa !important;
}

body[data-page="workflow"] #tempAssetUploadForm .asset-file-field.has-file {
  border-color: rgba(20, 184, 166, 0.42) !important;
  background: #f7fffd !important;
}

body[data-page="workflow"] #tempAssetUploadForm .asset-file-action {
  position: relative !important;
  z-index: 1 !important;
  width: 42px !important;
  height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(17, 24, 39, 0.1) !important;
  border-radius: 7px !important;
  background: #f5f7fa !important;
  color: #111827 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  pointer-events: none !important;
}

body[data-page="workflow"] #tempAssetUploadForm .asset-file-copy {
  min-width: 0 !important;
  min-height: 1px !important;
  display: grid !important;
  gap: 3px !important;
  align-content: center !important;
  line-height: 1.15 !important;
}

body[data-page="workflow"] #tempAssetUploadForm .asset-file-copy strong,
body[data-page="workflow"] #tempAssetUploadForm .asset-file-copy small {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-page="workflow"] #tempAssetUploadForm .asset-file-copy strong {
  color: #111827 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

body[data-page="workflow"] #tempAssetUploadForm .asset-file-copy small {
  color: #667085 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

body[data-page="workflow"] #tempAssetFile {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer !important;
}

body[data-page="workflow"] #uploadTempAsset {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 52px !important;
  height: 52px !important;
  padding: 0 10px !important;
  font-size: 13px !important;
  white-space: nowrap !important;
}

body[data-page="workflow"] .temporary-asset-upload-list {
  display: grid !important;
  gap: 8px !important;
  margin-top: 10px !important;
}

body[data-page="workflow"] .temporary-asset-upload-list[hidden] {
  display: none !important;
}

body[data-page="workflow"] .temporary-asset-upload-item {
  min-width: 0 !important;
  min-height: 56px !important;
  display: grid !important;
  grid-template-columns: 18px 44px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px !important;
  border: 1px solid #e4e7ec !important;
  border-radius: 8px !important;
  background: #ffffff !important;
}

body[data-page="workflow"] .temporary-asset-upload-item.is-selected {
  border-color: rgba(225, 18, 52, 0.48) !important;
  background: #fff8f9 !important;
}

body[data-page="workflow"] .temporary-asset-upload-item > input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  accent-color: #e21b3c !important;
}

body[data-page="workflow"] .temporary-asset-upload-thumb {
  position: relative !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  padding: 0 !important;
  border: 1px solid #eef1f5 !important;
  border-radius: 6px !important;
  background: #f6f7f9 !important;
  overflow: hidden !important;
  cursor: pointer !important;
}

body[data-page="workflow"] .temporary-asset-upload-thumb img {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
}

body[data-page="workflow"] .temporary-asset-upload-thumb:has(img[data-media-type="video"])::after {
  content: "MP4" !important;
  position: absolute !important;
  right: 2px !important;
  bottom: 2px !important;
  min-height: 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 0 4px !important;
  border-radius: 3px !important;
  background: rgba(17, 24, 39, 0.9) !important;
  color: #fff !important;
  font-size: 8px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

body[data-page="workflow"] .temporary-asset-upload-meta {
  min-width: 0 !important;
  display: grid !important;
  gap: 4px !important;
}

body[data-page="workflow"] .temporary-asset-upload-meta input {
  width: 100% !important;
  height: 28px !important;
  min-width: 0 !important;
  padding: 0 8px !important;
  border: 1px solid transparent !important;
  border-radius: 5px !important;
  background: transparent !important;
  color: #111827 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 28px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-page="workflow"] .temporary-asset-upload-meta input:hover,
body[data-page="workflow"] .temporary-asset-upload-meta input:focus {
  border-color: #d0d5dd !important;
  background: #ffffff !important;
  outline: none !important;
}

body[data-page="workflow"] .temporary-asset-upload-meta small {
  min-width: 0 !important;
  color: #667085 !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-page="workflow"] .workflow-asset-group-label {
  min-height: 24px !important;
  display: flex !important;
  align-items: center !important;
  padding: 4px 2px 0 !important;
  color: #667085 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

body[data-page="workflow"] .workflow-asset-option.is-temporary {
  border-color: rgba(20, 184, 166, 0.32) !important;
  background: #fbfffd !important;
}

body[data-page="workflow"] .workflow-asset-option.is-temporary.is-selected {
  border-color: rgba(225, 18, 52, 0.5) !important;
  background: #fff7f8 !important;
}

body[data-page="assets"] .temporary-asset-record-bar {
  min-height: 60px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: 0 0 14px !important;
  padding: 12px 14px !important;
  border: 1px solid #e4e7ec !important;
  border-radius: 8px !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}

body[data-page="assets"] .temporary-asset-record-bar[hidden] {
  display: none !important;
}

body[data-page="assets"] .temporary-asset-record-bar > div {
  min-width: 0 !important;
  display: grid !important;
  gap: 4px !important;
}

body[data-page="assets"] .temporary-asset-record-bar strong {
  color: #111827 !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  line-height: 1.15 !important;
}

body[data-page="assets"] .temporary-asset-record-bar span {
  color: #667085 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

body[data-page="assets"] .temporary-asset-record-bar button {
  min-width: 82px !important;
  min-height: 34px !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
}

.temporary-asset-dialog {
  width: min(760px, calc(100vw - 32px)) !important;
  max-height: min(760px, calc(100vh - 48px)) !important;
  padding: 0 !important;
  border: 1px solid #e4e7ec !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #111827 !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22) !important;
  overflow: hidden !important;
}

.temporary-asset-dialog::backdrop {
  background: rgba(15, 23, 42, 0.46) !important;
}

.temporary-asset-dialog .dialog-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 16px 18px !important;
  border-bottom: 1px solid #eef1f5 !important;
  background: #ffffff !important;
}

.temporary-asset-dialog .dialog-head > div {
  min-width: 0 !important;
  display: grid !important;
  gap: 4px !important;
}

.temporary-asset-dialog .dialog-head strong {
  color: #111827 !important;
  font-size: 16px !important;
  font-weight: 950 !important;
  line-height: 1.2 !important;
}

.temporary-asset-dialog .dialog-head span {
  color: #667085 !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 1.35 !important;
}

.temporary-asset-record-list {
  max-height: min(560px, calc(100vh - 190px)) !important;
  display: grid !important;
  gap: 10px !important;
  padding: 14px 18px !important;
  overflow-y: auto !important;
}

.temporary-asset-record-card {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: 68px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px !important;
  border: 1px solid #e4e7ec !important;
  border-radius: 8px !important;
  background: #ffffff !important;
}

.temporary-asset-record-card.is-moved {
  background: #f8fafc !important;
}

.temporary-asset-thumb {
  width: 68px !important;
  height: 68px !important;
  border-radius: 6px !important;
  object-fit: cover !important;
  background: #f3f4f6 !important;
}

.temporary-asset-record-meta {
  min-width: 0 !important;
  display: grid !important;
  gap: 6px !important;
}

.temporary-asset-record-meta strong,
.temporary-asset-record-meta span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.temporary-asset-record-meta strong {
  color: #111827 !important;
  font-size: 14px !important;
  font-weight: 950 !important;
}

.temporary-asset-record-meta span {
  color: #667085 !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}

.temporary-asset-record-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
}

.temporary-asset-record-actions button {
  min-height: 32px !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
}

.temporary-asset-record-status {
  min-height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 10px !important;
  border-radius: 6px !important;
  border: 1px solid #d8e4d7 !important;
  background: #f4fbf3 !important;
  color: #157347 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

.temporary-asset-record-status.is-library-missing {
  border-color: #f2d7a8 !important;
  background: #fff8ec !important;
  color: #9a5b00 !important;
}

.temporary-asset-dialog > .empty-state,
.temporary-asset-dialog > .form-message {
  margin: 0 18px 16px !important;
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="workflow"] #tempAssetUploadForm .asset-file-field {
    transition: none !important;
  }
}

body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm.temporary-asset-upload-form {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
}

body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row {
  grid-template-columns: minmax(0, 1fr) 88px !important;
  gap: 8px !important;
}

body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .asset-file-field {
  min-height: 52px !important;
  grid-template-columns: 36px minmax(0, 1fr) !important;
  gap: 7px !important;
  padding: 8px 9px 8px 8px !important;
}

body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .asset-file-action {
  width: 36px !important;
  height: 32px !important;
  font-size: 11px !important;
}

body[data-shell="mobile"][data-page="workflow"] #uploadTempAsset {
  height: auto !important;
  min-height: 52px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
}

body[data-shell="mobile"][data-page="workflow"] .temporary-asset-upload-item {
  grid-template-columns: 18px 42px minmax(0, 1fr) !important;
  gap: 8px !important;
}

body[data-shell="mobile"][data-page="workflow"] .temporary-asset-upload-thumb {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
}

body[data-shell="mobile"][data-page="workflow"] .temporary-asset-upload-meta input {
  font-size: 12px !important;
}

body[data-shell="mobile"][data-page="assets"] .temporary-asset-record-bar {
  min-height: 56px !important;
  flex-direction: row !important;
  margin-bottom: 10px !important;
  padding: 10px 12px !important;
}

body[data-shell="mobile"][data-page="assets"] .temporary-asset-record-bar button {
  min-width: 64px !important;
}

body[data-shell="mobile"][data-page="assets"] .temporary-asset-record-actions {
  display: flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
}

body[data-shell="mobile"] .temporary-asset-dialog {
  width: calc(100vw - 18px) !important;
  max-height: calc(100vh - 28px) !important;
}

body[data-shell="mobile"] .temporary-asset-dialog .dialog-head {
  padding: 13px 12px !important;
}

body[data-shell="mobile"] .temporary-asset-record-list {
  max-height: calc(100vh - 170px) !important;
  padding: 12px !important;
}

body[data-shell="mobile"] .temporary-asset-record-card {
  grid-template-columns: 58px minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 10px !important;
}

body[data-shell="mobile"] .temporary-asset-thumb {
  width: 58px !important;
  height: 58px !important;
}

body[data-shell="mobile"] .temporary-asset-record-actions {
  grid-column: 1 / -1 !important;
  justify-content: stretch !important;
}

body[data-shell="mobile"] .temporary-asset-record-actions button {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  padding: 0 8px !important;
  font-size: 12px !important;
}

/* Temporary asset upload: multi-select, quota-safe workflow. */
body[data-page="workflow"] .temporary-asset-upload-panel .section-head {
  align-items: start !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
}

body[data-page="workflow"] .temporary-asset-upload-panel .section-head h2 {
  line-height: 1.15 !important;
}

body[data-page="workflow"] .temporary-asset-upload-panel .section-head span {
  max-width: 100% !important;
  line-height: 1.35 !important;
}

body[data-page="workflow"] #tempAssetUploadForm.temporary-asset-upload-form {
  gap: 0 !important;
}

body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row {
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  align-items: stretch !important;
  gap: 8px !important;
}

body[data-page="workflow"] #tempAssetUploadForm .asset-file-field {
  min-height: 44px !important;
  grid-template-columns: 40px minmax(0, 1fr) !important;
  padding: 5px 11px 5px 5px !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body[data-page="workflow"] #tempAssetUploadForm .asset-file-action {
  width: 40px !important;
  height: 32px !important;
  border-radius: 6px !important;
  background: #f6f3ee !important;
  color: #12151b !important;
}

body[data-page="workflow"] #uploadTempAsset {
  height: 44px !important;
  min-height: 44px !important;
  border-radius: 0 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body[data-page="workflow"] .temporary-asset-upload-summary {
  min-width: 0 !important;
  min-height: 28px !important;
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  margin-top: 8px !important;
  padding: 0 2px !important;
  color: #68717e !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

body[data-page="workflow"] .temporary-asset-upload-stat {
  min-width: 0 !important;
  min-height: 0 !important;
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 4px !important;
  padding: 0 9px !important;
  border: 0 !important;
  border-left: 1px solid #e4e7ec !important;
  border-radius: 0 !important;
  background: transparent !important;
  line-height: 1.1 !important;
}

body[data-page="workflow"] .temporary-asset-upload-stat:first-child {
  padding-left: 0 !important;
  border-left: 0 !important;
}

body[data-page="workflow"] .temporary-asset-upload-stat small,
body[data-page="workflow"] .temporary-asset-upload-stat strong {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-page="workflow"] .temporary-asset-upload-stat small {
  color: #667085 !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
}

body[data-page="workflow"] .temporary-asset-upload-stat strong {
  color: #111827 !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  line-height: 1.1 !important;
}

body[data-page="workflow"] .temporary-asset-upload-list {
  gap: 6px !important;
  margin-top: 8px !important;
}

body[data-page="workflow"] .temporary-asset-upload-item {
  min-height: 56px !important;
  grid-template-columns: 18px 42px minmax(0, 1fr) auto !important;
  gap: 8px !important;
  padding: 7px 8px !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body[data-page="workflow"] .temporary-asset-upload-item.is-selected {
  border-color: rgba(226, 27, 60, 0.34) !important;
  background: linear-gradient(90deg, rgba(226, 27, 60, 0.055), #ffffff 38px) !important;
}

body[data-page="workflow"] .temporary-asset-upload-actions {
  min-width: 82px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
}

body[data-page="workflow"] .temporary-asset-upload-badge {
  min-width: 0 !important;
  justify-self: end !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 24px !important;
  padding: 0 8px !important;
  border: 1px solid #e4e7ec !important;
  border-radius: 999px !important;
  background: #f8fafc !important;
  color: #667085 !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-page="workflow"] .temporary-asset-upload-item.is-selected .temporary-asset-upload-badge {
  border-color: rgba(226, 27, 60, 0.28) !important;
  background: #fff1f3 !important;
  color: #ba1230 !important;
}

body[data-page="workflow"] .temporary-asset-upload-delete {
  min-width: 38px !important;
  min-height: 24px !important;
  height: 24px !important;
  padding: 0 7px !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #ba1230 !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
}

body[data-page="workflow"] .temporary-asset-upload-delete:hover,
body[data-page="workflow"] .temporary-asset-upload-delete:focus-visible {
  border-color: rgba(186, 18, 48, 0.24) !important;
  background: #fff1f3 !important;
  outline: none !important;
}

body[data-page="workflow"] .temporary-asset-upload-meta input {
  padding: 0 4px !important;
}

body[data-page="workflow"] #tempAssetMessage {
  margin-top: 8px !important;
}

body[data-page="workflow"] #tempAssetMessage:not(:empty) {
  min-height: 36px !important;
  display: flex !important;
  align-items: center !important;
  padding: 8px 10px !important;
  border-radius: 7px !important;
  line-height: 1.35 !important;
}

body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row {
  grid-template-columns: minmax(0, 1fr) 74px !important;
  gap: 7px !important;
}

body[data-shell="mobile"][data-page="workflow"] .temporary-asset-upload-summary {
  min-height: 26px !important;
  gap: 0 !important;
  overflow: hidden !important;
}

body[data-shell="mobile"][data-page="workflow"] .temporary-asset-upload-stat {
  min-height: 0 !important;
  padding: 0 6px !important;
}

body[data-shell="mobile"][data-page="workflow"] .temporary-asset-upload-item {
  min-height: 56px !important;
  grid-template-columns: 18px 40px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 7px !important;
}

body[data-shell="mobile"][data-page="workflow"] .temporary-asset-upload-thumb {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
}

body[data-shell="mobile"][data-page="workflow"] .temporary-asset-upload-actions {
  min-width: 38px !important;
  display: grid !important;
  justify-items: end !important;
  gap: 4px !important;
}

body[data-shell="mobile"][data-page="workflow"] .temporary-asset-upload-badge {
  min-height: 20px !important;
  padding: 0 6px !important;
}

body[data-shell="mobile"][data-page="workflow"] .temporary-asset-upload-delete {
  min-width: 34px !important;
  min-height: 22px !important;
  height: 22px !important;
  padding: 0 5px !important;
}

body[data-shell="mobile"][data-page="workflow"] .temporary-asset-upload-meta {
  gap: 2px !important;
}

/* Upload command bars: compact file selection without the ugly empty input cavity. */
body[data-page="assets"] #assetUploadForm .asset-upload-row,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row {
  min-width: 0 !important;
  width: fit-content !important;
  max-width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  margin-top: 2px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row:has(.asset-file-field.has-file),
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row:has(.asset-file-field.has-file) {
  width: 100% !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field {
  position: relative !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font-size: inherit !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field.has-file,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field.has-file {
  flex: 1 1 auto !important;
  height: 40px !important;
  padding: 4px 10px 4px 4px !important;
  border: 1px solid #dfe4eb !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  box-shadow: inset 3px 0 0 rgba(21, 128, 61, 0.54) !important;
  overflow: hidden !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field:hover,
body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field:focus-within,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field:hover,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field:focus-within {
  background: transparent !important;
  box-shadow: none !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field.has-file:hover,
body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field.has-file:focus-within,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field.has-file:hover,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field.has-file:focus-within {
  border-color: rgba(226, 27, 60, 0.36) !important;
  background: #ffffff !important;
  box-shadow: inset 3px 0 0 rgba(226, 27, 60, 0.68), 0 0 0 3px rgba(226, 27, 60, 0.06) !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-action,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-action {
  position: relative !important;
  z-index: 1 !important;
  width: auto !important;
  min-width: 72px !important;
  height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 14px !important;
  border: 1px solid #cfd5df !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  color: #12151b !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field.has-file .asset-file-action,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field.has-file .asset-file-action {
  min-width: 54px !important;
  height: 30px !important;
  padding: 0 10px !important;
  border-color: #d9dee7 !important;
  background: #f6f3ee !important;
  font-size: 11px !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field:hover .asset-file-action,
body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field:focus-within .asset-file-action,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field:hover .asset-file-action,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field:focus-within .asset-file-action {
  border-color: rgba(226, 27, 60, 0.38) !important;
  color: #ba1230 !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field:not(.has-file) .asset-file-copy,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field:not(.has-file) .asset-file-copy {
  display: none !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field.has-file .asset-file-copy,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field.has-file .asset-file-copy {
  min-width: 0 !important;
  display: grid !important;
  align-content: center !important;
  gap: 2px !important;
  line-height: 1.15 !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-copy strong,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-copy strong {
  min-width: 0 !important;
  overflow: hidden !important;
  color: #12151b !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row #uploadAsset,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row #uploadTempAsset {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 112px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 14px !important;
  border-radius: 0 !important;
  background: var(--primary, #e21b3c) !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row #uploadAsset:hover,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row #uploadTempAsset:hover {
  background: var(--primary-strong, #ba1230) !important;
}

body[data-shell="mobile"][data-page="assets"] #assetUploadForm .asset-upload-row,
body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row {
  gap: 7px !important;
}

body[data-shell="mobile"][data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-action,
body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-action {
  min-width: 56px !important;
  height: 38px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
}

body[data-shell="mobile"][data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field,
body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field {
  height: 38px !important;
  min-height: 38px !important;
}

body[data-shell="mobile"][data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field.has-file,
body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field.has-file {
  height: 38px !important;
  min-height: 38px !important;
}

body[data-shell="mobile"][data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field.has-file .asset-file-action,
body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field.has-file .asset-file-action {
  min-width: 46px !important;
  height: 28px !important;
  padding: 0 8px !important;
}

body[data-shell="mobile"][data-page="assets"] #assetUploadForm .asset-upload-row #uploadAsset,
body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row #uploadTempAsset {
  min-width: 74px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 9px !important;
  font-size: 11px !important;
}

/* Upload command bars: final product-safe pass for workflow and asset library. */
body[data-page="assets"] #assetUploadForm .asset-upload-row,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: stretch !important;
  gap: 8px !important;
  margin-top: 2px !important;
  padding: 6px !important;
  border: 1px solid #e4e7ec !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: inset 0 1px 0 #f6f3ee !important;
}

body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row:has(#clearTempAssetFile) {
  grid-template-columns: minmax(0, 1fr) auto auto !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field {
  position: relative !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 44px !important;
  min-height: 44px !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 5px 12px 5px 5px !important;
  border: 1px solid #dfe4eb !important;
  border-radius: 6px !important;
  background: #f8fafc !important;
  box-shadow: none !important;
  cursor: pointer !important;
  overflow: hidden !important;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field.has-file,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field.has-file {
  background: #ffffff !important;
  box-shadow: inset 3px 0 0 rgba(21, 128, 61, 0.58) !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field:hover,
body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field:focus-within,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field:hover,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field:focus-within {
  border-color: rgba(226, 27, 60, 0.42) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(226, 27, 60, 0.08) !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-action,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-action {
  position: relative !important;
  z-index: 1 !important;
  min-width: 68px !important;
  height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 10px !important;
  border: 1px solid #cfd5df !important;
  border-radius: 5px !important;
  background: #ffffff !important;
  color: #12151b !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field:hover .asset-file-action,
body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field:focus-within .asset-file-action,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field:hover .asset-file-action,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field:focus-within .asset-file-action {
  border-color: rgba(226, 27, 60, 0.36) !important;
  color: #ba1230 !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-copy,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-copy {
  min-width: 0 !important;
  display: grid !important;
  align-content: center !important;
  gap: 2px !important;
  line-height: 1.15 !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field:not(.has-file) .asset-file-copy,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field:not(.has-file) .asset-file-copy,
body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field.has-file .asset-file-copy,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field.has-file .asset-file-copy {
  min-width: 0 !important;
  display: grid !important;
  align-content: center !important;
  gap: 2px !important;
  line-height: 1.15 !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-copy strong,
body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-copy small,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-copy strong,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-copy small {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-copy strong,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-copy strong {
  color: #12151b !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-copy small,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-copy small {
  color: #68717e !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-copy small:empty,
body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-copy small[hidden],
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-copy small:empty,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-copy small[hidden] {
  display: none !important;
}

body[data-page="assets"] #assetUploadForm .asset-upload-row #uploadAsset,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row #uploadTempAsset {
  width: auto !important;
  min-width: 96px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 14px !important;
  border-radius: 0 !important;
  background: var(--primary, #e21b3c) !important;
  color: #ffffff !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row #clearTempAssetFile,
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row #toggleTempAssetSelection {
  width: auto !important;
  min-width: 54px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 10px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row #toggleTempAssetSelection[aria-pressed="true"] {
  border-color: rgba(226, 27, 60, 0.28) !important;
  background: #fff1f3 !important;
  color: #ba1230 !important;
}

body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row #toggleTempAssetSelection:disabled {
  opacity: 0.48 !important;
  cursor: not-allowed !important;
}

body[data-page="assets"] #assetFile,
body[data-page="workflow"] #tempAssetFile {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer !important;
}

body[data-shell="mobile"][data-page="assets"] #assetUploadForm .asset-upload-row,
body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row {
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  gap: 6px !important;
  padding: 5px !important;
}

body[data-shell="mobile"][data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field,
body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field {
  height: 42px !important;
  min-height: 42px !important;
  gap: 7px !important;
  padding: 5px 8px 5px 5px !important;
}

body[data-shell="mobile"][data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-action,
body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-action {
  min-width: 64px !important;
  height: 30px !important;
  padding: 0 9px !important;
  font-size: 11px !important;
}

body[data-shell="mobile"][data-page="assets"] #assetUploadForm .asset-upload-row #uploadAsset,
body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row #uploadTempAsset {
  min-width: 74px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 9px !important;
  font-size: 11px !important;
}

body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row #clearTempAssetFile,
body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row #toggleTempAssetSelection {
  min-width: 48px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 8px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="assets"] #assetUploadForm .asset-upload-row .asset-file-field,
  body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field {
    transition: none !important;
  }
}

/* Custom storyboard editor: expand inline instead of becoming a nested scroll panel. */
body[data-page="workflow"] .workflow-composer .prompt-list.is-storyboard-mode,
body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .prompt-list.is-storyboard-mode {
  max-height: none !important;
  min-height: 0 !important;
  height: auto !important;
  gap: 0 !important;
  padding-right: 0 !important;
  overflow: visible !important;
}

body[data-page="workflow"] .workflow-composer .prompt-list.is-storyboard-mode .custom-storyboard-panel,
body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .prompt-list.is-storyboard-mode .custom-storyboard-panel {
  max-height: none !important;
  overflow: visible !important;
}

body[data-page="workflow"]:not([data-shell="mobile"]) .workflow-composer .prompt-list.is-storyboard-mode + .generation-command-bar {
  margin-top: 4px !important;
}

body[data-page="assets"] .temporary-asset-record-bar > .temporary-asset-record-actions {
  min-width: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  margin-left: auto !important;
  flex: 0 0 auto !important;
}

body[data-page="assets"] .temporary-asset-record-bar > .temporary-asset-record-actions #refreshAssetPage {
  order: 2 !important;
}

body[data-page="results"] .result-toolbar #refreshResults {
  margin-left: auto !important;
}

body[data-shell="mobile"][data-page="results"] .panel > .section-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  column-gap: 8px !important;
}

body[data-shell="mobile"][data-page="results"] .panel > .section-head > div:first-child {
  min-width: 0 !important;
}

body[data-shell="mobile"][data-page="results"] .result-toolbar {
  display: inline-flex !important;
  justify-content: flex-end !important;
  justify-self: end !important;
  align-self: start !important;
  width: auto !important;
  min-width: 0 !important;
  margin-left: auto !important;
  gap: 7px !important;
}

body[data-shell="mobile"][data-page="results"] .result-toolbar #refreshResults {
  width: auto !important;
  min-width: 0 !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
  border: 1px solid var(--mobile-line, #e4e7ec) !important;
  background: #fff !important;
  color: #12151b !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-page="real-portrait"] .page-head {
  margin-bottom: 18px;
}

.real-portrait-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.real-portrait-layout > * {
  min-width: 0;
}

.real-portrait-groups,
.real-portrait-assets {
  margin-bottom: 0;
}

.real-portrait-groups .toolbar-input.full {
  width: 100%;
  margin: 8px 0 12px;
}

.real-portrait-group-list {
  display: grid;
  gap: 10px;
}

.real-portrait-group-card {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  box-shadow: none;
}

.real-portrait-group-card:hover,
.real-portrait-group-card.is-selected {
  border-color: rgba(226, 27, 60, 0.42);
  background: #fff7f8;
}

.real-portrait-group-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 35%, #ffffff 0 4px, transparent 5px),
    radial-gradient(circle at 50% 70%, #ffffff 0 9px, transparent 10px),
    #e21b3c;
}

.real-portrait-group-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.real-portrait-group-copy strong,
.real-portrait-group-copy small,
.real-portrait-group-copy em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.real-portrait-group-copy strong {
  font-size: 14px;
  font-weight: 900;
}

.real-portrait-group-copy small,
.real-portrait-group-copy em {
  color: var(--text-secondary);
  font-size: 11px;
  font-style: normal;
}

.real-portrait-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.real-portrait-pager span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 850;
}

.real-portrait-assets .section-head {
  align-items: flex-start;
}

.real-portrait-assets .section-head .button-group {
  align-items: center;
}

body[data-page="real-portrait"] #createRealPortraitGroup,
body[data-page="real-portrait"] #openRealPortraitUpload {
  height: 36px !important;
  min-height: 36px !important;
  padding: 8px 15px !important;
  font-size: 13px !important;
  line-height: 1 !important;
  border-radius: var(--radius) !important;
}

.real-portrait-assets .toolbar-input {
  width: min(260px, 30vw);
}

.real-portrait-asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.real-portrait-asset-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.real-portrait-asset-card > .badge {
  position: absolute;
  top: 8px;
  right: 8px;
}

.real-portrait-asset-thumb {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f1f5f9;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 900;
}

.real-portrait-asset-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  cursor: zoom-in;
}

.real-portrait-asset-body {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px;
}

.real-portrait-asset-body strong,
.real-portrait-asset-body small,
.real-portrait-asset-body p {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.real-portrait-asset-body strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.real-portrait-asset-body small {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.45;
}

.real-portrait-asset-body p {
  margin: 0;
  color: var(--danger);
  font-size: 11px;
  line-height: 1.45;
  white-space: nowrap;
}

.real-portrait-dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.real-portrait-dialog::backdrop {
  background: rgba(15, 23, 42, 0.58);
}

.real-portrait-dialog .dialog-head > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.real-portrait-dialog .dialog-head strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
}

.real-portrait-dialog .dialog-head span {
  color: var(--text-secondary);
  font-size: 12px;
}

.real-portrait-qr-wrap {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 18px 18px 8px;
}

.real-portrait-qr-wrap img {
  width: 220px;
  height: 220px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
}

.real-portrait-qr-wrap img:not([src]) {
  display: none;
}

.real-portrait-qr-wrap a {
  max-width: 100%;
  overflow: hidden;
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.real-portrait-dialog .dialog-actions,
.real-portrait-drawer .dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px 16px;
}

.real-portrait-dialog .form-message {
  min-height: 18px;
  margin: 0;
  padding: 0 16px 14px;
}

.real-portrait-drawer[hidden] {
  display: none !important;
}

.real-portrait-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  justify-items: end;
  background: rgba(15, 23, 42, 0.42);
}

.real-portrait-drawer-shell {
  width: min(560px, 100vw);
  height: 100%;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto auto;
  overflow: hidden;
  background: #ffffff;
  box-shadow: -22px 0 70px rgba(15, 23, 42, 0.22);
}

.real-portrait-file-field {
  margin: 16px !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
}

.real-portrait-file-field .asset-file-action {
  position: relative !important;
  z-index: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 96px !important;
  height: 34px !important;
  padding: 0 12px !important;
  border: 1px solid #cfd5df !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  color: #12151b !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  pointer-events: none !important;
}

.real-portrait-file-field .asset-file-copy {
  min-width: 0 !important;
  display: grid !important;
  align-content: center !important;
  gap: 2px !important;
  line-height: 1.2 !important;
}

.real-portrait-file-field .asset-file-copy strong,
.real-portrait-file-field .asset-file-copy small {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.real-portrait-file-field .asset-file-copy strong {
  color: #12151b !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

.real-portrait-file-field .asset-file-copy small {
  color: #68717e !important;
  font-size: 11px !important;
  font-weight: 750 !important;
}

.real-portrait-file-field #realPortraitFiles {
  position: absolute !important;
  inset: 0 !important;
  opacity: 0 !important;
  cursor: pointer !important;
}

.real-portrait-filter-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 10px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 850;
}

.real-portrait-upload-summary {
  margin: 0 16px 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.real-portrait-upload-results {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 0 16px 12px;
  overflow: auto;
}

.real-portrait-upload-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.real-portrait-upload-item.is-failed {
  border-color: #fde2e2;
  background: #fff7f7;
}

.real-portrait-upload-item strong,
.real-portrait-upload-item small,
.real-portrait-upload-item p {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.real-portrait-upload-item strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.real-portrait-upload-item small {
  color: var(--text-secondary);
  font-size: 11px;
}

.real-portrait-upload-item p {
  margin: 4px 0 0;
  color: var(--danger);
  font-size: 11px;
}

.real-portrait-drawer .form-message {
  margin: 0;
  padding: 0 16px;
}

body[data-shell="mobile"][data-page="real-portrait"] .real-portrait-layout {
  grid-template-columns: 1fr;
  gap: 12px;
}

body[data-shell="mobile"][data-page="real-portrait"] .real-portrait-assets .section-head .button-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-shell="mobile"][data-page="real-portrait"] .real-portrait-assets .toolbar-input {
  width: 100%;
  grid-column: 1 / -1;
}

body[data-shell="mobile"][data-page="real-portrait"] .real-portrait-asset-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body[data-shell="mobile"][data-page="real-portrait"] .real-portrait-drawer-shell {
  width: 100vw;
}

body[data-shell="mobile"][data-page="real-portrait"] .real-portrait-dialog .dialog-actions,
body[data-shell="mobile"][data-page="real-portrait"] .real-portrait-drawer .dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-shell="mobile"][data-page="real-portrait"] .real-portrait-qr-wrap img {
  width: 200px;
  height: 200px;
}

@media (max-width: 720px) {
  body[data-page="real-portrait"] .real-portrait-layout {
    grid-template-columns: 1fr;
  }
}

.preview-prompt-zoom {
  min-height: 30px !important;
  padding: 0 12px !important;
  border-color: rgba(225, 29, 72, 0.42) !important;
  color: #111827 !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  text-transform: uppercase;
}

.preview-prompt-head .preview-prompt-zoom {
  margin-left: 0;
}

.prompt-zoom-dialog {
  width: min(980px, calc(100vw - 48px));
  max-width: min(980px, calc(100vw - 48px));
  max-height: calc(100vh - 64px);
  padding: 0;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.32);
  overflow: hidden;
}

.prompt-zoom-dialog::backdrop {
  background: rgba(11, 15, 21, 0.66);
}

.prompt-zoom-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e9f0;
  background: #ffffff;
}

.prompt-zoom-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.prompt-zoom-head strong {
  color: #111827;
  font-size: 16px;
  font-weight: 950;
}

.prompt-zoom-head span {
  color: #667085;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.prompt-zoom-text {
  max-height: calc(100vh - 164px);
  min-height: 420px;
  margin: 0;
  padding: 20px 22px 24px;
  overflow: auto;
  background: #f8fafc;
  color: #111827;
  font-family: inherit;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.82;
  white-space: pre-wrap;
  word-break: break-word;
}

body[data-shell="mobile"] .prompt-zoom-dialog {
  width: calc(100vw - 20px);
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 24px);
}

body[data-shell="mobile"] .prompt-zoom-head {
  min-height: 56px;
  padding: 14px;
}

body[data-shell="mobile"] .prompt-zoom-text {
  max-height: calc(100vh - 120px);
  min-height: 300px;
  padding: 16px;
  font-size: 14px;
  line-height: 1.74;
}

/* Asset upload button: keep height/text aligned with the white file button while fitting the label. */
body[data-page="assets"] #assetUploadForm .asset-upload-row #uploadAsset {
  align-self: center !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border-radius: 5px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

/* Workflow temporary upload button: same UI language as the asset library upload control. */
body[data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row #uploadTempAsset {
  align-self: center !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 96px !important;
  min-width: 96px !important;
  max-width: 96px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border-radius: 5px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

/* Match marked action buttons to the asset-library upload control. */
body[data-page="real-portrait"] #createRealPortraitGroup,
body[data-page="real-portrait"] #refreshRealPortraitGroups,
body[data-page="imgx-repaint"] #imgxRepaintSubmit,
body[data-page="training-videos"] #uploadTrainingVideos,
body[data-page="training-videos"] .training-video-upload-row .asset-file-action {
  height: 32px !important;
  min-height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 5px !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

body[data-page="real-portrait"] #createRealPortraitGroup,
body[data-page="imgx-repaint"] #imgxRepaintSubmit,
body[data-page="training-videos"] #uploadTrainingVideos {
  width: auto !important;
  min-width: 96px !important;
  padding: 0 14px !important;
  border-color: var(--primary, #e21b3c) !important;
  background: var(--primary, #e21b3c) !important;
  color: #ffffff !important;
}

body[data-page="real-portrait"] #createRealPortraitGroup {
  min-width: 64px !important;
  padding: 0 12px !important;
}

body[data-page="real-portrait"] #refreshRealPortraitGroups,
body[data-page="training-videos"] .training-video-upload-row .asset-file-action {
  min-width: 68px !important;
  padding: 0 10px !important;
  border: 1px solid #cfd5df !important;
  background: #ffffff !important;
  color: #12151b !important;
}

body[data-page="real-portrait"] #createRealPortraitGroup:hover,
body[data-page="imgx-repaint"] #imgxRepaintSubmit:hover,
body[data-page="training-videos"] #uploadTrainingVideos:hover {
  border-color: var(--primary-strong, #ba1230) !important;
  background: var(--primary-strong, #ba1230) !important;
  color: #ffffff !important;
}

body[data-page="real-portrait"] #refreshRealPortraitGroups:hover,
body[data-page="training-videos"] .training-video-upload-row .asset-file-field:hover .asset-file-action,
body[data-page="training-videos"] .training-video-upload-row .asset-file-field:focus-within .asset-file-action {
  border-color: rgba(226, 27, 60, 0.36) !important;
  background: #ffffff !important;
  color: #ba1230 !important;
}

body[data-page="real-portrait"] .real-portrait-groups .section-head .button-group {
  align-items: center !important;
  gap: 8px !important;
}

body[data-page="imgx-repaint"] .imgx-repaint-submit {
  align-items: center !important;
  gap: 8px !important;
}

body[data-page="imgx-repaint"] .imgx-repaint-cost {
  min-width: 96px !important;
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 10px !important;
  border-radius: 5px !important;
}

body[data-page="imgx-repaint"] .imgx-repaint-cost span {
  font-size: 11px !important;
  line-height: 1 !important;
}

body[data-page="imgx-repaint"] .imgx-repaint-cost strong {
  font-size: 15px !important;
  line-height: 1 !important;
}

body[data-page="training-videos"] .training-video-upload-row {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: stretch !important;
  gap: 8px !important;
  margin-top: 2px !important;
  padding: 6px !important;
  border: 1px solid #e4e7ec !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: inset 0 1px 0 #f6f3ee !important;
}

body[data-page="training-videos"] .training-video-upload-row .asset-file-field {
  position: relative !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 44px !important;
  min-height: 44px !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 5px 12px 5px 5px !important;
  border: 1px solid #dfe4eb !important;
  border-radius: 6px !important;
  background: #f8fafc !important;
  box-shadow: none !important;
  cursor: pointer !important;
  overflow: hidden !important;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease !important;
}

body[data-page="training-videos"] .training-video-upload-row .asset-file-field.has-file {
  background: #ffffff !important;
  box-shadow: inset 3px 0 0 rgba(21, 128, 61, 0.58) !important;
}

body[data-page="training-videos"] .training-video-upload-row .asset-file-field:hover,
body[data-page="training-videos"] .training-video-upload-row .asset-file-field:focus-within {
  border-color: rgba(226, 27, 60, 0.42) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(226, 27, 60, 0.08) !important;
}

body[data-page="training-videos"] #trainingVideoFiles {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer !important;
}

body[data-page="training-videos"] .training-video-upload-row .asset-file-copy {
  min-width: 0 !important;
  display: grid !important;
  align-content: center !important;
  gap: 2px !important;
  line-height: 1.15 !important;
}

body[data-page="training-videos"] .training-video-upload-row .asset-file-copy strong,
body[data-page="training-videos"] .training-video-upload-row .asset-file-copy small {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-page="training-videos"] .training-video-upload-row .asset-file-copy strong {
  color: #12151b !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body[data-page="training-videos"] .training-video-upload-row .asset-file-copy small {
  color: #68717e !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

body[data-page="training-videos"] #uploadTrainingVideos {
  align-self: center !important;
  min-width: 112px !important;
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="training-videos"] .training-video-upload-row .asset-file-field {
    transition: none !important;
  }
}

/* Mobile workflow asset picker: compact visual grid, selection by color instead of checkboxes. */
body[data-shell="mobile"][data-page="workflow"] #assetMultiSelect.workflow-asset-list {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  max-height: none !important;
  padding: 0 !important;
  overflow: visible !important;
}

body[data-shell="mobile"][data-page="workflow"] #assetMultiSelect .workflow-asset-group-label,
body[data-shell="mobile"][data-page="workflow"] #assetMultiSelect .empty-state {
  grid-column: 1 / -1 !important;
}

body[data-shell="mobile"][data-page="workflow"] #assetMultiSelect .workflow-asset-option {
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  align-items: stretch !important;
  gap: 5px !important;
  padding: 5px !important;
  border: 1px solid var(--mobile-line) !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  cursor: pointer !important;
  overflow: hidden !important;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease !important;
}

body[data-shell="mobile"][data-page="workflow"] #assetMultiSelect .workflow-asset-option:hover,
body[data-shell="mobile"][data-page="workflow"] #assetMultiSelect .workflow-asset-option.is-selected {
  border-color: rgba(226, 27, 60, 0.68) !important;
  background: #fff7f8 !important;
  box-shadow: inset 0 0 0 1px rgba(226, 27, 60, 0.24) !important;
}

body[data-shell="mobile"][data-page="workflow"] #assetMultiSelect .workflow-asset-option:active {
  transform: none !important;
}

body[data-shell="mobile"][data-page="workflow"] #assetMultiSelect .workflow-asset-option input[type="checkbox"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  min-height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body[data-shell="mobile"][data-page="workflow"] #assetMultiSelect .workflow-asset-option img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  display: block !important;
  border-radius: 6px !important;
  object-fit: cover !important;
  background: var(--mobile-soft) !important;
}

body[data-shell="mobile"][data-page="workflow"] #assetMultiSelect .workflow-asset-option span {
  min-width: 0 !important;
  display: block !important;
}

body[data-shell="mobile"][data-page="workflow"] #assetMultiSelect .workflow-asset-option strong {
  min-width: 0 !important;
  display: block !important;
  overflow: hidden !important;
  color: var(--mobile-ink) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1.18 !important;
  text-align: center !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="workflow"] #assetMultiSelect .workflow-asset-option small {
  display: none !important;
}

body[data-shell="mobile"][data-page="workflow"] #assetMultiSelect .workflow-asset-option.is-disabled {
  cursor: not-allowed !important;
  border-color: #e4e7ec !important;
  background: #f8fafc !important;
  opacity: 0.68 !important;
  box-shadow: none !important;
}

body[data-shell="mobile"][data-page="workflow"] #assetMultiSelect .workflow-asset-option.is-disabled:hover {
  border-color: #e4e7ec !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}

/* 20260621 mobile preview/BF01/U01 normalization. */
body[data-shell="mobile"] .result-preview-dialog .preview-asset-panel {
  padding: 8px 8px 9px !important;
}

body[data-shell="mobile"] .preview-asset-list {
  width: 100% !important;
  max-height: 86px !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

body[data-shell="mobile"] .preview-asset-item {
  grid-template-columns: 30px minmax(0, 1fr) !important;
  gap: 5px !important;
  padding: 5px !important;
  border-radius: 6px !important;
}

body[data-shell="mobile"] .preview-asset-thumb {
  width: 30px !important;
  height: 30px !important;
  border-radius: 4px !important;
  font-size: 9px !important;
}

body[data-shell="mobile"] .preview-asset-text {
  gap: 1px !important;
}

body[data-shell="mobile"] .preview-asset-text strong {
  font-size: 10px !important;
  line-height: 1.15 !important;
}

body[data-shell="mobile"] .preview-asset-text span {
  font-size: 9px !important;
  line-height: 1.1 !important;
}

body[data-shell="mobile"] .preview-prompt-title-actions,
body[data-shell="mobile"][data-page="account"] .avatar-actions,
body[data-shell="mobile"][data-page="account"] .form-actions {
  width: fit-content !important;
  min-width: 0 !important;
  max-width: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
}

body[data-shell="mobile"] .preview-prompt-title-actions {
  padding: 8px !important;
  margin: -8px !important;
}

body[data-shell="mobile"] .preview-prompt-title-actions button,
body[data-shell="mobile"] .prompt-zoom-head button,
body[data-shell="mobile"][data-page="account"] .avatar-upload-button,
body[data-shell="mobile"][data-page="account"] #resetDefaultAvatar,
body[data-shell="mobile"][data-page="account"] #saveProfile {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  padding: 8px 10px !important;
  box-sizing: border-box !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"] .preview-prompt-zoom,
body[data-shell="mobile"] .preview-prompt-copy,
body[data-shell="mobile"] .prompt-zoom-head button {
  border-color: rgba(225, 29, 72, 0.42) !important;
  color: #111827 !important;
  font-weight: 950 !important;
  text-transform: none !important;
}

body[data-shell="mobile"][data-page="account"] .avatar-actions {
  width: auto !important;
}

body[data-shell="mobile"][data-page="account"] .form-actions {
  justify-self: start !important;
  padding: 8px !important;
}

body[data-shell="mobile"][data-page="workflow"] .generation-start-button {
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  flex: 0 0 34px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  font-size: 0 !important;
  line-height: 1 !important;
}

body[data-shell="mobile"][data-page="workflow"] .generation-start-button::before {
  left: 9px !important;
  width: 14px !important;
  height: 14px !important;
}

/* Mobile workflow command row: keep "参数" directly to the right of "视频生成". */
body[data-shell="mobile"][data-page="workflow"] .generation-command-main {
  grid-template-columns: max-content minmax(0, 1fr) !important;
  width: 100% !important;
  gap: 7px 6px !important;
  overflow-x: visible !important;
}

body[data-shell="mobile"][data-page="workflow"] .composer-tool-main {
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="ratio"] {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 100% !important;
  max-width: 162px !important;
  min-height: 36px !important;
  justify-content: start !important;
  overflow: hidden !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="ratio"]::before {
  flex: 0 0 auto !important;
  color: var(--primary) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="ratio"] strong {
  flex: 1 1 auto !important;
  max-width: none !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="model"] {
  grid-column: 1 !important;
  grid-row: 2 !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="referenceMode"] {
  grid-column: 2 !important;
  grid-row: 2 !important;
}

/* Mobile workflow chips: keep label and value on one text line. */
body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="ratio"],
body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="referenceMode"] {
  min-height: 38px !important;
  height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 0 8px !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="ratio"]::before,
body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="referenceMode"]::before {
  display: inline !important;
  flex: 0 0 auto !important;
  font-size: 11px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="ratio"] strong,
body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="referenceMode"] strong {
  display: inline !important;
  flex: 0 1 auto !important;
  max-width: 110px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  font-size: 11px !important;
  line-height: 1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="referenceMode"] {
  max-width: 220px !important;
}

body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm {
  max-width: 360px !important;
}

body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row {
  width: fit-content !important;
  max-width: 100% !important;
  min-width: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 2px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 12px !important;
}

body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field {
  width: auto !important;
  min-width: 0 !important;
  max-width: min(248px, calc(100vw - 126px)) !important;
  height: auto !important;
  min-height: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 12px !important;
  overflow: visible !important;
}

body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-action,
body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row #uploadTempAsset {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 10px !important;
  box-sizing: border-box !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-action {
  border: 1px solid #cfd5df !important;
  background: #ffffff !important;
  color: #12151b !important;
  font-weight: 950 !important;
  pointer-events: none !important;
}

body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-copy {
  min-width: 0 !important;
  max-width: 132px !important;
  min-height: 0 !important;
  display: grid !important;
  align-content: center !important;
  gap: 2px !important;
  padding: 8px 10px !important;
  border: 1px solid #dfe4eb !important;
  border-radius: 8px !important;
  background: #f8fafc !important;
  box-sizing: border-box !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-copy strong {
  min-width: 0 !important;
  overflow: hidden !important;
  color: #12151b !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-copy strong:empty::before {
  content: "未选择素材";
}

body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-copy small {
  min-width: 0 !important;
  overflow: hidden !important;
  color: #68717e !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-copy small:empty,
body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-copy small[hidden] {
  display: none !important;
}

/* Mobile account ledger: remove explanatory microcopy and keep values right-aligned. */
body[data-shell="mobile"][data-page="account"] #ledger .metric-card {
  display: grid !important;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) !important;
  align-items: baseline !important;
  align-content: center !important;
  column-gap: 8px !important;
  row-gap: 0 !important;
}

body[data-shell="mobile"][data-page="account"] #ledger .metric-card > span {
  grid-column: 1 !important;
  grid-row: 1 !important;
  align-self: baseline !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="account"] #ledger .metric-card strong {
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: baseline !important;
  display: block !important;
  justify-self: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-align: right !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="account"] #ledger .metric-card small {
  display: none !important;
}

body[data-shell="mobile"][data-page="account"] .account-xcoin-card {
  margin-bottom: 12px !important;
}

body[data-shell="mobile"][data-page="account"] .account-xcoin-card .section-head {
  display: grid !important;
  gap: 10px !important;
}

body[data-shell="mobile"][data-page="account"] .account-xcoin-card .button-group {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
}

body[data-shell="mobile"][data-page="account"] .account-xcoin-card .ghost-link {
  width: 100% !important;
}

body[data-shell="mobile"][data-page="account"] .account-xcoin-grid {
  grid-template-columns: 1fr !important;
  gap: 8px !important;
}

body[data-shell="mobile"][data-page="account"] .account-xcoin-grid span {
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) !important;
  align-items: baseline !important;
  gap: 8px !important;
  padding: 11px 12px !important;
}

body[data-shell="mobile"][data-page="account"] .account-xcoin-grid strong {
  justify-self: end !important;
  font-size: 18px !important;
}

/* Mobile B04 buttons: compact row actions for workflow and training management. */
body[data-shell="mobile"][data-page="workflow"] #clearTempAssetFile,
body[data-shell="mobile"][data-page="workflow"] #toggleTempAssetSelection,
body[data-shell="mobile"][data-page="workflow"] #clearSelectedAssets,
body[data-shell="mobile"][data-page="training-videos"] .training-refresh-button,
body[data-shell="mobile"][data-page="training-videos"] .training-video-card .card-actions button {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row #clearTempAssetFile,
body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row #toggleTempAssetSelection {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  align-self: center !important;
}

body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row #toggleTempAssetSelection[aria-pressed="true"] {
  border-color: rgba(226, 27, 60, 0.28) !important;
  background: #fff1f3 !important;
  color: #ba1230 !important;
}

body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row #toggleTempAssetSelection:disabled {
  opacity: 0.48 !important;
  cursor: not-allowed !important;
}

body[data-shell="mobile"][data-page="workflow"] .asset-picker-toolbar {
  align-items: center !important;
}

body[data-shell="mobile"][data-page="workflow"] #clearSelectedAssets {
  justify-self: end !important;
  margin-left: auto !important;
}

body[data-shell="mobile"][data-page="training-videos"] .training-video-card .card-actions {
  overflow-x: visible !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  padding-bottom: 0 !important;
}

/* Mobile task cards: status and creation time live in one row. */
body[data-shell="mobile"][data-page="tasks"] .mobile-task-created-line {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="tasks"] .mobile-task-foot-status {
  flex: 0 0 auto !important;
}

body[data-shell="mobile"][data-page="tasks"] .mobile-task-created-line .mobile-task-created-time {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

/* Mobile workflow hero: keep the eyebrow row left-aligned with the red rule before text. */
body[data-shell="mobile"][data-page="workflow"] .page-head {
  grid-template-columns: minmax(0, 1fr) !important;
  justify-content: stretch !important;
  justify-items: stretch !important;
}

body[data-shell="mobile"][data-page="workflow"] .page-head > div:first-child {
  width: 100% !important;
  min-width: 0 !important;
}

body[data-shell="mobile"][data-page="workflow"] .page-head .eyebrow {
  width: 100% !important;
  min-width: 0 !important;
  display: inline-flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 9px !important;
  text-align: left !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="workflow"] .page-head .eyebrow::before {
  content: "" !important;
  flex: 0 0 92px !important;
  width: 92px !important;
  height: 3px !important;
  display: block !important;
  background: var(--primary, #e21b3c) !important;
}

body[data-shell="mobile"][data-page="workflow"] .page-head .eyebrow::after {
  display: none !important;
  content: none !important;
  flex: 0 0 auto !important;
}

@media (max-width: 374px) {
  body[data-shell="mobile"] .preview-asset-list {
    gap: 5px !important;
  }

  body[data-shell="mobile"] .preview-asset-item {
    grid-template-columns: 28px minmax(0, 1fr) !important;
    gap: 4px !important;
    padding: 4px !important;
  }

  body[data-shell="mobile"] .preview-asset-thumb {
    width: 28px !important;
    height: 28px !important;
  }

  body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-field {
    max-width: calc(100vw - 112px) !important;
    gap: 6px !important;
  }

  body[data-shell="mobile"][data-page="workflow"] #tempAssetUploadForm .temporary-asset-upload-row .asset-file-copy {
    max-width: 112px !important;
  }
}

/* Result cards are preview thumbnails: show the full image/video poster instead of cropping. */
body[data-page="results"] .result-card img,
body[data-page="results"] .result-card video,
body[data-page="results"] .result-card .result-video-poster,
body[data-shell="mobile"][data-page="results"] .result-card img,
body[data-shell="mobile"][data-page="results"] .result-card video,
body[data-shell="mobile"][data-page="results"] .result-card .result-video-poster {
  object-fit: contain !important;
  object-position: center center !important;
  background: #f6f7f9 !important;
}

/* Mobile result and asset lists share one fixed thumbnail box; media is fully visible, never cropped. */
body[data-shell="mobile"][data-page="results"] .result-card,
body[data-shell="mobile"][data-page="assets"] .asset-card {
  grid-template-columns: 104px minmax(0, 1fr) !important;
  min-height: 126px !important;
}

body[data-shell="mobile"][data-page="results"] .result-card img,
body[data-shell="mobile"][data-page="results"] .result-card video,
body[data-shell="mobile"][data-page="results"] .result-card .result-video-poster,
body[data-shell="mobile"][data-page="assets"] .asset-card img {
  grid-row: 1 / 3 !important;
  width: 104px !important;
  height: 126px !important;
  min-height: 126px !important;
  max-height: 126px !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
  align-self: start !important;
  justify-self: start !important;
  background: #f6f7f9 !important;
}

/* Asset library thumbnails are inspection aids, so keep the full image visible inside the fixed thumbnail box. */
body[data-page="assets"] .asset-card img {
  object-fit: contain !important;
  object-position: center center !important;
  background: #f6f7f9 !important;
}

/* Mobile workflow parameter buttons: keep label and value on a single line. */
body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="ratio"],
body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="referenceMode"] {
  width: 100% !important;
  max-width: 176px !important;
  height: 38px !important;
  min-height: 38px !important;
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 3px !important;
  padding: 0 8px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="ratio"]::before,
body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="referenceMode"]::before {
  display: block !important;
  flex: 0 0 auto !important;
  max-width: none !important;
  overflow: visible !important;
  font-size: 11px !important;
  line-height: 1 !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="ratio"] strong,
body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="referenceMode"] strong {
  display: block !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: none !important;
  overflow: hidden !important;
  font-size: 11px !important;
  line-height: 1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="ratio"]::after,
body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="referenceMode"]::after {
  flex: 0 0 auto !important;
  margin-left: 1px !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="ratio"] .workflow-param-icon,
body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="referenceMode"] .workflow-param-icon {
  display: block !important;
  flex: 0 0 14px !important;
  order: -1 !important;
  width: 14px !important;
  height: 14px !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="model"] {
  width: auto !important;
  min-width: 96px !important;
  max-width: none !important;
  height: 38px !important;
  min-height: 38px !important;
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  padding: 0 8px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="model"] .workflow-param-icon {
  display: block !important;
  flex: 0 0 14px !important;
  order: -1 !important;
  width: 14px !important;
  height: 14px !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="model"] strong {
  display: block !important;
  flex: 0 0 auto !important;
  max-width: none !important;
  min-width: 0 !important;
  overflow: visible !important;
  font-size: 11px !important;
  line-height: 1 !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

body[data-shell="mobile"][data-page="workflow"] .workflow-composer .param-pill[data-open-param="model"]::after {
  flex: 0 0 auto !important;
  margin-left: 1px !important;
}

/* Mobile task cards: stack each info module as its own row. */
body[data-shell="mobile"][data-page="tasks"] .mobile-task-meta {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 6px !important;
}

body[data-shell="mobile"][data-page="tasks"] .mobile-task-meta div {
  width: 100% !important;
  min-height: 30px !important;
  padding: 4px 10px !important;
  box-sizing: border-box !important;
}

body[data-shell="mobile"][data-page="tasks"] .mobile-task-meta dd {
  max-width: 100% !important;
}

/* Mobile task cards: keep each label/value module on one text row. */
body[data-shell="mobile"][data-page="tasks"] .mobile-task-meta div {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

body[data-shell="mobile"][data-page="tasks"] .mobile-task-meta dt {
  flex: 0 0 auto !important;
}

body[data-shell="mobile"][data-page="tasks"] .mobile-task-meta dd {
  flex: 1 1 auto !important;
  margin-top: 0 !important;
}

/* Mobile task cards: center the left thumbnail against the right info/actions column. */
body[data-shell="mobile"][data-page="tasks"] .mobile-task-body {
  align-items: center !important;
}

body[data-shell="mobile"][data-page="tasks"] .mobile-task-preview {
  align-self: center !important;
}

/* Mobile training upload containment: native file inputs must not cover video card actions. */
body[data-page="training-videos"] .training-video-file-field {
  position: relative !important;
}

body[data-shell="mobile"][data-page="training-videos"] .training-management > .panel,
body[data-shell="mobile"][data-page="training-videos"] .training-video-list,
body[data-shell="mobile"][data-page="training-videos"] .training-video-card,
body[data-shell="mobile"][data-page="training-videos"] .training-video-card .card-actions {
  position: relative !important;
}

body[data-shell="mobile"][data-page="training-videos"] .training-management > .panel {
  z-index: 1 !important;
}

body[data-shell="mobile"][data-page="training-videos"] .training-video-card {
  z-index: 2 !important;
}

body[data-shell="mobile"][data-page="training-videos"] .training-video-card .card-actions,
body[data-shell="mobile"][data-page="training-videos"] .training-video-card .card-actions button {
  z-index: 3 !important;
}

body[data-shell="mobile"][data-page="training-videos"] .training-side-tools {
  position: relative !important;
  z-index: 0 !important;
}

body[data-shell="mobile"][data-page="training-videos"] .training-side-tools label:not(.training-video-file-field) #trainingVideoFiles {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 38px !important;
  opacity: 1 !important;
  cursor: pointer !important;
}

body[data-shell="mobile"][data-page="training-videos"] .training-side-tools label:not(.training-video-file-field):has(#trainingVideoFiles) {
  display: grid !important;
  gap: 6px !important;
}

/* Mobile workflow counters: align summary to the right and center KPI cards. */
body[data-shell="mobile"][data-page="workflow"] .temporary-asset-upload-summary {
  justify-content: flex-end !important;
  text-align: right !important;
  padding-right: 0 !important;
}

body[data-shell="mobile"][data-page="workflow"] .temporary-asset-upload-summary .temporary-asset-upload-stat {
  flex: 0 0 auto !important;
}

body[data-shell="mobile"][data-page="workflow"] #workflowStats .metric-card {
  justify-items: center !important;
  text-align: center !important;
}

body[data-shell="mobile"][data-page="workflow"] #workflowStats .metric-card span,
body[data-shell="mobile"][data-page="workflow"] #workflowStats .metric-card strong,
body[data-shell="mobile"][data-page="workflow"] #workflowStats .metric-card small {
  justify-self: center !important;
  width: 100% !important;
  text-align: center !important;
}

/* Mobile account ledger: compact 2x2 command metrics with same-row label/value. */
body[data-shell="mobile"][data-page="account"] #ledger.page-metrics.metric-grid {
  gap: 8px !important;
  margin: 0 0 8px !important;
}

body[data-shell="mobile"][data-page="account"] #ledger .metric-card {
  min-height: 70px !important;
  padding: 12px 14px !important;
  border: 1px solid #e2e6ee !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  box-shadow: 0 10px 20px rgba(13, 17, 24, 0.06) !important;
}

body[data-shell="mobile"][data-page="account"] #ledger .metric-card > span {
  color: #485263 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

body[data-shell="mobile"][data-page="account"] #ledger .metric-card strong {
  color: #05070b !important;
  font-size: clamp(20px, 5.6vw, 24px) !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
}

/* Mobile account profile: keep title divider to avatar editor spacing exact. */
body[data-shell="mobile"][data-page="account"] .account-profile-panel > .section-head {
  margin-bottom: 0 !important;
}

body[data-shell="mobile"][data-page="account"] .account-profile-panel #profileForm.profile-edit-form {
  margin-top: 8px !important;
}

/* PC sidebar: UIDEMO dark/orange navigation skin, visual-only override. */
body:not([data-shell="mobile"]) .sidebar {
  background: #000000 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.055) !important;
  box-shadow: none !important;
  color: #f2f2f2 !important;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent !important;
}

body:not([data-shell="mobile"]) .brand {
  background: transparent !important;
  border-bottom-color: rgba(255, 255, 255, 0.055) !important;
}

body:not([data-shell="mobile"]) .brand::after {
  display: none !important;
  content: none !important;
}

body:not([data-shell="mobile"]) .sidebar nav {
  position: relative !important;
  min-width: 0 !important;
  padding-top: 10px !important;
  padding-left: 9px !important;
  padding-right: 9px !important;
  padding-bottom: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
  overflow: hidden auto !important;
  scrollbar-width: none !important;
}

body:not([data-shell="mobile"]) .sidebar nav::-webkit-scrollbar {
  display: none !important;
}

body:not([data-shell="mobile"]) .sidebar nav a {
  position: relative !important;
  overflow: hidden !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: #8d8f96 !important;
  box-shadow: none !important;
  transition: background 0.24s ease, color 0.24s ease, box-shadow 0.24s ease !important;
}

body:not([data-shell="mobile"]) .sidebar nav a:hover,
body:not([data-shell="mobile"]) .sidebar nav a:focus-visible {
  background: rgba(255, 255, 255, 0.045) !important;
  color: #f2f2f2 !important;
}

body:not([data-shell="mobile"]) .sidebar nav a.active {
  background: linear-gradient(135deg, rgba(231, 41, 31, 0.24), rgba(231, 41, 31, 0.06) 58%, transparent) !important;
  color: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(231, 41, 31, 0.28), 0 10px 26px rgba(231, 41, 31, 0.07) !important;
}

body:not([data-shell="mobile"]) .sidebar nav a.active::before {
  display: none !important;
  content: none !important;
}

body:not([data-shell="mobile"]) .sidebar nav a.active::after {
  content: "" !important;
  position: absolute !important;
  top: 24% !important;
  right: auto !important;
  bottom: auto !important;
  left: 0 !important;
  display: block !important;
  width: 4px !important;
  height: 52% !important;
  border-radius: 0 999px 999px 0 !important;
  background: linear-gradient(180deg, #e7291f, #ff9c9c) !important;
  box-shadow: 0 0 12px rgba(231, 41, 31, 0.85) !important;
}

body:not([data-shell="mobile"]) .sidebar nav a svg {
  color: currentColor !important;
  transition: color 0.24s ease, filter 0.24s ease !important;
}

body:not([data-shell="mobile"]) .sidebar nav a.active svg {
  color: #ffffff !important;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.35)) !important;
}

body:not([data-shell="mobile"]) .sidebar-panel {
  border-color: rgba(255, 255, 255, 0.2) !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-shortcut::before {
  background: #ff8c00 !important;
  box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.12), 0 0 12px rgba(255, 140, 0, 0.65) !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .account-shortcut:hover,
body:not([data-shell="mobile"]) .sidebar-panel .account-menu-shell.is-open .account-shortcut {
  color: #ff8c00 !important;
}

body:not([data-shell="mobile"]) .sidebar-panel .meter i {
  background: linear-gradient(90deg, #ff8c00, #ff4d00) !important;
}

/* X coin account CTA: keep the recharge action primary after global ghost-link skins. */
.account-xcoin-primary,
.account-xcoin-card .account-xcoin-primary,
body[data-shell="mobile"] .account-xcoin-card .account-xcoin-primary {
  border-color: var(--primary, #e21b3c) !important;
  background: var(--primary, #e21b3c) !important;
  color: #ffffff !important;
}

.account-xcoin-primary:hover,
.account-xcoin-card .account-xcoin-primary:hover,
body[data-shell="mobile"] .account-xcoin-card .account-xcoin-primary:hover {
  border-color: var(--primary-hover, #c91632) !important;
  background: var(--primary-hover, #c91632) !important;
  color: #ffffff !important;
}

/* Recharge package CTA: final exact-size override after global button rules. */
body[data-page="redeem-codes"] .recharge-package-action-row button.ghost[data-recharge-package],
body[data-page="redeem-codes"] .recharge-package button.ghost[data-recharge-package],
body[data-shell="mobile"][data-page="redeem-codes"] .recharge-package-action-row button.ghost[data-recharge-package],
body[data-shell="mobile"][data-page="redeem-codes"] .recharge-package button.ghost[data-recharge-package] {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 4px !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* Payment dialog actions: keep text-to-border spacing exact after global button skins. */
body[data-page="redeem-codes"] .payment-dialog .dialog-actions button,
body[data-shell="mobile"][data-page="redeem-codes"] .payment-dialog .dialog-actions button {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 8px !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* Login recovery link: final override after global button skins. */
body[data-page="login"] .remember-row {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

body[data-page="login"] .remember-row .auth-inline-link {
  margin-left: auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--primary) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}

body[data-page="login"] .remember-row .auth-inline-link:hover,
body[data-page="login"] .remember-row .auth-inline-link:focus-visible {
  background: transparent !important;
  color: var(--primary-hover, #c91632) !important;
  box-shadow: none !important;
  text-decoration: underline;
}

body[data-page="lok-creation"] main.lok-creation-page {
  height: 100vh;
  min-height: 100vh;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 14px;
  padding: 5px;
  overflow: hidden;
  background: #f4f6f8;
}

body[data-page="lok-creation"] .topbar {
  display: none !important;
  position: static;
  min-height: 54px;
  margin: 0;
}

body[data-page="lok-creation"] .lok-creation-shell {
  position: relative;
  min-width: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 8px;
  background: #101217;
}

body[data-page="lok-creation"] .lok-creation-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  border: 0;
  background: #101217;
}

body[data-page="lok-creation"] .lok-creation-status {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 38%, rgba(226, 27, 60, 0.14), transparent 32%),
    #101217;
}

body[data-page="lok-creation"] .lok-creation-status[hidden] {
  display: none;
}

body[data-page="lok-creation"] .lok-creation-status > div:first-child {
  display: grid;
  justify-items: center;
  gap: 8px;
}

body[data-page="lok-creation"] .lok-creation-status .eyebrow {
  color: #e21b3c;
}

body[data-page="lok-creation"] .lok-creation-status strong {
  color: #ffffff;
  font-size: 18px;
  font-weight: 850;
}

body[data-page="lok-creation"] .lok-creation-status small {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.6;
}

body[data-page="lok-creation"] .lok-creation-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

body[data-page="lok-creation"] .lok-creation-actions .ghost {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}
