:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #697873;
  --line: #d8e1de;
  --panel: #fbfcfa;
  --paper: #0f1718;
  --teal: #00a99d;
  --teal-dark: #087f78;
  --blue: #2f7cff;
  --amber: #b98b45;
  --red: #b4234b;
  --shadow: 0 18px 42px rgba(2, 8, 12, 0.24);
  --glass-line: rgba(184, 205, 199, 0.22);
  --dark-panel: rgba(17, 28, 30, 0.82);
  --dark-panel-strong: rgba(12, 21, 23, 0.92);
  --app-bg:
    linear-gradient(135deg, rgba(0, 169, 157, 0.16), transparent 38%),
    linear-gradient(315deg, rgba(47, 124, 255, 0.12), transparent 34%),
    linear-gradient(180deg, #101819 0%, #0b1112 100%);
  --card-bg: rgba(251, 252, 250, 0.96);
  --brand-bg: rgba(12, 21, 23, 0.92);
  --brand-text: #f4fbf8;
  --button-bg: linear-gradient(135deg, #008f86, #00b7a8);
  --button-hover: linear-gradient(135deg, #087f78, #009c91);
  --tab-bg: rgba(20, 32, 34, 0.84);
  --tab-color: #d9e7e2;
  --tab-active-bg: linear-gradient(135deg, #00a99d, #2f7cff);
  --workspace-head-bg: linear-gradient(180deg, #ffffff, #f7faf9);
  --focus-ring: rgba(0, 169, 157, 0.14);
  --editor-line: rgba(0, 169, 157, 0.055);
}

body[data-theme="clean"] {
  --ink: #182522;
  --muted: #60716b;
  --line: #d7e0dd;
  --teal: #007f75;
  --teal-dark: #08675f;
  --blue: #2f6feb;
  --amber: #9b6b2f;
  --shadow: 0 12px 30px rgba(31, 45, 42, 0.1);
  --glass-line: #d7e0dd;
  --app-bg:
    linear-gradient(180deg, #f4f7f6 0%, #edf2f0 100%);
  --card-bg: rgba(255, 255, 255, 0.96);
  --brand-bg: #ffffff;
  --brand-text: #14201d;
  --button-bg: linear-gradient(135deg, #007f75, #0a9a8e);
  --button-hover: linear-gradient(135deg, #08675f, #087f75);
  --tab-bg: #ffffff;
  --tab-color: #24342f;
  --tab-active-bg: linear-gradient(135deg, #007f75, #2f6feb);
  --workspace-head-bg: linear-gradient(180deg, #ffffff, #f8faf9);
  --focus-ring: rgba(0, 127, 117, 0.13);
  --editor-line: rgba(0, 127, 117, 0.045);
}

body[data-theme="gold"] {
  --ink: #211b14;
  --muted: #756a5d;
  --line: #e2d8c8;
  --teal: #106c65;
  --teal-dark: #0b534e;
  --blue: #315d9f;
  --amber: #b5833f;
  --shadow: 0 18px 42px rgba(18, 13, 8, 0.2);
  --glass-line: rgba(221, 198, 160, 0.32);
  --app-bg:
    linear-gradient(135deg, rgba(181, 131, 63, 0.16), transparent 36%),
    linear-gradient(315deg, rgba(16, 108, 101, 0.13), transparent 34%),
    linear-gradient(180deg, #17130f 0%, #0f0d0a 100%);
  --card-bg: rgba(255, 252, 246, 0.96);
  --brand-bg: rgba(25, 19, 13, 0.92);
  --brand-text: #fff7e8;
  --button-bg: linear-gradient(135deg, #8f652f, #b5833f);
  --button-hover: linear-gradient(135deg, #775226, #9f7337);
  --tab-bg: rgba(32, 25, 17, 0.86);
  --tab-color: #eee0ca;
  --tab-active-bg: linear-gradient(135deg, #b5833f, #106c65);
  --workspace-head-bg: linear-gradient(180deg, #fffdf8, #faf4ea);
  --focus-ring: rgba(181, 131, 63, 0.16);
  --editor-line: rgba(181, 131, 63, 0.052);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  background: var(--app-bg);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

.suite-shell {
  display: grid;
  grid-template-columns: 360px minmax(520px, 1fr) 420px;
  gap: 14px;
  height: 100vh;
  padding: 14px;
}

.left-rail,
.right-rail,
.main-workbench {
  min-height: 0;
  overflow: auto;
}

.brand,
.side-card,
.workspace-card,
.progress-panel,
.dialog-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  margin-bottom: 12px;
  border-color: var(--glass-line);
  background: var(--brand-bg);
  color: var(--brand-text);
}

.brand-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.16), 0 10px 28px rgba(0, 169, 157, 0.28);
}

.theme-switch {
  display: block;
  flex: 0 0 auto;
}

.theme-switch span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.theme-switch select {
  width: 76px;
  height: 30px;
  padding: 4px 7px;
  border-color: var(--glass-line);
  background: rgba(255, 255, 255, 0.94);
  font-size: 12px;
}

h1, h2, p { margin: 0; }
h1 { font-size: 18px; line-height: 1.25; }
h2 { font-size: 18px; }
p { color: var(--muted); line-height: 1.55; }

.side-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  margin-bottom: 12px;
  border-color: rgba(218, 229, 225, 0.72);
}

.account-card {
  gap: 10px;
  border-color: rgba(214, 182, 109, 0.32);
  background:
    linear-gradient(180deg, rgba(15, 29, 45, 0.98), rgba(8, 21, 37, 0.98));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

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

.account-actions button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 36px;
  padding: 0 6px;
  border-color: rgba(148, 163, 184, 0.26);
  background: rgba(8, 21, 37, 0.72);
  color: #e5eefb;
  box-shadow: none;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-actions button:hover {
  border-color: rgba(72, 211, 255, 0.44);
  background: rgba(14, 40, 63, 0.92);
  color: #f8fbff;
}

.account-actions #subscribeBtn {
  flex: 1.65 1 0;
}

.account-actions #accountExpireBtn {
  flex: 1.25 1 0;
}

.account-actions #logoutBtn {
  flex: 0 0 64px;
}

.auth-mode-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.auth-mode-row button {
  min-height: 34px;
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(8, 21, 37, 0.72);
  color: #cbd5e1;
  box-shadow: none;
}

.auth-mode-row button.active {
  border-color: rgba(45, 182, 255, 0.55);
  background: rgba(45, 182, 255, 0.14);
  color: #e8f7ff;
}

.brain-center-btn {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 88px;
  min-height: 34px;
  padding: 0 12px;
  border-color: rgba(214, 182, 109, 0.48);
  background:
    linear-gradient(135deg, rgba(214, 182, 109, 0.22), rgba(45, 182, 255, 0.14)),
    rgba(8, 21, 37, 0.86);
  color: #ffe7a8;
  box-shadow: 0 12px 28px rgba(214, 182, 109, 0.14);
  font-size: 12px;
}

.member-profile-box {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  padding: 12px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(214, 182, 109, 0.22), transparent 54%),
    linear-gradient(90deg, transparent, rgba(214, 182, 109, 0.10), transparent);
  overflow: hidden;
}

.member-profile-box::before,
.member-profile-box::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214, 182, 109, 0.66), transparent);
}

.member-profile-box::before { top: 4px; }
.member-profile-box::after { bottom: 4px; }

.member-stat {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 9px 8px;
  border: 1px solid rgba(214, 182, 109, 0.18);
  border-radius: 8px;
  background: rgba(8, 21, 37, 0.44);
}

.member-profile-box span {
  color: #b7c6d8;
  font-size: 12px;
}

.member-profile-box strong {
  min-width: 0;
  color: #ffe7a8;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.member-profile-box strong.ok {
  color: #48d3ff;
}

.account-actions button.gold {
  border-color: rgba(214, 182, 109, 0.58);
  background: rgba(214, 182, 109, 0.12);
  color: #f2d997;
}

.membership-dialog,
.payment-dialog,
.partner-dialog {
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overflow-x: hidden;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(214, 182, 109, 0.32);
  background: #0f1d2d;
  color: #e5eefb;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.api-dialog {
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overflow-x: hidden;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(214, 182, 109, 0.32);
  background: #0f1d2d;
  color: #e5eefb;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

#membershipDialog,
#paymentDialog,
#partnerDialog,
#apiDialog {
  width: min(460px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

#membershipDialog {
  width: min(920px, calc(100vw - 64px));
}

#membershipDialog[data-mode="login"],
#membershipDialog[data-mode="register"],
#membershipDialog[data-mode="activation"] {
  width: min(560px, calc(100vw - 64px));
}

#paymentDialog {
  width: min(620px, calc(100vw - 64px));
}

#partnerDialog {
  width: min(760px, calc(100vw - 64px));
}

#membershipDialog::backdrop,
#paymentDialog::backdrop,
#partnerDialog::backdrop,
#apiDialog::backdrop {
  background: rgba(0, 0, 0, 0.54);
  backdrop-filter: blur(10px);
}

.membership-dialog > .section-head,
.payment-dialog > .section-head,
.partner-dialog > .section-head,
.api-dialog > .section-head {
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  position: relative;
  text-align: center;
}

.membership-dialog h2,
.payment-dialog h2,
.partner-dialog h2,
.api-dialog h2 {
  margin: 0;
  color: #f8fbff;
  font-size: 24px;
  letter-spacing: 0;
}

.membership-dialog .hint,
.payment-dialog .hint,
.partner-dialog .hint,
.api-dialog .hint {
  color: #94a3b8;
}

.membership-dialog .hint:empty,
.payment-dialog .hint:empty,
.partner-dialog .hint:empty,
.api-dialog .hint:empty {
  display: none;
}

#closeMembershipBtn,
#closePaymentBtn,
#closePartnerDialogBtn,
#closeApiDialogBtn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border-color: rgba(148, 163, 184, 0.25);
  background: #081525;
  color: #e5e7eb;
  font-size: 20px;
  line-height: 1;
}

.partner-chip {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 34px;
  max-width: 220px;
  padding: 0 12px;
  border: 1px solid rgba(72, 211, 255, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(72, 211, 255, 0.14), rgba(214, 182, 109, 0.14)),
    rgba(8, 21, 37, 0.78);
  color: #a6f4ff;
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.partner-ledger-btn {
  left: auto;
  right: 62px;
  color: #ffe7a8;
}

.member-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 0;
  background: transparent;
}

.membership-dialog[data-mode="login"] .plan-panel,
.membership-dialog[data-mode="login"] .activation-panel,
.membership-dialog[data-mode="register"] .plan-panel,
.membership-dialog[data-mode="register"] .activation-panel,
.membership-dialog[data-mode="register"] .member-panel-head,
.membership-dialog[data-mode="register"] .member-profile-box,
.membership-dialog[data-mode="register"] .auth-mode-row,
.membership-dialog[data-logged-in="false"] .member-profile-box,
.membership-dialog[data-mode="account"][data-logged-in="false"] .plan-panel,
.membership-dialog[data-mode="account"][data-logged-in="false"] .activation-panel,
.membership-dialog[data-mode="pay"] .auth-panel,
.membership-dialog[data-mode="activation"] .auth-panel,
.membership-dialog[data-mode="activation"] .plan-panel {
  display: none;
}

.membership-dialog[data-logged-in="true"] .auth-mode-row,
.membership-dialog[data-logged-in="true"] .auth-panel > .member-panel-head,
.membership-dialog[data-logged-in="true"] .member-form-grid,
.membership-dialog[data-logged-in="true"] .auth-remember-row,
.membership-dialog[data-logged-in="true"] #authPassword2Wrap,
.membership-dialog[data-logged-in="true"] #authSubmitBtn {
  display: none;
}

