:root {
  color-scheme: light;
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
  color: #17211b;
  background: #f4f7f5;
  --green: #176b4d;
  --green-dark: #0f513a;
  --line: #dfe7e2;
  --muted: #6d7b73;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.center-card {
  width: min(420px, calc(100% - 32px));
  margin: 12vh auto;
  padding: 42px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 20px 70px rgba(22, 48, 35, .08);
}

.center-card h1 { margin: 18px 0 6px; }
.password-change-card { margin-top: 7vh; }
.password-change-card form { margin-top: 24px; }
.password-change-card button[type="submit"] { width: 100%; }
.muted { color: var(--muted); }
label { display: grid; gap: 8px; margin: 20px 0; font-size: 14px; font-weight: 600; }
input, textarea {
  width: 100%;
  border: 1px solid #cad6cf;
  border-radius: 11px;
  padding: 12px 14px;
  outline: none;
}
input:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px #176b4d18; }
button[type="submit"] {
  border: 0;
  border-radius: 11px;
  padding: 12px 20px;
  background: var(--green);
  color: white;
  font-weight: 700;
}
button[type="submit"]:hover { background: var(--green-dark); }
button[type="submit"].interrupt {
  min-width: 92px;
  background: #b42318;
}
button[type="submit"].interrupt:hover { background: #8f1c13; }
button:disabled { opacity: .55; cursor: wait; }
.error { color: #b42318; min-height: 20px; }
.login-remember {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0 18px;
  color: #52645a;
  font-size: 12px;
  font-weight: 550;
}
.login-remember input { width: 16px; height: 16px; margin: 0; accent-color: var(--green); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: white;
  background: linear-gradient(145deg, #238b64, #0f513a);
  border-radius: 14px;
  font-weight: 800;
}
.brand-mark.small { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
.brand-mark.large { width: 64px; height: 64px; border-radius: 18px; margin: auto; }

.app-shell { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 16px;
  background: #10241b;
  color: white;
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 11px;
  color: white;
  background: transparent;
  text-align: left;
}
.brand-row:hover,
.brand-row[aria-expanded="true"] { background: #ffffff10; }
.brand-row.is-back {
  background: #ffffff0d;
  cursor: pointer;
}
.brand-row.is-back:hover,
.brand-row.is-back:focus-visible {
  background: #ffffff18;
}
.brand-row.is-back .brand-mark {
  font-size: 20px;
  line-height: 1;
}
.brand-row strong { flex: 1; font-size: 16px; }
.brand-row[aria-expanded="true"] {
  position: relative;
  z-index: 202;
}
.workspace-menu {
  position: absolute;
  top: 75px;
  right: 16px;
  left: 16px;
  z-index: 200;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid #ffffff1f;
  border-radius: 12px;
  background: #1a3026;
  box-shadow: 0 16px 38px #06140d42;
}
.workspace-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: #07150ea3;
  animation: workspace-backdrop-in .14s ease-out;
}
.workspace-menu-backdrop.is-closing {
  pointer-events: none;
  animation: workspace-backdrop-out .19s ease-in forwards;
}
@keyframes workspace-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes workspace-backdrop-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes workspace-menu-drop {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
.workspace-menu-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 9px;
  color: #dce7e1;
  background: transparent;
  text-align: left;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}
.workspace-menu-item:hover,
.workspace-menu-item.active { color: white; background: #ffffff12; }
.workspace-menu-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: #bcd7ca;
  background: #ffffff0d;
  font-size: 16px;
}
.workspace-menu-item.active .workspace-menu-icon {
  color: white;
  background: #238b64;
}
.workspace-menu-item strong,
.workspace-menu-item small { display: block; }
.workspace-menu-item strong {
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .01em;
}
.workspace-menu-item small {
  overflow: hidden;
  max-height: 0;
  margin-top: 0;
  color: #c5d5cd;
  font-size: 11px;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(-3px);
  transition: max-height .18s ease, margin .18s ease, opacity .14s ease, transform .18s ease;
}
.workspace-menu-item:hover small,
.workspace-menu-item:focus-visible small {
  max-height: 32px;
  margin-top: 4px;
  opacity: 1;
  transform: translateY(0);
}
.sidebar-section { min-height: 0; flex: 1; }
.chat-sidebar {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
}
.image-sidebar { display: block; }
.sidebar-section-label {
  margin: 2px 8px 8px;
  color: #8fa198;
  font-size: 11px;
  letter-spacing: .08em;
}
.sidebar-tool {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 11px;
  color: #dce7e1;
  background: transparent;
  text-align: left;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}
.sidebar-tool:hover,
.sidebar-tool.active { color: white; background: #ffffff12; }
.sidebar-tool-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: #c6ddd2;
  background: #ffffff0d;
  font-size: 17px;
}
.sidebar-tool.active .sidebar-tool-icon {
  color: white;
  background: linear-gradient(145deg, #2a9870, #176b4d);
}
.sidebar-tool strong,
.sidebar-tool small { display: block; }
.sidebar-tool strong {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: .01em;
}
.sidebar-tool small {
  overflow: hidden;
  max-height: 0;
  margin-top: 0;
  color: #c5d5cd;
  font-size: 11px;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(-3px);
  transition: max-height .18s ease, margin .18s ease, opacity .14s ease, transform .18s ease;
}
.sidebar-tool:hover small,
.sidebar-tool:focus-visible small {
  max-height: 32px;
  margin-top: 4px;
  opacity: 1;
  transform: translateY(0);
}
.sidebar-tool-flyout {
  position: relative;
  z-index: 24;
}
.sidebar-tool-submenu {
  position: absolute;
  top: 0;
  left: calc(100% - 2px);
  z-index: 48;
  display: grid;
  width: 220px;
  gap: 4px;
  padding: 7px;
  border: 1px solid #d9e4de;
  border-radius: 12px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 16px 42px rgba(8, 35, 23, .24);
  opacity: 0;
  pointer-events: none;
  scale: .78;
  translate: -10px 0;
  transform-origin: left 24px;
  visibility: hidden;
  transition: opacity .16s ease, scale .22s cubic-bezier(.2, 1.25, .35, 1),
    translate .22s cubic-bezier(.2, 1.25, .35, 1), visibility 0s linear .2s;
}
.sidebar-tool-flyout:hover .sidebar-tool-submenu,
.sidebar-tool-flyout:focus-within .sidebar-tool-submenu {
  opacity: 1;
  pointer-events: auto;
  scale: 1;
  translate: 0 0;
  visibility: visible;
  transition-delay: 0s;
}
.sidebar-tool-submenu button {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  color: #30483b;
  background: transparent;
  text-align: left;
}
.sidebar-tool-submenu button:hover,
.sidebar-tool-submenu button.active {
  color: #0f6848;
  background: #edf7f2;
}
.sidebar-tool-submenu strong,
.sidebar-tool-submenu small { display: block; }
.sidebar-tool-submenu strong { font-size: 13px; }
.sidebar-tool-submenu small {
  overflow: hidden;
  max-height: 0;
  margin-top: 0;
  color: #7b8b83;
  font-size: 10px;
  opacity: 0;
  transition: max-height .16s ease, margin .16s ease, opacity .14s ease;
}
.sidebar-tool-submenu button:hover small,
.sidebar-tool-submenu button:focus-visible small {
  max-height: 28px;
  margin-top: 4px;
  opacity: 1;
}
.secondary {
  border: 1px solid #ffffff38;
  border-radius: 10px;
  padding: 11px;
  color: white;
  background: #ffffff0d;
}
.conversation-list {
  display: grid;
  grid-auto-rows: min-content;
  align-content: start;
  gap: 5px;
  overflow-x: hidden;
  overflow-y: auto;
}
.conversation-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  border-radius: 9px;
}
.conversation-row:hover, .conversation-row.active { background: #ffffff14; }
.conversation {
  overflow: hidden;
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  color: #dce7e1;
  background: transparent;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation:hover, .conversation-row.active .conversation { color: white; }
.conversation-title-input {
  min-width: 0;
  margin: 3px 0 3px 5px;
  padding: 7px 8px;
  border: 1px solid #62a98a;
  border-radius: 7px;
  color: white;
  background: #ffffff12;
  box-shadow: 0 0 0 3px #4da17d2b;
}
.conversation-title-input:focus {
  border-color: #86c5a9;
  box-shadow: 0 0 0 3px #4da17d38;
}
.conversation-edit-spacer { width: 30px; }
.conversation-more {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: #b9c9c0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
}
.conversation-more:hover, .conversation-more[aria-expanded="true"] {
  color: white;
  background: #ffffff18;
}
.conversation-actions-menu {
  position: fixed;
  z-index: 20;
  display: grid;
  gap: 3px;
  width: 138px;
  padding: 6px;
  border: 1px solid #d7e0da;
  border-radius: 11px;
  background: white;
  box-shadow: 0 14px 38px #06140d38;
}
@keyframes actions-pop {
  from { opacity: 0; transform: translateX(-5px) scale(.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
.rename-conversation,
.delete-conversation {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  color: #b42318;
  background: transparent;
  text-align: left;
}
.rename-conversation { color: #26372e; }
.rename-conversation:hover { color: var(--green-dark); background: #edf6f1; }
.delete-conversation:hover { background: #fff0ee; }
.account {
  position: relative;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #ffffff22;
}
.account-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 8px;
  border: 0;
  border-radius: 11px;
  color: white;
  background: transparent;
  text-align: left;
}
.account-trigger:hover, .account-trigger[aria-expanded="true"] { background: #ffffff12; }
.account-avatar {
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: white;
  background: #238b64;
  font-family: "Microsoft YaHei UI", "Arial Rounded MT Bold", sans-serif;
  font-size: 15px;
  font-weight: 700;
}
.account-identity {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.account-name {
  display: block;
  min-width: 0;
  color: #f3f7f5;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
  white-space: normal;
}
.chatgpt-account-name {
  display: block;
  min-width: 0;
  color: #9fb6aa;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}
.account-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 12;
  padding: 7px;
  border: 1px solid #ffffff20;
  border-radius: 12px;
  color: white;
  background: #1a3026;
  box-shadow: 0 18px 42px #06140d66;
}
@keyframes account-pop {
  from { opacity: 0; transform: translateY(5px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.account-role-label {
  padding: 6px 10px 8px;
  color: #aebdb5;
  font-size: 11px;
}
.account-menu-item {
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: transparent;
  text-align: left;
}
.account-menu-item:hover { background: #ffffff12; }
.account-binding-flyout { position: relative; }
.account-binding-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px;
}
.account-binding-trigger small {
  color: #9fb6aa;
  font-size: 10px;
  font-weight: 550;
}
.account-binding-trigger b { color: #9fb6aa; font-size: 18px; line-height: 1; }
.account-binding-trigger[aria-expanded="true"] { background: #ffffff12; }
.account-binding-menu {
  position: absolute;
  bottom: -7px;
  left: calc(100% + 10px);
  z-index: 14;
  width: 156px;
  padding: 7px;
  border: 1px solid #ffffff20;
  border-radius: 12px;
  background: #1a3026;
  box-shadow: 0 18px 42px #06140d66;
  animation: account-binding-pop .15s ease-out;
}
@keyframes account-binding-pop {
  from { opacity: 0; transform: translateX(-5px) scale(.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
.account-binding-menu button {
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: transparent;
  text-align: left;
}
.account-binding-menu button:hover { background: #ffffff12; }
.account-binding-menu button:first-child { color: #ffbbb6; }
.account-binding-menu button:disabled { opacity: .6; cursor: wait; }
.login-progress-modal {
  position: fixed;
  inset: 0;
  z-index: 12100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 24, 17, .68);
  backdrop-filter: blur(6px) saturate(.76);
  animation: app-confirm-backdrop-in .16s ease-out;
}
.login-progress-modal.hidden { display: none; }
.login-progress-dialog {
  width: min(390px, 100%);
  padding: 32px 28px 29px;
  border: 1px solid rgba(197, 220, 208, .92);
  border-radius: 20px;
  outline: none;
  color: #263d32;
  background: #fbfdfc;
  box-shadow: 0 28px 80px rgba(4, 25, 16, .34);
  text-align: center;
  animation: app-confirm-card-in .18s cubic-bezier(.2, .75, .25, 1);
}
.login-progress-spinner {
  display: inline-block;
  width: 46px;
  height: 46px;
  border: 4px solid #dcebe4;
  border-top-color: #18845d;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(23, 122, 84, .14);
  animation: login-progress-spin .82s linear infinite;
}
.login-progress-dialog h2 { margin: 18px 0 8px; font-size: 22px; }
.login-progress-dialog p { margin: 0; color: #405e50; font-size: 14px; line-height: 1.65; }
.login-progress-dialog small { display: block; margin-top: 11px; color: #819189; font-size: 11px; line-height: 1.6; }
body.login-progress-open { overflow: hidden; }
@keyframes login-progress-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .login-progress-spinner { animation-duration: 1.6s; }
}
.app-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 24, 17, .64);
  backdrop-filter: blur(5px) saturate(.78);
  animation: app-confirm-backdrop-in .16s ease-out;
}
.app-confirm-modal.hidden { display: none; }
.app-confirm-dialog {
  width: min(410px, 100%);
  padding: 28px;
  border: 1px solid rgba(197, 220, 208, .9);
  border-radius: 20px;
  outline: none;
  color: #263d32;
  background: #fbfdfc;
  box-shadow: 0 28px 80px rgba(4, 25, 16, .32);
  text-align: center;
  animation: app-confirm-card-in .18s cubic-bezier(.2, .75, .25, 1);
}
.app-confirm-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, #20986a, #116345);
  box-shadow: 0 10px 24px rgba(23, 122, 84, .22);
  font-size: 14px;
  font-weight: 850;
}
.app-confirm-dialog h2 { margin: 16px 0 8px; font-size: 20px; }
.app-confirm-dialog p { margin: 0; color: #63766c; font-size: 13px; line-height: 1.7; white-space: pre-line; }
.app-confirm-actions { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.app-confirm-actions button { min-width: 112px; min-height: 42px; border-radius: 11px; font-weight: 750; }
.app-confirm-actions button.secondary { color: #3e5549; border: 1px solid #d3dfd8; background: #f3f7f5; }
.app-confirm-actions #app-confirm-accept { color: #fff; border-color: #176b4d; background: #176b4d; }
.app-confirm-actions #app-confirm-accept.is-danger { border-color: #b94a43; background: #b94a43; }
body.app-confirm-open { overflow: hidden; }
@keyframes app-confirm-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes app-confirm-card-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.account-menu-logout {
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  border-radius: 0 0 8px 8px;
  color: #ffb6b2;
}
.account-menu-logout:hover { color: #fff; background: rgba(190, 50, 45, .5); }
.account-menu-logout:disabled { cursor: wait; opacity: .62; }
.text-button { border: 0; padding: 5px 8px 5px 0; color: inherit; background: transparent; }

.workspace { position: relative; height: 100vh; overflow: hidden; background: white; }
.workspace-view { height: 100%; }
.chat-workspace { display: grid; grid-template-rows: auto 1fr auto; }
.workspace header { padding: 18px 28px; border-bottom: 1px solid var(--line); }

.chat-workspace > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.account-points-total {
  display: grid;
  min-width: 132px;
  padding: 7px 15px;
  border: 1px solid #d9e6df;
  border-radius: 12px;
  background: #f4faf7;
  text-align: right;
}
.account-points-total small { color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.account-points-total strong { margin-top: 2px; color: #12613f; font-size: 19px; }

.workspace-account-points {
  position: absolute;
  z-index: 20;
  top: 10px;
  right: 18px;
  min-width: 132px;
  box-shadow: 0 8px 24px rgba(18, 97, 63, .08);
  pointer-events: none;
}

body .workspace .workspace-view > header {
  padding-right: 28px;
}

.points-pool {
  position: relative;
  isolation: isolate;
  width: 190px;
  min-width: 190px;
  height: 46px;
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(31, 145, 101, .34);
  border-radius: 999px;
  color: #145d45;
  background: #e8f7ef;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .72);
}

.points-pool-wave {
  position: absolute;
  z-index: -1;
  left: -35%;
  bottom: -28px;
  width: 170%;
  height: 54px;
  border-radius: 42%;
  background: rgba(45, 174, 126, .2);
  animation: points-wave 4.6s linear infinite;
}

.points-pool-wave::after {
  content: "";
  position: absolute;
  inset: 5px 0 0;
  border-radius: 45%;
  background: rgba(69, 198, 151, .17);
  animation: points-wave 6.2s linear infinite reverse;
}

.points-pool span { display: grid; justify-items: center; line-height: 1.05; }
.points-pool small { font-size: 9px; letter-spacing: .12em; }
.points-pool strong { margin-top: 3px; font-size: 17px; }
.points-pool button {
  width: 28px;
  height: 28px;
  margin: auto;
  border: 1px solid rgba(21, 111, 78, .24);
  border-radius: 50%;
  color: inherit;
  background: rgba(255, 255, 255, .72);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.points-pool button:disabled { opacity: .35; cursor: not-allowed; }
.points-pool.is-low {
  color: #9d2424;
  border-color: rgba(190, 47, 47, .45);
  background: #fff0f0;
}
.points-pool.is-low .points-pool-wave { background: rgba(221, 67, 67, .2); }
.points-pool.is-low .points-pool-wave::after { background: rgba(238, 106, 106, .16); }

@keyframes points-wave {
  to { transform: rotate(360deg); }
}

.flow-loop-points {
  margin-left: auto;
  display: grid;
  grid-template-columns: 24px 48px 24px;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border: 1px solid rgba(78, 222, 148, .42);
  border-radius: 999px;
  color: #80e6b1;
  background: rgba(32, 103, 73, .32);
}
.flow-loop-points.is-low { color: #ff8e8e; border-color: rgba(255, 100, 100, .58); }
.flow-loop-points span { display: grid; justify-items: center; line-height: 1; }
.flow-loop-points small { font-size: 7px; }
.flow-loop-points strong { margin-top: 2px; font-size: 12px; }
.flow-loop-points button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: inherit;
  background: rgba(18, 23, 26, .5);
}
.flow-loop-points button:disabled { opacity: .35; }
.workspace header h2 { display: inline; margin: 0 10px 0 0; font-size: 18px; }
.model-badge { padding: 4px 8px; color: var(--green); background: #e9f6ef; border-radius: 999px; font-size: 12px; }
.chat-panel { overflow: auto; padding: 26px max(24px, calc((100% - 820px) / 2)); }
.chat-panel > .points-pool {
  position: sticky;
  top: 16px;
  z-index: 15;
  margin: -10px 0 -36px auto;
}
.empty-state { margin-top: 18vh; color: var(--muted); text-align: center; }
.empty-state h2 { color: #27362e; }
.message { display: flex; gap: 12px; margin: 20px 0; align-items: flex-start; }
.message-content { display: grid; gap: 8px; min-width: 0; }
.message.user {
  flex-direction: row-reverse;
  justify-content: flex-start;
}
.message.user .message-content {
  justify-items: end;
  max-width: min(760px, calc(100vw - 390px));
}
.message.user .bubble {
  padding: 10px 14px;
  border: 1px solid #cfe2d8;
  border-radius: 15px 4px 15px 15px;
  background: #edf7f2;
}
.message.user .message-attachments { justify-content: flex-end; }
.message.user .avatar { color: #fff; background: #176b4d; }
.avatar {
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #eef2ef;
  font-size: 12px;
  font-weight: 800;
}
.message.assistant .avatar { color: white; background: transparent; }
.assistant-avatar {
  overflow: hidden;
  border-radius: 50%;
}
.assistant-avatar img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.message.assistant .assistant-avatar.fallback { background: var(--green); }
.bubble { max-width: min(760px, calc(100vw - 390px)); line-height: 1.75; white-space: normal; }
.response-body {
  display: grid;
  gap: 12px;
  width: min(760px, calc(100vw - 390px));
}
.thinking-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #bdd6c8;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: thinking-spin .8s linear infinite;
}
@keyframes thinking-spin { to { transform: rotate(360deg); } }
.thinking-shimmer {
  color: transparent;
  background: linear-gradient(
    100deg,
    #6d7b73 10%,
    #6d7b73 38%,
    #f7fff9 50%,
    #6d7b73 62%,
    #6d7b73 90%
  );
  background-size: 240% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  animation: thinking-shimmer 2.4s ease-in-out infinite;
}
@keyframes thinking-shimmer {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}
.image-generation-status {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.answer-label { color: #718077; font-size: 12px; font-weight: 700; }
.answer-text { white-space: pre-wrap; }
.usage-line { color: #849189; font-size: 12px; }
.usage-line.persistence-warning { color: #a76412; }
.error-text { color: #b42318; }
.tool-status {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 9px;
  color: #3f5a4b;
  background: #edf6f1;
  font-size: 12px;
}
.search-results-card {
  width: min(760px, calc(100vw - 390px));
  padding: 12px;
  border: 1px solid #d8e4dd;
  border-radius: 12px;
  background: #fafcfb;
}
.search-results-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #365246;
  font-size: 13px;
  font-weight: 700;
}
.search-results-title > span:last-child {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.search-results-list { display: grid; gap: 5px; margin-top: 9px; }
.search-results-list a {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  padding: 7px;
  border-radius: 8px;
  color: #26372e;
  text-decoration: none;
}
.search-results-list a:hover { background: #edf6f1; }
.search-results-list a > span:last-child { min-width: 0; }
.search-results-list strong,
.search-results-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-results-list strong { font-size: 12px; }
.search-results-list small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.search-index {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  color: var(--green);
  background: #e5f3eb;
  font-size: 10px;
  font-weight: 800;
}
.tool-avatar { color: var(--green); }
.composer {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(58px, auto) auto;
  gap: 8px;
  width: min(850px, calc(100% - 48px));
  margin: 14px auto 24px;
  padding: 10px;
  border: 1px solid #cad6cf;
  border-radius: 16px;
  box-shadow: 0 12px 35px rgba(22, 48, 35, .08);
  background: white;
  transition: height .2s ease, box-shadow .2s ease;
}
.composer.is-expanded {
  height: min(50vh, 560px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  box-shadow: 0 20px 60px rgba(22, 48, 35, .15);
}
.composer.drag-active {
  border-color: #367f63;
  box-shadow: 0 0 0 3px rgba(54, 127, 99, .15), 0 12px 35px rgba(22, 48, 35, .08);
}
.composer.uploading { border-color: #8aa99a; }
.message-input {
  grid-row: 2;
  width: 100%;
  min-height: 58px;
  max-height: 210px;
  padding: 7px 34px 7px 4px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  outline: 0;
  color: #25372e;
  background: transparent;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.composer .attachment-queue { grid-row: 1; }
.composer .composer-toolbar { grid-row: 3; }
.message-input:empty::before {
  color: #78877f;
  content: attr(data-placeholder);
  pointer-events: none;
}
.composer.is-expanded .message-input { max-height: none; }
.composer-expand-toggle {
  position: absolute;
  z-index: 8;
  top: 9px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  padding: 0;
  border: 1px solid #d7e1dc;
  border-radius: 8px;
  color: #51645a;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 4px 12px rgba(22, 48, 35, .08);
  font-size: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity .15s ease, transform .15s ease, background .15s ease;
}
.composer:hover .composer-expand-toggle,
.composer:focus-within .composer-expand-toggle,
.composer.is-expanded .composer-expand-toggle {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.composer-expand-toggle:hover { color: #0b6d4c; background: #edf7f2; }
.composer-image-meter {
  position: absolute;
  z-index: 7;
  top: 13px;
  right: 48px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #829088;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .01em;
  pointer-events: none;
}
.composer-image-meter span + span::before {
  margin-right: 7px;
  color: #c2ccc7;
  content: "·";
}

.prompt-expand-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(24, 119, 84, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #52665d;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 160ms ease, color 160ms ease, background 160ms ease;
}

.batch-prompt-card:hover .prompt-expand-toggle,
.batch-prompt-card:focus-within .prompt-expand-toggle,
.video-prompt-card:hover .prompt-expand-toggle,
.video-prompt-card:focus-within .prompt-expand-toggle {
  opacity: 1;
}

.prompt-expand-toggle:hover {
  color: #0b6d4c;
  background: #edf7f2;
}

.prompt-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 18000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 21, 15, 0.48);
  backdrop-filter: blur(2px);
}

.prompt-editor-overlay.hidden { display: none; }

.prompt-editor-overlay-card {
  width: min(920px, 72vw);
  height: min(620px, 62vh);
  min-width: 480px;
  min-height: 320px;
  border: 1px solid rgba(24, 119, 84, 0.28);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 25, 17, 0.28);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.prompt-editor-overlay-card > header {
  min-height: 54px;
  padding: 10px 14px 10px 20px;
  border-bottom: 1px solid #dce8e2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prompt-editor-overlay-card > header button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: #edf7f2;
  color: #0b6d4c;
  cursor: pointer;
}

.prompt-editor-overlay-slot {
  min-height: 0;
  padding: 18px;
  display: flex;
}

.prompt-editor-overlay-slot > .is-prompt-overlay-editor {
  flex: 1 1 auto;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  resize: none;
  overflow: auto;
}
.attachment-drop-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  border: 2px dashed #367f63;
  border-radius: 15px;
  color: #0c6246;
  background: rgba(235, 248, 241, .96);
  font-size: 15px;
  font-weight: 800;
  pointer-events: none;
}
.image-generation-control { position: relative; }
.image-quick-panel {
  position: absolute;
  z-index: 35;
  bottom: calc(100% + 9px);
  left: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(136px, 1fr));
  gap: 8px;
  width: min(340px, calc(100vw - 330px));
  padding: 10px;
  overflow: visible;
  border: 1px solid rgba(91, 170, 136, .44);
  border-radius: 18px;
  background:
    radial-gradient(circle at 14% 8%, rgba(225, 251, 238, .9), transparent 36%),
    rgba(255, 255, 255, .97);
  box-shadow:
    0 22px 52px rgba(20, 75, 51, .22),
    0 5px 14px rgba(20, 75, 51, .1),
    inset 0 1px 0 rgba(255, 255, 255, .95);
  backdrop-filter: blur(14px);
  transform-origin: 30px calc(100% + 7px);
  animation: image-quick-panel-bubble-in .36s cubic-bezier(.2, 1.32, .34, 1);
}
.image-quick-panel.is-closing {
  pointer-events: none;
  animation: image-quick-panel-bubble-out .21s cubic-bezier(.55, 0, .8, .45) forwards;
}
.image-quick-panel::after {
  position: absolute;
  bottom: -6px;
  left: 27px;
  width: 11px;
  height: 11px;
  border-right: 1px solid #cfdad5;
  border-bottom: 1px solid #cfdad5;
  background: white;
  content: "";
  transform: rotate(45deg);
}
.image-quick-panel label {
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid rgba(205, 224, 215, .82);
  border-radius: 12px;
  color: #626b75;
  background: rgba(250, 253, 251, .88);
  font-size: 11px;
  box-shadow: 0 2px 8px rgba(20, 75, 51, .05);
  transition: transform .2s cubic-bezier(.2, 1.25, .35, 1),
    border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.image-quick-panel label:hover,
.image-quick-panel label:focus-within {
  z-index: 1;
  border-color: rgba(54, 146, 105, .62);
  background: #fff;
  box-shadow: 0 9px 20px rgba(20, 75, 51, .13);
  transform: translateY(-3px) scale(1.025);
}
.image-quick-panel select {
  width: 100%;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid #d8dcec;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.image-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}
.image-parameter-picker { position: relative; }
.image-parameter-picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #d8dcec;
  border-radius: 9px;
  color: #34463d;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.image-parameter-picker-trigger:hover,
.image-parameter-picker-trigger[aria-expanded="true"] {
  border-color: #68b994;
  box-shadow: 0 5px 13px rgba(24, 112, 78, .12);
  transform: translateY(-1px);
}
.image-parameter-options {
  position: absolute;
  z-index: 12;
  bottom: calc(100% + 7px);
  left: 0;
  display: grid;
  gap: 4px;
  width: max(100%, 132px);
  max-height: min(310px, 42vh);
  padding: 7px;
  overflow: auto;
  border: 1px solid rgba(91, 170, 136, .45);
  border-radius: 14px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 17px 38px rgba(20, 75, 51, .2), inset 0 1px 0 #fff;
  backdrop-filter: blur(12px);
  transform-origin: 28px calc(100% + 5px);
}
.image-parameter-options.is-open {
  animation: image-parameter-options-in .28s cubic-bezier(.2, 1.28, .34, 1) both;
}
.image-parameter-options.is-closing {
  pointer-events: none;
  animation: image-parameter-options-out .15s cubic-bezier(.55, 0, .8, .45) both;
}
.image-parameter-options button {
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #32473d;
  background: #f7fbf9;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  transition: color .16s ease, background .16s ease, border-color .16s ease,
    transform .16s cubic-bezier(.2, 1.25, .35, 1), box-shadow .16s ease;
}
.image-parameter-options button:hover,
.image-parameter-options button:focus-visible {
  border-color: #78b99b;
  color: #086044;
  background: #e9f7f0;
  box-shadow: 0 5px 12px rgba(24, 112, 78, .12);
  outline: none;
  transform: translateX(3px) scale(1.025);
}
.image-parameter-options button.is-picked {
  animation: image-parameter-option-picked .22s ease-out;
}
.image-quick-panel select:hover {
  border-color: #68b994;
}
.image-quick-panel select:focus {
  border-color: #23835d;
  outline: none;
  box-shadow: 0 0 0 3px rgba(35, 131, 93, .13);
  transform: scale(1.015);
}
@keyframes image-quick-panel-bubble-in {
  0% { opacity: 0; transform: translateY(15px) scale(.72); filter: blur(3px); }
  58% { opacity: 1; transform: translateY(-4px) scale(1.035); filter: blur(0); }
  78% { transform: translateY(1px) scale(.988); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes image-quick-panel-bubble-out {
  0% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
  35% { transform: translateY(-3px) scale(1.025); }
  100% { opacity: 0; transform: translateY(13px) scale(.74); filter: blur(3px); }
}
@keyframes image-parameter-options-in {
  0% { opacity: 0; transform: translateY(9px) scale(.72); filter: blur(2px); }
  62% { opacity: 1; transform: translateY(-2px) scale(1.035); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes image-parameter-options-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(8px) scale(.76); }
}
@keyframes image-parameter-option-picked {
  0% { transform: scale(1); }
  55% { transform: scale(.93); background: #d9f2e5; }
  100% { transform: scale(1); }
}

/* Unified bubble motion for every custom option popover in the desktop client. */
.option-popover {
  --option-popover-enter-x: 0px;
  --option-popover-enter-y: 9px;
  --option-popover-origin: center bottom;
  transform-origin: var(--option-popover-origin);
  will-change: opacity, scale, translate, filter;
}
.option-popover.is-opening {
  animation: option-popover-bubble-in .31s cubic-bezier(.2, 1.32, .34, 1) both;
}
.option-popover.is-closing {
  pointer-events: none;
  animation: option-popover-bubble-out .19s cubic-bezier(.55, 0, .8, .45) both;
}
.option-popover.is-opening > * {
  animation: option-popover-item-in .23s .035s cubic-bezier(.2, 1.22, .35, 1) both;
}
.option-popover.is-opening > :nth-child(2) { animation-delay: .065s; }
.option-popover.is-opening > :nth-child(3) { animation-delay: .095s; }
.workspace-menu.option-popover {
  --option-popover-enter-y: -11px;
  --option-popover-origin: 34px top;
}
.conversation-actions-menu.option-popover {
  --option-popover-enter-x: -10px;
  --option-popover-enter-y: 0px;
  --option-popover-origin: left center;
}
.account-menu.option-popover,
.model-menu.option-popover,
.batch-history-panel.option-popover {
  --option-popover-enter-y: 10px;
  --option-popover-origin: right bottom;
}
.batch-quick-panel.option-popover {
  --option-popover-enter-y: -10px;
  --option-popover-origin: 28px top;
}
.flow-node-menu.option-popover {
  --option-popover-enter-y: 12px;
  --option-popover-origin: center center;
}
.flow-context-menu.option-popover {
  --option-popover-enter-y: -8px;
  --option-popover-origin: left top;
}
@keyframes option-popover-bubble-in {
  0% {
    opacity: 0;
    scale: .74;
    translate: var(--option-popover-enter-x) var(--option-popover-enter-y);
    filter: blur(3px);
  }
  58% {
    opacity: 1;
    scale: 1.04;
    translate: 0 -2px;
    filter: blur(0);
  }
  79% { scale: .988; translate: 0 1px; }
  100% { opacity: 1; scale: 1; translate: 0 0; filter: blur(0); }
}
@keyframes option-popover-bubble-out {
  0% { opacity: 1; scale: 1; translate: 0 0; filter: blur(0); }
  32% { scale: 1.025; translate: 0 -2px; }
  100% {
    opacity: 0;
    scale: .76;
    translate: var(--option-popover-enter-x) var(--option-popover-enter-y);
    filter: blur(3px);
  }
}
@keyframes option-popover-item-in {
  from { opacity: 0; scale: .94; translate: 0 4px; }
  to { opacity: 1; scale: 1; translate: 0 0; }
}

.workspace-menu-item,
.sidebar-tool-submenu button,
.conversation-actions-menu button,
.account-menu-item,
.provider-option,
.model-option,
.canvas-workflow-item,
.flow-context-menu button,
.flow-node-results button {
  transition: color .16s ease, background .16s ease, border-color .16s ease,
    translate .18s cubic-bezier(.2, 1.2, .35, 1), scale .18s cubic-bezier(.2, 1.2, .35, 1),
    box-shadow .18s ease;
}
.workspace-menu-item:hover,
.sidebar-tool-submenu button:hover,
.conversation-actions-menu button:hover,
.account-menu-item:hover,
.provider-option:hover,
.model-option:hover,
.canvas-workflow-item:hover,
.flow-context-menu button:hover:not(:disabled),
.flow-node-results button:hover {
  scale: 1.012;
  translate: 3px 0;
}
@keyframes image-quick-panel-in {
  from { opacity: 0; transform: translateY(5px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .image-quick-panel { animation-duration: .01ms; }
  .option-popover.is-opening,
  .option-popover.is-closing,
  .option-popover.is-opening > * { animation-duration: .01ms; }
  .sidebar-tool-submenu,
  .canvas-workflow-menu,
  .workspace-menu-item,
  .sidebar-tool-submenu button,
  .conversation-actions-menu button,
  .account-menu-item,
  .provider-option,
  .model-option,
  .canvas-workflow-item,
  .flow-context-menu button,
  .flow-node-results button { transition-duration: .01ms; }
  .image-quick-panel label,
  .image-quick-panel select { transition: none; }
}
.image-parameter-keyword,
.message-keyword-drop-marker {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 1px 3px;
  padding: 1px 8px;
  overflow: hidden;
  border: 1px solid #47a87d;
  border-radius: 999px;
  color: #075f43;
  background: #e9f8f0;
  box-shadow: 0 0 0 1px rgba(71, 168, 125, .1);
  font-size: 12px;
  font-weight: 750;
  line-height: 20px;
  vertical-align: middle;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: element;
}
.image-parameter-keyword::after {
  position: absolute;
  inset: -35% auto -35% -42%;
  width: 36%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .85), transparent);
  content: "";
  transform: skewX(-18deg);
  animation: image-parameter-shimmer 2.6s ease-in-out infinite;
}
.image-parameter-keyword:active { cursor: grabbing; }
.image-parameter-keyword.is-dragging { opacity: .25; }
.image-parameter-keyword.keyword-updated { animation: image-parameter-pop .3s ease-out; }
.image-parameter-keyword.message-history-keyword {
  cursor: text;
  user-select: text;
  -webkit-user-drag: none;
}
.image-parameter-keyword.message-history-keyword:active { cursor: text; }
.message-keyword-drop-marker {
  border-style: dashed;
  opacity: .48;
  color: transparent;
  background: rgba(71, 168, 125, .12);
  pointer-events: none;
}
@keyframes image-parameter-shimmer {
  0%, 55% { left: -42%; }
  100% { left: 122%; }
}
@keyframes image-parameter-pop {
  0% { transform: scale(.92); }
  70% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
.composer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.composer-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.composer-actions { display: flex; align-items: center; gap: 8px; }
.chat-image-input {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.feature-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #536159;
  background: #f8faf9;
  font-size: 13px;
  white-space: nowrap;
}
.feature-toggle:hover { border-color: #9abaaa; background: #f0f6f3; }
.feature-toggle[aria-pressed="true"] {
  border-color: #72aa90;
  color: #0b6d4c;
  background: #e9f6ef;
  box-shadow: inset 0 0 0 1px #b9ddca;
}
.feature-toggle.needs-config {
  border-style: dashed;
  color: #8a6a1f;
  background: #fffaf0;
}
.feature-toggle.chat-image-picker-compact {
  display: grid;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}
.attachment-queue,
.message-attachments {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.attachment-queue {
  padding: 2px 3px 0;
}
.attachment-notice {
  flex-basis: 100%;
  margin: 0;
  padding: 6px 8px;
  border-radius: 8px;
  color: #7a5d18;
  background: #fff8e8;
  font-size: 11px;
}
.multi-image-wait-hint {
  display: block;
  width: fit-content;
  margin: 0 0 7px;
  font-size: 12px;
  font-weight: 750;
}
.multi-image-wait-hint.hidden { display: none; }
.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 310px;
  padding: 6px 8px;
  border: 1px solid #dbe5df;
  border-radius: 9px;
  color: #35483e;
  background: #f7faf8;
  font-size: 11px;
}
.attachment-chip.image-attachment {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  min-width: 190px;
  max-width: 360px;
  min-height: 62px;
  padding: 5px 7px 5px 5px;
}
.attachment-chip .attachment-thumbnail-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #eaf1ed;
  cursor: zoom-in;
}
.attachment-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.attachment-preview-fallback { display: none; }
.attachment-chip.preview-unavailable .attachment-thumbnail { display: none; }
.attachment-chip.preview-unavailable .attachment-preview-fallback {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: white;
  background: var(--green);
  font-size: 11px;
  font-weight: 800;
}
.attachment-details {
  display: grid;
  align-content: center;
  min-width: 0;
  gap: 3px;
}
.attachment-chip.image-attachment > .attachment-remove {
  align-self: start;
  margin-top: 1px;
}
.attachment-kind {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  color: white;
  background: var(--green);
  font-size: 10px;
  font-weight: 800;
}
.attachment-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-size { color: var(--muted); white-space: nowrap; }
.attachment-chip button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #6c7b73;
  background: transparent;
}
.attachment-chip button:hover { color: #b42318; background: #fff0ee; }
.attachment-chip .attachment-thumbnail-wrap:hover { background: #dfeae4; }
.attachment-chip.pending-image-attachment {
  position: relative;
  display: block;
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  min-height: 72px;
  padding: 3px;
  cursor: grab;
  transition: opacity .14s ease, transform .14s ease, border-color .14s ease;
}
.attachment-chip.pending-image-attachment:active { cursor: grabbing; }
.attachment-chip.pending-image-attachment .attachment-thumbnail-wrap {
  width: 64px;
  height: 64px;
}
.attachment-chip.pending-image-attachment .attachment-remove {
  position: absolute;
  z-index: 4;
  top: -6px;
  right: -6px;
  width: 21px;
  height: 21px;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 50%;
  color: white;
  background: rgba(20, 38, 29, .82);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.attachment-chip.pending-image-attachment .attachment-remove:hover {
  color: white;
  background: #b42318;
}
.attachment-chip.pending-image-attachment.attachment-sort-placeholder {
  border-color: #3f9f75;
  border-style: dashed;
  opacity: .34;
  background: #dff3e8;
  transform: scale(.96);
}
.generated-image-card {
  width: min(650px, calc(100vw - 420px));
}
.generated-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.generated-image-grid.single { grid-template-columns: minmax(0, 1fr); }
.generated-image-result {
  overflow: hidden;
  border: 1px solid #e0e5e2;
  border-radius: 12px;
  background: #fff;
}
.generated-image-grid button {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #f5f7f6;
  cursor: zoom-in;
}
.generated-image-grid img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
}
.generated-image-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}
.chat-image-download-all {
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px solid #b9d7c8;
  border-radius: 999px;
  color: #0b6849;
  background: #edf8f2;
  font-size: 11px;
  font-weight: 750;
}
.chat-image-download-all:hover:not(:disabled) {
  border-color: #65a987;
  background: #dff3e8;
}
.chat-image-download-all:disabled { cursor: wait; opacity: .62; }
.generated-file-list,
.live-generated-files {
  display: grid;
  gap: 8px;
  width: min(560px, calc(100vw - 420px));
}
.generated-file-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dce4df;
  border-radius: 11px;
  color: #2d3d34;
  background: #f8faf9;
  text-decoration: none;
}
.generated-file-card:hover {
  border-color: #9abaaa;
  background: #f0f7f3;
}
.generated-file-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: white;
  background: var(--green);
  font-size: 18px;
}
.generated-file-card strong,
.generated-file-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.generated-file-card small {
  margin-top: 3px;
  color: var(--muted);
}
.generated-file-download {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}
.selector-wrap { position: relative; }
.selector-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #405047;
  background: #f8faf9;
  white-space: nowrap;
}
.selector-trigger { display: grid; grid-template-columns: auto auto; }
.selector-trigger > span:first-child { color: var(--muted); font-size: 11px; }
.selector-trigger strong { color: #26372e; font-size: 12px; }
.selector-trigger:hover { border-color: #a9c4b6; background: #f1f7f4; }
.model-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 10;
  border: 1px solid #d8e2dc;
  border-radius: 13px;
  background: white;
  box-shadow: 0 18px 48px #10241b25;
}
.model-menu {
  display: grid;
  grid-template-columns: 150px 290px;
  min-height: 170px;
  overflow: hidden;
}
.model-menu > div { padding: 10px; }
.model-menu > div + div { border-left: 1px solid var(--line); }
.menu-label {
  padding: 4px 7px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.provider-options, .model-options { display: grid; gap: 4px; }
.provider-option, .model-option {
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 9px;
  color: #314139;
  background: transparent;
  text-align: left;
}
.provider-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.provider-option::after { content: "›"; color: #849189; font-size: 18px; }
.provider-option:hover, .provider-option.active,
.model-option:hover, .model-option.active { background: #edf6f1; color: var(--green-dark); }
.model-option strong, .model-option span { display: block; }
.model-option span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.menu-placeholder { padding: 46px 12px; color: var(--muted); font-size: 12px; text-align: center; }
.image-home {
  display: grid;
  place-items: center;
  padding: 40px;
  background:
    radial-gradient(circle at 50% 42%, rgba(35, 139, 100, .08), transparent 32%),
    #fff;
}
.image-home-content {
  margin-top: -6vh;
  text-align: center;
}
.image-home-kicker,
.batch-eyebrow {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}
.image-home h1 {
  margin: 16px 0 10px;
  color: #20352a;
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 750;
  letter-spacing: -.04em;
}
.image-home p { margin: 0; color: var(--muted); font-size: 14px; }

.batch-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #f5f8f6;
}
.batch-workspace .batch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 17px 26px;
  background: rgba(255, 255, 255, .94);
}
.batch-header > .points-pool { flex: 0 0 auto; }
.batch-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.batch-header-actions > .points-pool { flex: 0 0 auto; }
.batch-image-transport {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 4px 9px;
  min-width: 286px;
}
.batch-image-transport > span {
  color: #6c7d74;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .06em;
}
.batch-image-transport > div {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  padding: 3px;
  border: 1px solid #d7e2dc;
  border-radius: 11px;
  background: #edf3f0;
}
.batch-image-transport button {
  min-height: 30px;
  padding: 5px 11px;
  border: 0;
  border-radius: 8px;
  color: #5c6e64;
  background: transparent;
  font-size: 11px;
  font-weight: 760;
}
.batch-image-transport button[aria-pressed="true"] {
  color: #fff;
  background: #176b4d;
  box-shadow: 0 3px 10px rgba(23, 107, 77, .2);
}
.batch-image-transport button:disabled { cursor: not-allowed; opacity: .44; }
.batch-image-transport > small {
  grid-column: 1 / -1;
  min-height: 14px;
  color: #768a7f;
  font-size: 9px;
  text-align: right;
}
.batch-image-transport > small[data-state="ready"] { color: #176b4d; }
.batch-image-transport > small[data-state="warning"] { color: #9a6a16; }
.batch-image-transport > small[data-state="error"] { color: #a03232; }
.batch-header-actions.is-local #batch-points-pool { opacity: .52; }
.local-image-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.local-image-transport {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 4px 9px;
  min-width: 276px;
}
.local-image-transport > span {
  color: #6c7d74;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .06em;
}
.local-image-transport > div {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  padding: 3px;
  border: 1px solid #d7e2dc;
  border-radius: 11px;
  background: #edf3f0;
}
.local-image-transport button {
  min-height: 30px;
  padding: 5px 11px;
  border: 0;
  border-radius: 8px;
  color: #5c6e64;
  background: transparent;
  font-size: 11px;
  font-weight: 760;
}
.local-image-transport button[aria-pressed="true"] {
  color: #fff;
  background: #176b4d;
  box-shadow: 0 3px 10px rgba(23, 107, 77, .2);
}
.local-image-transport button:disabled { cursor: not-allowed; opacity: .44; }
.fixed-image-transport button:disabled { cursor: default; opacity: 1; }
.fixed-image-transport > div { grid-template-columns: 1fr; }
.upscale-header-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}
.upscale-header-controls .local-image-transport { min-width: 210px; }
.upscale-scale-control { min-width: 252px; }
.upscale-scale-control > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.upscale-scale-control button:disabled { cursor: wait; opacity: .58; }
.local-image-transport > small {
  grid-column: 1 / -1;
  min-height: 14px;
  color: #768a7f;
  font-size: 9px;
  text-align: right;
}
.local-image-transport > small[data-state="ready"] { color: #176b4d; }
.local-image-transport > small[data-state="warning"] { color: #9a6a16; }
.local-image-transport > small[data-state="error"] { color: #a03232; }
.workspace .batch-header h2 {
  display: block;
  margin: 4px 0 0;
  font-size: 21px;
}
.batch-secondary-action {
  padding: 9px 13px;
  border: 1px solid #d7e1db;
  border-radius: 10px;
  color: #33483d;
  background: white;
  font-size: 12px;
  font-weight: 650;
}
.batch-secondary-action:hover:not(:disabled) {
  border-color: #9bbbab;
  color: var(--green-dark);
  background: #f1f8f4;
}
.batch-secondary-action:disabled { cursor: not-allowed; opacity: .45; }
.batch-canvas {
  display: grid;
  grid-template-columns: minmax(290px, .55fr) minmax(0, 1.45fr);
  gap: 16px;
  padding: 20px 24px 30px;
  overflow: auto;
}
.batch-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid #dfe7e2;
  border-radius: 17px;
  background: white;
  box-shadow: 0 8px 24px rgba(22, 48, 35, .035);
}
.batch-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.batch-card-heading > div {
  display: flex;
  align-items: center;
  gap: 9px;
}
.batch-card h3 { margin: 0; color: #24392e; font-size: 16px; }
.batch-step {
  color: #94a69c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}
.batch-card-description {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 12px;
}
.batch-input-card {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
}
.batch-input-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: 16px;
}
.batch-upload-summary {
  color: #718078;
  font-size: 11px;
  white-space: nowrap;
}
.batch-image-slots {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  min-height: 260px;
}
.batch-image-slots:not(:has(.batch-image-slot:not(.has-image))) {
  flex: 0 0 auto;
  min-height: 0;
}
.batch-image-slot {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px dashed #b8c9bf;
  border-radius: 14px;
  background: #f8faf9;
  aspect-ratio: 4 / 3;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.batch-image-slot:not(.has-image) {
  height: 100%;
  min-height: 260px;
  aspect-ratio: auto;
}
.batch-image-slot:hover,
.batch-image-slot.drag-active {
  border-color: #4b9374;
  background: #f0f7f3;
  box-shadow: 0 0 0 3px rgba(23, 107, 77, .08);
}
.batch-image-slot.has-image {
  align-self: start;
  width: 100%;
  border-style: solid;
  background:
    linear-gradient(45deg, #edf2ef 25%, transparent 25%),
    linear-gradient(-45deg, #edf2ef 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #edf2ef 75%),
    linear-gradient(-45deg, transparent 75%, #edf2ef 75%),
    #f8faf9;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}
.batch-slot-picker {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  color: #5f7067;
  background: transparent;
}
.batch-slot-placeholder { display: grid; justify-items: center; gap: 8px; }
.batch-slot-plus {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #d7e2dc;
  border-radius: 12px;
  color: var(--green);
  background: white;
  font-size: 21px;
}
.batch-slot-placeholder strong { color: #41564a; font-size: 12px; }
.batch-slot-placeholder small { color: #87968e; font-size: 10px; }
.batch-slot-preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.batch-slot-order {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 4px 7px;
  border-radius: 999px;
  color: white;
  background: rgba(12, 30, 21, .72);
  font-size: 9px;
  font-weight: 800;
}
.batch-slot-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 50%;
  color: white;
  background: rgba(12, 30, 21, .72);
  font-size: 14px;
}
.batch-slot-remove:hover { background: #9b2c2c; }
.batch-slot-resolution {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  overflow: hidden;
  padding: 5px 8px;
  border-radius: 7px;
  color: rgba(255, 255, 255, .9);
  background: rgba(12, 30, 21, .58);
  backdrop-filter: blur(4px);
  font-size: 9px;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.batch-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.batch-settings-column {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-content: start;
  height: 100%;
}
.batch-parameter-control {
  position: relative;
  z-index: 24;
}
.batch-parameter-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 48px;
  padding: 11px 15px;
  border: 2px solid var(--green);
  border-radius: 13px;
  color: #244237;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 0 0 3px rgba(23, 107, 77, .08), 0 8px 22px rgba(22, 48, 35, .09);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}
.batch-parameter-toggle:hover:not(:disabled),
.batch-parameter-toggle[aria-expanded="true"] {
  border-color: #8eb8a4;
  color: var(--green-dark);
  background: #f5fbf8;
}
.batch-parameter-toggle:disabled { cursor: not-allowed; opacity: .55; }
.batch-quick-panel {
  position: absolute;
  z-index: 36;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  min-width: min(460px, calc(100vw - 340px));
  padding: 10px;
  border: 1px solid #cfdad5;
  border-radius: 13px;
  background: rgba(255, 255, 255, .99);
  box-shadow: 0 16px 42px rgba(20, 46, 33, .18);
}
.batch-quick-panel label {
  display: grid;
  gap: 5px;
  margin: 0;
  color: #626f68;
  font-size: 10px;
}
.batch-quick-panel select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid #d8e1dc;
  border-radius: 8px;
  outline: none;
  color: #24392e;
  background: white;
}
.batch-quick-panel select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 107, 77, .08);
}
.batch-parameter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 17px;
}
.batch-fixed-model {
  margin: 12px 0 0;
  color: #718078;
  font-size: 10px;
  line-height: 1.55;
}
.batch-parameter-grid label {
  gap: 7px;
  margin: 0;
  color: #5d6d64;
  font-size: 11px;
}
.batch-parameter-grid select {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #d8e1dc;
  border-radius: 10px;
  outline: none;
  color: #24392e;
  background: #fafcfb;
}
.batch-parameter-grid select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 107, 77, .08);
}
.batch-parameter-grid select:disabled {
  cursor: not-allowed;
  color: #52635a;
  background: #eef2f0;
  opacity: 1;
}
.batch-prompt-count {
  color: #87968e;
  font-size: 10px;
  white-space: nowrap;
}
.batch-prompt-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.batch-prompt-card .batch-card-heading,
.video-prompt-card .video-sidebar-heading {
  padding-right: 34px;
}
.batch-prompt-editor {
  flex: 1;
  min-height: 142px;
  margin-top: 16px;
  padding: 13px 14px;
  overflow: auto;
  border: 1px solid #d8e1dc;
  border-radius: 10px;
  outline: none;
  color: #24392e;
  background: #fafcfb;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.batch-prompt-editor:empty::before {
  color: #9aa79f;
  content: attr(data-placeholder);
  pointer-events: none;
}
.batch-prompt-editor:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 107, 77, .08);
}
.batch-prompt-editor[aria-disabled="true"] {
  cursor: not-allowed;
  background: #f1f4f2;
}
.batch-start-button {
  align-self: stretch;
  width: 100%;
  min-height: 44px;
  padding: 11px 22px;
  border: 0;
  border-radius: 11px;
  color: white;
  background: var(--green);
  font-weight: 750;
}
.batch-start-button:hover { background: var(--green-dark); }
.batch-start-button:disabled {
  cursor: not-allowed;
  background: rgba(23, 107, 77, .42);
  box-shadow: none;
}
.batch-start-button:disabled:hover { background: rgba(23, 107, 77, .42); }
.batch-output-card {
  grid-column: 1 / -1;
  grid-row: 2;
  min-height: 270px;
}
.batch-output-grid {
  display: grid;
  place-items: center;
  min-height: 205px;
  margin-top: 16px;
  border: 1px dashed #cbd7d0;
  border-radius: 13px;
  background: #fafcfb;
}
.batch-output-grid.has-results {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  place-items: stretch;
  gap: 14px;
  padding: 14px;
  border-style: solid;
}
.batch-output-item {
  overflow: hidden;
  border: 1px solid #dce5df;
  border-radius: 12px;
  background: white;
}
.batch-output-preview {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #f2f5f3;
  cursor: zoom-in;
}
.batch-output-preview:focus-visible {
  outline: 3px solid #2d8a68;
  outline-offset: -3px;
}
.batch-output-preview img {
  transition: transform .18s ease;
}
.batch-output-preview:hover img { transform: scale(1.018); }
.batch-output-placeholder {
  display: grid;
  place-content: center;
  min-height: 218px;
  border: 1px solid #dce5df;
  border-radius: 12px;
  color: rgba(72, 94, 82, .48);
  background: white;
  text-align: center;
}
.batch-output-placeholder span {
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .12em;
}
.batch-output-placeholder small {
  margin-top: 8px;
  color: rgba(92, 112, 101, .42);
  font-size: 10px;
}
.batch-output-placeholder.is-generating {
  animation: batch-output-pulse 1.7s ease-in-out infinite;
}
.image-generation-timing {
  display: block;
  padding: 7px 9px;
  border-top: 1px solid rgba(211, 225, 217, .74);
  color: #708178;
  background: rgba(250, 253, 251, .96);
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.image-generation-timing strong { color: #176b4d; font-weight: 800; }

/* Shared generation wait copy and completed-image download controls. */
.image-generation-wait-hint:not([hidden]) {
  display: block; margin: 6px 0 0; font-size: 11px; font-weight: 400;
  line-height: 1.6; text-align: center; color: #626c7b; white-space: normal;
}
html.lg-shell #app-view .image-generation-wait-hint:not([hidden]) { color: #626c7b !important; }
html.lg-dark #app-view .image-generation-wait-hint:not([hidden]) { color: #b7c2d1 !important; }
.image-generation-wait-hint[hidden], .gc-delivery[hidden] { display: none !important; }
.image-delivery-state {
  display: grid; justify-items: center; gap: 7px; max-width: 100%; padding: 8px;
  text-align: center; font-size: 12px; line-height: 1.6; color: inherit;
}
.image-delivery-state strong { font-size: 12px; font-weight: 550; }
.image-delivery-state small { font-size: 10px; color: inherit; }
.image-delivery-state progress { width: 140px; max-width: 100%; height: 5px; accent-color: #007aff; }
.image-delivery-state button { pointer-events: auto; }
.gc-delivery { margin: 0 14px 12px; }
html.lg-shell #app-view .main-aspect-output-item.is-loading {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 8px; min-height: 230px; padding: 16px 8px;
}
html.lg-shell #app-view .main-aspect-output-item.is-loading > strong { position: static; }
html.lg-shell #app-view .main-aspect-output-item.is-loading .image-generation-timing {
  position: static; margin: 0; padding: 0; background: transparent;
}
html.lg-shell #app-view .main-aspect-delivery-label { background: transparent; color: inherit; padding: 0; }
html.lg-shell #app-view .gc-run-timing { flex-wrap: wrap; }
html.lg-shell #app-view .gc-run-timing .image-generation-wait-hint { flex-basis: 100%; }
html.lg-shell #app-view .image-delivery-state :is(strong,small) { color: #44536a !important; }
html.lg-shell.lg-dark #app-view .image-delivery-state :is(strong,small) { color: #c8d4e5 !important; }
html.lg-shell.lg-dark #app-view .gc-run-timing { background: #25364a !important; color: #d9e5f5 !important; }
html.lg-shell.lg-dark #app-view .gc-run-timing :is(span,strong) { color: #d9e5f5 !important; }
html.lg-shell #app-view .creative-rewrite-output-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; padding: 14px 10px; min-height: 270px; height: auto; aspect-ratio: auto;
  background: #f5f7fa !important; color: #59677b !important;
}
html.lg-shell.lg-dark #app-view .creative-rewrite-output-placeholder { background: #252e3b !important; color: #c8d4e5 !important; }
html.lg-shell #app-view .creative-rewrite-output-placeholder:has(.image-delivery-state) > .batch-generating-spinner { display: none; }
html.lg-shell #app-view .creative-rewrite-output-placeholder > .image-generation-wait-hint { margin-top: 0; flex-shrink: 0; }
.image-generation-timing.is-complete { color: #587166; }
.image-generation-timing.is-running {
  border-top: 0;
  color: #8b6b25;
  background: transparent;
}
.image-generation-timing.is-running strong { color: #a17212; }
.batch-output-placeholder .image-generation-timing {
  margin-top: 8px;
  padding: 0;
  font-size: 10px;
  letter-spacing: 0;
}
.main-aspect-output-item > .image-generation-timing {
  color: #708178;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.main-aspect-output-item.is-loading .image-generation-timing {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
}
.generated-image-result .image-generation-timing { border-top: 0; }
.batch-output-placeholder .batch-generating-spinner {
  display: block;
  width: 25px;
  height: 25px;
  margin: 0 auto 12px;
  border: 3px solid rgba(23, 107, 77, .15);
  border-top-color: #1b7a58;
  border-radius: 50%;
  font-size: 0;
  letter-spacing: 0;
  animation: batch-generating-spin .82s linear infinite;
}
@keyframes batch-generating-spin {
  to { transform: rotate(360deg); }
}
.batch-output-placeholder.is-failed {
  color: rgba(150, 66, 66, .66);
  background: #fffafa;
}
@keyframes batch-output-pulse {
  0%, 100% {
    border-color: #dce5df;
    background: #fff;
    opacity: .62;
  }
  50% {
    border-color: #aecbbb;
    background: #f4faf7;
    opacity: 1;
  }
}
.batch-output-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #f2f5f3;
}
.batch-output-item > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  color: #52635a;
  font-size: 11px;
}
.batch-output-item a,
.inline-image-download {
  color: var(--green);
  font-weight: 750;
}
.inline-image-download {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.inline-image-download:disabled { cursor: wait; opacity: .58; }
.batch-job-status {
  color: #718078;
  font-size: 11px;
  white-space: nowrap;
}
.batch-job-status[data-status="running"],
.batch-job-status[data-status="queued"] { color: #9a6a16; }
.batch-job-status[data-status="completed"] { color: var(--green); }
.batch-job-status[data-status="failed"] { color: #a03232; }
.batch-output-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}
.batch-job-elapsed {
  padding-left: 2px;
  color: #617269;
  font-size: 11px;
  white-space: nowrap;
}
.batch-history-control {
  position: relative;
}
.batch-history-panel {
  position: absolute;
  z-index: 75;
  right: 0;
  bottom: calc(100% + 10px);
  width: min(440px, calc(100vw - 340px));
  max-height: min(520px, 65vh);
  padding: 10px;
  overflow: auto;
  border: 1px solid #d7e1db;
  border-radius: 14px;
  background: rgba(255, 255, 255, .99);
  box-shadow: 0 18px 52px rgba(15, 42, 29, .2);
}
.batch-history-loading,
.batch-history-empty {
  padding: 26px 16px;
  color: #718078;
  font-size: 12px;
  text-align: center;
}
.batch-history-item {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid #e0e8e3;
  border-radius: 11px;
  background: #fafcfb;
}
.batch-history-item + .batch-history-item { margin-top: 9px; }
.batch-history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #718078;
  font-size: 10px;
}
.batch-history-meta strong { color: #30483b; font-size: 11px; }
.batch-history-thumbnails {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.batch-history-thumbnails img {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border: 1px solid #dbe4df;
  border-radius: 7px;
  object-fit: cover;
  background: #eef3f0;
}
.batch-history-download {
  justify-self: end;
  padding: 6px 10px;
  border: 1px solid #bfd4c8;
  border-radius: 8px;
  color: #0f694a;
  background: white;
  font-size: 10px;
  font-weight: 750;
}
.batch-history-download:hover { background: #edf7f2; }

.request-limit-modal,
.image-history-modal {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 28, 19, 0.45);
  backdrop-filter: blur(3px);
}
.request-limit-modal.hidden,
.image-history-modal.hidden { display: none; }
.request-limit-card,
.image-history-card {
  width: min(520px, calc(100vw - 40px));
  max-height: min(760px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid #d8e6df;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(4, 30, 18, 0.28);
}
.request-limit-card { padding: 24px; text-align: center; }
.request-limit-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #fff1dc;
  color: #a65a00;
  font-weight: 800;
  font-size: 20px;
}
.request-limit-card h3 { margin: 0 0 8px; color: #19382a; }
.request-limit-card > p { margin: 0 0 16px; color: #65766d; }
.request-limit-list { display: grid; gap: 8px; margin-bottom: 18px; text-align: left; }
.request-limit-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 13px;
  border-radius: 12px;
  background: #f3f7f5;
}
.request-limit-item-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.request-limit-list span { color: #d17610; white-space: nowrap; }
.request-limit-item > button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #e7b7ae;
  border-radius: 9px;
  color: #a64235;
  background: #fff;
  cursor: pointer;
}
.request-limit-item > button:hover { background: #fff0ed; }
.request-limit-item > button:disabled { opacity: 0.55; cursor: wait; }
.request-limit-safeguard {
  margin: -5px 0 16px !important;
  color: #7b8c83 !important;
  font-size: 12px;
}
.request-limit-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.request-limit-actions > button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
}
.request-limit-cancel-all {
  color: #a64235;
  border-color: #edc7c0 !important;
  background: #fff6f4;
}
.request-limit-close { color: #fff; background: #147a57; }
.request-limit-actions > button:disabled { opacity: 0.55; cursor: wait; }
.image-history-card { width: min(900px, calc(100vw - 40px)); }
.image-history-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #e3ebe7;
}
.image-history-card > header span { color: #678074; font-size: 12px; }
.image-history-card > header h2 { margin: 2px 0 0; font-size: 20px; color: #17372a; }
.image-history-card > header button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 11px;
  background: #f1f6f3;
  font-size: 22px;
  cursor: pointer;
}
.image-history-list { max-height: calc(100vh - 170px); overflow: auto; padding: 16px 20px 22px; }
.image-history-empty { padding: 42px 12px; text-align: center; color: #708178; }
.image-history-record { padding: 14px; border: 1px solid #e1ebe6; border-radius: 15px; }
.image-history-record + .image-history-record { margin-top: 12px; }
.image-history-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.image-history-meta span { color: #65776e; font-size: 12px; }
.image-history-thumbnails { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 11px; }
.image-history-download-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.image-history-change-location { color: #0f694a; border-color: #bfd4c8; background: #f6fbf8; }
.image-history-save-status {
  overflow: hidden;
  margin: 8px 0 0;
  color: #65776e;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.image-history-thumbnail {
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dbe7e1;
  border-radius: 10px;
  background: #f6f9f7;
  cursor: zoom-in;
}
.image-history-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.batch-output-empty { color: #85948c; text-align: center; }
.batch-output-empty > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  border-radius: 14px;
  color: #568c73;
  background: #edf6f1;
  font-size: 18px;
}
.batch-output-empty strong { display: block; color: #54655c; font-size: 13px; }
.batch-output-empty p { margin: 6px 0 0; font-size: 11px; }
.batch-image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 3200;
  display: grid;
  place-items: center;
  padding: 28px 76px 24px;
  background: rgba(3, 10, 7, .9);
  animation: batch-image-preview-in .16s ease-out;
}
.batch-image-preview-stage {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: min(100%, 1600px);
  height: 100%;
  min-height: 0;
}
.batch-image-preview-viewport {
  position: relative;
  display: grid;
  width: 100%;
  height: 0;
  min-height: 0;
  overflow: hidden;
  flex: 1;
  cursor: grab;
  touch-action: none;
  place-items: center;
}
.batch-image-preview-viewport.is-dragging { cursor: grabbing; }
.batch-image-preview-viewport img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  border-radius: 10px;
  image-rendering: auto;
  user-select: none;
  will-change: width, height, transform;
  background: #101411;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .46);
}
.batch-image-preview-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  display: none;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  color: rgba(255, 255, 255, .82);
  background: rgba(10, 18, 14, .76);
  transform: translate(-50%, -50%);
  font-size: 12px;
  pointer-events: none;
  backdrop-filter: blur(8px);
}
.batch-image-preview-loading::before {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, .28);
  border-top-color: #63d6a6;
  border-radius: 50%;
  content: "";
  animation: batch-image-preview-spin .72s linear infinite;
}
.batch-image-preview-modal.is-loading .batch-image-preview-loading { display: flex; }
.batch-image-preview-modal.is-loading .batch-image-preview-viewport img { visibility: hidden; }
.batch-image-preview-stage p {
  min-height: 18px;
  margin: 0;
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
}
.batch-image-preview-help {
  color: rgba(255, 255, 255, .48);
  font-size: 10px;
}
.batch-image-preview-status {
  min-height: 14px;
  color: rgba(255, 255, 255, .68);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
@keyframes batch-image-preview-spin { to { transform: rotate(360deg); } }

/* AI video workspace */
.video-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 2px;
}
.video-sidebar-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #ffffff18;
  border-radius: 12px;
  background: #ffffff08;
  transition: border-color .16s ease, background .16s ease;
}
.video-sidebar-card.drag-active {
  border-color: #59c99c;
  background: #2b9f7124;
}
.video-sidebar-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 7px;
}
.video-sidebar-heading strong { color: #eef7f2; font-size: 12px; }
.video-sidebar-heading span { color: #91a69b; font-size: 9px; white-space: nowrap; }
.video-upload-button {
  width: 100%;
  padding: 9px 10px;
  border: 1px dashed #ffffff35;
  border-radius: 9px;
  color: #dcebe4;
  background: #ffffff08;
  font-size: 11px;
}
.video-upload-button:hover { border-color: #64b895; background: #ffffff10; }
.video-upload-button:disabled { cursor: not-allowed; }
.video-reference-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.video-reference-item {
  position: relative;
  min-width: 0;
  min-height: 52px;
  overflow: hidden;
  border: 1px solid #ffffff14;
  border-radius: 8px;
  background: #071a11;
}
.video-reference-item img {
  display: block;
  width: 100%;
  height: 64px;
  object-fit: cover;
}
.video-reference-file {
  display: grid;
  place-items: center;
  min-height: 54px;
  padding: 15px 6px 6px;
  color: #b8cbc1;
  font-size: 9px;
  text-align: center;
  word-break: break-all;
}
.video-reference-item button {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: white;
  background: #081811c7;
  font-size: 12px;
}
.video-prompt-card { position: relative; flex: 1 1 150px; min-height: 140px; }
.video-prompt-card textarea {
  min-height: 105px;
  height: 100%;
  margin: 0;
  resize: vertical;
  border-color: #ffffff20;
  color: white;
  background: #071a119c;
  font-size: 11px;
  line-height: 1.6;
}
.video-prompt-card textarea::placeholder { color: #84988e; }
.video-parameter-card { gap: 10px; }
.video-parameter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.video-parameter-grid label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #a9bcb2;
  font-size: 9px;
}
.video-parameter-grid select,
.video-parameter-grid input {
  width: 100%;
  min-width: 0;
  height: 31px;
  padding: 0 7px;
  border: 1px solid #ffffff20;
  border-radius: 8px;
  color: #edf7f2;
  background: #071a119c;
  font-size: 10px;
}
.video-parameter-grid option { color: #13241b; background: white; }
.video-parameter-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  color: #c7d8cf;
  font-size: 10px;
}
.video-parameter-toggles label { display: inline-flex; align-items: center; gap: 5px; }
.video-parameter-toggles input { accent-color: #2aa275; }
.video-point-cost {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3px 8px;
  padding: 8px 9px;
  border: 1px solid #50b58b35;
  border-radius: 9px;
  color: #a9bcb2;
  background: #2b9f7116;
  font-size: 9px;
}
.video-point-cost strong { color: #79ddb3; font-size: 12px; }
.video-point-cost small { grid-column: 1 / -1; color: #82988d; font-size: 8px; }
.video-generate-button {
  flex: 0 0 auto;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 11px;
  color: white;
  background: linear-gradient(135deg, #2a9b70, #16704e);
  box-shadow: 0 8px 24px #06150e4d;
  font-weight: 750;
}
.video-generate-button.is-cancel {
  background: linear-gradient(135deg, #cf3c35, #9f241f);
}
.video-workspace { display: grid; grid-template-rows: auto minmax(0, 1fr); background: #f6f8f7; }
.workspace .video-workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  background: white;
}
.workspace .video-workspace-header h2 { display: block; margin: 3px 0 0; }
.video-workspace-header p { margin: 6px 0 0; color: #75837b; font-size: 11px; }
.video-workspace-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-width: 0;
}
.video-task-tabs {
  display: flex;
  align-items: stretch;
  gap: 5px;
  padding: 4px;
  border: 1px solid #dce7e1;
  border-radius: 13px;
  background: #f5f9f7;
}
.video-task-tabs button {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 0 6px;
  min-width: 76px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #4c6257;
  background: transparent;
  text-align: left;
}
.video-task-tabs button:hover { background: #eaf3ee; }
.video-task-tabs button.is-active {
  border-color: #b8d8c8;
  color: #145f43;
  background: white;
  box-shadow: 0 5px 15px rgba(24, 93, 65, .1);
}
.video-task-tabs button i {
  grid-row: 1 / 3;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c4d0ca;
  box-shadow: 0 0 0 3px rgba(196, 208, 202, .17);
}
.video-task-tabs button[data-status="authorizing"] i,
.video-task-tabs button[data-status="uploading"] i,
.video-task-tabs button[data-status="queued"] i,
.video-task-tabs button[data-status="running"] i { background: #dfa62f; box-shadow: 0 0 0 3px #dfa62f24; }
.video-task-tabs button[data-status="completed"] i { background: #20a36d; box-shadow: 0 0 0 3px #20a36d24; }
.video-task-tabs button[data-status="failed"] i,
.video-task-tabs button[data-status="cancelled"] i { background: #cc4a43; box-shadow: 0 0 0 3px #cc4a4324; }
.video-task-tabs button span { font-size: 10px; font-weight: 750; line-height: 1.15; }
.video-task-tabs button small { color: #829188; font-size: 8px; line-height: 1.1; }
.video-history-open {
  padding: 8px 11px;
  border: 1px solid #d5e2db;
  border-radius: 10px;
  color: #176b4d;
  background: white;
  font-size: 10px;
  font-weight: 700;
}
.video-history-open:hover { border-color: #98c4ae; background: #f2faf6; }
.video-job-status {
  padding: 7px 11px;
  border: 1px solid #d8e2dd;
  border-radius: 999px;
  color: #6b7a72;
  background: white;
  font-size: 11px;
}
.video-job-status[data-status="authorizing"],
.video-job-status[data-status="uploading"],
.video-job-status[data-status="queued"],
.video-job-status[data-status="running"] { color: #9b6816; border-color: #ead8b6; background: #fffaf0; }
.video-job-status[data-status="completed"] { color: #176b4d; border-color: #bcdccb; background: #f1faf5; }
.video-job-status[data-status="failed"],
.video-job-status[data-status="cancelled"] { color: #a6322d; border-color: #edc5c2; background: #fff5f4; }
.video-output-stage {
  position: relative;
  display: grid;
  min-height: 0;
  overflow: auto;
  padding: 28px;
  place-items: center;
}
.video-output-empty,
.video-output-progress {
  color: #7b8981;
  text-align: center;
}
.video-output-empty > span,
.video-output-progress > span {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  border-radius: 20px;
  color: #267a58;
  background: #e8f3ed;
  font-size: 22px;
}
.video-output-empty strong,
.video-output-progress strong { display: block; color: #45564d; font-size: 15px; }
.video-output-empty p,
.video-output-progress p { margin: 7px 0 0; font-size: 11px; }
.video-output-progress > span { animation: video-progress-pulse 1.8s ease-in-out infinite; }
@keyframes video-progress-pulse {
  0%, 100% { opacity: .52; transform: scale(.94); }
  50% { opacity: 1; transform: scale(1); }
}
.video-result-card {
  width: min(1180px, 100%);
  padding: 14px;
  border: 1px solid #dce5e0;
  border-radius: 18px;
  background: white;
  box-shadow: 0 18px 55px rgba(20, 54, 38, .1);
}
.video-result-card video {
  display: block;
  width: 100%;
  max-height: calc(100vh - 230px);
  border-radius: 12px;
  background: #050806;
}
.video-result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px 1px;
}
.video-result-footer span { color: #718078; font-size: 11px; }
.video-result-footer button {
  padding: 8px 13px;
  border: 1px solid #cbdad2;
  border-radius: 9px;
  color: #176b4d;
  background: white;
  font-weight: 700;
}
.video-result-error { color: #a6322d; text-align: center; }
.video-result-error strong { display: block; margin-bottom: 8px; }

.video-history-modal {
  position: fixed;
  inset: 0;
  z-index: 2750;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(5, 24, 16, .58);
  backdrop-filter: blur(5px);
}
.video-history-modal.hidden { display: none; }
.video-history-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(860px, calc(100vw - 48px));
  max-height: min(820px, calc(100vh - 56px));
  overflow: hidden;
  border: 1px solid #d6e4dc;
  border-radius: 22px;
  background: #f7faf8;
  box-shadow: 0 30px 90px rgba(3, 25, 14, .35);
}
.video-history-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #dce7e1;
  background: white;
}
.video-history-card > header h2 { margin: 4px 0 0; color: #153c2b; font-size: 21px; }
.video-history-card > header p { margin: 6px 0 0; color: #728078; font-size: 11px; }
.video-history-card > header > button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #d7e3dc;
  border-radius: 10px;
  color: #617269;
  background: white;
  font-size: 21px;
}
.video-history-list {
  display: grid;
  align-content: start;
  gap: 11px;
  min-height: 180px;
  overflow: auto;
  padding: 18px;
}
.video-history-empty {
  padding: 70px 20px;
  color: #7a8a81;
  text-align: center;
}
.video-history-item {
  display: grid;
  gap: 10px;
  padding: 15px 16px;
  border: 1px solid #dbe6e0;
  border-left: 4px solid #8ebcaa;
  border-radius: 14px;
  background: white;
}
.video-history-item[data-status="failed"],
.video-history-item[data-status="cancelled"] { border-left-color: #d46a64; }
.video-history-item[data-status="running"],
.video-history-item[data-status="queued"],
.video-history-item[data-status="uploading"],
.video-history-item[data-status="authorizing"] { border-left-color: #d8a43f; }
.video-history-item > header,
.video-history-item > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.video-history-item > header > div { display: flex; align-items: baseline; gap: 10px; }
.video-history-item > header strong { color: #1b513a; font-size: 12px; }
.video-history-item[data-status="failed"] > header strong,
.video-history-item[data-status="cancelled"] > header strong { color: #ad3732; }
.video-history-item > header span,
.video-history-item > header em,
.video-history-item > footer span { color: #7a8880; font-size: 9px; font-style: normal; }
.video-history-item details {
  padding: 9px 11px;
  border-radius: 9px;
  background: #f3f7f5;
}
.video-history-item summary { cursor: pointer; color: #38634f; font-size: 10px; font-weight: 700; }
.video-history-item details p {
  margin: 9px 0 1px;
  color: #3f5047;
  font-size: 11px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.video-history-item > footer button {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid #bdd5c9;
  border-radius: 8px;
  color: #176b4d;
  background: #f2faf6;
  font-size: 10px;
  font-weight: 700;
}

@media (max-width: 1600px) {
  .workspace .video-workspace-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: flex-start;
    gap: 12px;
  }
  .video-workspace-controls {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 1120px) {
  .workspace .video-workspace-header { align-items: flex-start; }
  .video-workspace-controls { flex-wrap: wrap; }
  .video-task-tabs { order: 1; width: 100%; }
  .video-task-tabs button { flex: 1; min-width: 0; }
}

.video-home {
  background:
    radial-gradient(circle at 50% 42%, rgba(32, 128, 94, .1), transparent 34%),
    linear-gradient(145deg, #fbfdfc, #fff);
}
.video-splice-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #f1f5f3;
}
.workspace .video-splice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 26px;
  background: rgba(255, 255, 255, .98);
}
.workspace .video-splice-header h2 {
  display: block;
  margin: 3px 0 0;
  font-size: 21px;
}
.video-splice-header p {
  margin: 5px 0 0;
  color: #75837b;
  font-size: 11px;
}
.video-splice-capability-badge {
  display: grid;
  min-width: 126px;
  padding: 8px 12px;
  border: 1px solid #bdd9cb;
  border-radius: 11px;
  color: #38604d;
  background: #f7fbf9;
  box-shadow: 0 5px 16px rgba(18, 73, 49, .07);
  text-align: left;
  gap: 3px;
}
.video-splice-capability-badge.hidden { display: none; }
.video-splice-capability-badge span { font-size: 8px; }
.video-splice-capability-badge strong { color: #18724e; font-size: 11px; }
.video-splice-capability-badge[data-tier="eco"] {
  border-color: #e0c983;
  color: #756532;
  background: #fffcf1;
}
.video-splice-capability-badge[data-tier="eco"] strong { color: #9a6a12; }
.video-splice-capability-badge[data-tier="unsupported"] {
  border-color: #e5a7a4;
  color: #80504d;
  background: #fff7f6;
}
.video-splice-capability-badge[data-tier="unsupported"] strong { color: #b23d38; }
.video-splice-editor {
  display: grid;
  grid-template-rows: minmax(280px, 46%) minmax(260px, 1fr);
  gap: 14px;
  min-height: 0;
  padding: 16px 20px 20px;
  overflow: auto;
}
.video-splice-upper {
  display: grid;
  grid-template-columns: minmax(360px, 1.15fr) minmax(300px, .85fr);
  gap: 14px;
  min-height: 0;
}
.video-splice-media-panel,
.video-splice-preview-panel,
.video-splice-timeline-panel {
  min-width: 0;
  min-height: 0;
  border: 1px solid #d8e3dd;
  border-radius: 16px;
  background: white;
  box-shadow: 0 8px 28px rgba(18, 52, 35, .045);
}
.video-splice-media-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 11px;
  padding: 15px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.video-splice-media-panel.drag-active {
  border-color: #38926c;
  background: #f4fbf7;
  box-shadow: inset 0 0 0 3px rgba(34, 132, 94, .08), 0 10px 30px rgba(18, 52, 35, .08);
}
.video-splice-library-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
  min-height: 35px;
  border-bottom: 1px solid #dfe8e3;
}
.video-splice-library-toolbar > small {
  flex: 0 0 auto;
  margin: 0 2px 9px auto;
  color: #7d8c84;
  font-size: 10px;
}
.video-splice-local-clear {
  min-width: 48px;
  height: 27px;
  margin-bottom: 6px;
  padding: 0 11px;
  border: 1px solid #c9d9d1;
  border-radius: 8px;
  color: #315a48;
  background: #f8fbf9;
  font-size: 10px;
  font-weight: 750;
  transition: border-color .16s ease, color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.video-splice-local-clear:not(:disabled):hover {
  border-color: #4f9d7b;
  color: #126746;
  background: #edf8f2;
  box-shadow: 0 4px 12px rgba(20, 98, 67, .12);
  transform: translateY(-1px);
}
.video-splice-local-clear:not(:disabled):active { transform: translateY(0) scale(.96); }
.video-splice-local-clear:disabled { cursor: not-allowed; opacity: .42; }
.video-splice-library-action[hidden] { display: none; }
.video-splice-library-tabs {
  display: flex;
  flex: 1 1 auto;
  align-items: flex-end;
  align-self: stretch;
  gap: 3px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.video-splice-library-tabs::-webkit-scrollbar { display: none; }
.video-splice-library-tab {
  position: relative;
  bottom: -1px;
  height: 35px;
  flex: 0 0 auto;
  padding: 0 10px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  color: #718078;
  background: transparent;
  font-size: 11px;
  font-weight: 750;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}
.video-splice-library-tab:hover {
  color: #225f46;
  background: #f2f8f5;
}
.video-splice-library-tab.is-active {
  z-index: 1;
  border-color: #d8e3dd;
  color: #126a48;
  background: white;
  box-shadow: 0 -4px 12px rgba(25, 85, 60, .045);
}
.video-splice-library-tab.is-active::after {
  position: absolute;
  right: 13px;
  bottom: 4px;
  left: 13px;
  height: 2px;
  border-radius: 2px;
  background: #2d8a63;
  content: "";
}
.video-splice-tab-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 11px;
  min-height: 0;
}
#video-splice-materials-pane,
#video-splice-audio-pane { position: relative; }
#video-splice-materials-pane:not(.is-empty),
#video-splice-audio-pane:not(.is-empty) {
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}
#video-splice-materials-pane:not(.is-empty) #video-splice-picker,
#video-splice-audio-pane:not(.is-empty) #video-splice-audio-picker { display: none; }
#video-splice-materials-pane.is-empty,
#video-splice-audio-pane.is-empty {
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}
#video-splice-materials-pane.is-empty #video-splice-picker,
#video-splice-audio-pane.is-empty #video-splice-audio-picker {
  min-height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
#video-splice-materials-pane.is-empty #video-splice-picker > span,
#video-splice-audio-pane.is-empty #video-splice-audio-picker > span {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 28px;
}
#video-splice-materials-pane.is-empty #video-splice-picker strong,
#video-splice-audio-pane.is-empty #video-splice-audio-picker strong { font-size: 13px; }
#video-splice-materials-pane.is-empty #video-splice-library,
#video-splice-audio-pane.is-empty #video-splice-audio-library { display: none; }
#video-splice-transitions-pane { grid-template-rows: minmax(0, 1fr) auto; }
.video-splice-voiceover-pane {
  position: relative;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}
.video-splice-voiceover-form {
  display: grid;
  grid-template-rows: auto auto auto auto auto auto;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 1px 3px 5px 1px;
  overflow: auto;
}
.video-splice-voiceover-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.video-splice-voiceover-heading > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.video-splice-voiceover-heading strong { color: #294538; font-size: 12px; }
.video-splice-voiceover-heading small { color: #849189; font-size: 8px; line-height: 1.45; }
.video-splice-voiceover-host {
  flex: 0 0 auto;
  max-width: 132px;
  padding: 4px 7px;
  overflow: hidden;
  border: 1px solid #d5e2dc;
  border-radius: 999px;
  color: #6f8077;
  background: #f7faf8;
  font-size: 8px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-splice-voiceover-host[data-state="ready"] {
  border-color: #9ed1b8;
  color: #126a48;
  background: #edf9f3;
}
.video-splice-voiceover-host[data-state="unavailable"],
.video-splice-voiceover-host[data-state="error"] {
  border-color: #e4b7b3;
  color: #9c413c;
  background: #fff6f5;
}
.video-splice-voiceover-setup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #b8d8ea;
  border-radius: 10px;
  background: linear-gradient(135deg, #f4fbff, #edf7fc);
}
.video-splice-voiceover-setup > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.video-splice-voiceover-setup strong {
  color: #245a76;
  font-size: 9px;
}
.video-splice-voiceover-setup small {
  color: #668494;
  font-size: 8px;
  line-height: 1.45;
}
.video-splice-voiceover-setup > button {
  min-width: 72px;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid #2386ba;
  border-radius: 8px;
  color: white;
  background: #278fc4;
  font-size: 9px;
  font-weight: 750;
}
.video-splice-voiceover-setup > button:hover:not(:disabled) {
  background: #1979aa;
  box-shadow: 0 5px 14px rgba(24, 117, 164, .18);
}
.video-splice-voiceover-setup > button:disabled {
  cursor: not-allowed;
  opacity: .5;
}
.video-splice-voiceover-edit-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid #a9d5c0;
  border-radius: 10px;
  background: #eff9f4;
}
.video-splice-voiceover-edit-context > div { display: grid; gap: 2px; min-width: 0; }
.video-splice-voiceover-edit-context strong { color: #176848; font-size: 9px; }
.video-splice-voiceover-edit-context small {
  overflow: hidden;
  color: #6b8176;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-splice-voiceover-edit-context fieldset {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: max-content;
  margin: 0;
  padding: 0;
  border: 0;
}
.video-splice-voiceover-edit-context label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  color: #49685a;
  font-size: 8px;
}
.video-splice-voiceover-edit-context input { accent-color: #198058; }
.video-splice-voiceover-edit-context > button {
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid #c5d8cf;
  border-radius: 7px;
  color: #496459;
  background: white;
  font-size: 8px;
}
.video-splice-voiceover-text-field,
.video-splice-voiceover-controls > label {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin: 0;
  color: #53675c;
  font-size: 9px;
  font-weight: 700;
}
.video-splice-voiceover-text-field { position: relative; }
.video-splice-voiceover-text-field textarea,
.video-splice-voiceover-controls select {
  width: 100%;
  min-width: 0;
  border: 1px solid #d4e0da;
  border-radius: 8px;
  color: #263d32;
  background: #fbfdfc;
  font: inherit;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.video-splice-voiceover-text-field textarea {
  min-height: 66px;
  max-height: 132px;
  padding: 8px 9px 18px;
  resize: vertical;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.55;
}
.video-splice-voiceover-text-field > small {
  position: absolute;
  right: 7px;
  bottom: 5px;
  color: #8b9991;
  font-size: 8px;
  font-weight: 500;
  pointer-events: none;
}
.video-splice-voiceover-text-field textarea:focus,
.video-splice-voiceover-controls select:focus {
  border-color: #4b9b77;
  background: white;
  box-shadow: 0 0 0 3px rgba(38, 137, 96, .1);
}
.video-splice-voiceover-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.video-splice-voiceover-controls select {
  height: 30px;
  padding: 0 7px;
  font-size: 9px;
  font-weight: 600;
}
.video-splice-voiceover-range > span {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}
.video-splice-voiceover-range output { color: #23815c; font-size: 8px; }
.video-splice-voiceover-range input {
  width: 100%;
  margin: 5px 0 3px;
  accent-color: #268660;
}
.video-splice-subtitle-style-controls {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid #d8e5de;
  border-radius: 9px;
  background: linear-gradient(135deg, #f7fbf9, #fff);
}
.video-splice-subtitle-style-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.video-splice-subtitle-style-heading strong {
  color: #294538;
  font-size: 9px;
}
.video-splice-subtitle-style-heading small {
  color: #7c8e84;
  font-size: 8px;
  text-align: right;
}
.video-splice-subtitle-style-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.video-splice-subtitle-style-grid > label {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: #53675c;
  font-size: 8px;
  font-weight: 700;
}
.video-splice-voiceover-status {
  display: grid;
  grid-template-columns: minmax(86px, .42fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 18px;
}
.video-splice-voiceover-status progress {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border: 0;
  border-radius: 99px;
  color: #25865f;
  background: #e3ece7;
}
.video-splice-voiceover-status progress::-webkit-progress-bar { background: #e3ece7; }
.video-splice-voiceover-status progress::-webkit-progress-value {
  border-radius: 99px;
  background: linear-gradient(90deg, #23825d, #36b683);
}
.video-splice-voiceover-status > span {
  overflow: hidden;
  color: #71827a;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-splice-voiceover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.video-splice-voiceover-actions button {
  min-width: 0;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid #247b59;
  border-radius: 8px;
  color: white;
  background: #287e5d;
  font-size: 9px;
  font-weight: 750;
}
.video-splice-voiceover-actions button:hover:not(:disabled) {
  border-color: #176646;
  background: #1e704f;
  box-shadow: 0 5px 14px rgba(24, 104, 74, .16);
}
.video-splice-voiceover-actions button.is-secondary {
  border-color: #bed2c8;
  color: #35614e;
  background: white;
}
.video-splice-voiceover-actions button.is-danger {
  border-color: #bd554f;
  color: white;
  background: #bd554f;
}
.video-splice-voiceover-actions button:disabled,
.video-splice-voiceover-form :is(textarea, select, input):disabled {
  cursor: not-allowed;
  opacity: .48;
}
.video-splice-transitions-placeholder {
  display: grid;
  min-height: 100%;
  align-content: center;
  justify-items: center;
  gap: 7px;
  border: 1px dashed #d6e2dc;
  border-radius: 12px;
  color: #567064;
  background: linear-gradient(145deg, #fbfdfc, #f4f8f6);
  text-align: center;
}
.video-splice-transitions-placeholder > span {
  display: grid;
  width: 42px;
  height: 42px;
  border: 1px solid #c9ded4;
  border-radius: 12px;
  color: #24805b;
  background: white;
  font-size: 22px;
  place-items: center;
  transform: rotate(45deg);
}
.video-splice-transitions-placeholder > strong { font-size: 12px; }
.video-splice-transitions-placeholder > small { color: #8a9991; font-size: 9px; }
.video-splice-transition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  min-height: 0;
  overflow: auto;
  align-content: start;
}
.video-splice-transition-card {
  display: grid;
  min-width: 0;
  padding: 7px;
  border: 1px solid #d6e2dc;
  border-radius: 11px;
  color: #385247;
  background: #f9fcfa;
  text-align: left;
  gap: 5px;
  transition: border-color .16s ease, color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.video-splice-transition-card:hover,
.video-splice-transition-card.is-selected {
  border-color: #3b9b73;
  color: #126746;
  background: #f0faf5;
  box-shadow: 0 7px 17px rgba(18, 105, 70, .12);
  transform: translateY(-1px);
}
.video-splice-transition-card.is-selected { box-shadow: 0 0 0 2px rgba(38, 151, 104, .16), 0 7px 17px rgba(18, 105, 70, .12); }
.video-splice-transition-card strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-splice-transition-card small { color: #87958e; font-size: 8px; }
.video-splice-transition-swatch {
  position: relative;
  display: block;
  height: 40px;
  overflow: hidden;
  border-radius: 7px;
  background: #15211b;
}
.video-splice-transition-swatch::before,
.video-splice-transition-swatch::after {
  position: absolute;
  inset: 0;
  display: grid;
  color: rgba(255, 255, 255, .88);
  font-size: 13px;
  font-weight: 850;
  content: "A";
  place-items: center;
}
.video-splice-transition-swatch::before { right: 48%; background: linear-gradient(145deg, #1d7253, #0d3d2b); }
.video-splice-transition-swatch::after { left: 48%; background: linear-gradient(145deg, #8fd2b4, #40936f); content: "B"; }
.video-splice-transition-card:hover .video-splice-transition-swatch::before,
.video-splice-transition-card:hover .video-splice-transition-swatch::after { animation-duration: 1.25s; animation-iteration-count: infinite; }
.video-splice-transition-swatch[data-transition-preview="crossfade"]::after { opacity: .7; }
.video-splice-transition-card:hover .video-splice-transition-swatch[data-transition-preview="crossfade"]::before { animation-name: video-transition-demo-fade-out; }
.video-splice-transition-card:hover .video-splice-transition-swatch[data-transition-preview="crossfade"]::after { animation-name: video-transition-demo-fade-in; }
.video-splice-transition-swatch[data-transition-preview="fade-black"] { background: #020403; }
.video-splice-transition-swatch[data-transition-preview="fade-black"]::before,
.video-splice-transition-swatch[data-transition-preview="fade-black"]::after { opacity: .72; }
.video-splice-transition-card:hover .video-splice-transition-swatch[data-transition-preview="fade-black"]::before,
.video-splice-transition-card:hover .video-splice-transition-swatch[data-transition-preview="fade-black"]::after { animation-name: video-transition-demo-black; }
.video-splice-transition-swatch[data-transition-preview="flash-white"]::after { box-shadow: -8px 0 18px rgba(255, 255, 255, .72); }
.video-splice-transition-card:hover .video-splice-transition-swatch[data-transition-preview="flash-white"] { animation: video-transition-demo-flash 1.25s ease-in-out infinite; }
.video-splice-transition-card:hover .video-splice-transition-swatch[data-transition-preview="push-left"]::before,
.video-splice-transition-card:hover .video-splice-transition-swatch[data-transition-preview="push-left"]::after { animation-name: video-transition-demo-push-left; }
.video-splice-transition-card:hover .video-splice-transition-swatch[data-transition-preview="push-right"]::before,
.video-splice-transition-card:hover .video-splice-transition-swatch[data-transition-preview="push-right"]::after { animation-name: video-transition-demo-push-right; }
.video-splice-transition-card:hover .video-splice-transition-swatch[data-transition-preview="zoom"]::before { animation-name: video-transition-demo-zoom-out; }
.video-splice-transition-card:hover .video-splice-transition-swatch[data-transition-preview="zoom"]::after { animation-name: video-transition-demo-zoom-in; }
.video-splice-transition-tip {
  margin: 0;
  padding: 7px 9px;
  border-radius: 8px;
  color: #718078;
  background: #f3f8f5;
  font-size: 8px;
  line-height: 1.55;
}
@keyframes video-transition-demo-fade-out { 50% { opacity: .15; } }
@keyframes video-transition-demo-fade-in { 0%, 100% { opacity: .18; } 50% { opacity: 1; } }
@keyframes video-transition-demo-black { 50% { opacity: 0; } }
@keyframes video-transition-demo-flash { 50% { filter: brightness(3.3); } }
@keyframes video-transition-demo-push-left { 50% { transform: translateX(-48%); } }
@keyframes video-transition-demo-push-right { 50% { transform: translateX(48%); } }
@keyframes video-transition-demo-zoom-out { 50% { opacity: .15; transform: scale(1.25); } }
@keyframes video-transition-demo-zoom-in { 0%, 100% { opacity: .15; transform: scale(.72); } 50% { opacity: 1; transform: scale(1); } }
.video-splice-panel-heading,
.video-splice-timeline-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.video-splice-panel-heading > div,
.video-splice-timeline-heading > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.video-splice-panel-heading span:not(.ui-button-ripple),
.video-splice-timeline-heading span:not(.ui-button-ripple) {
  display: grid;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  color: #176b4d;
  background: #e9f5ef;
  font-size: 9px;
  font-weight: 850;
  place-items: center;
}
.video-splice-panel-heading strong,
.video-splice-timeline-heading strong { color: #293f34; font-size: 14px; }
.video-splice-panel-heading small,
.video-splice-timeline-heading small { color: #7d8c84; font-size: 10px; }
.video-splice-upload-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 60px;
  padding: 10px 13px;
  border: 1px dashed #aebfb6;
  border-radius: 12px;
  color: #52675c;
  background: #f8fbf9;
  text-align: center;
}
.video-splice-upload-button > span {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 9px;
  color: white;
  background: #287e5d;
  font-size: 19px;
  place-items: center;
}
.video-splice-upload-button strong { color: #30483b; font-size: 11px; }
.video-splice-upload-button:hover {
  border-color: #438f6e;
  background: #f0f8f4;
  box-shadow: 0 5px 16px rgba(24, 104, 74, .08);
}
.video-splice-library {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  grid-auto-rows: 132px;
  gap: 9px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  align-content: start;
  align-items: stretch;
  scrollbar-gutter: stable;
}
.video-splice-asset {
  position: relative;
  height: 132px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d8e3dd;
  border-radius: 11px;
  background: white;
  cursor: grab;
  user-select: none;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.video-splice-asset:hover {
  border-color: #5eaa87;
  box-shadow: 0 8px 18px rgba(23, 91, 64, .12);
  transform: translateY(-2px);
}
.video-splice-asset.is-selected {
  border-color: #16865b;
  box-shadow: inset 0 0 0 2px rgba(22, 134, 91, .2), 0 8px 18px rgba(23, 91, 64, .14);
}
.video-splice-asset:focus-visible {
  outline: 2px solid rgba(22, 134, 91, .72);
  outline-offset: 2px;
}
.video-splice-asset.is-dragging { opacity: .48; cursor: grabbing; transform: scale(.98); }
.video-splice-asset video,
.video-splice-asset > img,
.video-splice-asset-preview {
  display: block;
  width: 100%;
  height: 88px;
  background: #101914;
  object-fit: cover;
  pointer-events: none;
}
.video-splice-asset-preview {
  display: grid;
  color: #9eaea6;
  font-size: 9px;
  place-items: center;
}
.video-splice-asset-preview.is-failed { color: #d79b92; }
.video-splice-audio-preview {
  position: relative;
  display: grid;
  width: 100%;
  height: 88px;
  overflow: hidden;
  color: #16a9cc;
  background:
    linear-gradient(rgba(40, 181, 211, .14), rgba(40, 181, 211, .04)),
    repeating-linear-gradient(90deg, transparent 0 17px, rgba(255, 255, 255, .045) 17px 18px),
    #10231f;
  place-items: center;
  pointer-events: none;
}
.video-splice-audio-preview::after {
  position: absolute;
  right: 0;
  left: 0;
  top: 50%;
  height: 1px;
  background: rgba(154, 235, 242, .24);
  content: "";
}
.video-splice-audio-preview svg {
  position: absolute;
  inset: 7px 8px;
  width: calc(100% - 16px);
  height: calc(100% - 14px);
}
.video-splice-audio-preview path { fill: currentColor; opacity: .92; }
.video-splice-audio-preview > span {
  position: absolute;
  z-index: 1;
  right: 7px;
  bottom: 6px;
  color: rgba(218, 255, 251, .74);
  font-size: 13px;
}
.video-splice-audio-preview.is-pending path,
.video-splice-audio-preview.is-loading path { opacity: .28; }
.video-splice-audio-preview.is-failed path,
.video-splice-audio-preview.is-skipped path { fill: #71877d; opacity: .55; }
.video-splice-ai-voice-badge {
  position: absolute;
  z-index: 2;
  top: 6px;
  left: 6px;
  padding: 3px 6px;
  border: 1px solid rgba(191, 245, 221, .52);
  border-radius: 999px;
  color: #eafff4;
  background: rgba(15, 98, 68, .86);
  box-shadow: 0 2px 8px rgba(4, 36, 24, .18);
  font-size: 8px;
  font-weight: 800;
  pointer-events: none;
}
.video-splice-asset > div:not(.video-splice-audio-preview) { display: grid; gap: 3px; padding: 8px 9px 9px; }
.video-splice-asset > div:not(.video-splice-audio-preview) strong {
  overflow: hidden;
  color: #31463b;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-splice-asset > div:not(.video-splice-audio-preview) span { color: #839087; font-size: 8px; }
.video-splice-asset .video-splice-ai-voice-summary {
  overflow: hidden;
  color: #5f776b;
  font-size: 8px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-splice-preview-panel {
  position: relative;
  display: grid;
  grid-template-rows: 35px minmax(0, 1fr);
  overflow: hidden;
  border-color: #2d3531;
  background: #101412;
  box-shadow: 0 12px 30px rgba(4, 15, 9, .16);
}
.video-splice-preview-tabs {
  z-index: 2;
  display: flex;
  align-items: end;
  gap: 3px;
  min-width: 0;
  padding: 5px 7px 0;
  border-bottom: 1px solid #29312d;
  background: #171c19;
}
.video-splice-preview-tabs button {
  position: relative;
  min-width: 68px;
  height: 29px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  color: #839189;
  background: transparent;
  box-shadow: none;
  font-size: 10px;
  font-weight: 750;
}
.video-splice-preview-tabs button:hover:not(:disabled) { color: #d8eee2; background: #202923; }
.video-splice-preview-tabs button.is-active {
  border-color: #34433b;
  color: #ecfff5;
  background: #101412;
}
.video-splice-preview-tabs button.is-active::after {
  position: absolute;
  right: 11px;
  bottom: 0;
  left: 11px;
  height: 2px;
  border-radius: 99px 99px 0 0;
  background: #38b980;
  content: "";
}
.video-splice-preview-tabs button:focus-visible {
  outline: 2px solid rgba(67, 211, 143, .72);
  outline-offset: -2px;
}
.video-splice-preview-mode-panel {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}
.video-splice-preview-mode-panel > .video-splice-feature-gate-content {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 44px;
  min-width: 0;
  min-height: 0;
}
.video-splice-feature-gate-content,
.video-splice-voiceover-form {
  transition: opacity .18s ease, filter .18s ease;
}
.video-splice-voiceover-pane.is-performance-blocked .video-splice-voiceover-form,
.video-splice-preview-mode-panel.is-performance-blocked .video-splice-feature-gate-content {
  opacity: .28;
  filter: grayscale(.35) saturate(.35);
  pointer-events: none;
  user-select: none;
}
.video-splice-feature-gate {
  position: absolute;
  z-index: 12;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  color: #edf8f2;
  text-align: center;
  background: rgba(8, 13, 10, .48);
}
.video-splice-voiceover-pane .video-splice-feature-gate {
  color: #2f493c;
  background: rgba(241, 247, 244, .68);
}
.video-splice-feature-gate > strong {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .08em;
}
.video-splice-feature-gate > p {
  max-width: 360px;
  margin: 0;
  color: inherit;
  font-size: 10px;
  line-height: 1.55;
  opacity: .86;
}
.video-splice-feature-gate > button {
  min-width: 92px;
  min-height: 31px;
  margin-top: 3px;
  border: 1px solid rgba(98, 202, 150, .55);
  border-radius: 8px;
  color: #ecfff5;
  background: #237b58;
  box-shadow: 0 5px 14px rgba(13, 64, 43, .2);
  font-size: 10px;
  font-weight: 800;
}
.video-splice-feature-gate > button:hover:not(:disabled) { background: #1b694a; }
.video-splice-feature-gate > button:focus-visible {
  outline: 2px solid #6ed5a2;
  outline-offset: 2px;
}
.video-splice-feature-gate > button:disabled { cursor: wait; opacity: .7; }
.video-splice-timeline-panel.is-performance-blocked {
  opacity: .48;
  filter: grayscale(.28) saturate(.42);
}
.video-splice-preview-stage {
  position: relative;
  display: grid;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(79, 119, 99, .12), transparent 50%),
    #080b09;
  place-items: center;
}
.video-splice-preview-stack {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 1px rgba(207, 237, 222, .08);
}
.video-splice-player-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  transform-origin: center center;
  will-change: opacity, transform;
}
.video-splice-preview-stack video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  background: transparent;
  object-fit: contain;
  object-position: center center;
  pointer-events: none;
}
.video-splice-preview-stack audio { display: none; }
.video-splice-subtitle-overlay {
  position: absolute;
  z-index: 190;
  inset: 0;
  display: block;
  color: #fff;
  pointer-events: none;
}
.video-splice-subtitle-overlay.hidden { display: none; }
.video-splice-subtitle-overlay canvas { display: block; width: 100%; height: 100%; }
.video-splice-subtitles-pane { overflow: auto; padding: 12px; color: #264838; font-size: 12px; }
.video-splice-subtitles-pane label { margin: 0; }
.video-splice-subtitle-editor-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px; margin-bottom: 12px; }
.video-splice-subtitle-editor-heading strong { font-size: 15px; }
.video-splice-subtitle-editor-heading small, .video-splice-subtitle-field small, .video-splice-subtitle-detail { color: #668074; font-size: 11px; }
.video-splice-subtitle-empty { padding: 24px 12px; border: 1px dashed #bfd8ca; border-radius: 8px; text-align: center; line-height: 1.8; }
.video-splice-subtitles-pane .video-splice-subtitle-field { display: grid; gap: 5px; margin: 0 0 10px; }
.video-splice-subtitle-field > span { display: flex; justify-content: space-between; gap: 8px; }
.video-splice-subtitles-pane select, .video-splice-subtitles-pane textarea { min-width: 0; width: 100%; border: 1px solid #c8ddd1; border-radius: 6px; background: #fff; color: #1f3c2f; font: inherit; padding: 6px 8px; }
.video-splice-subtitles-pane textarea { resize: vertical; min-height: 62px; line-height: 1.5; }
.video-splice-subtitle-scope-row, .video-splice-subtitle-options { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin: 10px 0; }
.video-splice-subtitle-scope-row label, .video-splice-subtitle-options label { display: flex; align-items: center; gap: 6px; }
.video-splice-subtitle-scope-row select { width: auto; }
.video-splice-subtitles-pane button, .video-splice-subtitle-shortcut { border: 1px solid #bdd9c9; border-radius: 6px; padding: 6px 9px; background: #f5faf7; color: #237552; cursor: pointer; font: inherit; }
.video-splice-subtitle-editor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 12px; border: 1px solid #d4e4da; border-radius: 8px; background: #f8fbf9; }
.video-splice-subtitle-editor-grid label { min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 7px; font-size: 11px; align-content: start; }
.video-splice-subtitle-editor-grid select, .video-splice-subtitle-editor-grid input { grid-column: 1 / -1; }
.video-splice-subtitle-editor-grid output { color: #25855c; }
.video-splice-subtitle-editor-grid input[type="range"] { width: 100%; height: 30px; padding: 0; margin: 0; accent-color: #268660; }
.video-splice-subtitle-editor-grid input[type="color"] { width: 100%; height: 30px; padding: 2px; border: 1px solid #c8ddd1; border-radius: 5px; background: #fff; cursor: pointer; }
.video-splice-subtitle-options input { width: 16px; height: 16px; padding: 0; margin: 0; accent-color: #268660; }
.video-splice-subtitle-detail { display: block; line-height: 1.6; }
.video-splice-subtitles-pane :disabled { opacity: .55; cursor: not-allowed; }
.video-splice-subtitles-pane :focus-visible, .video-splice-subtitle-shortcut:focus-visible { outline: 2px solid #238d61; outline-offset: 2px; }
.video-splice-subtitle-shortcut { display: flex; justify-content: space-between; gap: 12px; width: 100%; text-align: left; font-size: 11px; }
.video-splice-subtitle-shortcut span { font-size: 10px; color: #708b7c; }
@media (max-width: 1050px) { .video-splice-subtitle-editor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.video-splice-subtitle-overlay p {
  position: absolute;
  left: var(--video-splice-subtitle-x, 50%);
  top: var(--video-splice-subtitle-y, 82%);
  width: max-content;
  max-width: 84%;
  margin: 0;
  padding: .22em .62em;
  overflow-wrap: anywhere;
  border-radius: .38em;
  color: #fff;
  background: rgba(0, 0, 0, .58);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .24);
  font-family: "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: clamp(10px, var(--video-splice-subtitle-size, 2.3vw), 52px);
  font-weight: 750;
  line-height: 1.32;
  text-align: center;
  transform: translate(-50%, -50%);
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    0 2px 3px rgba(0, 0, 0, .9);
}
.video-splice-preview-empty {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  color: #d9e5de;
  text-align: center;
}
.video-splice-preview-empty > span {
  display: grid;
  width: 42px;
  height: 42px;
  padding-left: 3px;
  border: 1px solid rgba(137, 188, 164, .25);
  border-radius: 50%;
  color: #91cbb0;
  background: rgba(53, 103, 79, .18);
  font-size: 17px;
  place-items: center;
}
.video-splice-preview-empty strong { font-size: 12px; }
.video-splice-preview-empty small { color: #728078; font-size: 9px; }
.video-splice-preview-empty.hidden { display: none; }
.video-splice-crop-editor {
  position: absolute;
  z-index: 60;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.video-splice-crop-editor.hidden { display: none; }
.video-splice-crop-editor > p {
  position: absolute;
  right: 12px;
  bottom: 10px;
  left: 12px;
  margin: 0;
  padding: 6px 9px;
  border: 1px solid rgba(127, 231, 181, .28);
  border-radius: 8px;
  color: #e5fff2;
  background: rgba(7, 18, 12, .78);
  box-shadow: 0 5px 18px rgba(0, 0, 0, .28);
  font-size: 9px;
  text-align: center;
}
.video-splice-crop-selection {
  position: absolute;
  border: 2px solid #75e5ae;
  border-radius: 2px;
  outline: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .62), 0 0 0 1px rgba(255, 255, 255, .72),
    0 0 22px rgba(68, 219, 148, .34);
  cursor: move;
  pointer-events: auto;
  touch-action: none;
}
.video-splice-crop-selection:focus-visible {
  border-color: #b8ffd9;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .62), 0 0 0 3px rgba(87, 225, 158, .36),
    0 0 26px rgba(68, 219, 148, .48);
}
.video-splice-crop-selection.is-dragging { cursor: grabbing; }
.video-splice-crop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 33.15%, rgba(255, 255, 255, .48) 33.33%, transparent 33.52%, transparent 66.48%, rgba(255, 255, 255, .48) 66.67%, transparent 66.85%),
    linear-gradient(transparent 33.15%, rgba(255, 255, 255, .48) 33.33%, transparent 33.52%, transparent 66.48%, rgba(255, 255, 255, .48) 66.67%, transparent 66.85%);
}
.video-splice-crop-handle {
  position: absolute;
  display: block;
  width: 13px;
  height: 13px;
  border: 2px solid #f4fff9;
  border-radius: 3px;
  outline: none;
  background: #23a76f;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .42);
  pointer-events: auto;
}
.video-splice-crop-handle:focus-visible { box-shadow: 0 0 0 3px rgba(117, 229, 174, .46); }
.video-splice-crop-handle.is-nw { top: -7px; left: -7px; cursor: nwse-resize; }
.video-splice-crop-handle.is-n { top: -7px; left: calc(50% - 6px); cursor: ns-resize; }
.video-splice-crop-handle.is-ne { top: -7px; right: -7px; cursor: nesw-resize; }
.video-splice-crop-handle.is-e { top: calc(50% - 6px); right: -7px; cursor: ew-resize; }
.video-splice-crop-handle.is-se { right: -7px; bottom: -7px; cursor: nwse-resize; }
.video-splice-crop-handle.is-s { bottom: -7px; left: calc(50% - 6px); cursor: ns-resize; }
.video-splice-crop-handle.is-sw { bottom: -7px; left: -7px; cursor: nesw-resize; }
.video-splice-crop-handle.is-w { top: calc(50% - 6px); left: -7px; cursor: ew-resize; }
.video-splice-preview-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 10px;
  border-top: 1px solid #29302c;
  color: #d8e3dd;
  background: #181d1a;
}
.video-splice-preview-actions,
.video-splice-preview-playback {
  display: flex;
  align-items: center;
}
.video-splice-preview-actions.is-left { justify-self: start; }
.video-splice-preview-actions.is-right { justify-self: end; }
.video-splice-preview-playback { justify-self: center; }
.video-splice-preview-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 76px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #3b4942;
  border-radius: 9px;
  color: #cbd8d1;
  background: #242b27;
  box-shadow: none;
}
.video-splice-preview-action svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.video-splice-preview-action > span:not(.ui-button-ripple) {
  color: inherit;
  font-size: 13px;
  line-height: 1;
}
.video-splice-preview-action strong {
  max-width: 72px;
  overflow: hidden;
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-splice-preview-action:hover:not(:disabled),
.video-splice-preview-action.is-active {
  border-color: #55bd8d;
  color: #effff7;
  background: #254536;
}
.video-splice-preview-action.is-export {
  border-color: #2b8c61;
  color: #effff7;
  background: #20734f;
}
.video-splice-preview-action.is-export:hover:not(:disabled) { background: #19875a; }
.video-splice-preview-action.is-auto-stop {
  border-color: #e05252;
  color: #fff5f5;
  background: #bd3434;
}
.video-splice-preview-action.is-auto-stop:hover:not(:disabled) { background: #d33a3a; }
.video-splice-preview-action:focus-visible {
  outline: 2px solid rgba(88, 213, 151, .78);
  outline-offset: 2px;
}
.video-splice-preview-action:disabled { opacity: .42; cursor: not-allowed; }
.video-splice-workspace.is-exporting .video-splice-preview-panel {
  box-shadow: 0 0 0 1px rgba(69, 205, 143, .46), 0 12px 30px rgba(4, 15, 9, .2);
}
.video-splice-export-media {
  position: fixed;
  top: -4px;
  left: -4px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: .001;
  pointer-events: none;
}
.video-splice-export-media video,
.video-splice-export-media audio { width: 1px; height: 1px; }
.video-splice-play-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 82px;
  height: 30px;
  padding: 0 13px;
  border: 1px solid #3d4c44;
  border-radius: 999px;
  color: #eef7f2;
  background: #2a342f;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}
.video-splice-play-button:hover:not(:disabled) {
  border-color: #55bd8d;
  background: #22543d;
  box-shadow: 0 0 0 3px rgba(65, 188, 133, .09), 0 5px 14px rgba(0, 0, 0, .18);
}
.video-splice-play-button.is-playing {
  border-color: #57c393;
  background: #216443;
}
.video-splice-play-button:disabled { opacity: .42; cursor: not-allowed; }
.video-splice-play-button > span:not(.ui-button-ripple) { width: 11px; color: #71d5a7; font-size: 11px; }
.video-splice-play-button strong { font-size: 9px; }
.video-splice-ruler {
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
}
.video-splice-playhead-cap {
  cursor: ew-resize;
  touch-action: none;
}
.video-splice-playhead-cap:focus-visible {
  outline: 2px solid #56c390;
  outline-offset: 2px;
}
.video-splice-timeline-dropzone {
  touch-action: pan-x;
}
.video-splice-timeline-panel {
  position: relative;
  display: grid;
  grid-template-rows: 44px 32px minmax(0, 1fr);
  padding: 0;
  overflow: hidden;
  background: #171a19;
  border-color: #2b302d;
  box-shadow: 0 12px 32px rgba(4, 15, 9, .14);
  transition: box-shadow .18s ease, border-color .18s ease;
}
.video-splice-auto-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding-left: 2px;
}
.video-splice-auto-controls.hidden { display: none; }
.video-splice-auto-controls > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #3b9ee9;
  border-radius: 7px;
  color: #eff9ff;
  background: #1978bd;
  box-shadow: 0 3px 10px rgba(14, 91, 151, .25);
}
.video-splice-auto-controls > button:hover:not(:disabled) { background: #218bd3; }
.video-splice-auto-controls > button span { font-size: 13px; line-height: 1; }
.video-splice-auto-controls > button strong { font-size: 9px; }
.video-splice-auto-controls > label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: #9badb9;
  font-size: 8px;
  white-space: nowrap;
}
.video-splice-timeline-heading .video-splice-auto-controls > button > span:not(.ui-button-ripple),
.video-splice-timeline-heading .video-splice-auto-controls > label > span:not(.ui-button-ripple) {
  display: inline;
  width: auto;
  height: auto;
  border-radius: 0;
  color: inherit;
  background: transparent;
  font-weight: inherit;
  line-height: 1;
}
.video-splice-timeline-heading .video-splice-auto-controls > button > span:not(.ui-button-ripple) { font-size: 13px; }
.video-splice-timeline-heading .video-splice-auto-controls > label > span:not(.ui-button-ripple) { font-size: 8px; }
.video-splice-auto-controls input {
  width: 46px;
  height: 28px;
  padding: 0 5px;
  border: 1px solid #3d5261;
  border-radius: 7px;
  outline: none;
  color: #eaf7ff;
  background: #19232a;
  font-size: 10px;
  text-align: center;
}
.video-splice-auto-controls input:focus { border-color: #4aa9ec; box-shadow: 0 0 0 2px rgba(55, 155, 225, .2); }
.video-splice-auto-controls :disabled { cursor: not-allowed; opacity: .45; }
.video-splice-timeline-panel.is-expanded { min-height: min(72vh, 720px); }
.video-splice-timeline-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 7px 14px;
  border-bottom: 1px solid #2a302d;
  background: #1d211f;
}
.video-splice-timeline-panel .video-splice-timeline-heading strong { color: #edf4f0; }
.video-splice-timeline-panel .video-splice-timeline-heading small { color: #8c9b93; }
.video-splice-timeline-panel .video-splice-local-clear {
  margin: 0;
  border-color: #3a4640;
  color: #c6d6ce;
  background: #282e2b;
}
.video-splice-timeline-panel .video-splice-local-clear:not(:disabled):hover {
  border-color: #4f8f72;
  color: #e8f5ee;
  background: #284838;
  box-shadow: 0 4px 13px rgba(0, 0, 0, .2);
}
.video-splice-timeline-panel .video-splice-timeline-heading {
  justify-content: flex-start;
  min-width: 0;
}
.video-splice-timeline-panel .video-splice-timeline-heading > small {
  min-width: 0;
  max-width: min(220px, 24vw);
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-splice-edit-mode {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  isolation: isolate;
  box-sizing: border-box;
  width: 126px;
  height: 30px;
  padding: 3px;
  border: 1px solid #36413b;
  border-radius: 999px;
  background: #151917;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .28);
}
.video-splice-edit-mode::before {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  content: "";
  transition: transform .2s cubic-bezier(.2, .8, .25, 1), box-shadow .2s ease;
}
.video-splice-edit-mode::before {
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 2);
  border-radius: 999px;
  background: linear-gradient(145deg, #2aa273, #187353);
  box-shadow: 0 3px 9px rgba(10, 71, 46, .42), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.video-splice-timeline-panel[data-edit-mode="transition"] .video-splice-edit-mode::before {
  transform: translateX(100%);
}
.video-splice-edit-mode button {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  justify-self: stretch;
  align-self: stretch;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #7f8c85;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  transition: color .15s ease;
}
.video-splice-edit-mode button:hover { color: #d6e8df; }
.video-splice-edit-mode button.is-active {
  color: #eafff4;
}
.video-splice-edit-mode button:focus-visible {
  outline: 2px solid rgba(102, 245, 174, .82);
  outline-offset: 2px;
}
.video-splice-transition-focus-mask {
  position: fixed;
  z-index: 18050;
  inset: 0;
  background: rgba(3, 10, 7, .68);
  backdrop-filter: blur(1.5px);
  pointer-events: auto;
}
.video-splice-transition-focus-mask::after {
  position: fixed;
  top: 18px;
  left: 50%;
  max-width: min(620px, calc(100vw - 48px));
  padding: 9px 16px;
  border: 1px solid rgba(103, 235, 167, .35);
  border-radius: 99px;
  color: #eafff3;
  background: rgba(15, 62, 42, .9);
  box-shadow: 0 9px 30px rgba(0, 0, 0, .3);
  content: attr(data-message);
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
  transform: translateX(-50%);
}
.video-splice-timeline-panel.is-transition-placement {
  position: relative;
  z-index: 18051;
  border-color: #43ef8d;
  animation: video-splice-timeline-ripple 1.75s ease-out infinite;
}
@keyframes video-splice-timeline-ripple {
  0% {
    box-shadow: 0 0 0 1px rgba(216, 255, 234, .28), 0 0 24px rgba(48, 231, 125, .62), 0 0 0 0 rgba(67, 239, 141, .58);
  }
  72% {
    box-shadow: 0 0 0 1px rgba(216, 255, 234, .08), 0 0 32px rgba(48, 231, 125, .34), 0 0 0 8px rgba(67, 239, 141, .18);
  }
  100% {
    box-shadow: 0 0 0 1px rgba(216, 255, 234, 0), 0 0 38px rgba(48, 231, 125, 0), 0 0 0 13px rgba(67, 239, 141, 0);
  }
}
.video-splice-tool-strip,
.video-splice-zoom-preview {
  display: flex;
  align-items: center;
  gap: 4px;
}
.video-splice-tool-strip {
  flex: 0 0 auto;
  gap: 3px;
  padding: 0 6px;
  border-right: 1px solid #3a413d;
  border-left: 1px solid #3a413d;
}
.video-splice-timeline-heading > .video-splice-edit-mode {
  display: grid;
  gap: 0;
}
.video-splice-timeline-heading > .video-splice-tool-strip {
  display: flex;
  gap: 3px;
}
.video-splice-tool-strip button {
  display: grid;
  width: 29px;
  min-width: 29px;
  height: 29px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: #aeb8b2;
  background: transparent;
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
  transition: color .15s ease, background .15s ease, box-shadow .15s ease;
  place-items: center;
}
.video-splice-tool-strip svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.video-splice-tool-strip button:not(:disabled):hover {
  color: #ecfff5;
  background: #293b32;
}
.video-splice-tool-strip button:focus-visible {
  outline: 2px solid rgba(88, 213, 151, .75);
  outline-offset: 1px;
}
.video-splice-tool-strip button:disabled {
  cursor: not-allowed;
  opacity: .34;
}
.video-splice-zoom-preview {
  justify-self: end;
  justify-content: flex-end;
  min-width: 0;
  color: #7f8b84;
  font-size: 10px;
  white-space: nowrap;
}
.video-splice-timeline-expand {
  display: grid;
  width: 29px;
  height: 29px;
  margin-left: 4px;
  padding: 0;
  border: 1px solid #3b4741;
  border-radius: 8px;
  color: #c4d1ca;
  background: #282e2b;
  box-shadow: none;
  flex: 0 0 29px;
  place-items: center;
}
.video-splice-timeline-expand:hover {
  border-color: #4f9b76;
  color: #f0fff7;
  background: #294438;
}
.video-splice-timeline-expand:focus-visible {
  outline: 2px solid rgba(88, 213, 151, .75);
  outline-offset: 2px;
}
.video-splice-timeline-expand > span:not(.ui-button-ripple) {
  display: block !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  color: inherit !important;
  background: transparent !important;
  font-size: 15px !important;
  line-height: 1;
}
.video-splice-zoom-preview em {
  min-width: 35px;
  color: #9eaaa3;
  font-size: 8px;
  font-style: normal;
  text-align: right;
}
.video-splice-zoom-preview b {
  position: relative;
  width: 74px;
  height: 3px;
  border-radius: 99px;
  background: #3b433f;
}
.video-splice-zoom-preview b i {
  position: absolute;
  top: 50%;
  left: var(--video-splice-zoom-progress, 39%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #a8b5ae;
  box-shadow: 0 0 0 2px #252b28;
  transform: translate(-50%, -50%);
}
.video-splice-scale-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  border-bottom: 1px solid #2b312e;
  background: #191d1b;
}
.video-splice-scale-corner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 13px;
  border-right: 1px solid #303633;
  color: #758078;
  font-size: 9px;
}
.video-splice-ruler {
  position: relative;
  min-width: 0;
  overflow: hidden;
  color: #78877f;
  font-size: 8px;
}
.video-splice-ruler-content {
  position: relative;
  height: 100%;
  min-width: 100%;
}
.video-splice-ruler-tick {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 4px;
  background: #505952;
}
.video-splice-ruler-tick.is-major {
  height: 8px;
  background: #758078;
}
.video-splice-ruler-tick b {
  position: absolute;
  bottom: 10px;
  left: 4px;
  color: #7e8a83;
  font-size: 8px;
  font-weight: 500;
  white-space: nowrap;
}
.video-splice-playhead-cap {
  position: absolute;
  z-index: 5;
  bottom: 0;
  left: 0;
  width: 9px;
  height: 11px;
  border-radius: 3px 3px 1px 1px;
  background: #f4f6f5;
  transform: translateX(-4px);
}
.video-splice-playhead-cap::after {
  position: absolute;
  bottom: -5px;
  left: 2px;
  border-top: 5px solid #f4f6f5;
  border-right: 2.5px solid transparent;
  border-left: 2.5px solid transparent;
  content: "";
}
.video-splice-track-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  min-height: 0;
  background: #141715;
}
.video-splice-track-labels {
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid #303633;
  background: #1d211f;
}
.video-splice-track-label-item {
  display: grid;
  height: 66px;
  padding: 10px 12px;
  border-bottom: 1px solid #303633;
  color: #a9b4ae;
  align-content: center;
  gap: 5px;
}
.video-splice-track-label-item span { color: #72c9a3; font-size: 9px; font-weight: 850; }
.video-splice-track-label-item strong { font-size: 8px; font-weight: 600; }
.video-splice-track-label {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 12px;
  border-right: 1px solid #303633;
  color: #a9b4ae;
  background: #1d211f;
  font-size: 9px;
}
.video-splice-track-label > div:first-child { display: grid; gap: 4px; }
.video-splice-track-label > div:first-child span { color: #72c9a3; font-weight: 850; }
.video-splice-track-label strong { font-size: 9px; font-weight: 600; }
.video-splice-track-icons { display: flex; gap: 10px; color: #69736d; font-size: 8px; }
.video-splice-timeline-dropzone {
  position: relative;
  min-width: 0;
  min-height: 142px;
  overflow: auto;
  overflow-anchor: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px),
    #151816;
  background-size: var(--video-splice-pixels-per-second, 36px) 100%, auto;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.video-splice-timeline-dropzone.drag-active {
  background-color: #15251d;
  box-shadow: inset 0 0 0 2px #45bd88, inset 0 0 28px rgba(55, 186, 129, .08);
}
.video-splice-timeline-dropzone.drag-blocked { background-color: #211716; box-shadow: inset 0 0 0 2px #9b4e4b; }
.video-splice-timeline-content {
  position: relative;
  display: block;
  min-width: 100%;
  overflow-anchor: none;
}
.video-splice-layer {
  position: relative;
  height: 66px;
  border-bottom: 1px solid rgba(85, 97, 90, .42);
}
.video-splice-layer.is-auto-v0 {
  border-top: 1px solid #d8e0dc;
  border-bottom-color: #ccd6d1;
  background:
    linear-gradient(90deg, rgba(41, 97, 132, .08) 1px, transparent 1px),
    #f7faf8;
  background-size: var(--video-splice-pixels-per-second, 36px) 100%, auto;
}
.video-splice-layer.is-auto-v0 .video-splice-layer-empty { color: rgba(40, 69, 55, .58); }
.video-splice-layer.is-auto-v0-pool-lane {
  border-top: 1px solid #dce6e1;
  border-bottom-color: #cad7d0;
  background:
    linear-gradient(90deg, rgba(41, 97, 132, .075) 1px, transparent 1px),
    #fbfdfc;
  background-size: var(--video-splice-pixels-per-second, 36px) 100%, auto;
  cursor: pointer;
}
.video-splice-layer.is-auto-v0-pool-lane.is-selected-output {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(22, 131, 90, .11) 1px, transparent 1px),
    #edf9f3;
  background-size: var(--video-splice-pixels-per-second, 36px) 100%, auto;
  box-shadow: inset 0 0 0 2px rgba(30, 164, 106, .58);
}
.video-splice-layer.is-auto-v0-pool-lane .video-splice-layer-empty { color: rgba(39, 78, 60, .58); }
.is-auto-v0-collapsed { display: none !important; }
.video-splice-layer.is-auto-v0-transient {
  border: 2px dashed rgba(39, 144, 101, .55);
  background: #f2fbf6;
}
.video-splice-clip.is-auto-v0-output-copy {
  opacity: .82;
  pointer-events: none;
  filter: saturate(.88);
}
.video-splice-clip.is-auto-v0-pool-clip { cursor: grab; }
.video-splice-clip.is-auto-v0-pool-clip:active { cursor: grabbing; }
.video-splice-track-label-item.is-auto-v0 {
  border-top: 1px solid #d5dfda;
  color: #385247;
  background: #f2f7f4;
}
.video-splice-track-label-item.is-auto-v0 span { color: #247bab; }
.video-splice-track-label-item:is(button) {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  font-family: inherit;
  text-align: left;
}
.video-splice-track-label-item.is-auto-v0 {
  cursor: pointer;
}
.video-splice-track-label-item.is-auto-v0:hover,
.video-splice-track-label-item.is-auto-v0:focus-visible {
  color: #173e2e;
  background: #e4f4eb;
  box-shadow: inset 0 0 0 2px rgba(34, 139, 96, .35);
  outline: none;
}
.video-splice-track-label-item.is-auto-v0-pool-lane {
  border-top: 1px solid #d7e3dc;
  color: #456156;
  background: #f8fbf9;
  cursor: pointer;
}
.video-splice-track-label-item.is-auto-v0-pool-lane span { color: #2c8b68; }
.video-splice-track-label-item.is-auto-v0-pool-lane.is-selected-output {
  color: #184b35;
  background: #e4f5ec;
  box-shadow: inset 3px 0 #24a871;
}
.video-splice-track-label-item.is-auto-v0-pool-lane:hover,
.video-splice-track-label-item.is-auto-v0-pool-lane:focus-visible {
  background: #edf8f2;
  outline: 2px solid rgba(34, 139, 96, .38);
  outline-offset: -2px;
}
.video-splice-layer.is-subtitle {
  overflow: hidden;
  border-top: 1px solid rgba(95, 151, 216, .28);
  border-bottom-color: rgba(96, 135, 182, .42);
  background:
    linear-gradient(90deg, rgba(145, 185, 232, .05) 1px, transparent 1px),
    #151d29;
  background-size: var(--video-splice-pixels-per-second, 36px) 100%, auto;
}
.video-splice-track-label-item.is-subtitle {
  color: #becde1;
  background: #1a2330;
}
.video-splice-track-label-item.is-subtitle span { color: #76b9ff; }
.video-splice-subtitle-cue {
  position: absolute;
  z-index: 3;
  top: 7px;
  bottom: 7px;
  display: block;
  min-width: 1px;
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(110, 184, 255, .72);
  border-radius: 6px;
  color: #edf7ff;
  background: linear-gradient(180deg, rgba(52, 132, 205, .92), rgba(32, 91, 154, .94));
  box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
  cursor: pointer;
  text-align: left;
}
.video-splice-subtitle-cue::after {
  position: absolute;
  z-index: 0;
  top: -2px;
  bottom: -2px;
  left: 50%;
  width: 18px;
  content: "";
  transform: translateX(-50%);
}
.video-splice-subtitle-cue strong {
  position: relative;
  z-index: 1;
  display: block;
  height: 100%;
  padding: 0 8px;
  overflow: hidden;
  color: inherit;
  font-size: 8px;
  font-weight: 700;
  line-height: 50px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-splice-subtitle-cue:hover { border-color: #c8e6ff; filter: brightness(1.08); }
.video-splice-subtitle-cue.is-selected {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(73, 166, 255, .55), 0 4px 12px rgba(0, 0, 0, .25);
}
.video-splice-subtitle-cue:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -3px;
}
.video-splice-layer-empty {
  position: absolute;
  top: 50%;
  left: 18px;
  color: rgba(126, 143, 133, .42);
  font-size: 8px;
  pointer-events: none;
  transform: translateY(-50%);
}
.video-splice-timeline-empty {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  width: min(100%, 680px);
  min-width: 260px;
  color: #87968e;
  font-size: 10px;
  text-align: center;
  pointer-events: none;
  place-content: center;
}
.video-splice-timeline-empty small { display: block; margin-top: 6px; color: #637168; font-size: 8px; }
.video-splice-clip {
  display: grid;
  grid-template-rows: 14px 26px 14px;
  min-width: 0;
  height: 58px;
  position: absolute;
  top: 4px;
  overflow: hidden;
  border: 2px solid #3bc08b;
  border-radius: 4px;
  background: #173a2b;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 4px 12px rgba(0, 0, 0, .18);
}
.video-splice-clip.is-audio {
  grid-template-rows: 14px minmax(0, 1fr);
  border-color: #20afd0;
  background: #123440;
}
.video-splice-clip.is-audio-only {
  grid-template-rows: 14px minmax(0, 1fr) 9px;
  grid-template-areas: "caption" "waveform" "frames";
  border-color: #279bc2;
  background: #123643;
}
.video-splice-clip.is-audio-only .video-splice-clip-caption { grid-area: caption; }
.video-splice-clip.is-audio-only .video-splice-clip-waveform {
  grid-area: waveform;
  min-height: 0;
  color: #28b9dc;
}
.video-splice-clip.is-audio-only .video-splice-clip-frames {
  grid-area: frames;
  min-height: 0;
  opacity: .38;
}
.video-splice-clip.is-audio-only .video-splice-clip-frames img,
.video-splice-clip.is-audio-only .video-splice-clip-frames video { height: 9px; }
.video-splice-audio-only-badge {
  position: absolute;
  z-index: 6;
  top: 16px;
  right: 4px;
  padding: 1px 4px;
  border-radius: 99px;
  color: #e8fbff;
  background: rgba(13, 81, 104, .84);
  font-size: 7px;
  pointer-events: none;
}
.video-splice-caption-badge {
  position: absolute;
  z-index: 7;
  right: 4px;
  bottom: 3px;
  padding: 1px 4px;
  border: 1px solid rgba(205, 232, 255, .42);
  border-radius: 99px;
  color: #eaf6ff;
  background: rgba(26, 88, 146, .86);
  font-size: 7px;
  font-weight: 750;
  pointer-events: none;
}
.video-splice-clip.is-muted .video-splice-clip-waveform {
  color: #ef5353;
  filter: drop-shadow(0 0 2px rgba(239, 83, 83, .35));
}
.video-splice-clip.is-auto-excluded,
.video-splice-transition.is-auto-excluded {
  opacity: .26 !important;
  filter: grayscale(.35) saturate(.28) !important;
}
.video-splice-auto-use-count {
  position: absolute;
  z-index: 8;
  top: 16px;
  left: 4px;
  display: grid;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 1px solid rgba(214, 255, 234, .68);
  border-radius: 99px;
  color: #effff6;
  background: rgba(18, 110, 70, .88);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .26);
  font-size: 8px;
  font-weight: 850;
  pointer-events: none;
  place-items: center;
}
.video-splice-clip.is-auto-mix-active {
  z-index: 12;
  animation: video-splice-auto-active-ripple 1.55s ease-out infinite;
}
@keyframes video-splice-auto-active-ripple {
  0% { box-shadow: 0 0 0 1px rgba(224,255,239,.76), 0 0 12px rgba(60,239,147,.8), 0 0 0 0 rgba(67,239,141,.62); }
  72% { box-shadow: 0 0 0 1px rgba(224,255,239,.25), 0 0 20px rgba(60,239,147,.42), 0 0 0 7px rgba(67,239,141,.16); }
  100% { box-shadow: 0 0 0 1px rgba(224,255,239,0), 0 0 24px rgba(60,239,147,0), 0 0 0 11px rgba(67,239,141,0); }
}

.video-splice-auto-guide-cap {
  position: absolute;
  z-index: 14;
  top: 3px;
  display: grid;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 2px solid #9ddcff;
  border-radius: 8px 8px 5px 5px;
  color: #fff;
  background: #198ed2;
  box-shadow: 0 3px 12px rgba(16, 103, 160, .46);
  cursor: ew-resize;
  font-size: 9px;
  font-weight: 850;
  touch-action: none;
  transform: translateX(-50%);
  place-items: center;
}
.video-splice-auto-guide-cap.is-selected,
.video-splice-auto-guide-line.is-selected { filter: drop-shadow(0 0 5px #61c8ff); }
.video-splice-auto-guide-cap.is-snapped { border-color: #fff; background: #0a67a2; }
.video-splice-auto-guide-hit {
  position: absolute;
  z-index: 13;
  top: 0;
  bottom: var(--video-splice-auto-v0-height, 0px);
  width: 18px;
  cursor: ew-resize;
  touch-action: none;
  transform: translateX(-50%);
}
.video-splice-auto-guide-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: repeating-linear-gradient(to bottom, #40aef0 0 10px, transparent 10px 17px);
  box-shadow: 0 0 0 1px rgba(9, 68, 105, .28), 0 0 8px rgba(42, 170, 238, .36);
  pointer-events: none;
  transform: translateX(-50%);
}
.video-splice-auto-guide-hit.is-snapped .video-splice-auto-guide-line { background-color: rgba(111, 210, 255, .22); }
.video-splice-auto-guide-transition {
  position: absolute;
  z-index: 12;
  top: 8px;
  display: none;
  height: 50px;
  border: 2px solid #75cfff;
  border-radius: 7px;
  color: #ecf9ff;
  background: linear-gradient(135deg, rgba(24, 104, 166, .92), rgba(31, 155, 211, .88));
  box-shadow: 0 0 14px rgba(55, 174, 238, .38);
  transform: translateX(-50%);
}
.video-splice-timeline-panel[data-edit-mode="transition"][data-preview-mode="auto"] .video-splice-auto-guide-transition { display: block; }
.video-splice-auto-guide-transition > span {
  position: absolute;
  top: 3px;
  right: 4px;
  left: 4px;
  overflow: hidden;
  font-size: 7px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-splice-auto-guide-transition button {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  width: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: ew-resize;
}
.video-splice-auto-guide-transition button:first-of-type { left: -6px; }
.video-splice-auto-guide-transition button:last-of-type { right: -6px; }

.video-splice-auto-lock-overlay {
  position: absolute;
  z-index: 23;
  inset: 76px 0 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  color: #ebfff5;
  text-align: center;
  pointer-events: none;
}
.video-splice-auto-lock-overlay.hidden { display: none; }
.video-splice-auto-lock-icon { width: 58px; height: 58px; filter: drop-shadow(0 0 12px rgba(66, 236, 145, .5)); }
.video-splice-auto-lock-icon svg { width: 100%; height: 100%; fill: rgba(25, 103, 67, .92); stroke: #d9ffea; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.video-splice-auto-lock-overlay strong { font-size: 11px; }
.video-splice-auto-lock-overlay small { color: #abd8c0; font-size: 8px; }
.video-splice-timeline-panel.is-auto-mixing::after {
  position: absolute;
  z-index: 20;
  inset: 0;
  background: rgba(5, 10, 8, .64);
  backdrop-filter: saturate(.55);
  content: "";
  pointer-events: none;
}
.video-splice-timeline-panel.is-auto-mixing .video-splice-timeline-expand {
  position: relative;
  z-index: 25;
  border-color: #6cd4a5;
  color: #fff;
}

body.video-splice-mode-switching,
body.video-splice-capability-checking { overflow: hidden; }
.video-splice-capability-dialog {
  position: fixed;
  z-index: 19945;
  inset: 0;
  display: grid;
  padding: 24px;
  background: rgba(4, 15, 10, .7);
  place-items: center;
}
.video-splice-capability-dialog.hidden { display: none; }

.video-splice-tts-install-modal {
  position: fixed;
  z-index: 260;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 20, 13, .72);
  backdrop-filter: blur(6px);
  animation: workspace-backdrop-in .16s ease-out;
}
.video-splice-tts-install-modal.hidden { display: none; }
.video-splice-tts-install-card {
  width: min(680px, 100%);
  max-height: calc(100vh - 48px);
  padding: 26px;
  overflow: auto;
  border: 1px solid rgba(193, 220, 206, .94);
  border-radius: 22px;
  outline: none;
  color: #263d31;
  background:
    radial-gradient(circle at 92% 7%, rgba(71, 185, 132, .12), transparent 28%),
    #fbfdfc;
  box-shadow: 0 30px 90px rgba(2, 18, 10, .35);
}
.video-splice-tts-install-header {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}
.video-splice-tts-install-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: white;
  background: linear-gradient(145deg, #16815b, #0c5e40);
  box-shadow: 0 10px 24px rgba(12, 94, 64, .22);
  font-size: 19px;
  font-weight: 900;
}
.video-splice-tts-install-header > div { min-width: 0; }
.video-splice-tts-install-eyebrow {
  color: #20815d;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
}
.video-splice-tts-install-header h2 {
  margin: 4px 0 5px;
  color: #173a29;
  font-size: 21px;
}
.video-splice-tts-install-header p {
  margin: 0;
  overflow: hidden;
  color: #64786d;
  font-size: 11px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#video-splice-tts-install-percent {
  min-width: 62px;
  color: #176b4b;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.video-splice-tts-install-progress {
  height: 10px;
  margin-top: 20px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2ece7;
  box-shadow: inset 0 1px 2px rgba(17, 61, 40, .09);
}
.video-splice-tts-install-progress > i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #17815a, #32b982);
  box-shadow: 0 0 16px rgba(38, 175, 119, .34);
  transition: width .24s ease;
}
.video-splice-tts-install-card[data-result="error"] .video-splice-tts-install-progress > i {
  background: linear-gradient(90deg, #a64039, #d76258);
}
.video-splice-tts-install-card[data-result="success"] .video-splice-tts-install-progress > i {
  background: linear-gradient(90deg, #16815a, #3bc58d);
}
.video-splice-tts-install-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}
.video-splice-tts-install-metrics > span {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid #dfe9e3;
  border-radius: 12px;
  background: rgba(245, 250, 247, .88);
}
.video-splice-tts-install-metrics small {
  color: #7a8c82;
  font-size: 9px;
}
.video-splice-tts-install-metrics strong {
  overflow: hidden;
  color: #2d493a;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-splice-tts-install-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 19px 0 17px;
  padding: 0;
  list-style: none;
}
.video-splice-tts-install-steps li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: #94a199;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
}
.video-splice-tts-install-steps li::before {
  position: absolute;
  z-index: 0;
  top: 6px;
  right: 50%;
  left: -50%;
  height: 2px;
  background: #dfe8e3;
  content: "";
}
.video-splice-tts-install-steps li:first-child::before { display: none; }
.video-splice-tts-install-steps li > i {
  z-index: 1;
  width: 14px;
  height: 14px;
  border: 3px solid #dce7e1;
  border-radius: 50%;
  background: #fbfdfc;
}
.video-splice-tts-install-steps li.is-active,
.video-splice-tts-install-steps li.is-complete { color: #246a4d; }
.video-splice-tts-install-steps li.is-active > i {
  border-color: #2aab78;
  box-shadow: 0 0 0 5px rgba(42, 171, 120, .12);
}
.video-splice-tts-install-steps li.is-complete > i {
  border-color: #268b63;
  background: #268b63;
}
.video-splice-tts-install-steps li.is-complete::before,
.video-splice-tts-install-steps li.is-active::before { background: #54b88b; }
.video-splice-tts-install-log-wrap {
  overflow: hidden;
  border: 1px solid #dce7e1;
  border-radius: 14px;
  background: #f4f8f6;
}
.video-splice-tts-install-log-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  border-bottom: 1px solid #dfe8e3;
  background: #edf4f0;
}
.video-splice-tts-install-log-heading strong { color: #365244; font-size: 10px; }
.video-splice-tts-install-log-heading small { color: #819087; font-size: 8px; }
.video-splice-tts-install-log {
  display: grid;
  align-content: start;
  gap: 7px;
  height: 132px;
  padding: 11px 13px;
  overflow: auto;
  color: #536b5e;
  font-size: 10px;
  line-height: 1.45;
}
.video-splice-tts-install-log p {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 9px;
  margin: 0;
}
.video-splice-tts-install-log time {
  color: #8b9991;
  font-variant-numeric: tabular-nums;
}
.video-splice-tts-install-log p.is-error span { color: #a43f38; }
.video-splice-tts-install-log p.is-success span { color: #16714e; font-weight: 750; }
.video-splice-tts-install-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}
.video-splice-tts-install-card footer small { color: #73847b; font-size: 9px; }
#video-splice-tts-install-cancel {
  min-width: 116px;
  min-height: 34px;
  border: 1px solid #d3a4a0;
  border-radius: 10px;
  color: #9c3e38;
  background: #fff8f7;
  font-size: 10px;
  font-weight: 780;
}
#video-splice-tts-install-cancel:hover:not(:disabled) { background: #fff0ef; }
#video-splice-tts-install-cancel:disabled { cursor: wait; opacity: .58; }
.video-splice-tts-install-card[data-result="success"] #video-splice-tts-install-cancel,
.video-splice-tts-install-card[data-result="error"] #video-splice-tts-install-cancel,
.video-splice-tts-install-card[data-result="cancelled"] #video-splice-tts-install-cancel {
  border-color: #bcd3c7;
  color: #315d49;
  background: white;
}
body.video-splice-tts-install-open { overflow: hidden; }

@media (max-width: 700px) {
  .video-splice-tts-install-modal { padding: 12px; }
  .video-splice-tts-install-card { padding: 19px; border-radius: 17px; }
  .video-splice-tts-install-header { grid-template-columns: 42px minmax(0, 1fr); }
  .video-splice-tts-install-mark { width: 42px; height: 42px; border-radius: 13px; font-size: 16px; }
  #video-splice-tts-install-percent { grid-column: 1 / -1; text-align: left; }
  .video-splice-tts-install-metrics { grid-template-columns: 1fr; }
  .video-splice-tts-install-steps li span { font-size: 8px; }
  .video-splice-tts-install-card footer { align-items: stretch; flex-direction: column; }
}
.video-splice-capability-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 16px;
  width: min(470px, calc(100vw - 40px));
  padding: 22px;
  border: 1px solid rgba(64, 183, 128, .28);
  border-radius: 18px;
  outline: none;
  color: #173d2d;
  background: rgba(255, 255, 255, .99);
  box-shadow: 0 24px 76px rgba(0, 20, 12, .36);
  animation: video-splice-mode-loading-in .2s cubic-bezier(.2, .8, .2, 1) both;
}
.video-splice-capability-icon {
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  color: #16845b;
  background: linear-gradient(145deg, #e9fff4, #d5f6e6);
  box-shadow: inset 0 0 0 1px rgba(31, 142, 95, .15);
  place-items: center;
}
.video-splice-capability-icon span::before { content: "✓"; font-size: 25px; font-weight: 900; }
.video-splice-capability-icon.is-checking span {
  width: 27px;
  height: 27px;
  border: 3px solid rgba(28, 139, 93, .2);
  border-top-color: #16845b;
  border-radius: 50%;
  animation: video-splice-mode-loading-spin .85s linear infinite;
}
.video-splice-capability-icon.is-checking span::before { content: ""; }
.video-splice-capability-icon.is-eco {
  color: #976511;
  background: linear-gradient(145deg, #fff9df, #f8eab5);
}
.video-splice-capability-icon.is-eco span::before { content: "◒"; }
.video-splice-capability-icon.is-unsupported {
  color: #b43f39;
  background: linear-gradient(145deg, #fff0ef, #f6d4d1);
}
.video-splice-capability-icon.is-unsupported span::before { content: "!"; }
.video-splice-capability-copy { min-width: 0; }
.video-splice-capability-copy > span {
  display: block;
  margin-bottom: 4px;
  color: #21805d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}
.video-splice-capability-copy h2 { margin: 0; color: #123727; font-size: 17px; line-height: 1.3; }
.video-splice-capability-copy p { margin: 6px 0 0; color: #5b7065; font-size: 11px; line-height: 1.55; }
.video-splice-capability-details {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.video-splice-capability-details > span {
  display: grid;
  min-width: 0;
  padding: 8px;
  border: 1px solid #dce8e2;
  border-radius: 9px;
  background: #f7faf8;
  gap: 3px;
}
.video-splice-capability-details b { color: #6a7c72; font-size: 8px; }
.video-splice-capability-details em {
  overflow: hidden;
  color: #294c3c;
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-splice-capability-progress {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: #e2eee8;
}
.video-splice-capability-progress.hidden { display: none; }
.video-splice-capability-progress i {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1b8c62, #5acb94);
  animation: video-splice-mode-loading-progress 1.05s ease-in-out infinite;
}
.video-splice-capability-card footer {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.video-splice-capability-card footer:has(> button.hidden + button.hidden) { display: none; }
.video-splice-capability-card footer button {
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid #c7d9d0;
  border-radius: 8px;
  color: #315c47;
  background: #f3f8f5;
  font-size: 10px;
  font-weight: 750;
}
.video-splice-capability-card footer button:hover { border-color: #55a781; background: #eaf6ef; }
.video-splice-capability-card footer button.hidden { display: none; }
.video-splice-mode-loading {
  position: fixed;
  z-index: 19940;
  inset: 0;
  display: grid;
  padding: 24px;
  background: rgba(4, 15, 10, .68);
  place-items: center;
}
.video-splice-mode-loading.hidden { display: none; }
.video-splice-mode-loading-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 16px;
  width: min(410px, calc(100vw - 40px));
  padding: 22px 22px 19px;
  border: 1px solid rgba(64, 183, 128, .28);
  border-radius: 18px;
  outline: none;
  color: #173d2d;
  background: rgba(255, 255, 255, .985);
  box-shadow: 0 24px 76px rgba(0, 20, 12, .34);
  animation: video-splice-mode-loading-in .2s cubic-bezier(.2, .8, .2, 1) both;
}
.video-splice-mode-loading-spinner {
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(145deg, #e9fff4, #d5f6e6);
  box-shadow: inset 0 0 0 1px rgba(31, 142, 95, .15);
  place-items: center;
}
.video-splice-mode-loading-spinner::before,
.video-splice-mode-loading-spinner::after {
  position: absolute;
  width: 27px;
  height: 27px;
  border: 3px solid rgba(28, 139, 93, .2);
  border-top-color: #16845b;
  border-radius: 50%;
  content: "";
  animation: video-splice-mode-loading-spin .85s linear infinite;
}
.video-splice-mode-loading-spinner::after {
  width: 15px;
  height: 15px;
  border-width: 2px;
  border-top-color: #57bb8b;
  animation-direction: reverse;
  animation-duration: .62s;
}
.video-splice-mode-loading-copy { min-width: 0; }
.video-splice-mode-loading-copy > span {
  display: block;
  margin-bottom: 4px;
  color: #21805d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}
.video-splice-mode-loading-copy h2 {
  margin: 0;
  color: #123727;
  font-size: 17px;
  line-height: 1.3;
}
.video-splice-mode-loading-copy p {
  margin: 6px 0 0;
  color: #5b7065;
  font-size: 11px;
  line-height: 1.55;
}
.video-splice-mode-loading-progress {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: #e2eee8;
}
.video-splice-mode-loading-progress i {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1b8c62, #5acb94);
  animation: video-splice-mode-loading-progress 1.05s ease-in-out infinite;
}
@keyframes video-splice-mode-loading-in {
  from { opacity: 0; transform: translateY(7px) scale(.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes video-splice-mode-loading-spin { to { transform: rotate(360deg); } }
@keyframes video-splice-mode-loading-progress {
  0% { transform: translateX(-110%); }
  55% { transform: translateX(90%); }
  100% { transform: translateX(260%); }
}
.video-splice-timeline-panel.is-auto-mixing .video-splice-timeline-content { pointer-events: none; }
.video-splice-auto-lock-overlay.is-locking .video-splice-auto-lock-shackle { animation: video-splice-lock-close .42s ease-out both; }
.video-splice-auto-lock-overlay.is-locked .video-splice-auto-lock-icon { animation: video-splice-lock-pulse 1.8s ease-in-out infinite; }
.video-splice-auto-lock-overlay.is-unlocking .video-splice-auto-lock-shackle { animation: video-splice-lock-open .42s ease-in both; }
@keyframes video-splice-lock-close { from { transform: translateY(-10px) rotate(-18deg); transform-origin: 44px 29px; } to { transform: none; } }
@keyframes video-splice-lock-open { from { transform: none; } to { transform: translateY(-10px) rotate(-18deg); transform-origin: 44px 29px; } }
@keyframes video-splice-lock-pulse { 0%,100% { opacity:.72; filter:drop-shadow(0 0 8px rgba(66,236,145,.3)); } 50% { opacity:1; filter:drop-shadow(0 0 19px rgba(66,236,145,.72)); } }
.video-splice-clip.is-selected {
  z-index: 5;
  border-color: #f4f7f5;
  box-shadow: 0 0 0 2px rgba(74, 216, 153, .62), 0 0 18px rgba(73, 207, 147, .26);
}
.video-splice-clip.is-dragging {
  opacity: .28;
  filter: saturate(.4);
}
.video-splice-timeline-panel[data-edit-mode="transition"] .video-splice-clip {
  opacity: .3;
  filter: saturate(.45);
  pointer-events: none;
}
.video-splice-timeline-panel[data-edit-mode="video"] .video-splice-transition {
  opacity: .28;
  filter: saturate(.45);
  pointer-events: none;
}
.video-splice-drop-placeholder {
  position: absolute;
  z-index: 7;
  top: 4px;
  display: grid;
  height: 58px;
  min-width: 24px;
  overflow: hidden;
  border: 2px dashed #e8fff4;
  border-radius: 4px;
  color: #eafff5;
  background: rgba(43, 191, 124, .28);
  box-shadow: inset 0 0 18px rgba(90, 241, 174, .14), 0 0 14px rgba(49, 205, 136, .24);
  font-size: 8px;
  pointer-events: none;
  place-items: center;
}
.video-splice-transition-placement-preview {
  position: absolute;
  z-index: 10;
  top: 8px;
  display: grid;
  height: 50px;
  min-width: 28px;
  border: 2px dashed #bdffe0;
  border-radius: 7px;
  color: #f2fff8;
  background: repeating-linear-gradient(135deg, rgba(52, 216, 143, .42) 0 8px, rgba(26, 133, 88, .36) 8px 16px);
  box-shadow: inset 0 0 20px rgba(100, 255, 188, .14), 0 0 22px rgba(58, 231, 151, .5);
  font-size: 8px;
  font-weight: 800;
  text-align: center;
  pointer-events: none;
  place-items: center;
}
.video-splice-transition {
  position: absolute;
  z-index: 6;
  top: 8px;
  display: grid;
  height: 50px;
  min-width: 28px;
  overflow: visible;
  border: 2px solid #69e3ad;
  border-radius: 7px;
  color: #eafff5;
  background: linear-gradient(135deg, rgba(25, 119, 82, .96), rgba(44, 182, 123, .9));
  box-shadow: 0 0 0 1px rgba(1, 20, 11, .7), 0 5px 15px rgba(0, 0, 0, .25);
  cursor: pointer;
  transition: opacity .16s ease, filter .16s ease, border-color .16s ease, box-shadow .16s ease;
  place-items: center;
}
.video-splice-transition::before {
  position: absolute;
  inset: 0;
  border-radius: 5px;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.1) 0 6px, transparent 6px 12px);
  content: "";
  pointer-events: none;
}
.video-splice-transition.is-selected {
  z-index: 7;
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(80, 239, 170, .7), 0 0 22px rgba(62, 232, 153, .5);
}
.video-splice-transition-symbol {
  position: relative;
  z-index: 1;
  font-size: 17px;
  font-weight: 850;
  pointer-events: none;
}
.video-splice-transition-name {
  position: absolute;
  z-index: 3;
  top: 3px;
  right: 4px;
  left: 4px;
  display: none;
  overflow: hidden;
  color: rgba(239, 255, 247, .94);
  font-size: 7px;
  font-weight: 780;
  line-height: 1.2;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
.video-splice-timeline-panel[data-edit-mode="transition"] .video-splice-transition-name { display: block; }
.video-splice-transition-duration {
  position: absolute;
  z-index: 4;
  bottom: 2px;
  left: 50%;
  padding: 2px 5px;
  border: 1px solid rgba(112, 239, 179, .5);
  border-radius: 6px;
  color: #eafff4;
  background: rgba(9, 35, 23, .96);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .25);
  font-size: 7px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(2px);
  transition: opacity .12s ease, transform .12s ease;
  white-space: nowrap;
}
.video-splice-timeline-panel[data-edit-mode="transition"] .video-splice-transition:hover .video-splice-transition-duration,
.video-splice-timeline-panel[data-edit-mode="transition"] .video-splice-transition.is-resizing .video-splice-transition-duration {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.video-splice-transition-handle {
  position: absolute;
  z-index: 5;
  top: 0;
  bottom: 0;
  width: 11px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  cursor: ew-resize;
}
.video-splice-transition-handle::after {
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 99px;
  background: rgba(238, 255, 247, .95);
  box-shadow: 0 0 0 1px rgba(1, 38, 21, .35);
  content: "";
}
.video-splice-transition-handle.is-left { left: 0; }
.video-splice-transition-handle.is-left::after { left: 3px; }
.video-splice-transition-handle.is-right { right: 0; }
.video-splice-transition-handle.is-right::after { right: 3px; }
.video-splice-transition-handle:hover { background: rgba(255, 255, 255, .14); }
.video-splice-preview-stack .video-splice-transition-plate {
  position: absolute;
  inset: 0;
  background: white;
  pointer-events: none;
}
.video-splice-preview-stack video {
  transform-origin: center center;
  will-change: opacity, transform;
}
.video-splice-clip-frames {
  position: relative;
  display: flex;
  min-width: 0;
  padding: 0 !important;
  overflow: hidden;
  background: #0b110d;
}
.video-splice-clip-frames img {
  display: block;
  width: 68px;
  min-width: 68px;
  height: 26px;
  flex: 0 0 68px;
  background: #0b110d;
  object-fit: cover;
  pointer-events: none;
}
.video-splice-clip-frames video {
  display: block;
  width: 100%;
  min-width: 0;
  height: 26px;
  flex: 1 1 auto;
  background: #0b110d;
  object-fit: cover;
  pointer-events: none;
}
.video-splice-frames-loading {
  position: absolute;
  right: 6px;
  bottom: 4px;
  padding: 2px 4px;
  border-radius: 3px;
  color: #d9e5df;
  background: rgba(5, 10, 7, .68);
  font-size: 7px;
}
.video-splice-clip-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-width: 0;
  padding: 2px 6px !important;
  background: #205e42;
}
.video-splice-clip.is-audio .video-splice-clip-caption { background: #176278; }
.video-splice-clip strong {
  overflow: hidden;
  color: #eef8f3;
  font-size: 8px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-splice-clip small { flex: 0 0 auto; color: #b8dfce; font-size: 7px; }
.video-splice-clip-waveform {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #1fb8d4;
  background:
    linear-gradient(rgba(15, 177, 207, .1), rgba(15, 177, 207, .02)),
    #12302d;
  pointer-events: none;
}
.video-splice-clip-waveform::after {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: rgba(145, 232, 236, .18);
  content: "";
}
.video-splice-clip-waveform svg {
  position: absolute;
  inset: 1px 0;
  width: 100%;
  height: calc(100% - 2px);
}
.video-splice-clip-waveform path { fill: currentColor; opacity: .92; }
.video-splice-clip-waveform.is-audio {
  color: #19b9dd;
  background: linear-gradient(180deg, #133d49, #0f3039);
}
.video-splice-clip-waveform.is-pending path,
.video-splice-clip-waveform.is-loading path { opacity: .26; }
.video-splice-clip-waveform.is-failed path,
.video-splice-clip-waveform.is-skipped path { fill: #728d86; opacity: .55; }
.video-splice-trim-handle {
  position: absolute;
  z-index: 6;
  top: 0;
  bottom: 0;
  width: min(8px, 28%);
  height: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: ew-resize;
  touch-action: none;
  translate: none !important;
  scale: none !important;
}
.video-splice-trim-handle::after {
  position: absolute;
  top: 15px;
  bottom: 15px;
  width: 3px;
  border-radius: 99px;
  background: rgba(240, 255, 248, .94);
  box-shadow: 0 0 0 1px rgba(3, 40, 24, .28);
  content: "";
  opacity: .72;
  transition: opacity .12s ease, background .12s ease;
}
.video-splice-trim-handle.is-left { left: 0; }
.video-splice-trim-handle.is-left::after { left: 2px; }
.video-splice-trim-handle.is-right { right: 0; }
.video-splice-trim-handle.is-right::after { right: 2px; }
.video-splice-clip:hover .video-splice-trim-handle::after,
.video-splice-clip.is-selected .video-splice-trim-handle::after,
.video-splice-clip.is-trimming .video-splice-trim-handle::after {
  background: #fff;
  opacity: 1;
}
.video-splice-clip.is-trimming::after {
  position: absolute;
  z-index: 9;
  top: 2px;
  left: 50%;
  padding: 2px 5px;
  border-radius: 5px;
  color: #f3fff8;
  background: rgba(4, 28, 18, .88);
  content: attr(data-trim-duration);
  font-size: 7px;
  font-weight: 750;
  pointer-events: none;
  transform: translateX(-50%);
  white-space: nowrap;
}
.video-splice-muted-badge {
  position: absolute;
  z-index: 4;
  top: 15px;
  right: 5px;
  padding: 2px 5px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 99px;
  color: #effff7;
  background: rgba(6, 18, 12, .78);
  font-size: 7px;
  font-weight: 750;
  pointer-events: none;
}
.video-splice-clip-menu {
  position: fixed;
  z-index: 10050;
  display: grid;
  width: 126px;
  padding: 6px;
  border: 1px solid rgba(61, 98, 79, .42);
  border-radius: 10px;
  background: rgba(249, 252, 250, .98);
  box-shadow: 0 14px 36px rgba(3, 24, 14, .24);
  backdrop-filter: blur(12px);
}
.video-splice-clip-menu.hidden { display: none; }
.video-splice-clip-menu button {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  color: #1f392d;
  background: transparent;
  text-align: left;
}
.video-splice-clip-menu button:hover,
.video-splice-clip-menu button:focus-visible {
  outline: 0;
  color: #08734a;
  background: #e8f7ef;
}
.video-splice-clip-menu button:first-child:hover,
.video-splice-clip-menu button:first-child:focus-visible {
  color: #a82f2f;
  background: #fff0ef;
}
.video-splice-clip-menu span { font-size: 15px; text-align: center; }
.video-splice-clip-menu strong { font-size: 11px; font-weight: 700; }
.video-splice-auto-guide-menu { width: 238px; }
.video-splice-auto-guide-menu button { grid-template-columns: 22px 42px minmax(0, 1fr); }
.video-splice-auto-guide-menu small {
  color: #667a70;
  font-size: 8px;
  line-height: 1.35;
}
.video-splice-auto-v0-menu { width: 224px; }
.video-splice-auto-v0-menu button {
  grid-template-columns: 22px 42px minmax(0, 1fr);
}
.video-splice-auto-v0-menu button:first-child:hover,
.video-splice-auto-v0-menu button:first-child:focus-visible,
.video-splice-auto-v0-menu button.is-active {
  color: #08734a;
  background: #e8f7ef;
}
.video-splice-auto-v0-menu button.is-active span { color: #11915f; }
.video-splice-auto-v0-menu small {
  color: #667a70;
  font-size: 8px;
  line-height: 1.35;
}
.video-splice-playhead-line {
  position: absolute;
  z-index: 8;
  top: 0;
  bottom: 0;
  left: 0;
  width: 13px;
  background: transparent;
  cursor: ew-resize;
  touch-action: none;
  transform: translateX(-6px);
}
.video-splice-playhead-line::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 1px;
  background: rgba(245, 247, 246, .96);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .2);
  content: "";
}

@media (max-width: 1480px) {
  #video-splice-timeline-summary { display: none; }
}
@media (max-width: 1160px) {
  .video-splice-upper { grid-template-columns: minmax(300px, 1fr) minmax(280px, .85fr); }
  .video-splice-editor { grid-template-rows: minmax(300px, 1fr) minmax(250px, .8fr); }
  .video-splice-timeline-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }
  .video-splice-timeline-panel .video-splice-timeline-heading { gap: 6px; }
  .video-splice-tool-strip { padding: 0 4px; }
  .video-splice-tool-strip button {
    width: 27px;
    min-width: 27px;
    height: 27px;
    padding: 0;
  }
  .video-splice-tool-strip svg { width: 15px; height: 15px; }
  .video-splice-zoom-preview b { width: 46px; }
  .video-splice-zoom-preview em { display: none; }
  .video-splice-preview-footer { gap: 4px; padding-inline: 6px; }
  .video-splice-preview-action { gap: 4px; min-width: 70px; padding-inline: 7px; }
  .video-splice-preview-action strong { max-width: 58px; }
  .video-splice-preview-action[aria-busy="true"] > span:not(.ui-button-ripple) { display: none; }
  .video-splice-play-button { gap: 5px; min-width: 72px; padding-inline: 10px; }
  .video-splice-timeline-heading .video-splice-auto-controls > label > span:not(.ui-button-ripple) { display: none; }
}
@media (max-width: 900px) {
  .video-splice-upper {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(300px, 1fr) minmax(260px, auto);
    min-height: 574px;
  }
  .video-splice-editor { grid-template-rows: auto minmax(320px, 1fr); }
  .video-splice-preview-panel { min-height: 260px; }
  .video-splice-zoom-preview > span,
  .video-splice-zoom-preview > b,
  .video-splice-zoom-preview > em { display: none; }
}

@media (max-height: 760px) {
  .video-sidebar { gap: 7px; }
  .video-sidebar-card { padding: 8px; }
  .video-prompt-card { min-height: 110px; }
  .video-prompt-card textarea { min-height: 75px; }
}

.video-storyboard-workspace {
  min-height: 0;
  padding: 22px 24px 18px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 8%, rgba(47, 151, 108, .08), transparent 30%),
    #f6f9f7;
}
.video-storyboard-workspace:not(.hidden) { display: grid; }
.video-storyboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.video-storyboard-header > div:first-child { min-width: 0; }
.video-storyboard-header h2 {
  margin: 3px 0 4px;
  color: #0c2c20;
  font-size: 24px;
  line-height: 1.2;
}
.video-storyboard-header p {
  margin: 0;
  color: #6d7f76;
  font-size: 11px;
  line-height: 1.55;
}
.video-storyboard-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.video-storyboard-header-actions > span {
  color: #75877e;
  font-size: 10px;
}
.video-storyboard-header-actions button,
.video-storyboard-row-actions button,
.video-storyboard-clip footer button,
.video-storyboard-add-row,
.video-storyboard-start {
  border: 1px solid #cbdcd3;
  border-radius: 10px;
  color: #184d38;
  background: #fff;
  font: inherit;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease, opacity .16s ease;
}
.video-storyboard-header-actions button,
.video-storyboard-row-actions button { min-height: 34px; padding: 0 13px; }
.video-storyboard-header-actions button:hover:not(:disabled),
.video-storyboard-row-actions button:hover:not(:disabled),
.video-storyboard-clip footer button:hover:not(:disabled),
.video-storyboard-add-row:hover:not(:disabled) {
  border-color: #58a983;
  background: #eef8f2;
  transform: translateY(-1px);
}
.video-storyboard-workspace button:disabled { cursor: not-allowed; opacity: .42; }
.video-storyboard-rows {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  padding: 2px 5px 12px 1px;
  overflow: auto;
  scrollbar-color: #a6c9b8 transparent;
}
.video-storyboard-row {
  display: grid;
  grid-template-columns: minmax(210px, 256px) minmax(0, 1fr);
  min-height: 172px;
  overflow: hidden;
  border: 1px solid #d3e1da;
  border-radius: 16px;
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 9px 28px rgba(28, 80, 58, .055);
}
.video-storyboard-source {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 12px;
  border-right: 1px solid #deebe4;
  background: linear-gradient(150deg, #f3f8f5, #eaf4ef);
}
.video-storyboard-source.is-dragging {
  background: #e3f5eb;
  box-shadow: inset 0 0 0 2px #2a9569;
}
.video-storyboard-source-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 100%;
  min-height: 136px;
  padding: 18px;
  border: 1px dashed #9fc5b2;
  border-radius: 12px;
  color: #638073;
  background: rgba(255, 255, 255, .62);
  cursor: pointer;
}
.video-storyboard-source-empty > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #fff;
  background: #1b7f59;
  font-size: 22px;
}
.video-storyboard-source-empty strong { color: #264c3a; font-size: 11px; }
.video-storyboard-source-empty small { font-size: 8px; }
.video-storyboard-source-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
  width: 100%;
  height: 100%;
  min-height: 140px;
}
.video-storyboard-source-preview,
.video-storyboard-clip-preview {
  position: relative;
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: #101713;
  cursor: pointer;
}
.video-storyboard-source-preview video,
.video-storyboard-clip-preview video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.video-storyboard-source-preview::after,
.video-storyboard-clip-preview::after {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  color: #fff;
  background: rgba(9, 37, 25, .7);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .45);
  content: "▶";
  font-size: 10px;
  transform: translate(-50%, -50%);
}
.video-storyboard-source-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  align-items: center;
}
.video-storyboard-source-meta strong {
  overflow: hidden;
  color: #244838;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-storyboard-source-meta span { color: #71847a; font-size: 8px; }
.video-storyboard-source-meta button {
  grid-row: 1 / 3;
  grid-column: 2;
  width: 28px;
  height: 28px;
  border: 1px solid #d6e2dc;
  border-radius: 8px;
  color: #a54540;
  background: #fff;
  cursor: pointer;
}
.video-storyboard-results {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  padding: 12px 14px;
}
.video-storyboard-row-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding-bottom: 9px;
}
.video-storyboard-row-copy { display: grid; min-width: 0; gap: 2px; }
.video-storyboard-row-copy strong { color: #264c3a; font-size: 10px; }
.video-storyboard-row-copy small { color: #75877e; font-size: 8px; }
.video-storyboard-row-progress {
  display: grid;
  grid-template-columns: minmax(120px, 210px) auto;
  align-items: center;
  gap: 8px;
}
.video-storyboard-row-progress progress {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #e2ece7;
}
.video-storyboard-row-progress progress::-webkit-progress-bar { background: #e2ece7; }
.video-storyboard-row-progress progress::-webkit-progress-value { background: #239164; }
.video-storyboard-row-progress span { color: #2f7052; font-size: 8px; font-weight: 700; }
.video-storyboard-row-actions { display: flex; align-items: center; gap: 7px; }
.video-storyboard-clips {
  display: flex;
  gap: 10px;
  min-width: 0;
  min-height: 104px;
  padding: 1px 1px 11px;
  overflow-x: scroll;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-color: #a6c9b8 transparent;
  scrollbar-width: auto;
  touch-action: pan-x;
  cursor: grab;
}
.video-storyboard-clips.is-panning { cursor: grabbing; user-select: none; }
.video-storyboard-clips::-webkit-scrollbar { height: 10px; }
.video-storyboard-clips::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #edf4f0;
}
.video-storyboard-clips::-webkit-scrollbar-thumb {
  border: 2px solid #edf4f0;
  border-radius: 999px;
  background: #8dbba5;
}
.video-storyboard-clips-empty {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 103px;
  border: 1px dashed #d1e0d8;
  border-radius: 11px;
  color: #86978f;
  font-size: 9px;
  text-align: center;
}
.video-storyboard-clip {
  display: grid;
  grid-template-rows: 94px auto;
  flex: 0 0 166px;
  overflow: hidden;
  border: 1px solid #d7e4dd;
  border-radius: 11px;
  background: #fff;
  scroll-snap-align: start;
}
.video-storyboard-clip[data-status="failed"] { border-color: #efc4c0; background: #fff8f7; }
.video-storyboard-clip-preview { border-radius: 0; }
.video-storyboard-clip-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-storyboard-clip-preview.is-pending::after { content: "…"; }
.video-storyboard-clip footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 6px;
  align-items: center;
  padding: 7px 8px;
}
.video-storyboard-clip footer strong {
  overflow: hidden;
  color: #274b3b;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-storyboard-clip footer small { color: #7b8c83; font-size: 7px; }
.video-storyboard-clip footer button {
  grid-row: 1 / 3;
  grid-column: 2;
  min-height: 26px;
  padding: 0 8px;
  font-size: 8px;
}
.video-storyboard-footer {
  display: block;
}
.video-storyboard-add-row,
.video-storyboard-start { min-height: 45px; padding: 0 20px; }
.video-storyboard-start {
  width: 100%;
  border-color: #126f4d;
  color: #fff;
  background: linear-gradient(135deg, #0e6545, #21855e);
  box-shadow: 0 9px 20px rgba(20, 111, 76, .16);
  font-size: 12px;
}
.video-storyboard-start:hover:not(:disabled) {
  border-color: #0d5d40;
  background: linear-gradient(135deg, #0c5c3f, #1b7955);
  transform: translateY(-1px);
}
.video-storyboard-start.is-cancel {
  border-color: #b44942;
  background: linear-gradient(135deg, #9f3e38, #c3564e);
}
.video-storyboard-export-media {
  position: fixed;
  left: -10000px;
  top: -10000px;
  width: 2px;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}
.video-storyboard-preview-modal {
  position: fixed;
  z-index: 19100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 30px;
  background: rgba(4, 17, 11, .82);
  backdrop-filter: blur(7px);
}
.video-storyboard-preview-modal.hidden { display: none; }
.video-storyboard-preview-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1180px, 92vw);
  height: min(780px, 86vh);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 17px;
  background: #09120e;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .5);
}
.video-storyboard-preview-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px 11px 17px;
  color: #eef8f2;
  background: #12271d;
}
.video-storyboard-preview-card header strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.video-storyboard-preview-card header button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 9px;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  font-size: 19px;
  cursor: pointer;
}
.video-storyboard-preview-card > video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  background: #050806;
}
body.video-storyboard-preview-open { overflow: hidden; }
@media (max-width: 980px) {
  .video-storyboard-workspace { padding: 17px; }
  .video-storyboard-header { align-items: stretch; flex-direction: column; }
  .video-storyboard-header-actions { justify-content: space-between; }
  .video-storyboard-row { grid-template-columns: minmax(190px, 220px) minmax(0, 1fr); }
}
.batch-image-preview-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
}
.batch-image-preview-toolbar button {
  min-width: 38px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 9px;
  color: white;
  background: rgba(255, 255, 255, .1);
  font-size: 12px;
}
.batch-image-preview-toolbar button:hover {
  background: rgba(255, 255, 255, .2);
}
.batch-image-preview-toolbar button[aria-pressed="true"] {
  border-color: rgba(94, 220, 164, .68);
  color: #b9f6d9;
  background: rgba(31, 157, 105, .28);
}
.batch-image-preview-close {
  position: fixed;
  top: 18px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0 0 3px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, .12);
  font-size: 27px;
  line-height: 1;
}
.batch-image-preview-close:hover { background: rgba(255, 255, 255, .22); }
body.batch-image-preview-open { overflow: hidden; }
body.batch-image-preview-open .workspace-account-points {
  visibility: hidden;
}
.batch-local-failure-modal {
  position: fixed;
  z-index: 1250;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 18, 14, .66);
  backdrop-filter: blur(5px);
}
.batch-local-failure-modal > section {
  width: min(440px, calc(100vw - 36px));
  padding: 25px;
  border: 1px solid #dce5e0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(5, 24, 15, .28);
  text-align: center;
}
.batch-local-failure-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  border-radius: 50%;
  color: #fff;
  background: #b24a3c;
  font-size: 22px;
  font-weight: 850;
}
.batch-local-failure-modal h2 { margin: 0; color: #24392e; font-size: 19px; }
.batch-local-failure-modal p { margin: 11px 0 7px; color: #4d6256; font-size: 13px; line-height: 1.55; }
.batch-local-failure-modal small { display: block; color: #7d8c84; font-size: 10px; line-height: 1.55; }
.batch-local-failure-modal section > div { display: flex; justify-content: center; gap: 9px; margin-top: 20px; }
.batch-local-failure-modal section > div button { min-height: 38px; padding: 8px 15px; border-radius: 10px; }
.batch-local-failure-modal section > div button:last-child { color: #fff; background: #176b4d; }
@keyframes batch-image-preview-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fashion-tryon-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #f4f7f5;
}
.tryon-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 26px;
  border-bottom: 1px solid #e2e9e5;
  background: rgba(255, 255, 255, .96);
}
.tryon-heading-block {
  display: grid;
  gap: 0;
  min-width: 0;
}
.workspace .tryon-header h2 {
  display: block;
  margin: 3px 0 4px;
  font-size: 21px;
}
.tryon-header p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.tryon-header-actions { display: flex; align-items: stretch; gap: 9px; }
.tryon-switch-stack {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
.tryon-channel-clarity-row {
  display: flex;
  align-items: start;
  gap: 18px;
  min-height: 50px;
}
.tryon-segment-control {
  display: grid;
  grid-template-columns: 64px auto;
  align-items: center;
  gap: 5px 8px;
}
.tryon-segment-control > span {
  color: #72847a;
  font-size: 9px;
  font-weight: 750;
}
.tryon-segment-control > div {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px;
  border: 1px solid #d7e3dc;
  border-radius: 10px;
  background: #eff5f2;
}
.tryon-segment-control button {
  min-height: 29px;
  padding: 5px 15px;
  border: 0;
  border-radius: 7px;
  color: #6f7f76;
  background: transparent;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.tryon-segment-control button:hover:not(:disabled) { color: #145f43; }
.tryon-segment-control button.active {
  color: #fff;
  background: #167353;
  box-shadow: 0 3px 10px rgba(22, 115, 83, .16);
}
.tryon-segment-control button.is-auto-channel,
#creative-variation-channel-trigger.is-auto-channel,
.creative-rewrite-channel-trigger.is-auto-channel {
  position: relative;
  isolation: isolate;
  overflow: visible;
}
.tryon-segment-control button.is-auto-channel::before,
#creative-variation-channel-trigger.is-auto-channel::before,
.creative-rewrite-channel-trigger.is-auto-channel::before {
  content: "自动选择";
  position: absolute;
  z-index: 4;
  top: -15px;
  left: 50%;
  padding: 1px 5px;
  border: 1px solid rgba(68, 255, 160, .5);
  border-radius: 999px;
  background: rgba(8, 57, 39, .94);
  color: #7dffaf;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: .08em;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
  animation: image-auto-channel-label 2.4s ease-in-out infinite;
}
.tryon-segment-control button.is-auto-channel::after,
#creative-variation-channel-trigger.is-auto-channel::after,
.creative-rewrite-channel-trigger.is-auto-channel::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -3px;
  border: 1px solid rgba(73, 255, 153, .82);
  border-radius: inherit;
  pointer-events: none;
  animation: image-auto-channel-ripple 2.8s ease-out infinite;
}
@keyframes image-auto-channel-ripple {
  0%, 100% { opacity: .4; box-shadow: 0 0 0 0 rgba(54, 255, 143, .38), 0 0 8px rgba(54, 255, 143, .22); }
  52% { opacity: 1; box-shadow: 0 0 0 5px rgba(54, 255, 143, 0), 0 0 15px rgba(54, 255, 143, .58); }
}
@keyframes image-auto-channel-label {
  0%, 100% { opacity: .58; filter: brightness(.92); }
  50% { opacity: 1; filter: brightness(1.25); }
}
@media (prefers-reduced-motion: reduce) {
  .tryon-segment-control button.is-auto-channel::before,
  #creative-variation-channel-trigger.is-auto-channel::before,
  .creative-rewrite-channel-trigger.is-auto-channel::before,
  .tryon-segment-control button.is-auto-channel::after,
  #creative-variation-channel-trigger.is-auto-channel::after,
  .creative-rewrite-channel-trigger.is-auto-channel::after {
    animation: none;
  }
}
.tryon-segment-control button:disabled {
  cursor: not-allowed;
  opacity: .48;
}
.tryon-segment-control > small {
  grid-column: 2;
  color: #708279;
  font-size: 8px;
}
.tryon-segment-control > small[data-state="error"] { color: #b24538; }
.tryon-segment-control > small[data-state="ready"] { color: #14714f; }
.image-clarity-control > span { width: max-content; }
.image-clarity-control button { min-width: 54px; }
.image-generation-options {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding: 12px 13px;
  border: 1px solid #d8e6df;
  border-radius: 12px;
  background: #f6faf8;
}
.image-generation-options .tryon-segment-control {
  grid-template-columns: 78px minmax(0, auto);
}
.image-generation-options .tryon-segment-control > small { grid-column: 2; }
.image-generation-options .tryon-segment-control > div { max-width: 100%; }
.tryon-model-control {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 138px;
  padding: 6px 9px;
  border: 1px solid #d8e3dd;
  border-radius: 11px;
  background: #f8fbf9;
}
.tryon-model-control > span {
  color: #819088;
  font-size: 8px;
  font-weight: 700;
}
.tryon-model-picker { position: relative; }
#tryon-model-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 0;
  border: 0;
  color: #1e4f39;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
}
.tryon-model-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  display: grid;
  gap: 5px;
  width: 230px;
  padding: 8px;
  border: 1px solid #d8e4de;
  border-radius: 12px;
  background: white;
  box-shadow: 0 18px 48px rgba(12, 42, 27, .18);
}
.tryon-model-menu button {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  color: #43574c;
  background: transparent;
  text-align: left;
}
.tryon-model-menu button:hover,
.tryon-model-menu button.active {
  color: #0d6242;
  background: #edf7f2;
}
.tryon-model-menu button strong { font-size: 11px; }
.tryon-model-menu button small { color: #829189; font-size: 8px; }
.tryon-canvas {
  display: grid;
  grid-template-rows: minmax(330px, .88fr) auto minmax(300px, 1fr);
  gap: 14px;
  min-height: 0;
  padding: 18px 22px 30px;
  overflow: auto;
}
.tryon-canvas:has(#tryon-gemini-input-grid:not(.hidden)) {
  grid-template-rows: auto auto minmax(300px, 1fr);
}
.tryon-canvas:has(#tryon-precision-grid:not(.hidden)) {
  display: block;
}
.tryon-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-height: 0;
}
.tryon-gemini-input-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, .72fr);
  gap: 14px;
  min-height: 510px;
}
.tryon-precision-grid {
  display: grid;
  grid-template-rows: 390px auto minmax(360px, 1fr);
  gap: 14px;
  min-height: 860px;
}
.tryon-precision-top {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(430px, 1.45fr) minmax(280px, .82fr);
  gap: 14px;
  min-height: 0;
}
.tryon-precision-card,
.tryon-precision-output {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.tryon-precision-prompt textarea {
  flex: 1;
  min-height: 150px;
  resize: vertical;
  border: 1px solid #d6e2dc;
  border-radius: 11px;
  padding: 12px;
  color: #2d4438;
  background: #fbfdfc;
  font: inherit;
  font-size: 11px;
  line-height: 1.6;
}
.tryon-precision-prompt textarea:focus {
  outline: 2px solid rgba(23, 107, 77, .13);
  border-color: #4e9476;
}
.tryon-precision-card > p,
.tryon-precision-prompt > p {
  margin: 9px 0 10px;
  color: #7b8a82;
  font-size: 9px;
  line-height: 1.5;
}
.tryon-precision-prompt > small {
  margin-top: 8px;
  color: #839189;
  font-size: 9px;
}
.tryon-precision-placeholder {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  min-height: 180px;
  border: 1px dashed #cbdad2;
  border-radius: 12px;
  color: #65786e;
  background: #fafcfb;
  text-align: center;
}
.tryon-precision-placeholder > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #197352;
  background: #edf7f2;
  font-size: 16px;
}
.tryon-precision-placeholder strong { font-size: 12px; }
.tryon-precision-placeholder small { color: #89978f; font-size: 9px; }
.tryon-precision-source-grid {
  grid-auto-flow: column;
  grid-auto-columns: 122px;
  grid-template-columns: none;
  flex: 1;
  min-height: 260px;
  overflow-x: auto;
  overflow-y: hidden;
}
.tryon-precision-source-grid .tryon-upload-item,
.tryon-precision-source-grid .tryon-add-tile,
.tryon-precision-source-grid .tryon-upload-item img {
  min-height: 235px;
  height: 235px;
}
.tryon-precision-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
  overflow: auto;
}
.tryon-precision-detail-slot {
  display: grid;
  grid-template-rows: auto minmax(105px, 1fr);
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #e0e9e4;
  border-radius: 11px;
  background: #fbfdfc;
}
.tryon-precision-detail-slot > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #496055;
  font-size: 9px;
}
.tryon-precision-detail-slot > header span {
  color: #829088;
  font-size: 8px;
}
.tryon-precision-other-slot { grid-column: 1 / -1; }
.tryon-precision-category-grid {
  grid-auto-flow: column;
  grid-auto-columns: 92px;
  grid-template-columns: none;
  min-height: 105px;
  overflow-x: auto;
  overflow-y: hidden;
}
.tryon-precision-category-grid .tryon-upload-item,
.tryon-precision-category-grid .tryon-add-tile,
.tryon-precision-category-grid .tryon-upload-item img {
  min-height: 88px;
  height: 88px;
}
.tryon-precision-category-grid .tryon-item-resolution { display: none; }
.tryon-precision-category-grid .tryon-add-tile { padding: 7px; }
.tryon-precision-category-grid .tryon-add-tile span { font-size: 20px; }
.tryon-precision-category-grid .tryon-add-tile strong { font-size: 8px; }
.tryon-precision-category-grid .tryon-add-tile small { font-size: 7px; }
.tryon-precision-other-grid {
  grid-auto-columns: 146px;
  min-height: 126px;
}
.tryon-precision-other-grid .tryon-upload-item,
.tryon-precision-other-grid .tryon-add-tile {
  min-height: 120px;
  height: 120px;
}
.tryon-precision-other-grid .tryon-upload-item.has-detail-description {
  display: grid;
  grid-template-rows: 88px 32px;
  background: #fff;
}
.tryon-precision-other-grid .tryon-upload-item.has-detail-description img {
  width: 100%;
  height: 88px;
  min-height: 88px;
  object-fit: contain;
  background: #eff4f1;
}
.tryon-precision-detail-description {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px 6px;
  border-top: 1px solid #dbe4df;
  color: #3f554a;
  background: #fff;
  font-size: 8px;
  font-weight: 700;
}
.tryon-precision-detail-description input {
  min-width: 0;
  width: 100%;
  height: 23px;
  padding: 3px 5px;
  border: 1px solid #cad9d1;
  border-radius: 6px;
  outline: none;
  color: #163f2f;
  background: #f8fbf9;
  font: inherit;
}
.tryon-precision-detail-description input:focus {
  border-color: #1a7d58;
  box-shadow: 0 0 0 2px rgba(26, 125, 88, .12);
}
.tryon-precision-detail-description span { white-space: nowrap; }
.tryon-precision-action-row { margin: 0; }
.tryon-precision-output { min-height: 360px; }
#tryon-precision-output-grid {
  flex: 1;
  min-height: 285px;
  margin-top: 12px;
}
.tryon-gemini-upload-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.tryon-gemini-pair-hint {
  color: #187552;
  font-size: 9px;
  font-weight: 750;
}
.tryon-gemini-upload-row {
  display: grid;
  gap: 7px;
  min-height: 0;
}
.tryon-gemini-row-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tryon-gemini-row-heading strong { color: #40554a; font-size: 11px; }
.tryon-gemini-row-heading small { display: block; margin-top: 3px; color: #819088; font-size: 8px; }
.tryon-gemini-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}
.tryon-pairing-mode-button {
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid #bcd4c8;
  border-radius: 8px;
  color: #176b4d;
  background: #f2f8f5;
  font-size: 9px;
  font-weight: 780;
}
.tryon-pairing-mode-button:hover {
  border-color: #58a080;
  background: #eaf6f0;
}
.tryon-pairing-mode-button.active {
  color: white;
  border-color: #176b4d;
  background: #176b4d;
}
.tryon-pairing-mode-button:disabled { cursor: not-allowed; opacity: .62; }
.tryon-gemini-upload-grid {
  grid-auto-flow: column;
  grid-auto-columns: 138px;
  grid-template-columns: none;
  min-height: 152px;
  overflow-x: auto;
  overflow-y: hidden;
}
.tryon-gemini-upload-grid .tryon-upload-item,
.tryon-gemini-upload-grid .tryon-add-tile,
.tryon-gemini-upload-grid .tryon-upload-item img {
  min-height: 130px;
  height: 130px;
}
.tryon-upload-item.is-single-reference-choice {
  cursor: pointer;
  border-color: #a8cabb;
  box-shadow: inset 0 0 0 1px rgba(23, 107, 77, .04);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.tryon-upload-item.is-single-reference-choice:hover,
.tryon-upload-item.is-single-reference-choice:focus-visible {
  outline: none;
  border-color: #4b9876;
  box-shadow: 0 0 0 3px rgba(45, 138, 104, .12);
  transform: translateY(-1px);
}
.tryon-upload-item.is-single-reference-choice.is-selected-reference {
  border-color: #168355;
  box-shadow: 0 0 0 3px rgba(27, 155, 98, .18), inset 0 0 0 2px rgba(27, 155, 98, .32);
}
.tryon-single-reference-indicator {
  position: absolute;
  right: 7px;
  bottom: 7px;
  left: 7px;
  z-index: 2;
  padding: 5px 7px;
  border-radius: 7px;
  color: rgba(255, 255, 255, .94);
  background: rgba(11, 42, 27, .72);
  font-size: 8px;
  font-weight: 750;
  text-align: center;
  pointer-events: none;
}
.tryon-upload-item.is-selected-reference .tryon-single-reference-indicator {
  color: #073a25;
  background: rgba(171, 255, 210, .94);
}
.tryon-upload-item.is-single-reference-choice .tryon-item-resolution { display: none; }
.tryon-gemini-pair-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #7c8c83;
  font-size: 8px;
}
.tryon-gemini-pair-divider::before,
.tryon-gemini-pair-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e9e5;
}
.tryon-gemini-prompt-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.tryon-gemini-prompt-card > p {
  margin: 9px 0 10px;
  color: #7b8a82;
  font-size: 10px;
  line-height: 1.5;
}
#tryon-gemini-prompt {
  flex: 1;
  min-height: 145px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid #d5e0da;
  border-radius: 11px;
  color: #2d4438;
  background: #fbfdfc;
  font: inherit;
  font-size: 11px;
  line-height: 1.6;
}
#tryon-gemini-prompt:focus {
  outline: 2px solid rgba(23, 107, 77, .13);
  border-color: #4e9476;
}
.tryon-gemini-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.tryon-gemini-options label { display: grid; gap: 5px; color: #65776d; font-size: 9px; }
.tryon-gemini-options select {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #d5e0da;
  border-radius: 9px;
  color: #2d4438;
  background: white;
  font-size: 10px;
}
.tryon-gemini-validation {
  min-height: 20px;
  margin-top: 9px;
  padding: 7px 9px;
  border-radius: 8px;
  color: #7b6a37;
  background: #fff8e8;
  font-size: 9px;
  line-height: 1.45;
}
.tryon-gemini-validation.is-ready { color: #146746; background: #edf8f2; }
.tryon-gemini-validation.is-error { color: #9c3434; background: #fff0ef; }
.tryon-gemini-provider-note {
  display: block;
  margin-top: 8px;
  color: #829088;
  font-size: 8px;
  line-height: 1.5;
}
.tryon-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #dde6e1;
  border-radius: 15px;
  background: white;
  box-shadow: 0 5px 18px rgba(27, 63, 45, .035);
}
.tryon-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.tryon-card-heading > div { display: flex; align-items: center; gap: 8px; }
.tryon-card-heading h3 { margin: 0; color: #263b30; font-size: 14px; }
.tryon-upload-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.tryon-upload-card > p {
  margin: 9px 0 12px;
  color: #7b8a82;
  font-size: 10px;
}
.tryon-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(122px, 1fr));
  align-content: start;
  gap: 10px;
  min-height: 190px;
  padding: 10px;
  overflow: auto;
  border: 1px dashed #c8d5ce;
  border-radius: 12px;
  background: #fafcfb;
}
.tryon-upload-grid.drag-active {
  border-color: #3d8d6b;
  background: #eef8f3;
  box-shadow: inset 0 0 0 2px rgba(23, 107, 77, .08);
}
.tryon-upload-item,
.tryon-add-tile {
  position: relative;
  min-height: 154px;
  overflow: hidden;
  border: 1px solid #dbe4df;
  border-radius: 11px;
  background: #eff4f1;
}
.tryon-add-tile {
  display: grid;
  place-items: center;
  padding: 14px;
  border-style: dashed;
  color: #65766d;
  background: white;
  text-align: center;
}
.tryon-add-tile:hover {
  border-color: #4b9374;
  color: var(--green);
  background: #f1f8f4;
}
.tryon-add-tile span { display: block; margin-bottom: 7px; font-size: 26px; line-height: 1; }
.tryon-add-tile strong { display: block; font-size: 11px; }
.tryon-add-tile small { display: block; margin-top: 5px; color: #93a098; font-size: 9px; }
.tryon-upload-item img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 154px;
  object-fit: contain;
}
.tryon-item-order {
  position: absolute;
  top: 7px;
  left: 7px;
  padding: 3px 6px;
  border-radius: 999px;
  color: white;
  background: rgba(8, 28, 18, .72);
  font-size: 9px;
  font-weight: 750;
}
.tryon-item-remove {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0 0 2px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(8, 28, 18, .72);
  font-size: 14px;
}
.tryon-item-remove:hover { background: #9b2c2c; }
.tryon-mask-trigger {
  position: absolute;
  top: 39px;
  right: 7px;
  max-width: calc(100% - 14px);
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 8px;
  color: white;
  background: rgba(10, 35, 23, .8);
  font-size: 9px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease;
}
.tryon-upload-item:hover .tryon-mask-trigger,
.tryon-mask-trigger:focus-visible { opacity: 1; transform: translateY(0); }
.tryon-mask-trigger.has-mask {
  color: #0f5f42;
  background: rgba(235, 255, 245, .94);
  opacity: 1;
}
.tryon-item-resolution {
  position: absolute;
  right: 6px;
  bottom: 6px;
  left: 6px;
  padding: 4px 6px;
  overflow: hidden;
  border-radius: 6px;
  color: rgba(255, 255, 255, .9);
  background: rgba(8, 28, 18, .55);
  font-size: 8px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tryon-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.tryon-action-row {
  display: block;
  padding: 2px 0;
}
.tryon-start-button {
  width: 100%;
  min-height: 46px;
  padding: 12px 26px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--green);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(23, 107, 77, .18);
}
.tryon-start-button:hover { background: var(--green-dark); }
.tryon-start-button:disabled {
  cursor: not-allowed;
  background: rgba(23, 107, 77, .38);
  box-shadow: none;
}
.tryon-action-meta { display: grid; gap: 3px; min-width: 180px; }
.tryon-action-meta strong { color: #455a4f; font-size: 11px; }
.tryon-action-meta span { color: #7a8981; font-size: 10px; }
.tryon-action-meta span[data-status="queued"],
.tryon-action-meta span[data-status="running"] { color: #9a6a16; }
.tryon-action-meta span[data-status="completed"] { color: var(--green); }
.tryon-action-meta span[data-status="failed"] { color: #a03232; }
.tryon-output-card { min-height: 280px; }
.tryon-output-note { color: #819088; font-size: 10px; }
.tryon-output-grid {
  display: grid;
  place-items: center;
  min-height: 220px;
  margin-top: 13px;
  border: 1px dashed #cbd7d0;
  border-radius: 13px;
  background: #fafcfb;
}
.tryon-output-grid.has-results {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  place-items: stretch;
  gap: 12px;
  padding: 12px;
  border-style: solid;
}
.tryon-output-item {
  overflow: hidden;
  border: 1px solid #dce5df;
  border-radius: 11px;
  background: white;
}
.tryon-output-item .batch-output-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #f2f5f3;
}
.tryon-output-caption {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  color: #53655b;
  font-size: 9px;
}
.tryon-output-caption a,
.tryon-output-caption .inline-image-download { color: var(--green); font-weight: 750; }
.tryon-output-error {
  display: -webkit-box;
  overflow: hidden;
  max-width: 170px;
  color: #a85c5c;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.tryon-mask-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 10, 7, .78);
}
.tryon-mask-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  width: min(1080px, 96vw);
  height: min(850px, 94vh);
  padding: 18px;
  border-radius: 17px;
  background: #f8faf9;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .46);
}
.tryon-mask-card > header { display: flex; justify-content: space-between; gap: 24px; }
.tryon-mask-card h2 { margin: 3px 0 4px; color: #24382e; font-size: 20px; }
.tryon-mask-card header p { margin: 0; color: #74847b; font-size: 11px; }
#tryon-mask-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0 0 2px;
  border: 1px solid #d5dfd9;
  border-radius: 50%;
  background: white;
  font-size: 22px;
}
.tryon-mask-stage {
  position: relative;
  place-self: center;
  overflow: hidden;
  border-radius: 12px;
  background:
    linear-gradient(45deg, #dce3df 25%, transparent 25%),
    linear-gradient(-45deg, #dce3df 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dce3df 75%),
    linear-gradient(-45deg, transparent 75%, #dce3df 75%),
    #f4f7f5;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  box-shadow: 0 10px 35px rgba(15, 42, 28, .14);
}
.tryon-mask-stage img,
.tryon-mask-stage canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.tryon-mask-stage img { object-fit: contain; }
.tryon-mask-stage canvas {
  cursor: crosshair;
  touch-action: none;
  opacity: .58;
}
.tryon-mask-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.tryon-mask-card footer label {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 12px;
  max-width: 430px;
  margin: 0;
  color: #586b61;
  font-size: 11px;
}
.tryon-mask-card footer input { flex: 1; }
.tryon-mask-card footer > div { display: flex; gap: 8px; }
.tryon-mask-save {
  padding: 9px 16px;
  border: 0;
  border-radius: 9px;
  color: white;
  background: var(--green);
  font-weight: 750;
}
body.tryon-mask-open { overflow: hidden; }
.resolution-reset-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #f4f7f5;
}
.resolution-reset-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 26px;
  border-bottom: 1px solid #e2e9e5;
  background: rgba(255, 255, 255, .96);
}
.workspace .resolution-reset-header h2 {
  display: block;
  margin: 3px 0 4px;
  font-size: 21px;
}
.resolution-reset-header p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.resolution-reset-canvas {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 15px;
  min-height: 0;
  padding: 18px 22px 26px;
  overflow: auto;
}
.resolution-reset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  min-height: 620px;
}
.resolution-card {
  display: flex;
  min-width: 0;
  min-height: 0;
  padding: 17px;
  border: 1px solid #dce6e0;
  border-radius: 16px;
  background: white;
  box-shadow: 0 6px 20px rgba(24, 58, 41, .04);
  flex-direction: column;
}
.resolution-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.resolution-card-heading > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.resolution-card-heading h3 {
  margin: 0;
  color: #263b30;
  font-size: 15px;
}
.resolution-source-card > p {
  margin: 9px 0 13px;
  color: #7a8981;
  font-size: 10px;
}
.resolution-upload-zone,
.resolution-output-zone {
  position: relative;
  flex: 1;
  min-height: 390px;
  overflow: hidden;
  border: 1px dashed #bfcec6;
  border-radius: 14px;
  background:
    linear-gradient(45deg, #edf2ef 25%, transparent 25%),
    linear-gradient(-45deg, #edf2ef 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #edf2ef 75%),
    linear-gradient(-45deg, transparent 75%, #edf2ef 75%),
    #fafcfb;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}
.resolution-upload-zone {
  display: grid;
  width: 100%;
  padding: 0;
  color: #5f7067;
  place-items: center;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.resolution-upload-zone:hover,
.resolution-upload-zone.drag-active {
  border-color: #3e8b69;
  box-shadow: inset 0 0 0 3px rgba(23, 107, 77, .08);
}
.resolution-upload-zone.drag-active { background-color: #eef8f3; }
.resolution-upload-zone:disabled {
  cursor: wait;
  opacity: .68;
}
.resolution-upload-placeholder {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 24px;
}
.resolution-upload-placeholder > span {
  display: grid;
  width: 48px;
  height: 48px;
  border: 1px solid #d2ded7;
  border-radius: 14px;
  color: var(--green);
  background: rgba(255, 255, 255, .9);
  font-size: 25px;
  place-items: center;
}
.resolution-upload-placeholder strong { color: #385044; font-size: 13px; }
.resolution-upload-placeholder small { color: #8b9891; font-size: 10px; }
#resolution-source-preview,
.upscale-source-preview {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 390px;
  object-fit: contain;
}
.resolution-replace-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 8px;
  color: white;
  background: rgba(7, 30, 19, .68);
  font-size: 9px;
  font-weight: 750;
  backdrop-filter: blur(7px);
}
.resolution-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.resolution-settings {
  display: grid;
  gap: 11px;
  margin-top: 13px;
}
.resolution-original-grid,
.resolution-target-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.resolution-original-grid > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border-radius: 9px;
  color: #708078;
  background: #f3f7f5;
  font-size: 10px;
}
.resolution-original-grid strong {
  color: #2e4539;
  font-size: 12px;
}
.resolution-dimension-field {
  position: relative;
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 10px;
  border: 1px solid #dce5df;
  border-radius: 11px;
  background: #fbfdfc;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.resolution-dimension-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.resolution-dimension-field strong {
  color: #405349;
  font-size: 10px;
}
.resolution-dimension-field small {
  color: #91a097;
  font-size: 8px;
}
.resolution-dimension-field input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 8px 34px 8px 10px;
  border: 1px solid #d2ddd7;
  border-radius: 8px;
  color: #20372b;
  background: white;
  font-size: 14px;
  font-weight: 750;
}
.resolution-dimension-field em {
  position: absolute;
  right: 20px;
  bottom: 21px;
  color: #8c9992;
  font-size: 9px;
  font-style: normal;
  pointer-events: none;
}
.resolution-dimension-field.is-manual {
  border-color: #4f9a79;
  background: #f1f8f4;
  box-shadow: 0 0 0 2px rgba(23, 107, 77, .07);
}
.resolution-dimension-field.is-manual small { color: var(--green); font-weight: 750; }
.resolution-dimension-field.is-auto { background: #f6f8f7; }
.resolution-dimension-field.is-auto input { color: #66766e; background: #f4f7f5; }
.resolution-target-summary {
  min-height: 17px;
  margin: 0;
  color: #718078;
  font-size: 9px;
  line-height: 1.5;
}
.resolution-target-summary.is-error { color: #a23c3c; }
.resolution-output-card { gap: 13px; }
.resolution-output-zone {
  display: grid;
  place-items: center;
}
.resolution-output-zone.has-error {
  border-color: #d9a5a5;
  background-color: #fff8f8;
}
.resolution-output-empty,
.resolution-output-progress {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 26px;
  color: #7c8a83;
  text-align: center;
}
.resolution-output-empty > span {
  color: #6c9782;
  font-size: 32px;
}
.resolution-output-empty strong,
.resolution-output-progress strong {
  color: #41564b;
  font-size: 12px;
}
.resolution-output-empty p,
.resolution-output-progress p {
  margin: 0;
  font-size: 9px;
}
.resolution-output-progress > span {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(23, 107, 77, .16);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: resolution-spinner .8s linear infinite;
}
.upscale-progress-track {
  width: min(320px, 76%);
  height: 9px;
  overflow: hidden;
  border: 1px solid rgba(23, 107, 77, .16);
  border-radius: 999px;
  background: rgba(23, 107, 77, .09);
  box-shadow: inset 0 1px 2px rgba(7, 43, 31, .08);
}
.upscale-progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #269b72, #56c894);
  box-shadow: 0 0 12px rgba(38, 155, 114, .34);
  transition: width .22s ease;
}
.resolution-output-progress .upscale-progress-percent {
  min-width: 44px;
  color: var(--green);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.resolution-output-preview {
  position: absolute;
  inset: 0;
  display: grid;
  width: auto;
  height: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  place-items: center;
}
.resolution-output-preview img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.resolution-output-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #74837b;
  background: #f3f7f5;
  font-size: 10px;
}
.resolution-output-meta strong { color: #2c4638; font-size: 11px; }
.resolution-action-row {
  display: grid;
  justify-items: center;
  gap: 7px;
}
.resolution-action-row p {
  margin: 0;
  color: #87948d;
  font-size: 9px;
  text-align: center;
}
.resolution-start-button {
  width: 100%;
  min-height: 48px;
  padding: 12px 28px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--green);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 9px 24px rgba(23, 107, 77, .2);
}
.resolution-start-button:hover:not(:disabled) { background: var(--green-dark); }
.resolution-start-button:disabled {
  cursor: not-allowed;
  background: rgba(23, 107, 77, .36);
  box-shadow: none;
}
@keyframes resolution-spinner {
  to { transform: rotate(360deg); }
}
.employees-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #f5f8f6;
}
.employees-workspace .employees-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 28px;
  background: rgba(255, 255, 255, .96);
}
.workspace .employees-header h2 {
  display: block;
  margin: 4px 0;
  font-size: 21px;
}
.employees-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.employees-eyebrow {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}
#open-create-employee {
  flex: 0 0 auto;
  padding: 11px 17px;
  border: 0;
  border-radius: 11px;
  color: white;
  background: var(--green);
  font-weight: 750;
}
#open-create-employee:hover { background: var(--green-dark); }
.employees-content {
  min-height: 0;
  padding: 22px 26px 30px;
  overflow: auto;
}
.employee-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.employee-summary-card {
  display: grid;
  gap: 9px;
  padding: 17px 18px;
  border: 1px solid #dfe7e2;
  border-radius: 14px;
  background: white;
}
.employee-summary-card span { color: var(--muted); font-size: 12px; }
.employee-summary-card strong { color: #23372c; font-size: 25px; }
.employees-table-card {
  padding: 20px;
  border: 1px solid #dfe7e2;
  border-radius: 16px;
  background: white;
  box-shadow: 0 8px 24px rgba(22, 48, 35, .035);
}
.employees-table-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 13px;
}
.employees-table-heading h3 { margin: 0; color: #24392e; font-size: 16px; }
.employees-table-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.employees-table-scroll { overflow: auto; }
.employees-table { min-width: 1000px; }
.employees-table th {
  padding: 11px 10px;
  color: #718078;
  background: #f8faf9;
  font-size: 11px;
  white-space: nowrap;
}
.employees-table td {
  padding: 13px 10px;
  color: #35483e;
  font-size: 12px;
  vertical-align: middle;
}
.employee-identity { display: grid; gap: 3px; min-width: 170px; }
.employee-identity strong { color: #25382e; font-size: 13px; }
.employee-identity span { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.employee-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #176b4d;
  background: #eaf6f0;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}
.employee-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}
.employee-status.disabled { color: #8b4640; background: #fff0ee; }
.employee-password-state {
  color: #8a5b12;
  font-size: 11px;
  white-space: nowrap;
}
.employee-password-state.ready { color: #557066; }
.employee-limit-cell { display: grid; gap: 3px; min-width: 105px; font-size: 10px; }
.employee-limit-cell span { color: #607168; white-space: nowrap; }
.employee-actions { display: flex; gap: 6px; min-width: 225px; }
.employee-secondary-button,
.employee-row-action {
  padding: 8px 10px;
  border: 1px solid #d7e1db;
  border-radius: 9px;
  color: #33483d;
  background: white;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.employee-secondary-button:hover,
.employee-row-action:hover {
  border-color: #9bbbab;
  color: var(--green-dark);
  background: #f1f8f4;
}
.employee-row-action.danger { color: #9b3b34; }
.employee-row-action.danger:hover {
  border-color: #e0b8b4;
  color: #842c25;
  background: #fff3f2;
}
.employees-empty {
  padding: 42px 20px 28px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}
.employee-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 21, 14, .68);
  animation: workspace-backdrop-in .14s ease-out;
}
.employee-dialog {
  width: min(620px, 100%);
  max-height: calc(100vh - 48px);
  padding: 24px;
  overflow: auto;
  border: 1px solid #dce5df;
  border-radius: 18px;
  background: white;
  box-shadow: 0 24px 80px rgba(4, 20, 12, .24);
}
.employee-dialog-compact { width: min(500px, 100%); }
.employee-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.employee-dialog-header span {
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}
.employee-dialog-header h2 { margin: 5px 0 0; font-size: 20px; }
.employee-dialog-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0 0 2px;
  border: 1px solid #dbe4df;
  border-radius: 50%;
  color: #607168;
  background: #f7faf8;
  font-size: 22px;
  line-height: 1;
}
.employee-dialog-close:hover { color: #273a30; background: #eef5f1; }
.employee-form { margin-top: 18px; }
.employee-form label { margin: 15px 0; color: #42554a; font-size: 12px; }
.employee-form label small { color: var(--muted); font-size: 10px; font-weight: 500; }
.employee-form input:disabled { color: #63736a; background: #f1f4f2; }
.employee-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.employee-form-grid label { margin: 0; }
.employee-form-note,
.employee-dialog-description { color: var(--muted); font-size: 11px; line-height: 1.6; }
.employee-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 8px;
}
.employee-dialog-actions button { min-width: 100px; }
.points-transfer-dialog { width: min(460px, 100%); }
.points-transfer-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.points-transfer-summary > span {
  display: grid;
  gap: 5px;
  padding: 13px 15px;
  border: 1px solid #dfe8e3;
  border-radius: 12px;
  background: #f5faf7;
}
.points-transfer-summary small { color: var(--muted); font-size: 10px; }
.points-transfer-summary strong { color: #173c29; font-size: 20px; }
#points-transfer-amount {
  margin-top: 7px;
  font-size: 18px;
  font-weight: 750;
}
#points-transfer-error { min-height: 18px; }
body.employee-dialog-open { overflow: hidden; }
.stats-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  justify-content: flex-end;
  background: #07150ea3;
}
.stats-drawer {
  width: min(720px, 100%);
  height: 100%;
  padding: 26px;
  overflow: auto;
  background: white;
  box-shadow: -20px 0 60px #10241b22;
}
.drawer-header { display: flex; justify-content: space-between; align-items: center; }
.drawer-header h2 { margin: 0; }
.drawer-header p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.stats-add-employee {
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 10px;
}
.summary-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px 0; }
.summary-card { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.summary-card span { color: var(--muted); font-size: 13px; }
.summary-card strong { font-size: 24px; }
.summary-card.stats-loading,
.summary-card.stats-load-error { grid-column: 1 / -1; }
.summary-card.stats-load-error strong { color: #a52a2a; font-size: 14px; }
.stats-detail-title { margin: 28px 0 8px; color: #263c31; font-size: 15px; }
.stats-detail-scroll { overflow-x: auto; }
.stats-detail-scroll table { min-width: 650px; }
.stats-detail-scroll td { vertical-align: top; font-size: 12px; }
.stats-detail-scroll td small,
#stats-users td small { color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 13px; }
.toast { position: fixed; z-index: 20000; right: 22px; bottom: 22px; padding: 13px 18px; border-radius: 10px; color: white; background: #9b2c2c; }
.toast.success { background: var(--green); }
.generation-stop {
  color: white !important;
  border-color: #b42318 !important;
  background: #b42318 !important;
  box-shadow: 0 8px 24px #b4231833 !important;
}

.workspace-dmp-running,
.dmp-running-badge {
  position: relative;
  overflow: hidden;
  color: #eaa33a;
  background: linear-gradient(105deg, #d7851e 15%, #ffe4b2 43%, #fff 50%, #ffe4b2 57%, #d7851e 85%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: dmp-status-shimmer 2.8s linear infinite;
  font-weight: 750;
}
.workspace-dmp-running {
  margin: -5px 8px -10px;
  font-size: 10px;
  letter-spacing: .04em;
}
.dmp-running-badge {
  font-size: 9px;
  line-height: 1.25;
  white-space: nowrap;
}
@keyframes dmp-status-shimmer {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}
.workspace-menu-item-with-status,
.sidebar-tool-with-status { position: relative; }
.workspace-menu-item-with-status { padding-right: 88px; }
.workspace-menu-item-with-status > .dmp-running-badge {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
}
.sidebar-tool-with-status > .dmp-running-badge {
  position: absolute;
  right: 10px;
  bottom: 7px;
}

.data-home {
  display: grid;
  grid-template-rows: auto 1fr;
  background: linear-gradient(145deg, #fbfdfc, #f1f6f3);
}
.data-header,
.dmp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .9);
}
.workspace .data-header h2,
.workspace .dmp-header h2 {
  display: block;
  margin: 4px 0 0;
  font-size: 20px;
}
.data-header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.data-eyebrow {
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
}
.dmp-prewarm-status,
.dmp-status-pill {
  padding: 7px 10px;
  border: 1px solid #d5e3dc;
  border-radius: 999px;
  color: #586d62;
  background: #f5f9f7;
  font-size: 10px;
  white-space: nowrap;
}
.dmp-status-pill[data-state="ready"] {
  border-color: #b8d9c9;
  color: var(--green);
  background: #eff9f4;
}
.dmp-status-pill[data-state="error"] {
  border-color: #ebc4c0;
  color: #9a3b34;
  background: #fff4f2;
}
.data-home-content {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  padding: 28px;
}
.data-tool-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: min(560px, 100%);
  padding: 22px;
  border: 1px solid #d8e4de;
  border-radius: 18px;
  color: #263a2f;
  background: white;
  box-shadow: 0 16px 48px rgba(19, 59, 39, .08);
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.data-tool-card:hover {
  transform: translateY(-2px);
  border-color: #9bc3af;
  box-shadow: 0 20px 54px rgba(19, 59, 39, .12);
}
.data-tool-card strong,
.data-tool-card small { display: block; }
.data-tool-card strong { font-size: 17px; }
.data-tool-card small { margin-top: 6px; color: var(--muted); line-height: 1.55; }
.data-tool-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  color: white;
  background: linear-gradient(145deg, #278d68, #11563e);
  font-size: 14px;
  font-weight: 850;
}
.dmp-desktop-hint {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  color: #94631b;
  background: #fff7e9;
  font-size: 11px;
}

.dmp-workspace {
  display: grid;
  grid-template-rows: auto minmax(320px, 1fr) 190px;
  min-width: 0;
  overflow: hidden;
  background: #f4f7f5;
}
.dmp-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.dmp-secondary-button,
.dmp-text-button {
  border: 1px solid #d5e0da;
  border-radius: 9px;
  color: #344b3f;
  background: white;
  font-size: 10px;
  font-weight: 700;
}
.dmp-secondary-button { padding: 8px 10px; }
.dmp-text-button { padding: 6px 8px; }
.dmp-secondary-button:hover,
.dmp-text-button:hover {
  border-color: #91b7a4;
  color: var(--green-dark);
  background: #f0f8f4;
}
.dmp-operation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  padding: 12px 14px 10px;
}
.dmp-browser-host {
  position: relative;
  min-width: 0;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid #d5e0da;
  border-radius: 14px;
  background: white;
  box-shadow: 0 8px 28px rgba(17, 55, 36, .07);
}
.dmp-browser-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: #718078;
  text-align: center;
}
.dmp-browser-placeholder > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: white;
  background: var(--green);
  font-weight: 800;
}
.dmp-browser-placeholder p { margin: 0; font-size: 11px; }

.app-shell.dmp-interface-open { grid-template-columns: 390px minmax(0, 1fr); }
.app-shell.dmp-interface-open .sidebar { gap: 10px; }
.data-sidebar { min-height: 0; overflow: auto; }
.dmp-control-panel {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  color: #edf5f1;
}
.dmp-control-section {
  padding: 12px;
  border: 1px solid #ffffff18;
  border-radius: 12px;
  background: #ffffff0a;
}
.dmp-section-heading,
.dmp-section-heading > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dmp-section-heading {
  justify-content: space-between;
  margin-bottom: 7px;
}
.dmp-section-heading > div > span {
  color: #70b596;
  font-size: 9px;
  font-weight: 850;
}
.dmp-section-heading h3 {
  margin: 0;
  color: white;
  font-size: 13px;
}
.dmp-control-section > p {
  margin: 0 0 9px;
  color: #9fb1a8;
  font-size: 9px;
  line-height: 1.55;
}
.dmp-control-panel .dmp-text-button,
.dmp-control-panel .dmp-secondary-button {
  border-color: #ffffff25;
  color: #edf5f1;
  background: #ffffff0d;
}
.dmp-control-panel .dmp-text-button:hover,
.dmp-control-panel .dmp-secondary-button:hover { background: #ffffff18; }
.dmp-field {
  gap: 5px;
  margin: 7px 0;
  color: #b9c9c1;
  font-size: 9px;
}
.dmp-field select {
  width: 100%;
  padding: 8px 9px;
  border: 1px solid #ffffff24;
  border-radius: 8px;
  color: #eef5f1;
  background: #173127;
  outline: none;
  font-size: 10px;
}
.dmp-inline-actions,
.dmp-control-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.dmp-control-buttons {
  grid-template-columns: .8fr 1.3fr 1fr;
  margin-top: 7px;
}
.dmp-control-buttons button {
  padding: 8px 5px;
  border: 1px solid #ffffff24;
  border-radius: 8px;
  color: #eaf3ee;
  background: #ffffff0d;
  font-size: 9px;
}
.dmp-control-buttons button:hover:not(:disabled) { background: #ffffff1b; }
.dmp-control-buttons button:disabled { cursor: default; opacity: .38; }
.dmp-task-list {
  display: grid;
  gap: 5px;
  max-height: 112px;
  margin-top: 8px;
  overflow: auto;
}
.dmp-task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 8px;
  color: #e7f0eb;
  background: #ffffff0a;
  font-size: 9px;
}
.dmp-task-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dmp-task-row button {
  padding: 2px 4px;
  border: 0;
  color: #dca59f;
  background: transparent;
  font-size: 13px;
}
.dmp-primary-button {
  width: 100%;
  padding: 9px;
  border: 0;
  border-radius: 9px;
  color: white;
  background: #1c8060;
  font-size: 11px;
  font-weight: 800;
}
.dmp-primary-button:hover:not(:disabled) { background: #24916d; }
.dmp-primary-button:disabled { cursor: default; opacity: .42; }
.dmp-task-phase {
  color: #9eb2a8;
  font-size: 9px;
}
.dmp-task-phase.running { color: #efaa44; }
.dmp-progress-list {
  display: grid;
  gap: 4px;
  margin: 0;
}
.dmp-progress-list > div {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 6px;
  font-size: 9px;
}
.dmp-progress-list dt { color: #8ea39a; }
.dmp-progress-list dd {
  margin: 0;
  overflow: hidden;
  color: #e5efea;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dmp-log {
  height: 82px;
  margin-top: 9px;
  padding: 8px;
  overflow: auto;
  border-radius: 8px;
  color: #afc1b8;
  background: #071a12;
  font: 9px/1.55 Consolas, "Microsoft YaHei UI", monospace;
}
.dmp-log p { margin: 0 0 3px; }
.dmp-empty-copy { margin: 0; color: #83958c; font-size: 10px; }

.dmp-output-panel {
  min-width: 0;
  margin: 0 14px 12px;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid #d7e2dc;
  border-radius: 14px;
  background: white;
}
.dmp-output-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.dmp-output-heading h3 { margin: 3px 0 0; font-size: 14px; }
.dmp-output-list {
  display: flex;
  gap: 8px;
  margin-top: 9px;
  padding-bottom: 5px;
  overflow-x: auto;
}
.dmp-output-file {
  flex: 0 0 220px;
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid #d7e1db;
  border-radius: 9px;
  color: #344b3f;
  background: #f8faf9;
  text-align: left;
}
.dmp-output-file:not(:disabled):hover {
  border-color: #8fb9a4;
  color: var(--green-dark);
  background: #f0f8f4;
}
.dmp-output-file:disabled {
  cursor: default;
  color: #839087;
  opacity: .68;
}
.dmp-output-file strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dmp-output-file small { font-size: 8px; }
.dmp-output-directory {
  max-width: 100%;
  margin-top: 5px;
  padding: 3px 0;
  overflow: hidden;
  border: 0;
  color: #648174;
  background: transparent;
  font-size: 9px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dmp-output-directory:not(:disabled):hover { color: var(--green); text-decoration: underline; }

.dmp-excel-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 21, 14, .76);
}
.dmp-excel-preview-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(1180px, 100%);
  height: min(780px, calc(100vh - 48px));
  overflow: hidden;
  border-radius: 18px;
  background: white;
  box-shadow: 0 28px 90px rgba(4, 18, 11, .32);
}
.dmp-excel-preview-card > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 18px 20px 13px;
}
.dmp-excel-preview-card h2 { margin: 4px 0 0; font-size: 19px; }
.dmp-excel-preview-card header p {
  max-width: 860px;
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#dmp-preview-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0 0 2px;
  border: 1px solid #d8e2dc;
  border-radius: 50%;
  color: #52675c;
  background: #f5f8f6;
  font-size: 21px;
}
.dmp-preview-tabs {
  display: flex;
  gap: 6px;
  padding: 0 20px 10px;
  overflow-x: auto;
}
.dmp-preview-tab {
  padding: 7px 10px;
  border: 1px solid #d7e1db;
  border-radius: 8px;
  color: #53675c;
  background: white;
  font-size: 10px;
}
.dmp-preview-tab.active {
  border-color: #7db49a;
  color: var(--green-dark);
  background: #edf7f2;
}
.dmp-preview-table-wrap {
  min-height: 0;
  overflow: auto;
  border-top: 1px solid #dfe7e2;
}
.dmp-preview-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 9px;
}
.dmp-preview-table th,
.dmp-preview-table td {
  min-width: 100px;
  max-width: 280px;
  padding: 7px 9px;
  overflow: hidden;
  border-right: 1px solid #e5ebe7;
  border-bottom: 1px solid #e5ebe7;
  background: white;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dmp-preview-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #405449;
  background: #edf4f0;
}
.dmp-preview-note {
  margin: 0;
  padding: 8px 12px;
  color: #7a6751;
  background: #fff8ec;
  font-size: 9px;
}

@media (max-width: 1120px) {
  .batch-canvas { grid-template-columns: 1fr; }
  .batch-settings-column,
  .batch-input-card,
  .batch-output-card {
    grid-column: auto;
    grid-row: auto;
  }
  .batch-settings-column { grid-template-rows: auto auto auto; }
  .employee-summary-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tryon-canvas { grid-template-rows: auto auto auto; }
  .tryon-gemini-input-grid { grid-template-columns: 1fr; }
  .tryon-precision-top { grid-template-columns: 1fr; }
  .tryon-precision-grid { grid-template-rows: auto auto minmax(320px, auto); }
  .resolution-reset-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .resolution-card { min-height: 620px; }
  .app-shell.dmp-interface-open { grid-template-columns: 340px minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .bubble { max-width: calc(100vw - 90px); }
  .response-body { width: calc(100vw - 90px); }
  .search-results-card { width: calc(100vw - 90px); }
  .summary-cards { grid-template-columns: repeat(2, 1fr); }
  .composer-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .composer-tools { width: 100%; }
  .image-quick-panel {
    position: fixed;
    right: 12px;
    bottom: 118px;
    left: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: auto;
  }
  .image-quick-panel::after { display: none; }
  .generated-image-card { width: calc(100vw - 90px); }
  .generated-file-list,
  .live-generated-files { width: calc(100vw - 90px); }
  .composer-actions { justify-content: flex-end; flex-wrap: wrap; }
  .model-menu { right: auto; left: 0; grid-template-columns: 120px minmax(210px, 1fr); width: min(360px, calc(100vw - 48px)); }
  .batch-workspace .batch-header { align-items: flex-start; flex-direction: column; padding: 14px 16px; }
  .batch-header-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .batch-image-transport { width: 100%; min-width: 0; }
  .batch-header-actions > .points-pool { align-self: flex-end; }
  .batch-input-actions { align-items: stretch; flex-direction: column; }
  .batch-secondary-action { width: 100%; }
  .batch-canvas { padding: 14px; }
  .batch-image-slots { grid-template-columns: 1fr; }
  .batch-parameter-grid { grid-template-columns: 1fr; }
  .batch-quick-panel {
    position: fixed;
    top: 92px;
    right: 12px;
    left: 12px;
    width: auto;
    min-width: 0;
  }
  .batch-image-preview-modal { padding: 66px 14px 18px; }
  .batch-image-preview-stage img { max-height: none; }
  .tryon-header { align-items: flex-start; flex-direction: column; padding: 14px 16px; }
  .tryon-header-actions,
  .local-image-header-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .local-image-transport { width: 100%; min-width: 0; }
  .tryon-header-actions button { flex: 1; }
  .tryon-canvas { padding: 14px; }
  .tryon-input-grid { grid-template-columns: 1fr; }
  .tryon-gemini-input-grid { grid-template-columns: 1fr; }
  .tryon-switch-stack { width: 100%; }
  .tryon-channel-clarity-row { display: grid; gap: 6px; }
  .tryon-segment-control { grid-template-columns: 1fr; }
  .image-generation-options .tryon-segment-control { grid-template-columns: 1fr; }
  .tryon-segment-control > div { width: 100%; }
  .tryon-segment-control button { flex: 1; padding-inline: 8px; }
  .tryon-segment-control > small { grid-column: 1; }
  .image-generation-options .tryon-segment-control > small { grid-column: 1; }
  .tryon-precision-top { grid-template-columns: 1fr; }
  .tryon-action-row { align-items: stretch; flex-direction: column; }
  .tryon-start-button { width: 100%; }
  .tryon-mask-modal { padding: 8px; }
  .tryon-mask-card { width: 100%; height: calc(100vh - 16px); padding: 12px; }
  .tryon-mask-card > footer { align-items: stretch; flex-direction: column; }
  .tryon-mask-card footer > div { width: 100%; }
  .tryon-mask-card footer button { flex: 1; }
  .resolution-reset-header { align-items: stretch; flex-direction: column; padding: 14px 16px; }
  .upscale-header-controls { align-items: stretch; flex-direction: column; }
  .upscale-header-controls .local-image-transport { width: 100%; min-width: 0; }
  .resolution-reset-canvas { padding: 14px; }
  .resolution-card { min-height: 0; padding: 14px; }
  .resolution-upload-zone,
  .resolution-output-zone,
  #resolution-source-preview,
  .upscale-source-preview { min-height: 330px; }
  .resolution-original-grid,
  .resolution-target-grid { grid-template-columns: 1fr; }
  .resolution-card-heading { align-items: flex-start; }
  .resolution-card-heading .batch-secondary-action { width: auto; }
  .chatgpt-network-modal fieldset { grid-template-columns: repeat(2, 1fr); }
  .employees-workspace .employees-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }
  .employees-content { padding: 14px; }
  .employee-summary-cards { grid-template-columns: 1fr 1fr; }
  .employees-table-heading { align-items: flex-start; flex-direction: column; }
  .employee-form-grid { grid-template-columns: 1fr; }
  .employee-modal { padding: 12px; }
}
.canvas-sidebar {
  gap: 10px;
}

.canvas-sidebar-guide {
  display: grid;
  gap: 5px;
  margin: 4px 10px 8px;
  padding: 14px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.canvas-sidebar-guide strong {
  color: #fff;
  font-size: 14px;
}

.canvas-clear-tool:hover {
  color: #ffb4ad;
  border-color: rgba(255, 126, 116, 0.32);
}

.canvas-workflow-flyout {
  position: relative;
  z-index: 52;
}

.canvas-workflow-menu {
  position: absolute;
  top: 0;
  left: calc(100% - 2px);
  z-index: 80;
  display: grid;
  gap: 5px;
  width: 292px;
  max-height: min(460px, 72vh);
  overflow: auto;
  padding: 8px;
  border: 1px solid #d8e4de;
  border-radius: 13px;
  background: rgba(255, 255, 255, .985);
  box-shadow: 0 18px 48px rgba(5, 28, 18, .28);
  opacity: 0;
  pointer-events: none;
  scale: .78;
  translate: -10px 0;
  transform-origin: left 24px;
  visibility: hidden;
  transition: opacity .16s ease, scale .22s cubic-bezier(.2, 1.25, .35, 1),
    translate .22s cubic-bezier(.2, 1.25, .35, 1), visibility 0s linear .2s;
}

.canvas-workflow-flyout:hover .canvas-workflow-menu,
.canvas-workflow-flyout:focus-within .canvas-workflow-menu {
  opacity: 1;
  pointer-events: auto;
  scale: 1;
  translate: 0 0;
  visibility: visible;
  transition-delay: 0s;
}

.canvas-workflow-empty {
  padding: 14px 12px;
  color: #7a8c83;
  font-size: 12px;
  line-height: 1.6;
}

.canvas-workflow-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  gap: 5px;
  padding: 6px;
  border-radius: 9px;
  color: #274438;
}

.canvas-workflow-item:hover { background: #edf7f2; }
.canvas-workflow-item-main,
.canvas-workflow-more,
.canvas-workflow-delete {
  border: 0;
  background: transparent;
}
.canvas-workflow-item-main { min-width: 0; padding: 5px; text-align: left; }
.canvas-workflow-item-main strong,
.canvas-workflow-item-main small { display: block; }
.canvas-workflow-item-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.canvas-workflow-item-main small { margin-top: 3px; color: #819087; font-size: 10px; }
.canvas-workflow-more { width: 30px; height: 30px; border-radius: 8px; color: #597067; }
.canvas-workflow-more:hover { color: #146947; background: #dcefe5; }
.canvas-workflow-delete {
  grid-column: 1 / -1;
  padding: 8px 10px;
  border-radius: 8px;
  color: #a1322a;
  background: #fff0ee;
  text-align: center;
}
.canvas-workflow-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #2fcb78;
  box-shadow: 0 0 10px rgba(47, 203, 120, .7);
}

.canvas-running-tool {
  color: #fff4db;
  border: 1px solid rgba(255, 173, 58, .35);
  background: rgba(225, 132, 24, .16);
  animation: canvas-running-pulse 2.2s ease-in-out infinite;
}
.canvas-running-tool .sidebar-tool-icon { color: #fff; background: #df861e; }
@keyframes canvas-running-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(239, 153, 46, 0); }
  50% { box-shadow: 0 0 22px rgba(239, 153, 46, .35); }
}

.flow-workflow-confirm {
  position: absolute;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .68);
}
.flow-workflow-confirm.hidden { display: none; }
.flow-workflow-confirm-card {
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid #dbe6e0;
  border-radius: 15px;
  color: #263a30;
  background: #fff;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .38);
}
.flow-workflow-confirm-card strong { font-size: 18px; }
.flow-workflow-confirm-card p { margin: 12px 0 20px; color: #68786f; line-height: 1.65; }
.flow-workflow-name-field { display: grid; gap: 7px; margin: -4px 0 20px; }
.flow-workflow-name-field.hidden { display: none; }
.flow-workflow-name-field span { color: #56685e; font-size: 13px; }
.flow-workflow-name-field input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cad8d0;
  border-radius: 9px;
  outline: none;
}
.flow-workflow-name-field input:focus { border-color: #17815b; box-shadow: 0 0 0 3px rgba(23, 129, 91, .12); }
.flow-workflow-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.flow-workflow-confirm-card button { padding: 10px 14px; border: 1px solid #d5e0da; border-radius: 9px; }
.flow-workflow-confirm-card button.primary { color: #fff; border-color: #167452; background: #167452; }

.infinite-canvas-workspace {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0b0d0f;
}

.flow-viewport {
  --flow-grid-size: 24px;
  --flow-grid-x: 0;
  --flow-grid-y: 0;
  position: absolute;
  inset: 0;
  overflow: hidden;
  outline: none;
  cursor: grab;
  user-select: none;
  background-color: #0b0d0f;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.115) 1px, transparent 1.3px);
  background-position: var(--flow-grid-x) var(--flow-grid-y);
  background-size: var(--flow-grid-size) var(--flow-grid-size);
}

.flow-viewport.is-panning {
  cursor: grabbing;
}

.flow-viewport.is-flow-low-power {
  background-position: 0 0;
  background-size: 24px 24px;
}

.flow-viewport.is-flow-low-power .flow-edge,
.flow-viewport.is-flow-low-power .flow-edge-folder {
  filter: none;
}

.flow-viewport.is-flow-low-power .flow-edge-stream {
  display: none;
}

.flow-viewport.is-flow-low-power .flow-node {
  box-shadow: 0 8px 18px rgba(0, 0, 0, .28);
}

.flow-viewport.is-flow-low-power .flow-node.is-run-pending:not(.flow-node-loop)::after,
.flow-viewport.is-flow-low-power .flow-node.is-run-active:not(.flow-node-loop)::after,
.flow-viewport.is-flow-low-power .flow-node-loop.is-loop-running {
  animation: none !important;
}

.flow-viewport.is-flow-low-power .flow-node.is-run-active:not(.flow-node-loop)::after {
  opacity: 1;
  transform: none;
  box-shadow: 0 0 0 2px rgba(67, 239, 141, .34) inset;
}

.flow-viewport.is-flow-low-power .flow-node.is-run-pending:not(.flow-node-loop)::after {
  opacity: .8;
  box-shadow: 0 0 0 2px rgba(242, 161, 42, .26) inset;
}

.flow-viewport.is-flow-low-power .flow-loop-header,
.flow-viewport.is-flow-low-power .flow-persisted-image span,
.flow-viewport.is-flow-low-power .flow-context-menu {
  backdrop-filter: none;
}

.flow-viewport.is-flow-paused .flow-edge-stream,
.flow-viewport.is-flow-paused .flow-node.is-run-pending:not(.flow-node-loop)::after,
.flow-viewport.is-flow-paused .flow-node.is-run-active:not(.flow-node-loop)::after,
.flow-viewport.is-flow-paused .flow-node-loop.is-loop-running {
  animation-play-state: paused !important;
}

.flow-canvas-actions {
  position: absolute;
  z-index: 30;
  top: 72px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.flow-run-all,
.flow-export-workflow {
  min-width: 148px;
  min-height: 40px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.flow-run-all {
  color: #fff;
  border-color: rgba(255, 190, 92, 0.76);
  background: #d67812;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.34),
    0 0 18px rgba(239, 143, 27, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.flow-export-workflow {
  min-width: 118px;
  color: #edf7f3;
  border-color: rgba(198, 217, 208, 0.48);
  background: rgba(35, 47, 43, 0.94);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.flow-export-workflow:hover:not(:disabled) {
  color: #fff;
  border-color: rgba(128, 226, 183, 0.8);
  background: #176b4d;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.38),
    0 0 18px rgba(48, 207, 139, 0.22);
  transform: translateY(-1px);
}

.flow-export-workflow:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.flow-run-all:hover {
  border-color: rgba(255, 221, 158, 0.96);
  background: #ed8c1b;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.4),
    0 0 24px rgba(246, 155, 41, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  transform: translateY(-1px);
}

.flow-run-all:active {
  transform: translateY(0);
}

.flow-run-all.is-stopping {
  border-color: rgba(255, 137, 128, 0.68);
  background: #aa3934;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.36), 0 0 18px rgba(211, 63, 54, 0.16);
}

.flow-run-all.is-stopping:hover {
  border-color: rgba(255, 183, 177, 0.9);
  background: #c34740;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42), 0 0 20px rgba(229, 75, 66, 0.24);
}

.flow-run-all:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.flow-export-workflow:focus-visible {
  outline: 2px solid #8ce0bc;
  outline-offset: 3px;
}

.flow-workflow-drop-overlay {
  position: absolute;
  z-index: 90;
  inset: 18px;
  display: grid;
  gap: 8px;
  place-content: center;
  place-items: center;
  color: #effff7;
  border: 2px dashed rgba(111, 236, 176, .88);
  border-radius: 18px;
  background: rgba(8, 32, 22, .91);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .28), 0 0 42px rgba(46, 220, 140, .22) inset;
  pointer-events: none;
}

.flow-workflow-drop-overlay > span {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: #062719;
  font-size: 24px;
  font-weight: 800;
  border-radius: 15px;
  background: #66e7a6;
  box-shadow: 0 0 28px rgba(80, 232, 157, .3);
}

.flow-workflow-drop-overlay strong { font-size: 18px; }
.flow-workflow-drop-overlay small { color: rgba(218, 245, 232, .68); font-size: 12px; }

.flow-selection-box {
  position: absolute;
  z-index: 18;
  min-width: 1px;
  min-height: 1px;
  border: 1px solid rgba(133, 205, 255, 0.92);
  border-radius: 3px;
  background: rgba(57, 154, 221, 0.16);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 16px rgba(63, 170, 240, 0.15);
  pointer-events: none;
}

.flow-scene {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  transform-origin: 0 0;
}

.flow-connections {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: visible;
  pointer-events: none;
}

.flow-edge {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  pointer-events: stroke;
  cursor: pointer;
  filter: drop-shadow(0 0 4px rgba(74, 193, 255, 0.25));
  transition: stroke 100ms ease, stroke-width 100ms ease, filter 100ms ease;
}

.flow-edge-stream {
  stroke: rgba(255, 255, 255, .92) !important;
  stroke-width: 2;
  stroke-dasharray: 2 15;
  pointer-events: none;
  filter: drop-shadow(0 0 5px rgba(156, 236, 255, .9));
  animation: flow-edge-stream 1.05s linear infinite;
}

@keyframes flow-edge-stream {
  to { stroke-dashoffset: -17; }
}

.flow-edge:hover {
  stroke: #fff !important;
  stroke-width: 7;
  filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.72));
}

.flow-edge-text {
  stroke: #b794f6;
}

.flow-edge-image {
  stroke: #42b9ed;
}

.flow-edge-folder {
  stroke: #f0bd55;
  filter: drop-shadow(0 0 5px rgba(240, 189, 85, 0.35));
}

.flow-draft-edge {
  stroke: #f0c66a;
  stroke-dasharray: 7 7;
  pointer-events: none;
}

.flow-node-layer {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
}

.flow-node {
  position: absolute;
  width: 320px;
  color: #e8eceb;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 13px;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: subpixel-antialiased;
  border: 1px solid #383e42;
  border-radius: 12px;
  background: #1b1f22;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
  overflow: visible;
}

.flow-node:not(.flow-node-loop) {
  z-index: 2;
}

.flow-node:not(.flow-node-loop)::after {
  position: absolute;
  z-index: 8;
  inset: 0;
  content: "";
  border: 3px solid transparent;
  border-radius: 11px;
  opacity: 0;
  box-sizing: border-box;
  pointer-events: none;
}

.flow-node.is-run-pending:not(.flow-node-loop)::after {
  border-color: #f2a12a;
  opacity: 1;
  box-shadow:
    0 0 0 1px rgba(255, 209, 125, 0.2) inset,
    0 0 18px rgba(242, 151, 29, 0.38);
  animation: flow-node-pending-pulse 2.2s ease-in-out infinite;
}

.flow-node.is-run-active:not(.flow-node-loop)::after {
  z-index: 40;
  border-color: #43ef8d;
  opacity: 1;
  box-shadow:
    0 0 0 1px rgba(216, 255, 234, 0.26) inset,
    0 0 22px rgba(48, 231, 125, 0.55),
    0 0 0 0 rgba(67, 239, 141, .58);
  animation: flow-node-active-ripple 1.75s ease-out infinite;
}

.flow-node.is-run-active:not(.flow-node-loop) { z-index: 30; }

@keyframes flow-node-active-ripple {
  0% {
    opacity: 1;
    transform: scale(1);
    box-shadow:
      0 0 0 1px rgba(216, 255, 234, .28) inset,
      0 0 24px rgba(48, 231, 125, .62),
      0 0 0 0 rgba(67, 239, 141, .58);
  }
  72% {
    opacity: .55;
    transform: scale(1.075, 1.12);
    box-shadow:
      0 0 0 1px rgba(216, 255, 234, .08) inset,
      0 0 32px rgba(48, 231, 125, .34),
      0 0 0 7px rgba(67, 239, 141, .18);
  }
  100% {
    opacity: 0;
    transform: scale(1.1, 1.16);
    box-shadow:
      0 0 0 1px rgba(216, 255, 234, 0) inset,
      0 0 38px rgba(48, 231, 125, 0),
      0 0 0 12px rgba(67, 239, 141, 0);
  }
}

@keyframes flow-node-pending-pulse {
  0%,
  100% {
    opacity: 0.42;
    box-shadow:
      0 0 0 1px rgba(255, 209, 125, 0.12) inset,
      0 0 8px rgba(242, 151, 29, 0.16);
  }

  50% {
    opacity: 1;
    box-shadow:
      0 0 0 1px rgba(255, 222, 157, 0.28) inset,
      0 0 24px rgba(242, 151, 29, 0.52);
  }
}

.flow-node-generate {
  width: 370px;
}

.flow-node-ai-analysis,
.flow-node-document-selector {
  width: 390px;
}

.flow-node:hover {
  border-color: #515a60;
}

.flow-node.selected,
.flow-node.selected:hover {
  z-index: 4;
  border-color: rgba(255, 255, 255, 0.96);
  outline: 3px solid rgba(255, 255, 255, 0.96);
  outline-offset: 1px;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.48),
    0 0 20px rgba(255, 255, 255, 0.13);
}

.flow-node-loop {
  z-index: 0;
  min-width: 360px;
  min-height: 220px;
  border: 2px solid rgba(64, 239, 139, 0.82);
  border-radius: 16px;
  background: rgba(31, 196, 105, 0.028);
  box-shadow:
    0 0 0 1px rgba(165, 255, 205, 0.08) inset,
    0 0 24px rgba(37, 213, 113, 0.12);
  box-sizing: border-box;
  pointer-events: none;
}

.flow-node-loop:hover {
  border-color: rgba(83, 255, 157, 0.96);
}

.flow-node-loop.selected,
.flow-node-loop.selected:hover {
  z-index: 1;
  border-color: #43ef8d;
  outline: 3px solid rgba(255, 255, 255, 0.96);
  outline-offset: 4px;
  box-shadow:
    0 0 0 1px rgba(192, 255, 219, 0.18) inset,
    0 0 26px rgba(52, 231, 129, 0.22);
}

.flow-node-loop.is-loop-running {
  border-color: #57ff9f;
  background: rgba(31, 196, 105, 0.045);
  box-shadow:
    0 0 0 1px rgba(215, 255, 233, 0.22) inset,
    0 0 30px rgba(50, 235, 130, 0.3);
  animation: flow-loop-running-pulse 1.9s ease-in-out infinite;
}

.flow-node-loop.is-loop-running.selected {
  outline-color: rgba(255, 255, 255, 0.98);
  outline-offset: 4px;
}

@keyframes flow-loop-running-pulse {
  0%,
  100% {
    border-color: rgba(70, 235, 141, 0.66);
    box-shadow:
      0 0 0 1px rgba(215, 255, 233, 0.12) inset,
      0 0 15px rgba(50, 235, 130, 0.15);
  }

  50% {
    border-color: #62ffa7;
    box-shadow:
      0 0 0 1px rgba(232, 255, 242, 0.3) inset,
      0 0 34px rgba(50, 235, 130, 0.4);
  }
}

.flow-loop-header {
  position: absolute;
  z-index: 7;
  left: 12px;
  top: 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 28px;
  width: calc(100% - 24px);
  min-height: 54px;
  padding: 8px 9px;
  align-items: center;
  gap: 9px;
  color: #e9fff2;
  border: 1px solid rgba(80, 239, 148, 0.38);
  border-radius: 11px;
  background: rgba(11, 35, 24, 0.9);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.24),
    0 0 16px rgba(49, 220, 123, 0.1);
  box-sizing: border-box;
  cursor: move;
  pointer-events: auto;
  backdrop-filter: blur(10px);
}

.flow-loop-header > div {
  display: grid;
  min-width: 0;
}

.flow-loop-header strong {
  font-size: 14px;
}

.flow-loop-header small {
  overflow: hidden;
  color: rgba(184, 229, 204, 0.72);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-node-loop .flow-node-icon {
  color: #062513;
  background: #54f59a;
  box-shadow: 0 0 14px rgba(72, 239, 143, 0.28);
}

.flow-loop-caption {
  position: absolute;
  left: 16px;
  bottom: 12px;
  max-width: calc(100% - 32px);
  overflow: hidden;
  padding: 5px 8px;
  color: rgba(154, 231, 187, 0.7);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(65, 210, 126, 0.16);
  border-radius: 7px;
  background: rgba(6, 26, 17, 0.56);
  pointer-events: none;
}

.flow-loop-emergency {
  min-width: 84px;
  height: 30px;
  padding: 0 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(255, 143, 133, 0.7);
  border-radius: 7px;
  background: #ad3934;
  cursor: pointer;
  pointer-events: auto;
  transition: background 130ms ease, border-color 130ms ease, box-shadow 130ms ease;
}

.flow-loop-emergency:hover:not(:disabled) {
  border-color: rgba(255, 200, 194, 0.96);
  background: #ce4942;
  box-shadow: 0 0 15px rgba(235, 74, 65, 0.32);
}

.flow-loop-emergency:disabled {
  color: rgba(191, 205, 197, 0.46);
  border-color: rgba(110, 132, 121, 0.24);
  background: rgba(63, 78, 70, 0.38);
  cursor: not-allowed;
}

.flow-loop-resize {
  position: absolute;
  z-index: 9;
  display: block;
  pointer-events: auto;
  touch-action: none;
}

.flow-loop-resize::after {
  position: absolute;
  content: "";
  border-radius: 999px;
  background: transparent;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.flow-loop-resize:hover::after {
  background: rgba(88, 255, 159, 0.66);
  box-shadow: 0 0 12px rgba(69, 242, 143, 0.72);
}

.flow-loop-resize-n,
.flow-loop-resize-s {
  right: 18px;
  left: 18px;
  height: 14px;
  cursor: ns-resize;
}

.flow-loop-resize-n {
  top: -7px;
}

.flow-loop-resize-s {
  bottom: -7px;
}

.flow-loop-resize-n::after,
.flow-loop-resize-s::after {
  right: 14px;
  left: 14px;
  height: 3px;
  top: 50%;
  transform: translateY(-50%);
}

.flow-loop-resize-e,
.flow-loop-resize-w {
  top: 18px;
  bottom: 18px;
  width: 14px;
  cursor: ew-resize;
}

.flow-loop-resize-e {
  right: -7px;
}

.flow-loop-resize-w {
  left: -7px;
}

.flow-loop-resize-e::after,
.flow-loop-resize-w::after {
  top: 14px;
  bottom: 14px;
  width: 3px;
  left: 50%;
  transform: translateX(-50%);
}

.flow-loop-resize-ne,
.flow-loop-resize-se,
.flow-loop-resize-sw,
.flow-loop-resize-nw {
  width: 20px;
  height: 20px;
}

.flow-loop-resize-ne::after,
.flow-loop-resize-se::after,
.flow-loop-resize-sw::after,
.flow-loop-resize-nw::after {
  inset: 6px;
}

.flow-loop-resize-ne {
  top: -8px;
  right: -8px;
  cursor: nesw-resize;
}

.flow-loop-resize-se {
  right: -8px;
  bottom: -8px;
  cursor: nwse-resize;
}

.flow-loop-resize-sw {
  bottom: -8px;
  left: -8px;
  cursor: nesw-resize;
}

.flow-loop-resize-nw {
  top: -8px;
  left: -8px;
  cursor: nwse-resize;
}

.flow-node-header {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 9px 10px;
  border-bottom: 1px solid #343a3e;
  border-radius: 11px 11px 0 0;
  background: rgba(36, 41, 44, .72);
  cursor: move;
}

.flow-node-header > div {
  display: grid;
  min-width: 0;
}

.flow-node-header strong {
  font-size: 15px;
  font-weight: 700;
}

.flow-node-header small {
  display: none;
}

.flow-node-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #eaf9f2;
  font-size: 12px;
  font-weight: 800;
  border-radius: 9px;
  background: #147b58;
}

.flow-node-text .flow-node-icon {
  background: #7e57c2;
}

.flow-node-image .flow-node-icon {
  background: #167ba4;
}

.flow-node-generate .flow-node-icon {
  background: #b36c15;
}

.flow-node-ai-text .flow-node-icon {
  background: #5262d0;
}

.flow-node-ai-analysis .flow-node-icon {
  background: #7356cf;
}

.flow-node-save-image .flow-node-icon {
  background: #23876c;
}

.flow-node-image-folder .flow-node-icon {
  background: #4d78b8;
}

.flow-node-batch-extract-images .flow-node-icon {
  background: #8560c6;
}

.flow-node-pack-images .flow-node-icon {
  background: #b36c15;
}

.flow-node-document-selector .flow-node-icon {
  background: #2a7f87;
}

.flow-node-batch-extract-images .flow-node-body,
.flow-node-pack-images .flow-node-body,
.flow-node-document-selector .flow-node-body {
  min-height: 310px;
  align-content: start;
}

.flow-node-generate .flow-node-body,
.flow-node-ai-analysis .flow-node-body {
  min-height: 350px;
  align-content: start;
}

.flow-node-delete {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  color: #8d979c;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}

.flow-node-delete:hover {
  color: #fff;
  background: #a83a35;
}

.flow-node-content {
  position: relative;
}

.flow-stitch-preview {
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(128, 148, 156, .2);
  border-radius: 10px;
  background: repeating-conic-gradient(#e1e5e6 0% 25%, #f6f8f8 0% 50%) 0 / 16px 16px;
  cursor: zoom-in;
}
.flow-stitch-preview img { display: block; width: 100%; max-height: 260px; object-fit: contain; }
.flow-stitch-warning { color: #a56320; font-size: 12px; line-height: 1.5; }

.flow-border-fields, .flow-border-rgb { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.flow-border-rgb { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.flow-border-fields label, .flow-border-rgb label { display: grid; gap: 6px; min-width: 0; }
.flow-border-fields label > span, .flow-border-rgb label > span { display: flex; justify-content: space-between; color: #859399; font-size: 12px; }
.flow-border-fields small { font-size: 10px; font-weight: 400; opacity: .8; }
.flow-border-fields input, .flow-border-rgb input { box-sizing: border-box; min-width: 0; width: 100%; height: 36px; padding: 8px 10px; border: 1px solid #65717855; border-radius: 9px; background: transparent; color: inherit; font: inherit; font-size: 13px; }
.flow-border-fields input[aria-invalid="true"], .flow-border-rgb input[aria-invalid="true"] { border-color: #d34c53; outline-color: #d34c53; }
.flow-border-toggle { display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 12px; border: 1px solid #65717855; border-radius: 10px; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.flow-border-toggle > span:first-child { flex: 1; }
.flow-border-swatch { width: 26px; height: 20px; border: 1px solid #65717888; border-radius: 5px; }
.flow-border-picker { display: grid; gap: 12px; padding: 12px; border: 1px solid #65717833; border-radius: 12px; }
.flow-border-picker.hidden { display: none; }
.flow-border-palette { position: relative; height: 142px; border-radius: 8px; touch-action: none; cursor: crosshair; background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent), hsl(var(--border-hue) 100% 50%); }
.flow-border-palette > i { position: absolute; left: var(--border-s); top: var(--border-v); width: 10px; height: 10px; border-radius: 50%; border: 2px solid white; box-shadow: 0 0 2px 1px #000a; transform: translate(-50%, -50%); pointer-events: none; }
.flow-border-palette[aria-disabled="true"] { opacity: .5; cursor: default; }
.flow-border-hue { appearance: none; width: 100%; min-width: 0; height: 12px; padding: 0; border: 0; border-radius: 8px; background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); cursor: pointer; }
.flow-border-hue::-webkit-slider-thumb { appearance: none; width: 15px; height: 15px; border-radius: 50%; background: white; border: 2px solid #637e75; }
.flow-border-validation { color: #dc555b; font-size: 12px; line-height: 1.5; }
.flow-border-validation:empty, .flow-node-image-border .flow-node-status:empty { display: none; }
.flow-border-preview { width: 100%; padding: 0; overflow: hidden; border: 1px solid #65717844; border-radius: 10px; background: repeating-conic-gradient(#e1e5e6 0% 25%, #f6f8f8 0% 50%) 0 / 16px 16px; cursor: zoom-in; }
.flow-border-preview img { display: block; width: 100%; max-height: 260px; object-fit: contain; }
.flow-node-image-border .flow-node-download { color: #24896d; }

.flow-node-body {
  display: grid;
  gap: 10px;
  min-height: 92px;
  padding: 14px 20px 16px;
}

.flow-node-port-column {
  position: absolute;
  z-index: 5;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  pointer-events: none;
}

.flow-node-inputs {
  left: -9px;
  align-items: flex-start;
}

.flow-node-outputs {
  right: -9px;
  align-items: flex-end;
}

.flow-port-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
  color: #b0babd;
  font-size: 11px;
  white-space: nowrap;
  pointer-events: auto;
}

.flow-port-row-input {
  transform: translateX(-100%);
}

.flow-port-row-input .flow-port {
  transform: translateX(50%);
}

.flow-port-row-output {
  transform: translateX(100%);
}

.flow-port-row-output .flow-port {
  transform: translateX(-50%);
}

.flow-port-label {
  opacity: 0;
  visibility: hidden;
  transform: translateY(2px) scale(.96);
  transition: opacity .14s ease, transform .14s ease, visibility 0s linear .14s;
}

.flow-port-row:hover .flow-port-label,
.flow-port-row:focus-within .flow-port-label {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.flow-port {
  width: 17px;
  height: 17px;
  padding: 0;
  border: 3px solid #1b1f22;
  border-radius: 50%;
  cursor: crosshair;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.24);
  transition: transform 100ms ease, box-shadow 100ms ease, filter 100ms ease;
}

.flow-port:hover {
  transform: scale(1.25);
}

.flow-port-row-input .flow-port:hover {
  transform: translateX(50%) scale(1.25);
}

.flow-port-row-output .flow-port:hover {
  transform: translateX(-50%) scale(1.25);
}

.flow-port-text {
  background: #b794f6;
}

.flow-port-image {
  background: #42b9ed;
}

.flow-port-folder {
  border-radius: 4px;
  background: #f0bd55;
}

.flow-pack-save-toggle.is-active {
  color: #d9fff0;
  border-color: rgba(72, 205, 144, 0.68);
  background: rgba(30, 132, 91, 0.32);
}

.flow-pack-save-location {
  display: grid;
  gap: 6px;
}

.flow-pack-save-location span {
  overflow: hidden;
  color: #98a7a1;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-pack-save-hint {
  margin: 0;
  color: #e9c26b;
  font-size: 11px;
  line-height: 1.45;
}

.flow-pack-save-location .flow-node-secondary.is-opening {
  color: #e9c26b;
  border-color: rgba(233, 194, 107, 0.58);
}

.flow-port.is-snap-target {
  filter: brightness(1.2);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.95),
    0 0 0 7px rgba(240, 198, 106, 0.25),
    0 0 20px rgba(240, 198, 106, 0.72);
}

.flow-port-row-input .flow-port.is-snap-target {
  transform: translateX(50%) scale(1.42);
}

.flow-port-row-output .flow-port.is-snap-target {
  transform: translateX(-50%) scale(1.42);
}

.flow-image-loader {
  position: relative;
  display: grid;
  min-height: 145px;
  overflow: hidden;
  place-items: center;
  color: #a7b0b4;
  border: 1px dashed #4b555a;
  border-radius: 9px;
  background: #141719;
  cursor: pointer;
}

.flow-image-loader > div {
  display: grid;
  gap: 5px;
  place-items: center;
}

.flow-image-loader b {
  font-size: 26px;
  font-weight: 400;
}

.flow-image-loader small {
  color: #687277;
}

.flow-image-loader img {
  display: block;
  width: 100%;
  max-height: 210px;
  object-fit: contain;
}

.flow-image-loader .flow-canvas-image-preview > span {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 3px 6px;
  color: #dbe6e2;
  font-size: 9px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.66);
}

.flow-image-loader input {
  display: none;
}

.flow-canvas-image-preview {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: zoom-in;
}

.flow-image-loader .flow-canvas-image-preview { min-height: 145px; }
.flow-canvas-image-preview:focus-visible {
  outline: 3px solid #168355;
  outline-offset: -3px;
}

.flow-node-secondary,
.flow-node-run {
  width: 100%;
  min-height: 36px;
  color: #dce9e4;
  border: 1px solid #465158;
  border-radius: 8px;
  background: #252b2e;
  cursor: pointer;
}

.flow-node-run {
  color: #fff;
  border-color: #1d8b65;
  background: #147b58;
}

.flow-node-run:hover:not(:disabled) {
  background: #1a8e68;
}

.flow-node-run:disabled {
  opacity: 0.6;
  cursor: wait;
}

.flow-text-editor {
  min-height: 150px;
  padding: 11px;
  resize: vertical;
  color: #e8eceb;
  line-height: 1.55;
  border: 1px solid #3e474c;
  border-radius: 8px;
  outline: none;
  background: #111416;
  user-select: text;
}

.flow-text-editor:focus {
  border-color: #9470d6;
  box-shadow: 0 0 0 2px rgba(148, 112, 214, 0.18);
}

.flow-node-help {
  color: #707a7f;
  line-height: 1.45;
}

.flow-persisted-image {
  position: relative;
  display: grid;
  min-height: 132px;
  overflow: hidden;
  place-items: center;
  border: 1px solid #3b4549;
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent),
    #111416;
}

.flow-persisted-image img {
  display: block;
  width: 100%;
  max-height: 210px;
  object-fit: contain;
}

.flow-persisted-image span {
  position: absolute;
  right: 7px;
  bottom: 7px;
  left: 7px;
  overflow: hidden;
  padding: 4px 7px;
  color: #dce5e2;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 5px;
  background: rgba(4, 7, 8, 0.76);
  backdrop-filter: blur(4px);
}

.flow-node-download {
  display: grid;
  width: 100%;
  min-height: 34px;
  place-items: center;
  color: #8ce0bc;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(69, 181, 134, 0.42);
  border-radius: 8px;
  background: rgba(30, 125, 89, 0.12);
  cursor: pointer;
}

.flow-node-download:hover {
  color: #b8f6dc;
  border-color: rgba(103, 221, 171, 0.66);
  background: rgba(38, 151, 109, 0.2);
}

/* Main image aspect-ratio workspace */
.main-aspect-workspace {
  min-height: 100%;
  background: #f5f8f6;
  overflow: auto;
}

.main-aspect-header {
  min-height: 88px;
  padding: 20px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #fff;
  border-bottom: 1px solid #dbe6df;
}

.main-aspect-header h2 { margin: 3px 0 4px; font-size: 24px; }
.main-aspect-header p { margin: 0; color: #6f8078; font-size: 13px; }

.main-aspect-canvas {
  display: grid;
  grid-template-columns: minmax(420px, .92fr) minmax(520px, 1.08fr);
  grid-template-rows: minmax(610px, auto) auto;
  gap: 18px;
  padding: 20px 28px 28px;
}

.main-aspect-card {
  min-width: 0;
  padding: 18px;
  background: #fff;
  border: 1px solid #d8e4dd;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(24, 70, 49, .055);
}

.main-aspect-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.main-aspect-card-heading > div:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
}

.main-aspect-card-heading h3 { margin: 0; font-size: 17px; }
.main-aspect-card > p { margin: 0 0 14px; color: #738279; font-size: 12px; }

.main-aspect-input-card { display: flex; flex-direction: column; }
.main-aspect-upload-grid {
  min-height: 405px;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  align-content: start;
  gap: 12px;
  border: 1px dashed #b8cec1;
  border-radius: 14px;
  background: #fbfdfc;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.main-aspect-upload-grid.drag-active {
  border-color: #16845d;
  background: #f0faf5;
  box-shadow: inset 0 0 0 2px rgba(22, 132, 93, .12);
}

.main-aspect-upload-item,
.main-aspect-add-tile {
  position: relative;
  min-height: 168px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #d3e1d9;
  background: #eef4f1;
}

.main-aspect-upload-item img {
  width: 100%;
  height: 138px;
  display: block;
  object-fit: contain;
  background: #edf2ef;
}

.main-aspect-upload-item small {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  color: #5f7067;
  background: rgba(255, 255, 255, .92);
  font-size: 10px;
}

.main-aspect-upload-item button {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(16, 55, 39, .82);
  cursor: pointer;
}

.main-aspect-add-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #34604b;
  background: #fff;
  border-style: dashed;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.main-aspect-add-tile:hover {
  transform: translateY(-2px);
  border-color: #218b64;
  background: #f4fbf7;
}

.main-aspect-add-tile span { font-size: 27px; font-weight: 300; }
.main-aspect-add-tile small { color: #839087; font-size: 11px; }

.main-aspect-ratio-control {
  position: relative;
  margin-top: auto;
  padding-top: 17px;
}

.main-aspect-ratio-control + .image-generation-options,
.main-aspect-resolution-option + .image-generation-options { margin-top: 10px; }

.main-aspect-ratio-control > span {
  display: block;
  margin-bottom: 7px;
  color: #52655b;
  font-size: 12px;
  font-weight: 700;
}

#main-aspect-ratio-toggle {
  width: 100%;
  min-height: 58px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #80b79d;
  border-radius: 13px;
  color: #174f38;
  background: linear-gradient(135deg, #f7fcf9, #edf8f2);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(20, 118, 82, .09);
}

#main-aspect-ratio-toggle strong { font-size: 20px; }
#main-aspect-ratio-toggle small { color: #6d8176; }

.main-aspect-resolution-option {
  display: grid;
  gap: 11px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #d8e5de;
  border-radius: 13px;
  background: #f8fbf9;
}

.main-aspect-resolution-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.main-aspect-resolution-heading > div {
  display: grid;
  gap: 3px;
}

.main-aspect-resolution-heading strong {
  color: #28483a;
  font-size: 12px;
}

.main-aspect-resolution-heading small {
  color: #72837a;
  font-size: 9px;
  line-height: 1.45;
}

.main-aspect-resolution-settings { display: grid; gap: 8px; }
.main-aspect-resolution-settings .resolution-target-grid { gap: 8px; }
.main-aspect-resolution-option.is-paused {
  border-color: #d7a94e;
  background: #fffbf2;
  box-shadow: 0 0 0 3px rgba(215, 169, 78, .1);
}

.main-aspect-ratio-menu {
  position: absolute;
  z-index: 60;
  left: 0;
  right: 0;
  bottom: 70px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  border: 1px solid rgba(76, 167, 126, .62);
  border-radius: 16px;
  background: rgba(250, 255, 252, .97);
  box-shadow: 0 18px 45px rgba(7, 43, 27, .2);
  backdrop-filter: blur(16px);
}

.main-aspect-ratio-menu button {
  min-height: 40px;
  border: 1px solid #d6e7dd;
  border-radius: 11px;
  color: #1d5c41;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.main-aspect-ratio-menu button:hover,
.main-aspect-ratio-menu button.active {
  transform: translateY(-2px) scale(1.02);
  border-color: #4ca77e;
  background: #eaf7f0;
}

.main-aspect-output-card { min-height: 610px; }
.main-aspect-delivery-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 18px 12px;
  text-align: center;
}
.main-aspect-delivery-label { font-size: 13px; font-weight: 600; }
.main-aspect-delivery-state small,
.main-aspect-delivery-summary { font-size: 11px; color: var(--muted, #66776e); line-height: 1.5; }
.main-aspect-delivery-summary { display: block; padding: 5px 8px 8px; text-align: center; }
.main-aspect-delivery-progress { width: min(180px, 90%); height: 7px; accent-color: var(--primary, #238864); }
.main-aspect-retry-delivery { margin-top: 3px; padding: 7px 14px; }
.main-aspect-output-grid {
  min-height: 515px;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  align-content: start;
  gap: 12px;
  border: 1px dashed #d2ded7;
  border-radius: 14px;
  background: #fbfdfc;
}

.main-aspect-output-item {
  position: relative;
  min-height: 210px;
  border: 1px solid #dbe5df;
  border-radius: 13px;
  overflow: hidden;
  background: #f2f6f4;
}

.main-aspect-output-item.is-original { border-color: #c9d8d0; }
.main-aspect-output-item.is-resized {
  border-color: #65ad8c;
  box-shadow: inset 0 0 0 1px rgba(31, 139, 97, .12);
}
.main-aspect-output-item.is-waiting-resolution { border-color: #d7a94e; }
.main-aspect-output-badge {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, .52);
  border-radius: 999px;
  color: #fff;
  background: rgba(20, 72, 49, .84);
  font-size: 9px;
  font-weight: 750;
  pointer-events: none;
  backdrop-filter: blur(6px);
}
.main-aspect-output-item.is-resized .main-aspect-output-badge {
  background: rgba(17, 132, 88, .9);
}
.main-aspect-output-item.is-waiting-resolution .main-aspect-output-badge {
  background: rgba(166, 111, 18, .9);
}

.main-aspect-output-item img {
  width: 100%;
  height: 210px;
  display: block;
  object-fit: contain;
  cursor: zoom-in;
}

.main-aspect-output-item span {
  display: block;
  padding: 8px;
  color: #607269;
  background: #fff;
  font-size: 11px;
  text-align: center;
}

.main-aspect-output-item.is-loading {
  display: grid;
  place-items: center;
  color: #718077;
}

.main-aspect-output-item.is-loading::before {
  content: "";
  width: 28px;
  height: 28px;
  border: 3px solid #d5e6dd;
  border-top-color: #18815d;
  border-radius: 50%;
  animation: main-aspect-spin .85s linear infinite;
}

.main-aspect-output-item.is-loading > strong {
  position: absolute;
  top: calc(50% + 28px);
  font-size: 12px;
  animation: gentleTextPulse 1.8s ease-in-out infinite;
}

@keyframes main-aspect-spin { to { transform: rotate(360deg); } }

.main-aspect-action-row {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
}

.main-aspect-action-row .resolution-start-button { width: 100%; }
.main-aspect-action-row > span { color: #708078; font-size: 12px; text-align: center; }

/* Product white-background studio workspace */
.product-white-background-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.product-white-background-workspace .main-aspect-header {
  min-height: 68px;
  padding: 10px 22px;
}

.product-white-background-workspace .main-aspect-header h2 {
  margin-block: 1px 2px;
  font-size: 20px;
}

.product-white-background-workspace .main-aspect-header p { font-size: 11px; }

.product-white-background-canvas {
  min-height: 0;
  padding: 10px 14px 12px;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 9px 12px;
  overflow: hidden;
}

.product-white-background-canvas .main-aspect-card {
  min-height: 0;
  padding: 11px;
  border-radius: 14px;
  overflow: hidden;
}

.product-white-background-canvas .main-aspect-card-heading {
  margin-bottom: 6px;
}

.product-white-background-canvas .main-aspect-card-heading h3 { font-size: 15px; }

.product-white-settings-layout {
  display: grid;
  grid-template-columns: minmax(190px, .56fr) minmax(0, 1.44fr);
  align-items: stretch;
  gap: 7px;
}

.product-white-mode-panel {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 10px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid #d8e6df;
  border-radius: 12px;
  background: #f6faf8;
}

.product-white-mode-row {
  display: grid;
  grid-template-columns: 38px 46px 44px;
  align-items: center;
  justify-content: start;
  gap: 7px;
}

.product-white-mode-row > span {
  color: #41584c;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.product-white-mode-row > span:first-child { text-align: right; }
.product-white-presentation-row { display: grid; justify-items: start; gap: 3px; }
.product-white-presentation-row .product-presentation-advice {
  color: #9b6b25;
  font-size: 9px;
  line-height: 1.35;
  white-space: nowrap;
}
.product-background-switch { position: relative; flex: 0 0 auto; }
.product-background-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.product-background-switch span {
  position: relative;
  display: block;
  width: 46px;
  height: 26px;
  border: 1px solid #b7c9c0;
  border-radius: 999px;
  background: #dce6e1;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.product-background-switch span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(18, 59, 41, .24);
  content: "";
  transition: transform .2s cubic-bezier(.2, .9, .25, 1.2);
}
.product-background-switch input:checked + span {
  border-color: #19805c;
  background: #238b64;
}
.product-background-switch input:checked + span::after { transform: translateX(20px); }
.product-background-switch input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(35, 139, 100, .2);
}
.product-background-switch input:disabled + span { cursor: not-allowed; opacity: .5; }

.product-white-background-canvas .image-generation-options {
  margin-top: 7px;
  padding: 7px 9px;
}

.product-white-background-canvas .image-generation-options .tryon-segment-control {
  grid-template-columns: 70px minmax(0, auto);
}

.product-white-background-canvas .image-generation-options .tryon-segment-control > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-white-background-canvas .main-aspect-card > p {
  margin: 5px 0 6px;
  font-size: 10px;
  line-height: 1.35;
}

.product-white-background-upload-grid {
  display: flex;
  min-height: 142px;
  height: 142px;
  padding: 7px;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-color: #a6c9b8 transparent;
}

.product-white-background-upload-item {
  flex: 0 0 116px;
  min-height: 126px;
  display: grid;
  grid-template-rows: 72px 23px 30px;
}

.product-white-background-upload-item img {
  height: 72px;
}

.product-white-background-upload-grid .main-aspect-add-tile {
  flex: 0 0 116px;
  min-height: 126px;
}

.product-white-background-upload-grid .main-aspect-add-tile span { font-size: 22px; }
.product-white-background-upload-grid .main-aspect-add-tile strong { font-size: 11px; }
.product-white-background-upload-grid .main-aspect-add-tile small { font-size: 9px; }

.product-white-background-upload-item .product-mask-status {
  height: 23px;
  font-size: 8px;
  color: #a15d28;
  background: #fff8f1;
  font-weight: 750;
}

.product-white-background-upload-item .product-mask-status.has-mask {
  color: #11734f;
  background: #effaf4;
}

.product-white-sample-panel {
  display: grid;
  gap: 0;
  min-width: 0;
  margin: 0;
  padding: 7px 9px;
  border: 1px solid #d8e6df;
  border-radius: 12px;
  background: #f8fbf9;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.product-white-sample-panel.is-expanded {
  gap: 8px;
  border-color: #cbded4;
  background: #f7fbf9;
}
.product-white-sample-panel.is-collapsed {
  background: #fbfdfc;
}
.product-white-sample-panel.is-dragging {
  border-color: #168259;
  background: #edf9f3;
  box-shadow: inset 0 0 0 2px rgba(22, 130, 89, .13);
}
.product-white-sample-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
}
.product-white-sample-heading strong { color: #294638; font-size: 12px; }
.product-white-sample-switch { margin-left: auto; }
.product-white-sample-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 4px;
  min-width: 0;
  padding-top: 1px;
}
.product-white-sample-body[hidden],
.product-white-sample-body.hidden {
  display: none !important;
}
.product-white-sample-body > small {
  color: #74867d;
  font-size: 9px;
  line-height: 1.35;
}
.product-white-sample-grid {
  display: flex;
  gap: 9px;
  min-height: 70px;
  padding: 2px 2px 5px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-color: #a6c9b8 transparent;
}
.product-white-sample-card,
.product-white-sample-add {
  position: relative;
  display: grid;
  flex: 0 0 82px;
  height: 66px;
  overflow: hidden;
  border: 1px solid #ceded6;
  border-radius: 10px;
  background: #fff;
}
.product-white-sample-card.is-selected {
  border-color: #168259;
  box-shadow: 0 0 0 2px rgba(22, 130, 89, .15), 0 7px 18px rgba(28, 101, 70, .1);
}
.product-white-sample-action {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}
.product-white-sample-action:disabled { cursor: not-allowed; opacity: .58; }
.product-white-sample-action:focus-visible {
  outline: 2px solid #168259;
  outline-offset: -3px;
}
.product-white-sample-action img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #edf3f0;
}
.product-white-sample-selected-mark {
  position: absolute;
  left: 5px;
  bottom: 5px;
  display: none;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #168259;
  box-shadow: 0 2px 7px rgba(16, 55, 39, .28);
  font-size: 11px;
  font-weight: 900;
}
.product-white-sample-card.is-selected .product-white-sample-selected-mark { display: grid; }
.product-white-sample-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 23px;
  height: 23px;
  padding: 0 0 2px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(16, 55, 39, .82);
  cursor: pointer;
}
.product-white-sample-add {
  place-items: center;
  padding: 6px;
  border-style: dashed;
  color: #527061;
  cursor: pointer;
}
.product-white-sample-add span { color: #19805c; font-size: 19px; }
.product-white-sample-add strong { font-size: 9px; }
.product-white-sample-add small { color: #809087; font-size: 8px; text-align: center; }

.main-aspect-upload-item .product-mask-trigger {
  position: static;
  width: auto;
  height: 26px;
  min-height: 26px;
  margin: 2px 5px;
  padding: 0 8px;
  border: 1px solid #77ac92;
  border-radius: 8px;
  color: #175d41;
  background: #f4fbf7;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.main-aspect-upload-item .product-mask-trigger.has-mask {
  border-color: #21855f;
  background: #e8f7ef;
}

.main-aspect-upload-item .product-image-remove {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 25px;
  height: 25px;
  margin: 0;
  padding: 0 0 2px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(16, 55, 39, .82);
}

.product-white-background-mask-reminder {
  margin-top: 6px;
  padding: 7px 10px;
  border: 1px solid #edc6a9;
  border-radius: 11px;
  color: #985323;
  background: #fff8f2;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.product-white-background-canvas .main-aspect-output-card {
  display: flex;
  flex-direction: column;
}

.product-white-background-canvas .main-aspect-output-grid {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.product-white-background-canvas .main-aspect-action-row {
  gap: 3px;
}

.product-white-background-canvas .resolution-start-button {
  min-height: 40px;
  padding-block: 8px;
}

.product-white-background-canvas .main-aspect-action-row > span { font-size: 10px; }

@media (max-height: 760px) and (min-width: 1101px) {
  .product-white-background-workspace .main-aspect-header { min-height: 58px; padding-block: 6px; }
  .product-white-background-workspace .main-aspect-header p { display: none; }
  .product-white-background-upload-grid { min-height: 112px; height: 112px; }
  .product-white-background-upload-item,
  .product-white-background-upload-grid .main-aspect-add-tile { min-height: 96px; }
  .product-white-background-upload-item { grid-template-rows: 46px 21px 28px; }
  .product-white-background-upload-item img { height: 46px; }
  .product-white-mode-panel,
  .product-white-sample-panel { padding-block: 5px; }
  .product-white-sample-panel.is-collapsed { padding-block: 4px; }
  .product-white-sample-heading { min-height: 30px; }
  .product-white-sample-body { gap: 6px; }
}

@media (max-width: 1280px) and (min-width: 1101px) {
  .product-white-settings-layout {
    grid-template-columns: minmax(170px, .52fr) minmax(0, 1.48fr);
  }
  .product-white-mode-panel { padding-inline: 8px; }
  .product-white-presentation-row .product-presentation-advice {
    white-space: normal;
  }
}

@media (max-width: 800px) {
  .product-white-settings-layout { grid-template-columns: 1fr; }
}

.product-white-background-mask-reminder.is-ready {
  border-color: #9bcdb5;
  color: #176847;
  background: #f0faf5;
}

.product-white-background-workspace .main-aspect-output-item img {
  aspect-ratio: 1;
  height: auto;
  background: #fff;
}

.product-white-background-workspace.is-transparent-mode .main-aspect-output-item img {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #e7ece9 25%, transparent 25%),
    linear-gradient(-45deg, #e7ece9 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e7ece9 75%),
    linear-gradient(-45deg, transparent 75%, #e7ece9 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.product-mask-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0 0 2px;
  border: 1px solid #d5dfd9;
  border-radius: 50%;
  background: white;
  font-size: 22px;
}

@media (max-width: 1100px) {
  .main-aspect-canvas { grid-template-columns: 1fr; }
  .main-aspect-action-row { grid-column: 1; }
}

.flow-folder-picker {
  display: grid;
  width: 100%;
  min-height: 76px;
  gap: 5px;
  padding: 12px;
  place-items: center;
  color: #dde7e3;
  border: 1px dashed #52636b;
  border-radius: 9px;
  background: #14191b;
  cursor: pointer;
  transition: border-color 130ms ease, background 130ms ease, transform 130ms ease;
}

.flow-folder-picker:hover {
  border-color: #72b8dd;
  background: #172126;
  transform: translateY(-1px);
}

.flow-folder-picker strong {
  color: #f0f5f3;
  font-size: 13px;
}

.flow-folder-picker span {
  display: block;
  width: 100%;
  overflow: hidden;
  color: #839197;
  font-size: 11px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-folder-fallback-input {
  display: none;
}

.flow-folder-order {
  display: grid;
  gap: 5px;
  color: #8e999e;
  font-size: 11px;
}

.flow-folder-order select {
  width: 100%;
  height: 36px;
  padding: 0 9px;
  color: #e4e9e7;
  border: 1px solid #41494e;
  border-radius: 7px;
  outline: none;
  background: #111416;
}

.flow-folder-order select:focus {
  border-color: #69a9ce;
  box-shadow: 0 0 0 2px rgba(80, 157, 202, 0.18);
}

.flow-folder-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.flow-document-output-grid span {
  aspect-ratio: auto;
  min-height: 24px;
}

.flow-folder-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 7px;
  padding: 8px 9px;
  color: #91a09f;
  font-size: 11px;
  border: 1px solid #353d41;
  border-radius: 7px;
  background: rgba(12, 15, 16, 0.54);
}

.flow-folder-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-folder-summary span:last-child {
  color: #c2cdca;
  text-align: right;
}

.flow-extractor-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.flow-extractor-actions .flow-folder-picker {
  min-height: 70px;
}

.flow-extracted-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.flow-extracted-grid span {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  color: #657076;
  font-size: 9px;
  border: 1px solid #343d41;
  border-radius: 5px;
  background: #111416;
}

.flow-extracted-grid span.has-output {
  color: #d9fff0;
  border-color: rgba(70, 196, 143, 0.62);
  background: rgba(30, 125, 89, 0.22);
}

.flow-node-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.flow-node-fields label {
  display: grid;
  gap: 4px;
  color: #8e999e;
  font-size: 11px;
}

.flow-node-fields select {
  min-width: 0;
  height: 34px;
  padding: 0 8px;
  color: #e4e9e7;
  border: 1px solid #41494e;
  border-radius: 7px;
  outline: none;
  background: #111416;
}

.flow-generated-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.flow-generated-result {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #3c4449;
  border-radius: 7px;
  background: #111416;
}

.flow-generated-preview button[data-batch-preview-url] {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 1;
  border: 0;
  border-radius: 0;
  background: #111416;
  cursor: zoom-in;
  transition: border-color .16s ease, transform .16s ease;
}
.canvas-image-generation-timing {
  display: block;
  padding: 5px 4px;
  color: #9eaaa4;
  font-size: 8px;
  line-height: 1.35;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.canvas-image-generation-timing strong { color: #69d49f; }
.canvas-image-generation-timing.is-running { color: #e9c26b; font-size: 10px; }
.canvas-image-generation-timing.is-running strong { color: #f3ce78; }

.flow-generated-preview button[data-batch-preview-url]:hover {
  border-color: #e5eee9;
  transform: translateY(-1px);
}

.flow-generated-preview button[data-batch-preview-url]:focus-visible {
  outline: 2px solid #69d49f;
  outline-offset: 2px;
}

.flow-generated-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flow-node-status {
  min-height: 18px;
  color: #8d989d;
  font-size: 11px;
  text-align: center;
}

.flow-node-status[data-status="running"],
.flow-node-status[data-status="queued"] {
  color: #e9c26b;
  animation: flow-status-pulse 1.6s ease-in-out infinite;
}

.flow-node-status[data-status="completed"] {
  color: #69d49f;
}

.flow-node-status[data-status="failed"] {
  color: #ff8c84;
}

@keyframes flow-status-pulse {
  50% { opacity: 0.42; }
}

.flow-ai-model {
  padding: 8px 10px;
  color: #bfc8ff;
  font-size: 11px;
  border: 1px solid rgba(129, 142, 241, 0.28);
  border-radius: 7px;
  background: rgba(75, 89, 190, 0.14);
}

.flow-ai-output {
  max-height: 230px;
  margin: 0;
  padding: 10px;
  overflow: auto;
  color: #e4e9e7;
  line-height: 1.55;
  white-space: pre-wrap;
  border: 1px solid #394146;
  border-radius: 8px;
  background: #111416;
  user-select: text;
}

.flow-ai-empty {
  padding: 20px 10px;
  color: #707a7f;
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
  border: 1px dashed #394146;
  border-radius: 8px;
}

.flow-empty-hint {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  display: grid;
  gap: 7px;
  place-items: center;
  color: rgba(255, 255, 255, 0.36);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.flow-empty-hint > span {
  font-size: 36px;
}

.flow-empty-hint strong {
  color: rgba(255, 255, 255, 0.56);
  font-size: 16px;
}

.flow-empty-hint small {
  font-size: 11px;
}

.flow-toolbar {
  position: absolute;
  z-index: 20;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px;
  color: #cad1cf;
  border: 1px solid #343a3e;
  border-radius: 10px;
  background: rgba(25, 29, 31, 0.94);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.32);
}

.flow-toolbar button {
  min-width: 32px;
  height: 30px;
  padding: 0 8px;
  color: #d9dfdd;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.flow-toolbar button:hover {
  background: #343b3f;
}

.flow-toolbar span {
  min-width: 50px;
  font-size: 11px;
  text-align: center;
}

.flow-performance-control {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 2px 6px;
  min-width: 164px;
  margin-right: 4px;
  padding: 3px 7px;
  border-right: 1px solid #3b4246;
  cursor: default;
}

.flow-toolbar .flow-performance-control > span {
  min-width: 0;
  color: #aeb8b4;
  font-size: 10px;
  text-align: left;
}

.flow-performance-control select {
  min-width: 84px;
  height: 25px;
  padding: 0 22px 0 7px;
  color: #e7eeeb;
  font-size: 11px;
  border: 1px solid #414a4e;
  border-radius: 6px;
  outline: none;
  background: #242a2d;
  cursor: pointer;
}

.flow-performance-control select:focus-visible {
  border-color: #64c79d;
  box-shadow: 0 0 0 2px rgba(77, 194, 145, .16);
}

.flow-performance-control small {
  grid-column: 1 / -1;
  color: #71807a;
  font-size: 9px;
  line-height: 1.2;
  white-space: nowrap;
}

.flow-node-menu {
  position: absolute;
  z-index: 40;
  width: 306px;
  overflow: hidden;
  color: #e6ebe9;
  border: 1px solid #41494d;
  border-radius: 12px;
  background: #202427;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.52);
}

.flow-context-menu {
  position: absolute;
  z-index: 60;
  display: grid;
  min-width: 174px;
  gap: 3px;
  padding: 6px;
  overflow: hidden;
  color: #e6ebe9;
  border: 1px solid #41494d;
  border-radius: 10px;
  background: rgba(31, 36, 39, 0.98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
}

.flow-context-menu button {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  color: #e4e9e7;
  font-size: 12px;
  text-align: left;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}

.flow-context-menu button:hover:not(:disabled),
.flow-context-menu button:focus-visible {
  outline: none;
  color: #fff;
  background: #343c40;
}

.flow-context-menu button:disabled {
  color: #657074;
  cursor: not-allowed;
}

#flow-delete-nodes:hover:not(:disabled),
#flow-delete-nodes:focus-visible {
  color: #ffb8b1;
  background: rgba(174, 55, 49, 0.34);
}

.flow-node-menu > label {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid #353c40;
}

.flow-node-menu input {
  height: 34px;
  color: #fff;
  border: 0;
  outline: none;
  background: transparent;
}

.flow-node-results {
  display: grid;
  gap: 4px;
  max-height: 270px;
  padding: 7px;
  overflow-y: auto;
}

.flow-node-results button {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 9px;
  padding: 9px;
  color: #e7ecea;
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.flow-node-results button:hover,
.flow-node-results button:focus {
  outline: none;
  background: #30373b;
}

.flow-node-results button > span:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #d8f6e9;
  font-size: 11px;
  font-weight: 800;
  border-radius: 8px;
  background: #147b58;
}

.flow-node-results button > span:last-child {
  display: grid;
  gap: 2px;
}

.flow-node-results small {
  color: #899398;
  font-size: 10px;
}

.flow-node-empty {
  margin: 0;
  padding: 20px;
  color: #818b90;
  font-size: 12px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .flow-node.is-run-pending:not(.flow-node-loop)::after,
  .flow-node.is-run-active:not(.flow-node-loop)::after,
  .flow-edge-stream,
  .flow-node-loop.is-loop-running,
  .video-splice-timeline-panel.is-transition-placement,
  .video-splice-transition-card:hover .video-splice-transition-swatch,
  .video-splice-transition-card:hover .video-splice-transition-swatch::before,
  .video-splice-transition-card:hover .video-splice-transition-swatch::after,
  .video-splice-edit-mode::before,
  .video-splice-clip.is-auto-mix-active,
  .video-splice-auto-lock-overlay .video-splice-auto-lock-shackle,
  .video-splice-auto-lock-overlay .video-splice-auto-lock-icon,
  .video-splice-capability-card,
  .video-splice-capability-icon.is-checking span,
  .video-splice-capability-progress i,
  .video-splice-mode-loading-card,
  .video-splice-mode-loading-spinner::before,
  .video-splice-mode-loading-spinner::after,
  .video-splice-mode-loading-progress i {
    animation: none;
    transition: none;
  }

  .video-splice-capability-progress i,
  .video-splice-mode-loading-progress i { width: 100%; transform: none; }
}

@media (max-width: 900px) {
  .flow-node {
    width: 290px;
  }

  .flow-node-generate {
    width: 330px;
  }

  .flow-run-all {
    top: 12px;
    right: 12px;
    min-width: 126px;
    min-height: 36px;
    padding: 0 12px;
    font-size: 12px;
  }
}

/* ChatGPT local-session UI. The native host is always kept outside the app DOM. */
.network-status-bar {
  position: fixed;
  z-index: 12050;
  top: 12px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px;
  border: 1px solid rgba(205, 220, 212, .92);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 26px rgba(20, 61, 42, .12);
  translate: -50% 0;
  backdrop-filter: blur(12px);
  cursor: default;
  touch-action: auto;
  user-select: none;
  -webkit-user-select: none;
  will-change: left, top;
}
.network-status-bar.is-positioned {
  right: auto;
  left: 0;
  translate: 0 0;
}
.network-status-bar.is-dragging {
  z-index: 12060;
  box-shadow: 0 15px 38px rgba(16, 67, 43, .22), 0 0 0 3px rgba(31, 150, 104, .1);
}
.network-status-drag-handle {
  appearance: none;
  display: grid;
  grid-template-columns: repeat(2, 2px);
  grid-template-rows: repeat(3, 2px);
  gap: 2px;
  width: 24px;
  min-width: 24px;
  height: 26px;
  margin: 0;
  padding: 7px 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  opacity: .48;
  cursor: grab;
  touch-action: none;
}
.network-status-drag-handle i {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #567267;
}
.network-status-drag-handle:hover,
.network-status-drag-handle:focus-visible,
.network-status-bar.is-dragging .network-status-drag-handle { opacity: .82; }
.network-status-bar.is-dragging .network-status-drag-handle { cursor: grabbing; }
.network-status-drag-handle:focus-visible {
  outline: 2px solid rgba(31, 150, 104, .45);
  outline-offset: 1px;
}
.network-status-bar:focus-visible {
  outline: 2px solid rgba(31, 150, 104, .52);
  outline-offset: 3px;
}
.network-status-bar button,
.network-status-bar a,
.network-status-bar input { touch-action: auto; }
.network-status-bar button:not(:disabled) { cursor: pointer; }
.network-status-bar .network-status-drag-handle { cursor: grab; }
.network-status-bar.is-dragging .network-status-drag-handle { cursor: grabbing; }
.network-points-balance {
  position: relative;
  order: 1;
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  min-height: 26px;
  padding: 0 7px;
  border-right: 1px solid rgba(195, 211, 202, .82);
  color: #146744;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  cursor: help;
}
.network-points-balance strong { font: inherit; font-weight: 800; }
.network-points-balance::after {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  z-index: 3;
  padding: 5px 8px;
  border: 1px solid rgba(200, 216, 207, .92);
  border-radius: 7px;
  color: #29483a;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 7px 20px rgba(14, 55, 36, .15);
  content: attr(data-tooltip);
  font-size: 10px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  translate: -50% -3px;
  transition: opacity .14s ease, translate .14s ease;
}
.network-points-balance:hover::after,
.network-points-balance:focus-visible::after {
  opacity: 1;
  translate: -50% 0;
}
.network-status-drag-handle { order: 0; }
.backend-request-status { order: 2; }
.network-status-item { order: 3; }
.chatgpt-worker-status { order: 4; }
.network-status-bar.is-collapsed { gap: 4px; }
.network-status-bar.is-collapsed .network-status-item { display: none; }
.network-status-bar.is-collapsed .backend-request-status {
  order: 1;
  padding-right: 7px;
}
.network-status-bar.is-collapsed .network-points-balance {
  order: 2;
  padding-right: 8px;
}
.network-status-bar.is-collapsed .chatgpt-worker-status {
  order: 3;
  border-left: 0;
  padding-left: 3px;
}
.network-status-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #41584c;
  background: #f3f7f5;
  font-size: 10px;
  white-space: nowrap;
}
.network-status-item i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a49c;
  box-shadow: 0 0 0 3px rgba(148, 164, 156, .14);
}
.network-status-item b { color: #203f30; font-size: 10px; }
.network-status-item em { color: #73827a; font-style: normal; }
.network-status-item[data-state="ready"] { color: #176b4d; background: #edf8f3; }
.network-status-item[data-state="ready"] i {
  background: #1f9668;
  box-shadow: 0 0 0 3px rgba(31, 150, 104, .16);
}
.network-status-item[data-state="checking"] i { animation: chatgpt-status-pulse 1.2s ease-in-out infinite; }
.network-status-item[data-state="warning"] { color: #835b0d; background: #fff7df; }
.network-status-item[data-state="warning"] i { background: #d3931a; }
.network-status-item[data-state="error"],
.network-status-item[data-state="unavailable"] { color: #9b2c27; background: #fff0ef; }
.network-status-item[data-state="error"] i,
.network-status-item[data-state="unavailable"] i { background: #cf4c45; }
.backend-request-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 0 10px 0 8px;
  border-right: 1px solid rgba(195, 211, 202, .82);
}
.backend-request-status-dot {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(100, 124, 112, .42);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .58), 0 0 8px rgba(72, 94, 83, .22);
  cursor: default;
  transition: box-shadow .16s ease, background .16s ease;
}
.backend-request-status-dot[data-state="running"] {
  border-color: #1a9365;
  background: #20a873;
  box-shadow: 0 0 0 3px rgba(32, 168, 115, .17), 0 0 10px rgba(22, 150, 101, .62);
  animation: chatgpt-worker-busy-pulse 1.35s ease-in-out infinite;
}
.backend-request-status-dot[data-state="queued"] {
  border-color: #c18a12;
  background: #e5aa25;
  box-shadow: 0 0 0 3px rgba(229, 170, 37, .18), 0 0 11px rgba(206, 145, 18, .65);
  animation: backend-request-queued-pulse 1.55s ease-in-out infinite;
}
.chatgpt-worker-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 0 9px;
  border-left: 1px solid rgba(195, 211, 202, .82);
}
.chatgpt-worker-status-dot {
  appearance: none;
  width: 10px;
  height: 10px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(100, 124, 112, .42);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .58), 0 0 8px rgba(72, 94, 83, .22);
  cursor: default;
  opacity: 1;
  transition: scale .16s ease, box-shadow .16s ease, background .16s ease;
}
.chatgpt-worker-status-dot:disabled { opacity: 1; }
.chatgpt-worker-status-dot[data-state="waiting"] {
  background: #d9e5df;
  border-color: #b7c9bf;
  box-shadow: none;
  cursor: default;
}
.chatgpt-order-worker-status-dot {
  width: 13px;
  height: 13px;
  margin-left: 2px;
}
.chatgpt-worker-status-dot[data-state="busy"] {
  border-color: #1a9365;
  background: #20a873;
  box-shadow: 0 0 0 3px rgba(32, 168, 115, .17), 0 0 10px rgba(22, 150, 101, .62);
  animation: chatgpt-worker-busy-pulse 1.35s ease-in-out infinite;
}
.chatgpt-worker-status-dot[data-state="error"] {
  border-color: #bd3833;
  background: #e24942;
  box-shadow: 0 0 0 3px rgba(226, 73, 66, .16), 0 0 11px rgba(205, 55, 49, .68);
  cursor: pointer;
}
.chatgpt-worker-status-dot[data-state="error"]:not(:disabled):hover { scale: 1.18; }
.chatgpt-worker-status-dot[data-state="error"]:not(:disabled):focus-visible {
  outline: 2px solid rgba(178, 45, 40, .58);
  outline-offset: 3px;
}
@keyframes chatgpt-worker-busy-pulse {
  0%, 100% { scale: .9; box-shadow: 0 0 0 3px rgba(32, 168, 115, .12), 0 0 7px rgba(22, 150, 101, .46); }
  50% { scale: 1.08; box-shadow: 0 0 0 4px rgba(32, 168, 115, .2), 0 0 13px rgba(22, 150, 101, .72); }
}
@keyframes backend-request-queued-pulse {
  0%, 100% { scale: .92; box-shadow: 0 0 0 3px rgba(229, 170, 37, .14), 0 0 8px rgba(206, 145, 18, .48); }
  50% { scale: 1.06; box-shadow: 0 0 0 4px rgba(229, 170, 37, .21), 0 0 13px rgba(206, 145, 18, .7); }
}
@keyframes chatgpt-status-pulse {
  0%, 100% { opacity: .42; scale: .84; }
  50% { opacity: 1; scale: 1.12; }
}

.startup-connectivity-overlay {
  position: fixed;
  z-index: 14000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 24, 17, .62);
  backdrop-filter: blur(5px);
}
.startup-connectivity-card {
  display: grid;
  justify-items: center;
  width: min(360px, calc(100vw - 36px));
  padding: 34px 30px 28px;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 19px;
  color: #1a3f2d;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 24px 80px rgba(3, 17, 10, .28);
  outline: none;
}
.startup-connectivity-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #dce9e2;
  border-top-color: #238b64;
  border-radius: 50%;
  animation: chatgpt-host-spin .85s linear infinite;
}
.startup-connectivity-card strong { margin-top: 18px; font-size: 18px; }
.startup-connectivity-card p { margin: 8px 0 0; color: #51665b; font-size: 12px; }
.startup-connectivity-card small { margin-top: 12px; color: #85958d; font-size: 10px; }

.login-session-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 14px;
  color: #8a9a91;
  font-size: 11px;
}
.login-session-divider::before,
.login-session-divider::after { content: ""; flex: 1; height: 1px; background: #e3ebe7; }
.chatgpt-session-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 45px;
  border: 1px solid #bfd3c8;
  border-radius: 11px;
  color: #174c37;
  background: #f6faf8;
  font-weight: 750;
}
.chatgpt-session-login:hover { border-color: #70a98d; background: #edf7f2; }
.chatgpt-session-login > span { font-size: 19px; }
.login-session-help { margin: 9px 4px 0; color: #7a8b82; font-size: 10px; line-height: 1.55; text-align: center; }

.chatgpt-bind-choice-card { margin-top: 8vh; }
.chatgpt-brand-mark { background: linear-gradient(145deg, #252a28, #101312); }
.chatgpt-bind-eyebrow {
  display: block;
  margin-top: 18px;
  color: #2a8060;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}
.chatgpt-bind-choice-card h1 { margin-top: 7px; }
.chatgpt-bind-choice-card .muted { line-height: 1.75; }
.chatgpt-bind-choice-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin: 22px 0 16px;
  padding: 10px 12px;
  border: 1px solid #dce8e1;
  border-radius: 11px;
  color: #50635a;
  background: #f5f9f7;
  font-size: 12px;
}
.chatgpt-bind-choice-summary i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #799086;
  animation: chatgpt-status-pulse 1.2s ease-in-out infinite;
}
.chatgpt-bind-choice-summary[data-state="ready"] i { background: #1d9567; animation: none; }
.chatgpt-bind-choice-summary[data-state="warning"] i { background: #d3931a; animation: none; }
.chatgpt-bind-choice-summary[data-state="error"] i { background: #c84640; animation: none; }
.chatgpt-bind-choice-actions { display: grid; gap: 9px; }
.chatgpt-bind-choice-actions button {
  min-height: 45px;
  border-radius: 11px;
  font-weight: 750;
}
#chatgpt-bind-start { border: 0; color: white; background: #176b4d; }
#chatgpt-bind-start:hover { background: #0f513a; }
.chatgpt-bind-skip-secondary { border: 1px solid #d3dfd9; color: #52655b; background: white; }
.chatgpt-bind-skip-secondary:hover { background: #f4f7f5; }

.chatgpt-bind-view {
  display: grid;
  grid-template-rows: 68px minmax(0, 1fr) auto;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #eaf0ed;
}
.chatgpt-bind-header {
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid #d7e1dc;
  background: rgba(255, 255, 255, .97);
}
.chatgpt-bind-brand { display: flex; align-items: center; gap: 11px; }
.chatgpt-bind-brand strong,
.chatgpt-bind-brand small { display: block; }
.chatgpt-bind-brand strong { color: #173c2b; font-size: 14px; }
.chatgpt-bind-brand small { margin-top: 3px; color: #7a8c82; font-size: 10px; }
.chatgpt-bind-recovery-actions { display: flex; align-items: center; gap: 7px; }
.chatgpt-bind-recovery {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #cedbd4;
  border-radius: 9px;
  color: #315447;
  background: #f4f8f6;
  font-size: 11px;
  font-weight: 700;
}
.chatgpt-bind-recovery:hover { border-color: #72a78d; background: #edf7f2; }
.chatgpt-bind-recovery.danger { color: #9a3e37; border-color: #e5c8c5; background: #fff7f6; }
.chatgpt-bind-recovery.danger:hover { border-color: #d69791; background: #fff0ee; }
.chatgpt-bind-recovery:disabled { cursor: wait; opacity: .58; }
.chatgpt-bind-skip {
  min-width: 76px;
  min-height: 36px;
  border: 1px solid #cbd8d1;
  border-radius: 10px;
  color: #41574b;
  background: white;
  font-weight: 700;
}
.chatgpt-bind-skip:hover { color: #176b4d; border-color: #72a78d; background: #f0f8f4; }
.chatgpt-bind-main { min-height: 0; padding: 14px 18px 0; }
.chatgpt-host-slot {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid #cedbd4;
  border-radius: 15px;
  background: #f7faf8;
  box-shadow: 0 12px 38px rgba(21, 63, 43, .08);
}
.chatgpt-host-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 30px;
  color: #52645b;
  text-align: center;
}
.chatgpt-host-placeholder strong { margin-top: 15px; color: #294a3a; font-size: 15px; }
.chatgpt-host-placeholder p { max-width: 480px; margin: 7px 0 0; color: #7a8b82; font-size: 11px; line-height: 1.6; }
.chatgpt-host-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #dce7e1;
  border-top-color: #238b64;
  border-radius: 50%;
  animation: chatgpt-host-spin .85s linear infinite;
}
@keyframes chatgpt-host-spin { to { rotate: 360deg; } }
.chatgpt-bind-footer {
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 390px) auto;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 12px 20px;
  border-top: 1px solid #d7e1dc;
  background: white;
}
.chatgpt-bind-session-state { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chatgpt-bind-session-state > i {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #86978e;
  animation: chatgpt-status-pulse 1.2s ease-in-out infinite;
}
.chatgpt-bind-session-state > i[data-state="ready"] { background: #1d9567; animation: none; }
.chatgpt-bind-session-state > i[data-state="error"] { background: #cc4b45; animation: none; }
.chatgpt-bind-session-state strong,
.chatgpt-bind-session-state small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatgpt-bind-session-state strong { color: #2f493c; font-size: 12px; }
.chatgpt-bind-session-state small { margin-top: 3px; color: #7b8c83; font-size: 10px; }
.chatgpt-bind-password-field { gap: 4px; margin: 0; font-size: 10px; }
.chatgpt-bind-password-field input { height: 39px; padding: 8px 11px; }
.chatgpt-bind-confirm {
  min-width: 150px;
  min-height: 42px;
  padding: 0 17px;
  border: 0;
  border-radius: 11px;
  color: white;
  background: #176b4d;
  font-weight: 750;
}
.chatgpt-bind-confirm:hover { background: #0f513a; }
.chatgpt-bind-confirm:disabled { cursor: wait; }
.chatgpt-bind-footer > .error { grid-column: 1 / -1; min-height: 0; margin: -6px 0 0; font-size: 11px; }

.workspace-chat-flyout { position: relative; }
.workspace-chat-submenu {
  position: absolute;
  z-index: 230;
  top: 0;
  left: calc(100% + 7px);
  display: grid;
  width: 230px;
  gap: 5px;
  padding: 7px;
  border: 1px solid #d9e4de;
  border-radius: 12px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 16px 42px rgba(8, 35, 23, .24);
  opacity: 0;
  pointer-events: none;
  translate: -8px 0;
  visibility: hidden;
  transition: opacity .15s ease, translate .18s ease, visibility 0s linear .18s;
}
.workspace-chat-flyout:hover .workspace-chat-submenu,
.workspace-chat-flyout:focus-within .workspace-chat-submenu {
  opacity: 1;
  pointer-events: auto;
  translate: 0 0;
  visibility: visible;
  transition-delay: 0s;
}
.workspace-chat-submenu button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 54px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  color: #30483b;
  background: transparent;
  text-align: left;
}
.workspace-chat-submenu button:hover,
.workspace-chat-submenu button.active { color: #0f6848; background: #edf7f2; }
.workspace-chat-submenu button > span:first-child {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #e4f0ea;
  font-size: 17px;
}
.workspace-chat-submenu strong,
.workspace-chat-submenu small { display: block; }
.workspace-chat-submenu strong { font-size: 13px; }
.workspace-chat-submenu small { margin-top: 3px; color: #7b8b83; font-size: 10px; }
.workspace-chat-submenu button[aria-disabled="true"] {
  color: #a13b35;
  background: #fff3f2;
  cursor: not-allowed;
}
.workspace-chat-submenu button[aria-disabled="true"] > span:first-child { color: #aa3f38; background: #ffe3e0; }
.workspace-chat-submenu button[aria-disabled="true"] small { color: #b74a44; }
.chatgpt-official-sidebar { display: flex; flex-direction: column; gap: 12px; }
.chatgpt-official-side-card {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 13px;
  color: #eaf4ef;
  background: rgba(255, 255, 255, .06);
}
.chatgpt-official-side-card > span { font-size: 24px; }
.chatgpt-official-side-card strong { font-size: 13px; }
.chatgpt-official-side-card p { margin: 0; color: #acc1b6; font-size: 10px; line-height: 1.65; }
.chatgpt-official-diagnostics {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(127, 230, 183, .16);
  border-radius: 12px;
  background: rgba(7, 18, 13, .38);
}
.chatgpt-official-diagnostics > div:not(.chatgpt-official-diagnostic-actions) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #92a99d;
  font-size: 10px;
}
.chatgpt-official-diagnostics > div > strong { color: #d8e7df; font-size: 10px; text-align: right; }
.chatgpt-official-diagnostic-actions { display: grid; grid-template-columns: 1fr; gap: 6px; }
.chatgpt-official-diagnostic-actions .secondary {
  width: 100%;
  min-height: 30px;
  margin: 0;
  padding: 6px 8px;
  font-size: 10px;
}
.chatgpt-official-diagnostic-actions .secondary:disabled { cursor: wait; opacity: .58; }
.chatgpt-official-diagnostics > p {
  min-height: 2.8em;
  margin: 0;
  color: #7f988b;
  font-size: 9px;
  line-height: 1.45;
}
.chatgpt-official-sidebar > .secondary { margin-top: auto; }
.chatgpt-bind-network-settings {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #cedbd4;
  border-radius: 9px;
  color: #315447;
  background: #f4f8f6;
  font-weight: 700;
}
.chatgpt-network-modal {
  position: fixed;
  z-index: 1300;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 18, 13, .66);
  backdrop-filter: blur(5px);
}
.chatgpt-network-modal > section {
  width: min(540px, calc(100vw - 36px));
  padding: 22px;
  border: 1px solid #d8e4dd;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(5, 24, 15, .28);
}
.chatgpt-network-modal header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.chatgpt-network-modal header span { color: #44836b; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.chatgpt-network-modal h2 { margin: 3px 0 0; color: #24392e; font-size: 20px; }
.chatgpt-network-modal header > button {
  width: 34px; height: 34px; padding: 0; border-radius: 50%; color: #5e7268; background: #edf3f0;
}
.chatgpt-network-modal > section > p { color: #60756a; font-size: 12px; line-height: 1.55; }
.chatgpt-network-modal fieldset { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; padding: 12px; border: 1px solid #dbe5df; border-radius: 12px; }
.chatgpt-network-modal legend { padding: 0 5px; color: #5b7165; font-size: 11px; font-weight: 750; }
.chatgpt-network-modal fieldset label { display: flex; align-items: center; gap: 5px; color: #344b3f; font-size: 11px; }
#chatgpt-network-proxy-field { display: grid; gap: 6px; margin-top: 14px; }
#chatgpt-network-proxy-field > span { color: #33493e; font-size: 11px; font-weight: 750; }
#chatgpt-network-proxy-url { min-height: 40px; padding: 8px 11px; border: 1px solid #cad9d1; border-radius: 10px; }
#chatgpt-network-proxy-field > small { color: #7b8d84; font-size: 9px; line-height: 1.5; }
.chatgpt-network-settings-state { min-height: 18px; margin: 12px 0; color: #5c7166; }
.chatgpt-network-settings-state.is-error { color: #aa3f38; }
.chatgpt-network-modal-actions { display: flex; justify-content: flex-end; gap: 9px; }
.chatgpt-network-modal-actions button { min-height: 38px; padding: 8px 15px; border-radius: 10px; }
.chatgpt-network-modal-actions #chatgpt-network-save { color: #fff; background: #176b4d; }
body.chatgpt-network-modal-open { overflow: hidden; }
.chatgpt-official-workspace { display: grid; grid-template-rows: auto minmax(0, 1fr); background: #edf2ef; }
.chatgpt-official-workspace > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: white;
}
.chatgpt-official-workspace > header > div { display: flex; align-items: center; gap: 10px; }
.chatgpt-official-workspace > header h2 { margin: 0; }
.chatgpt-official-workspace > header p { margin: 0; color: #788a80; font-size: 10px; }
.chatgpt-official-badge { color: #e7f4ee; background: #18231e; }
.chatgpt-official-host-slot { min-height: 0; border: 0; border-radius: 0; box-shadow: none; }

@media (max-width: 980px) {
  .network-status-bar { top: 8px; }
  .network-status-item b { display: none; }
  .chatgpt-bind-footer { grid-template-columns: minmax(180px, 1fr) minmax(230px, 1fr); }
  .chatgpt-bind-confirm { grid-column: 2; }
  .chatgpt-bind-footer > .error { grid-row: 3; }
}
@media (max-width: 700px) {
  .network-status-bar { right: 8px; left: auto; translate: 0 0; }
  .network-status-item { padding: 0 7px; }
  .network-status-item em { max-width: 78px; overflow: hidden; text-overflow: ellipsis; }
  .chatgpt-bind-footer { grid-template-columns: 1fr; }
  .chatgpt-bind-confirm { grid-column: auto; }
  .chatgpt-bind-recovery-actions { gap: 4px; }
  .chatgpt-bind-recovery { padding-inline: 7px; font-size: 10px; }
  .chatgpt-official-workspace > header p { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .network-status-item i,
  .backend-request-status-dot,
  .chatgpt-worker-status-dot,
  .chatgpt-bind-choice-summary i,
  .chatgpt-bind-session-state > i,
  .chatgpt-host-spinner,
  .startup-connectivity-spinner { animation: none; }
}

/* A single translucent preview follows intentional in-app file and material drags. */
.app-drag-ghost {
  position: fixed;
  z-index: 19950;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  width: max-content;
  min-width: 190px;
  max-width: min(320px, calc(100vw - 24px));
  min-height: 78px;
  padding: 8px 14px 8px 8px;
  overflow: visible;
  border: 1px solid rgba(79, 178, 130, .72);
  border-radius: 13px;
  color: #173a2b;
  background: rgba(250, 254, 252, .97);
  box-shadow: 0 18px 42px rgba(4, 30, 18, .3), 0 3px 10px rgba(12, 91, 58, .2), inset 0 1px 0 rgba(255, 255, 255, .92);
  opacity: 1;
  pointer-events: none;
  user-select: none;
  backdrop-filter: blur(8px) saturate(1.04);
  transform-origin: 18px 18px;
  will-change: transform;
  contain: layout style;
  isolation: isolate;
  animation: app-drag-ghost-in .14s cubic-bezier(.2, .85, .28, 1.2);
}
.app-drag-ghost::before,
.app-drag-ghost::after {
  position: absolute;
  z-index: -1;
  inset: 4px -5px -5px 5px;
  border: 1px solid rgba(87, 171, 132, .26);
  border-radius: inherit;
  background: rgba(239, 249, 244, .52);
  content: "";
}
.app-drag-ghost::after {
  inset: 8px -9px -9px 9px;
  opacity: .48;
}
.app-drag-ghost-media {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  width: 94px;
  height: 64px;
  overflow: hidden;
  border: 1px solid rgba(53, 115, 84, .22);
  border-radius: 9px;
  background: #102019;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  place-items: stretch;
}
.app-drag-ghost-media.has-frame-strip { width: 138px; }
.app-drag-ghost-media img,
.app-drag-ghost-media canvas {
  display: block;
  width: 100%;
  min-width: 0;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
}
.app-drag-ghost-kind {
  display: grid;
  width: 100%;
  height: 100%;
  color: #dff8eb;
  background: linear-gradient(145deg, #2a8b65, #15533b);
  font-size: 24px;
  font-weight: 850;
  place-items: center;
}
.app-drag-ghost-copy {
  display: grid;
  min-width: 0;
  max-width: 160px;
  gap: 6px;
}
.app-drag-ghost-copy strong,
.app-drag-ghost-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-drag-ghost-copy strong {
  color: #183c2c;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}
.app-drag-ghost-copy small {
  color: #50645a;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.25;
}
.app-drag-ghost-badge {
  position: absolute;
  top: -8px;
  right: -7px;
  display: grid;
  min-width: 38px;
  height: 22px;
  padding: 0 8px;
  border: 2px solid rgba(249, 255, 252, .92);
  border-radius: 999px;
  color: #effff7;
  background: #126746;
  box-shadow: 0 5px 13px rgba(5, 53, 32, .25);
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
  place-items: center;
}
.app-drag-ghost.is-blocked {
  border-color: rgba(171, 79, 75, .7);
  filter: grayscale(.64) saturate(.55);
  opacity: .9;
}
.app-drag-ghost.is-blocked .app-drag-ghost-badge { background: #a44843; }
.app-drag-ghost-parameter {
  min-width: 142px;
  min-height: 52px;
}
.app-drag-ghost-parameter .app-drag-ghost-media {
  width: 38px;
  height: 38px;
}
.app-drag-ghost.is-native-snapshot {
  top: -1000px;
  left: -1000px;
  opacity: 1;
  animation: none;
  transform: none !important;
}
@keyframes app-drag-ghost-in {
  from { opacity: 0; scale: .9; }
  to { scale: 1; }
}

/* Shared feedback for every current and dynamically-created interactive button. */
.ui-button-feedback:not(:disabled):not([aria-disabled="true"]):not([data-disabled="true"]):not(.disabled) {
  -webkit-tap-highlight-color: transparent;
  transition-property: color, background-color, border-color, box-shadow, filter, translate, scale;
  transition-duration: .16s, .16s, .16s, .18s, .18s, .2s, .2s;
  transition-timing-function: ease, ease, ease, ease, ease,
    cubic-bezier(.2, .9, .25, 1.3), cubic-bezier(.2, .9, .25, 1.3);
}

@media (hover: hover) and (pointer: fine) {
  .ui-button-feedback:not(:disabled):not([aria-disabled="true"]):not([data-disabled="true"]):not(.disabled):hover {
    translate: 0 -2px;
    scale: 1.015;
    filter: brightness(1.055) saturate(1.04)
      drop-shadow(0 7px 9px rgba(13, 81, 57, .18));
  }
}

.ui-button-feedback:not(:disabled):not([aria-disabled="true"]):not([data-disabled="true"]):not(.disabled):active,
.ui-button-feedback.ui-button-feedback-keypress:not(:disabled):not([aria-disabled="true"]):not([data-disabled="true"]):not(.disabled) {
  translate: 0 0;
  scale: .965;
  filter: brightness(.97) saturate(1.02)
    drop-shadow(0 2px 3px rgba(13, 81, 57, .12));
  transition-duration: .07s;
}

.ui-button-feedback-positioned { position: relative; }
.ui-button-feedback-rippling {
  overflow: hidden;
  isolation: isolate;
}
.ui-button-ripple {
  position: absolute;
  z-index: 10;
  display: block;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle,
    rgba(255, 255, 255, .75) 0%,
    rgba(143, 235, 195, .42) 34%,
    rgba(23, 107, 77, .08) 58%,
    rgba(23, 107, 77, 0) 72%);
  opacity: 0;
  scale: .12;
  animation: ui-button-ripple .56s cubic-bezier(.16, .75, .24, 1) forwards;
}

@keyframes ui-button-ripple {
  0% { opacity: .85; scale: .12; }
  68% { opacity: .4; }
  100% { opacity: 0; scale: 1; }
}

.ui-button-feedback:is(:disabled, [aria-disabled="true"], [data-disabled="true"], .disabled) {
  translate: none;
  scale: 1;
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  .app-drag-ghost { animation: none; }
  .ui-button-feedback,
  .ui-button-feedback:hover,
  .ui-button-feedback:active {
    translate: none;
    scale: 1;
    filter: none;
    transition: color .01ms, background-color .01ms, border-color .01ms;
  }
  .ui-button-ripple { display: none; animation: none; }
}

/* Server-controlled Windows client update prompt shared by web and desktop. */
.client-update-modal {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 24, 17, .68);
  backdrop-filter: blur(8px) saturate(.75);
}
.client-update-modal.hidden { display: none; }
.client-update-card {
  width: min(470px, 100%);
  padding: 30px;
  border: 1px solid rgba(172, 211, 193, .75);
  border-radius: 22px;
  outline: none;
  color: #263b31;
  background:
    radial-gradient(circle at 100% 0, rgba(118, 211, 169, .2), transparent 40%),
    #fbfdfc;
  box-shadow: 0 28px 80px rgba(2, 20, 12, .34);
  animation: client-update-card-in .24s cubic-bezier(.2, .82, .28, 1);
}
.client-update-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(145deg, #1c8b62, #0b5c3d);
  box-shadow: 0 12px 25px rgba(20, 113, 77, .25);
}
.client-update-mark span { font-size: 16px; font-weight: 850; letter-spacing: .02em; }
.client-update-copy { margin-top: 20px; }
.client-update-eyebrow {
  color: #28815f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
}
.client-update-copy h2 { margin: 7px 0 9px; font-size: 23px; line-height: 1.3; }
.client-update-copy p { margin: 0; color: #5e7167; font-size: 13px; line-height: 1.75; white-space: pre-line; }
.client-update-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.client-update-meta span {
  padding: 6px 10px;
  border: 1px solid #dce9e2;
  border-radius: 999px;
  color: #496156;
  background: rgba(237, 246, 241, .8);
  font-size: 10px;
  font-weight: 700;
}
.client-update-card footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.client-update-card footer button {
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 750;
}
.client-update-later { color: #50665b; background: #edf3f0; }
.client-update-download {
  color: #fff;
  background: linear-gradient(135deg, #1a805b, #0d6544);
  box-shadow: 0 9px 20px rgba(20, 112, 76, .22);
}
.client-update-download:disabled { cursor: wait; opacity: .65; }
@keyframes client-update-card-in {
  from { opacity: 0; translate: 0 12px; scale: .97; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}
@media (max-width: 520px) {
  .client-update-modal { padding: 16px; }
  .client-update-card { padding: 24px 20px; border-radius: 18px; }
  .client-update-card footer { display: grid; grid-template-columns: 1fr; }
  .client-update-download { grid-row: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .client-update-card { animation: none; }
}
.order-automation-workspace {
  min-height: 100%;
  overflow: auto;
  background:
    radial-gradient(circle at 92% 4%, rgba(23, 123, 88, 0.09), transparent 28rem),
    #f4f7f5;
  color: #14251f;
}

.order-automation-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 32px clamp(24px, 4vw, 52px) 22px;
  border-bottom: 1px solid #dce7e1;
  background: rgba(255, 255, 255, 0.82);
}

.order-automation-header h2 {
  margin: 6px 0 8px;
  font-size: clamp(25px, 2.6vw, 36px);
  line-height: 1.15;
}

.order-automation-header p {
  max-width: 760px;
  margin: 0;
  color: #60736b;
  line-height: 1.7;
}

.order-automation-policy {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2px 9px;
  flex: 0 0 auto;
  min-width: 230px;
  padding: 13px 16px;
  border: 1px solid #cde2d8;
  border-radius: 14px;
  background: #f2faf6;
}

.order-automation-policy > span {
  grid-row: 1 / 3;
  color: #19845e;
  filter: drop-shadow(0 0 5px rgba(25, 132, 94, 0.45));
}

.order-automation-policy strong { font-size: 14px; }
.order-automation-policy small { color: #667970; }

.order-automation-canvas {
  display: grid;
  gap: 16px;
  width: min(1160px, calc(100% - 48px));
  margin: 24px auto 48px;
}

.order-automation-card {
  padding: 22px;
  border: 1px solid #dce7e1;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(26, 64, 49, 0.06);
}

.order-automation-section-heading,
.order-automation-section-heading > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-automation-section-heading { margin-bottom: 16px; }
.order-automation-section-heading h3 { margin: 0; font-size: 18px; }
.order-automation-section-heading > span { color: #657970; font-size: 13px; }

.order-automation-status[data-state="working"] { color: #0b7751; }
.order-automation-status[data-state="error"] { color: #b13631; }
.order-automation-status[data-state="paused"] { color: #98700a; }

.order-automation-dropzone {
  display: grid;
  place-items: center;
  gap: 7px;
  width: 100%;
  min-height: 150px;
  padding: 24px;
  border: 1.5px dashed #9fc7b5;
  border-radius: 15px;
  color: #183c30;
  background: #f5fbf8;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.order-automation-dropzone:hover,
.order-automation-dropzone.drag-active {
  border-color: #177a56;
  background: #edf8f2;
  transform: translateY(-1px);
}

.order-automation-dropzone small { color: #71837b; }
.order-automation-upload-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #fff;
  background: #177a56;
  font-weight: 800;
}

.order-automation-upload-actions {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 14px;
}

.order-automation-upload-actions small { color: #71837b; }

.order-automation-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.order-automation-summary article {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 92px;
  padding: 18px;
  border: 1px solid #d8e7df;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #f2f8f5);
}

.order-automation-summary span { color: #6b7f76; }
.order-automation-summary strong { font-size: 30px; color: #116d4d; }

.order-automation-warnings { border-color: #ead9aa; background: #fffdf6; }
.order-automation-warning-list { display: grid; gap: 8px; }
.order-automation-warning-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #735b18;
  background: #fff7dd;
  line-height: 1.5;
}
.order-automation-warning-item.blocking { color: #963f36; background: #fff0ed; }
.order-automation-confirm {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 15px;
  color: #554715;
  cursor: pointer;
}
.order-automation-confirm input { accent-color: #177a56; }

.order-automation-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8efeb;
}
.order-automation-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1aa875, #0d7552);
  transition: width 220ms ease;
}

.order-automation-workers {
  display: grid;
  grid-template-columns: minmax(260px, 1fr);
  gap: 10px;
  margin: 17px 0;
}

.order-worker-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 9px;
  min-width: 0;
  padding: 13px;
  border: 1px solid #dbe7e1;
  border-radius: 13px;
  background: #f8fbf9;
}
.order-worker-light {
  grid-row: 1 / 3;
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border: 2px solid #cbd8d2;
  border-radius: 50%;
  background: #fff;
}
.order-worker-card.working .order-worker-light { border-color: #23a977; background: #23a977; box-shadow: 0 0 8px #23a977; }
.order-worker-card.cooling .order-worker-light { border-color: #e2ad2f; background: #e2ad2f; box-shadow: 0 0 8px rgba(226,173,47,.65); }
.order-worker-card.error .order-worker-light { border-color: #d54b44; background: #d54b44; box-shadow: 0 0 8px rgba(213,75,68,.65); }
.order-worker-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.order-worker-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #6f8179; }

.order-automation-live-panel {
  margin: 14px 0 17px;
  overflow: hidden;
  border: 1px solid #d9e6df;
  border-radius: 14px;
  background: #f8fbf9;
}
.order-automation-live-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
  border-bottom: 1px solid #e1ebe6;
  background: #eff7f3;
}
.order-automation-live-heading strong { color: #154f3b; font-size: 13px; }
.order-automation-live-heading span { color: #657970; font-size: 12px; }
.order-automation-live-log {
  min-height: 96px;
  max-height: 260px;
  overflow: auto;
  padding: 12px 14px;
  color: #354b42;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.order-automation-live-log p { margin: 0 0 9px; }
.order-automation-live-log p:last-child { margin-bottom: 0; }
.order-automation-live-log time { margin-right: 8px; color: #789087; font-size: 11px; }

.order-automation-task-groups {
  display: grid;
  gap: 8px;
  max-height: 380px;
  overflow: auto;
  padding-right: 3px;
}
.order-task-group {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(160px, 1fr) minmax(130px, .8fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #e0e9e4;
  border-radius: 12px;
}
.order-task-group strong,
.order-task-group span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-task-group span { color: #64766e; font-size: 13px; }
.order-task-group em { color: #117453; font-style: normal; font-weight: 700; }
.order-automation-empty { padding: 28px; text-align: center; color: #74857d; }

.order-automation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.order-danger-action { color: #a8322d !important; border-color: #e6b8b3 !important; }
.order-download-action { display: inline-grid; place-items: center; text-decoration: none; }
.order-automation-footnote { margin: 12px 0 0; color: #73847c; font-size: 12px; }

@media (max-width: 920px) {
  .order-automation-header { flex-direction: column; }
  .order-automation-policy { width: 100%; }
  .order-automation-summary,
  .order-automation-workers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-task-group { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .order-automation-canvas { width: min(100% - 24px, 1160px); }
  .order-automation-summary,
  .order-automation-workers,
  .order-task-group { grid-template-columns: 1fr; }
  .order-automation-upload-actions { align-items: flex-start; flex-direction: column; }
}
/* logo加工：本地图像擦除与logo图层编辑 */
.logo-processing-workspace {
  position: relative;
  min-height: 100%;
  padding: 30px 34px 34px;
  overflow: auto;
  background:
    radial-gradient(circle at 92% 4%, rgba(33, 150, 105, .09), transparent 25%),
    #f5f8f6;
}

.logo-processing-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.logo-processing-header h2 {
  margin: 4px 0 8px;
  font-size: 30px;
  color: #10251d;
}

.logo-processing-header p {
  max-width: 720px;
  margin: 0;
  color: #60726b;
  line-height: 1.65;
}

.logo-remove-header-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.logo-remove-header-actions .local-image-transport {
  min-width: 238px;
}

.logo-capability-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid #d8e4de;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: #63736d;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(31, 62, 50, .06);
}

.logo-capability-badge i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #aebcb6;
  box-shadow: 0 0 0 5px rgba(174, 188, 182, .14);
}

.logo-capability-badge[data-state="ready"] { color: #147653; }
.logo-capability-badge[data-state="ready"] i {
  background: #20ad78;
  box-shadow: 0 0 0 5px rgba(32, 173, 120, .15), 0 0 14px rgba(32, 173, 120, .45);
}
.logo-capability-badge[data-state="error"] { color: #b03939; border-color: #f0cece; }
.logo-capability-badge[data-state="error"] i { background: #d14848; }

.logo-remove-shell,
.logo-add-intro {
  min-height: calc(100vh - 215px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.logo-upload-zone {
  flex: 1;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  border: 1.5px dashed #a9c5b9;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(239, 247, 243, .9));
  color: #25483b;
  cursor: pointer;
  transition: min-height .25s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.logo-upload-zone:hover,
.logo-upload-zone.dragging {
  border-color: #15805a;
  box-shadow: 0 18px 50px rgba(35, 100, 76, .12);
  transform: translateY(-1px);
}

.logo-upload-zone:disabled { cursor: not-allowed; opacity: .58; transform: none; }
.logo-upload-zone.compact { flex: none; min-height: 112px; flex-direction: row; }
.logo-upload-zone strong { font-size: 19px; }
.logo-upload-zone small { color: #778a82; }

.logo-upload-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(145deg, #1d9c70, #126345);
  box-shadow: 0 12px 28px rgba(20, 116, 81, .22);
}

.logo-remove-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--logo-remove-column-width, 208px);
  gap: 16px;
  width: max-content;
  min-width: 100%;
  padding: 4px 2px 10px;
}

.logo-remove-comparison { --logo-remove-column-width: clamp(180px, 17vw, 224px); min-width: 0; }
.logo-remove-comparison .logo-remove-lane-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; min-height: 0; padding: 0; border: 0; margin: 4px 2px 10px; color: #244c3c; }
.logo-remove-lane-heading strong { font-size: 17px; white-space: nowrap; }
.logo-remove-lane-heading > span { color: #73867c; font-size: 12px; text-align: right; }
.logo-remove-scroll { width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; cursor: grab; scrollbar-width: thin; scrollbar-color: #a6bfb3 transparent; margin-bottom: 18px; }
.logo-remove-scroll:focus-visible { outline: 2px solid #20946d; outline-offset: 3px; border-radius: 12px; }
.logo-remove-scroll.is-dragging, .logo-remove-scroll.is-dragging * { cursor: grabbing !important; user-select: none; }
.logo-remove-scroll img { user-select: none; -webkit-user-drag: none; }
.logo-remove-result { min-width: 0; padding: 9px; border: 1px solid #d9e5df; border-radius: 17px; background: #f7fbf8; }
.logo-remove-result-preview { display: block; width: 100%; padding: 0; border: 0; border-radius: 12px; background: transparent; cursor: zoom-in; }
.logo-remove-result-preview:hover { box-shadow: 0 0 0 2px #8fbaa6; }
.logo-remove-result-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; aspect-ratio: 4 / 3; border: 1px dashed #cfdfd6; border-radius: 12px; color: #95aaa0; background: #edf4ef; }
.logo-remove-result-placeholder > span { font-size: 30px; font-weight: 600; opacity: .7; }
.logo-remove-result-placeholder small { max-width: 90%; text-align: center; line-height: 1.5; font-size: 12px; }
.logo-remove-result-caption { display: grid; gap: 5px; padding: 10px 4px 4px; font-size: 13px; color: #375d4b; }
.logo-remove-result-caption > small { color: #789084; font-size: 12px; }
.logo-remove-result-caption .logo-remove-error { color: #aa5547; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.logo-remove-result.is-failed { border-color: #e6c5ba; }
.logo-remove-result.is-pending { border-color: #9fceba; }
.logo-remove-spinner { width: 22px; height: 22px; border: 2px solid #d3e6dc; border-top-color: #22845c; border-radius: 50%; animation: logoSpin .8s linear infinite; }
.logo-remove-dropzone.compact { min-height: 76px; }
.logo-remove-comparison .logo-remove-thumb,
.logo-remove-comparison .logo-remove-result-placeholder { height: clamp(112px, 15vh, 150px); aspect-ratio: auto; }
.logo-remove-shell { min-height: 0; }
.logo-remove-shell .logo-processing-footer { position: static; flex-wrap: wrap; padding: 4px 0 0; background: none; }
.logo-remove-shell .logo-processing-footer > button { flex: 0 0 auto; width: auto; min-height: 42px; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .logo-remove-card { transition: none; }
  .logo-remove-spinner { animation-duration: 2s; }
}

.logo-remove-card {
  position: relative;
  min-width: 0;
  padding: 9px;
  border: 1px solid #dce6e1;
  border-radius: 17px;
  background: #fff;
  text-align: left;
  color: #263c34;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.logo-remove-card:hover { transform: translateY(-2px); border-color: #85b9a4; box-shadow: 0 13px 28px rgba(34, 69, 56, .1); }
.logo-remove-thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 12px; background: #edf2ef; }
.logo-remove-thumb img { width: 100%; height: 100%; object-fit: contain; }
.logo-remove-card > span:last-of-type { display: grid; gap: 3px; padding: 10px 4px 4px; }
.logo-remove-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo-remove-card small { color: #7a8b84; }

.logo-remove-card.processed {
  border-color: rgba(31, 180, 124, .75);
  animation: logoProcessedPulse 2.8s ease-in-out infinite;
}

.logo-processed-mark {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  background: #16a46f;
  box-shadow: 0 0 0 5px rgba(22, 164, 111, .17);
  font-style: normal;
}

@keyframes logoProcessedPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(28, 185, 127, .08), 0 10px 24px rgba(29, 94, 69, .06); }
  50% { box-shadow: 0 0 0 6px rgba(28, 185, 127, .2), 0 16px 34px rgba(29, 94, 69, .14); }
}

.logo-processing-footer {
  position: sticky;
  bottom: -34px;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 0 0;
  background: linear-gradient(transparent, #f5f8f6 25%);
}

.logo-remove-editor {
  position: absolute;
  z-index: 80;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: #191d1b;
  color: #fff;
}

.logo-remove-editor > header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  background: #202522;
}

.logo-remove-editor > header > div:first-child { display: grid; gap: 3px; }
.logo-remove-editor > header small { color: #9eaaa4; }
.logo-remove-editor-actions { display: flex; align-items: center; gap: 9px; }
.logo-remove-editor-actions label { display: flex; align-items: center; gap: 8px; color: #cbd3cf; font-size: 13px; }
.logo-remove-editor-actions input { width: 110px; accent-color: #23a978; }

.logo-remove-stage {
  position: relative;
  flex: 1;
  min-height: 520px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 28px;
  background-color: #171b19;
  background-image: linear-gradient(45deg, #202622 25%, transparent 25%), linear-gradient(-45deg, #202622 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #202622 75%), linear-gradient(-45deg, transparent 75%, #202622 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}

.logo-remove-stage canvas {
  grid-area: 1 / 1;
  display: block;
  max-width: calc(100vw - 390px);
  max-height: calc(100vh - 190px);
  width: auto;
  height: auto;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .42);
}
.logo-remove-stage #logo-remove-mask-canvas { z-index: 2; cursor: none; box-shadow: none; touch-action: none; }
.logo-remove-brush {
  position: absolute;
  z-index: 4;
  display: none;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background: rgba(31, 192, 126, .12);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .7), 0 0 16px rgba(31, 192, 126, .36);
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.logo-remove-brush.visible { display: block; }
.logo-remove-busy {
  position: absolute;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: 14px;
  background: rgba(13, 25, 20, .9);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .3);
}
.logo-remove-busy i { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .25); border-top-color: #28bf87; border-radius: 50%; animation: logoSpin .8s linear infinite; }
@keyframes logoSpin { to { transform: rotate(360deg); } }

.logo-add-intro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
}
.logo-add-intro-thumb { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid #d9e4df; border-radius: 13px; background: #fff; }
.logo-add-intro-thumb img { width: 100%; height: 100%; object-fit: cover; }
.logo-add-intro-thumb i { position: absolute; right: 6px; bottom: 6px; min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 5px; border-radius: 999px; background: rgba(8, 43, 31, .78); color: #fff; font-size: 11px; font-style: normal; }
.logo-add-start { width: 100%; min-height: 52px; font-size: 16px; }

.logo-add-editor {
  min-height: calc(100vh - 215px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 16px;
}
.logo-compose-panel,
.logo-picker-panel {
  min-width: 0;
  border: 1px solid #d9e5df;
  border-radius: 20px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 45px rgba(30, 64, 50, .08);
}
.logo-compose-panel { display: flex; flex-direction: column; padding: 14px; }
.logo-compose-toolbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding-bottom: 12px; }
.logo-compose-toolbar > div { display: flex; gap: 8px; }
.logo-compose-toolbar > button { justify-self: end; }
.logo-compose-toolbar > span { color: #6f8279; font-weight: 700; }
.logo-compose-navigator { flex: 1; min-height: 520px; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 10px; }
.logo-compose-navigator > button { width: 42px; height: 72px; border: 1px solid #d5e1db; border-radius: 14px; background: #f3f7f5; color: #1e5b43; font-size: 34px; cursor: pointer; }
.logo-compose-navigator > button:hover { border-color: #6ca88f; background: #e9f4ef; }

.logo-compose-stage {
  --logo-image-ratio: 1 / 1;
  position: relative;
  width: 100%;
  max-height: calc(100vh - 310px);
  aspect-ratio: var(--logo-image-ratio);
  justify-self: center;
  overflow: hidden;
  border-radius: 8px;
  background: #e6ece9;
  box-shadow: 0 14px 36px rgba(18, 42, 33, .16);
  user-select: none;
}
.logo-compose-stage > img { display: block; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.logo-compose-layers { position: absolute; inset: 0; }
.logo-compose-layer { position: absolute; cursor: move; touch-action: none; }
.logo-compose-layer > img { width: 100%; height: 100%; object-fit: fill; pointer-events: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .18)); }
.logo-compose-layer.selected { outline: 2px solid #19a36f; outline-offset: 1px; }
.logo-compose-layer > i { display: none; position: absolute; width: 12px; height: 12px; border: 2px solid #fff; border-radius: 50%; background: #16a06c; box-shadow: 0 1px 5px rgba(0, 0, 0, .25); }
.logo-compose-layer.selected > i { display: block; }
.logo-compose-layer > i[data-resize-handle="nw"] { left: -7px; top: -7px; cursor: nwse-resize; }
.logo-compose-layer > i[data-resize-handle="ne"] { right: -7px; top: -7px; cursor: nesw-resize; }
.logo-compose-layer > i[data-resize-handle="sw"] { left: -7px; bottom: -7px; cursor: nesw-resize; }
.logo-compose-layer > i[data-resize-handle="se"] { right: -7px; bottom: -7px; cursor: nwse-resize; }
.logo-layer-remove { display: none; position: absolute; right: -13px; top: -27px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: #26352f; color: #fff; cursor: pointer; }
.logo-compose-layer.selected .logo-layer-remove { display: block; }
.logo-add-status { margin: 10px 0 0; text-align: center; color: #75877f; font-size: 13px; }

.logo-picker-panel { min-height: 0; display: flex; flex-direction: column; padding: 10px; }
.logo-custom-upload { min-height: 78px; display: grid; place-items: center; gap: 3px; border: 1px dashed #93b7a8; border-radius: 14px; background: #f0f7f4; color: #1b684a; cursor: pointer; }
.logo-custom-upload span { font-size: 25px; line-height: 1; }
.logo-custom-upload strong { font-size: 12px; }
.logo-picker-list { flex: 1; min-height: 0; max-height: calc(100vh - 330px); margin-top: 10px; overflow-y: auto; overscroll-behavior: contain; cursor: grab; scrollbar-width: thin; }
.logo-picker-list:active { cursor: grabbing; }
.logo-picker-item { width: 100%; display: grid; gap: 5px; margin-bottom: 9px; padding: 7px; border: 1px solid #dde7e2; border-radius: 13px; background: #fff; color: #33463f; cursor: pointer; }
.logo-picker-item:hover { border-color: #6dac91; background: #f2f8f5; }
.logo-picker-item span { display: grid; place-items: center; aspect-ratio: 1.35; overflow: hidden; border-radius: 8px; background-image: linear-gradient(45deg, #e9edeb 25%, transparent 25%), linear-gradient(-45deg, #e9edeb 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e9edeb 75%), linear-gradient(-45deg, transparent 75%, #e9edeb 75%); background-size: 14px 14px; background-position: 0 0, 0 7px, 7px -7px, -7px 0; }
.logo-picker-item img { max-width: 90%; max-height: 90%; pointer-events: none; }
.logo-picker-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }

@media (max-width: 980px) {
  .logo-processing-header { flex-direction: column; }
  .logo-remove-header-actions { width: 100%; justify-content: flex-start; }
  .logo-add-editor { grid-template-columns: minmax(0, 1fr) 118px; }
  .logo-compose-toolbar { grid-template-columns: 1fr auto; }
  .logo-compose-toolbar > span { display: none; }
  .logo-remove-editor > header { align-items: flex-start; flex-direction: column; }
  .logo-remove-editor-actions { flex-wrap: wrap; }
}

/* Creative variation */
.creative-variation-workspace {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto minmax(320px, 1fr) auto;
  background:
    radial-gradient(circle at 50% 18%, rgba(31, 143, 100, .08), transparent 34%),
    #f6f9f7;
}
.creative-variation-header {
  grid-row: 1;
  display: flex;
  align-items: center;
  min-height: 112px;
  padding: 20px 28px 16px;
  border-bottom: 1px solid #dce7e1;
  background: rgba(255, 255, 255, .88);
}
.creative-variation-header h2 { margin: 3px 0 4px; color: #10271e; font-size: 24px; }
.creative-variation-header p { margin: 0; color: #61756c; font-size: 13px; }
.creative-variation-stage {
  grid-row: 2;
  min-height: 0;
  display: block;
  padding: 24px 30px 18px;
  overflow: auto;
}
.creative-variation-history {
  width: min(1320px, 100%);
  min-height: 100%;
  margin: 0 auto;
}
.creative-variation-empty {
  min-height: 310px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  color: #60766c;
  text-align: center;
}
.creative-variation-empty > span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 19px;
  background: #e7f4ee;
  color: #157550;
  font-size: 27px;
}
.creative-variation-empty strong { color: #243d33; font-size: 18px; }
.creative-variation-empty p { max-width: 600px; margin: 0; font-size: 13px; }
.creative-variation-group {
  padding: 15px;
  border: 1px solid #d8e5df;
  border-radius: 20px;
  background: rgba(255, 255, 255, .91);
  box-shadow: 0 13px 34px rgba(25, 61, 47, .08);
}
.creative-variation-current-group {
  margin-bottom: 18px;
  transform-origin: 50% 0;
}
.creative-variation-current-group.is-active {
  animation: creativeVariationGroupReveal .72s cubic-bezier(.2, .8, .2, 1) both;
}
.creative-variation-history-list { display: grid; gap: 18px; padding-bottom: 8px; }
.creative-variation-history-group { content-visibility: auto; contain-intrinsic-size: 520px; }
.creative-variation-group-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
  padding: 1px 2px 11px;
  border-bottom: 1px solid #e3ece7;
}
.creative-variation-group-header > div { min-width: 0; display: grid; gap: 4px; }
.creative-variation-group-header strong { color: #17382b; font-size: 14px; }
.creative-variation-group-header span {
  max-width: 920px;
  overflow: hidden;
  color: #60746b;
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.creative-variation-group-header small { color: #84938c; font-size: 10px; }
.creative-variation-group-header > button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #cfe0d7;
  border-radius: 11px;
  background: #f7fbf9;
  color: #176d4c;
  font-weight: 750;
  cursor: pointer;
}
.creative-variation-group-header > button:disabled { opacity: .55; cursor: wait; }
.creative-variation-history-loading {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: #70837a;
  font-size: 13px;
}
.creative-variation-output-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 13px;
}
.creative-variation-output-item,
.creative-variation-output-placeholder {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d9e5df;
  border-radius: 15px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 28px rgba(26, 63, 48, .07);
}
.creative-variation-output-item > button:first-child {
  width: 100%;
  display: block;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #edf3f0;
  cursor: zoom-in;
}
.creative-variation-output-item img { width: 100%; height: 100%; object-fit: cover; }
.creative-variation-output-item > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px 8px;
  color: #41584e;
  font-size: 12px;
}
.creative-variation-output-item .inline-image-download {
  border: 0;
  background: transparent;
  color: #16734f;
  font-weight: 750;
  cursor: pointer;
}
.creative-variation-output-placeholder {
  min-height: 205px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #71837b;
}
.creative-variation-output-placeholder.is-failed { border-color: #f0cece; background: #fff8f8; color: #a44b4b; }
.creative-variation-output-placeholder small { color: inherit; opacity: .8; }
.creative-variation-composer {
  grid-row: 3;
  position: relative;
  width: min(1080px, calc(100% - 56px));
  min-height: 194px;
  margin: 0 auto 24px;
  padding: 12px 14px 10px;
  border: 1px solid #cbdcd4;
  border-radius: 20px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 18px 50px rgba(20, 58, 43, .12);
  transition: border-color .16s ease, box-shadow .16s ease, transform .28s ease, margin .28s ease;
}
.creative-variation-composer.drag-active {
  border-color: #18835b;
  box-shadow: 0 18px 52px rgba(22, 131, 91, .2), inset 0 0 0 2px rgba(22, 131, 91, .12);
}
.creative-variation-composer.is-running { border-color: #8fbba7; }
.creative-variation-workspace.is-session-open {
  grid-template-rows: auto auto minmax(320px, 1fr);
}
.creative-variation-workspace.is-session-open .creative-variation-composer {
  grid-row: 2;
  margin-top: 16px;
  margin-bottom: 12px;
  animation: creativeVariationComposerRise .58s cubic-bezier(.16, .78, .22, 1) both;
}
.creative-variation-workspace.is-session-open .creative-variation-stage {
  grid-row: 3;
  animation: creativeVariationStageReveal .82s .16s ease both;
}
.creative-variation-upload-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 20px;
}
.creative-variation-upload-row > span { flex: 0 0 auto; color: #75877f; font-size: 11px; }
.creative-variation-images { display: flex; flex-wrap: wrap; gap: 8px; }
.creative-variation-image {
  position: relative;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: 1px solid #d4e0da;
  border-radius: 11px;
  background: #edf3f0;
}
.creative-variation-image img { width: 100%; height: 100%; object-fit: cover; }
.creative-variation-image button {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(7, 34, 24, .82);
  color: #fff;
  cursor: pointer;
}
.creative-variation-prompt {
  min-height: 94px;
  max-height: 220px;
  margin-top: 7px;
  padding: 4px 2px;
  overflow-y: auto;
  outline: none;
  color: #263b33;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
}
.creative-variation-prompt[contenteditable="true"]:empty::before {
  content: attr(data-placeholder);
  color: #8a9b93;
  pointer-events: none;
}
.creative-variation-prompt[contenteditable="false"] {
  color: #566b61;
  cursor: default;
  user-select: text;
}
.creative-variation-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.creative-variation-drop-hint { color: #82948c; font-size: 11px; }
.creative-variation-actions { display: flex; align-items: center; gap: 9px; }
.creative-variation-channel { position: relative; }
#creative-variation-channel-trigger,
.creative-rewrite-channel-trigger {
  min-width: 152px;
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  padding: 6px 10px 6px 12px;
  border: 1px solid #d5e1db;
  border-radius: 13px;
  background: #f7faf8;
  color: #173b2c;
  text-align: left;
  cursor: pointer;
}
#creative-variation-channel-trigger small,
.creative-rewrite-channel-trigger small { grid-column: 1; color: #7d8e86; font-size: 9px; }
#creative-variation-channel-trigger strong,
.creative-rewrite-channel-trigger strong { grid-column: 1; font-size: 12px; }
#creative-variation-channel-trigger > span,
.creative-rewrite-channel-trigger > span { grid-column: 2; grid-row: 1 / 3; }
.creative-variation-channel-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 9px);
  z-index: 50;
  width: 270px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #d2e0d9;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(17, 50, 37, .18);
}
.creative-variation-channel-menu button {
  display: grid;
  gap: 2px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #294339;
  text-align: left;
  cursor: pointer;
}
.creative-variation-channel-menu button:hover,
.creative-variation-channel-menu button[aria-checked="true"] { border-color: #c9dfd4; background: #edf7f2; }
.creative-variation-channel-menu small { color: #778a81; font-size: 10px; }
.creative-variation-send {
  min-width: 68px;
  min-height: 44px;
  border: 0;
  border-radius: 13px;
  background: #147650;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.creative-variation-send:disabled { background: #ccdad3; cursor: not-allowed; }
.creative-variation-send.is-stop { min-width: 92px; background: #a84439; }
.creative-variation-send.is-stop:hover:not(:disabled) { background: #91372e; }
.creative-variation-send.is-again { min-width: 92px; background: #176f9b; }
.creative-variation-status {
  min-height: 17px;
  margin: 7px 2px 0;
  color: #6d8177;
  font-size: 11px;
}
.creative-variation-status[data-state="running"] { color: #16734f; }
.creative-variation-status[data-state="error"] { color: #b13e3e; }

.creative-rewrite-composer {
  min-height: 210px;
}
.creative-rewrite-upload-row {
  max-height: 160px;
  padding-right: 2px;
  overflow-y: auto;
}
.creative-rewrite-images {
  min-width: 0;
  align-content: flex-start;
}
.creative-rewrite-add {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  margin: 8px 0 10px;
  padding: 10px 14px;
  border: 1px dashed #b9d1c5;
  border-radius: 14px;
  background: #f7fbf9;
  color: #24503d;
  text-align: left;
  cursor: pointer;
}
.creative-rewrite-add:hover:not(:disabled) {
  border-color: #178058;
  background: #edf8f2;
}
.creative-rewrite-add > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #e2f2ea;
  color: #157650;
  font-size: 21px;
}
.creative-rewrite-add strong { font-size: 13px; }
.creative-rewrite-add small { color: #7c8e85; font-size: 10px; }
.creative-rewrite-add:disabled { opacity: .62; cursor: not-allowed; }
.creative-rewrite-element-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  margin: 1px 0 9px;
}
.creative-rewrite-element-picker { position: relative; flex: 0 0 auto; }
.creative-rewrite-element-trigger {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #08754f;
  border-radius: 50%;
  color: #fff;
  background: #0d8b5d;
  box-shadow: none;
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}
.creative-rewrite-element-trigger > span {
  display: block;
  font-size: 23px;
  font-weight: 450;
  line-height: 1;
}
.creative-rewrite-element-trigger:hover:not(:disabled),
.creative-rewrite-element-trigger:focus-visible,
.creative-rewrite-element-trigger[aria-expanded="true"] {
  outline: 3px solid rgba(13, 139, 93, .2);
  outline-offset: 2px;
  border-color: #065f42;
  background: #087650;
  box-shadow: none;
  filter: none;
  transform: none;
}
.creative-rewrite-element-trigger:hover:not(:disabled) > span,
.creative-rewrite-element-trigger:focus-visible > span {
  animation: creative-rewrite-plus-spin .56s cubic-bezier(.28, .7, .24, 1) both;
}
.creative-rewrite-element-trigger:disabled { opacity: .56; cursor: not-allowed; }
.creative-rewrite-element-tooltip {
  position: absolute;
  z-index: 18;
  top: calc(100% + 8px);
  left: 50%;
  width: max-content;
  max-width: 150px;
  padding: 6px 9px;
  border: 1px solid rgba(48, 156, 109, .32);
  border-radius: 9px;
  color: #eafff6;
  background: rgba(5, 65, 43, .94);
  box-shadow: 0 8px 20px rgba(3, 55, 35, .2);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -7px) scale(.9);
  transition: opacity .16s ease, transform .2s cubic-bezier(.2, 1.2, .35, 1);
}
.creative-rewrite-element-picker:not(.is-open):hover .creative-rewrite-element-tooltip,
.creative-rewrite-element-picker:not(.is-open):focus-within .creative-rewrite-element-tooltip {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
.creative-rewrite-element-menu {
  position: absolute;
  z-index: 19;
  bottom: calc(100% + 10px);
  left: 0;
  display: grid;
  gap: 5px;
  width: 148px;
  padding: 8px;
  border: 1px solid rgba(65, 184, 132, .42);
  border-radius: 14px;
  background: rgba(251, 255, 253, .98);
  box-shadow: 0 18px 42px rgba(6, 82, 51, .22), inset 0 1px 0 #fff;
  backdrop-filter: blur(12px);
  transform-origin: 20px bottom;
}
.creative-rewrite-element-menu.is-opening {
  animation: creative-rewrite-element-menu-in .26s cubic-bezier(.2, 1.28, .34, 1) both;
}
.creative-rewrite-element-menu button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #29483a;
  background: #f2faf6;
  font-size: 12px;
  font-weight: 720;
  text-align: left;
  cursor: pointer;
  transition: color .16s ease, background .16s ease, border-color .16s ease,
    transform .16s ease, box-shadow .16s ease;
}
.creative-rewrite-element-menu button:hover:not(:disabled),
.creative-rewrite-element-menu button:focus-visible {
  outline: none;
  border-color: #65c49b;
  color: #045d3e;
  background: #e3f8ed;
  box-shadow: 0 5px 13px rgba(22, 128, 84, .14);
  transform: translateX(3px);
}
.creative-rewrite-element-menu button.is-selected {
  border-color: #37ad7a;
  color: #035e3e;
  background: #d9f7e8;
}
.creative-rewrite-element-menu button.is-selected::after {
  float: right;
  content: "✓";
}
.creative-rewrite-elements {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 36px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.creative-rewrite-elements-empty {
  color: #83978d;
  font-size: 11px;
}
.creative-rewrite-element-tag {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  min-height: 27px;
  padding: 2px 5px 2px 10px;
  overflow: hidden;
  border: 1px solid #3eb987;
  border-radius: 999px;
  color: #035f40;
  background: linear-gradient(135deg, #dff9eb, #effff7);
  box-shadow: 0 0 0 1px rgba(62, 185, 135, .12), 0 0 15px rgba(51, 225, 155, .16);
  font-size: 12px;
  font-weight: 780;
  line-height: 20px;
  user-select: none;
}
.creative-rewrite-element-tag::after {
  position: absolute;
  inset: -35% auto -35% -42%;
  width: 36%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), transparent);
  content: "";
  pointer-events: none;
  transform: skewX(-18deg);
  animation: image-parameter-shimmer 2.9s ease-in-out infinite;
}
.creative-rewrite-element-tag button {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #187551;
  background: rgba(255, 255, 255, .58);
  font-size: 14px;
  cursor: pointer;
}
.creative-rewrite-element-tag button:hover:not(:disabled) { color: #9c2f2f; background: #fff; }
.creative-rewrite-element-tag button:disabled { cursor: default; opacity: .48; }
@keyframes creative-rewrite-plus-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes creative-rewrite-element-menu-in {
  0% { opacity: 0; transform: translateY(9px) scale(.72); filter: blur(2px); }
  62% { opacity: 1; transform: translateY(-2px) scale(1.035); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .creative-rewrite-element-trigger > span,
  .creative-rewrite-element-menu.is-opening,
  .creative-rewrite-element-tag::after { animation: none; }
}
.creative-rewrite-output-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}
.creative-rewrite-output-placeholder {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 0;
}
.creative-rewrite-output-placeholder > img {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .16;
  filter: grayscale(.35);
}
.creative-rewrite-output-placeholder.is-running > img { opacity: .24; }
.creative-rewrite-output-placeholder.is-failed > img { opacity: .1; }
.creative-rewrite-source-name {
  max-width: calc(100% - 22px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}
.creative-rewrite-status-chip {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  color: #4e665b;
  font-size: 10px;
}
.creative-rewrite-output-placeholder.is-failed .creative-rewrite-status-chip {
  background: #fff0f0;
  color: #a14141;
}

@keyframes creativeVariationComposerRise {
  from { opacity: .72; transform: translateY(42vh) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes creativeVariationStageReveal {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes creativeVariationGroupReveal {
  from { opacity: 0; transform: translateY(22px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .creative-variation-workspace.is-session-open .creative-variation-composer,
  .creative-variation-workspace.is-session-open .creative-variation-stage,
  .creative-variation-current-group.is-active { animation: none; }
}

@media (max-width: 1180px) {
  .creative-variation-output-grid { grid-template-columns: repeat(3, minmax(145px, 1fr)); }
}
@media (max-width: 760px) {
  .creative-variation-header { padding-inline: 16px; }
  .creative-variation-stage { padding-inline: 14px; }
  .creative-variation-output-grid { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .creative-variation-composer { width: calc(100% - 28px); margin-bottom: 14px; }
  .creative-variation-footer { align-items: stretch; flex-direction: column; }
  .creative-variation-actions { justify-content: flex-end; }
}
/* Creative Main · shared ChatGPT Work-mode workflow */
.creative-main-workspace {
  min-height: 0;
  height: 100%;
  padding: clamp(20px, 2.4vw, 36px);
  display: grid;
  grid-template-rows: auto minmax(190px, 1fr) auto;
  gap: 18px;
  overflow: auto;
  background:
    radial-gradient(circle at 84% 4%, rgba(113, 235, 174, .18), transparent 32%),
    linear-gradient(180deg, #f8fcf9 0%, #edf7f1 100%);
}

.creative-main-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.creative-main-header h2 {
  margin: 5px 0 7px;
  color: #123f30;
  font-size: clamp(26px, 2.5vw, 38px);
  line-height: 1.05;
}

.creative-main-header p {
  max-width: 760px;
  margin: 0;
  color: #5b7469;
  line-height: 1.65;
}

.creative-main-policy {
  flex: 0 0 auto;
  min-width: 245px;
  padding: 12px 15px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 9px;
  border: 1px solid #cce5d7;
  border-radius: 14px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 12px 30px rgba(18, 81, 58, .06);
}

.creative-main-policy > span {
  grid-row: 1 / 3;
  color: #25a874;
  font-size: 12px;
  padding-top: 3px;
}

.creative-main-policy strong { color: #174c38; }
.creative-main-policy small { color: #71887d; }

.creative-main-stage {
  min-height: 190px;
  padding: clamp(18px, 2vw, 30px);
  overflow: hidden;
  border: 1px solid #d5e8dd;
  border-radius: 22px;
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 18px 48px rgba(24, 85, 61, .07);
}

.creative-main-empty {
  height: 100%;
  min-height: 150px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  color: #6c8579;
  text-align: center;
}

.creative-main-empty > span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #e2f8eb;
  color: #16845b;
  font-weight: 800;
}

.creative-main-empty strong { color: #214f3d; font-size: 18px; }
.creative-main-empty p { max-width: 620px; margin: 0; line-height: 1.6; }

.creative-main-job {
  height: 100%;
  min-height: 150px;
  display: grid;
  grid-template-rows: auto auto minmax(80px, 1fr);
  gap: 14px;
}

.creative-main-job > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.creative-main-job > header > div { display: grid; gap: 4px; }
.creative-main-job > header strong { color: #164934; font-size: 17px; }
.creative-main-job > header span { color: #6d8178; }
.creative-main-job > header em {
  padding: 6px 11px;
  border-radius: 999px;
  background: #e2f6ea;
  color: #167a55;
  font-style: normal;
  font-weight: 700;
}

.creative-main-job > header em[data-state="failed"] { background: #fff0ee; color: #ba483c; }
.creative-main-job > header em[data-state="cancelled"] { background: #f3f1ea; color: #7b7152; }

.creative-main-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5efe9;
}

.creative-main-progress i {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #168c60, #55d99b);
  transition: width .35s ease;
}

.creative-main-live-log {
  min-height: 80px;
  max-height: 230px;
  overflow: auto;
  padding: 13px 15px;
  border: 1px solid #dcebe2;
  border-radius: 13px;
  background: #f7fbf8;
  color: #567065;
  line-height: 1.55;
}

.creative-main-live-log p { margin: 0 0 7px; white-space: pre-wrap; overflow-wrap: anywhere; }
.creative-main-live-log p:last-child { margin-bottom: 0; color: #225d45; }

.creative-main-composer {
  padding: 14px;
  display: grid;
  gap: 11px;
  border: 1px solid #bddfce;
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 20px 50px rgba(18, 83, 58, .12);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.creative-main-composer.drag-active {
  border-color: #18a16c;
  box-shadow: 0 0 0 4px rgba(30, 174, 115, .12), 0 20px 50px rgba(18, 83, 58, .12);
}

.creative-main-composer.is-busy { border-color: #a9d7c0; }

.creative-main-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.creative-main-upload-row > span {
  flex: 0 0 auto;
  color: #73877e;
  font-size: 12px;
}

.creative-main-images {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scroll-snap-type: x proximity;
}

.creative-main-image {
  position: relative;
  flex: 0 0 112px;
  width: 112px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #cfe3d8;
  border-radius: 12px;
  background: #f2f8f4;
  scroll-snap-align: start;
}

.creative-main-image img {
  width: 112px;
  height: 82px;
  display: block;
  object-fit: cover;
  background: #edf4ef;
}

.creative-main-image figcaption {
  padding: 5px 7px 6px;
  overflow: hidden;
  color: #4d685c;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-main-image button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 23px;
  height: 23px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(12, 42, 31, .78);
  color: #fff;
  cursor: pointer;
}

.creative-main-add {
  min-height: 58px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  align-items: center;
  border: 1px dashed #9bcdb4;
  border-radius: 14px;
  background: #f1faf5;
  color: #246247;
  text-align: left;
  cursor: pointer;
}

.creative-main-add > span {
  grid-row: 1 / 3;
  font-size: 24px;
  font-weight: 400;
}

.creative-main-add strong { font-size: 14px; }
.creative-main-add small { color: #6f867a; }

.creative-main-prompt {
  min-height: 70px;
  max-height: 170px;
  overflow: auto;
  padding: 12px 13px;
  border: 0;
  outline: 0;
  color: #233f34;
  line-height: 1.55;
  white-space: pre-wrap;
}

.creative-main-prompt:empty::before {
  content: attr(data-placeholder);
  color: #91a49b;
  pointer-events: none;
}

.creative-main-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.creative-main-drop-hint { color: #71867c; font-size: 12px; }
.creative-main-actions { display: flex; align-items: center; gap: 8px; }

.creative-main-send,
.creative-main-save,
.creative-main-cancel {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.creative-main-send,
.creative-main-save { border: 1px solid #18865e; background: #18865e; color: #fff; }
.creative-main-save { background: #e6f7ed; color: #176d4e; }
.creative-main-cancel { border: 1px solid #d7dfda; background: #fff; color: #6b756f; }
.creative-main-send:disabled,
.creative-main-save:disabled,
.creative-main-cancel:disabled,
.creative-main-add:disabled,
.creative-main-image button:disabled { cursor: not-allowed; opacity: .48; }

.creative-main-status {
  margin: 0;
  padding-top: 9px;
  border-top: 1px solid #edf3ef;
  color: #668075;
  font-size: 12px;
}

.creative-main-status[data-state="working"] { color: #167b55; }
.creative-main-status[data-state="error"] { color: #b5483d; }
.creative-main-status[data-state="paused"] { color: #826f3b; }

@media (max-width: 900px) {
  .creative-main-header { flex-direction: column; }
  .creative-main-policy { width: 100%; min-width: 0; }
  .creative-main-footer { align-items: flex-start; flex-direction: column; }
  .creative-main-actions { align-self: stretch; justify-content: flex-end; }
}

/* Account-scoped local chat memory */
.memory-image-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.memory-media-card { width: 180px; display: inline-flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid #cde5d9; border-radius: 12px; background: #f3faf6; }
.memory-media-card > button { padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.memory-media-card img { width: 100%; height: 150px; object-fit: contain; border-radius: 8px; }
.memory-media-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #4c6d5d; }
.memory-media-actions { display: flex; gap: 8px; }
.memory-media-actions button { border: 1px solid #b7d8c7; border-radius: 6px; background: #fff; color: #176e4e; padding: 4px 8px; cursor: pointer; }
#memory-storage-directory { display: block; overflow-wrap: anywhere; margin-top: 8px; color: #517b66; }
.chat-memory-open {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid #ffffff1f;
  border-radius: 11px;
  color: #e4eee9;
  background: #ffffff09;
  text-align: left;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.chat-memory-open:hover,
.chat-memory-open:focus-visible {
  border-color: #67bd963f;
  background: #ffffff10;
  transform: translateY(-1px);
}
.chat-memory-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #8da69a42;
  border-radius: 10px;
  color: #b9ccc2;
  background: #ffffff0b;
  font-size: 13px;
  font-weight: 800;
}
.chat-memory-copy { min-width: 0; }
.chat-memory-copy strong,
.chat-memory-copy small { display: block; }
.chat-memory-copy strong { font-size: 13px; font-weight: 750; }
.chat-memory-copy small {
  margin-top: 3px;
  overflow: hidden;
  color: #93a69c;
  font-size: 9px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-memory-chevron { color: #71877c; font-size: 20px; line-height: 1; }
.chat-memory-open[data-state="secure"] .chat-memory-icon {
  border-color: #42bc8466;
  color: #7de1b5;
  background: #2a9b7021;
}
.chat-memory-open[data-state="secure"] .chat-memory-copy small { color: #78caa6; }
.chat-memory-open[data-state="session"] .chat-memory-icon {
  border-color: #d8a54d66;
  color: #f2c879;
  background: #c5892520;
}
.chat-memory-open[data-state="session"] .chat-memory-copy small { color: #d8b676; }
.chat-memory-open[data-state="error"] .chat-memory-icon {
  border-color: #d5655e73;
  color: #f29a93;
  background: #c94d4420;
}

body.memory-modal-open { overflow: hidden; }
.memory-modal {
  position: fixed;
  inset: 0;
  z-index: 10200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 20, 13, .7);
  backdrop-filter: blur(8px);
}
.memory-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(780px, 100%);
  max-height: min(860px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid #dce8e1;
  border-radius: 22px;
  background: #fbfdfc;
  box-shadow: 0 30px 90px rgba(3, 23, 13, .34);
  animation: memory-card-in .2s cubic-bezier(.2, .8, .25, 1);
}
@keyframes memory-card-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.memory-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #e2ebe6;
  background: white;
}
.memory-eyebrow {
  color: #27805d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.memory-header h2 { margin: 5px 0 0; color: #173c2a; font-size: 24px; }
.memory-header p { margin: 6px 0 0; color: #718178; font-size: 12px; }
.memory-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #dce6e0;
  border-radius: 11px;
  color: #53665b;
  background: #f6f9f7;
  font-size: 22px;
  line-height: 1;
}
.memory-close:hover { color: #163f2b; background: #edf5f0; }
.memory-scroll {
  display: grid;
  gap: 16px;
  overflow-y: auto;
  padding: 18px 24px 22px;
}
.memory-setting-row,
.memory-storage-card,
.memory-section {
  border: 1px solid #dfe9e3;
  border-radius: 15px;
  background: white;
}
.memory-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 17px;
}
.memory-setting-row strong { color: #213f30; font-size: 14px; }
.memory-setting-row p { max-width: 520px; margin: 5px 0 0; color: #718178; font-size: 11px; line-height: 1.55; }
.memory-switch {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 7px;
  color: #607269;
  font-size: 11px;
  cursor: pointer;
}
.memory-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.memory-switch span {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #cbd7d0;
  transition: background .16s ease;
}
.memory-switch span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 6px #18352438;
  content: "";
  transition: transform .18s ease;
}
.memory-switch input:checked + span { background: #238b64; }
.memory-switch input:checked + span::after { transform: translateX(18px); }
.memory-switch input:focus-visible + span { outline: 3px solid #72b79745; outline-offset: 2px; }
.memory-switch input:disabled + span { opacity: .5; cursor: wait; }
.memory-switch em { font-style: normal; }
.memory-storage-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-color: #cfe5d9;
  background: linear-gradient(145deg, #f1faf5, #fbfdfc);
}
.memory-storage-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  color: #24845d;
  background: #dff3e8;
  font-size: 13px;
}
.memory-storage-card strong { display: block; color: #1d6e4d; font-size: 13px; }
.memory-storage-card strong[data-state="session"] { color: #93681f; }
.memory-storage-card strong[data-state="error"] { color: #a13e37; }
.memory-storage-card p { margin: 5px 0 0; color: #61766a; font-size: 11px; line-height: 1.6; }
.memory-section { padding: 17px; }
.memory-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.memory-section-heading h3 { margin: 0; color: #233f31; font-size: 15px; }
.memory-section-heading p { margin: 4px 0 0; color: #7a8981; font-size: 11px; }
.memory-section-heading > span { color: #8b9891; font-size: 10px; }
.memory-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 14px;
}
.memory-add-form input {
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #d6e2dc;
  border-radius: 11px;
  color: #263d32;
  background: #fbfdfc;
}
.memory-add-form input:focus { border-color: #69ad8d; box-shadow: 0 0 0 3px #3c9b7030; outline: 0; }
.memory-add-form button {
  min-width: 72px;
  border: 0;
  border-radius: 11px;
  color: white;
  background: #238b64;
  font-weight: 700;
}
.memory-list { display: grid; gap: 9px; margin-top: 12px; }
.memory-item {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid #e2eae5;
  border-radius: 11px;
  background: #f9fbfa;
}
.memory-item textarea {
  width: 100%;
  min-height: 38px;
  max-height: 120px;
  padding: 8px 9px;
  resize: vertical;
  border: 1px solid #cadbd2;
  border-radius: 8px;
  color: #283f34;
  background: white;
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
}
.memory-item textarea[readonly] {
  resize: none;
  border-color: transparent;
  background: transparent;
  outline: 0;
}
.memory-item-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.memory-item-actions span { margin-right: auto; color: #929e97; font-size: 9px; }
.memory-item-actions button {
  padding: 5px 9px;
  border: 1px solid #d5e1da;
  border-radius: 7px;
  color: #35614b;
  background: white;
  font-size: 10px;
}
.memory-item-actions button.danger { color: #a0443e; }
.memory-empty {
  padding: 18px;
  border: 1px dashed #d7e3dc;
  border-radius: 11px;
  color: #75857c;
  text-align: center;
}
.memory-empty strong { color: #52675c; font-size: 12px; }
.memory-empty p { margin: 4px 0 0; font-size: 10px; }
.memory-outline-danger {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #e4b6b2;
  border-radius: 9px;
  color: #9a3e38;
  background: #fff8f7;
  font-size: 10px;
}
.memory-outline-danger:disabled { opacity: .42; cursor: not-allowed; }
.memory-context-meta { margin: 13px 0 0; color: #61746a; font-size: 11px; }
.memory-summary-details {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #f4f8f6;
}
.memory-summary-details summary { color: #446456; font-size: 11px; cursor: pointer; }
.memory-summary-details pre {
  max-height: 170px;
  margin: 10px 0 0;
  overflow: auto;
  color: #566a5f;
  font: inherit;
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.memory-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-top: 1px solid #e1eae5;
  background: white;
}
.memory-clear-all {
  padding: 8px 11px;
  border: 1px solid #e1b4b0;
  border-radius: 9px;
  color: #9a3e38;
  background: white;
  font-size: 10px;
}
.memory-footer span { color: #87948d; font-size: 10px; }
.message.assistant.interrupted-draft .bubble { border-color: #dec78e; background: #fffaf0; }
.message.assistant.interrupted-draft .usage-line { color: #8b6a22; }
.memory-draft-note { margin-top: 5px; color: #8b6a22; font-size: 10px; }

@media (max-width: 700px) {
  .memory-modal { padding: 10px; }
  .memory-card { max-height: calc(100vh - 20px); border-radius: 16px; }
  .memory-header { padding: 18px; }
  .memory-scroll { padding: 14px; }
  .memory-setting-row { align-items: flex-start; }
  .memory-section-heading { align-items: stretch; flex-direction: column; }
  .memory-outline-danger { align-self: flex-start; }
  .memory-footer { align-items: flex-start; flex-direction: column; padding: 13px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .memory-card { animation-duration: .01ms; }
  .chat-memory-open,
  .memory-switch span,
  .memory-switch span::after { transition-duration: .01ms; }
}

.managed-vpn-status { margin: 2px 12px 8px; padding: 8px 10px; border-radius: 9px; color: #767b82; background: #f4f5f7; font-size: 11px; line-height: 1.5; }
.managed-vpn-status[data-state="connected"] { color: #16674a; background: #eaf6ee; }
.managed-vpn-status[data-state="waiting"] { color: #836526; background: #fcf6e8; }

.video-splice-asset { position: relative; }
.video-splice-layer-badge {
  position: absolute; top: 6px; left: 6px; z-index: 3; max-width: calc(100% - 12px);
  padding: 3px 6px; border-radius: 4px; color: #fff; background: rgba(13, 57, 41, .88);
  font-size: 10px; line-height: 1.4; pointer-events: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.video-splice-asset.is-ai-voice .video-splice-layer-badge { top: 28px; }
.video-splice-track-menu {
  position: fixed; z-index: 1600; width: 180px; max-height: min(400px, calc(100vh - 16px));
  padding: 8px; overflow-y: auto; border: 1px solid #bcd8cc; border-radius: 10px;
  background: #fff; color: #163d2e; box-shadow: 0 8px 28px #102a2340;
}
.video-splice-track-menu > strong { display: block; padding: 4px 6px 9px; font-size: 11px; }
.video-splice-track-menu > button { display: block; width: 100%; margin: 2px 0; padding: 8px; text-align: left; border: 0; border-radius: 6px; color: #194532; background: #f1f7f4; font-size: 12px; box-shadow: none; }
.video-splice-track-menu > button:hover, .video-splice-track-menu > button:focus-visible { background: #d9f0e4; outline: 2px solid #25875e; }
.video-splice-source-preview { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; background: #080c09; }
.video-splice-source-preview > video { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.video-splice-source-preview > audio { width: 90%; }
.video-splice-source-label { position: absolute; top: 10px; left: 10px; right: 112px; padding: 4px 7px; font-size: 11px; color: white; background: #10231bbd; border-radius: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.video-splice-source-back { position: absolute; top: 10px; right: 10px; padding: 5px 8px; border: 1px solid #567262; border-radius: 5px; color: #edf9f2; background: #1e3d2fd9; font-size: 11px; box-shadow: none; }
.video-splice-history-buttons { display: flex; gap: 2px; padding-right: 6px; border-right: 1px solid #3b4741; }
.video-splice-history-buttons button, #video-splice-zoom-out, #video-splice-zoom-in { display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 28px; padding: 4px; border: 0; border-radius: 5px; background: transparent; color: #c2d2c9; box-shadow: none; }
.video-splice-history-buttons button:hover:not(:disabled), #video-splice-zoom-out:hover:not(:disabled), #video-splice-zoom-in:hover:not(:disabled) { background: #344d40; color: #fff; }
.video-splice-history-buttons button:disabled { opacity: .35; }
.video-splice-history-buttons svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#video-splice-zoom-track { display: block; width: 74px; min-width: 40px; height: 22px; padding: 0; margin: 0; border: 0; background: transparent; accent-color: #58b388; cursor: pointer; box-shadow: none; }
.video-splice-audio-storage { display: flex; align-items: center; gap: 6px; padding: 5px 0; color: #597466; }
.video-splice-audio-storage small { font-size: 10px; line-height: 1.4; }
.video-splice-audio-storage button { flex-shrink: 0; padding: 4px 6px; font-size: 10px; }
#video-splice-audio-pane:not(.is-empty) { grid-template-rows: auto minmax(0, 1fr); }
#video-splice-audio-pane.is-empty { grid-template-rows: minmax(0, 1fr) auto; }
#video-splice-audio-pane .video-splice-audio-storage { min-height: 0; }
@media(max-width: 1250px) { #video-splice-zoom-track { width: 48px; } .video-splice-history-buttons { gap: 0; padding-right: 2px; } }

/* Caption sentences occupy the top of their own narration clip. */
.video-splice-clip.has-inline-subtitles { grid-template-rows: 18px 12px minmax(0, 1fr); }
.video-splice-inline-subtitles { position: relative; min-width: 0; height: 18px; overflow: hidden; background: #284949; }
.video-splice-inline-subtitles .video-splice-subtitle-cue {
  top: 0; bottom: 0; height: 18px; min-height: 0; border-radius: 3px; box-shadow: none;
  border: 1px solid rgba(146, 191, 212, .65); background: #365d69; overflow: hidden;
}
.video-splice-inline-subtitles .video-splice-subtitle-cue strong { padding: 0 4px; line-height: 16px; font-size: 9px; }
.video-splice-inline-subtitles .video-splice-subtitle-cue::after { display: none; }
.video-splice-inline-subtitles .video-splice-subtitle-cue.is-selected { background: #317c91; border-color: #fff; }
.video-splice-clip.has-inline-subtitles .video-splice-clip-caption { padding: 0 5px !important; }
.video-splice-layer.is-auto-v00, .video-splice-track-label-item.is-auto-v00 { background-color: #aeb6bc; color: #253b43; }
.video-splice-layer.is-auto-v00 { background-image: linear-gradient(90deg, rgba(52, 67, 77, .12) 1px, transparent 1px); }
.video-splice-layer.is-auto-v00.is-auto-v0-pool-lane { background-color: #c2c9ce; }
.video-splice-layer.is-auto-v00.is-selected-output, .video-splice-track-label-item.is-auto-v00.is-selected-output { background-color: #99aeb8; }
.video-splice-track-label-item.is-auto-v00 span { color: #254f67; }
.video-splice-layer.is-auto-v00 .video-splice-layer-empty { color: #3e555e; }

/* Keep the Gemini heading below the shared floating connection status bar. */
#gemini-official-workspace > header { min-height: 94px; padding-top: 48px; }
/* Quality / speed selector: one moving selection surface across both options. */
.quality-speed-switch.quality-speed-switch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  isolation: isolate;
  border: 1px solid rgba(37, 102, 77, .15);
  border-radius: 15px;
  background: #eaf1ee;
  min-width: min(300px, 100%);
}
.quality-speed-switch::before {
  content: "";
  position: absolute;
  inset: 4px auto 4px 4px;
  width: calc((100% - 12px) / 2);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(19, 63, 44, .12), 0 0 0 1px rgba(26, 80, 56, .05);
  transition: transform .38s cubic-bezier(.22, 1.2, .35, 1), box-shadow .2s;
  pointer-events: none;
}
.quality-speed-switch[data-selected="fast"]::before { transform: translateX(calc(100% + 4px)); }
.quality-speed-switch.quality-speed-switch > button {
  position: relative;
  z-index: 1;
  border: 0;
  border-radius: 11px;
  background: transparent;
  box-shadow: none;
  color: #52665b;
  padding: 10px 12px;
  min-height: 38px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  transition: color .2s, transform .2s;
}
.quality-speed-switch.quality-speed-switch > button[aria-checked="true"] { color: #116743; background: transparent; }
.quality-speed-switch.quality-speed-switch > button:hover:not(:disabled) { color: #0b5737; transform: translateY(-1px); }
.quality-speed-switch.quality-speed-switch > button:active:not(:disabled) { transform: scale(.97); }
.quality-speed-switch.quality-speed-switch > button:focus-visible { outline: 2px solid #208361; outline-offset: -2px; }
.quality-speed-switch.quality-speed-switch > button:disabled { opacity: .65; cursor: wait; }
.quality-speed-switch.quality-speed-switch > button[data-channel-hint]::after {
  content: attr(data-channel-hint);
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  z-index: 3;
  width: max-content;
  padding: 8px 12px;
  border: 1px solid #d4e2db;
  border-radius: 9px;
  background: #fff;
  color: #294c3c;
  box-shadow: 0 5px 18px rgba(19, 63, 44, .14);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -3px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.quality-speed-switch.quality-speed-switch > button[data-channel-hint]:is(:hover, :focus-visible) { z-index: 2; }
.quality-speed-switch.quality-speed-switch > button[data-channel-hint]:is(:hover, :focus-visible)::after {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
#garment-customization-workspace .quality-speed-switch > button {
  border: 0; background: transparent; box-shadow: none; padding: 10px 12px;
  font-weight: 600; color: #52665b;
}
#garment-customization-workspace .quality-speed-switch > button[aria-checked="true"] { background: transparent; color: #116743; }
@media (prefers-reduced-motion: reduce) {
  .quality-speed-switch::before, .quality-speed-switch.quality-speed-switch > button,
  .quality-speed-switch.quality-speed-switch > button[data-channel-hint]::after { transition: none; }
}

/* Account task count and the shared local speed-image queue. */
.relay-request-count { font-size: 11px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Independent internet browser inside the workbench. */
.free-browser-workspace:not(.hidden) { display: flex; flex-direction: column; min-height: 0; height: 100%; overflow: hidden; }
.free-browser-workspace > header { flex-shrink: 0; }
.free-browser-page-title { display: inline-block; max-width: min(60vw, 550px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.free-browser-toolbar { display: flex; align-items: center; flex-wrap: nowrap; gap: 7px; padding: 12px 18px; margin: 0; border-bottom: 1px solid var(--line, #dbe6df); background: #f6faf8; flex-shrink: 0; }
.free-browser-toolbar button { flex: 0 0 auto; white-space: nowrap; padding: 8px 11px; }
.free-browser-toolbar button.secondary { border: 1px solid var(--line); border-radius: 10px; background: white; color: #244f3e; }
.free-browser-toolbar button.secondary:hover:not(:disabled) { background: #e8f3ed; border-color: #a9c8b8; }
.free-browser-toolbar button:disabled { opacity: .5; cursor: default; }
.free-browser-toolbar input { flex: 1 1 auto; width: 0; min-width: 100px; border-radius: 18px; padding: 9px 14px; background: white; }
#free-browser-host-slot { position: relative; flex: 1 1 auto; min-height: 0; width: 100%; overflow: hidden; background: #fff; }
@media (max-width: 900px) { .free-browser-toolbar { gap: 4px; padding: 9px; } .free-browser-toolbar button { padding: 8px; } }

/* Per-image generation ends at provider readiness; downloads keep their own clock. */
.image-generation-timing.image-delivery-timing { display:flex; flex-direction:column; align-items:inherit; gap:3px; white-space:normal; }
.image-delivery-timing > span { display:block; }
.image-generation-timing.image-delivery-timing > span { position:static; margin:0; padding:0; background:transparent; color:inherit; font-size:inherit; }
.image-delivery-queue-time { font-size:11px; opacity:.85; }
html.lg-shell #app-view .image-generation-timing.image-delivery-timing { line-height:1.5; flex-shrink:0; }
html.lg-dark #app-view .image-delivery-timing.is-complete { color:#b7c2d1!important; background:transparent!important; border-top-color:rgba(255,255,255,.09); }
html.lg-dark #app-view .image-delivery-timing.is-complete strong { color:#8ad8b7!important; }
html.lg-shell #app-view .gc-run-timing [data-label="return-timing"]:not([hidden]) { display:block; flex-basis:100%; font-size:11px; }

/* Motion transfer: compact multi-select controls, keyboard/contrast supported. */
.motion-targets{border:0;padding:0;margin:20px 0;color:inherit;min-width:0}
.motion-targets legend{font-size:13px;font-weight:600;margin-bottom:10px}
.motion-target-options{display:flex;gap:8px;flex-wrap:wrap}
.motion-target-options button{min-width:76px;padding:9px 18px;border-radius:10px;border:1px solid rgba(125,145,161,.25);background:rgba(125,145,161,.08);color:inherit;cursor:pointer}
.motion-target-options button[aria-pressed="true"]{background:#087eff;border-color:#087eff;color:#fff;box-shadow:0 2px 8px #087eff24}
.motion-target-options button:focus-visible{outline:2px solid #399bff;outline-offset:3px}
.motion-target-options button:disabled{opacity:.55;cursor:default}
.motion-targets small{display:block;font-size:12px;opacity:.72;margin-top:10px}
.tmall-tool-flyout-wrap{position:relative}
.tmall-tool-flyout-wrap .sidebar-tool{width:100%}
.tmall-tool-flyout{display:none;position:absolute;left:calc(100% + 6px);top:0;z-index:20;padding:5px;border:1px solid rgba(50,90,65,.14);border-radius:10px;background:#fff;box-shadow:0 10px 24px rgba(26,55,38,.14);white-space:nowrap}
.tmall-tool-flyout-wrap:hover .tmall-tool-flyout,.tmall-tool-flyout-wrap:focus-within .tmall-tool-flyout{display:block}
.tmall-tool-flyout button{border:0;background:transparent;padding:8px 12px;border-radius:7px;cursor:pointer;color:#214b35}
.tmall-tool-flyout button:hover{background:#edf8ef}

/* Image gallery controls stay outside the panning surface. */
.batch-image-preview-modal { grid-template-columns:minmax(0,1fr); }
.batch-image-preview-stage { min-width:0; }
.batch-image-preview-toolbar { max-width:100%; flex-wrap:wrap; justify-content:center; }
.batch-preview-nav { position:absolute; top:50%; transform:translateY(-50%); z-index:2; width:46px; height:60px; border:1px solid rgba(255,255,255,.2); border-radius:14px; color:#fff; background:rgba(255,255,255,.12); font-size:36px; line-height:1; cursor:pointer; }
.batch-preview-nav:hover:not(:disabled) { background:rgba(255,255,255,.25); }
.batch-preview-nav:disabled { opacity:.25; cursor:default; }
.batch-preview-nav:focus-visible { outline:2px solid white; outline-offset:4px; }
.batch-preview-previous { left:16px; }
.batch-preview-next { right:16px; }
.batch-preview-counter { color:rgba(255,255,255,.8); font-size:12px; font-variant-numeric:tabular-nums; }
body.batch-image-preview-open #network-status-bar { visibility:hidden; pointer-events:none; }
@media(max-width:640px) {
  .batch-image-preview-modal { padding-left:44px; padding-right:44px; }
  .batch-preview-nav { width:32px; height:48px; border-radius:10px; }
  .batch-preview-previous { left:5px; } .batch-preview-next { right:5px; }
}


/* Reference images open the shared preview; sibling controls keep their actions. */
.reference-image-preview,
.tryon-upload-item > button.reference-image-preview,
.main-aspect-upload-item > button.reference-image-preview,
.creative-variation-image > button.reference-image-preview,
.creative-main-image > button.reference-image-preview,
.video-reference-item > button.reference-image-preview {
  position: relative; inset: auto; display: block; width: 100%; height: 100%;
  min-width: 0; padding: 0; margin: 0; border: 0; border-radius: 0;
  color: inherit; background: transparent; cursor: zoom-in;
}
.main-aspect-upload-item > button.reference-image-preview { height: 138px; }
.creative-main-image > button.reference-image-preview { height: 82px; }
.reference-image-preview:focus-visible, [data-reference-preview]:focus-visible {
  outline: 3px solid #168355; outline-offset: -3px;
}
.reference-image-preview:disabled { cursor: default; }
.tryon-single-reference-indicator { pointer-events: auto; border: 0; cursor: pointer; }
.tryon-mask-trigger { opacity: 1; transform: none; }
.product-white-sample-card { height: 94px; padding-bottom: 28px; }
.product-white-sample-add { height: 94px; }
.reference-image-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.product-white-sample-card > .reference-image-preview { height: 100%; }
.product-white-sample-action.reference-select-action {
  position: absolute; left: 0; right: 0; bottom: 0; height: 28px;
  font-size: 10px; font-weight: 700; background: #e3eee7; color: #24543c;
}
.product-white-sample-card.is-selected .reference-select-action { background: #ccebd9; }
.reference-image-replace {
  position: absolute; left: 8px; bottom: 30px; z-index: 2; padding: 5px 8px;
  border: 1px solid #d3e1d9; border-radius: 7px; background: rgba(255,255,255,.94);
  color: #24543c; font-size: 10px; cursor: pointer;
}
.reference-source-replace { margin-top: 8px; }
 .logo-add-intro-thumb { display: block; }
.logo-remove-source-card { display: grid; gap: 7px; min-width: 0; }
.logo-remove-mask-action { padding: 8px; border: 1px solid #d3e1d9; border-radius: 8px; color: #24543c; background: #e5f1ea; cursor: pointer; }
.mm-asset > .reference-image-preview, .motion-pair-cell > .reference-image-preview { width: 100%; height: auto; }
.mm-asset > .reference-image-preview img { width: 100%; height: 100px; object-fit: contain; }
[data-motion="image-preview"] .reference-image-preview img { width: 100%; height: 190px; object-fit: contain; }
.motion-pair-cell .reference-image-preview img { width: 100%; object-fit: contain; }


/* One process display for every image-producing workspace. */
.image-generation-process { width:100%; min-width:0; padding:9px 10px; border:1px solid #d7e5de; border-radius:9px; background:#f3f8f5; color:#345445; font-size:11px; text-align:left; box-sizing:border-box; }
.image-process-steps { display:flex; flex-wrap:wrap; gap:4px 10px; color:#84938b; font-size:10px; }
.image-process-steps .is-done { color:#258259; }
.image-process-steps .is-current { color:#146747; font-weight:700; }
.image-process-details { display:flex; flex-wrap:wrap; justify-content:space-between; gap:5px 10px; margin-top:7px; }
.image-process-total { white-space:nowrap; }
.image-generation-process .image-generation-timing { display:flex; flex-wrap:wrap; margin-top:5px; padding:0; background:transparent; gap:5px 10px; }
.image-process-download { margin-top:7px; display:grid; gap:4px; }
.image-process-download progress { width:100%; height:6px; accent-color:#258259; }
.image-generation-process.is-failed { border-color:#ebcccc; background:#fff6f4; }
.image-generation-process.is-failed .image-process-status { color:#a43c34; }
.image-generation-process.is-complete { background:#f3f8f5; }
.batch-output-placeholder > .image-generation-process,.creative-variation-output-placeholder > .image-generation-process { align-self:stretch; }
.flow-generated-result .image-generation-process { font-size:10px; }
.gc-result-timing:has(.image-generation-process) { padding:0; background:transparent; }
#creative-main-image-process { margin:10px 0; }
@media(max-width:600px){.image-process-steps{gap:4px 7px}.image-generation-process{padding:8px}}

/* Single-product precision subject switch. */
.tryon-precision-subject-heading { flex-wrap: wrap; }
.tryon-precision-subject-toggle { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--ts-line, var(--is-line, var(--line))); border-radius: 9px; background: var(--ts-soft, var(--is-soft, var(--lg-fill, #f6f8f7))); }
.tryon-precision-subject-toggle button { border: 0; border-radius: 6px; padding: 5px 10px; font: inherit; font-size: 11px; color: var(--ts-secondary, var(--is-secondary, var(--muted))); background: transparent; cursor: pointer; }
.tryon-precision-subject-toggle button.active { color: var(--ts-blue, var(--is-blue, var(--lg-accent, #007aff))); background: var(--ts-blue-fill, var(--is-tint, var(--lg-hover))); }
.tryon-precision-subject-toggle button:hover:not(:disabled) { color: var(--ts-blue, var(--is-blue, var(--lg-accent, #007aff))); background: var(--ts-blue-fill, var(--is-tint, var(--lg-hover))); }
.tryon-precision-subject-toggle button:disabled { opacity: .55; cursor: default; }
.tryon-precision-subject-toggle button:focus-visible { outline: 2px solid var(--ts-blue, var(--is-blue, var(--lg-accent, #007aff))); outline-offset: 2px; }

/* AI video nodes share the workbench execution paths. */
.flow-node-ai-video{width:390px}.flow-node-video{width:340px}
.flow-video-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.flow-video-fields label{display:grid;gap:6px;min-width:0}.flow-video-fields label:first-child{grid-column:1/-1}
.flow-video-fields label>span{font-size:12px;color:#859399}
.flow-video-fields select,.flow-video-fields input{box-sizing:border-box;width:100%;min-width:0;height:36px;padding:7px 9px;border:1px solid #65717855;border-radius:9px;background:transparent;color:inherit;font:inherit;font-size:12px}
.flow-video-toggles{display:flex;flex-wrap:wrap;gap:8px 12px;font-size:11px}.flow-video-toggles label{display:flex;align-items:center;gap:4px;white-space:nowrap}.flow-video-toggles input[type=checkbox]{width:14px;height:14px;flex:0 0 14px;margin:0}
.flow-video-preview{display:block;width:100%;max-height:220px;object-fit:contain;background:#101519;border-radius:10px;cursor:default}
.flow-video-loader{display:flex;flex-direction:column;gap:12px;min-width:0}.flow-video-loader>small{overflow-wrap:anywhere}
.flow-node-ai-video .flow-node-body,.flow-node-video .flow-node-body{min-width:0;align-content:start}
.flow-port-video{background:#fff;box-shadow:0 0 0 1px #809099}.flow-edge-video{stroke:#fff}
html.lg-shell.lg-dark :is(.flow-node-ai-video,.flow-node-video) .flow-node-body{color:var(--lg-text,#d4dfeb)!important}
.flow-edge-video{filter:drop-shadow(0 0 1px #52677b)}
html.lg-shell:not(.lg-dark) :is(.flow-node-ai-video,.flow-node-video) .flow-node-download{color:#147a61;border-color:#6eab98}
html.lg-shell:not(.lg-dark) :is(.flow-node-ai-video,.flow-node-video) .flow-node-status[data-status=completed]{color:#147a61}

/* Canvas original preview and explicit regeneration have separate hit areas. */
html.lg-shell #app-view .flow-generated-result > .image-regeneration-media {
  display:flex; flex-direction:column; align-items:stretch;
}
html.lg-shell #app-view .flow-generated-result > .image-regeneration-media > .image-regenerate-hover.image-output-action {
  position:static; inset:auto; transform:none; translate:none;
  width:100%; height:32px; min-height:32px; aspect-ratio:auto;
  opacity:1; pointer-events:auto; border-radius:0; cursor:pointer;
}
