:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #687184;
  --line: #dfe4ec;
  --paper: #ffffff;
  --wash: #f3f5f8;
  --navy: #121b2c;
  --blue: #1d5eff;
  --teal: #0c9b8c;
  --orange: #d36b22;
  --red: #c2414c;
  --shadow: 0 18px 50px rgba(19, 30, 50, .09);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--wash); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 92px; padding: 20px 10px; display: flex; flex-direction: column; align-items: center; background: #fff; border-right: 1px solid #e8ebf0; }
.sidebar-logo { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 13px; color: #fff; background: var(--blue); font-weight: 900; box-shadow: 0 8px 20px rgba(29,94,255,.22); }
.sidebar-nav { width: 100%; margin-top: 42px; display: flex; flex: 1; flex-direction: column; gap: 9px; }
.sidebar-link { width: 100%; min-height: 64px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 0; border-radius: 12px; color: #7a8495; background: transparent; }
.sidebar-link[hidden], .quick-tool-card[hidden] { display: none !important; }
.sidebar-link span { font-size: 21px; line-height: 1; }
.sidebar-link b { font-size: 11px; line-height: 1.18; font-weight: 700; text-align: center; white-space: normal; }
.sidebar-link:hover, .sidebar-link.active { color: var(--blue); background: #eef3ff; }
.sidebar-account-group { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.sidebar-account-link { margin-top: 0; }
.sidebar-account-balance { width: 100%; max-width: 82px; padding: 3px 2px 1px; overflow: hidden; display: grid; justify-items: center; gap: 2px; color: #cbd4ef; text-align: center; }
.sidebar-account-balance span { font-size: 11px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.sidebar-account-balance strong { max-width: 100%; overflow: hidden; color: #fff; font-size: 15px; font-weight: 850; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account-balance[hidden] { display: none !important; }
.sidebar .system-status { width: 100%; margin-top: auto; padding: 10px 2px; flex-direction: column; gap: 5px; color: #7a8495; text-align: center; }
.sidebar .system-status b { font-size: 10px; font-weight: 700; }
.app-shell { min-height: 100vh; margin-left: 92px; }
.app-header { height: 70px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.9); border-bottom: 1px solid #e8ebf0; backdrop-filter: blur(14px); }
.app-header .brand-mark { display: none; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.header-login-button { width: 54px; height: 54px; padding: 0; border: 1px solid rgba(91,92,246,.24); border-radius: 50%; color: #fff; background: linear-gradient(135deg, #7357ff, #2f8dff); box-shadow: 0 10px 24px rgba(69,89,229,.22); font-size: 13px; font-weight: 850; }
.header-login-button:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(69,89,229,.30); }
.header-history-button { padding: 10px 15px; border: 1px solid #d8e1f1; border-radius: 10px; color: #315fd2; background: #f7f9ff; font-weight: 800; }
.header-video-button { padding: 10px 15px; border: 0; border-radius: 10px; color: #fff; background: var(--blue); font-weight: 800; }
.shell-main { width: min(1240px, calc(100% - 56px)); margin: 0 auto; padding: 44px 0 84px; }
.app-view[hidden] { display: none !important; }
.shell-main.studio-mode { width: min(1440px, calc(100% - 32px)); max-width: 1440px; padding: 18px 0 34px; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.studio-mode #workflowView { order: 1; width: 100%; min-width: 0; }
.studio-mode #videoView { order: 2; position: static; width: 100%; min-width: 0; max-height: none; overflow: visible; }
.studio-mode .video-prompt-editor, .studio-mode .copy-script-button { display: none !important; }
.studio-mode .page-heading { min-height: 0; margin-bottom: 5px; padding: 0 2px; align-items: start; }
.studio-mode .page-heading h1 { font-size: 23px; }
.studio-mode .page-heading p:last-child { font-size: 13px; line-height: 1.55; }
.studio-mode .rule-badge { max-width: 190px; text-align: center; }
.studio-mode .video-generation-card { margin-top: 0; min-height: 0; padding: 12px; border-radius: 14px; }
.studio-mode .workflow-inline-generator {
  margin-top: 7px;
  padding: 8px 0 0;
  border: 0;
  border-top: 1px solid rgba(105,117,155,.12);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.studio-mode .workflow-inline-generator .video-generation-head { display: none; }
.studio-mode .workflow-inline-generator > #generationMaterialUpload,
.studio-mode .workflow-inline-generator > .mentionable-materials { display: none !important; }
.studio-mode .workflow-inline-generator > .unified-material-upload {
  min-height: 58px;
  padding: 7px 10px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 9px;
  text-align: left;
}
.studio-mode .workflow-inline-generator > .unified-material-upload .unified-upload-icon {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  font-size: 18px;
}
.studio-mode .workflow-inline-generator > .unified-material-upload strong { grid-column: 2; align-self: end; margin: 0; font-size: 13px; }
.studio-mode .workflow-inline-generator > .unified-material-upload small { grid-column: 2; align-self: start; margin: 1px 0 0; font-size: 10px; }
.studio-mode .video-settings-grid { grid-template-columns: 1fr 1fr; }
.studio-mode .generator-assets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.studio-mode .workspace-card { padding: 14px; border-radius: 18px; }
.studio-mode .results.workflow-unified-results { margin-top: 12px; padding: 0; border: 0; border-top: 1px solid rgba(105,117,155,.14); border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.studio-mode .workflow-material-entry-grid { gap: 7px; }
.workflow-step-banner {
  margin: 0 0 12px;
  padding: 11px 13px;
  border: 1px solid rgba(93,91,246,.16);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(244,242,255,.96), rgba(238,247,255,.88));
}
.workflow-step-banner > div { min-width: 0; display: grid; gap: 2px; }
.workflow-step-banner strong { color: #232842; font-size: 20px; line-height: 1.25; letter-spacing: -.03em; }
.workflow-step-banner small { color: #7a8398; font-size: 11px; line-height: 1.45; }
.workflow-step-heading { min-width: 0; }
.workflow-step-heading p { margin: 4px 0 0; color: #7a8398; font-size: 12px; line-height: 1.5; }
.workflow-waiting-state {
  min-height: 104px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border: 1px dashed rgba(103,111,231,.28);
  border-radius: 11px;
  color: #5f6880;
  background: linear-gradient(135deg, rgba(248,248,255,.94), rgba(242,248,255,.86));
}
.workflow-waiting-state > span, .workflow-ready-banner > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #8060f6, #348df3);
  font-size: 14px;
  font-weight: 900;
}
.workflow-waiting-state strong { color: #303750; font-size: 14px; }
.workflow-waiting-state p, .workflow-ready-banner p { margin: 4px 0 0; color: #7d879b; font-size: 11px; line-height: 1.5; }
.workflow-ready-banner {
  margin: 0 0 6px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(43,178,145,.20);
  border-radius: 10px;
  background: rgba(237,251,247,.82);
}
.workflow-ready-banner > span { width: 28px; height: 28px; background: linear-gradient(135deg, #14a985, #3bc6a8); font-size: 13px; }
.workflow-ready-banner strong { color: #257662; font-size: 13px; }
.studio-mode .results.workflow-step-arrived { animation: workflow-step-arrived 1.4s ease; }
@keyframes workflow-step-arrived {
  0%, 35% { border-color: rgba(80,92,245,.48); box-shadow: 0 0 0 5px rgba(80,92,245,.10), var(--glow); }
  100% { border-color: rgba(105,117,155,.14); box-shadow: var(--glow), inset 0 1px rgba(255,255,255,.92); }
}
.studio-mode .workflow-material-entry-grid .unified-material-upload { min-height: 86px; padding: 10px; border-radius: 12px; }
.studio-mode .workflow-material-entry-grid .unified-upload-icon { width: 28px; height: 28px; font-size: 18px; }
.studio-mode .workflow-material-entry-grid .unified-material-upload strong { margin-top: 5px; font-size: 13px; }
.studio-mode .workflow-material-entry-grid .unified-material-upload small { margin-top: 2px; font-size: 10px; }
.studio-mode .unified-material-preview { margin-top: 6px; gap: 7px; }
.studio-mode .upload-grid { gap: 10px; margin-top: 14px; }
.studio-mode .upload-zone { min-height: 88px; padding: 8px; border-radius: 11px; }
.studio-mode .upload-icon { width: 24px; height: 24px; margin-bottom: 4px; border-radius: 7px; font-size: 10px; }
.studio-mode .upload-zone strong { font-size: 13px; }
.studio-mode .upload-zone p { margin: 3px 0 2px; font-size: 10px; }
.studio-mode .upload-zone small { font-size: 9px; }
.studio-mode .upload-state { margin-top: 9px; padding: 5px 9px; font-size: 10px; }
.studio-mode .run-row { margin-top: 7px; padding-top: 7px; }
.run-row.compact-run-row { justify-content: flex-end; }
.studio-mode .results-head h2 { font-size: 20px; }
.studio-mode .progress-panel { margin-top: 7px; }
.studio-mode .results { margin-top: 7px; }
.studio-mode .script-result-panel {
  margin-top: 6px;
  padding: 6px;
  border: 1px solid #d5dce8;
  border-radius: 12px;
  background: #fbfcfe;
}
.studio-mode .script-result-panel:focus-within { border-color: #7e9fff; box-shadow: 0 0 0 3px rgba(29,94,255,.08); }
.workflow-script-hint { margin: 2px 4px 7px; color: #535fd6; font-size: 12px; font-weight: 850; }
.studio-mode .workflow-inline-material-dock { margin: 0 0 6px; }
.studio-mode .workflow-inline-material-dock > .unified-material-upload {
  min-height: 54px;
  padding: 6px 9px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  border-radius: 9px;
  text-align: left;
}
.studio-mode .workflow-inline-material-dock > .unified-material-upload .unified-upload-icon {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 26px;
  height: 26px;
  font-size: 17px;
}
.studio-mode .workflow-inline-material-dock > .unified-material-upload strong { grid-column: 2; align-self: end; margin: 0; font-size: 12px; }
.studio-mode .workflow-inline-material-dock > .unified-material-upload small { grid-column: 2; align-self: start; margin: 1px 0 0; font-size: 9px; }
.studio-mode .workflow-inline-material-dock .unified-material-preview { margin-top: 5px; }
.studio-mode .script-result-panel > .material-mention-menu {
  position: static;
  width: 100%;
  max-height: 190px;
  margin: 0 0 6px;
  box-shadow: 0 8px 22px rgba(24,38,65,.12);
}
.studio-mode .unified-script-editor {
  min-height: 400px;
  padding: 10px 8px 7px;
  border: 0;
  border-top: 1px solid rgba(105,117,155,.12);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  line-height: 1.62;
}
.studio-mode .unified-script-editor:focus { border-color: rgba(105,117,155,.12); background: transparent; box-shadow: none; }
.workflow-action-line { margin-top: 8px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .34fr); align-items: stretch; gap: 10px; }
.workflow-action-line .workflow-option-card { margin: 0; }
.workflow-generate-action-slot { min-width: 0; display: flex; align-items: stretch; }
.workflow-generate-action-slot[hidden] { display: none; }
.workflow-generate-action-slot .primary-button { width: 100%; min-height: 100%; margin: 0; }
.workflow-unified-results > .results-head { min-height: 0; margin: 0; }
.workflow-unified-results > .results-head:has(.copy-script-button[style*="display: none"]) { display: none; }
.studio-mode .basic-video-settings { margin: 7px 0; }
.studio-mode .visual-parameters { gap: 7px; padding: 8px; }
.studio-mode #videoView .unified-material-upload { min-height: 82px; padding: 10px; }
.home-view { min-height: calc(100vh - 190px); }
.home-intro { padding: 34px 0 22px; text-align: center; }
.home-intro h1 { margin: 0; font-size: clamp(34px, 4vw, 54px); letter-spacing: -.05em; }
.home-intro > p:last-child { margin: 14px 0 0; color: var(--muted); }
.home-command-card { width: min(840px, 100%); min-height: 154px; margin: 22px auto 42px; padding: 18px 20px; display: grid; grid-template-columns: 58px 1fr; grid-template-rows: 1fr auto; gap: 8px 16px; border: 1px solid #e6e9ef; border-radius: 22px; background: #fff; box-shadow: 0 20px 55px rgba(32,48,75,.10); }
.home-add-button { grid-row: 1 / 3; align-self: start; width: 54px; height: 54px; border: 0; border-radius: 15px; color: #263246; background: #e8f8ff; font-size: 24px; transform: rotate(-5deg); }
.home-command-card textarea { min-height: 65px; padding: 7px 0; resize: none; border: 0; outline: 0; color: var(--ink); font-size: 15px; }
.home-command-card > div { display: flex; align-items: center; justify-content: space-between; color: #576176; font-size: 13px; font-weight: 700; }
.home-command-card > div button { width: 36px; height: 36px; border: 0; border-radius: 50%; color: #fff; background: var(--blue); font-size: 20px; }
.quick-tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; width: min(980px, 100%); margin: 0 auto; }
.quick-tool-card { min-height: 145px; padding: 24px; display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 18px; border: 1px solid #e1e5ec; border-radius: 18px; color: var(--ink); background: #fff; text-align: left; box-shadow: 0 10px 30px rgba(32,48,75,.06); transition: .2s ease; }
.quick-tool-card:hover { transform: translateY(-3px); border-color: #bfd0ff; box-shadow: 0 16px 38px rgba(32,48,75,.1); }
.quick-tool-card div { display: grid; gap: 7px; }
.quick-tool-card strong { font-size: 19px; }
.quick-tool-card small { color: var(--muted); line-height: 1.5; }
.quick-tool-card i { color: var(--blue); font-size: 12px; font-style: normal; font-weight: 800; }
.quick-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 15px; color: #fff; font-size: 25px; }
.quick-icon.blue { background: linear-gradient(135deg, #2f6cff, #5e8cff); }
.quick-icon.purple { background: linear-gradient(135deg, #6d48d8, #906cf0); }
.quick-icon.cyan { background: linear-gradient(135deg, #08a8ba, #39c8d5); }
.quick-icon.orange { background: linear-gradient(135deg, #dd7328, #f0a044); }
.home-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: min(980px, 100%); margin: 34px auto 0; }
.home-steps article { padding: 17px 20px; display: grid; gap: 4px; border-top: 1px solid #dfe4ec; }
.home-steps span { color: var(--blue); font-size: 11px; font-weight: 900; }
.home-steps b { font-size: 14px; }
.home-steps small { color: var(--muted); }
.history-view { max-width: 1180px; margin: 0 auto; }
.history-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 18px 0 24px; }
.history-heading h1 { margin: 0; font-size: 34px; letter-spacing: -.04em; }
.history-heading p { margin: 9px 0 0; color: var(--muted); }
.history-heading > button { min-width: 76px; min-height: 38px; border: 1px solid #d9e0ea; border-radius: 9px; color: #445066; background: #fff; }
.history-toolbar { margin-bottom: 14px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; border: 1px solid #e1e6ee; border-radius: 12px; background: #fff; }
.history-toolbar > span { color: var(--muted); font-size: 12px; }
.history-filters { display: flex; gap: 5px; }
.history-filters button { min-width: 68px; padding: 8px 13px; border: 0; border-radius: 8px; color: #647086; background: transparent; font-size: 12px; }
.history-filters button.active { color: var(--blue); background: #edf3ff; font-weight: 800; }
.history-list { display: grid; gap: 10px; }
.history-card { padding: 16px; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 14px; border: 1px solid #e0e5ed; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(24,38,63,.04); }
.history-type { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: #fff; font-size: 11px; font-weight: 900; }
.history-type.script { background: linear-gradient(135deg, #2d67ff, #6e91ff); }
.history-type.video { background: linear-gradient(135deg, #6c48d8, #9271ee); }
.history-main { min-width: 0; }
.history-title { display: flex; align-items: center; gap: 9px; }
.history-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.history-main p { margin: 5px 0; overflow: hidden; color: #5f6b7e; font-size: 12px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.history-main small { color: #929aaa; font-size: 10px; }
.history-status { padding: 3px 7px; border-radius: 999px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.history-status.success { color: #087e69; background: #e8f8f3; }
.history-status.working { color: #a95d0b; background: #fff4df; }
.history-status.failed { color: #af3341; background: #ffebed; }
.history-status.unknown { color: #687184; background: #edf0f4; }
.history-error { margin-top: 7px; padding: 7px 9px; border-radius: 7px; color: #9d2e39; background: #fff0f1; font-size: 11px; }
.history-actions { display: flex; gap: 7px; }
.history-actions button { min-height: 34px; padding: 0 12px; border: 1px solid #cbd7f7; border-radius: 8px; color: var(--blue); background: #f7f9ff; font-size: 11px; font-weight: 700; }
.history-actions button.danger { border-color: #ead9dc; color: #9d4651; background: #fffafa; }
.history-empty { padding: 70px 20px; border: 1px dashed #d3dae5; border-radius: 14px; color: #8b94a5; background: rgba(255,255,255,.65); text-align: center; }
.history-detail-modal { position: fixed; inset: 0; z-index: 1110; display: grid; place-items: center; padding: 24px; background: rgba(15,23,42,.58); backdrop-filter: blur(4px); }
.history-detail-modal[hidden] { display: none !important; }
.history-detail-dialog { width: min(920px, 100%); max-height: min(860px, calc(100vh - 48px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border: 1px solid #dfe6ef; border-radius: 20px; background: #f8fafe; box-shadow: 0 28px 80px rgba(15,23,42,.28); }
.history-detail-dialog > header { padding: 20px 24px 17px; display: flex; align-items: start; justify-content: space-between; gap: 20px; border-bottom: 1px solid #e5eaf2; background: #fff; }
.history-detail-dialog > header span { color: var(--blue); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.history-detail-dialog > header h2 { margin: 6px 0 0; font-size: 22px; }
.history-detail-dialog > header button { width: 36px; height: 36px; border: 1px solid #dde4ed; border-radius: 10px; color: #677287; background: #f7f9fc; font-size: 21px; }
.history-detail-body { min-height: 260px; padding: 20px 24px 26px; overflow: auto; }
.history-detail-loading { min-height: 240px; display: grid; place-items: center; color: #8b94a5; }
.history-detail-status-row { margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.history-detail-status-row strong { font-size: 16px; }
.history-detail-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.history-detail-meta article { min-width: 0; padding: 12px 13px; border: 1px solid #e1e6ef; border-radius: 11px; background: #fff; }
.history-detail-meta span { display: block; margin-bottom: 5px; color: #8993a4; font-size: 10px; }
.history-detail-meta strong { display: block; overflow-wrap: anywhere; color: #2d3545; font-size: 12px; line-height: 1.45; }
.history-detail-section { margin-top: 16px; padding: 16px; border: 1px solid #e1e6ef; border-radius: 13px; background: #fff; }
.history-detail-section h3 { margin: 0 0 10px; font-size: 14px; }
.history-detail-section p { margin: 0; color: #596579; font-size: 12px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.history-detail-script { max-height: 360px; margin: 0; padding: 14px; overflow: auto; border-radius: 10px; color: #253047; background: #f3f6fb; font-family: inherit; font-size: 12px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.history-detail-video { width: 100%; max-height: 480px; display: block; border-radius: 12px; background: #0f172a; }
.history-detail-progress { height: 9px; margin: 2px 0 12px; overflow: hidden; border-radius: 999px; background: #e8edf5; }
.history-detail-progress i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, #7656ef, #2f8fea); transition: width .25s ease; }
.history-detail-error { color: #9d2e39 !important; }
.history-detail-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.history-detail-actions button, .history-detail-actions a { min-height: 36px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #cbd7f7; border-radius: 8px; color: var(--blue); background: #f7f9ff; font-size: 11px; font-weight: 750; text-decoration: none; }
.history-detail-dialog > footer { padding: 14px 24px; display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid #e5eaf2; background: #fff; }
.history-detail-dialog > footer button { min-width: 92px; min-height: 38px; border: 1px solid #d7dfeb; border-radius: 9px; color: #49556a; background: #fff; font-weight: 750; }
.history-detail-dialog > footer button:last-child { border-color: var(--blue); color: #fff; background: var(--blue); }

.skills-view { max-width: 1180px; margin: 0 auto; }
.skills-heading { margin-bottom: 24px; padding: 12px 2px 0; }
.skills-heading h1 { margin: 0; font-size: 34px; letter-spacing: -.04em; }
.skills-heading p { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.skill-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.skill-card { min-height: 128px; padding: 20px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 15px; border: 1px solid #e0e5ed; border-radius: 16px; color: var(--ink); background: #fff; text-align: left; box-shadow: 0 9px 28px rgba(32,48,75,.05); transition: .2s ease; }
.skill-card:hover { transform: translateY(-2px); border-color: #bfd0ff; box-shadow: 0 15px 34px rgba(32,48,75,.09); }
.skill-card-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; color: #fff; font-size: 15px; font-weight: 900; }
.skill-card-icon.blue { background: linear-gradient(135deg, #2f6cff, #6d91ff); }
.skill-card-icon.purple { background: linear-gradient(135deg, #6845d2, #9c76ee); }
.skill-card-icon.orange { background: linear-gradient(135deg, #dd7328, #f0a044); }
.skill-card h2 { margin: 0; font-size: 18px; }
.skill-card p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.skill-card i { color: var(--blue); font-size: 10px; font-style: normal; font-weight: 800; white-space: nowrap; }
.skill-workspace { margin-top: 0; padding: 32px; border: 1px solid #e0e4eb; border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.skill-workspace-head { margin-bottom: 18px; display: flex; align-items: end; justify-content: space-between; gap: 22px; }
.skill-workspace-head span { color: var(--blue); font-size: 10px; font-weight: 900; }
.skill-workspace-head h2 { margin: 4px 0 0; font-size: 23px; }
.skill-workspace-head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.skill-workspace-head > button { min-height: 36px; padding: 0 13px; border: 1px solid #d7dfeb; border-radius: 9px; color: #556176; background: #f8f9fb; font-size: 11px; font-weight: 700; }
.preset-skill-form { display: grid; gap: 14px; }
.preset-skill-form[hidden], .skill-media-preview[hidden], .skill-media-gallery[hidden] { display: none !important; }
.skill-upload-grid { display: grid; gap: 12px; }
.skill-upload-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.skill-upload-grid.four-columns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.skill-upload { position: relative; min-height: 220px; padding: 18px 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1.5px dashed #cbd4e1; border-radius: 16px; background: #fafbfc; text-align: center; cursor: pointer; transition: .2s ease; overflow: hidden; }
.skill-upload-grid.two-columns .skill-upload { min-height: 330px; }
.skill-upload:hover { border-color: #8faaff; background: #f6f8ff; }
.skill-upload.loaded { justify-content: flex-start; border-style: solid; border-color: #86b9aa; background: #f7fbfa; }
.skill-upload input { position: absolute; opacity: 0; pointer-events: none; }
.skill-upload > span { width: 30px; height: 30px; margin-bottom: 9px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--blue); font-size: 10px; font-weight: 900; }
.skill-upload.loaded > span { display: none; }
.skill-upload:nth-child(2) > span { background: #6d48d8; }
.skill-upload:nth-child(3) > span { background: #0c9b8c; }
.skill-upload:nth-child(4) > span { background: #d36b22; }
.skill-upload strong { font-size: 13px; }
.skill-upload small { max-width: 100%; margin-top: 6px; overflow: hidden; color: #8a94a5; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.face-library-folder { width: 100%; min-height: 76px; padding: 13px 16px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 14px; border: 1px solid #dce4f0; border-radius: 14px; color: #253149; background: linear-gradient(135deg, #f8faff, #f3f6fc); text-align: left; transition: .18s ease; }
.face-library-folder:hover { border-color: #9bb3fa; background: #f3f6ff; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(41,56,85,.08); }
.face-library-folder.has-selection { border-color: #72ad9d; background: #f2faf7; }
.face-folder-icon { position: relative; width: 46px; height: 34px; display: block; border-radius: 5px 7px 7px 7px; background: linear-gradient(145deg, #f5b83f, #e89516); box-shadow: inset 0 -4px 8px rgba(130,76,4,.13); }
.face-folder-icon::before { content: ""; position: absolute; left: 3px; top: -7px; width: 21px; height: 10px; border-radius: 5px 5px 0 0; background: #f2ad2b; }
.face-library-folder > span:nth-child(2) { min-width: 0; }
.face-library-folder strong, .face-library-folder small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.face-library-folder strong { font-size: 13px; }
.face-library-folder small { margin-top: 5px; color: #7c8799; font-size: 10px; }
.face-library-folder b { color: var(--blue); font-size: 11px; white-space: nowrap; }
.face-library-open { overflow: hidden; }
.face-library-modal { position: fixed; inset: 0; z-index: 1120; display: grid; place-items: center; padding: 24px; background: rgba(15,23,42,.58); backdrop-filter: blur(4px); }
.face-library-modal[hidden] { display: none; }
.face-library-dialog { width: min(940px, 100%); max-height: min(820px, calc(100vh - 48px)); display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; overflow: hidden; border: 1px solid #dfe6ef; border-radius: 20px; background: #f8fafe; box-shadow: 0 28px 80px rgba(15,23,42,.28); }
.face-library-head { margin: 0; padding: 20px 22px 16px; display: flex; align-items: start; justify-content: space-between; gap: 18px; border-bottom: 1px solid #e4e9f1; background: #fff; }
.face-library-head > div > span { color: var(--blue); font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.face-library-head h2 { margin: 4px 0 0; font-size: 22px; }
.face-library-head > button { width: 34px; height: 34px; border: 0; border-radius: 9px; color: #5d6879; background: #f1f4f8; font-size: 22px; line-height: 1; }
.face-library-toolbar { padding: 12px 22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #e6ebf2; background: #fbfcfe; }
.face-library-toolbar-actions { display: flex; align-items: center; gap: 10px; }
.face-library-toolbar-actions small { color: #8993a3; font-size: 10px; }
.face-library-toolbar-actions button { min-height: 30px; padding: 0 12px; border: 1px solid #d7dfeb; border-radius: 8px; color: #536074; background: #fff; font-size: 10px; font-weight: 750; }
.face-library-toolbar-actions button:disabled { opacity: .55; cursor: wait; }
.face-library-filter-groups { min-width: 0; display: flex; align-items: center; flex: 1 1 auto; }
.face-library-filter-row { min-width: 0; display: flex; align-items: center; gap: 10px; }
.face-library-filter-row > span { flex: 0 0 28px; color: #8a94a5; font-size: 10px; font-weight: 800; line-height: 30px; }
.face-library-filters { min-width: 0; display: flex; flex: 1 1 auto; flex-wrap: nowrap; gap: 6px; }
.face-library-filters button { min-width: 48px; min-height: 30px; padding: 0 12px; border: 1px solid #d7dfeb; border-radius: 999px; color: #5b6679; background: #fff; font-size: 11px; font-weight: 700; }
.face-library-filters button.active { border-color: var(--blue); color: #fff; background: var(--blue); }
.face-library-grid { padding: 18px 22px 22px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; overflow-y: auto; }
.face-library-empty { grid-column: 1 / -1; margin: 24px 0; color: #7c8799; text-align: center; font-size: 12px; }
.face-library-card[hidden] { display: none; }
.face-library-card { min-width: 0; padding: 7px 7px 9px; border: 2px solid transparent; border-radius: 13px; color: #222b3b; background: #fff; box-shadow: 0 5px 16px rgba(41,56,85,.07); text-align: left; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.face-library-card:hover { transform: translateY(-2px); border-color: #aac0ff; box-shadow: 0 8px 20px rgba(41,56,85,.12); }
.face-library-card.selected { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,94,255,.12); }
.face-library-card.selected::after { content: "✓ 已选"; position: absolute; top: 12px; right: 11px; padding: 3px 6px; border-radius: 999px; color: #fff; background: var(--blue); font-size: 9px; font-weight: 800; }
.face-library-card { position: relative; }
.face-library-card img { width: 100%; aspect-ratio: 1; display: block; border-radius: 9px; object-fit: cover; background: #eef1f5; }
.face-library-card span, .face-library-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.face-library-card span { margin-top: 7px; font-size: 11px; font-weight: 800; }
.face-library-card small { margin-top: 2px; color: #8a94a5; font-size: 9px; }
.face-library-dialog > footer { width: auto; margin: 0; padding: 12px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid #e4e9f1; color: #69758a; background: #fff; font-size: 11px; }
.face-library-dialog > footer button { min-height: 34px; padding: 0 17px; border: 1px solid #d7dfeb; border-radius: 8px; color: #536074; background: #f8f9fb; font-weight: 700; }
.skill-media-preview { display: block; width: 100%; height: 230px; margin-bottom: 12px; border-radius: 11px; background: #eef1f5; object-fit: contain; }
video.skill-media-preview { background: #111827; }
.skill-upload-grid.four-columns .skill-media-preview { height: 150px; }
.skill-media-gallery { width: 100%; height: 150px; margin-bottom: 12px; padding: 6px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; overflow: auto; border-radius: 11px; background: #eef1f5; }
.skill-media-gallery img { display: block; width: 100%; height: 64px; border-radius: 7px; background: #fff; object-fit: contain; }
.preset-video-settings { margin-top: 4px; padding-top: 18px; display: grid; gap: 12px; border-top: 1px solid #e3e8f0; }
.preset-video-settings .preset-model-setting { grid-template-columns: 1fr; margin: 0; }
.preset-video-settings .visual-parameters { background: #f8f9fb; }
.skill-run-button { width: 100%; min-height: 48px; border: 0; border-radius: 11px; color: #fff; background: var(--blue); box-shadow: 0 8px 22px rgba(29,94,255,.18); font-weight: 800; }
.skill-run-button:hover:not(:disabled) { background: #154ed7; }
.skill-review-note { margin: 12px 0 0; color: #8490a3; font-size: 10px; line-height: 1.6; text-align: center; }
.skill-workspace .video-task-panel { margin-top: 16px; }
.page-heading { margin-bottom: 24px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.page-heading h1 { margin: 0; font-size: 36px; letter-spacing: -.04em; }
.page-heading p:last-child { margin: 9px 0 0; color: var(--muted); }
.field-label.first { margin-top: 0; }

.topbar {
  height: 72px; padding: 0 max(28px, calc((100vw - 1180px) / 2)); display: flex; align-items: center;
  justify-content: space-between; color: #fff; background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--blue); font-weight: 800; }
.brand div { display: flex; flex-direction: column; gap: 2px; }
.brand strong { font-size: 16px; letter-spacing: .03em; }
.brand small { color: #9da8bb; }
.system-status { display: flex; align-items: center; gap: 8px; color: #c9d0dc; font-size: 13px; }
.system-status span { width: 8px; height: 8px; border-radius: 50%; background: #8791a3; box-shadow: 0 0 0 4px rgba(135,145,163,.14); }
.system-status.ready span { background: #38d9a9; box-shadow: 0 0 0 4px rgba(56,217,169,.15); }
.system-status.warning span { background: #ffb454; box-shadow: 0 0 0 4px rgba(255,180,84,.15); }
.system-status.error span { background: #ff6b72; }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 58px 0 76px; }
.hero { display: grid; grid-template-columns: 1.08fr .92fr; gap: 48px; align-items: end; margin-bottom: 34px; }
.eyebrow { margin: 0 0 10px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(32px, 4.2vw, 54px); line-height: 1.12; letter-spacing: -.05em; }
.hero > div > p:last-child { max-width: 650px; margin: 18px 0 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.flow-map { display: flex; align-items: center; justify-content: space-between; padding: 22px; border-radius: 18px; color: #e8edf7; background: var(--navy); box-shadow: var(--shadow); }
.flow-map div { display: flex; flex-direction: column; gap: 3px; min-width: 82px; }
.flow-map span { color: #7295ff; font-size: 11px; font-weight: 800; }
.flow-map strong { font-size: 14px; }
.flow-map small { color: #8792a7; font-size: 11px; }
.flow-map i { color: #566176; font-style: normal; }

.workspace-card, .results { padding: 32px; border: 1px solid #e0e4eb; border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.section-title, .results-head { display: flex; align-items: start; justify-content: space-between; gap: 24px; }
h2 { margin: 0; font-size: 27px; letter-spacing: -.03em; }
.rule-badge { padding: 9px 12px; border: 1px solid #cdd9ff; border-radius: 99px; color: #365bb8; background: #f2f6ff; font-size: 12px; font-weight: 700; }
.field-label { display: block; margin: 28px 0 8px; color: #454f62; font-size: 13px; font-weight: 700; }
.text-input { width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); outline: none; }
.text-input:focus { border-color: #789aff; box-shadow: 0 0 0 3px rgba(29,94,255,.1); }

.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; }
.upload-zone { position: relative; min-height: 220px; padding: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1.5px dashed #c9d0db; border-radius: 16px; background: #fafbfc; text-align: center; transition: .2s ease; cursor: pointer; }
.upload-zone:hover { border-color: #8ea9f8; background: #f7f9ff; transform: translateY(-1px); }
.upload-zone.loaded { border-style: solid; border-color: #8db7aa; background: #f4fbf8; }
.upload-zone input { position: absolute; opacity: 0; pointer-events: none; }
.upload-icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 14px; border-radius: 14px; color: #fff; font-weight: 800; box-shadow: 0 8px 18px rgba(29,94,255,.18); }
.image-icon { background: var(--blue); }
.video-icon { background: #6d48d8; }
.upload-zone strong { font-size: 17px; }
.upload-zone p { margin: 8px 0 5px; color: var(--muted); font-size: 13px; }
.upload-zone small { color: #929aab; }
.upload-state { margin-top: 17px; padding: 7px 12px; border-radius: 7px; color: #385ec2; background: #edf2ff; font-size: 12px; font-weight: 700; max-width: 92%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loaded .upload-state { color: #167464; background: #e2f5ee; }

.legacy-material-inputs[hidden] { display: none !important; }
.unified-material-upload { position: relative; min-height: 116px; padding: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1.5px dashed #bfcbe0; border-radius: 15px; color: #24324a; background: linear-gradient(180deg, #fbfcff, #f7f9fd); text-align: center; cursor: pointer; transition: .18s ease; }
.unified-material-upload:hover { border-color: #6f91f5; background: #f3f6ff; box-shadow: 0 8px 22px rgba(40,71,145,.08); }
.unified-material-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.unified-upload-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--blue); font-size: 19px; font-weight: 500; }
.unified-material-upload strong { margin-top: 2px; font-size: 14px; }
.unified-material-upload small { color: #7b8799; font-size: 11px; }
.face-material-entry-grid, .fashion-material-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.repaint-material-entry-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.workflow-material-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.face-material-entry-grid .unified-material-upload, .fashion-material-entry-grid .unified-material-upload, .repaint-material-entry-grid .unified-material-upload, .workflow-material-entry-grid .unified-material-upload { min-height: 132px; }
.face-material-entry-grid .face-image-entry .unified-upload-icon { background: linear-gradient(135deg, #7c5cff, #5a43ee); }
.fashion-material-entry-grid .fashion-image-entry .unified-upload-icon { background: linear-gradient(135deg, #7c5cff, #5a43ee); }
.repaint-material-entry-grid .unified-upload-icon { background: linear-gradient(135deg, #6d55f4, #2e8eea); }
.repaint-video-preview { width: min(360px, 100%); max-height: 340px; margin: 12px auto 0; display: block; border: 1px solid #dce3ed; border-radius: 16px; background: #111827; object-fit: contain; }
.repaint-video-preview[hidden] { display: none !important; }
.workflow-material-entry-grid .workflow-product-entry .unified-upload-icon { background: linear-gradient(135deg, #7c5cff, #5a43ee); }
.unified-material-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(142px, 1fr)); gap: 10px; }
.unified-material-preview[hidden] { display: none !important; }
.material-preview-card { position: relative; min-width: 0; padding: 7px; overflow: visible; border: 1px solid #dce3ed; border-radius: 13px; background: #fff; box-shadow: 0 5px 15px rgba(30,48,76,.055); }
.material-preview-card > img, .material-preview-card > video { width: 100%; height: 124px; display: block; border-radius: 9px; background: #eef1f5; object-fit: contain; }
.material-preview-card > video { background: #111827; }
.material-preview-card > audio { width: 100%; height: 124px; padding: 12px 6px; display: block; border-radius: 9px; background: linear-gradient(145deg, #f1f4fb, #e8edf8); }
.material-remove { position: absolute; z-index: 3; top: -7px; right: -7px; width: 24px; height: 24px; padding: 0; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; color: #fff; background: #202735; box-shadow: 0 3px 9px rgba(15,23,42,.28); font-size: 17px; line-height: 1; opacity: 0; transform: scale(.85); transition: .15s ease; }
.material-preview-card:hover .material-remove, .material-remove:focus-visible { opacity: 1; transform: scale(1); }
.material-preview-meta { min-width: 0; margin-top: 7px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px; }
.material-preview-meta strong { min-width: 0; overflow: hidden; color: #303a4d; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.material-preview-meta > span { padding: 3px 6px; border-radius: 5px; color: #4464b6; background: #edf2ff; font-size: 9px; white-space: nowrap; }
.material-preview-meta select { min-width: 70px; height: 25px; padding: 0 5px; border: 1px solid #ccd6e6; border-radius: 6px; color: #43506a; background: #f8faff; font-size: 9px; }
.material-auto-status { grid-column: 1 / -1; display: block; min-width: 0; padding: 0 2px; overflow: hidden; color: #667085; font-size: 9px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.material-auto-status.pending { color: #7c5cff; }
.material-auto-status.done { color: #137a5c; }
.material-auto-status.failed { color: #a65b12; }
.face-candidate-button { grid-column: 1 / -1; min-height: 26px; padding: 0 8px; border: 1px solid #cad6ec; border-radius: 6px; color: #315fcb; background: #f4f7ff; font-size: 10px; font-weight: 800; }
.face-candidate-button:disabled { border-color: #a8d8c8; color: #14715f; background: #edf9f5; opacity: 1; }
.material-mention-button { grid-column: 1 / -1; min-height: 26px; padding: 0 8px; border: 1px solid #c9d8ff; border-radius: 6px; color: #2456d9; background: #f2f6ff; font-size: 10px; font-weight: 800; }
.material-mention-button:hover { border-color: #7395f8; background: #e9f0ff; }
.video-prompt-editor { position: relative; }
.video-prompt-editor > span em { margin-left: 7px; color: #6c7d99; font-size: 10px; font-style: normal; font-weight: 500; }
.material-mention-menu { position: absolute; z-index: 20; left: 14px; top: 36px; width: min(420px, calc(100% - 28px)); max-height: 240px; padding: 6px; overflow-y: auto; border: 1px solid #d4ddea; border-radius: 11px; background: #fff; box-shadow: 0 14px 36px rgba(24,38,65,.18); }
.material-mention-menu[hidden] { display: none !important; }
.material-mention-menu button { width: 100%; min-height: 48px; padding: 6px 9px; display: grid; grid-template-columns: 36px 68px minmax(0,1fr) auto; align-items: center; gap: 8px; border: 0; border-radius: 7px; color: #344056; background: transparent; text-align: left; }
.material-mention-menu button:hover { background: #f1f5ff; }
.material-mention-menu img { width: 36px; height: 36px; display: block; object-fit: cover; border-radius: 7px; background: #eef1f6; }
.material-mention-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 7px; color: #625ee0; background: #eeefff; font-size: 11px; font-style: normal; font-weight: 900; }
.material-mention-menu b { color: var(--blue); font-size: 11px; }
.material-mention-menu span { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.material-mention-menu small { color: #8490a3; font-size: 9px; }
@media (hover: none) { .material-remove { opacity: 1; transform: scale(1); } }

.image-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; margin-top: 16px; }
.image-preview figure { margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.image-preview img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 7px; background: #f5f6f8; }
.image-preview figcaption { margin-top: 7px; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice { margin-top: 18px; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.notice.warning { color: #7c4b12; background: #fff7e8; border: 1px solid #f1d6a8; }
.notice.error { color: #8f2732; background: #fff0f1; border: 1px solid #f0bdc2; }
.run-row { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.run-row p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.primary-button, .secondary-button { border: 0; border-radius: 10px; font-weight: 800; }
.primary-button { padding: 13px 22px; color: #fff; background: var(--blue); box-shadow: 0 8px 22px rgba(29,94,255,.22); }
.primary-button:hover:not(:disabled) { background: #154ed7; }
.primary-button.small { padding: 10px 16px; }
.secondary-button { padding: 10px 15px; color: #314052; background: #edf0f4; }
.action-row { display: flex; gap: 9px; }
.import-button { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.import-button input { display: none; }

.progress-panel { position: relative; margin-top: 22px; padding: 25px 28px 32px 78px; border-radius: 16px; color: #fff; background: var(--navy); overflow: hidden; }
.spinner { position: absolute; left: 28px; top: 26px; width: 30px; height: 30px; border: 3px solid rgba(255,255,255,.18); border-top-color: #6e96ff; border-radius: 50%; animation: spin .9s linear infinite; }
.progress-panel strong { font-size: 16px; }
.progress-panel p { margin: 6px 0 0; color: #9da9bc; font-size: 13px; }
.progress-track { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255,255,255,.09); }
.progress-track span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2d69ff, #47d6c5); transition: width 1.2s ease; }
@keyframes spin { to { transform: rotate(360deg); } }

.results { margin-top: 26px; }
.script-result-panel { margin-top: 16px; }
.single-script-output { padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #fafbfc; }
.single-script-output p { margin: 0; color: #4e596b; font-size: 12px; line-height: 1.75; white-space: pre-wrap; }
.unified-script-editor { display: block; width: 100%; min-height: 650px; padding: 18px 20px; resize: vertical; border: 1px solid #d5dce8; border-radius: 12px; outline: none; color: #354157; background: #fbfcfe; font-size: 12px; line-height: 1.8; white-space: pre-wrap; }
.unified-script-editor:focus { border-color: #7e9fff; background: #fff; box-shadow: 0 0 0 3px rgba(29,94,255,.08); }
.workflow-script-tools { display: grid; grid-template-columns: repeat(2,minmax(0,220px)); gap: 10px; margin: 0 0 10px; }
.workflow-script-tools button,.workflow-script-tools label { min-height: 58px; display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 8px; padding: 9px 12px; border: 1px solid #d8e0ef; border-radius: 11px; color: #354157; background: #f8faff; cursor: pointer; text-align: left; }
.workflow-script-tools button:hover,.workflow-script-tools label:hover,.workflow-script-tools .selected { border-color: #7794ff; background: #f1f5ff; box-shadow: 0 0 0 3px rgba(75,105,255,.08); }
.workflow-script-tools input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.workflow-script-tools span { grid-row: 1 / 3; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: #fff; background: linear-gradient(135deg,#7657f7,#3d7af5); font-size: 18px; }
.workflow-script-tools b { font-size: 13px; }
.workflow-script-tools small { color: #7b879d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 620px) { .workflow-script-tools { grid-template-columns: 1fr; } }
.copy-script-button { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #d8e0ef; border-radius: 9px; color: var(--blue); background: #f3f6ff; }
.copy-script-button:hover { color: #fff; background: var(--blue); }
.copy-script-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs { display: flex; gap: 4px; margin: 28px 0 24px; padding: 5px; border-radius: 11px; background: #f0f2f6; overflow-x: auto; }
.tab { padding: 10px 15px; border: 0; border-radius: 8px; color: #687184; background: transparent; font-size: 13px; font-weight: 700; white-space: nowrap; }
.tab.active { color: #14203a; background: #fff; box-shadow: 0 2px 8px rgba(20,32,58,.08); }
.tab span { margin-left: 4px; padding: 1px 6px; border-radius: 20px; background: #dde4f2; font-size: 11px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.summary-grid article { padding: 18px; border: 1px solid var(--line); border-radius: 12px; }
.summary-grid span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.summary-grid strong { font-size: 16px; }
.fact-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.list-card { padding: 20px; border-radius: 13px; background: #f7f8fa; }
.list-card h3 { margin: 0 0 13px; font-size: 15px; }
.list-card ul { margin: 0; padding-left: 19px; }
.list-card li { margin: 8px 0; color: #4f586a; font-size: 13px; line-height: 1.55; }
.list-card.good { border-top: 3px solid var(--teal); }
.list-card.warn { border-top: 3px solid var(--orange); }
.list-card.danger { border-top: 3px solid var(--red); }

.shot-list, .segment-list { display: grid; gap: 12px; }
.shot-card { display: grid; grid-template-columns: 92px 1fr auto; gap: 20px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; }
.shot-number span { display: block; color: #315fd2; font-size: 24px; font-weight: 800; }
.shot-number small { color: var(--muted); }
.shot-head { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.shot-main p { margin: 6px 0; color: #596274; font-size: 13px; line-height: 1.6; }
.shot-main b { color: #303a4d; }
.compat { padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; }
.compat.full { color: #167464; background: #e2f5ee; }
.compat.conditional { color: #8a5217; background: #fff2dc; }
.compat.none { color: #9e2e3a; background: #ffe7e9; }
.adapted { margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--blue); color: #34405a; background: #f3f6ff; font-size: 13px; line-height: 1.6; }
.confidence { align-self: start; color: var(--muted); font-size: 11px; white-space: nowrap; }
.global-control { padding: 20px; border-radius: 14px; color: #e7ebf3; background: var(--navy); }
.global-control span { color: #7da0ff; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.global-control p { margin: 9px 0 0; line-height: 1.7; white-space: pre-wrap; }
.segment-list { margin-top: 14px; }
.segment-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.segment-card header { display: flex; justify-content: space-between; padding: 13px 17px; background: #f4f6f9; font-size: 13px; }
.segment-card header span { color: #315fd2; font-weight: 800; }
.script-row { display: grid; grid-template-columns: 70px 1fr; padding: 12px 17px; border-top: 1px solid #edf0f4; }
.script-row b, .prompt-block b { font-size: 12px; }
.script-row p, .prompt-block p { margin: 0; color: #515b6e; font-size: 13px; line-height: 1.65; white-space: pre-wrap; }
.prompt-block { margin: 0 17px 17px; padding: 13px; border-radius: 9px; background: #f2f5ff; }
.prompt-block b { display: block; margin-bottom: 6px; color: #315fd2; }
.meta-line { display: flex; gap: 10px; flex-wrap: wrap; }
.meta-line span { padding: 7px 10px; border-radius: 7px; color: #556074; background: #eff2f6; font-size: 12px; }
.transcript-note { margin: 13px 0; padding: 11px 13px; border-radius: 9px; color: #526071; background: #f7f8fa; font-size: 13px; }
.empty { padding: 40px; color: var(--muted); text-align: center; }
.video-generation-card { margin-top: 28px; padding: 24px; border: 1px solid #dbe3f7; border-radius: 16px; background: linear-gradient(135deg, #f8faff, #f4fbfa); }
.standalone-generator { box-shadow: var(--shadow); }
.video-generation-head, .video-generation-action { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.video-generation-head h3 { margin: 0; font-size: 21px; }
.free-creation-view { max-width: 1120px; margin: 0 auto; }
.page-heading.free-creation-heading { margin-bottom: 4px; }
.free-creation-mode-switch { width: min(440px, 100%); margin: -2px auto 10px; padding: 4px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; border: 1px solid #dfe5f1; border-radius: 12px; background: #f4f6fb; box-shadow: 0 7px 20px rgba(48,62,105,.065); }
.free-creation-mode-switch button { min-height: 44px; padding: 5px 12px; display: grid; place-items: center; gap: 1px; border: 0; border-radius: 9px; color: #6e7890; background: transparent; cursor: pointer; transition: .18s ease; }
.free-creation-mode-switch button span { font-size: 13px; font-weight: 850; }
.free-creation-mode-switch button small { font-size: 9px; }
.free-creation-mode-switch button.active { color: #fff; background: linear-gradient(120deg,#7654f5,#2f8be9); box-shadow: 0 8px 20px rgba(74,91,223,.23); }
.free-creation-material-grid { margin: 0 0 10px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.free-creation-material-action { position: relative; min-width: 0; min-height: 66px; padding: 8px 8px; display: grid; place-items: center; align-content: center; gap: 2px; border: 1.5px dashed #bcc9df; border-radius: 11px; color: #2d3950; background: linear-gradient(180deg, #fff, #f7f9fd); text-align: center; cursor: pointer; transition: .18s ease; }
.free-creation-material-action:hover { border-color: #6f91f5; background: #f3f6ff; box-shadow: 0 8px 22px rgba(40,71,145,.08); transform: translateY(-1px); }
.free-creation-material-action input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.free-creation-material-action > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: linear-gradient(135deg,#7657f7,#3d7af5); font-size: 14px; font-weight: 850; }
.free-creation-material-action strong { overflow: hidden; max-width: 100%; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.free-creation-material-action small { overflow: hidden; max-width: 100%; color: #7b8799; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.free-creation-material-action.has-selection { border-style: solid; border-color: #72ad9d; background: #f2faf7; }
.workflow-inline-generator > .free-creation-material-grid { display: none !important; }
.free-creation-view .video-generation-card { margin-top: 0; }
.free-creation-view .unified-material-upload { display: none !important; }
.free-creation-view .video-prompt-editor textarea { min-height: 500px; }
.video-generation-card.free-script-mode .free-creation-material-action[data-free-video-only] { display: none; }
.video-generation-card.free-script-mode > .free-creation-material-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.video-generation-card.free-script-mode .free-creation-video-action { order: 1; }
.video-generation-card.free-script-mode .free-creation-image-action { order: 2; }
.free-creation-view #generationMaterialPreview { margin: 0 0 10px; grid-template-columns: repeat(auto-fill, minmax(88px, 110px)); justify-content: start; gap: 8px; }
.free-creation-view #generationMaterialPreview .material-preview-card { padding: 5px; border-radius: 10px; }
.free-creation-view #generationMaterialPreview .material-preview-card > img,
.free-creation-view #generationMaterialPreview .material-preview-card > video { height: 72px; border-radius: 7px; }
.free-creation-view #generationMaterialPreview .material-preview-card > audio { height: 72px; padding: 6px 3px; border-radius: 7px; }
.free-creation-view #generationMaterialPreview .material-preview-meta { margin-top: 4px; }
.video-generation-card.free-script-mode > .video-prompt-editor,
.video-generation-card.free-script-mode > .basic-video-settings,
.video-generation-card.free-script-mode > .visual-parameters,
.video-generation-card.free-script-mode > .generate-video-bar,
.video-generation-card.free-script-mode > .video-task-panel { display: none !important; }
.workflow-inline-generator > .free-creation-script-panel { display: none !important; }
.free-creation-script-panel { margin-top: 4px; display: grid; gap: 15px; }
.free-creation-script-panel[hidden] { display: none !important; }
.free-creation-requirement-editor { display: block; }
.free-creation-requirement-editor > span { display: block; margin-bottom: 8px; color: #354157; font-size: 13px; font-weight: 850; }
.free-creation-requirement-editor > span em { margin-left: 7px; color: #71809a; font-size: 10px; font-style: normal; font-weight: 500; }
.free-creation-requirement-editor textarea { width: 100%; min-height: 360px; padding: 16px; resize: vertical; border: 1px solid #cfd8e7; border-radius: 13px; color: var(--ink); background: #fff; outline: none; line-height: 1.7; }
.free-creation-requirement-editor textarea:focus { border-color: #789aff; box-shadow: 0 0 0 3px rgba(29,94,255,.1); }
.free-creation-requirement-editor > small { margin-top: 7px; display: flex; justify-content: space-between; gap: 12px; color: #7a879b; font-size: 10px; }
.free-creation-requirement-editor > small i { font-style: normal; }
.free-creation-requirement-editor > small b { white-space: nowrap; }
.free-creation-dialogue-mode { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; border: 0; }
.free-creation-dialogue-mode legend { margin-bottom: 8px; color: #354157; font-size: 13px; font-weight: 850; }
.free-creation-dialogue-mode label { position: relative; min-height: 64px; padding: 11px 14px; display: flex; align-items: center; gap: 10px; border: 1px solid #d9e0ed; border-radius: 12px; background: #fff; cursor: pointer; }
.free-creation-dialogue-mode label:has(input:checked) { border-color: #7b83f3; background: #f5f4ff; box-shadow: 0 0 0 2px rgba(109,91,238,.08); }
.free-creation-dialogue-mode label > span { display: grid; gap: 3px; }
.free-creation-dialogue-mode label b { color: #303b52; font-size: 13px; }
.free-creation-dialogue-mode label small { color: #76839a; font-size: 10px; }
.free-creation-generate-script { min-height: 58px; display: grid; place-items: center; gap: 2px; border: 0; border-radius: 13px; color: #fff; background: linear-gradient(110deg,#7352f6,#238fe9); cursor: pointer; box-shadow: 0 12px 28px rgba(70,82,224,.19); }
.free-creation-generate-script strong { font-size: 15px; }
.free-creation-generate-script small { color: rgba(255,255,255,.78); font-size: 10px; }
.free-creation-generate-script:disabled { cursor: not-allowed; filter: grayscale(.35); opacity: .55; box-shadow: none; }
.free-creation-script-progress { padding: 17px 19px; border: 1px solid #dce5f4; border-radius: 14px; background: #f8faff; }
.free-creation-script-progress > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.free-creation-script-progress strong { color: #303c55; }
.free-creation-script-progress div span { color: #6f7d94; font-size: 12px; }
.free-creation-script-progress > i { height: 7px; margin-top: 12px; display: block; overflow: hidden; border-radius: 999px; background: #e6eaf3; }
.free-creation-script-progress > i span { width: 3%; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,#7956f3,#2d91e6); transition: width .45s ease; }
.free-creation-script-result { padding: 18px; border: 1px solid #d7e2f0; border-radius: 15px; background: #fff; box-shadow: 0 10px 30px rgba(40,57,104,.07); }
.free-creation-script-result header { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.free-creation-script-result header span { color: #168567; font-size: 10px; font-weight: 850; }
.free-creation-script-result h3 { margin: 3px 0 0; font-size: 16px; }
.free-creation-script-result header > div:last-child { display: flex; gap: 8px; }
.free-creation-script-result button { min-height: 36px; padding: 0 13px; border: 1px solid #cfd9eb; border-radius: 9px; color: #44516b; background: #fff; cursor: pointer; font-weight: 750; }
.free-creation-script-result textarea { width: 100%; min-height: 480px; padding: 16px; resize: vertical; border: 1px solid #cfd8e7; border-radius: 12px; color: #202b40; background: #fdfdff; outline: none; line-height: 1.75; }
.video-parameter-tags { display: flex; flex-wrap: wrap; justify-content: end; gap: 7px; }
.video-parameter-tags span { padding: 6px 9px; border-radius: 99px; color: #365bb8; background: #eaf0ff; font-size: 11px; font-weight: 800; }
.video-boundary { margin: 18px 0; color: #596579; font-size: 13px; line-height: 1.7; }
.video-prompt-editor { display: block; margin: 18px 0; }
.video-prompt-editor > span { display: block; margin-bottom: 8px; color: #354157; font-size: 13px; font-weight: 800; }
.video-prompt-editor textarea { display: block; width: 100%; min-height: 440px; resize: vertical; padding: 15px; border: 1px solid #cfd8e7; border-radius: 12px; color: var(--ink); background: #fff; outline: none; line-height: 1.65; }
.video-prompt-editor textarea:focus { border-color: #789aff; box-shadow: 0 0 0 3px rgba(29,94,255,.1); }
.video-prompt-editor small { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; color: var(--muted); }
.video-prompt-editor small button { padding: 0; border: 0; color: var(--blue); background: transparent; font-weight: 700; }
.video-prompt-editor small i { font-style: normal; }
.video-settings-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0 12px; }
.video-settings-grid label { display: flex; flex-direction: column; gap: 7px; }
.video-settings-grid label > span { color: #465167; font-size: 12px; font-weight: 800; }
.video-settings-grid select, .duration-control { min-height: 42px; padding: 0 12px; border: 1px solid #d7deea; border-radius: 9px; color: var(--ink); background: #fff; outline: none; }
.video-settings-grid select:focus, .duration-control:focus-within { border-color: #789aff; box-shadow: 0 0 0 3px rgba(29,94,255,.1); }
.duration-control { display: flex; align-items: center; gap: 6px; }
.duration-control input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; }
.duration-control b { color: var(--muted); font-size: 12px; }
.generator-assets { display: flex; gap: 12px; margin: 12px 0; }
.prompt-assets { margin: 16px 0 10px; }
.compact-upload { position: relative; flex: 1; min-height: 58px; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 8px 10px; border: 1px dashed #bdc8da; border-radius: 9px; color: #354157; background: rgba(255,255,255,.72); cursor: pointer; }
.compact-upload:hover { border-color: #789aff; background: #fff; }
.compact-upload input { position: absolute; opacity: 0; pointer-events: none; }
.compact-upload b { font-size: 11px; }
.compact-upload span { color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-upload[hidden] { display: none; }
.basic-video-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.basic-video-settings.single-setting { grid-template-columns: 1fr; }
.basic-video-settings label { display: grid; gap: 6px; }
.basic-video-settings label > span, .parameter-group > span { color: #596579; font-size: 11px; font-weight: 700; }
.basic-video-settings select { width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid #d7deea; border-radius: 9px; color: var(--ink); background: #fff; }
.visual-parameters { display: grid; gap: 13px; padding: 14px; border: 1px solid #e1e6ef; border-radius: 12px; background: rgba(255,255,255,.66); }
.parameter-group { display: grid; gap: 7px; }
.parameter-group[hidden] { display: none !important; }
.smart-background-card { min-width: 0; padding: 15px 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid #dfe4ef; border-radius: 13px; background: linear-gradient(135deg, #f8f7ff, #f1f8ff); cursor: pointer; }
.smart-background-card.scene-reference-active { border-color: #cbd7ef; background: #f4f7fb; cursor: default; }
.smart-background-copy { min-width: 0; display: grid; gap: 7px; }
.smart-background-copy > span { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.smart-background-copy strong { color: #28344c; font-size: 12px; }
.smart-background-copy em { padding: 4px 8px; border-radius: 999px; color: #6257df; background: #ebe9ff; font-size: 9px; font-style: normal; font-weight: 800; }
.smart-background-copy small { max-width: 760px; color: #768197; font-size: 10px; line-height: 1.65; }
.smart-background-card.scene-reference-active .smart-background-copy small { color: #4d66a1; font-weight: 700; }
.smart-background-switch { position: relative; width: 46px; height: 26px; flex: 0 0 46px; }
.smart-background-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.smart-background-switch i { position: absolute; inset: 0; border-radius: 999px; background: #c9cfda; box-shadow: inset 0 1px 3px rgba(31,43,66,.14); transition: background .18s ease; }
.smart-background-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(27,39,63,.22); transition: transform .18s ease; }
.smart-background-switch input:checked + i { background: linear-gradient(135deg, #725bff, #308eff); }
.smart-background-switch input:checked + i::after { transform: translateX(20px); }
.smart-background-switch input:focus-visible + i { outline: 3px solid rgba(78,113,255,.2); outline-offset: 2px; }
.smart-background-switch input:disabled + i { opacity: .55; }
.choice-row { display: grid; gap: 5px; padding: 3px; border-radius: 9px; background: #edf0f5; }
.choice-row button { min-height: 35px; border: 0; border-radius: 7px; color: #4f596b; background: transparent; font-size: 11px; }
.choice-row button.active { color: #172033; background: #fff; box-shadow: 0 2px 7px rgba(25,38,62,.10); font-weight: 800; }
.ratio-choices { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ratio-choices button { display: grid; place-items: center; gap: 3px; padding: 5px 2px; }
.ratio-choices b { font-size: 9px; }
.face-mode-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.background-mode-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.background-mode-choices button:disabled { color: #a1a8b5; cursor: not-allowed; }
.ratio-icon { display: block; border: 1.5px solid currentColor; border-radius: 2px; }
.ratio-icon.wide { width: 18px; height: 7px; }.ratio-icon.landscape { width: 17px; height: 10px; }.ratio-icon.classic { width: 15px; height: 11px; }.ratio-icon.square { width: 12px; height: 12px; }.ratio-icon.portrait { width: 10px; height: 14px; }.ratio-icon.tall { width: 8px; height: 15px; }
.resolution-choices { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
.resolution-choices button[hidden] { display: none !important; }
.count-choices { grid-template-columns: repeat(4, 1fr); }
.duration-slider { display: grid; grid-template-columns: 1fr 66px; align-items: center; gap: 10px; }
.duration-slider input { width: 100%; accent-color: var(--blue); }
.duration-slider output { padding: 9px; border-radius: 8px; color: #263246; background: #edf0f5; font-size: 11px; text-align: center; }
.generate-video-bar { width: 100%; min-height: 48px; margin-top: 14px; padding: 10px 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; column-gap: 14px; row-gap: 3px; border: 0; border-radius: 10px; color: #fff; background: var(--blue); }
.generate-video-bar strong { font-size: 14px; }.generate-video-bar small { color: rgba(255,255,255,.92); font-size: 12px; font-weight: 700; line-height: 1.4; }
.generate-video-bar:disabled { background: #999da5; }
.preset-generate-bar { margin-top: 0; }
.video-task-panel { margin-top: 18px; padding: 18px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.video-task-panel p { margin: 8px 0 0; color: #596579; font-size: 13px; line-height: 1.6; }
.video-task-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.video-task-actions .secondary-button { min-height: 36px; padding: 0 14px; }
.video-estimated-progress { height: 8px; margin-top: 14px; overflow: hidden; border-radius: 999px; background: #e8ebf5; }
.video-estimated-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7857f5, #2d8cf0); transition: width .6s ease; }
.video-progress-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.video-progress-meta strong { color: #313b56; font-size: 14px; }
.video-progress-meta span { color: #6f7b91; font-size: 13px; }
.video-task-panel video { display: block; width: min(100%, 420px); max-height: 640px; margin: 16px auto; border-radius: 12px; background: #111827; }
.video-result-grid { display: grid; gap: 14px; margin-top: 14px; }
.video-result-grid article { padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.video-result-error { color: #8f2732; background: #fff0f1; }
.video-status-line { display: flex; align-items: center; gap: 9px; }
.video-status-dot { width: 9px; height: 9px; border-radius: 50%; background: #ffb454; box-shadow: 0 0 0 4px rgba(255,180,84,.16); }
.video-status-line.success .video-status-dot { background: #38b99a; box-shadow: 0 0 0 4px rgba(56,185,154,.15); }
.video-download { display: table; margin: 12px auto 0; text-decoration: none; }

.header-account-button, .header-logout-button { min-height: 36px; padding: 0 12px; border: 1px solid #dce3f0; border-radius: 9px; color: #46546c; background: #fff; font-size: 11px; font-weight: 700; }
.header-account-button { color: #2357d4; background: #f3f6ff; }
.header-logout-button { color: #7d5660; }
.account-view { max-width: 1180px; margin: 0 auto; }
.account-heading { padding: 18px 0 24px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.account-heading h1 { margin: 0; font-size: 34px; letter-spacing: -.04em; }
.account-heading p { margin: 9px 0 0; color: var(--muted); }
.account-heading button, .admin-title button { min-height: 38px; padding: 0 14px; border: 1px solid #d9e0ea; border-radius: 9px; color: #445066; background: #fff; }
.account-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.account-summary article { min-height: 174px; padding: 21px; display: flex; flex-direction: column; align-items: start; gap: 8px; border: 1px solid #e1e6ee; border-radius: 16px; background: #fff; box-shadow: 0 10px 30px rgba(24,38,63,.05); }
.account-summary article > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.account-summary article > p { margin: auto 0 0; color: #8b94a4; font-size: 10px; line-height: 1.5; }
.account-summary article > small { margin-top: auto; color: #8b94a4; font-size: 10px; }
.account-metric-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.account-metric-value strong { color: #171d31; font-size: 29px; line-height: 1.15; letter-spacing: -.03em; }
.account-metric-value small { color: #7f899b; font-size: 10px; font-weight: 700; }
.account-balance-summary button { min-height: 32px; margin-top: 2px; padding: 0 11px; border: 0; border-radius: 8px; color: #5b5cf6; background: #f0efff; font-size: 10px; font-weight: 800; }
.account-feature-summary { min-width: 0; }
.account-feature-list { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.account-feature-list span { min-height: 34px; padding: 7px 8px; display: grid; place-items: center; border: 1px solid #e3e1ff; border-radius: 9px; color: #504bcf; background: linear-gradient(135deg, #f5f3ff, #f1f7ff); font-size: 11px; font-weight: 800; text-align: center; }
.account-feature-empty { color: #8b94a4; font-size: 12px; font-style: normal; }
.account-panel { margin-bottom: 16px; padding: 20px; border: 1px solid #e1e6ee; border-radius: 14px; background: #fff; }
.account-panel h2, .account-panel h3 { margin: 0; }
.account-panel-head { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.account-panel-head h2 { font-size: 19px; }
.account-panel-head span { color: var(--muted); font-size: 11px; }
.account-panel-head p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.support-center .account-panel-head { align-items: start; }
.support-grid { display: grid; grid-template-columns: minmax(280px, .82fr) minmax(360px, 1.18fr); gap: 18px; }
.support-form { padding: 16px; display: grid; gap: 11px; align-content: start; border: 1px solid #e3e8f0; border-radius: 12px; background: #fafbfd; }
.support-form label, .admin-support-controls label { display: grid; gap: 6px; color: #5e6a80; font-size: 10px; font-weight: 700; }
.support-form input, .support-form select, .support-form textarea, .admin-support-controls select, .admin-support-controls textarea { width: 100%; padding: 0 11px; border: 1px solid #d6deeb; border-radius: 8px; color: #283347; background: #fff; outline: none; }
.support-form input, .support-form select, .admin-support-controls select { min-height: 40px; }
.support-form textarea { min-height: 128px; padding-top: 11px; resize: vertical; line-height: 1.6; }
.support-form input:focus, .support-form select:focus, .support-form textarea:focus, .admin-support-controls select:focus, .admin-support-controls textarea:focus { border-color: #789aff; box-shadow: 0 0 0 3px rgba(29,94,255,.08); }
.support-description { position: relative; }
.support-description small { color: #929bab; text-align: right; font-weight: 500; }
.support-form > button { min-height: 42px; border: 0; border-radius: 9px; color: #fff; background: var(--blue); font-weight: 800; }
.support-history { min-width: 0; }
.support-history h3 { margin: 2px 0 12px; font-size: 15px; }
.support-list, .admin-support-list { display: grid; gap: 10px; }
.support-list { max-height: 560px; overflow-y: auto; }
.support-card { padding: 15px; border: 1px solid #e2e7ef; border-radius: 11px; background: #fff; }
.support-card-head, .admin-support-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.support-card-head > div, .admin-support-head > div { display: grid; gap: 4px; }
.support-card-head strong, .admin-support-head strong { color: #273247; font-size: 13px; }
.support-card-head small, .admin-support-head small { color: #8993a4; font-size: 9px; }
.support-status { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; color: #8a5a15; background: #fff4dd; font-size: 9px; font-weight: 800; }
.support-status.processing { color: #2458b7; background: #eaf1ff; }
.support-status.resolved { color: #18745e; background: #e8f7f1; }
.support-status.closed { color: #657083; background: #edf0f4; }
.support-card > p, .admin-support-body > p { margin: 12px 0; color: #4a566a; font-size: 11px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.support-meta, .support-meta-row { margin-top: 10px; color: #7f8999; font-size: 9px; overflow-wrap: anywhere; }
.support-reply { margin-top: 12px; padding: 11px 12px; border-radius: 9px; color: #40516b; background: #f1f5ff; }
.support-reply b { color: #2c58bf; font-size: 10px; }
.support-reply p { margin: 5px 0; font-size: 11px; line-height: 1.7; white-space: pre-wrap; }
.support-reply small, .support-waiting { color: #8a94a5; font-size: 9px; }
.support-waiting { margin-top: 12px; padding: 10px; border-radius: 8px; background: #f6f7f9; }
.admin-support-card { padding: 16px; border: 1px solid #e1e6ee; border-radius: 12px; background: #fff; }
.support-meta-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.admin-support-controls { display: grid; grid-template-columns: 150px minmax(260px, 1fr) auto; align-items: end; gap: 10px; }
.admin-support-controls textarea { min-height: 66px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.admin-support-controls button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 8px; color: #fff; background: var(--blue); font-size: 10px; font-weight: 800; }
.ledger-list { display: grid; gap: 7px; }
.ledger-row { padding: 11px 12px; display: grid; grid-template-columns: minmax(120px, 1.5fr) 90px 105px 145px; align-items: center; gap: 12px; border-radius: 9px; background: #f7f8fb; font-size: 11px; }
.ledger-row strong { font-size: 12px; }
.ledger-row small { display: block; margin-top: 3px; color: #9099a9; }
.ledger-row .credit-positive { color: #07846e; font-weight: 800; }
.ledger-row .credit-negative { color: #b04450; font-weight: 800; }
.ledger-row .api-cost { color: #765114; }
.admin-form input { min-height: 39px; padding: 0 11px; border: 1px solid #d6deeb; border-radius: 8px; outline: none; }
.admin-form button, .admin-user-actions button { min-height: 39px; padding: 0 14px; border: 0; border-radius: 8px; color: #fff; background: var(--blue); font-weight: 700; }
.admin-panel { margin-top: 28px; padding-top: 24px; border-top: 2px solid #dde5f5; }
.admin-title { margin-bottom: 15px; display: flex; align-items: end; justify-content: space-between; }
.admin-title span { color: var(--blue); font-size: 10px; font-weight: 900; }
.admin-title h2 { margin: 4px 0 0; font-size: 26px; }
.admin-operations-card { margin-bottom: 16px; border-color: #dce4ff; background: linear-gradient(145deg, #fff 0%, #f7f9ff 100%); }
.admin-operations-content { display: grid; gap: 16px; }
.admin-operation-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.admin-operation-metrics article { padding: 14px; display: grid; gap: 5px; border: 1px solid #e1e7f5; border-radius: 12px; background: #fff; box-shadow: 0 8px 24px rgba(45, 61, 124, .05); }
.admin-operation-metrics span, .admin-operation-metrics small { color: var(--muted); font-size: 10px; font-weight: 700; }
.admin-operation-metrics strong { color: #18213d; font-size: 25px; line-height: 1.1; }
.admin-operation-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.admin-operation-columns > section { padding: 12px; border: 1px solid #e5e9f3; border-radius: 11px; background: rgba(255,255,255,.78); }
.admin-operation-columns h3 { margin: 0 0 8px; color: #303b58; font-size: 12px; }
.admin-operation-row { min-height: 32px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; border-top: 1px solid #edf0f6; color: #526078; font-size: 10px; }
.admin-operation-row:first-of-type { border-top: 0; }
.admin-operation-row strong { color: #24304c; font-size: 11px; }
.admin-operation-row small { color: #8a94a8; }
.admin-operation-row.circuit-open strong { color: #d24d5d; }
.admin-operation-row.circuit-closed strong { color: #168963; }
.admin-operation-empty { padding: 15px 0; color: #929bae; font-size: 10px; }
.admin-reconciliation-actions { margin-top: 14px; padding-top: 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #e2e7f2; }
.admin-reconciliation-actions span { color: #647087; font-size: 10px; font-weight: 700; }
.admin-reconciliation-actions span.reconciliation-critical { color: #c64354; }
.admin-reconciliation-actions span.reconciliation-ok { color: #168963; }
.admin-reconciliation-actions button { min-height: 36px; padding: 0 13px; border: 0; border-radius: 9px; color: #fff; background: linear-gradient(135deg, #6654f4, #2f83ec); font-size: 10px; font-weight: 800; }
.admin-reconciliation-actions button:disabled { opacity: .55; cursor: wait; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.admin-form h3 { grid-column: 1 / -1; margin-bottom: 4px; font-size: 16px; }
.admin-form label { display: grid; gap: 5px; color: #667188; font-size: 10px; }
.admin-form > button, .permission-checks { grid-column: 1 / -1; }
.pricing-form fieldset { grid-column: 1 / -1; min-width: 0; margin: 2px 0; padding: 12px; border: 1px solid #e0e6f2; border-radius: 10px; }
.pricing-form legend { padding: 0 6px; color: #29324a; font-size: 11px; font-weight: 800; }
.pricing-rate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.pricing-form > small { grid-column: 1 / -1; color: var(--muted); }
.permission-checks { display: flex; flex-wrap: wrap; gap: 13px; padding: 8px 2px; color: #4d596e; font-size: 11px; }
.permission-checks label { display: flex; align-items: center; gap: 5px; }
.admin-user-list { display: grid; gap: 8px; }
.admin-user-card { padding: 13px; display: grid; grid-template-columns: minmax(150px, 1fr) minmax(240px, 1.5fr) auto; align-items: center; gap: 16px; border: 1px solid #e4e8ef; border-radius: 10px; }
.admin-user-card h4 { margin: 0; font-size: 13px; }
.admin-user-card p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.admin-user-permissions { display: flex; flex-wrap: wrap; gap: 10px; font-size: 10px; }
.admin-user-permissions label { display: flex; align-items: center; gap: 4px; }
.admin-user-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 6px; }
.admin-user-actions button { min-height: 31px; padding: 0 9px; font-size: 9px; }
.admin-user-actions button.secondary { color: #4c5b72; background: #edf0f5; }
.admin-user-actions button.danger { color: #9d3f4a; background: #fff0f1; }
.wechat-payment-list { display: grid; gap: 8px; }
.wechat-payment-row { padding: 13px; display: grid; grid-template-columns: minmax(180px, 1.2fr) 90px 110px minmax(180px, 1fr) minmax(200px, 1.15fr); align-items: center; gap: 14px; border: 1px solid #e4e8ef; border-radius: 10px; background: #fafbfd; }
.wechat-payment-row > div { min-width: 0; display: grid; gap: 4px; }
.wechat-payment-row span, .wechat-payment-row small { color: var(--muted); font-size: 9px; }
.wechat-payment-row strong { font-size: 11px; }
.wechat-payment-row code { overflow: hidden; color: #445069; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.wechat-payment-status { width: max-content; padding: 3px 6px; border-radius: 999px; color: #27835b !important; background: #eaf8f1; font-weight: 800; }
.wechat-payment-status.status-refunded { color: #7a5b22 !important; background: #fff6dd; }
.wechat-payment-status.status-partially_refunded, .wechat-payment-status.status-refund_pending_confirmation { color: #8c641a !important; background: #fff5d7; }
.login-overlay { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: linear-gradient(145deg, #edf3ff, #f7fafc 60%, #eef8f6); }
.login-overlay[hidden] { display: none; }
.login-card { width: min(440px, 100%); max-height: calc(100vh - 40px); padding: 34px; display: grid; gap: 15px; overflow-y: auto; border: 1px solid #dfe6f1; border-radius: 22px; background: #fff; box-shadow: 0 24px 70px rgba(32,48,75,.14); }
.login-card .login-overlay-close { position: absolute; top: 16px; right: 16px; width: 36px; min-height: 36px; padding: 0; border: 1px solid rgba(164,174,215,.16); border-radius: 50%; color: #aeb7d0; background: rgba(255,255,255,.06); box-shadow: none; font-size: 22px; font-weight: 500; line-height: 1; }
.login-card .login-overlay-close:hover, .login-card .login-overlay-close:focus-visible { color: #fff; background: rgba(112,105,246,.20); outline: none; }
.login-brand-logo { width: 86px; height: 58px; display: grid; place-items: center; border: 1px solid rgba(131,160,255,.30); border-radius: 20px; background: linear-gradient(145deg, #101b35, #070b1a); box-shadow: 0 14px 32px rgba(8,12,34,.35), inset 0 1px rgba(255,255,255,.11); }
.login-brand-logo svg { width: 78px; height: 54px; overflow: visible; }
.login-logo-fold { filter: drop-shadow(0 2px 5px rgba(30,117,255,.36)); }
.login-logo-wordmark-ai { font-family: "Microsoft YaHei", Inter, Arial, sans-serif; font-size: 13px; font-weight: 900; letter-spacing: .2px; fill: #fff; filter: drop-shadow(0 2px 5px rgba(0,0,0,.40)); }
.login-card h1 { margin: 0; font-size: 28px; }
.login-card > p { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.login-card label { display: grid; gap: 6px; color: #536078; font-size: 11px; font-weight: 700; }
.login-card input { min-height: 44px; padding: 0 13px; border: 1px solid #d4ddea; border-radius: 9px; outline: none; font-size: 14px; }
.login-card input:focus { border-color: #789aff; box-shadow: 0 0 0 3px rgba(29,94,255,.1); }
.login-card button { min-height: 45px; border: 0; border-radius: 9px; color: #fff; background: var(--blue); font-weight: 800; }
.login-card small { color: #9099aa; text-align: center; }
.auth-mode-switch { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; padding: 4px; border: 1px solid #dce3ee; border-radius: 12px; background: #f3f6fa; }
.login-card .auth-mode-switch button { min-height: 34px; border-radius: 8px; color: #68758a; background: transparent; font-size: 11px; }
.login-card .auth-mode-switch button.active { color: #fff; background: var(--blue); box-shadow: 0 6px 16px rgba(29,94,255,.18); }
.auth-form { display: grid; gap: 13px; }
.auth-form[hidden] { display: none; }
.auth-code-row { display: grid; grid-template-columns: minmax(0, 1fr) 112px; align-items: end; gap: 8px; }
.login-card .auth-code-row button { min-height: 44px; padding: 0 10px; font-size: 11px; }
.login-card .auth-code-row button:disabled { cursor: not-allowed; opacity: .55; }
.login-error { padding: 10px; border-radius: 8px; color: #982f3b; background: #fff0f1; font-size: 11px; }
.login-error.success { color: #176b45; background: #eafaf2; }
.login-card .legal-consent { display: grid; grid-template-columns: 17px 1fr; align-items: start; gap: 8px; color: #6f7a8d; font-size: 11px; font-weight: 500; line-height: 1.6; }
.login-card .legal-consent input { width: 15px; min-height: 15px; margin: 3px 0 0; accent-color: var(--blue); }
.login-card .legal-consent label { display: inline; color: inherit; font: inherit; font-weight: inherit; }
.login-card .legal-consent button, .login-card .login-legal-links button { min-height: 0; padding: 0; border: 0; border-radius: 0; color: var(--blue); background: transparent; font: inherit; font-weight: 700; }
.login-card .legal-consent button:hover, .login-card .login-legal-links button:hover { text-decoration: underline; }
.login-consent-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.login-consent-row .legal-consent { min-width: 0; flex: 1; }
.login-card .forgot-password-button { min-height: 0; margin-top: 2px; padding: 0; flex: 0 0 auto; border: 0; border-radius: 0; color: #746fff; background: transparent; font-size: 11px; font-weight: 800; line-height: 1.6; }
.login-card .forgot-password-button:hover, .login-card .forgot-password-button:focus-visible { color: #a7a7ff; text-decoration: underline; outline: none; }
.login-legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 12px; }
.login-card .login-legal-links button { color: #69758a; font-size: 10px; font-weight: 600; }
.password-reset-modal { position: fixed; inset: 0; z-index: 4; display: grid; place-items: center; padding: 20px; overflow-y: auto; background: rgba(3,7,20,.72); backdrop-filter: blur(10px); }
.password-reset-modal[hidden] { display: none; }
.login-card.password-reset-dialog { width: min(440px, 100%); max-height: calc(100vh - 40px); margin: 0; padding-top: 42px; overflow-x: hidden; overflow-y: auto; }
.password-reset-dialog h2 { margin: 0; color: #fff; font-size: 26px; letter-spacing: -.035em; }
.password-reset-dialog > p { margin: -5px 0 2px; color: #9ca5bf; font-size: 12px; line-height: 1.7; }
.login-card.password-reset-dialog .password-reset-close { position: absolute; top: 15px; right: 15px; width: 34px; min-height: 34px; padding: 0; border: 1px solid rgba(164,174,215,.16); border-radius: 10px; color: #aeb7d0; background: rgba(255,255,255,.06); font-size: 21px; font-weight: 500; line-height: 1; box-shadow: none; }
.login-card.password-reset-dialog .password-reset-close:hover, .login-card.password-reset-dialog .password-reset-close:focus-visible { color: #fff; background: rgba(112,105,246,.20); outline: none; }

footer { width: min(1180px, calc(100% - 40px)); margin: -45px auto 0; padding-bottom: 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #8991a0; font-size: 12px; }
.app-shell footer { width: min(1240px, calc(100% - 56px)); margin: -44px auto 0; }
footer.legal-links-only { justify-content: center; }
footer.legal-links-only > span { display: none; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 14px; }
.legal-links button { padding: 0; border: 0; color: #6f7a8d; background: none; font: inherit; }
.legal-links button:hover { color: var(--blue); text-decoration: underline; }
#legalEntitySummary { text-align: right; }
#legalEntitySummary.is-pending { color: #b06b22; }
.legal-open { overflow: hidden; }
.legal-modal { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 24px; background: rgba(15, 23, 42, .56); backdrop-filter: blur(4px); }
.legal-modal[hidden] { display: none; }
.legal-dialog { width: min(780px, 100%); max-height: min(820px, calc(100vh - 48px)); display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; overflow: hidden; border: 1px solid #dfe6ef; border-radius: 18px; background: #fff; box-shadow: 0 28px 80px rgba(15,23,42,.24); }
.legal-dialog > header { padding: 22px 26px 18px; display: flex; align-items: start; justify-content: space-between; gap: 20px; border-bottom: 1px solid #e8edf4; }
.legal-dialog > header span { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.legal-dialog > header h2 { margin: 4px 0 0; color: #182133; font-size: 24px; }
.legal-dialog > header button { width: 34px; height: 34px; border: 0; border-radius: 9px; color: #5d6879; background: #f1f4f8; font-size: 22px; line-height: 1; }
.legal-profile-warning { margin: 16px 26px 0; padding: 11px 13px; border: 1px solid #f1d5a4; border-radius: 9px; color: #885414; background: #fff8e9; font-size: 11px; line-height: 1.6; }
.legal-document { padding: 22px 26px 28px; overflow-y: auto; color: #4b5669; font-size: 13px; line-height: 1.85; }
.legal-document .legal-lead { margin: 0 0 22px; padding: 16px 18px; border-radius: 10px; color: #334158; background: #f5f7fb; }
.legal-document section + section { margin-top: 24px; }
.legal-document h3 { margin: 0 0 8px; color: #1f2a3d; font-size: 15px; }
.legal-document p { margin: 0; }
.legal-document p + p { margin-top: 8px; }
.legal-document ul { margin: 0; padding-left: 20px; }
.legal-contact-card { padding: 6px 18px; border: 1px solid #e1e7f0; border-radius: 12px; background: #fafbfd; }
.legal-contact-card dl { margin: 0; }
.legal-contact-card dl > div { padding: 11px 0; display: grid; grid-template-columns: 110px 1fr; gap: 16px; border-bottom: 1px solid #e9edf3; }
.legal-contact-card dl > div:last-child { border-bottom: 0; }
.legal-contact-card dt { color: #7a8496; }
.legal-contact-card dd { margin: 0; color: #273247; font-weight: 650; overflow-wrap: anywhere; }
.legal-dialog > footer { width: auto; margin: 0; padding: 14px 26px; display: flex; flex-direction: row; align-items: center; justify-content: space-between; border-top: 1px solid #e8edf4; color: #7d8797; background: #fafbfd; }
.legal-dialog > footer button { min-height: 36px; padding: 0 18px; border: 0; border-radius: 8px; color: #fff; background: var(--blue); font-weight: 750; }
body.paid-confirm-open { overflow: hidden; }
.paid-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1900;
  padding: 16px;
  display: grid;
  place-items: center;
  background: rgba(13,21,49,.48);
  backdrop-filter: blur(6px);
}
.paid-confirm-modal[hidden] { display: none !important; }
.paid-confirm-dialog {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100vh - 32px);
  padding: 24px 28px 26px;
  overflow-y: auto;
  border: 1px solid rgba(224,228,242,.95);
  border-radius: 22px;
  color: #17213a;
  background: #fff;
  box-shadow: 0 24px 72px rgba(25,34,79,.24);
}
.paid-confirm-dialog::before { position: absolute; inset: 0 0 auto; height: 5px; content: ""; border-radius: 22px 22px 0 0; background: linear-gradient(90deg, #7658f7, #3488f5); }
.paid-confirm-close { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; color: #7d879c; background: #f2f4f8; font-size: 20px; line-height: 1; cursor: pointer; }
.paid-confirm-close:hover, .paid-confirm-close:focus-visible { color: #536078; background: #e8ebf2; outline: none; }
.paid-confirm-icon { width: 46px; height: 46px; margin: 0 auto 13px; display: grid; place-items: center; border: 7px solid #eeebff; border-radius: 50%; color: #fff; background: linear-gradient(145deg, #7658f7, #3488f5); box-sizing: content-box; }
.paid-confirm-icon svg { width: 25px; height: 25px; }
.paid-confirm-icon path { stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.paid-confirm-dialog > header { text-align: center; }
.paid-confirm-dialog > header h2 { margin: 0; color: #17213a; font-size: 22px; letter-spacing: -.035em; }
.paid-confirm-dialog > header p { margin: 6px 0 0; color: #8992aa; font-size: 11px; line-height: 1.55; }
.paid-confirm-rows { margin: 18px 0 0; padding: 5px 20px; border: 1px solid #e6e9f2; border-radius: 15px; background: #f7f8fc; }
.paid-confirm-rows > div { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 22px; border-bottom: 1px solid #e6e9f2; }
.paid-confirm-rows > div:last-child { border-bottom: 0; }
.paid-confirm-rows dt { color: #788198; font-size: 12px; }
.paid-confirm-rows dd { margin: 0; color: #202a43; font-size: 12px; font-weight: 800; text-align: right; }
.paid-confirm-voice { margin-top: 12px; padding: 13px 14px; display: grid; gap: 10px; border: 1px solid #dfe5f5; border-radius: 15px; background: #f8faff; }
.paid-confirm-voice[hidden], .paid-confirm-voice label[hidden] { display: none !important; }
.paid-confirm-voice label { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; color: #657089; font-size: 11px; font-weight: 750; }
.paid-confirm-voice select { min-height: 38px; padding: 0 10px; border: 1px solid #cfd8eb; border-radius: 9px; color: #202a43; background: #fff; font: inherit; font-weight: 800; }
.paid-confirm-voice div { display: grid; gap: 6px; }
.paid-confirm-voice strong { color: #37415a; font-size: 11px; }
.paid-confirm-voice p { max-height: 132px; margin: 0; padding: 10px 11px; overflow-y: auto; border-radius: 9px; color: #3f4b64; background: #fff; font-size: 11px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.paid-confirm-cost { min-height: 74px; margin-top: 12px; padding: 13px 20px; display: flex; align-items: center; justify-content: space-between; border: 1px solid #dedaff; border-radius: 15px; background: linear-gradient(135deg, #f2efff, #edf6ff); }
.paid-confirm-cost > span { color: #6f658f; font-size: 12px; }
.paid-confirm-cost strong { display: flex; align-items: baseline; gap: 5px; color: #6554e8; }
.paid-confirm-cost b { font-size: 30px; line-height: 1; letter-spacing: -.04em; }
.paid-confirm-cost small { color: #7b72a2; font-size: 11px; }
.paid-confirm-notices { margin-top: 12px; padding: 10px 14px; display: grid; gap: 6px; border-radius: 13px; background: #f5f8ff; }
.paid-confirm-notices:empty { display: none; }
.paid-confirm-notices p { position: relative; margin: 0; padding-left: 17px; color: #536078; font-size: 10px; line-height: 1.55; }
.paid-confirm-notices p::before { position: absolute; top: .48em; left: 0; width: 8px; height: 8px; content: ""; border-radius: 50%; background: #5f7cf3; }
.paid-confirm-notices p[data-tone="success"]::before { background: #25ba79; }
.paid-confirm-dialog > footer { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.paid-confirm-dialog > footer button { min-height: 46px; border: 1px solid #dfe4ed; border-radius: 12px; color: #536078; background: #f3f5f9; font-size: 12px; font-weight: 850; cursor: pointer; }
.paid-confirm-dialog > footer button:last-child { border-color: transparent; color: #fff; background: linear-gradient(135deg, #7658f7, #3488f5); box-shadow: 0 10px 24px rgba(86,92,235,.22); }
.paid-confirm-dialog > footer button:hover { transform: translateY(-1px); }
.paid-confirm-dialog > footer button:focus-visible { outline: 3px solid rgba(82,110,244,.22); outline-offset: 2px; }
.insufficient-credits-dialog { width: min(420px, 100%); padding-top: 30px; }
.insufficient-credits-icon { width: 44px; height: 44px; margin: 0 auto 15px; display: grid; place-items: center; border: 7px solid #fff0df; border-radius: 50%; color: #fff; background: linear-gradient(145deg, #ff9c45, #f1743f); box-sizing: content-box; font-size: 26px; font-weight: 900; }
.insufficient-credits-dialog > header h2 { max-width: 330px; margin-inline: auto; font-size: 18px; line-height: 1.65; letter-spacing: -.02em; }
.insufficient-credits-dialog > footer { grid-template-columns: 1fr; }
.insufficient-credits-dialog > footer button { border-color: transparent; color: #fff; background: linear-gradient(135deg, #7658f7, #3488f5); box-shadow: 0 10px 24px rgba(86,92,235,.22); }
.toast { position: fixed; right: 24px; bottom: 24px; padding: 11px 16px; border-radius: 9px; color: #fff; background: #1c2638; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 880px) {
  .sidebar { width: 72px; }
  .app-shell { margin-left: 72px; }
  .app-header { padding: 0 20px; }
  .shell-main { width: min(100% - 30px, 1240px); padding-top: 30px; }
  .quick-tools { grid-template-columns: 1fr; }
  .account-summary { grid-template-columns: 1fr 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-operation-metrics, .admin-operation-columns { grid-template-columns: 1fr; }
  .admin-reconciliation-actions { align-items: stretch; flex-direction: column; }
  .support-grid { grid-template-columns: 1fr; }
  .admin-support-controls { grid-template-columns: 1fr 1fr; }
  .admin-support-controls button { grid-column: 1 / -1; }
  .admin-user-card { grid-template-columns: 1fr; }
  .admin-user-actions { justify-content: start; }
  .history-card { grid-template-columns: 44px minmax(0, 1fr); }
  .history-actions { grid-column: 2; }
  .skill-card-grid { grid-template-columns: 1fr; }
  .skill-upload-grid.four-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .face-library-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
  .flow-map { overflow-x: auto; gap: 18px; }
  .upload-grid { grid-template-columns: 1fr; }
  .shot-card { grid-template-columns: 66px 1fr; }
  .confidence { grid-column: 2; }
  .shell-main.studio-mode { width: min(100% - 24px, 1040px); display: flex; flex-direction: column; gap: 8px; }
  .studio-mode #videoView, .studio-mode #workflowView { width: 100%; }
  .studio-mode #videoView { position: static; max-height: none; overflow: visible; }
  .studio-mode #workflowView { order: 1; }
  .studio-mode #videoView { order: 2; }
}
@media (max-width: 600px) {
  .paid-confirm-modal { padding: 10px; }
  .paid-confirm-dialog { max-height: calc(100vh - 20px); padding: 21px 18px 20px; border-radius: 18px; }
  .paid-confirm-dialog > header h2 { font-size: 20px; }
  .paid-confirm-rows { padding-inline: 15px; }
  .paid-confirm-cost { padding-inline: 15px; }
  .sidebar { position: fixed; inset: auto 0 0 0; width: auto; height: 66px; padding: 6px 14px; flex-direction: row; border-top: 1px solid #e8ebf0; border-right: 0; }
  .sidebar-logo, .sidebar .system-status { display: none; }
  .sidebar-nav { margin: 0; display: grid; grid-template-columns: repeat(7, minmax(50px, 1fr)); gap: 2px; overflow-x: auto; }
  .sidebar-account-group { min-width: 104px; display: grid; grid-template-columns: repeat(2, minmax(50px, 1fr)); gap: 1px 2px; }
  .sidebar-account-link { margin-top: 0; }
  .sidebar-account-group .sidebar-account-link, .sidebar-account-group .sidebar-history-link { min-height: 42px; }
  .sidebar-account-balance { grid-column: 1 / -1; padding: 0; gap: 0; }
  .sidebar-account-balance span { font-size: 8px; }
  .sidebar-account-balance strong { font-size: 10px; }
  .sidebar-link { min-height: 54px; flex-direction: column; gap: 3px; }
  .sidebar-link span { font-size: 16px; }
  .sidebar-link b { font-size: 8px; }
  .app-shell { margin-left: 0; padding-bottom: 66px; }
  .app-header { height: 62px; }
  .app-header .brand small { display: none; }
  .header-history-button { padding: 9px 11px; }
  .header-video-button { padding: 9px 11px; }
  .header-account-button { padding: 8px; }
  .header-logout-button { display: none; }
  .account-summary { grid-template-columns: 1fr 1fr; }
  .ledger-row { grid-template-columns: 1fr 80px; }
  .ledger-row > :nth-child(3), .ledger-row > :nth-child(4) { text-align: left; }
  .wechat-payment-row { grid-template-columns: 1fr 1fr; }
  .wechat-payment-user, .wechat-payment-order, .wechat-payment-transaction { grid-column: 1 / -1; }
  .admin-form { grid-template-columns: 1fr; }
  .pricing-rate-grid { grid-template-columns: 1fr; }
  .support-center .account-panel-head { flex-direction: column; }
  .admin-support-controls { grid-template-columns: 1fr; }
  .admin-support-controls button { grid-column: 1; }
  .admin-form > *, .permission-checks { grid-column: 1; }
  .home-intro { padding-top: 14px; }
  .home-command-card { grid-template-columns: 44px 1fr; padding: 15px; }
  .home-add-button { width: 42px; height: 42px; }
  .quick-tool-card { grid-template-columns: 48px 1fr; }
  .quick-tool-card i { display: none; }
  .quick-icon { width: 46px; height: 46px; }
  .home-steps { grid-template-columns: 1fr; }
  .history-heading { align-items: start; flex-direction: column; }
  .history-toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
  .history-filters { display: grid; grid-template-columns: repeat(3, 1fr); }
  .history-card { grid-template-columns: 38px minmax(0, 1fr); padding: 13px; }
  .history-type { width: 38px; height: 38px; }
  .history-actions { grid-column: 1 / 3; }
  .history-detail-modal { padding: 10px; }
  .history-detail-dialog { max-height: calc(100vh - 20px); border-radius: 14px; }
  .history-detail-dialog > header, .history-detail-body { padding: 16px; }
  .history-detail-meta { grid-template-columns: 1fr 1fr; }
  .history-detail-dialog > footer { padding: 12px 16px; }
  .skills-heading h1 { font-size: 29px; }
  .skill-workspace { padding: 17px; }
  .skill-workspace-head { align-items: start; flex-direction: column; gap: 12px; }
  .skill-upload-grid.two-columns, .skill-upload-grid.four-columns { grid-template-columns: 1fr; }
  .skill-upload { min-height: 112px; }
  .face-library-modal { padding: 10px; }
  .face-library-head { padding: 16px; }
  .face-library-toolbar { padding: 10px 16px; align-items: start; flex-direction: column; }
  .face-library-filter-groups { width: 100%; }
  .face-library-filter-row { align-items: flex-start; }
  .face-library-toolbar-actions { width: 100%; justify-content: space-between; }
  .face-library-grid { padding: 14px 16px 18px; }
  .face-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .face-library-folder { grid-template-columns: 44px minmax(0, 1fr); }
  .face-library-folder > b { display: none; }
  .page-heading { align-items: start; flex-direction: column; }
  .topbar { padding: 0 18px; }
  .system-status { max-width: 150px; text-align: right; }
  main { width: min(100% - 24px, 1180px); padding-top: 36px; }
  .workspace-card, .results { padding: 20px; border-radius: 16px; }
  .hero h1 { font-size: 34px; }
  .section-title, .results-head, .run-row { align-items: stretch; flex-direction: column; }
  .video-generation-head, .video-generation-action { align-items: stretch; flex-direction: column; }
  .video-settings-grid { grid-template-columns: 1fr 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .action-row { flex-wrap: wrap; }
  .shot-card { grid-template-columns: 1fr; }
  .confidence { grid-column: 1; }
  .script-row { grid-template-columns: 1fr; gap: 6px; }
  .video-settings-grid { grid-template-columns: 1fr; }
  .generator-assets { flex-direction: column; }
  .studio-mode .generator-assets { grid-template-columns: 1fr; }
  footer { width: calc(100% - 24px); flex-direction: column; gap: 8px; text-align: center; }
  #legalEntitySummary { text-align: center; }
  .legal-modal { padding: 10px; }
  .legal-dialog { max-height: calc(100vh - 20px); border-radius: 14px; }
  .legal-dialog > header { padding: 18px; }
  .legal-profile-warning { margin: 12px 18px 0; }
  .legal-document { padding: 18px; }
  .legal-contact-card dl > div { grid-template-columns: 1fr; gap: 3px; }
  .legal-dialog > footer { padding: 12px 18px; }
}

/* ========================================================================== */
/* 2.9 visual system — AI creation studio                                    */
/* ========================================================================== */
:root {
  --ink: #15182b;
  --muted: #727b91;
  --line: rgba(113, 124, 159, .16);
  --paper: rgba(255, 255, 255, .88);
  --wash: #f6f7fb;
  --navy: #0b1020;
  --blue: #5b5cf6;
  --teal: #00a9bc;
  --orange: #f07c3d;
  --red: #d94d67;
  --violet: #8b5cf6;
  --cyan: #14b8ff;
  --glow: 0 24px 70px rgba(63, 72, 130, .12);
  --shadow: 0 20px 60px rgba(44, 52, 97, .10);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 22% 4%, rgba(101, 91, 255, .09), transparent 27rem),
    radial-gradient(circle at 92% 26%, rgba(20, 184, 255, .08), transparent 25rem),
    linear-gradient(180deg, #f8f9fd 0%, #f3f5fa 100%);
  background-attachment: fixed;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: .24;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(66, 76, 119, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66, 76, 119, .045) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
}

button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease, color .2s ease; }
button:active:not(:disabled) { transform: scale(.98); }
input, select, textarea { color: var(--ink); }
::selection { color: #fff; background: rgba(91, 92, 246, .84); }

.sidebar {
  inset: 12px auto 12px 12px;
  width: 94px;
  padding: 15px 9px 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 25px;
  color: #fff;
  background:
    radial-gradient(circle at 50% 0, rgba(104, 97, 255, .28), transparent 15rem),
    linear-gradient(180deg, #10152a 0%, #090d1a 100%);
  box-shadow: 0 24px 60px rgba(9, 13, 30, .28), inset 0 1px rgba(255, 255, 255, .07);
}
.sidebar::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: "";
  pointer-events: none;
  background: linear-gradient(140deg, rgba(255,255,255,.07), transparent 22%, transparent 78%, rgba(80,180,255,.05));
}
.sidebar-logo {
  position: relative;
  isolation: isolate;
  width: 74px;
  height: 52px;
  overflow: hidden;
  border: 1px solid rgba(143, 165, 218, .20);
  border-radius: 17px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 50%, rgba(53, 148, 255, .16), transparent 46%),
    linear-gradient(145deg, rgba(20, 27, 51, .98), rgba(7, 11, 24, .98));
  box-shadow: 0 12px 26px rgba(3, 7, 20, .38), inset 0 1px rgba(255,255,255,.06);
}
.sidebar-logo::before {
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(255,255,255,.045);
  border-radius: 13px;
  content: "";
  pointer-events: none;
}
.sidebar-logo::after {
  position: absolute;
  width: 28px;
  height: 28px;
  left: 4px;
  top: 5px;
  border-radius: 50%;
  background: rgba(71, 139, 255, .18);
  content: "";
  filter: blur(9px);
  pointer-events: none;
}
.sidebar-logo-mark {
  position: relative;
  z-index: 1;
  width: 68px;
  height: 46px;
  display: grid;
  place-items: center;
}
.sidebar-logo-mark svg { width: 100%; height: 100%; overflow: visible; }
.sidebar-logo-wordmark-ai {
  font-family: "Microsoft YaHei", Inter, Arial, sans-serif;
  font-weight: 900;
  fill: #fff;
  font-size: 13px;
  letter-spacing: .2px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .40));
}
.sidebar-logo-fold {
  filter: drop-shadow(0 2px 5px rgba(30, 117, 255, .36));
}
.sidebar-logo-facet { stroke: rgba(255,255,255,.08); stroke-width: .5; stroke-linejoin: round; }
.sidebar-logo:hover {
  transform: translateY(-1px);
  border-color: rgba(114, 183, 255, .42);
  box-shadow: 0 16px 32px rgba(3, 7, 20, .46), 0 0 20px rgba(52, 125, 255, .12), inset 0 1px rgba(255,255,255,.09);
}
.sidebar-logo:focus-visible {
  outline: 2px solid rgba(154, 218, 255, .94);
  outline-offset: 3px;
}
.sidebar-nav { position: relative; z-index: 1; margin-top: 28px; gap: 7px; }
.sidebar-link {
  min-height: 62px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: #8f99b6;
}
.sidebar-link span { font-size: 20px; filter: grayscale(.2); }
.sidebar-link b { font-size: 10px; letter-spacing: .02em; }
.sidebar-link:hover {
  color: #e4e8ff;
  border-color: rgba(255,255,255,.08);
  background: rgba(255,255,255,.055);
}
.sidebar-link.active {
  color: #fff;
  border-color: rgba(156, 158, 255, .25);
  background: linear-gradient(135deg, rgba(111, 91, 255, .38), rgba(35, 127, 244, .24));
  box-shadow: 0 12px 28px rgba(38, 38, 110, .28), inset 0 1px rgba(255,255,255,.10);
}
.sidebar .system-status {
  position: relative;
  z-index: 1;
  color: #8e98b5;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 13px;
  background: rgba(255,255,255,.035);
}
.sidebar .status-dot { box-shadow: 0 0 0 5px rgba(31, 210, 164, .08), 0 0 14px rgba(31, 210, 164, .55); }

/* 3.0.20 focused creation-tool navigation */
.sidebar-feature-link {
  position: relative;
  background: rgba(7, 10, 24, .16);
  overflow: visible;
}
.sidebar-feature-link .sidebar-feature-icon {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  color: currentColor;
  font-size: 0;
  line-height: 0;
  filter: none;
}
.sidebar-feature-icon svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-feature-link:hover,
.sidebar-feature-link:focus-visible {
  color: #f0f2ff;
  border-color: rgba(255,255,255,.11);
  background: rgba(255,255,255,.075);
}
.sidebar-feature-link.active {
  color: #fff;
  border-color: rgba(177, 177, 255, .34);
  background: linear-gradient(135deg, #7458ff 0%, #3f67ee 58%, #2d8eea 100%);
  box-shadow: 0 12px 28px rgba(59, 54, 186, .36), inset 0 1px rgba(255,255,255,.22);
}
.sidebar-feature-link:focus-visible {
  outline: 2px solid rgba(177, 207, 255, .88);
  outline-offset: 2px;
}
.sidebar-feature-link .sidebar-tooltip {
  position: absolute;
  left: calc(100% + 18px);
  top: 50%;
  z-index: 40;
  width: max-content;
  min-width: 176px;
  padding: 12px 14px;
  display: grid;
  gap: 5px;
  border: 1px solid rgba(79, 88, 123, .12);
  border-radius: 13px;
  color: #1b2540;
  background: rgba(255,255,255,.98);
  box-shadow: 0 14px 34px rgba(17, 24, 52, .16);
  text-align: left;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(7px, -50%);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
  filter: none;
}
.sidebar-feature-link .sidebar-tooltip::before {
  position: absolute;
  left: -6px;
  top: 50%;
  width: 11px;
  height: 11px;
  border-left: 1px solid rgba(79, 88, 123, .12);
  border-bottom: 1px solid rgba(79, 88, 123, .12);
  background: #fff;
  content: "";
  transform: translateY(-50%) rotate(45deg);
}
.sidebar-feature-link .sidebar-tooltip strong,
.sidebar-feature-link .sidebar-tooltip small {
  position: relative;
  z-index: 1;
}
.sidebar-feature-link .sidebar-tooltip strong { font-size: 13px; line-height: 1.25; font-weight: 850; }
.sidebar-feature-link .sidebar-tooltip small { color: #727d94; font-size: 11px; line-height: 1.35; font-weight: 600; }
.sidebar-feature-link:hover .sidebar-tooltip,
.sidebar-feature-link:focus-visible .sidebar-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
}

.app-shell { margin-left: 118px; }
.app-header {
  position: sticky;
  top: 0;
  z-index: 18;
  height: 76px;
  padding: 0 38px 0 28px;
  border-bottom: 1px solid rgba(108, 119, 159, .12);
  background: rgba(248, 249, 253, .74);
  box-shadow: 0 12px 34px rgba(43, 51, 91, .035);
  backdrop-filter: blur(22px) saturate(150%);
}
.app-header .brand { display: grid; gap: 3px; }
.app-header .brand strong { font-size: 17px; letter-spacing: -.02em; }
.app-header .brand small { color: #9299ab; font-size: 10px; letter-spacing: .08em; }
.header-actions { gap: 8px; }
.header-history-button, .header-account-button, .header-logout-button {
  border-color: rgba(107, 119, 157, .15);
  border-radius: 12px;
  color: #535d76;
  background: rgba(255,255,255,.72);
  box-shadow: 0 4px 14px rgba(54,64,106,.04);
}
.header-history-button:hover, .header-account-button:hover, .header-logout-button:hover {
  color: var(--blue);
  border-color: rgba(91,92,246,.28);
  background: #fff;
}
.header-video-button {
  min-height: 42px;
  padding-inline: 19px;
  border-radius: 13px;
  background: linear-gradient(100deg, #6c54f6, #445dff 56%, #188ff2);
  box-shadow: 0 11px 26px rgba(79, 84, 239, .25), inset 0 1px rgba(255,255,255,.25);
}
.header-video-button:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(79,84,239,.34); }
.shell-main { width: min(1340px, calc(100% - 60px)); padding-top: 38px; }

.home-view { position: relative; }
.home-view::before, .home-view::after {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  content: "";
  filter: blur(10px);
}
.home-view::before { top: -70px; left: 15%; width: 330px; height: 220px; background: rgba(115,91,255,.10); }
.home-view::after { top: 100px; right: 8%; width: 260px; height: 260px; background: rgba(30,178,255,.08); }
.home-intro { padding: 18px 0 4px; }
.home-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  color: #6d68c7;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .18em;
}
.home-kicker i { width: 7px; height: 7px; border-radius: 50%; background: #7367ff; box-shadow: 0 0 0 5px rgba(115,103,255,.10), 0 0 16px #7367ff; }
.home-intro h1 { font-size: clamp(38px, 4vw, 56px); font-weight: 800; letter-spacing: -.06em; line-height: 1.08; }
.home-intro h1 span {
  color: transparent;
  background: linear-gradient(100deg, #7958ef 5%, #4c62fc 52%, #128edb 96%);
  background-clip: text;
  -webkit-background-clip: text;
}
.home-intro > p { margin: 10px auto 0 !important; color: #747d92 !important; font-size: 13px; }
.home-capabilities { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.home-capabilities span {
  padding: 6px 10px;
  border: 1px solid rgba(102,103,197,.13);
  border-radius: 999px;
  color: #686f86;
  background: rgba(255,255,255,.6);
  box-shadow: inset 0 1px rgba(255,255,255,.8);
  font-size: 10px;
  font-weight: 700;
}
.home-capabilities span::before { margin-right: 6px; color: #6860f6; content: "✦"; }
.home-command-card {
  position: relative;
  isolation: isolate;
  width: min(900px, 100%);
  min-height: 168px;
  margin: 25px auto 46px;
  padding: 22px 24px;
  border: 1px solid rgba(108, 99, 229, .18);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255,255,255,.94), rgba(248,248,255,.84));
  box-shadow: 0 30px 85px rgba(55, 59, 126, .14), inset 0 1px rgba(255,255,255,.92);
  backdrop-filter: blur(20px);
}
.home-command-card::before {
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  content: "";
  background: linear-gradient(115deg, rgba(123,88,255,.6), rgba(255,255,255,0) 34%, rgba(30,177,255,.48));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.home-command-card::after { position: absolute; right: 70px; bottom: -28px; z-index: -2; width: 70%; height: 55px; border-radius: 50%; content: ""; background: rgba(79,75,231,.18); filter: blur(30px); }
.home-add-button {
  width: 56px;
  height: 56px;
  border: 1px solid rgba(112,99,243,.15);
  border-radius: 18px;
  color: #5e5bea;
  background: linear-gradient(145deg, #f0ecff, #e6f4ff);
  box-shadow: inset 0 1px #fff, 0 9px 22px rgba(83,81,205,.12);
}
.home-command-card textarea { background: transparent; font-size: 16px; line-height: 1.65; }
.home-command-card > div { color: #737b91; }
.home-command-card > div button {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #7657f4, #3a68f6);
  box-shadow: 0 10px 22px rgba(78,78,229,.26);
}
.home-section-heading {
  width: min(1100px, 100%);
  margin: 0 auto 17px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}
.home-section-heading span { color: #7772cc; font-size: 9px; font-weight: 900; letter-spacing: .17em; }
.home-section-heading h2 { margin: 5px 0 0; font-size: 25px; letter-spacing: -.035em; }
.home-section-heading p { margin: 0; color: #9299aa; font-size: 11px; }
.quick-tools { width: min(1100px, 100%); grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.quick-tool-card {
  position: relative;
  min-height: 148px;
  overflow: hidden;
  padding: 25px;
  border: 1px solid rgba(108,120,160,.14);
  border-radius: 22px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 14px 40px rgba(41,49,91,.07), inset 0 1px rgba(255,255,255,.9);
  backdrop-filter: blur(14px);
}
.quick-tool-card::after {
  position: absolute;
  right: -35px;
  bottom: -55px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle, rgba(102,91,246,.12), transparent 70%);
}
.quick-tool-card:nth-child(2n)::after { background: radial-gradient(circle, rgba(20,184,255,.12), transparent 70%); }
.quick-tool-card:hover {
  transform: translateY(-5px);
  border-color: rgba(101,96,240,.30);
  background: rgba(255,255,255,.94);
  box-shadow: 0 24px 55px rgba(45,54,104,.13);
}
.quick-tool-card strong { font-size: 20px; letter-spacing: -.025em; }
.quick-tool-card small { color: #7e879a; }
.quick-tool-card i { z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid rgba(96,102,159,.13); border-radius: 50%; color: #6564dc; background: #fff; font-size: 0; }
.quick-tool-card i::before { content: "→"; font-size: 15px; }
.quick-icon { width: 58px; height: 58px; border-radius: 18px; box-shadow: 0 12px 26px rgba(46,64,137,.17), inset 0 1px rgba(255,255,255,.25); }
.quick-icon.blue { background: linear-gradient(135deg, #5162fa, #2e8cf5); }
.quick-icon.purple { background: linear-gradient(135deg, #8a55e9, #5b5cf6); }
.quick-icon.cyan { background: linear-gradient(135deg, #05a6bf, #27c7df); }
.quick-icon.orange { background: linear-gradient(135deg, #ee7144, #f3ae43); }
.quick-icon.green { background: linear-gradient(135deg, #10a986, #39c9a6); }
.home-steps { width: min(1100px, 100%); margin-top: 28px; gap: 14px; }
.home-steps article { position: relative; padding: 18px 20px 18px 54px; border: 1px solid rgba(109,119,155,.10); border-radius: 15px; background: rgba(255,255,255,.45); }
.home-steps article::before { position: absolute; left: 20px; top: 23px; width: 20px; height: 1px; content: ""; background: linear-gradient(90deg, #7366f4, #1ab7ef); }

.skills-heading, .page-heading { margin-bottom: 26px; }
.skills-heading h1, .page-heading h1 { color: #171a2d; font-weight: 800; letter-spacing: -.055em; }
.skills-heading > div > p:first-child, .page-heading > div > p:first-child { color: #706dd0; letter-spacing: .13em; }
.skill-workspace, .workspace-card, .results {
  border: 1px solid rgba(105,117,155,.14);
  border-radius: 24px;
  background: rgba(255,255,255,.80);
  box-shadow: var(--glow), inset 0 1px rgba(255,255,255,.92);
  backdrop-filter: blur(18px);
}
.skill-workspace { padding: 30px; }
.skill-workspace-head > button, .secondary-button {
  border-color: rgba(105,117,155,.17);
  border-radius: 11px;
  color: #5f6880;
  background: rgba(247,248,252,.88);
}
.skill-workspace-head > button:hover, .secondary-button:hover { color: #5657df; border-color: rgba(91,92,246,.28); background: #fff; }
.skill-upload, .upload-zone, .unified-material-upload {
  border-color: rgba(103,111,231,.28);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(106,91,246,.08), transparent 65%),
    linear-gradient(180deg, rgba(252,252,255,.96), rgba(246,248,253,.90));
}
.skill-upload:hover, .upload-zone:hover, .unified-material-upload:hover {
  transform: translateY(-2px);
  border-color: rgba(91,92,246,.55);
  background: linear-gradient(180deg, #fbfaff, #f1f5ff);
  box-shadow: 0 14px 34px rgba(67,73,149,.10);
}
.upload-icon, .unified-upload-icon {
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, #7d5bf4, #3b75f2);
  box-shadow: 0 9px 20px rgba(82,79,222,.23), inset 0 1px rgba(255,255,255,.28);
}
.unified-material-preview { gap: 12px; }
.material-card { border-color: rgba(103,114,151,.14); border-radius: 15px; background: rgba(255,255,255,.9); box-shadow: 0 9px 24px rgba(46,54,94,.07); }
.video-generation-card {
  border-color: rgba(93,101,213,.17);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(52,177,255,.08), transparent 30rem),
    linear-gradient(145deg, rgba(249,249,255,.96), rgba(245,250,252,.90));
  box-shadow: 0 18px 50px rgba(46,54,104,.08), inset 0 1px #fff;
}
.video-generation-head span, .field-label, .parameter-group > span { color: #727c93; font-weight: 800; }
.video-prompt-editor, .basic-video-settings, .visual-parameters {
  border-color: rgba(103,114,151,.14);
  border-radius: 15px;
  background: rgba(255,255,255,.67);
  box-shadow: inset 0 1px rgba(255,255,255,.9);
}
.choice-row { padding: 4px; border-radius: 11px; background: rgba(229,232,241,.72); }
.choice-row button { min-height: 38px; border-radius: 9px; }
.choice-row button:hover { color: #5557df; }
.choice-row button.active { color: #4f4bd4; background: #fff; box-shadow: 0 5px 15px rgba(45,51,93,.10), inset 0 0 0 1px rgba(91,92,246,.08); }
.primary-button, .generate-video-bar {
  border-radius: 13px;
  background: linear-gradient(100deg, #7655f4, #4d5ff7 54%, #2186ec);
  box-shadow: 0 13px 30px rgba(80,80,225,.25), inset 0 1px rgba(255,255,255,.28);
}
.primary-button:hover:not(:disabled), .generate-video-bar:hover:not(:disabled) {
  transform: translateY(-2px);
  background: linear-gradient(100deg, #6849ed, #4055ee 54%, #147ee4);
  box-shadow: 0 17px 38px rgba(80,80,225,.34), inset 0 1px rgba(255,255,255,.28);
}
.generate-video-bar { min-height: 54px; border-radius: 14px; }
.generate-video-bar strong { font-size: 15px; }
.video-task-panel {
  border-color: rgba(105,116,155,.14);
  border-radius: 17px;
  background: rgba(255,255,255,.80);
  box-shadow: 0 12px 30px rgba(43,52,93,.06);
}
.notice, .upload-state { border-radius: 12px; }
.history-card, .account-panel, .support-ticket-card, .admin-panel {
  border-color: rgba(105,117,155,.14);
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 12px 34px rgba(44,52,97,.06), inset 0 1px rgba(255,255,255,.9);
}

.login-overlay {
  overflow: hidden;
  background: rgba(7, 11, 27, .48);
  backdrop-filter: blur(6px);
}
.login-overlay::before {
  display: none;
  position: absolute;
  inset: 0;
  content: "";
  opacity: .35;
  background-image:
    linear-gradient(rgba(151,162,222,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(151,162,222,.09) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at center, #000, transparent 72%);
}
.login-overlay::after {
  display: none;
  position: absolute;
  top: 14%;
  left: 50%;
  width: 470px;
  height: 470px;
  border: 1px solid rgba(124,130,255,.16);
  border-radius: 50%;
  content: "";
  transform: translateX(-50%);
  box-shadow: 0 0 0 70px rgba(104,95,255,.025), 0 0 0 140px rgba(104,95,255,.018);
}
.login-card {
  position: relative;
  z-index: 1;
  width: min(400px, 100%);
  padding: 24px 26px;
  gap: 10px;
  border: 1px solid rgba(180,186,255,.18);
  border-radius: 22px;
  color: #f5f6ff;
  background: linear-gradient(145deg, rgba(29,34,65,.90), rgba(15,23,48,.88));
  box-shadow: 0 38px 110px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.10);
  backdrop-filter: blur(24px) saturate(130%);
}
.login-card::before {
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  content: "";
  background: linear-gradient(135deg, rgba(151,112,255,.75), transparent 34%, transparent 64%, rgba(38,185,255,.55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.login-brand-logo { width: 84px; height: 56px; border-radius: 17px; box-shadow: 0 16px 36px rgba(3,8,28,.46), 0 0 26px rgba(59,110,255,.13), inset 0 1px rgba(255,255,255,.11); }
.login-brand-logo svg { width: 78px; height: 51px; }
.login-kicker { margin-bottom: -7px; color: #9f9cff; font-size: 9px; font-weight: 900; letter-spacing: .18em; }
.login-card h1 { color: #fff; font-size: 25px; letter-spacing: -.045em; }
.login-card > p { color: #9ca5bf; }
.login-card label { color: #aab2ca; }
.login-card input {
  min-height: 42px;
  border: 1px solid rgba(164,174,215,.18);
  border-radius: 12px;
  color: #fff;
  background: rgba(6,10,26,.38);
  box-shadow: inset 0 1px 4px rgba(0,0,0,.15);
}
.login-card input::placeholder { color: #6f7894; }
.login-card input:focus { border-color: rgba(119,111,255,.72); box-shadow: 0 0 0 4px rgba(105,92,255,.12), 0 0 24px rgba(91,92,246,.10); }
.auth-form > button[type="submit"] {
  min-height: 44px;
  border-radius: 12px;
  background: linear-gradient(100deg, #8159f4, #5260f6 55%, #258eea);
  box-shadow: 0 14px 32px rgba(71,74,218,.30), inset 0 1px rgba(255,255,255,.24);
}
.auth-form > button[type="submit"]:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(71,74,218,.42); }
.login-card .auth-mode-switch { border-color: rgba(164,174,215,.14); background: rgba(6,10,26,.30); }
.login-card .auth-mode-switch button { color: #8f99b6; }
.login-card .auth-mode-switch button.active { color: #fff; background: linear-gradient(100deg, #8159f4, #5260f6 55%, #258eea); box-shadow: 0 8px 20px rgba(71,74,218,.28); }
.login-card .auth-code-row button { background: rgba(95,91,246,.72); }
.login-card .legal-consent { color: #929bb6; }
.login-card .legal-consent button, .login-card .login-legal-links button { color: #a7a7ff; }
.login-card .login-legal-links button { color: #808aa5; }

/* Keep authentication as a compact modal over the page guests were previewing. */
.login-overlay {
  place-items: center;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.login-card {
  max-height: calc(100vh - 32px);
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.password-field { position: relative; display: block; width: 100%; min-width: 0; }
.password-field > input { width: 100%; padding-right: 46px !important; box-sizing: border-box; }
.password-toggle,
.login-card .password-toggle,
.admin-form .password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 32px;
  min-height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #8e98b5;
  background: transparent;
  box-shadow: none;
  transform: translateY(-50%);
}
.password-toggle:hover,
.password-toggle:focus-visible,
.login-card .password-toggle:hover,
.login-card .password-toggle:focus-visible {
  color: #c8c9ff;
  background: rgba(112, 105, 246, .15);
  box-shadow: none;
}
.password-toggle:active:not(:disabled),
.login-card .password-toggle:active:not(:disabled) { transform: translateY(-50%) scale(.96); }
.password-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.admin-form .password-field { align-self: stretch; }
.admin-form .password-toggle { color: #738099; }
.admin-form .password-toggle:hover { color: var(--blue); background: rgba(91,92,246,.10); }

* { scrollbar-color: rgba(91,92,246,.32) transparent; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: rgba(91,92,246,.28); background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }

@keyframes studio-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .auth-code-row { grid-template-columns: 1fr; }
  .login-card .auth-code-row button { width: 100%; }
  .login-card { margin: 10px 0 16px; }
  .password-reset-dialog { margin: 0; }
  .login-consent-row { align-items: flex-end; }
}
.home-intro, .home-feature-tabs { animation: studio-rise .55s both; }
.home-feature-tabs { animation-delay: .07s; }
.home-feature-banner:not([hidden]) { animation: home-feature-enter .48s both; }
@keyframes home-feature-enter {
  from { opacity: 0; transform: translateX(22px) scale(.992); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@media (max-width: 900px) {
  .sidebar { inset: 0 auto 0 0; width: 82px; border-radius: 0 22px 22px 0; }
  .app-shell { margin-left: 82px; }
  .app-header { padding-inline: 20px; }
  .shell-main { width: min(100% - 34px, 1340px); }
  .home-intro h1 { font-size: clamp(36px, 7vw, 52px); }
}

@media (max-width: 600px) {
  .sidebar { inset: auto 8px 8px; width: auto; height: 68px; padding: 6px 8px; border: 1px solid rgba(255,255,255,.1); border-radius: 20px; }
  .sidebar-nav { margin: 0; grid-template-columns: repeat(7, minmax(52px, 1fr)); }
  .sidebar-link { min-height: 54px; border-radius: 13px; }
  .sidebar-account-group .sidebar-account-link, .sidebar-account-group .sidebar-history-link { min-height: 34px; padding-block: 2px; }
  .sidebar-feature-link .sidebar-tooltip { display: none; }
  .app-shell { margin-left: 0; padding-bottom: 78px; }
  .app-header { height: 64px; padding-inline: 14px; }
  .app-header .brand small { display: none; }
  .header-actions { gap: 5px; }
  .header-history-button, .header-video-button { padding: 9px 10px; }
  .shell-main { width: calc(100% - 24px); padding-top: 24px; }
  .home-intro { padding-top: 16px; }
  .home-intro h1 { font-size: 38px; }
  .home-command-card { grid-template-columns: 44px 1fr; padding: 16px; border-radius: 20px; }
  .home-add-button { width: 42px; height: 42px; border-radius: 14px; }
  .skill-workspace, .workspace-card, .results { padding: 18px; border-radius: 19px; }
  .login-card { padding: 28px 23px; border-radius: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .01ms !important; }
}

@media (max-width: 760px) {
  .free-creation-material-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .free-creation-heading { align-items: flex-start; }
  .free-creation-mode-switch button { padding-inline: 8px; }
  .free-creation-mode-switch button small { display: none; }
  .free-creation-script-intro, .free-creation-script-result header { align-items: stretch; flex-direction: column; }
  .free-creation-dialogue-mode { grid-template-columns: 1fr; }
  .free-creation-script-result header > div:last-child { width: 100%; }
  .free-creation-script-result button { flex: 1; }
}

/* 2.9.1 compact creation navigation */
.face-library-folder {
  min-height: 48px;
  padding: 7px 10px;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  border-radius: 12px;
}
.face-folder-icon {
  width: 29px;
  height: 22px;
  border-radius: 4px 5px 5px 5px;
}
.face-folder-icon::before {
  left: 2px;
  top: -4px;
  width: 13px;
  height: 6px;
  border-radius: 3px 3px 0 0;
}
.face-library-folder strong { font-size: 14px; }
.face-library-folder small { margin-top: 3px; color: #56627a; font-size: 12px; font-weight: 650; }
.face-library-folder b {
  padding: 6px 10px;
  border: 1px solid rgba(91, 92, 246, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  font-size: 11px;
}

.home-feature-tabs {
  width: min(1280px, 100%);
  margin: 18px auto 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.home-feature-tabs button {
  position: relative;
  min-width: 0;
  min-height: 68px;
  padding: 13px 18px 14px 50px;
  overflow: hidden;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 2px;
  border: 1px solid rgba(104, 100, 232, .13);
  border-radius: 18px;
  color: #707990;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 12px 30px rgba(48, 54, 98, .07), inset 0 1px rgba(255, 255, 255, .9);
  backdrop-filter: blur(16px);
  text-align: left;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.home-feature-tabs button:hover { color: #3f4761; background: rgba(242, 244, 255, .76); transform: translateY(-1px); }
.home-feature-tabs button:focus-visible { outline: 3px solid rgba(91, 92, 246, .25); outline-offset: 2px; }
.home-feature-tabs button > span {
  position: absolute;
  left: 16px;
  top: 18px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #6663df;
  background: #ececff;
  font-size: 10px;
  font-weight: 900;
}
.home-feature-tabs button > strong { font-size: 15px; line-height: 1.2; }
.home-feature-tabs button > small { overflow: hidden; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.home-feature-tabs button[aria-selected="true"] {
  color: #20263d;
  border-color: rgba(91, 92, 246, .2);
  background: linear-gradient(135deg, rgba(240, 238, 255, .96), rgba(233, 245, 255, .92));
  box-shadow: 0 14px 32px rgba(77, 80, 196, .14);
}
.home-feature-tabs button[aria-selected="true"] > span { color: #fff; background: linear-gradient(135deg, #7557f4, #2e82ef); }
.home-feature-hub { width: 100%; margin: 16px auto 0; }
.home-feature-heading {
  margin-bottom: 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}
.home-feature-heading > div > span { color: #6864e8; font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.home-feature-heading h2 { margin: 6px 0 0; color: #171a2d; font-size: 28px; letter-spacing: -.04em; }
.home-feature-heading > p { max-width: 420px; margin: 0 0 3px; color: #7b8499; font-size: 12px; line-height: 1.7; text-align: right; }
.home-feature-banners { display: grid; gap: 20px; }
.home-feature-banner[hidden] { display: none; }
.home-feature-banner {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(320px, .55fr) minmax(680px, 1.45fr);
  align-items: stretch;
  padding: 0;
  border: 1px solid rgba(91, 98, 151, .14);
  border-radius: 30px;
  color: #171a2d;
  background: rgba(255,255,255,.9);
  box-shadow: 0 24px 62px rgba(40,49,91,.12), inset 0 1px rgba(255,255,255,.9);
  text-align: left;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.home-feature-banner::before {
  position: absolute;
  left: 0;
  top: 30px;
  bottom: 30px;
  width: 4px;
  border-radius: 0 8px 8px 0;
  content: "";
  background: linear-gradient(#7d58f4, #3388f4);
}
.home-feature-banner:hover { transform: translateY(-4px); border-color: rgba(89,94,236,.3); box-shadow: 0 28px 66px rgba(40,49,91,.14); }
.home-feature-banner:focus-visible { outline: 3px solid rgba(91,92,246,.28); outline-offset: 4px; }
.home-feature-remix { background: linear-gradient(120deg, rgba(255,255,255,.97) 0 56%, rgba(239,235,255,.94) 56% 100%); }
.home-feature-repaint { background: linear-gradient(120deg, rgba(255,255,255,.97) 0 52%, rgba(241,237,255,.95) 52% 100%); }
.home-feature-repaint::before { background: linear-gradient(#8a55ec, #4d67ef); }
.home-feature-rebuild { background: linear-gradient(120deg, rgba(255,255,255,.97) 0 56%, rgba(226,239,255,.95) 56% 100%); }
.home-feature-rebuild::before { background: linear-gradient(#4f65f6, #1da3ec); }
.home-feature-sharp { background: linear-gradient(120deg, rgba(255,255,255,.97) 0 56%, rgba(222,247,244,.96) 56% 100%); }
.home-feature-sharp::before { background: linear-gradient(#13a991, #2d89e9); }
.home-feature-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: 28px 24px 28px 42px;
  display: grid;
  justify-items: start;
  gap: 10px;
}
.home-feature-copy > small { color: #6864e8; font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.home-feature-copy > strong { color: #171a2d; font-size: 36px; letter-spacing: -.055em; line-height: 1.08; }
.home-feature-lead { width: min(100%, 34em); max-width: 100%; color: #5f687e; font-size: 15px; line-height: 1.75; text-wrap: balance; }
.home-feature-lead br { display: block; }
.home-feature-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 3px; }
.home-feature-tags b {
  padding: 5px 9px;
  border: 1px solid rgba(102,96,232,.12);
  border-radius: 999px;
  color: #5c5ed3;
  background: rgba(244,243,255,.9);
  font-size: 11px;
  font-weight: 800;
}
.home-feature-repaint .home-feature-tags b { color: #7153d2; border-color: rgba(113,83,210,.14); background: rgba(245,241,255,.92); }
.home-feature-rebuild .home-feature-tags b { color: #3773d3; border-color: rgba(55,115,211,.13); background: rgba(237,245,255,.9); }
.home-feature-sharp .home-feature-tags b { color: #19887d; border-color: rgba(25,136,125,.13); background: rgba(235,250,247,.92); }
.home-feature-meta { display: grid; grid-template-columns: 40px minmax(0,1fr); align-items: start; gap: 8px; color: #626c81; font-size: 12px; line-height: 1.55; }
.home-feature-meta > b { color: #242a40; font-size: 11px; }
.home-feature-copy > i {
  margin-top: 5px;
  padding: 10px 15px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(100deg, #7655f4, #465ff4 58%, #278bea);
  box-shadow: 0 11px 24px rgba(79,80,224,.22);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}
.home-feature-sharp .home-feature-copy > i { background: linear-gradient(100deg, #16a38e, #287dcc); box-shadow: 0 11px 24px rgba(25,137,139,.22); }
.home-feature-repaint .home-feature-copy > i { background: linear-gradient(100deg, #8555ed, #4d63ec 62%, #387fe8); }
.home-feature-copy > i span { font-size: 16px; line-height: 1; transition: transform .2s ease; }
.home-feature-banner:hover .home-feature-copy > i span { transform: translateX(3px); }
.home-feature-art {
  position: relative;
  min-width: 0;
  min-height: 500px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  isolation: isolate;
}
.home-feature-art::before, .home-feature-art::after {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  content: "";
  filter: blur(3px);
}
.home-feature-art::before { top: 26px; right: 16px; width: 190px; height: 190px; background: rgba(255,255,255,.6); }
.home-feature-art::after { left: 12px; bottom: 12px; width: 130px; height: 130px; background: rgba(111,89,247,.1); }
.showcase-flow { z-index: 2; display: grid; justify-items: center; gap: 7px; color: #625ce3; }
.showcase-flow > b { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.85); border-radius: 50%; color: #fff; background: linear-gradient(135deg,#7a57f3,#3b75ef); box-shadow: 0 10px 24px rgba(73,71,205,.25); font-size: 16px; }
.showcase-flow > i { max-width: 82px; color: #566078; font-size: 10px; font-style: normal; font-weight: 850; line-height: 1.35; text-align: center; }
.home-feature-art-case { padding: 12px 18px; }
.showcase-case-card {
  position: relative;
  width: clamp(220px, 18vw, 260px);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  flex: 0 1 auto;
  border: 7px solid rgba(255,255,255,.96);
  border-radius: 24px;
  background: #171a2d;
  box-shadow: 0 22px 46px rgba(39,50,101,.24);
}
.showcase-case-card > small,
.operation-video-label {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 3;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 99px;
  color: #fff;
  background: rgba(18,22,40,.64);
  box-shadow: 0 4px 12px rgba(12,17,34,.14);
  font-size: 10px;
  font-weight: 900;
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.showcase-case-result { border-color: rgba(255,255,255,.98); box-shadow: 0 24px 52px rgba(91,69,210,.3), 0 0 0 1px rgba(105,91,240,.12); }
.home-case-video { width: 100%; height: 100%; display: block; object-fit: contain; background: #171a2d; transition: transform .35s ease; }
[data-case-video] { pointer-events: none; }
[data-case-video]::-webkit-media-controls,
[data-case-video]::-webkit-media-controls-enclosure,
[data-case-video]::-webkit-media-controls-start-playback-button { display: none !important; }
.home-feature-remix:hover .home-case-video, .home-feature-repaint:hover .home-case-video, .home-feature-sharp:hover .home-case-video { transform: scale(1.012); }
.showcase-video-frame {
  position: relative;
  width: 112px;
  height: 176px;
  overflow: hidden;
  border: 6px solid rgba(255,255,255,.92);
  border-radius: 20px;
  background: linear-gradient(180deg,#a9c7ee 0 45%,#dce8f7 45% 100%);
  box-shadow: 0 18px 38px rgba(58,72,136,.2);
}
.showcase-video-frame > small { position: absolute; left: 8px; top: 8px; z-index: 3; padding: 4px 7px; border-radius: 99px; color: #fff; background: rgba(22,27,49,.55); font-size: 8px; font-weight: 900; }
.showcase-video-frame::after { position: absolute; left: -15px; right: -15px; bottom: -25px; height: 88px; border-radius: 50% 50% 0 0; content: ""; background: #7696c7; }
.showcase-video-after { background: linear-gradient(180deg,#d7c0fb 0 45%,#fae6ef 45% 100%); }
.showcase-video-after::after { background: #9470d8; }
.showcase-person { position: absolute; left: 50%; top: 49px; z-index: 2; width: 50px; height: 79px; border-radius: 26px 26px 14px 14px; background: #405b91; transform: translateX(-50%); }
.showcase-person::before { position: absolute; left: 12px; top: -26px; width: 27px; height: 31px; border-radius: 50%; content: ""; background: #f2c3ad; box-shadow: inset 0 7px #303c63; }
.showcase-video-after .showcase-person { background: #7f4dd3; }
.showcase-video-after .showcase-person::before { background: #e7bb9f; box-shadow: inset 0 7px #5d357c; }
.showcase-item { position: absolute; right: 10px; bottom: 18px; z-index: 4; width: 25px; height: 38px; border-radius: 7px; background: linear-gradient(#4bc0d4,#3978dd); box-shadow: 0 5px 10px rgba(31,55,108,.2); }
.showcase-video-after .showcase-item { background: linear-gradient(#f59c77,#e6547b); }
.home-feature-art-rebuild { gap: 12px; padding: 14px 12px; }
.showcase-rebuild-source, .showcase-rebuild-output {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  border: 5px solid rgba(255,255,255,.94);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 17px 38px rgba(55,76,141,.2);
}
.showcase-rebuild-source { width: clamp(250px, 23vw, 310px); height: 198px; }
.showcase-rebuild-output { width: clamp(156px, 14vw, 184px); height: 276px; transform: rotate(1deg); }
.showcase-rebuild-source > small, .showcase-rebuild-output > small {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 99px;
  color: #fff;
  background: rgba(29,35,64,.68);
  box-shadow: 0 4px 12px rgba(20,28,55,.14);
  font-size: 9px;
  font-weight: 900;
  backdrop-filter: blur(6px);
}
.showcase-rebuild-source > img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; transition: transform .35s ease; }
.showcase-rebuild-output > img { width: 100%; height: auto; min-height: 100%; display: block; object-fit: cover; object-position: center top; transition: transform 10s linear; }
.home-feature-rebuild:hover .showcase-rebuild-source > img { transform: scale(1.025); }
.home-feature-rebuild:hover .showcase-rebuild-output > img { transform: translateY(calc(-100% + 276px)); }
.showcase-rebuild-output::after { position: absolute; inset: auto 0 0; height: 42px; content: ""; background: linear-gradient(transparent, rgba(255,255,255,.94)); pointer-events: none; }
.home-feature-art-sharp { gap: 13px; }
.home-feature-sharp .showcase-sharp-source .home-case-video { filter: blur(.55px) saturate(.88) contrast(.94); transform: scale(1.02); }
.home-feature-sharp:hover .showcase-sharp-source .home-case-video { transform: scale(1.035); }
.home-feature-sharp .showcase-case-result .home-case-video { filter: saturate(1.04) contrast(1.06); }
.home-feature-sharp .showcase-case-result { box-shadow: 0 18px 42px rgba(32,150,150,.28); }

@media (max-width: 980px) {
  .home-feature-banner { grid-template-columns: minmax(0,.72fr) minmax(450px,1.28fr); }
  .home-feature-copy { padding: 30px 20px 30px 30px; }
  .home-feature-art { transform: scale(.96); }
}

@media (max-width: 760px) {
  .home-feature-heading { align-items: start; flex-direction: column; gap: 7px; }
  .home-feature-heading > p { max-width: none; text-align: left; }
  .home-feature-banner { min-height: 0; grid-template-columns: 1fr; }
  .home-feature-art { min-height: 238px; transform: none; }
}

@media (max-width: 600px) {
  .face-library-folder { grid-template-columns: 29px minmax(0, 1fr) auto; }
  .face-library-folder > b { display: block; padding-inline: 8px; }
  .home-view::before { left: 5%; width: 75%; }
  .home-view::after { right: 0; width: 65%; }
  .home-feature-tabs { margin-top: 22px; gap: 6px; }
  .home-feature-tabs button { min-height: 58px; padding: 10px 6px 12px; justify-items: center; text-align: center; }
  .home-feature-tabs button > span, .home-feature-tabs button > small { display: none; }
  .home-feature-tabs button > strong { font-size: 13px; }
  .home-feature-tabs button::after { left: 9px; right: 9px; bottom: 4px; }
  .home-feature-hub { margin-top: 13px; }
  .home-feature-heading h2 { font-size: 24px; }
  .home-feature-banner { border-radius: 23px; }
  .home-feature-copy { padding: 27px 23px 25px 27px; }
  .home-feature-copy > strong { font-size: 30px; }
  .home-feature-lead { font-size: 14px; }
  .home-feature-lead br { display: none; }
  .home-feature-art { min-height: 220px; gap: 9px; }
  .home-feature-art-case { padding: 15px 10px; }
  .showcase-case-card { width: clamp(110px, 35vw, 126px); border-width: 5px; border-radius: 18px; }
  .showcase-video-frame { width: 92px; height: 150px; }
  .showcase-rebuild-source { width: 156px; height: 104px; }
  .showcase-rebuild-output { width: 106px; height: 166px; }
  .home-feature-rebuild:hover .showcase-rebuild-output > img { transform: none; }
  .showcase-flow > i { display: none; }
}

.shell-main.feature-workspace-mode {
  width: min(1680px, calc(100% - 32px));
  max-width: 1680px;
}
.feature-workspace-mode .skills-view,
.feature-workspace-mode .super-resolution-view { width: 100%; max-width: none; margin: 0; }
.super-resolution-view { max-width: 1240px; margin: 0 auto; }
.feature-operation-layout {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 62fr) minmax(300px, 38fr);
  align-items: start;
  gap: 18px;
}
.feature-operation-main { min-width: 0; }
.feature-case-panel {
  position: sticky;
  top: 84px;
  min-width: 0;
  max-height: calc(100vh - 104px);
  padding: 18px;
  overflow: auto;
  border: 1px solid rgba(101,111,159,.15);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(242,246,255,.92));
  box-shadow: 0 18px 44px rgba(43,53,99,.09), inset 0 1px #fff;
}
.feature-case-panel[hidden], .feature-case-panel > section[hidden] { display: none !important; }
.feature-case-heading { margin-bottom: 14px; }
.feature-case-heading > span { color: #6760e9; font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.feature-case-heading h3 { margin: 6px 0 5px; color: #222942; font-size: 20px; letter-spacing: -.035em; }
.feature-case-heading p { margin: 0; color: #758096; font-size: 11px; line-height: 1.65; }
.operation-video-pair { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.operation-video-pair figure, .operation-case-image { position: relative; min-width: 0; margin: 0; display: grid; gap: 7px; }
.operation-video-pair video {
  width: 100%;
  max-height: min(62vh, 560px);
  aspect-ratio: 9 / 16;
  display: block;
  object-fit: contain;
  border: 5px solid #fff;
  border-radius: 16px;
  background: #101625;
  box-shadow: 0 12px 30px rgba(34,45,91,.16);
}
.operation-video-pair figcaption, .operation-case-image figcaption { color: #59657d; font-size: 10px; font-weight: 850; text-align: center; }
.operation-case-image + .operation-case-image { margin-top: 12px; }
.operation-case-image img { width: 100%; height: auto; max-height: 34vh; display: block; object-fit: contain; object-position: center top; border: 5px solid #fff; border-radius: 14px; background: #f4f6fb; box-shadow: 0 11px 28px rgba(42,55,102,.13); }
.operation-case-script img { max-height: 42vh; }
.skill-operation-layout.case-hidden { grid-template-columns: minmax(0, 1fr); }
.workflow-case-panel { max-height: calc(100vh - 92px); }
.studio-mode .workflow-unified-results > .results-head { display: none; }
.super-resolution-heading {
  margin-bottom: 14px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}
.super-resolution-heading span { color: #625cf3; font-size: 10px; font-weight: 900; letter-spacing: .15em; }
.super-resolution-heading h1 { margin: 4px 0 0; font-size: 31px; letter-spacing: -.04em; }
.super-resolution-heading p { margin: 7px 0 0; color: #788399; font-size: 13px; }
.super-resolution-heading > button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #dce3f0;
  border-radius: 10px;
  color: #4c5870;
  background: #fff;
}
.super-resolution-card {
  padding: 18px;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(108, 116, 168, .16);
  border-radius: 20px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 18px 44px rgba(44, 52, 91, .08);
}
.super-resolution-upload {
  position: relative;
  min-height: 120px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1.5px dashed #bcc9e6;
  border-radius: 15px;
  color: #25314a;
  background: linear-gradient(135deg, #f9fbff, #f7f5ff);
  text-align: center;
  cursor: pointer;
}
.super-resolution-upload:hover { border-color: #716cff; background: #f6f5ff; }
.super-resolution-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.super-resolution-upload-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #7357ff, #2f8dff); font-size: 22px; }
.super-resolution-upload strong { margin-top: 4px; font-size: 15px; }
.super-resolution-upload small { color: #7b879a; font-size: 11px; }
.super-resolution-card > video { width: min(100%, 440px); max-height: 420px; margin: 0 auto; border-radius: 13px; background: #0e1424; }
.super-resolution-card > video[hidden] { display: none; }
.super-resolution-settings { padding: 13px; border: 1px solid #e1e6f0; border-radius: 13px; background: #fafbfe; }
.super-resolution-settings > div:first-child { margin-bottom: 9px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.super-resolution-settings > div:first-child span { color: #35415a; font-size: 12px; font-weight: 800; }
.super-resolution-settings > div:first-child small { color: #8a94a6; font-size: 10px; }
.super-resolution-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.super-resolution-options button { min-height: 58px; padding: 8px; display: grid; gap: 3px; border: 1px solid #dce2ed; border-radius: 10px; color: #3c4860; background: #fff; }
.super-resolution-options button.active { border-color: #7e80ff; color: #514fe3; background: linear-gradient(135deg, #f2f1ff, #edf6ff); box-shadow: 0 4px 14px rgba(83, 77, 219, .10); }
.super-resolution-options strong { font-size: 14px; }
.super-resolution-options small { color: #8992a4; font-size: 9px; }
.super-resolution-card .generate-video-bar { margin-top: 0; }
.super-resolution-card .video-task-panel { margin-top: 0; }

@media (max-width: 600px) {
  .sidebar-nav { grid-template-columns: repeat(8, minmax(52px, 1fr)); }
  .super-resolution-heading { align-items: start; }
  .super-resolution-heading h1 { font-size: 27px; }
  .super-resolution-heading p { max-width: 240px; }
  .super-resolution-card { padding: 12px; }
  .super-resolution-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .shell-main.feature-workspace-mode { width: calc(100% - 24px); }
  .feature-operation-layout { grid-template-columns: 1fr; }
  .feature-case-panel { position: static; top: auto; max-height: none; }
  .operation-video-pair video { max-height: 520px; }
  .workflow-action-line { grid-template-columns: 1fr; }
  .workflow-generate-action-slot .primary-button { min-height: 54px; }
}

@media (max-width: 520px) {
  .feature-case-panel { padding: 13px; border-radius: 16px; }
  .operation-video-pair { gap: 7px; }
  .operation-video-pair video { border-width: 3px; border-radius: 13px; }
  .feature-case-heading h3 { font-size: 18px; }
}

.workflow-options-grid {
  margin-top: 6px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

/* Recharge center */
.recharge-view { padding-bottom: 34px; }
.recharge-hero { position: relative; min-height: 230px; padding: 38px 42px; display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: center; gap: 34px; overflow: hidden; border: 1px solid rgba(118, 104, 255, .26); border-radius: 28px; color: #fff; background: radial-gradient(circle at 82% 20%, rgba(70, 170, 255, .34), transparent 30%), linear-gradient(135deg, #15183f 0%, #32206f 55%, #1766aa 130%); box-shadow: 0 25px 65px rgba(31, 37, 91, .17); }
.recharge-hero::after { content: ""; position: absolute; width: 330px; height: 330px; right: -120px; bottom: -240px; border: 52px solid rgba(255,255,255,.06); border-radius: 50%; }
.recharge-hero-copy, .recharge-balance-card { position: relative; z-index: 1; }
.recharge-hero-copy > span, .recharge-heading span { color: #aeb7ff; font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.recharge-hero h1 { margin: 12px 0 10px; font-size: clamp(32px, 4vw, 52px); letter-spacing: -.04em; }
.recharge-hero p { max-width: 600px; margin: 0; color: rgba(239, 242, 255, .75); font-size: 14px; line-height: 1.8; }
.recharge-balance-card { min-height: 146px; padding: 24px; display: grid; align-content: center; gap: 6px; border: 1px solid rgba(255,255,255,.16); border-radius: 21px; background: rgba(255,255,255,.10); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); backdrop-filter: blur(14px); }
.recharge-balance-card small { color: rgba(238,241,255,.68); font-size: 11px; }
.recharge-balance-card strong { font-size: 38px; letter-spacing: -.03em; }
.recharge-balance-card span { overflow: hidden; color: #d9defe; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.usage-calculator { margin-top: 20px; padding: 24px; border: 1px solid #dfe4ef; border-radius: 22px; background: rgba(255,255,255,.92); box-shadow: 0 12px 36px rgba(36,45,74,.07); }
.usage-calculator-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.usage-calculator-head span { color: #655eef; font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.usage-calculator-head h2 { margin: 6px 0 5px; font-size: 24px; }
.usage-calculator-head p, .usage-calculator-head > small { margin: 0; color: #8993a6; font-size: 10px; line-height: 1.65; }
.usage-calculator-head > small { max-width: 360px; text-align: right; }
.usage-calculator-body { margin-top: 19px; display: grid; gap: 15px; }
.usage-calculator-fields { display: grid; grid-template-columns: 1.45fr 1fr 1.2fr .8fr .8fr; gap: 10px; }
.usage-calculator-fields.resolution-hidden { grid-template-columns: 1.45fr 1.2fr .8fr .8fr; }
.usage-calculator-fields label { min-width: 0; display: grid; gap: 7px; }
.usage-calculator-fields label[hidden] { display: none !important; }
.usage-calculator-fields label > span { color: #687388; font-size: 10px; font-weight: 800; }
.usage-calculator-fields select, .usage-calculator-fields input { width: 100%; min-height: 43px; border: 1px solid #dce1ec; border-radius: 11px; color: #28324c; background: #f9faff; font: inherit; font-size: 11px; outline: none; }
.usage-calculator-fields select { padding: 0 34px 0 12px; }
.usage-calculator-fields input { padding: 0 42px 0 12px; }
.usage-calculator-fields select:focus, .usage-calculator-fields input:focus { border-color: #756cf4; box-shadow: 0 0 0 3px rgba(117,108,244,.11); }
.usage-number-input { position: relative; }
.usage-number-input b { position: absolute; top: 50%; right: 12px; color: #8b94a6; font-size: 10px; transform: translateY(-50%); pointer-events: none; }
.usage-calculator-results { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.usage-calculator-results article { min-width: 0; padding: 14px 16px; display: grid; gap: 5px; border-radius: 13px; background: #f4f6fb; }
.usage-calculator-results article > span { color: #8490a4; font-size: 9px; }
.usage-calculator-results strong { overflow: hidden; color: #2b3550; text-overflow: ellipsis; white-space: nowrap; }
.usage-calculator-results strong b { font-size: 20px; }
.usage-calculator-results strong small { color: #7b8598; font-size: 9px; }
.usage-calculator-results .usage-total-result { background: linear-gradient(135deg, #efedff, #edf7ff); }
.usage-total-result strong b { color: #5d55e8; }
.usage-recommendation { padding: 17px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; border: 1px solid rgba(102,91,236,.18); border-radius: 15px; background: linear-gradient(135deg, rgba(241,239,255,.86), rgba(237,248,255,.9)); }
.usage-recommendation > div { display: grid; gap: 4px; }
.usage-recommendation span { color: #776ff0; font-size: 9px; font-weight: 900; }
.usage-recommendation strong { color: #26304a; font-size: 20px; }
.usage-recommendation p { margin: 0; color: #768196; font-size: 10px; line-height: 1.6; }
.usage-recommendation button { min-height: 42px; padding: 0 18px; border: 0; border-radius: 11px; color: #fff; background: linear-gradient(135deg, #7357ff, #2f8dff); font-size: 11px; font-weight: 900; cursor: pointer; }
.usage-recommendation button:disabled { color: #8c94a2; background: #e3e6ec; cursor: default; }
.recharge-heading { margin: 32px 2px 17px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.recharge-heading span { color: #655eef; }
.recharge-heading h2 { margin: 6px 0 0; font-size: 25px; }
.recharge-heading p { margin: 0; color: #7f899c; font-size: 11px; }
.recharge-plans { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.recharge-plan { position: relative; min-width: 0; min-height: 560px; padding: 22px 15px 15px; display: flex; flex-direction: column; align-items: stretch; gap: 10px; overflow: hidden; border: 1px solid #e1e5ef; border-radius: 19px; color: #202941; background: #fff; text-align: left; box-shadow: 0 8px 25px rgba(36, 45, 74, .06); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.recharge-plan:hover { border-color: #9b97ff; box-shadow: 0 15px 34px rgba(75, 70, 185, .13); transform: translateY(-3px); }
.recharge-plan.selected { border-color: #685ff6; box-shadow: 0 0 0 2px rgba(104,95,246,.10), 0 18px 40px rgba(75,70,185,.15); }
.recharge-plan.recommended { color: #fff; border-color: transparent; background: radial-gradient(circle at 100% 0, rgba(62,164,255,.38), transparent 34%), linear-gradient(150deg, #262360, #5540d6 70%, #326ee9); }
.recharge-plan.usage-match { box-shadow: 0 0 0 2px rgba(47,141,255,.16), 0 18px 40px rgba(55,106,193,.15); }
.recharge-plan-ribbon { position: absolute; top: 0; right: 0; padding: 7px 11px; border-radius: 0 18px 0 14px; color: #3e2a00; background: linear-gradient(135deg, #ffeaa4, #ffbd50); font-size: 9px; font-style: normal; font-weight: 900; }
.recharge-usage-match { align-self: start; margin: -8px 0 0; padding: 4px 8px; border-radius: 999px; color: #0f64a5; background: #e4f4ff; font-size: 8px; font-weight: 900; }
.recharge-plan.recommended .recharge-usage-match { color: #e9f6ff; background: rgba(122,207,255,.18); }
.recharge-plan-label { color: #7a8498; font-size: 12px; font-weight: 800; }
.recharge-plan.recommended .recharge-plan-label { color: #cfceff; }
.recharge-plan > strong { font-size: 34px; letter-spacing: -.04em; }
.recharge-plan > strong small { margin-right: 3px; font-size: 17px; }
.recharge-plan-rate { align-self: start; padding: 5px 9px; border-radius: 999px; color: #66500b; background: #fff4ce; font-size: 11px; font-weight: 900; }
.recharge-plan-rate.no-bonus { color: #687388; background: #eef1f6; }
.recharge-plan.recommended .recharge-plan-rate { color: #fff1b8; background: rgba(255,226,119,.14); }
.recharge-plan > div { margin-top: 2px; display: grid; gap: 2px; }
.recharge-plan > div b { color: #635cf2; font-size: 24px; }
.recharge-plan.recommended > div b { color: #fff; }
.recharge-plan > div small, .recharge-plan > p { color: #929bad; font-size: 11px; }
.recharge-plan.recommended > div small, .recharge-plan.recommended > p { color: #c8c8ef; }
.recharge-plan > p { margin: 0; }
.recharge-plan > .recharge-plan-exchange { margin: 0; padding: 9px 10px; display: grid; gap: 3px; border-radius: 9px; background: #f5f6fb; }
.recharge-plan > .recharge-plan-exchange span, .recharge-plan > .recharge-plan-exchange b { color: #6f788a; font-size: 11px; font-weight: 700; line-height: 1.45; }
.recharge-plan > .recharge-plan-exchange b { color: #4f49c8; }
.recharge-plan.recommended > .recharge-plan-exchange { background: rgba(255,255,255,.10); }
.recharge-plan.recommended > .recharge-plan-exchange span, .recharge-plan.recommended > .recharge-plan-exchange b { color: #ecebff; }
.recharge-cost-reference { min-width: 0; padding: 9px; display: grid; gap: 7px; border: 1px solid #e5e8f1; border-radius: 10px; background: #fbfbfd; }
.recharge-cost-reference > strong { color: #4e586d; font-size: 11px; }
.recharge-cost-model { min-width: 0; display: grid; gap: 2px; }
.recharge-cost-model b { overflow-wrap: anywhere; color: #313b52; font-size: 11px; }
.recharge-cost-model span { overflow-wrap: anywhere; color: #7f8899; font-size: 10px; line-height: 1.5; }
.recharge-plan.recommended .recharge-cost-reference { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.08); }
.recharge-plan.recommended .recharge-cost-reference > strong, .recharge-plan.recommended .recharge-cost-model b { color: #fff; }
.recharge-plan.recommended .recharge-cost-model span { color: #d8d9fa; }
.recharge-plan > i { margin-top: auto; min-height: 36px; display: grid; place-items: center; border: 1px solid #dee3ed; border-radius: 10px; color: #687388; background: #f7f8fb; font-size: 11px; font-style: normal; font-weight: 800; }
.recharge-plan.selected > i { color: #fff; border-color: transparent; background: linear-gradient(135deg, #7357ff, #2f8dff); }
.recharge-checkout { margin-top: 18px; padding: 21px 24px; display: grid; grid-template-columns: 1fr minmax(300px, 440px); align-items: center; gap: 24px; border: 1px solid #e0e5ef; border-radius: 19px; background: #fff; box-shadow: 0 10px 30px rgba(36,45,74,.05); }
.recharge-selection { display: grid; gap: 4px; }
.recharge-selection > span { color: #8993a6; font-size: 10px; font-weight: 800; }
.recharge-selection > strong { color: #2a3350; font-size: 28px; }
.recharge-selection > small { color: #7b8597; font-size: 11px; }
.recharge-selection b { color: #5f57e8; }
.recharge-payment { display: grid; gap: 7px; }
.recharge-payment button { min-height: 48px; border: 0; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #16b86c, #09a75d); box-shadow: 0 11px 24px rgba(9,167,93,.20); font-size: 13px; font-weight: 900; cursor: pointer; }
.recharge-payment button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(9,167,93,.28); }
.recharge-payment button:disabled { color: #8a91a0; background: #e7e9ee; box-shadow: none; cursor: not-allowed; }
.recharge-payment p { margin: 0; color: #929aaa; font-size: 9px; line-height: 1.6; text-align: center; }
.recharge-ledger-panel { margin-top: 18px; }
.account-balance-summary button { margin-top: 8px; align-self: start; border: 0; color: #625bea; background: transparent; font-size: 9px; font-weight: 800; cursor: pointer; }
.recharge-payment-modal { position: fixed; inset: 0; z-index: 180; padding: 22px; display: grid; place-items: center; background: rgba(8,13,28,.58); backdrop-filter: blur(12px); }
.recharge-payment-modal[hidden] { display: none; }
.recharge-payment-dialog { width: min(720px, 100%); overflow: hidden; border: 1px solid rgba(255,255,255,.70); border-radius: 25px; background: #fff; box-shadow: 0 32px 100px rgba(8,13,35,.30); }
.recharge-payment-dialog > header { padding: 21px 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #edf0f5; }
.recharge-payment-dialog > header div { display: grid; gap: 3px; }
.recharge-payment-dialog > header span { color: #09a75d; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.recharge-payment-dialog > header h2 { margin: 0; color: #20283e; font-size: 21px; }
.recharge-payment-dialog > header button { width: 36px; height: 36px; border: 1px solid #e1e5ec; border-radius: 10px; color: #6f788b; background: #f8f9fb; font-size: 22px; cursor: pointer; }
.recharge-payment-body { padding: 28px; display: grid; grid-template-columns: 302px minmax(0, 1fr); align-items: center; gap: 30px; }
.recharge-qr-shell { width: 302px; aspect-ratio: 1; padding: 1px; display: grid; place-items: center; overflow: hidden; border: 1px solid #e1e6ee; border-radius: 20px; background: #fff; box-shadow: 0 13px 35px rgba(32,42,70,.10); }
.recharge-qr-shell img { width: 300px; height: 300px; display: block; object-fit: contain; }
.recharge-qr-shell div { max-width: 240px; color: #7b8496; font-size: 12px; font-weight: 700; line-height: 1.65; text-align: center; }
.recharge-qr-shell div:not([hidden]) { display: grid; place-items: center; }
.recharge-payment-summary { min-width: 0; display: grid; gap: 9px; }
.recharge-payment-summary > span { justify-self: start; padding: 7px 11px; border-radius: 999px; font-size: 11px; font-weight: 900; }
.recharge-payment-summary > span.pending { color: #8b6500; background: #fff2c5; }
.recharge-payment-summary > span.paid { color: #067947; background: #dff8ec; }
.recharge-payment-summary > span.closed { color: #687386; background: #eef1f5; }
.recharge-payment-summary > span.failed { color: #ba2945; background: #ffebef; }
.recharge-payment-summary > strong { margin-top: 5px; color: #171e31; font-size: 39px; letter-spacing: -.04em; }
.recharge-payment-summary > p { margin: 0; color: #4c45cb; font-size: 15px; font-weight: 900; }
.recharge-payment-summary > small { overflow-wrap: anywhere; color: #8b94a5; font-size: 10px; line-height: 1.55; }
.recharge-payment-summary > em { color: #6d7688; font-size: 11px; font-style: normal; }
.recharge-payment-dialog > footer { padding: 17px 24px 21px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid #edf0f5; background: #fafbfc; }
.recharge-payment-dialog > footer p { margin: 0; color: #7b8495; font-size: 10px; line-height: 1.6; }
.recharge-payment-dialog > footer button { flex: 0 0 auto; min-height: 39px; padding: 0 16px; border: 1px solid #dfe4ed; border-radius: 10px; color: #536078; background: #fff; font-size: 11px; font-weight: 850; cursor: pointer; }
.recharge-payment-dialog > footer button:disabled { color: #a1a8b5; cursor: not-allowed; }

@media (max-width: 1100px) {
  .usage-calculator-fields, .usage-calculator-fields.resolution-hidden { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .recharge-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .recharge-hero { padding: 26px; grid-template-columns: 1fr; }
  .recharge-balance-card { min-height: 112px; }
  .recharge-heading { align-items: start; flex-direction: column; gap: 5px; }
  .usage-calculator { padding: 20px; }
  .usage-calculator-head { align-items: start; flex-direction: column; gap: 6px; }
  .usage-calculator-head > small { text-align: left; }
  .usage-calculator-fields, .usage-calculator-fields.resolution-hidden { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .usage-calculator-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .usage-recommendation { grid-template-columns: 1fr; }
  .recharge-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recharge-checkout { grid-template-columns: 1fr; }
  .recharge-payment-modal { padding: 10px; }
  .recharge-payment-body { grid-template-columns: 1fr; justify-items: center; gap: 20px; }
  .recharge-payment-summary { width: min(302px, 100%); text-align: center; }
  .recharge-payment-summary > span { justify-self: center; }
  .recharge-payment-dialog > footer { align-items: stretch; flex-direction: column; }
}

@media (max-width: 480px) {
  .recharge-hero { padding: 23px 20px; border-radius: 22px; }
  .usage-calculator { padding: 18px; }
  .usage-calculator-fields, .usage-calculator-fields.resolution-hidden { grid-template-columns: 1fr; }
  .recharge-plans { grid-template-columns: 1fr; }
  .recharge-plan { min-height: 0; }
  .recharge-checkout { padding: 18px; }
  .recharge-payment-dialog > header { padding: 17px 18px; }
  .recharge-payment-body { padding: 20px 16px; }
  .recharge-qr-shell { width: min(270px, 100%); }
  .recharge-qr-shell img { width: 100%; height: auto; }
  .recharge-payment-dialog > footer { padding: 15px 18px 18px; }
}
.workflow-option-card {
  min-width: 0;
  margin: 0;
  padding: 6px;
  border: 1px solid rgba(105, 117, 155, .14);
  border-radius: 15px;
  background: rgba(248, 249, 253, .78);
}
.workflow-option-card legend {
  padding: 0 5px;
  color: #69728a;
  font-size: 10px;
  font-weight: 900;
}
.workflow-option-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.workflow-option-choices label { position: relative; min-width: 0; cursor: pointer; }
.workflow-option-choices input { position: absolute; opacity: 0; pointer-events: none; }
.workflow-option-choices span {
  min-height: 42px;
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  border: 1px solid rgba(105, 117, 155, .13);
  border-radius: 11px;
  color: #596278;
  background: rgba(255,255,255,.74);
  transition: .18s ease;
}
.workflow-option-choices b { font-size: 11px; }
.workflow-option-choices small { overflow: hidden; color: #8a92a5; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.workflow-option-choices label:hover span { border-color: rgba(91,92,246,.30); background: #fff; }
.workflow-option-choices input:checked + span {
  color: #5150d5;
  border-color: rgba(91,92,246,.38);
  background: linear-gradient(135deg, rgba(239,236,255,.94), rgba(235,247,255,.9));
  box-shadow: inset 0 0 0 1px rgba(91,92,246,.06), 0 6px 16px rgba(75,79,173,.08);
}
.workflow-option-choices input:checked + span::before { margin-right: 4px; color: #625cf2; content: "✓ 已选择"; font-size: 8px; font-weight: 900; }
.workflow-notes-card textarea { width: 100%; min-height: 86px; padding: 10px 12px; resize: vertical; border: 1px solid rgba(105,117,155,.18); border-radius: 10px; color: var(--ink); background: #fff; outline: none; line-height: 1.55; }
.workflow-notes-card textarea:focus { border-color: #789aff; box-shadow: 0 0 0 3px rgba(29,94,255,.08); }
.workflow-notes-card > small { display: block; margin: 5px 3px 0; color: #8a92a5; font-size: 9px; }
.workflow-product-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.workflow-product-fields label { min-width: 0; display: grid; gap: 4px; color: #5f6880; font-size: 10px; font-weight: 800; }
.workflow-product-fields textarea { min-height: 68px; }
.workflow-product-fields .workflow-product-notes-wide { grid-column: 1 / -1; }

@media (max-width: 760px) {
  .face-material-entry-grid, .fashion-material-entry-grid, .workflow-material-entry-grid { grid-template-columns: 1fr; }
  .workflow-options-grid { grid-template-columns: 1fr; }
  .workflow-product-fields { grid-template-columns: 1fr; }
  .workflow-product-fields .workflow-product-notes-wide { grid-column: auto; }
}

/* Embedded visual tutorials */
.feature-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.feature-heading-actions #closeSkillWorkspace {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(105,117,155,.17);
  border-radius: 12px;
  color: #5f6880;
  background: rgba(247,248,252,.88);
  font-size: 11px;
  font-weight: 800;
}
.feature-heading-actions #closeSkillWorkspace:hover { color: #5657df; border-color: rgba(91,92,246,.28); background: #fff; }
.tutorial-open-button {
  min-height: 46px;
  padding: 7px 16px;
  display: grid;
  align-content: center;
  gap: 2px;
  border: 1px solid rgba(91,92,246,.28);
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #7252f5, #2688ed);
  box-shadow: 0 9px 22px rgba(64,89,220,.18);
  text-align: left;
}
.tutorial-open-button span { color: inherit; font-size: 13px; font-weight: 900; }
.tutorial-open-button small { color: rgba(255,255,255,.76); font-size: 9px; font-weight: 700; }
.tutorial-open-button:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(64,89,220,.24); }
.tutorial-open-button[hidden] { display: none !important; }
body.tutorial-open { overflow: hidden; }
.tutorial-overlay[hidden] { display: none !important; }
.tutorial-overlay {
  position: fixed;
  z-index: 1500;
  inset: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(17,22,45,.68);
  backdrop-filter: blur(8px);
}
.tutorial-dialog {
  width: min(1180px, 96vw);
  max-height: min(900px, 94vh);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 26px;
  background: #f7f8fc;
  box-shadow: 0 35px 100px rgba(9,14,37,.34);
}
.tutorial-dialog-head {
  min-height: 104px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(105,117,155,.12);
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(239,242,255,.95));
}
.tutorial-dialog-head > div > span { color: #655eef; font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.tutorial-dialog-head h2 { margin: 5px 0 4px; color: #171a2d; font-size: 25px; letter-spacing: -.035em; }
.tutorial-dialog-head p { margin: 0; color: #727b90; font-size: 12px; }
.tutorial-dialog-head > button {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(105,117,155,.15);
  border-radius: 13px;
  color: #5f6880;
  background: #fff;
  font-size: 25px;
  line-height: 1;
}
.tutorial-dialog-body { height: min(720px, calc(94vh - 104px)); display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.tutorial-step-list {
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  border-right: 1px solid rgba(105,117,155,.12);
  background: rgba(241,243,250,.82);
}
.tutorial-step-button {
  width: 100%;
  min-height: 64px;
  padding: 10px 11px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #555f76;
  background: transparent;
  text-align: left;
}
.tutorial-step-button > b { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: #727a90; background: #fff; font-size: 11px; box-shadow: 0 4px 12px rgba(47,55,90,.06); }
.tutorial-step-button span { display: grid; gap: 3px; }
.tutorial-step-button strong { color: inherit; font-size: 12px; }
.tutorial-step-button small { color: #9299aa; font-size: 9px; }
.tutorial-step-button:hover { border-color: rgba(91,92,246,.15); background: rgba(255,255,255,.72); }
.tutorial-step-button.active { color: #4f4fd8; border-color: rgba(91,92,246,.25); background: #fff; box-shadow: 0 9px 24px rgba(55,64,125,.08); }
.tutorial-step-button.active > b { color: #fff; background: linear-gradient(135deg, #7355f4, #3383ee); }
.tutorial-stage { min-width: 0; min-height: 0; padding: 20px 24px 18px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 12px; overflow: hidden; background: #fff; }
.tutorial-stage-copy { display: flex; align-items: flex-start; gap: 13px; }
.tutorial-stage-copy > b { flex: 0 0 auto; padding: 6px 9px; border-radius: 8px; color: #5855dd; background: #ecebff; font-size: 10px; }
.tutorial-stage-copy h3 { margin: 0; color: #20243a; font-size: 20px; }
.tutorial-stage-copy p { margin: 5px 0 0; color: #747d91; font-size: 11px; line-height: 1.65; }
.tutorial-image-button {
  position: relative;
  min-height: 0;
  padding: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(105,117,155,.12);
  border-radius: 17px;
  background: linear-gradient(145deg, #f1f3f8, #e9edf5);
}
.tutorial-image-button img { width: 100%; height: 100%; min-width: 0; min-height: 0; max-height: 484px; object-fit: contain; border-radius: 10px; }
.tutorial-image-button > span { position: absolute; right: 20px; bottom: 18px; padding: 6px 9px; border-radius: 8px; color: #fff; background: rgba(22,27,48,.72); font-size: 9px; font-weight: 800; backdrop-filter: blur(6px); }
.tutorial-image-button.is-zoomed { position: fixed; z-index: 1600; inset: 0; padding: 30px; border: 0; border-radius: 0; background: rgba(8,12,29,.94); }
.tutorial-image-button.is-zoomed img { width: auto; height: auto; max-width: 96vw; max-height: 92vh; object-fit: contain; }
.tutorial-image-button.is-zoomed > span { right: 34px; bottom: 26px; }
.tutorial-thumbnail-list { position: relative; z-index: 2; padding: 1px 0 3px; display: flex; gap: 8px; overflow-x: auto; }
.tutorial-thumbnail-list:empty { display: none; }
.tutorial-thumbnail-button { position: relative; width: 112px; height: 66px; flex: 0 0 auto; padding: 4px; overflow: hidden; border: 2px solid transparent; border-radius: 10px; background: #eef1f7; cursor: pointer; touch-action: manipulation; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.tutorial-thumbnail-button img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.tutorial-thumbnail-button:hover, .tutorial-thumbnail-button:focus-visible { border-color: #8981f6; box-shadow: 0 5px 14px rgba(77,72,185,.17); outline: none; transform: translateY(-1px); }
.tutorial-thumbnail-button.active { border-color: #665ef0; background: #fff; box-shadow: 0 0 0 2px rgba(102,94,240,.10); }
.tutorial-stage-footer { position: relative; z-index: 1; width: 100%; margin: 0; padding: 0; display: grid; grid-template-columns: 100px 1fr 100px; align-items: center; gap: 12px; }
.tutorial-stage-footer button { min-height: 40px; border: 1px solid rgba(105,117,155,.18); border-radius: 11px; color: #555f76; background: #f6f7fb; font-size: 11px; font-weight: 800; }
.tutorial-stage-footer button:last-child { color: #fff; border-color: transparent; background: linear-gradient(135deg, #7355f4, #3383ee); }
.tutorial-stage-footer button:disabled { opacity: .4; cursor: default; }
.tutorial-stage-footer span { color: #7b8499; font-size: 11px; font-weight: 800; text-align: center; }

@media (max-width: 820px) {
  .feature-heading-actions { width: 100%; justify-content: flex-start; }
  .tutorial-dialog { width: 96vw; max-height: 96vh; border-radius: 20px; }
  .tutorial-dialog-head { min-height: 92px; padding: 16px 18px; }
  .tutorial-dialog-head h2 { font-size: 21px; }
  .tutorial-dialog-body { height: calc(96vh - 92px); grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .tutorial-step-list { padding: 10px 12px; flex-direction: row; border-right: 0; border-bottom: 1px solid rgba(105,117,155,.12); }
  .tutorial-step-button { width: 155px; min-height: 54px; flex: 0 0 auto; grid-template-columns: 29px minmax(0, 1fr); padding: 8px; }
  .tutorial-step-button > b { width: 27px; height: 27px; }
  .tutorial-stage { padding: 14px; }
  .tutorial-image-button img { max-height: 48vh; }
}

@media (max-width: 520px) {
  .tutorial-overlay { padding: 6px; }
  .tutorial-dialog { width: 100%; max-height: 98vh; border-radius: 16px; }
  .tutorial-dialog-head { min-height: 82px; padding: 12px 14px; }
  .tutorial-dialog-head p { display: none; }
  .tutorial-dialog-body { height: calc(98vh - 82px); }
  .tutorial-stage-copy h3 { font-size: 17px; }
  .tutorial-stage-copy p { font-size: 10px; }
  .tutorial-image-button { padding: 7px; }
  .tutorial-image-button img { max-height: 42vh; }
  .tutorial-thumbnail-button { width: 86px; height: 52px; }
  .tutorial-stage-footer { grid-template-columns: 84px 1fr 84px; }
}

/* Tutorials stay visible beside each operation workspace. */
.skill-operation-layout,
.workflow-operation-layout {
  grid-template-columns: minmax(0, 54fr) minmax(460px, 46fr);
  gap: 16px;
}
.feature-side-stack {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 16px;
}
.feature-side-stack[hidden] { display: none !important; }
.feature-side-stack .feature-case-panel {
  position: static;
  top: auto;
  max-height: none;
}
.tutorial-host { min-width: 0; }
.tutorial-overlay {
  position: sticky;
  z-index: 5;
  inset: auto;
  top: 84px;
  padding: 0;
  display: block;
  background: transparent;
  backdrop-filter: none;
}
.tutorial-dialog {
  width: 100%;
  max-height: none;
  overflow: hidden;
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(43,53,99,.10), inset 0 1px #fff;
}
.tutorial-dialog-head {
  min-height: 78px;
  padding: 15px 18px;
  align-items: flex-start;
  border-bottom-color: rgba(105,117,155,.10);
}
.tutorial-dialog-head h2 { margin: 4px 0 3px; font-size: 21px; }
.tutorial-dialog-head p { font-size: 10px; line-height: 1.55; }
.tutorial-dialog-head > .tutorial-collapse-toggle {
  width: auto;
  min-width: 90px;
  height: 34px;
  flex: 0 0 auto;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(91,102,150,.14);
  border-radius: 11px;
  color: #5c62c9;
  background: rgba(255,255,255,.92);
  box-shadow: 0 6px 16px rgba(68,78,135,.08);
  font-size: 11px;
  white-space: nowrap;
}
.tutorial-collapse-toggle span { font-size: 16px; line-height: 1; transform: translateY(-1px); }
.tutorial-collapse-toggle b { font-size: 11px; font-weight: 800; }
.tutorial-collapse-toggle:hover { border-color: rgba(93,82,239,.28); background: #fff; }
.tutorial-overlay.is-collapsed .tutorial-dialog {
  border: 1px solid rgba(96,86,226,.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 20%, rgba(113,88,245,.14), transparent 35%),
    linear-gradient(115deg, #f4f1ff 0%, #edf5ff 58%, #f2fbff 100%);
  box-shadow: 0 12px 28px rgba(58,72,150,.11), inset 0 1px rgba(255,255,255,.82);
}
.tutorial-overlay.is-collapsed .tutorial-dialog-head {
  min-height: 64px;
  padding: 10px 12px 10px 14px;
  align-items: center;
  border-bottom: 0;
  background: transparent;
}
.tutorial-overlay.is-collapsed .tutorial-dialog-head > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.tutorial-overlay.is-collapsed .tutorial-dialog-head > div::before {
  content: "图";
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #7555f4, #2f8af1);
  box-shadow: 0 8px 18px rgba(76,79,222,.24);
  font-size: 14px;
  font-weight: 900;
}
.tutorial-overlay.is-collapsed .tutorial-dialog-head > div > span,
.tutorial-overlay.is-collapsed .tutorial-dialog-head p { display: none; }
.tutorial-overlay.is-collapsed .tutorial-dialog-head h2 {
  margin: 0;
  overflow: hidden;
  color: #20243d;
  font-size: 17px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tutorial-overlay.is-collapsed .tutorial-collapse-toggle {
  width: auto;
  min-width: 102px;
  flex: 0 0 auto;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #7254f4, #3188ef);
  box-shadow: 0 9px 20px rgba(68,84,220,.23);
}
.tutorial-overlay.is-collapsed .tutorial-collapse-toggle:hover {
  background: linear-gradient(135deg, #6546ef, #247de7);
  box-shadow: 0 11px 24px rgba(68,84,220,.29);
}
.tutorial-overlay.is-collapsed .tutorial-collapse-toggle span { order: 2; transform: translateY(-1px); }
.tutorial-overlay.is-collapsed .tutorial-collapse-toggle b { font-size: 12px; }
.tutorial-overlay.is-collapsed .tutorial-dialog-body { display: none; }
.tutorial-dialog-body {
  height: auto;
  display: grid;
  grid-template-columns: 1fr;
}
.tutorial-step-list {
  padding: 10px 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  overflow: visible;
  border-right: 0;
  border-bottom: 1px solid rgba(105,117,155,.12);
}
.tutorial-step-button {
  min-height: 48px;
  padding: 7px 8px;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 7px;
  border-radius: 11px;
  background: rgba(255,255,255,.62);
}
.tutorial-step-button > b { width: 27px; height: 27px; border-radius: 8px; font-size: 9px; }
.tutorial-step-button strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.tutorial-step-button small { font-size: 8px; }
.tutorial-stage {
  min-height: 0;
  padding: 14px 16px 15px;
  grid-template-rows: auto auto auto auto;
  gap: 10px;
  overflow: visible;
}
.tutorial-stage-copy { gap: 10px; }
.tutorial-stage-copy > b { padding: 5px 8px; font-size: 9px; }
.tutorial-stage-copy h3 { font-size: 17px; }
.tutorial-stage-copy p { margin-top: 3px; font-size: 10px; line-height: 1.55; }
.tutorial-image-button {
  width: 100%;
  min-height: 250px;
  aspect-ratio: 16 / 9;
  padding: 9px;
  border-radius: 14px;
}
.tutorial-image-button img { max-height: 340px; }
.tutorial-image-button > span { right: 15px; bottom: 14px; }
.tutorial-thumbnail-button { width: 92px; height: 54px; }
.tutorial-stage-footer { grid-template-columns: 86px 1fr 86px; }
.tutorial-stage-footer button { min-height: 36px; }

@media (max-width: 1100px) {
  .skill-operation-layout,
  .workflow-operation-layout { grid-template-columns: 1fr; }
  .tutorial-overlay { position: static; top: auto; }
  .tutorial-step-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tutorial-image-button { min-height: 300px; }
}

@media (max-width: 820px) {
  .tutorial-dialog { width: 100%; max-height: none; border-radius: 18px; }
  .tutorial-dialog-head { min-height: 72px; padding: 13px 15px; }
  .tutorial-dialog-body { height: auto; grid-template-columns: 1fr; grid-template-rows: auto auto; }
  .tutorial-step-list {
    padding: 9px 10px;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
  }
  .tutorial-step-button { width: 145px; min-height: 48px; flex: 0 0 auto; }
  .tutorial-stage { padding: 12px; }
  .tutorial-image-button { min-height: 230px; }
  .tutorial-image-button img { max-height: 48vh; }
}

@media (max-width: 520px) {
  .tutorial-overlay { padding: 0; }
  .tutorial-dialog { max-height: none; }
  .tutorial-dialog-head p { display: block; }
  .tutorial-dialog-body { height: auto; }
  .tutorial-image-button { min-height: 180px; }
  .tutorial-dialog-head > .tutorial-collapse-toggle { min-width: 92px; height: 32px; padding: 0 9px; }
}

/* User community preview: a persistent lower-left support entry with a replaceable QR surface. */
.community-group-button {
  position: relative;
  width: 100%;
  min-height: 66px;
  margin-top: 11px;
  padding: 8px 4px 7px;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(74, 223, 153, .20);
  border-radius: 16px;
  color: #dcfff0;
  background: linear-gradient(145deg, rgba(28,174,108,.22), rgba(11,96,70,.12));
  box-shadow: 0 10px 24px rgba(2,9,18,.22), inset 0 1px rgba(255,255,255,.07);
  cursor: pointer;
}
.community-group-button[hidden] { display: none !important; }
.community-group-button:hover {
  transform: translateY(-1px);
  border-color: rgba(74,223,153,.44);
  background: linear-gradient(145deg, rgba(28,191,116,.34), rgba(10,109,77,.22));
  box-shadow: 0 13px 28px rgba(2,9,18,.30), 0 0 20px rgba(31,199,122,.08), inset 0 1px rgba(255,255,255,.10);
}
.community-group-button > span:not(.community-group-icon) { display: grid; gap: 1px; text-align: center; }
.community-group-button b { color: #f1fff8; font-size: 9px; font-weight: 900; line-height: 1.2; white-space: nowrap; }
.community-group-button small { color: #74dbaa; font-size: 8px; font-weight: 750; line-height: 1.2; }
.community-group-button > i {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 6px;
  height: 6px;
  border: 2px solid #11182d;
  border-radius: 50%;
  background: #22c77a;
  box-shadow: 0 0 0 3px rgba(34,199,122,.12);
}
.community-group-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, #22c779, #10a961);
  box-shadow: 0 7px 16px rgba(18,173,99,.24), inset 0 1px rgba(255,255,255,.32);
}
.community-group-icon svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

body.community-qr-open { overflow: hidden; }
.community-qr-modal {
  position: fixed;
  inset: 0;
  z-index: 1700;
  padding: 22px;
  display: grid;
  place-items: center;
  background: rgba(7, 11, 27, .62);
  backdrop-filter: blur(12px) saturate(120%);
}
.community-qr-modal[hidden] { display: none !important; }
.community-qr-dialog {
  position: relative;
  width: min(850px, 100%);
  padding: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 302px;
  align-items: center;
  gap: 34px;
  overflow: hidden;
  border: 1px solid rgba(174, 187, 255, .18);
  border-radius: 30px;
  color: #fff;
  background:
    radial-gradient(circle at 6% 4%, rgba(126,92,255,.28), transparent 34%),
    radial-gradient(circle at 95% 100%, rgba(20,194,127,.20), transparent 33%),
    linear-gradient(145deg, #1b2342 0%, #121a35 56%, #0c172b 100%);
  box-shadow: 0 38px 120px rgba(2,6,20,.52), inset 0 1px rgba(255,255,255,.08);
}
.community-qr-dialog::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: .28;
  background-image:
    linear-gradient(rgba(166,176,231,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(166,176,231,.08) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(90deg, #000, transparent 72%);
}
.community-qr-close {
  position: absolute;
  z-index: 3;
  top: 17px;
  right: 17px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 11px;
  color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.07);
  font-size: 22px;
  cursor: pointer;
}
.community-qr-close:hover { color: #fff; background: rgba(255,255,255,.13); transform: rotate(4deg); }
.community-qr-copy, .community-qr-card { position: relative; z-index: 1; }
.community-qr-copy { display: grid; align-content: center; }
.community-qr-kicker { display: flex; align-items: center; gap: 8px; color: #9faaff; font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.community-qr-kicker i { width: 8px; height: 8px; border-radius: 50%; background: #20c678; box-shadow: 0 0 0 5px rgba(32,198,120,.12); }
.community-qr-copy h2 { margin: 16px 0 11px; color: #fff; font-size: clamp(29px, 4vw, 40px); line-height: 1.08; letter-spacing: -.055em; }
.community-qr-copy > p { max-width: 440px; margin: 0; color: #aab3ca; font-size: 13px; line-height: 1.75; }
.community-help-list { margin-top: 24px; display: grid; gap: 9px; }
.community-help-list > span { min-width: 0; padding: 9px 11px; display: grid; grid-template-columns: 31px minmax(0, 1fr); gap: 1px 10px; align-items: center; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; background: rgba(255,255,255,.045); }
.community-help-list i { grid-row: 1 / 3; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; color: #a8a8ff; background: rgba(116,98,246,.15); font-size: 9px; font-style: normal; font-weight: 900; }
.community-help-list b { color: #f5f6ff; font-size: 11px; }
.community-help-list small { color: #8691ac; font-size: 9px; line-height: 1.4; }
.community-qr-card {
  padding: 17px 17px 18px;
  display: grid;
  justify-items: center;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 24px;
  color: #20283e;
  background: linear-gradient(160deg, #fff, #f7f9fd);
  box-shadow: 0 25px 65px rgba(0,0,0,.26), inset 0 1px #fff;
}
.community-qr-status { width: 100%; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.community-qr-status span { display: flex; align-items: center; gap: 6px; color: #3a465d; font-size: 9px; font-weight: 850; }
.community-qr-status span em { font-style: normal; }
.community-qr-status span i { width: 7px; height: 7px; border-radius: 50%; background: #20c678; box-shadow: 0 0 0 4px rgba(32,198,120,.12); }
.community-qr-status b { padding: 5px 8px; border-radius: 999px; color: #675bec; background: #eeecff; font-size: 8px; }
.community-qr-frame { width: 236px; height: 236px; padding: 9px; display: grid; place-items: center; border: 1px solid #e8ebf1; border-radius: 20px; background: #fff; box-shadow: 0 12px 32px rgba(37,49,79,.10); }
.community-qr-frame img { width: 100%; height: 100%; display: block; border-radius: 13px; object-fit: contain; }
.community-qr-card > strong { margin-top: 14px; color: #202941; font-size: 13px; text-align: center; }
.community-qr-card > p { margin: 5px 0 0; color: #8a93a4; font-size: 9px; line-height: 1.55; text-align: center; }
.community-qr-card > small { margin-top: 12px; padding-top: 11px; width: 100%; border-top: 1px solid #eceff4; color: #8b94a5; font-size: 9px; text-align: center; }
.community-qr-card > small i { margin-right: 3px; color: #e4932a; font-style: normal; font-weight: 900; }

.community-admin-card { margin-top: 16px; padding: 24px; border-color: rgba(43,178,113,.18); background: linear-gradient(145deg, #fff 0%, #f8fffb 100%); box-shadow: 0 12px 32px rgba(40,113,83,.06); }
.community-admin-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.community-admin-heading > div > span { color: #17a967; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.community-admin-heading h3 { margin: 5px 0 4px; color: #263049; font-size: 20px; }
.community-admin-heading p { margin: 0; color: #7b8598; font-size: 10px; line-height: 1.55; }
.community-admin-heading > strong { padding: 6px 10px; border-radius: 999px; color: #788194; background: #edf0f4; font-size: 9px; white-space: nowrap; }
.community-admin-heading > strong[data-status="active"] { color: #128453; background: #e2f8ec; }
.community-admin-heading > strong[data-status="expired"] { color: #c66b17; background: #fff0dc; }
.community-admin-heading > strong[data-status="disabled"] { color: #697287; background: #eef0f4; }
.community-admin-layout { margin-top: 18px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: stretch; }
.community-admin-preview { min-height: 238px; padding: 13px; display: grid; align-content: center; justify-items: center; gap: 9px; border: 1px solid #e2e8eb; border-radius: 17px; background: #f4f7f6; }
.community-admin-preview img { width: 178px; height: 178px; padding: 7px; object-fit: contain; border-radius: 13px; background: #fff; box-shadow: 0 8px 22px rgba(41,71,61,.09); }
.community-admin-preview span { color: #7d8797; font-size: 9px; text-align: center; }
.community-admin-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 12px; }
.community-admin-fields > label { min-width: 0; display: grid; align-content: start; gap: 6px; color: #59647a; font-size: 10px; font-weight: 800; }
.community-admin-fields input[type="file"], .community-admin-fields input[type="datetime-local"] { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #d9e2e5; border-radius: 10px; color: #334056; background: #fff; outline: none; }
.community-admin-fields input:focus { border-color: #42bc83; box-shadow: 0 0 0 3px rgba(36,185,113,.10); }
.community-admin-fields label > small { color: #929baa; font-size: 8px; font-weight: 600; line-height: 1.45; }
.community-admin-switch { grid-column: 1 / -1; padding: 11px 13px; display: flex !important; grid-template-columns: none; flex-direction: row; align-items: center !important; gap: 10px !important; border: 1px solid #dce8e2; border-radius: 11px; background: rgba(234,249,241,.68); cursor: pointer; }
.community-admin-switch input { width: 17px; height: 17px; accent-color: #19b36c; }
.community-admin-switch > span { display: grid; gap: 2px; }
.community-admin-switch b { color: #344157; font-size: 10px; }
.community-admin-switch small { color: #84908d; font-size: 8px; font-weight: 600; }
.community-admin-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
.community-admin-actions button { min-height: 41px; padding: 0 18px; border: 0; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #22bc72, #129c5d); box-shadow: 0 9px 20px rgba(20,159,94,.18); font-size: 10px; font-weight: 850; }
.community-admin-actions span { color: #748091; font-size: 9px; line-height: 1.5; }

@media (max-width: 760px) {
  .community-qr-modal { padding: 10px; }
  .community-qr-dialog { max-height: calc(100vh - 20px); padding: 29px 20px 22px; grid-template-columns: 1fr; gap: 22px; overflow-y: auto; border-radius: 23px; }
  .community-qr-copy { text-align: center; }
  .community-qr-kicker { justify-content: center; }
  .community-qr-copy > p { margin-inline: auto; }
  .community-help-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .community-help-list > span { padding: 9px 6px; grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .community-help-list i { grid-row: auto; }
  .community-help-list small { display: none; }
  .community-qr-card { width: min(302px, 100%); margin-inline: auto; }
  .community-qr-frame { width: min(230px, 100%); height: auto; aspect-ratio: 1; }
  .community-admin-layout { grid-template-columns: 1fr; }
  .community-admin-preview { min-height: 220px; }
}

@media (max-width: 600px) {
  .community-group-button { width: 58px; min-width: 58px; min-height: 54px; margin: 0 0 0 4px; padding: 4px 2px; border-radius: 13px; }
  .community-group-icon { width: 23px; height: 23px; border-radius: 8px; }
  .community-group-icon svg { width: 16px; height: 16px; }
  .community-group-button small, .community-group-button > i { display: none; }
  .community-group-button b { font-size: 8px; }
}

@media (max-width: 520px) {
  .header-login-button { width: 44px; height: 44px; font-size: 11px; }
  .community-qr-copy h2 { font-size: 29px; }
  .community-admin-card { padding: 17px; }
  .community-admin-heading { flex-direction: column; gap: 8px; }
  .community-admin-fields { grid-template-columns: 1fr; }
  .community-admin-switch, .community-admin-actions { grid-column: 1; }
  .community-admin-actions { align-items: stretch; flex-direction: column; }
}

/* Administrator account center: branch navigation keeps large datasets out of one long page. */
.admin-section-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid #dde5f2;
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 14px 36px rgba(43,63,110,.07);
}
.admin-section-nav button {
  min-width: 0;
  min-height: 68px;
  padding: 11px 14px;
  border: 1px solid #e2e8f3;
  border-radius: 13px;
  color: #35425a;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}
.admin-section-nav button:hover { transform: translateY(-1px); border-color: #b9c9f7; box-shadow: 0 8px 20px rgba(69,91,160,.10); }
.admin-section-nav button.active { color: #fff; border-color: transparent; background: linear-gradient(135deg, #694ef7, #2c8bea); box-shadow: 0 10px 24px rgba(69,91,223,.24); }
.admin-section-nav button span, .admin-section-nav button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-section-nav button span { font-size: 13px; font-weight: 800; }
.admin-section-nav button small { margin-top: 5px; color: #8893a8; font-size: 9px; }
.admin-section-nav button.active small { color: rgba(255,255,255,.78); }
.admin-grid > [data-admin-section-panel] { grid-column: 1 / -1; }
.admin-user-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 160px 160px;
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  border-radius: 13px;
  background: #f5f7fb;
}
.admin-user-toolbar label { display: grid; gap: 6px; color: #68758b; font-size: 10px; font-weight: 750; }
.admin-user-toolbar input, .admin-user-toolbar select { width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid #d9e1ed; border-radius: 9px; color: #28344b; background: #fff; outline: none; }
.admin-user-toolbar input:focus, .admin-user-toolbar select:focus { border-color: #6b82ed; box-shadow: 0 0 0 3px rgba(75,99,224,.10); }
.admin-user-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; color: #748096; font-size: 10px; }
.admin-user-pagination > div { display: flex; align-items: center; gap: 9px; }
.admin-user-pagination button { min-height: 36px; padding: 0 13px; border: 1px solid #d8e0ec; border-radius: 9px; color: #38465f; background: #fff; cursor: pointer; }
.admin-user-pagination button:disabled { opacity: .42; cursor: default; }
.admin-user-pagination strong { min-width: 78px; color: #27354f; text-align: center; }
.case-video-toolbar { margin: 16px 0; display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.case-video-toolbar label { display: grid; gap: 6px; color: #68758b; font-size: 10px; font-weight: 750; }
.case-video-toolbar select { min-width: 180px; min-height: 40px; padding: 0 12px; border: 1px solid #d9e1ed; border-radius: 9px; color: #28344b; background: #fff; }
.case-video-toolbar button, .case-video-card button { min-height: 38px; padding: 0 14px; border: 1px solid #cfd9ec; border-radius: 9px; color: #3750aa; background: #fff; font-size: 10px; font-weight: 800; cursor: pointer; }
.case-video-toolbar button:hover, .case-video-card button:hover { border-color: #8ea4ef; box-shadow: 0 7px 18px rgba(65,86,165,.12); }
.case-video-toolbar button:disabled, .case-video-card button:disabled { opacity: .5; cursor: default; }
.case-video-list { display: grid; gap: 14px; }
.case-video-card { padding: 16px; border: 1px solid #e0e6f1; border-radius: 14px; background: #fbfcff; }
.case-video-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.case-video-card > header > div { min-width: 0; }
.case-video-card > header span { color: #5b65dc; font-size: 9px; font-weight: 900; }
.case-video-card > header h3 { margin: 5px 0 3px; color: #26324a; font-size: 14px; overflow-wrap: anywhere; }
.case-video-card > header small, .case-video-original small, .case-video-output small { color: #8590a4; font-size: 9px; overflow-wrap: anywhere; }
.case-video-card > header em { flex: none; padding: 5px 9px; border-radius: 999px; font-size: 8px; font-style: normal; font-weight: 800; }
.case-video-card > header em.available { color: #138658; background: #e5f8ef; }
.case-video-card > header em.expired { color: #9a6470; background: #f5e9ec; }
.case-video-original, .case-video-output { margin-top: 12px; padding: 11px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #e5eaf3; border-radius: 10px; background: #fff; }
.case-video-original > div, .case-video-output > div { min-width: 0; display: grid; gap: 4px; }
.case-video-original strong, .case-video-output strong { color: #344159; font-size: 10px; }
.case-video-outputs { display: grid; }
.case-video-output.empty { color: #8a94a7; font-size: 9px; }
@media (max-width: 980px) {
  .admin-section-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-user-toolbar { grid-template-columns: 1fr 1fr; }
  .admin-user-toolbar label:first-child { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .admin-section-nav { grid-template-columns: 1fr; }
  .admin-section-nav button { min-height: 58px; }
  .admin-user-toolbar { grid-template-columns: 1fr; }
  .admin-user-toolbar label:first-child { grid-column: auto; }
  .admin-user-pagination { align-items: stretch; flex-direction: column; }
  .admin-user-pagination > div { justify-content: space-between; }
  .case-video-toolbar, .case-video-card > header, .case-video-original, .case-video-output { align-items: stretch; flex-direction: column; }
  .case-video-toolbar select { width: 100%; }
}