.membership-dialog[data-mode="pay"] .activation-panel {
  border-bottom: 0;
}

.member-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.member-panel h3 {
  margin: 0;
  color: #f8fbff;
  font-size: 16px;
}

.member-form-grid,
.activation-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.activation-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.plan-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.plan-panel > .member-panel-head,
.activation-panel > .member-panel-head {
  display: none;
}

#payDialogStatus.credit-use-hint {
  display: block;
  margin: -2px 2px 0;
  padding: 8px 10px;
  border: 1px solid rgba(242, 200, 121, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(242, 200, 121, 0.18), rgba(183, 129, 53, 0.12)),
    rgba(255, 231, 168, 0.08);
  color: #ffe7a8;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.plan-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  min-width: 0;
  min-height: 210px;
  padding: 12px;
  border: 1px solid rgba(214, 182, 109, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(23, 44, 65, 0.92), rgba(8, 21, 37, 0.92)),
    rgba(8, 21, 37, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.plan-card::after {
  content: "";
  position: absolute;
  inset: -60% auto auto 55%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 200, 121, 0.16), transparent 68%);
  pointer-events: none;
}

.plan-card.boost-plan {
  grid-column: auto;
  min-height: 210px;
  border-color: rgba(82, 236, 255, 0.46);
  background:
    linear-gradient(135deg, rgba(82, 236, 255, 0.16) 0 12%, transparent 12% 100%),
    radial-gradient(circle at 18% 18%, rgba(82, 236, 255, 0.34), transparent 30%),
    radial-gradient(circle at 88% 16%, rgba(248, 214, 108, 0.24), transparent 30%),
    linear-gradient(145deg, rgba(8, 55, 67, 0.98), rgba(5, 22, 35, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 34px rgba(72, 211, 255, 0.18);
}

.plan-topline,
.payment-title,
.payment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plan-name-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.plan-icon {
  display: grid;
  place-items: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f7d78b, #b78135);
  color: #151006;
  font-weight: 900;
  box-shadow: 0 0 22px rgba(242, 200, 121, 0.26);
}

.boost-plan .plan-icon {
  background: linear-gradient(135deg, #66e8ff, #f8d66c 48%, #b78135);
  box-shadow:
    0 0 18px rgba(72, 211, 255, 0.38),
    0 0 34px rgba(242, 200, 121, 0.24);
}

.boost-plan .plan-badge {
  background: rgba(72, 211, 255, 0.14);
  color: #a6f4ff;
}

.boost-plan button {
  background: linear-gradient(135deg, #1396a8, #b78135);
  box-shadow:
    0 14px 30px rgba(72, 211, 255, 0.16),
    0 10px 26px rgba(183, 129, 53, 0.14);
}

.year-plan .plan-icon {
  background: linear-gradient(135deg, #ffe6a3, #d6a651 45%, #8c5f22);
}

.plan-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.plan-card b {
  color: #fff7dc;
  font-size: 14px;
}

.plan-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(242, 200, 121, 0.14);
  color: #ffd980;
  font-size: 12px;
  font-weight: 800;
}

.plan-price-box {
  display: grid;
  justify-items: end;
  gap: 1px;
}

.plan-price-box del {
  color: rgba(148, 163, 184, 0.84);
  font-size: 12px;
  text-decoration-color: rgba(248, 113, 113, 0.85);
}

.plan-credits {
  display: inline-flex;
  width: fit-content;
  justify-self: center;
  align-items: baseline;
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(72, 211, 255, 0.10);
  color: #7ee3ff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
  box-shadow: inset 0 0 0 1px rgba(72, 211, 255, 0.18);
}

.boost-plan .plan-credits {
  background: rgba(255, 231, 168, 0.12);
  color: #ffe7a8;
}

.plan-main span,
.plan-card em,
.plan-card small,
.order-info p {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.plan-card button {
  align-self: end;
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  font-size: 15px;
  letter-spacing: 0;
  box-shadow: 0 12px 28px rgba(183, 129, 53, 0.18);
}

.plan-price-box strong {
  color: #48d3ff;
  font-size: 21px;
  white-space: nowrap;
}

.order-info {
  display: grid;
  gap: 12px;
}

.payment-dialog {
  padding: 0;
}

.payment-dialog .order-info,
.partner-dialog-info {
  padding: 16px;
}

.partner-dialog-info {
  display: grid;
  gap: 12px;
}

.payment-box {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(214, 182, 109, 0.38);
  border-radius: 8px;
  background:
    radial-gradient(circle at 24% 0%, rgba(72, 211, 255, 0.12), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(242, 200, 121, 0.16), transparent 26%),
    linear-gradient(145deg, rgba(15, 29, 45, 0.98), rgba(6, 18, 32, 0.98));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
}

.payment-title span {
  display: block;
  color: #f2d997;
  font-weight: 900;
}

.payment-title b {
  display: block;
  margin-top: 3px;
  color: #e5eefb;
  font-size: 13px;
}

.payment-title strong {
  color: #48d3ff;
  font-size: 24px;
}

.payment-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.payment-qr {
  display: grid;
  place-items: center;
  width: 260px;
  aspect-ratio: 1;
  border: 1px solid rgba(214, 182, 109, 0.45);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  text-align: center;
}

.payment-qr img {
  width: 230px;
  height: 230px;
  object-fit: contain;
}

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

.payment-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.order-info a,
.payment-actions button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid rgba(214, 182, 109, 0.38);
  background: rgba(183, 129, 53, 0.96);
  color: #fff7dc;
  font-weight: 800;
  text-decoration: none;
}

.payment-actions button.secondary {
  background: rgba(240, 246, 242, 0.94);
  color: #10201c;
}

@media (max-width: 420px) {
  #membershipDialog {
    width: min(460px, calc(100vw - 32px));
  }

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

  .payment-body {
    grid-template-columns: 1fr;
  }

  .payment-qr {
    width: 170px;
    margin: 0 auto;
  }
}

.partner-info,
.partner-ledger,
.partner-list {
  display: grid;
  gap: 10px;
}

.partner-code-box {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(72, 211, 255, 0.28);
  border-radius: 8px;
  background: rgba(8, 21, 37, 0.70);
}

.partner-code-box span,
.partner-code-box small,
.partner-row span,
.partner-row em {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.partner-code-box strong {
  color: #48d3ff;
  font-size: 20px;
  letter-spacing: 0;
}

.partner-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.partner-stats span,
.partner-row {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
}

.partner-stats b,
.partner-row b,
.partner-list h4 {
  color: #f8fbff;
}

.partner-list h4 {
  margin: 4px 0 0;
  font-size: 14px;
}

.settings-panel {
  display: grid;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.account-card .settings-panel label span,
.account-card .settings-panel .hint {
  color: #d6e2f0;
}

.membership-dialog label span,
.api-dialog label span {
  color: #dbe7f6;
}

.membership-dialog .required,
.api-dialog .required {
  color: #ff7d7d;
  margin-right: 2px;
}

.membership-dialog input,
.api-dialog input,
.api-dialog select {
  border-color: rgba(219, 234, 254, 0.78);
  background: #081525;
  color: #f8fbff;
}

.membership-dialog input::placeholder,
.api-dialog input::placeholder {
  color: #94a3b8;
}

.auth-remember-row {
  justify-content: flex-start;
  color: #b7c6d8;
}

.auth-remember-row span {
  color: #b7c6d8;
  font-weight: 700;
}

.auth-remember-row input {
  accent-color: #d6b66d;
}

.membership-dialog .wide-btn,
.membership-dialog .button-row button:first-child,
.api-dialog .button-row button:first-child {
  background: linear-gradient(135deg, #1d8ed8, #2db6ff);
  box-shadow: 0 16px 34px rgba(29, 142, 216, 0.24);
}

.section-head,
.workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.workspace-head {
  align-items: center;
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

label { display: grid; gap: 6px; }
label span { font-size: 13px; font-weight: 800; color: #263431; }
.required,
.recommended {
  margin-right: 3px;
  font-weight: 900;
}
.required { color: #e53935; }
.recommended { color: #13a66b; }
.label-note {
  margin-left: 6px;
  color: #6c7a74;
  font-size: 12px;
  font-weight: 700;
}
.label-note.optional { font-weight: 600; }

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8faf9;
  color: var(--ink);
  outline: none;
  padding: 10px 11px;
  font: inherit;
  line-height: 1.45;
}

textarea { resize: vertical; }
input:focus, textarea:focus, select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  padding: 0 13px;
  background: var(--button-bg);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(0, 137, 128, 0.22);
}
button:hover { background: var(--button-hover); }
button:disabled { opacity: 0.62; cursor: wait; }
.secondary, .ghost {
  border: 1px solid var(--line);
  background: #eef4f2;
  color: var(--ink);
  box-shadow: none;
}
.secondary:hover, .ghost:hover { background: #e2ece8; }

.button-row,
.toolbar,
.asset-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar {
  justify-content: flex-end;
}

.toolbar button {
  min-height: 34px;
  padding: 0 11px;
}

.compact-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.compact-actions button {
  width: 100%;
  min-height: 30px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-panel #brainStatus {
  font-size: 11px;
  line-height: 1.45;
}

.folder-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f7faf9;
}

.folder-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hint { font-size: 12px; }
.ok { color: var(--teal-dark); }
.error { color: var(--red); }
.hidden { display: none !important; }

.upload-rule-alert {
  display: grid;
  gap: 4px;
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid rgba(183, 122, 25, 0.42);
  border-radius: 6px;
  background: rgba(255, 248, 232, 0.92);
  color: #3d2b12;
  font-size: 13px;
  line-height: 1.5;
}

.upload-rule-alert strong {
  color: #8a4f08;
  font-size: 14px;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
  gap: 8px;
  min-height: 88px;
  align-items: center;
  padding: 8px;
  border: 1px dashed #aebfba;
  border-radius: 8px;
  background: #f9fbfa;
  text-align: center;
  color: var(--muted);
}
.thumb-grid figure { margin: 0; display: grid; gap: 4px; }
.thumb-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #111; }
.thumb-grid figcaption { font-size: 12px; color: var(--muted); }

.image-requirements {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.image-requirements li::marker {
  color: var(--teal);
}

.main-workbench {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.module-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.tab {
  min-width: 0;
  min-height: 42px;
  padding: 0 8px;
  background: var(--tab-bg);
  color: var(--tab-color);
  border: 1px solid var(--glass-line);
  box-shadow: none;
  font-size: 13px;
  white-space: nowrap;
}
.tab.active {
  background: var(--tab-active-bg);
  color: #fff;
  border-color: rgba(255,255,255,0.18);
}

.workspace-card {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  min-height: 0;
}
.workspace-head {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--workspace-head-bg);
}
.eyebrow {
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.module-focus {
  display: inline-flex;
  width: fit-content;
  margin-top: 7px;
  padding: 5px 8px;
  border: 1px solid rgba(0, 169, 157, 0.18);
  border-radius: 7px;
  background: rgba(0, 169, 157, 0.07);
  color: var(--teal-dark);
  font-size: 12px;
  line-height: 1.35;
}

.module-extra-panel {
  display: grid;
  gap: 10px;
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 250, 249, 0.82);
}

.module-extra-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.module-extra-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.module-extra-head p {
  font-size: 12px;
}

.module-extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.module-extra-field textarea {
  min-height: 76px;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.comparison-grid textarea {
  min-height: 92px;
}

.wide-field {
  grid-column: 1 / -1;
}

.result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
}

.result-actions span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.result-actions button {
  min-height: 32px;
  padding: 0 14px;
}

.result-editor {
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 18px;
  background:
    linear-gradient(rgba(255,255,255,0.92), rgba(255,255,255,0.92)),
    repeating-linear-gradient(0deg, transparent, transparent 31px, var(--editor-line) 32px);
  font-size: 15px;
  line-height: 1.72;
}

.module-downloads {
  display: grid;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 0 0 8px 8px;
}

.module-downloads:empty {
  display: none;
}

.module-download-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.module-download-head button {
  min-height: 32px;
  padding: 0 14px;
}

.module-download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.download-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.download-card img,
.download-card video {
  width: 100%;
  max-height: 220px;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 7px;
  background: #111;
}

.download-card p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.download-card a {
  display: inline-grid;
  place-items: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #eef4f2;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.module-case-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  border-color: rgba(181, 131, 63, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(250, 244, 234, 0.96));
}

.case-kicker {
  width: fit-content;
  padding: 4px 9px;
  border: 1px solid rgba(0, 169, 157, 0.2);
  border-radius: 999px;
  background: rgba(0, 169, 157, 0.08);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.module-case-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.25;
}

.case-product {
  padding: 10px 12px;
  border: 1px solid rgba(181, 131, 63, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.45;
}

.case-intro {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.case-tags span {
  padding: 4px 8px;
  border: 1px solid rgba(181, 131, 63, 0.32);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
}

.case-list {
  display: grid;
  gap: 10px;
}

.case-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.case-item b {
  color: var(--teal-dark);
  font-size: 13px;
}

.case-item p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.72;
}

.right-preview-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 360px;
  border-color: rgba(181, 131, 63, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(250, 244, 234, 0.96));
}

.right-preview-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.28;
}

.preview-card-grid,
.right-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.right-product-refs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.right-product-refs img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.preview-card,
.right-media-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.preview-visual {
  display: grid;
  place-items: end start;
  min-height: 96px;
  padding: 10px;
  border-radius: 7px;
  color: #fff;
  font-weight: 900;
  background:
    linear-gradient(135deg, rgba(16, 108, 101, 0.92), rgba(181, 131, 63, 0.86));
}

.preview-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #111;
  object-fit: cover;
  display: block;
}

.preview-visual.tone-2 {
  background:
    linear-gradient(135deg, rgba(49, 93, 159, 0.92), rgba(16, 108, 101, 0.86));
}

.preview-visual.tone-3 {
  background:
    linear-gradient(135deg, rgba(33, 27, 20, 0.94), rgba(181, 131, 63, 0.82));
}

.preview-visual.tone-4 {
  background:
    linear-gradient(135deg, rgba(126, 58, 99, 0.9), rgba(49, 93, 159, 0.86));
}

.preview-card b,
.right-media-card p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.preview-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.right-media-card img,
.right-media-card video {
  width: 100%;
  max-height: 180px;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 7px;
  background: #111;
}

.right-media-card a {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #eef4f2;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.tips-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid rgba(0, 169, 157, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 169, 157, 0.13), rgba(47, 124, 255, 0.08)),
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246,250,249,0.94));
}

.tips-hero::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -58px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 124, 255, 0.16), transparent 64%);
  pointer-events: none;
}

.tips-hero h3 {
  margin: 3px 0 4px;
  font-size: 18px;
}

.tips-hero p {
  max-width: 980px;
  color: var(--muted);
  font-size: 12px;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.tip-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(216, 225, 222, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,250,0.96));
  padding: 12px 12px 11px 44px;
  box-shadow: 0 10px 22px rgba(15, 27, 26, 0.06);
}

.tip-card::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.tip-card.anchor::before { content: "1"; background: linear-gradient(135deg, #00a99d, #2f7cff); }
.tip-card.control::before { content: "2"; background: linear-gradient(135deg, #315d9f, #00a99d); }
.tip-card.deal::before { content: "3"; background: linear-gradient(135deg, #b5833f, #106c65); }
.tip-card.camera::before { content: "4"; background: linear-gradient(135deg, #2f7cff, #7b61ff); }
.tip-card.danger::before { content: "5"; background: linear-gradient(135deg, #b4234b, #d46a7d); }
.tip-card.script::before { content: "6"; background: linear-gradient(135deg, #106c65, #b5833f); }

.tip-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: rgba(0, 169, 157, 0.5);
}

.tip-card.control::after { background: rgba(49, 93, 159, 0.5); }
.tip-card.deal::after { background: rgba(181, 131, 63, 0.58); }
.tip-card.camera::after { background: rgba(47, 124, 255, 0.5); }
.tip-card.danger::after { background: rgba(180, 35, 75, 0.62); }
.tip-card.script::after { background: rgba(16, 108, 101, 0.56); }

.tip-card:hover {
  border-color: rgba(0, 169, 157, 0.22);
  transform: translateY(-1px);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.tip-card h4 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 15px;
}

.tip-card ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 16px;
}

.tip-card li,
.tip-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.tip-card.danger {
  border-color: rgba(180, 35, 75, 0.28);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,248,250,0.96));
}

.tip-card.script {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,249,255,0.96));
}

.live-tips-dialog {
  position: relative;
  width: 100%;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px;
}

.live-tips-close {
  position: sticky;
  top: 0;
  z-index: 3;
  justify-self: end;
  min-width: 72px;
  background: #ffffff;
  border-color: rgba(0, 169, 157, 0.28);
  box-shadow: 0 8px 18px rgba(8, 30, 28, 0.12);
}

#liveTipsDialog {
  width: min(1180px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  max-height: calc(100vh - 20px);
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 24px 70px rgba(4, 10, 12, 0.32);
}

.asset-tab {
  flex: 1;
  min-height: 34px;
  background: #eef4f2;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.asset-tab.active { background: var(--button-bg); color: #fff; }
.asset-list, .shot-list { display: grid; gap: 10px; }
.asset-card, .shot-card, .empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 10px;
}
.asset-card img, .asset-card video {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 7px;
  background: #111;
}
.asset-card p, .shot-card p { font-size: 13px; }
.shot-card.selected { border-color: var(--teal); box-shadow: inset 0 0 0 1px rgba(0, 169, 157, 0.2); }
.shot-card textarea { min-height: 92px; font-size: 13px; }
.task-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.mini-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.mini-actions button {
  min-height: 32px;
  padding: 7px 10px;
  white-space: nowrap;
}
.quality-note {
  display: grid;
  gap: 5px;
  margin: 6px 0;
  padding: 9px 10px;
  border: 1px solid rgba(181, 131, 63, 0.28);
  border-radius: 8px;
  background: rgba(255, 248, 235, 0.84);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
}
.quality-note b {
  font-size: 13px;
}
.quality-note.pass {
  border-color: rgba(0, 169, 157, 0.35);
  background: rgba(226, 249, 244, 0.78);
}
.quality-note.warn {
  border-color: rgba(196, 74, 51, 0.38);
  background: rgba(255, 239, 235, 0.8);
}
.quality-note.muted {
  color: var(--muted);
}
.quality-note ul {
  margin: 0;
  padding-left: 18px;
}
.quality-note p,
.quality-note span {
  margin: 0;
}
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: 18px; height: 18px; }
.wide-btn { width: 100%; }

.progress-panel {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 90;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 18px 22px;
  align-items: center;
  width: min(760px, calc(100vw - 32px));
  padding: 30px 34px;
  border: 1px solid rgba(214, 182, 109, 0.78);
  background:
    linear-gradient(180deg, rgba(15, 17, 23, 0.98), rgba(9, 12, 18, 0.98));
  color: #f8ead0;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52), inset 0 0 0 1px rgba(214, 182, 109, 0.16);
}

.progress-panel::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(214, 182, 109, 0.48);
  pointer-events: none;
}

.worker-orbit {
  position: relative;
  width: 58px;
  height: 58px;
  justify-self: center;
  margin-left: 45px;
  border: 1px solid rgba(214, 182, 109, 0.68);
  border-radius: 50%;
  animation: spin 2.2s linear infinite;
}

.worker-orbit span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px;
  border-radius: 50%;
  background: #d6b66d;
  box-shadow: 0 0 10px rgba(214, 182, 109, 0.45);
}

.worker-orbit span:nth-child(1) { transform: rotate(0deg) translate(35px); opacity: 1; }
.worker-orbit span:nth-child(2) { transform: rotate(30deg) translate(35px); opacity: 0.92; }
.worker-orbit span:nth-child(3) { transform: rotate(60deg) translate(35px); opacity: 0.84; }
.worker-orbit span:nth-child(4) { transform: rotate(90deg) translate(35px); opacity: 0.76; }
.worker-orbit span:nth-child(5) { transform: rotate(120deg) translate(35px); opacity: 0.68; }
.worker-orbit span:nth-child(6) { transform: rotate(150deg) translate(35px); opacity: 0.6; }
.worker-orbit span:nth-child(7) { transform: rotate(180deg) translate(35px); opacity: 0.52; }
.worker-orbit span:nth-child(8) { transform: rotate(210deg) translate(35px); opacity: 0.48; }
.worker-orbit span:nth-child(9) { transform: rotate(240deg) translate(35px); opacity: 0.56; }
.worker-orbit span:nth-child(10) { transform: rotate(270deg) translate(35px); opacity: 0.66; }
.worker-orbit span:nth-child(11) { transform: rotate(300deg) translate(35px); opacity: 0.78; }
.worker-orbit span:nth-child(12) { transform: rotate(330deg) translate(35px); opacity: 0.9; }

.worker-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
  text-align: center;
}

.worker-kicker {
  color: #d6b66d;
  font-size: 15px;
  font-weight: 900;
}

.progress-panel strong {
  color: #fff7e8;
  font-size: 18px;
  line-height: 1.3;
}

.progress-panel h2 {
  color: #f4c76f;
  font-size: 30px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.progress-panel p {
  color: #f2e4cd;
  font-size: 16px;
  font-weight: 800;
}

.progress-panel .worker-eta {
  color: #d9c5a1;
  font-size: 14px;
  font-weight: 700;
}
.progress-track {
  grid-column: 1 / -1;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(214, 182, 109, 0.16);
}
#progressBar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9b6b2f, #d6b66d, #106c65);
  transition: width 0.35s ease;
}

.worker-cancel {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(214, 182, 109, 0.22);
  background: rgba(54, 20, 8, 0.72);
  color: #f3e7d0;
  box-shadow: none;
}

.worker-cancel:hover {
  background: rgba(74, 29, 12, 0.84);
}

.progress-panel.done .worker-orbit {
  animation-duration: 0.9s;
  border-color: rgba(64, 190, 153, 0.72);
}

.progress-panel.done #progressBar {
  background: linear-gradient(90deg, #106c65, #38c99a);
}

.progress-panel.failed .worker-orbit {
  border-color: rgba(180, 35, 75, 0.72);
}

.progress-panel.failed #progressBar {
  background: linear-gradient(90deg, #b4234b, #d46a7d);
}
@keyframes spin { to { transform: rotate(360deg); } }

dialog {
  width: min(760px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  background: transparent;
}
dialog::backdrop { background: rgba(20, 32, 29, 0.34); }
.dialog-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

@media (min-width: 1600px) {
  .suite-shell {
    grid-template-columns: 380px minmax(620px, 1fr) 440px;
    gap: 16px;
    padding: 16px;
  }

  .result-editor { font-size: 16px; }
}

@media (max-width: 1440px) {
  .suite-shell {
    grid-template-columns: 340px minmax(460px, 1fr) 380px;
    gap: 12px;
    padding: 12px;
  }

  .tab {
    min-height: 40px;
    padding: 0 6px;
    font-size: 12px;
  }
}

@media (max-width: 1280px) {
  .suite-shell {
    grid-template-columns: 300px minmax(420px, 1fr) 320px;
    gap: 10px;
    padding: 10px;
  }

  .brand,
  .side-card { padding: 12px; }

  .brand-logo {
    width: 38px;
    height: 38px;
  }

  h1 { font-size: 16px; }
  h2 { font-size: 16px; }
  label span { font-size: 12px; }

  input,
  textarea,
  select {
    padding: 8px 9px;
  }

  button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }

  .theme-switch select {
    width: 72px;
    height: 28px;
    font-size: 12px;
  }

  .module-tabs { gap: 6px; }
  .tab {
    min-height: 36px;
    padding: 0 4px;
    font-size: 11px;
  }

  .workspace-head { padding: 12px; }
  .result-editor {
    padding: 14px;
    font-size: 14px;
  }

  .asset-card img,
  .asset-card video {
    max-height: 210px;
  }
}

@media (max-width: 1080px) {
  body { overflow: auto; }

  .suite-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }

  .left-rail,
  .right-rail,
  .main-workbench {
    overflow: visible;
  }

  .main-workbench {
    min-height: 680px;
  }

  .right-rail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .result-editor { min-height: 460px; }
}

@media (max-width: 760px) {
  .suite-shell { padding: 8px; }
  .right-rail { grid-template-columns: 1fr; }
  .comparison-grid { grid-template-columns: 1fr; }
  .progress-panel {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 14px;
    padding: 26px 22px;
  }
  .worker-orbit {
    width: 72px;
    height: 72px;
  }
  .worker-orbit span {
    width: 9px;
    height: 9px;
    margin: -4.5px;
  }
  .worker-orbit span:nth-child(1) { transform: rotate(0deg) translate(44px); }
  .worker-orbit span:nth-child(2) { transform: rotate(30deg) translate(44px); }
  .worker-orbit span:nth-child(3) { transform: rotate(60deg) translate(44px); }
  .worker-orbit span:nth-child(4) { transform: rotate(90deg) translate(44px); }
  .worker-orbit span:nth-child(5) { transform: rotate(120deg) translate(44px); }
  .worker-orbit span:nth-child(6) { transform: rotate(150deg) translate(44px); }
  .worker-orbit span:nth-child(7) { transform: rotate(180deg) translate(44px); }
  .worker-orbit span:nth-child(8) { transform: rotate(210deg) translate(44px); }
  .worker-orbit span:nth-child(9) { transform: rotate(240deg) translate(44px); }
  .worker-orbit span:nth-child(10) { transform: rotate(270deg) translate(44px); }
  .worker-orbit span:nth-child(11) { transform: rotate(300deg) translate(44px); }
  .worker-orbit span:nth-child(12) { transform: rotate(330deg) translate(44px); }
  .progress-panel h2 { font-size: 22px; }
  .progress-panel p { font-size: 14px; }
  .member-form-grid,
  .activation-row,
  .plan-list { grid-template-columns: 1fr; }
  .module-tabs {
    grid-template-columns: repeat(6, minmax(96px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .workspace-head { display: grid; }
  .toolbar { align-items: stretch; }
  .toolbar button { flex: 1 1 140px; }
  .two { grid-template-columns: 1fr; }
  .tips-hero { display: grid; }
  .tips-grid { grid-template-columns: 1fr; }
}
