:root {
  --bg: #f3f3f3;
  --panel: #ffffff;
  --rail: #f8f8f8;
  --ink: #20262d;
  --muted: #87909a;
  --line: #e0e4e7;
  --primary: #126c62;
  --primary-2: #2c5f9f;
  --soft: #edf6f4;
  --shadow: 0 16px 40px rgba(22, 32, 38, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1100px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button.show-toast {
  position: relative;
}

button.show-toast::after {
  position: absolute;
  z-index: 80;
  left: 50%;
  bottom: calc(100% + 10px);
  min-width: max-content;
  max-width: 320px;
  padding: 9px 13px;
  border-radius: 8px;
  color: #fff;
  background: #050608;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
  content: attr(data-toast-text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  pointer-events: none;
  transform: translateX(-50%);
  white-space: nowrap;
}

.front-shell {
  display: grid;
  min-height: 100vh;
  background: var(--bg);
}

.home-shell {
  grid-template-columns: 64px minmax(0, 1fr);
}

.agent-shell {
  grid-template-columns: 64px 310px minmax(0, 1fr);
}

.agent-shell.history-collapsed {
  grid-template-columns: 64px minmax(0, 1fr);
}

.tool-shell {
  grid-template-columns: 64px minmax(0, 1fr);
}

.front-rail {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 16px;
  padding: 16px 0 12px;
  background: var(--rail);
  border-right: 1px solid var(--line);
}

.front-logo,
.user-mini {
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  font-weight: 900;
}

.front-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 13px;
  background: #0756c8;
  box-shadow: 0 8px 18px rgba(0, 76, 180, 0.16);
}

.front-logo img,
.user-mini img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.front-rail nav {
  display: grid;
  width: 100%;
  gap: 15px;
  margin-top: 34px;
}

.front-nav-item {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: #65727d;
  font-size: 12px;
  font-weight: 700;
}

.front-nav-item span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 9px;
  color: #121619;
  font-size: 16px;
}

.front-nav-item.active {
  color: #0c544d;
}

.front-nav-item.active span {
  background: #e7f2f0;
}

.credit-mini {
  display: grid;
  gap: 8px;
  width: 56px;
  margin-top: auto;
  padding: 9px 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: #62717c;
  text-align: center;
  font-size: 11px;
}

.credit-mini a {
  color: #1d75d1;
  font-weight: 800;
}

.user-mini {
  width: 36px;
  height: 36px;
  font-size: 12px;
  border-radius: 999px;
  background: #0756c8;
}

.menu-button {
  border: 0;
  background: transparent;
  font-size: 28px;
}

.rail-popover {
  position: fixed;
  z-index: 90;
  width: 290px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 54px rgba(17, 24, 39, 0.18);
}

.rail-popover header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 12px;
}

.rail-popover header img {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
}

.rail-popover header strong {
  display: block;
  color: #1d252d;
  font-size: 18px;
  line-height: 1.2;
}

.rail-popover header strong span {
  display: inline-grid;
  place-items: center;
  height: 22px;
  margin-left: 6px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e9ecef;
  color: #20262d;
  font-size: 12px;
}

.rail-popover header em {
  display: block;
  margin-top: 5px;
  color: #7c8791;
  font-size: 13px;
  font-style: normal;
}

.rail-popover nav {
  display: grid;
  gap: 6px;
}

.rail-popover nav a,
.rail-popover footer a,
.rail-popover footer button {
  display: grid;
  align-items: center;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  color: #20262d;
  background: transparent;
  text-align: left;
}

.rail-popover nav a:hover,
.rail-popover footer a:hover,
.rail-popover footer button:hover {
  background: #f2f3f4;
}

.rail-popover i {
  color: #1f2933;
  font-style: normal;
  font-size: 20px;
  text-align: center;
}

.rail-popover span strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.rail-popover span small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #8a949e;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-popover b {
  color: #616b75;
  font-size: 22px;
  font-weight: 500;
}

.rail-popover footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.rail-service-popover header {
  display: block;
}

.rail-service-popover header strong {
  font-size: 19px;
}

.rail-service-popover {
  width: 188px;
  padding: 8px;
}

.rail-service-popover nav {
  gap: 2px;
}

.rail-service-popover nav a {
  grid-template-columns: 28px minmax(0, 1fr);
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 10px;
}

.rail-service-popover nav a i {
  font-size: 16px;
}

.rail-service-popover nav a strong {
  font-size: 14px;
  font-weight: 700;
}

.legal-page {
  min-height: 100vh;
  padding: 58px 24px 90px;
  color: #20252b;
  background: #fff;
}

.legal-article {
  width: min(860px, 100%);
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.9;
}

.legal-article h1 {
  margin: 0 0 18px;
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: 0;
}

.legal-article h2 {
  margin: 38px 0 12px;
  font-size: 21px;
  line-height: 1.4;
  letter-spacing: 0;
}

.legal-article h3 {
  margin: 26px 0 8px;
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: 0;
}

.legal-article p {
  margin: 10px 0;
}

.legal-article ul {
  margin: 10px 0;
  padding-left: 24px;
}

.legal-article .legal-date {
  margin: 0;
  color: #727b84;
  font-size: 13px;
}

.legal-article a {
  color: #1677ff;
}

@media (max-width: 720px) {
  .legal-page {
    padding: 34px 18px 64px;
  }

  .legal-article {
    font-size: 14px;
    line-height: 1.82;
  }

  .legal-article h1 {
    font-size: 24px;
  }

  .legal-article h2 {
    margin-top: 30px;
    font-size: 18px;
  }
}

@media print {
  .legal-page {
    padding: 0;
  }

  .legal-article {
    width: auto;
  }
}

.account-main {
  min-height: 100vh;
  padding: 30px 48px 48px;
  overflow: auto;
}

.account-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.account-head p {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.account-head h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
}

.account-head button,
.account-modal-card button,
.ticket-form button {
  min-height: 42px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: #202226;
  color: #fff;
  font-weight: 900;
}

.account-head-actions {
  display: flex;
  gap: 10px;
}

.account-head button.light,
.account-modal-card button.light {
  border: 1px solid var(--line);
  background: #fff;
  color: #20262d;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
}

.account-card,
.account-summary-card,
.alliance-hero,
.service-grid a {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(22, 32, 38, 0.04);
}

.account-card {
  padding: 22px;
}

.account-card header {
  margin-bottom: 18px;
}

.account-card h2,
.account-summary-card h2,
.alliance-hero h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.account-card p,
.account-summary-card p,
.alliance-hero p {
  margin: 8px 0 0;
  color: #77828d;
  line-height: 1.7;
}

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

.account-summary-card {
  padding: 24px;
}

.profile-avatar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.profile-avatar img {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  object-fit: cover;
}

.profile-avatar button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #4c5660;
  font-weight: 800;
}

.account-summary-card h2 span {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eceff1;
  font-size: 12px;
}

.account-summary-card dl,
.invite-meta {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
}

.account-summary-card dl div,
.invite-meta div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f5f6f7;
}

.account-summary-card dt,
.invite-meta span {
  color: #7c8791;
  font-size: 13px;
}

.account-summary-card dd,
.invite-meta strong {
  margin: 0;
  color: #20262d;
  font-weight: 900;
}

.profile-form,
.preference-grid,
.ticket-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-form label,
.preference-grid label,
.ticket-form label,
.invite-link,
.account-modal-card label {
  display: grid;
  gap: 8px;
  color: #7a858f;
  font-size: 13px;
  font-weight: 800;
}

.profile-form input,
.profile-form select,
.preference-grid select,
.ticket-form input,
.ticket-form select,
.ticket-form textarea,
.invite-link input,
.account-modal-card input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: #20262d;
  font-weight: 700;
}

.ticket-form textarea {
  min-height: 124px;
  padding-top: 12px;
  resize: vertical;
}

.ticket-form .wide {
  grid-column: 1 / -1;
}

.security-list,
.status-list,
.tier-list,
.tutorial-list,
.faq-list {
  display: grid;
  gap: 10px;
}

.security-list button,
.status-list div,
.tier-list article,
.tutorial-list article,
.faq-list button {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: #20262d;
  text-align: left;
}

.security-list em,
.security-list b,
.status-list strong,
.tier-list span,
.tier-list em,
.tutorial-list span,
.faq-list span {
  color: #7f8a94;
  font-style: normal;
  font-weight: 800;
}

.security-list b,
.status-list strong,
.tier-list em {
  color: var(--primary);
}

.device-table,
.alliance-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.device-table div,
.alliance-table div {
  display: grid;
  align-items: center;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.device-table div:last-child,
.alliance-table div:last-child {
  border-bottom: 0;
}

.device-table span,
.device-table em,
.alliance-table span,
.alliance-table em {
  color: #7c8791;
  font-style: normal;
  font-weight: 700;
}

.alliance-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.45fr;
  gap: 24px;
  margin-bottom: 18px;
  padding: 26px;
}

.alliance-hero > div > span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.alliance-hero dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.alliance-hero dl div {
  padding: 16px;
  border-radius: 14px;
  background: #f5f7f8;
}

.alliance-hero dt {
  color: #7c8791;
  font-size: 12px;
  font-weight: 800;
}

.alliance-hero dd {
  margin: 8px 0 0;
  font-size: 21px;
  font-weight: 950;
}

.invite-link {
  grid-template-columns: 1fr auto;
}

.invite-link span {
  grid-column: 1 / -1;
}

.invite-link button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: #202226;
  color: #fff;
  font-weight: 900;
}

.tier-list article.active {
  border-color: #0f766e;
  background: #eef8f6;
}

.alliance-table div {
  grid-template-columns: 1.2fr 1fr 1fr 0.8fr 0.8fr;
}

.alliance-table .table-head {
  background: #f5f6f7;
  color: #7d8791;
  font-weight: 900;
}

.alliance-table strong {
  color: #20262d;
}

.account-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(27, 34, 42, 0.42);
  backdrop-filter: blur(8px);
}

.account-modal-card {
  width: min(520px, calc(100vw - 48px));
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.2);
}

.account-modal-card header,
.account-modal-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-modal-card header button {
  width: 38px;
  min-height: 38px;
  padding: 0;
  background: #f1f3f4;
  color: #20262d;
  font-size: 22px;
}

.account-modal-card label {
  margin-top: 16px;
}

.account-modal-card p {
  margin: 14px 0;
  color: #7c8791;
}

.service-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(360px, 40vw);
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.service-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.service-grid a {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
}

.service-grid i {
  font-size: 22px;
  font-style: normal;
}

.service-grid strong {
  font-size: 16px;
}

.service-grid span,
.ticket-form p {
  color: #7c8791;
  line-height: 1.55;
}

.tutorial-list article,
.faq-list button {
  grid-template-columns: minmax(0, 1fr);
}

.faq-list button span {
  display: none;
  color: #68737e;
  line-height: 1.7;
}

.faq-list button.open span {
  display: block;
}

.points-main {
  min-height: 100vh;
  padding: 30px 48px 48px;
  overflow: auto;
}

.points-main h1 {
  margin: 0 0 26px;
  font-size: 24px;
  line-height: 1.2;
}

.points-balance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 116px;
  padding: 26px 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(21, 28, 35, 0.03);
}

.points-total {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.points-total span,
.points-breakdown span {
  color: #6e7680;
  font-size: 13px;
  font-weight: 800;
}

.points-total strong {
  color: #11161c;
  font-size: 34px;
  line-height: 1;
}

.points-total em,
.points-breakdown em {
  color: #9aa1aa;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.points-breakdown {
  display: flex;
  align-items: center;
  gap: 28px;
}

.points-breakdown div {
  display: grid;
  gap: 6px;
  min-width: 96px;
}

.points-breakdown strong {
  color: #171d24;
  font-size: 22px;
  line-height: 1;
}

.points-light-button,
.points-dark-button {
  min-height: 38px;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 900;
}

.points-light-button {
  border: 1px solid var(--line);
  background: #fff;
}

.points-dark-button {
  border: 0;
  color: #fff;
  background: #202226;
}

.points-records {
  margin-top: 30px;
}

.points-records header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.points-records h2 {
  margin: 0;
  font-size: 18px;
}

.points-records header a {
  color: #666e77;
  font-size: 14px;
  font-weight: 900;
}

.points-filters {
  display: grid;
  gap: 16px;
  margin: 0 0 30px;
}

.points-filters div {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 34px;
}

.points-filters span {
  width: 34px;
  color: #7d858e;
  font-size: 13px;
  font-weight: 900;
}

.points-filters button {
  min-height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #707983;
  background: transparent;
  font-size: 13px;
  font-weight: 900;
}

.points-filters button.active {
  color: #20262d;
  background: #e9e9e9;
}

.points-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.points-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 106px;
  padding: 20px 34px;
  border-bottom: 1px solid var(--line);
}

.points-row:last-child {
  border-bottom: 0;
}

.points-row div {
  display: grid;
  gap: 5px;
}

.points-row strong {
  color: #20262d;
  font-size: 15px;
}

.points-row strong span {
  margin-left: 6px;
  color: #22a275;
  font-size: 12px;
  font-weight: 900;
}

.points-row p {
  margin: 0;
  color: #7e8790;
  font-size: 12px;
  font-weight: 800;
}

.points-row time {
  color: #32383f;
  font-size: 12px;
}

.points-row b {
  min-width: 130px;
  text-align: right;
  color: #1b2027;
  font-size: 18px;
}

.points-row b.positive {
  color: #168263;
}

.points-row small {
  color: #7b838b;
  font-size: 12px;
  font-weight: 800;
}

.points-row.hidden-by-filter {
  display: none;
}

.points-empty {
  display: grid;
  min-height: 160px;
  margin: 0;
  place-items: center;
  border: 1px dashed #d8dee4;
  border-radius: 10px;
  color: #929aa3;
  background: #fff;
  font-weight: 800;
}

.points-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(72, 80, 90, 0.58);
  backdrop-filter: blur(8px);
}

.points-dialog {
  width: min(760px, calc(100vw - 48px));
  overflow: hidden;
  border: 1px solid #d7dde2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(20, 30, 40, 0.22);
}

.points-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--line);
}

.points-dialog h2 {
  margin: 0;
  color: #20262d;
  font-size: 18px;
  line-height: 1.2;
}

.points-dialog header button {
  width: 30px;
  height: 30px;
  border: 0;
  color: #68727c;
  background: transparent;
  font-size: 25px;
  line-height: 1;
}

.points-dialog-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 22px 24px;
}

.points-plan {
  min-height: 190px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.points-plan.active {
  border-color: #202226;
  box-shadow: 0 12px 28px rgba(20, 30, 40, 0.08);
}

.points-plan span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #66707a;
  background: #f1f2f3;
  font-size: 11px;
  font-weight: 900;
}

.points-plan h3 {
  margin: 0 0 8px;
  color: #20262d;
  font-size: 15px;
}

.points-plan strong {
  display: block;
  margin-bottom: 12px;
  color: #111820;
  font-size: 18px;
}

.points-plan p {
  min-height: 44px;
  margin: 0 0 16px;
  color: #7c858e;
  line-height: 1.6;
}

.points-plan label {
  display: block;
  margin-bottom: 14px;
}

.points-plan input {
  width: 100%;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  color: #20262d;
}

.points-plan button {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: #202226;
  font-weight: 900;
}

.points-dialog > p {
  margin: 0;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--line);
  color: #8d959d;
  font-size: 12px;
  font-weight: 700;
}

.canvas-main {
  min-height: 100vh;
  padding: 30px 42px 42px;
  overflow: auto;
}

.canvas-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.canvas-head h1 {
  margin: 0;
  color: #20262d;
  font-size: 20px;
  line-height: 1.2;
}

.canvas-head button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #202226;
  font-size: 13px;
  font-weight: 900;
}

.canvas-workspace {
  display: grid;
  grid-template-columns: 168px minmax(520px, 1fr) 220px;
  gap: 14px;
  min-height: calc(100vh - 112px);
}

.canvas-panel,
.canvas-stage,
.canvas-inspector {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.canvas-panel {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
}

.canvas-panel button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  color: #64707b;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 900;
}

.canvas-panel button.active {
  color: #172028;
  background: #f1f2f3;
}

.canvas-stage {
  position: relative;
  display: grid;
  min-height: 560px;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(#f6f7f8 1px, transparent 1px),
    linear-gradient(90deg, #f6f7f8 1px, transparent 1px),
    #fff;
  background-size: 24px 24px;
}

.canvas-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #89919a;
  text-align: center;
}

.canvas-empty span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px dashed #d5dce2;
  border-radius: 14px;
  color: #6f7983;
  background: #fff;
  font-size: 28px;
}

.canvas-empty strong {
  color: #28313a;
  font-size: 15px;
}

.canvas-empty p {
  max-width: 300px;
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
}

.canvas-inspector {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
}

.canvas-inspector h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.canvas-inspector label {
  display: grid;
  gap: 8px;
  color: #7a838c;
  font-size: 12px;
  font-weight: 900;
}

.canvas-inspector label button,
.canvas-export {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #20262d;
  background: #fff;
  font-weight: 900;
}

.canvas-export {
  margin-top: 6px;
  color: #fff;
  background: #202226;
}

.home-main {
  min-height: 100vh;
  padding: 24px clamp(28px, 5vw, 82px) 44px;
  overflow: hidden;
}

.home-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  color: #5f6971;
  font-size: 14px;
  font-weight: 700;
}

.subtle-pill,
.ghost-button,
.primary-action,
.home-send,
.send-button {
  border: 0;
  border-radius: 999px;
}

.subtle-pill {
  padding: 8px 14px;
  color: #fff;
  background: #161b20;
}

.hero-panel {
  display: grid;
  justify-items: center;
  gap: 22px;
  padding: 42px 0 24px;
  text-align: center;
}

.hero-mark {
  display: inline-grid;
  min-width: 96px;
  height: 36px;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #166f66, #2f5c9f);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0;
}

.hero-brand h1 {
  display: flex;
  max-width: min(860px, 100%);
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 auto;
  font-size: clamp(22px, 2.7vw, 32px);
  line-height: 1.22;
  letter-spacing: 0;
}

.brand-blue {
  color: #176cff;
}

.hero-brand p {
  max-width: 640px;
  margin: 10px auto 0;
  color: #68727b;
  font-size: 14px;
  line-height: 1.7;
}

.home-composer {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(220px, 1fr) 56px;
  grid-template-rows: 1fr auto;
  align-items: start;
  gap: 14px 20px;
  width: min(860px, 100%);
  min-height: 164px;
  padding: 20px 20px 16px;
  border: 1px solid #dfe5e8;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 22px 54px rgba(22, 32, 38, 0.1);
}

.home-add,
.add-reference {
  position: relative;
  display: grid;
  place-items: center;
  border: 0;
  color: #252c31;
  background: linear-gradient(145deg, #effbff, #def4ff);
  box-shadow: 0 18px 36px rgba(92, 151, 174, 0.18);
  transform: rotate(-8deg);
}

.home-add.has-asset-stack,
.add-reference.has-asset-stack {
  overflow: visible;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.home-add {
  width: 82px;
  height: 82px;
  border-radius: 16px;
  font-size: 28px;
}

.home-composer input {
  width: 100%;
  height: 54px;
  grid-column: 2 / 3;
  grid-row: 1;
  align-self: start;
  border: 0;
  outline: 0;
  color: #2f373d;
  font-size: 16px;
  background: transparent;
}

.home-reference-list {
  position: relative;
  z-index: 2;
  display: flex;
  grid-column: 2 / 4;
  grid-row: 1;
  align-self: start;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
  padding-right: 60px;
}

.home-reference-chip {
  display: inline-grid;
  grid-template-columns: 24px auto minmax(0, 120px);
  align-items: center;
  gap: 6px;
  max-width: 210px;
  min-height: 30px;
  padding: 3px 8px 3px 4px;
  border-radius: 999px;
  color: #51606c;
  background: #eef4f7;
  font-size: 11px;
  font-weight: 800;
}

.home-reference-chip img,
.home-reference-chip i {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  background: linear-gradient(135deg, #f8d51e, #f65a69);
  color: #fff;
  font-size: 9px;
  font-style: normal;
}

.home-reference-chip img {
  object-fit: cover;
}

.home-reference-chip b,
.home-reference-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-reference-chip b {
  color: #182026;
}

.home-composer.has-references input {
  height: 54px;
  margin-top: 0;
  padding-top: 0;
}

.home-composer input::placeholder,
.agent-composer textarea::placeholder,
.field-block textarea::placeholder {
  color: #98a0a8;
}

.home-send,
.send-button {
  display: grid;
  place-items: center;
  color: #fff;
  background: #a8a8a8;
  font-size: 25px;
  font-weight: 900;
}

.home-send {
  align-self: end;
  width: 50px;
  height: 50px;
  grid-column: 3;
  grid-row: 2;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.home-composer.has-references .home-send {
  background: #24282d;
}

.mode-select {
  position: relative;
  z-index: 4;
  align-self: end;
  width: fit-content;
  grid-column: 1 / 3;
  grid-row: 2;
}

.mode-select summary {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  min-height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  color: #56606a;
  list-style: none;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.mode-select summary::-webkit-details-marker {
  display: none;
}

.mode-icon {
  font-size: 16px;
}

.chevron {
  color: #9aa3ab;
  font-size: 13px;
}

.mode-select[open] .chevron {
  transform: rotate(180deg);
}

.mode-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  gap: 5px;
  width: 178px;
  padding: 10px 6px 8px;
  border: 1px solid #dfe6eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 22px 48px rgba(20, 30, 36, 0.16);
}

.mode-menu p {
  margin: 0 7px 6px;
  color: #8f98a1;
  font-size: 12px;
}

.mode-option {
  display: grid;
  grid-template-columns: 26px 1fr 18px;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 9px;
  border: 0;
  border-radius: 10px;
  color: #65717c;
  background: transparent;
  text-align: left;
  font-size: 13px;
}

.mode-option span {
  color: #536270;
  font-size: 15px;
}

.mode-option strong {
  font-weight: 500;
  white-space: nowrap;
}

.mode-option em {
  display: none;
  color: #1267ff;
  font-style: normal;
  font-size: 15px;
}

.mode-option.active {
  color: #141a20;
  background: #f1f2f3;
}

.mode-option.active em {
  display: block;
}

.feature-strip {
  display: grid;
  grid-template-columns: 1.75fr repeat(3, minmax(190px, 1fr));
  gap: 12px;
  width: min(1280px, 100%);
  margin-top: 32px;
}

.tool-card,
.editor-panel,
.preview-panel,
.agent-composer,
.history-panel {
  border: 1px solid var(--line);
  background: #fff;
}

.feature-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 12px;
  border: 1px solid #dfe5e8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(22, 32, 38, 0.05);
}

.feature-main {
  position: relative;
  grid-row: span 2;
  grid-template-columns: minmax(0, 1fr) 210px;
  grid-template-rows: 1fr auto;
  min-height: 196px;
  align-items: start;
  text-align: left;
  overflow: hidden;
  padding: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #e8f2ff 100%);
}

.feature-art {
  height: 58px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.84), transparent 20%),
    linear-gradient(135deg, #d7edf6, #cfc7ad);
}

.feature-art-stack {
  position: relative;
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  height: 142px;
}

.feature-art-stack i {
  position: absolute;
  display: block;
  width: 122px;
  height: 122px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 70% 22%, rgba(255, 255, 255, 0.8), transparent 18%),
    linear-gradient(135deg, #d6e1ea, #cfae76 52%, #f5f1ea);
  box-shadow: 0 12px 28px rgba(22, 32, 38, 0.14);
}

.feature-art-stack i:nth-child(1) {
  right: 74px;
  top: 20px;
  transform: rotate(-7deg);
}

.feature-art-stack i:nth-child(2) {
  right: 34px;
  top: 4px;
  transform: rotate(4deg);
}

.feature-art-stack i:nth-child(3) {
  right: 0;
  top: 36px;
  transform: rotate(-2deg);
}

.feature-main button {
  width: fit-content;
  min-height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #171d23;
  font-size: 13px;
  font-weight: 800;
}

.feature-card.warm {
  background: linear-gradient(180deg, #fff, #fff5e8);
}

.feature-card.cool {
  background: linear-gradient(180deg, #fff, #e7f0ff);
}

.feature-card.pink {
  background: linear-gradient(180deg, #fff, #ffeaf4);
}

.feature-card.purple {
  background: linear-gradient(180deg, #fff, #f1e7ff);
}

.feature-card.rose {
  background: linear-gradient(180deg, #fff, #ffe7e7);
}

.feature-card.cream {
  background: linear-gradient(180deg, #fff, #fff5df);
}

.feature-card strong {
  display: block;
  color: #1f252b;
  font-size: 15px;
}

.feature-main strong {
  font-size: 23px;
}

.feature-card span {
  display: block;
  margin-top: 6px;
  color: #1f252b;
  font-size: 11px;
  line-height: 1.45;
}

.feature-main span {
  font-size: 13px;
}

.quick-tools {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 14px;
  padding-bottom: 18px;
}

.tool-card {
  display: grid;
  min-height: 178px;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(20, 30, 36, 0.02);
}

.tool-card.large {
  grid-row: span 2;
  min-height: 372px;
}

.tool-card h2 {
  margin: 0;
  font-size: 22px;
}

.tool-card p {
  margin: 0;
  color: #69747d;
  font-size: 14px;
  line-height: 1.65;
}

.tool-tag {
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  color: #0f6159;
  background: var(--soft);
  font-size: 12px;
  font-weight: 900;
}

.tool-card img {
  width: 100%;
  height: 194px;
  margin-top: 14px;
  border-radius: 12px;
  object-fit: cover;
  object-position: left top;
}

.history-panel {
  padding: 30px 22px;
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
}

.agent-shell.history-collapsed .history-panel {
  display: none;
}

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-head h1 {
  margin: 0;
  font-size: 18px;
}

.history-head button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #6b747c;
  background: transparent;
}

.history-expand-button {
  position: absolute;
  top: 30px;
  left: 22px;
  z-index: 2;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #6b747c;
  background: transparent;
}

.new-chat {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  margin-top: 24px;
  padding: 0 14px;
  border-radius: 10px;
  background: #f1f1f1;
  font-size: 13px;
}

.history-label {
  margin: 38px 0 14px;
  color: #a6adb3;
  font-size: 13px;
}

.history-row {
  display: block;
  width: 100%;
  min-height: 40px;
  margin-bottom: 10px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  color: #2b343d;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 800;
}

.history-row:hover {
  background: #f5f6f6;
}

.history-empty {
  margin: 0;
  padding: 8px 12px;
  color: #a6adb3;
  font-size: 12px;
  line-height: 1.6;
}

.agent-main {
  position: relative;
  display: grid;
  min-height: 100vh;
  grid-template-rows: 1fr auto auto;
  padding: 52px clamp(34px, 7vw, 88px) 20px;
}

.agent-greeting {
  align-self: start;
  margin: 8px 0 0;
  color: #333b42;
  font-size: 14px;
  line-height: 1.7;
}

.agent-chat-feed {
  display: grid;
  align-content: start;
  gap: 16px;
  width: min(860px, 100%);
  max-height: calc(100vh - 300px);
  justify-self: center;
  overflow: auto;
  padding: 8px 4px 22px;
}

.agent-message {
  display: grid;
  gap: 7px;
  max-width: 78%;
}

.agent-message small {
  color: #8a939b;
  font-size: 12px;
  font-weight: 800;
}

.agent-message > div {
  padding: 12px 14px;
  border: 1px solid #e2e7eb;
  border-radius: 12px;
  color: #27313b;
  background: #fff;
  box-shadow: 0 8px 24px rgba(21, 30, 38, 0.04);
  font-size: 13px;
  line-height: 1.75;
}

.agent-message p {
  margin: 0;
}

.agent-message p + p {
  margin-top: 10px;
}

.agent-message.user {
  justify-self: end;
}

.agent-message.user small {
  text-align: right;
}

.agent-message.user > div {
  color: #fff;
  border-color: #1f2226;
  background: #1f2226;
}

.agent-message.is-error > div {
  color: #9b2f2f;
  border-color: #ffd2d2;
  background: #fff6f6;
}

.typing-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 999px;
  background: #8f99a3;
  animation: typing-dot 0.9s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.14s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes typing-dot {
  0%,
  80%,
  100% {
    opacity: 0.28;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.agent-composer {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 12px 16px;
  width: min(960px, 100%);
  min-height: 166px;
  justify-self: center;
  margin-bottom: 12px;
  padding: 18px;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.add-reference {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  font-size: 25px;
}

.composer-asset-stack {
  --size: 82px;
  position: relative;
  display: block;
  width: var(--size);
  height: var(--size);
  transform: rotate(-3deg);
}

.add-reference .composer-asset-stack {
  --size: 72px;
}

.composer-asset-thumb {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: end center;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  background: #eef5f8;
  box-shadow: 0 12px 28px rgba(22, 34, 44, 0.16);
  transform:
    translateX(calc((var(--i) - (var(--count) - 1) / 2) * 7px))
    translateY(calc(var(--i) * -3px))
    rotate(calc((var(--i) - (var(--count) - 1) / 2) * 5deg));
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.home-add:hover .composer-asset-thumb,
.add-reference:hover .composer-asset-thumb {
  transform:
    translateX(calc((var(--i) - (var(--count) - 1) / 2) * 34px))
    translateY(calc(var(--i) * -2px))
    rotate(calc((var(--i) - (var(--count) - 1) / 2) * 10deg));
  box-shadow: 0 18px 34px rgba(22, 34, 44, 0.22);
}

.composer-asset-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.composer-asset-thumb i {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #6c7782;
  font-size: 10px;
  font-style: normal;
  background: linear-gradient(135deg, #ecf8fd, #dfeef5);
}

.composer-asset-thumb b {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 3px 4px;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.38));
  font-size: 9px;
  line-height: 1.1;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.36);
}

.composer-asset-plus {
  position: absolute;
  right: -8px;
  bottom: -8px;
  z-index: 5;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #dfe5ea;
  border-radius: 999px;
  color: #1f252b;
  background: #fff;
  box-shadow: 0 8px 18px rgba(26, 36, 44, 0.16);
  font-size: 18px;
  font-weight: 500;
}

.composer-asset-more {
  position: absolute;
  right: -14px;
  top: -8px;
  z-index: 6;
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  color: #56616b;
  background: #eef1f4;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.agent-reference-list {
  display: flex;
  align-items: center;
  align-self: start;
  flex-wrap: wrap;
  grid-column: 2;
  grid-row: 1;
  gap: 8px;
  padding-top: 30px;
}

.agent-reference-chip {
  display: inline-grid;
  grid-template-columns: 24px auto minmax(0, 118px);
  align-items: center;
  gap: 6px;
  max-width: 190px;
  min-height: 30px;
  padding: 3px 8px 3px 4px;
  border: 1px solid #dfe5eb;
  border-radius: 999px;
  color: #303942;
  background: #f8fafb;
  font-size: 11px;
  font-weight: 700;
}

.agent-reference-chip img,
.agent-reference-chip i {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  background: linear-gradient(135deg, #e8f8ff, #d8f1fb);
  color: #60707e;
  font-size: 9px;
  font-style: normal;
}

.agent-reference-chip img {
  object-fit: cover;
}

.agent-reference-chip b,
.agent-reference-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-reference-chip b {
  color: #20262d;
}

.agent-composer textarea {
  grid-column: 2;
  grid-row: 1;
  min-height: 72px;
  resize: none;
  border: 0;
  outline: 0;
  color: #2f373d;
  font-size: 13px;
  line-height: 1.6;
}

.agent-composer.has-references textarea {
  padding-top: 0;
}

.asset-mention-menu {
  position: absolute;
  z-index: 30;
  display: grid;
  width: min(320px, calc(100% - 40px));
  padding: 8px;
  border: 1px solid #dfe6ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(25, 34, 45, 0.16);
}

.asset-mention-menu button {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  border: 0;
  border-radius: 10px;
  color: #202932;
  background: #eef4ff;
  text-align: left;
}

.asset-mention-menu button + button {
  margin-top: 6px;
}

.asset-mention-thumb {
  overflow: hidden;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 70% 18%, rgba(255, 255, 255, 0.86), transparent 18%),
    linear-gradient(135deg, #f6d31a, #fff2a2 45%, #f35b69);
}

.asset-mention-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-mention-menu strong,
.asset-mention-menu small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-mention-menu strong {
  font-size: 13px;
}

.asset-mention-menu strong em {
  padding: 2px 5px;
  border-radius: 5px;
  color: #697583;
  background: rgba(255, 255, 255, 0.76);
  font-size: 10px;
  font-style: normal;
}

.asset-mention-menu small,
.asset-mention-menu b {
  color: #687789;
  font-size: 12px;
  font-weight: 500;
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  grid-column: 2;
  grid-row: 2;
  gap: 12px;
  color: #8d949b;
  font-size: 12px;
}

.agent-composer .mode-select {
  grid-column: 1 / 2;
  grid-row: 2;
}

.send-button {
  width: 40px;
  height: 40px;
}

.send-button.is-working {
  opacity: 0.72;
  cursor: wait;
}

.agent-note {
  justify-self: center;
  margin: 0;
  color: #8e959c;
  font-size: 14px;
}

.tool-main {
  display: grid;
  grid-template-columns: minmax(560px, 1fr) 420px;
  gap: 18px;
  padding: 24px;
}

.editor-panel,
.preview-panel {
  min-height: calc(100vh - 48px);
  padding: 20px;
  border-radius: 18px;
}

.tool-head,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tool-head p {
  margin: 0 0 6px;
  color: #0f6159;
  font-weight: 900;
}

.tool-head h1,
.tool-head h2 {
  margin: 0;
}

.tool-head h1 {
  font-size: 28px;
}

.tool-head h2 {
  font-size: 20px;
}

.ghost-button {
  padding: 10px 16px;
  border: 1px solid #b8cfcc;
  color: #0f6159;
  background: #edf7f5;
  font-weight: 900;
}

.material-section,
.field-block,
.setting-block,
.queue-panel {
  margin-top: 18px;
}

.section-title span {
  color: var(--muted);
}

.material-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.material-grid.image-only {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.material-card {
  display: grid;
  min-height: 112px;
  align-content: end;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #263038;
  background:
    linear-gradient(135deg, rgba(18, 108, 98, 0.9), rgba(44, 95, 159, 0.9)) top / 100% 58px no-repeat,
    #f6f8f8;
  text-align: left;
  font-weight: 900;
}

.material-card span {
  color: #68727b;
  font-size: 12px;
  font-weight: 700;
}

.material-card.selected {
  border-color: #0f6159;
  background:
    linear-gradient(135deg, rgba(18, 108, 98, 0.95), rgba(44, 95, 159, 0.95)) top / 100% 58px no-repeat,
    #eef7f5;
}

.material-card.add {
  align-content: center;
  justify-items: center;
  background: #f7faf9;
  color: #0f6159;
  text-align: center;
}

.field-block {
  display: grid;
  gap: 10px;
  color: #4e5a63;
  font-weight: 800;
}

.field-block textarea {
  width: 100%;
  min-height: 126px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  color: #263038;
  line-height: 1.7;
}

.setting-block > span {
  display: block;
  margin-bottom: 10px;
  color: #4e5a63;
  font-weight: 900;
}

.segments,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.segments button,
.chips button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #354049;
  background: #fff;
  font-weight: 800;
}

.segments button.active,
.chips button.active {
  border-color: #0f6159;
  color: #0f6159;
  background: #edf7f5;
}

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

.primary-action {
  width: 100%;
  min-height: 48px;
  margin-top: 20px;
  color: #fff;
  background: #126c62;
  font-weight: 900;
}

.primary-action.disabled {
  background: #a8a8a8;
}

.status {
  padding: 7px 11px;
  border-radius: 999px;
  color: #9a611d;
  background: #fff2df;
  font-size: 13px;
  font-weight: 900;
}

.phone-preview,
.image-preview {
  display: grid;
  place-items: center;
  min-height: 400px;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f7f8f8;
}

.phone-preview > div,
.image-preview > div {
  display: grid;
  place-items: center;
  gap: 12px;
  color: #fff;
  background: linear-gradient(160deg, #126c62, #2c5f9f);
  box-shadow: var(--shadow);
}

.phone-preview > div {
  width: 210px;
  height: 372px;
  border-radius: 28px;
}

.image-preview > div {
  width: 300px;
  height: 300px;
  border-radius: 18px;
}

.queue-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfc;
}

.queue-panel p {
  margin: 14px 0 0;
  color: var(--muted);
}

.video-workbench,
.video-side-panel {
  font-size: 12px;
}

.video-titlebar {
  align-items: flex-start;
}

.video-titlebar p,
.video-side-panel .tool-head p {
  margin-bottom: 4px;
  font-size: 12px;
}

.video-titlebar h1 {
  font-size: 20px;
}

.video-side-panel .tool-head h2 {
  font-size: 16px;
}

.video-title-actions {
  display: flex;
  gap: 8px;
}

.video-title-actions .ghost-button,
.source-tabs button,
.preview-tabs button {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
}

.video-title-actions .strong {
  border-color: #0f6159;
  background: #e8f4f2;
}

.source-tabs,
.preview-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.source-tabs button,
.preview-tabs button {
  border: 1px solid var(--line);
  color: #596570;
  background: #fff;
}

.source-tabs button.active,
.preview-tabs button.active {
  border-color: #0f6159;
  color: #0f6159;
  background: #edf7f5;
  font-weight: 800;
}

.video-materials {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.video-materials .material-card {
  min-height: 94px;
  align-content: start;
  gap: 5px;
  padding: 8px;
  font-size: 12px;
  background: #f8faf9;
}

.video-materials .material-card i {
  display: block;
  height: 42px;
  border-radius: 9px;
  background:
    radial-gradient(circle at 74% 24%, rgba(255, 255, 255, 0.8), transparent 18%),
    linear-gradient(135deg, #176f67, #2f5c9f);
}

.video-materials .material-card strong {
  margin-top: 2px;
}

.video-materials .material-card span {
  font-size: 10px;
}

.video-materials .material-card.add {
  align-content: center;
}

.video-workbench .field-block textarea {
  min-height: 104px;
  font-size: 12px;
}

.writer-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.writer-steps span {
  min-height: 32px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #69747d;
  background: #fbfcfc;
  font-size: 12px;
}

.writer-steps span.active {
  border-color: #0f6159;
  color: #0f6159;
  background: #edf7f5;
  font-weight: 800;
}

.video-workbench .setting-block,
.video-workbench .queue-panel {
  margin-top: 14px;
}

.video-workbench .setting-block > span {
  margin-bottom: 8px;
  font-size: 12px;
}

.video-workbench .segments,
.video-workbench .chips {
  gap: 8px;
}

.video-workbench .segments button,
.video-workbench .chips button {
  min-height: 31px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 12px;
}

.video-settings-grid {
  gap: 14px;
}

.generate-row {
  display: grid;
  grid-template-columns: 1fr 180px;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
}

.generate-row .primary-action {
  min-height: 40px;
  margin-top: 0;
  font-size: 13px;
}

.video-side-panel .status {
  padding: 5px 9px;
  font-size: 11px;
}

.video-side-panel .phone-preview {
  min-height: 330px;
  margin-top: 12px;
}

.video-side-panel .phone-preview > div {
  width: 164px;
  height: 292px;
  border-radius: 24px;
  font-size: 12px;
}

.video-side-panel .phone-preview small {
  color: rgba(255, 255, 255, 0.74);
}

.preview-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.preview-summary span {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #69747d;
  background: #fbfcfc;
  font-size: 11px;
}

.queue-sample {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  background: #f3f6f6;
}

.queue-sample span {
  color: var(--muted);
  font-size: 11px;
}

.video-studio {
  display: grid;
  grid-template-columns: minmax(360px, 510px) minmax(520px, 1fr) 184px;
  gap: 12px;
  min-height: 100vh;
  padding: 24px;
  font-size: 12px;
}

.video-left-panel,
.video-preview-panel,
.video-task-panel {
  min-height: calc(100vh - 48px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.video-left-panel {
  display: flex;
  flex-direction: column;
  padding: 14px;
}

.video-panel-head,
.video-task-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.video-panel-head h1,
.video-task-panel h2 {
  margin: 0;
  font-size: 16px;
}

.video-panel-head button,
.video-task-panel header button {
  border: 0;
  color: #4f5963;
  background: transparent;
  font-weight: 800;
}

.video-script-card {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  margin-top: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.video-material-head,
.script-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #6f7983;
}

.video-icons {
  display: flex;
  gap: 12px;
}

.video-icons button {
  position: relative;
  border: 0;
  color: #8c98a3;
  background: transparent;
}

.video-icons button::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 8;
  display: none;
  padding: 7px 10px;
  border-radius: 8px;
  color: #fff;
  background: #181b1f;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transform: translateX(-50%);
  content: attr(title);
}

.video-icons button:hover::after,
.video-icons button.show-toast::after {
  display: block;
}

.video-icons button.show-toast::after {
  content: attr(data-toast-text);
}

.video-icons button.is-active {
  color: #20262d;
}

.video-material-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 92px;
  margin-top: 12px;
}

.material-stack {
  position: relative;
  width: 216px;
  height: 72px;
}

.material-stack i {
  position: absolute;
  top: 2px;
  display: block;
  overflow: hidden;
  width: 70px;
  height: 62px;
  border: 1px solid #e2e6ea;
  border-radius: 10px;
  background:
    radial-gradient(circle at 72% 22%, rgba(255, 255, 255, 0.9), transparent 17%),
    linear-gradient(135deg, #ffd51d, #fff4cf 48%, #f4536f);
  box-shadow: 0 6px 14px rgba(20, 30, 36, 0.1);
}

.material-stack i img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.material-stack i:nth-child(1) {
  left: 0;
}

.material-stack i:nth-child(2) {
  left: 36px;
}

.material-stack i:nth-child(3) {
  left: 72px;
}

.material-stack i:nth-child(4) {
  left: 108px;
}

.material-stack b {
  position: absolute;
  top: -7px;
  left: -5px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #68727b;
  font-size: 10px;
  font-style: normal;
}

.material-stack-more {
  position: absolute;
  top: 18px;
  left: 146px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #69727c;
  background: #eceff1;
  font-size: 12px;
  font-weight: 900;
}

.material-add-card {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #8a939c;
  background: #fbfbfb;
  font-size: 22px;
}

.material-add-card span {
  margin-top: -18px;
  font-size: 11px;
}

.video-empty-material {
  display: grid;
  align-items: start;
  min-height: 112px;
  margin-top: 20px;
}

.video-script-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 10px 10px 4px 12px;
  color: #242a30;
  font-size: 15px;
  line-height: 1.7;
}

.video-script-content h2 {
  margin: 18px 0 8px;
  font-size: 16px;
}

.video-script-content h2:first-child {
  margin-top: 0;
}

.video-script-content ul {
  margin: 0;
  padding-left: 18px;
}

.video-script-content li {
  margin-bottom: 8px;
}

.empty-script {
  display: grid;
  align-items: center;
  justify-items: center;
  color: #8b939b;
  font-size: 15px;
  line-height: 1.8;
}

.video-script-editor {
  flex: 1;
  min-height: 0;
  padding: 10px 8px 4px;
}

.video-script-editor textarea {
  width: 100%;
  height: 100%;
  min-height: 330px;
  resize: none;
  border: 0;
  outline: 0;
  color: #262d34;
  background: transparent;
  font-size: 16px;
  line-height: 1.8;
}

.video-script-editor textarea::placeholder {
  color: #8a939d;
  opacity: 1;
}

.script-card-foot {
  padding-top: 10px;
}

.script-card-foot button {
  position: relative;
  border: 0;
  color: #1772ff;
  background: transparent;
  font-weight: 900;
}

.script-card-foot button::after {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  z-index: 12;
  display: none;
  padding: 8px 12px;
  border-radius: 8px;
  color: #fff;
  background: #08090b;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  content: attr(data-toast-text);
}

.script-card-foot button.show-toast::after {
  display: block;
}

.video-config-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.video-model-select,
.video-setting-select {
  position: relative;
  min-width: 0;
}

.video-config-card {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr 16px;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  min-height: 68px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #262d34;
  background: #fff;
  text-align: left;
}

.video-model-select > .video-config-card,
.video-setting-select > .video-config-card {
  width: 100%;
}

.video-model-select.open > .video-config-card,
.video-setting-select.open > .video-config-card {
  border-color: #d6dce3;
  box-shadow: 0 0 0 4px rgba(23, 34, 48, 0.06);
}

.video-model-select.open > .video-config-card em,
.video-setting-select.open > .video-config-card em {
  transform: rotate(180deg);
}

.video-config-card i {
  grid-row: 1 / 3;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #5d6670;
  background: #f3f5f6;
  font-style: normal;
}

.video-config-card span {
  grid-column: 2;
  grid-row: 1;
  display: block;
  color: #8b939b;
  font-size: 11px;
}

.video-config-card strong {
  grid-column: 2;
  grid-row: 2;
  display: block;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.25;
}

.ai-image-studio .video-config-card small {
  grid-column: 2;
  grid-row: 3;
  display: block;
  margin-top: 2px;
  color: #8b939b;
  font-size: 10px;
  line-height: 1.2;
}

.ai-image-studio .video-model-select .video-config-card i,
.ai-image-studio .video-model-select .video-config-card em {
  grid-row: 1 / 4;
}

.video-config-card em {
  grid-column: 3;
  grid-row: 1 / 3;
  color: #8b939b;
  font-style: normal;
  transition: transform 0.16s ease;
}

.video-model-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 35;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dfe5eb;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(17, 25, 35, 0.16);
}

.video-model-popover > span {
  color: #707982;
  font-size: 12px;
  font-weight: 900;
}

.video-model-popover button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 22px;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  position: relative;
  min-height: 66px;
  padding: 9px 36px 9px 10px;
  border: 1px solid #e5e9ee;
  border-radius: 13px;
  color: #20262d;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.video-model-popover button i {
  display: grid;
  grid-row: 1 / 3;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #e5e9ee;
  border-radius: 9px;
  background: #fbfcfd;
  font-style: normal;
}

.video-model-popover button strong {
  overflow: visible;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
  white-space: normal;
}

.video-model-popover button em {
  grid-column: 2;
  color: #7e8790;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.video-model-popover button.active {
  border-color: #202328;
  box-shadow: 0 2px 6px rgba(17, 25, 35, 0.12);
}

.video-model-popover button.active::after {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #fff;
  background: #202328;
  font-size: 12px;
}

.video-setting-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 35;
  display: grid;
  width: min(360px, calc(100vw - 32px));
  padding: 11px;
  border: 1px solid #dfe5eb;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(17, 25, 35, 0.16);
}

.video-setting-popover section {
  display: grid;
  gap: 8px;
  padding: 0 0 10px;
  border-bottom: 1px solid #e9edf1;
}

.video-setting-popover section + section {
  padding-top: 10px;
}

.video-setting-popover section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.video-setting-popover section > span {
  color: #707982;
  font-size: 11px;
  font-weight: 900;
}

.video-ratio-options {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.video-ratio-options button,
.video-pill-options button {
  position: relative;
  border: 1px solid #e5e9ee;
  border-radius: 11px;
  color: #6e7680;
  background: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.video-ratio-options button {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 66px;
  padding: 8px 4px 6px;
  font-size: 11px;
}

.video-ratio-options i {
  display: block;
  border: 2px solid #6f747d;
  border-radius: 8px;
  background: #f7f8f9;
}

.video-ratio-options .ratio-21-9 { width: 34px; height: 14px; margin-top: 10px; }
.video-ratio-options .ratio-16-9 { width: 31px; height: 18px; margin-top: 8px; }
.video-ratio-options .ratio-4-3 { width: 28px; height: 23px; margin-top: 5px; }
.video-ratio-options .ratio-1-1 { width: 28px; height: 28px; margin-top: 3px; }
.video-ratio-options .ratio-3-4 { width: 23px; height: 31px; }
.video-ratio-options .ratio-9-16 { width: 20px; height: 36px; }
.video-ratio-options .ratio-auto { width: 28px; height: 22px; margin-top: 6px; border-style: dashed; }

.video-ratio-options button.active,
.video-pill-options button.active {
  border-color: #202328;
  color: #202328;
  box-shadow: 0 2px 6px rgba(17, 25, 35, 0.12);
}

.video-ratio-options button.active::after,
.video-pill-options button.active::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #fff;
  background: #202328;
  font-size: 11px;
}

.video-pill-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.video-pill-options.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.video-pill-options button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 9px;
  font-size: 12px;
}

.video-pill-options em {
  color: inherit;
  font-style: normal;
}

.video-duration-slider {
  display: grid;
  gap: 8px;
  padding: 6px 10px 2px;
}

.video-duration-slider input {
  width: 100%;
  accent-color: #202328;
}

.video-duration-slider div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #7a828c;
  font-size: 12px;
  font-weight: 900;
}

.video-duration-slider strong {
  padding: 3px 7px;
  border-radius: 8px;
  color: #202328;
  background: #e9ebee;
  font-size: 12px;
}

.video-cost {
  display: block;
  margin: 12px 0 10px;
  text-align: center;
  font-weight: 900;
}

.video-cost strong {
  color: #20262d;
  font-size: 12px;
}

.ai-image-studio .video-script-card {
  min-height: calc(100vh - 230px);
}

.ai-image-studio .video-script-editor {
  min-height: 360px;
}

.ai-image-studio .video-script-editor textarea {
  min-height: 360px;
}

.ai-image-model-popover button strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.image-setting-popover {
  width: min(330px, calc(100vw - 32px));
}

.image-ratio-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.image-ratio-options button {
  min-height: 58px;
}

.video-generate-button {
  position: relative;
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #25272a;
  font-weight: 900;
}

.video-generate-button::after {
  position: absolute;
  right: 18px;
  bottom: calc(100% + 10px);
  z-index: 12;
  display: none;
  padding: 8px 12px;
  border-radius: 8px;
  color: #fff;
  background: #08090b;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  content: attr(data-toast-text);
}

.video-generate-button.show-toast::after {
  display: block;
}

.video-generate-button.is-disabled {
  background: #8e8e8e;
}

.video-generate-button.is-working {
  background: #202226;
  cursor: wait;
}

.video-preview-panel {
  position: relative;
  padding: 22px 24px;
}

.video-preview-tabs {
  display: flex;
  gap: 26px;
}

.video-preview-tabs button {
  position: relative;
  border: 0;
  color: #303740;
  background: transparent;
  font-weight: 900;
}

.video-preview-tabs button.active::after {
  position: absolute;
  right: 8px;
  bottom: -8px;
  left: 8px;
  height: 3px;
  border-radius: 999px;
  background: #11161c;
  content: "";
}

.video-preview-empty {
  display: grid;
  min-height: calc(100vh - 130px);
  place-items: center;
  align-content: center;
  gap: 18px;
  color: #8b939b;
}

.empty-camera {
  color: #717982;
  font-size: 36px;
}

.video-preview-loading {
  display: grid;
  min-height: calc(100vh - 130px);
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #7f8790;
}

.video-loading-orbit {
  position: relative;
  display: grid;
  width: 136px;
  height: 136px;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle, #fff 0 42%, transparent 43%),
    repeating-radial-gradient(circle, rgba(141, 105, 255, 0.2) 0 2px, transparent 2px 8px);
}

.video-loading-orbit span {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 22px rgba(126, 99, 255, 0.22);
}

.video-loading-orbit i {
  position: absolute;
  inset: 22px;
  border: 2px solid transparent;
  border-top-color: #25272a;
  border-radius: 999px;
  animation: video-loading-spin 1.1s linear infinite;
}

@keyframes video-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.video-preview-loading strong {
  color: #242b33;
  font-size: 16px;
}

.video-preview-loading p,
.video-preview-loading em {
  margin: 0;
  color: #8a929b;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.video-loading-track {
  overflow: hidden;
  width: min(360px, 54vw);
  height: 5px;
  margin-top: 6px;
  border-radius: 999px;
  background: #e8eaed;
}

.video-loading-track b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #25272a;
  transition: width 0.18s ease;
}

.download-button {
  position: absolute;
  top: 152px;
  right: 24px;
  z-index: 2;
  min-height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #12161b;
  font-weight: 900;
}

.ai-image-result {
  position: relative;
  display: grid;
  min-height: calc(100vh - 130px);
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 72px 56px 40px;
}

.ai-image-result img {
  display: block;
  max-width: min(680px, 78%);
  max-height: calc(100vh - 260px);
  border-radius: 10px;
  object-fit: contain;
  background: #f4f5f6;
  box-shadow: 0 18px 50px rgba(18, 22, 27, 0.12);
}

.ai-image-result p {
  margin: 0;
  color: #7a838d;
  font-size: 12px;
  font-weight: 800;
}

.video-player {
  display: grid;
  align-content: center;
  min-height: calc(100vh - 126px);
  padding-top: 42px;
}

.video-stage {
  display: grid;
  grid-template-columns: 1fr minmax(230px, 360px) 1fr;
  min-height: 446px;
  overflow: hidden;
  border-radius: 8px;
  background: #1f2226;
}

.blur-side {
  background:
    radial-gradient(circle at 50% 45%, rgba(249, 210, 43, 0.32), transparent 34%),
    linear-gradient(135deg, #4b473c, #201f23);
  filter: blur(0.2px);
}

.video-frame {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #eedb7b;
}

.video-photo {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 62% 19%, rgba(255, 255, 255, 0.72), transparent 8%),
    linear-gradient(165deg, #283443 0 25%, transparent 25%),
    linear-gradient(20deg, #f6d31d 0 42%, #ffef77 42% 70%, #f45b64 70%);
}

.play-button {
  position: relative;
  z-index: 1;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(152, 120, 0, 0.88);
  font-size: 22px;
}

.video-frame strong {
  position: absolute;
  right: 0;
  bottom: 100px;
  left: 0;
  z-index: 1;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.generated-video-element {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #11161c;
}

.video-frame.is-playing .video-photo,
.video-frame.is-playing strong {
  display: none;
}

.video-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
  color: #8b939b;
}

.video-meta strong {
  color: #303740;
}

.video-result-package {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #e2e8ee;
  border-radius: 14px;
  background: #fff;
}

.video-result-package header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.video-result-package h3,
.video-result-package p {
  margin: 4px 0 0;
}

.video-result-package header button,
.video-result-package a {
  padding: 8px 12px;
  border: 1px solid #dfe6eb;
  border-radius: 9px;
  color: #20272f;
  background: #f8fafb;
  font-weight: 800;
  text-decoration: none;
}

.video-result-package > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.video-result-package > div span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #0f766e;
  background: #eaf8f5;
}

.video-result-package textarea {
  width: 100%;
  min-height: 180px;
  padding: 12px;
  border: 1px solid #e2e8ee;
  border-radius: 10px;
  resize: vertical;
  line-height: 1.7;
}

.video-task-panel {
  overflow: hidden;
  padding: 18px 14px;
}

.task-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 20px 0 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.task-stats span {
  display: block;
  color: #a0a7ae;
}

.task-stats strong {
  display: block;
  font-size: 24px;
}

.task-empty-state {
  margin-top: 12px;
  padding: 14px 12px;
  border: 1px dashed #d5dbe0;
  border-radius: 10px;
  color: #9aa3ab;
  background: #fbfcfc;
  font-size: 12px;
  line-height: 1.5;
}

.task-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 82px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #303740;
  background: #fff;
  text-align: left;
}

.task-card.active {
  border-color: #b6c0c9;
  box-shadow: 0 4px 12px rgba(20, 30, 36, 0.08);
}

.task-card.muted {
  color: #a0a7ae;
}

.task-icon,
.task-thumb {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 8px;
  background: #ececec;
  font-style: normal;
  font-size: 26px;
}

.task-thumb {
  background:
    radial-gradient(circle at 70% 22%, rgba(255, 255, 255, 0.85), transparent 18%),
    linear-gradient(135deg, #f8d41c, #fff3a2 48%, #ef4c65);
}

.task-thumb.alt {
  background:
    radial-gradient(circle at 24% 28%, rgba(255, 255, 255, 0.86), transparent 18%),
    linear-gradient(135deg, #f0a31b, #ffe96b 45%, #f45c6b);
}

.task-thumb.poster {
  background:
    radial-gradient(circle at 75% 20%, rgba(255, 255, 255, 0.86), transparent 18%),
    linear-gradient(135deg, #ffcf22, #f45b64);
}

.task-thumb img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.image-task-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ai-image-task-card {
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 4px;
  padding: 7px;
}

.ai-image-task-main {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.ai-image-task-main:disabled {
  cursor: default;
}

.ai-image-task-actions {
  display: grid;
  align-content: center;
  gap: 5px;
}

.ai-image-task-actions button {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #6f7882;
  background: transparent;
  font-size: 15px;
  cursor: pointer;
}

.ai-image-task-actions button:hover:not(:disabled) {
  color: #20262d;
  background: #eef1f3;
}

.ai-image-task-actions button:disabled {
  color: #c5cbd1;
  cursor: default;
}

.task-card strong,
.task-card small {
  display: block;
}

.task-card small {
  margin-top: 4px;
  color: #8b939b;
  font-size: 12px;
  line-height: 1.25;
}

.assets-main {
  min-height: 100vh;
  padding: 34px clamp(34px, 5vw, 74px) 44px;
  overflow: hidden;
  font-size: 12px;
}

.assets-main h1 {
  margin: 0 0 48px;
  color: #171d24;
  font-size: 20px;
  line-height: 1.2;
}

.asset-library-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 160px));
  gap: 28px;
  margin-bottom: 36px;
}

.asset-folder-list {
  display: contents;
}

.library-card {
  display: grid;
  justify-items: center;
  min-width: 0;
  min-height: 174px;
  padding: 0;
  border: 0;
  color: #20262d;
  background: transparent;
  text-align: center;
}

.library-folder {
  position: relative;
  display: block;
  width: min(138px, 100%);
  height: 82px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f9fcff, #e7f0f7);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.88), 0 16px 24px rgba(80, 110, 140, 0.08);
}

.library-folder::before,
.library-folder::after {
  position: absolute;
  right: 12px;
  left: 18px;
  height: 26px;
  border-radius: 14px 14px 5px 5px;
  content: "";
}

.library-folder::before {
  top: -20px;
  background: rgba(214, 228, 239, 0.82);
}

.library-folder::after {
  top: -10px;
  border: 2px solid rgba(255, 255, 255, 0.72);
}

.library-folder.add {
  display: grid;
  place-items: center;
  color: #737b84;
  background: rgba(255, 255, 255, 0.62);
  font-size: 34px;
  box-shadow: inset 0 0 0 1px rgba(231, 236, 240, 0.72), 0 18px 38px rgba(255, 255, 255, 0.5);
}

.library-folder.add::before,
.library-folder.add::after {
  background: rgba(255, 255, 255, 0.34);
}

.library-folder.ai {
  background: linear-gradient(180deg, #d8ecff, #c9dce9);
}

.library-folder.ai::before {
  background: #dcd8ff;
}

.library-folder.cyan {
  background: linear-gradient(180deg, #98dbf8, #61c0e7);
}

.library-folder.cyan::before {
  background: #78cef0;
}

.library-folder.purple {
  background: linear-gradient(180deg, #f5e5ff, #e9b9f6);
}

.library-folder.purple::before {
  background: #c9adf7;
}

.library-folder.gray {
  background:
    radial-gradient(circle at 58% 0%, rgba(255, 198, 158, 0.62), transparent 28%),
    linear-gradient(180deg, #dedede, #b7b7bb);
}

.library-folder.gray::before {
  background: #d3d3d5;
}

.library-folder.blue {
  background: linear-gradient(180deg, #eef9ff, #d9e9f2);
}

.library-folder.blue::before {
  background: #dcd5ff;
}

.library-card strong {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  min-height: 22px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.3;
}

.library-card strong small {
  color: #878f98;
  font-size: 12px;
  font-weight: 700;
}

.library-card em {
  color: #858e97;
  font-style: normal;
  line-height: 1.4;
}

.assets-toolbar {
  display: grid;
  grid-template-columns: auto 150px minmax(210px, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.assets-kind-tabs,
.assets-source-select,
.assets-search,
.assets-toolbar-actions button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.assets-kind-tabs {
  display: flex;
  overflow: hidden;
}

.assets-kind-tabs button {
  min-width: 72px;
  border: 0;
  color: #7b838c;
  background: transparent;
  font-weight: 800;
}

.assets-kind-tabs button.active {
  color: #20262d;
  background: #f1f2f3;
}

.assets-source-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  color: #20262d;
  font-weight: 800;
}

.assets-source-menu {
  position: relative;
  z-index: 4;
}

.assets-source-select {
  width: 100%;
}

.assets-source-select em {
  color: #6f7881;
  font-style: normal;
  transform: rotate(0deg);
  transition: transform 0.15s ease;
}

.assets-source-select[aria-expanded="true"] em {
  transform: rotate(180deg);
}

.assets-source-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  width: 150px;
  gap: 6px;
  padding: 8px;
  border: 1px solid #dfe4e8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(20, 30, 40, 0.12);
}

.assets-source-dropdown button {
  display: grid;
  grid-template-columns: 1fr 18px;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: #20262d;
  background: transparent;
  text-align: left;
  font-weight: 900;
}

.assets-source-dropdown button.active {
  background: #e8e8e8;
}

.assets-source-dropdown button em {
  color: #66707a;
  font-style: normal;
  visibility: hidden;
}

.assets-source-dropdown button.active em {
  visibility: visible;
}

.assets-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border-color: transparent;
  background: transparent;
  color: #8b939b;
}

.assets-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #20262d;
  background: transparent;
}

.assets-toolbar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.assets-toolbar-actions button {
  min-width: 92px;
  padding: 0 14px;
  color: #4e5862;
  font-weight: 800;
}

.assets-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 24px 16px;
}

.asset-upload-tile,
.library-asset-card {
  min-width: 0;
}

.asset-upload-tile {
  display: grid;
  min-height: 210px;
  place-items: center;
  align-content: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #20262d;
  background: rgba(255, 255, 255, 0.52);
}

.asset-upload-tile span {
  font-size: 32px;
  font-weight: 300;
}

.asset-upload-tile strong {
  font-size: 13px;
}

.asset-upload-tile small {
  color: #89919a;
  font-size: 11px;
}

.assets-status {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 80;
  margin: 0;
  padding: 12px 16px;
  border-radius: 10px;
  color: #fff;
  background: #202226;
  box-shadow: 0 16px 42px rgba(20, 30, 40, 0.18);
  font-size: 12px;
  font-weight: 800;
}

.assets-status[data-status-type="error"] {
  background: #a33b3b;
}

.assets-link-popover {
  top: 50%;
  left: 50%;
  width: min(360px, calc(100vw - 48px));
  transform: translate(-50%, -50%);
}

.library-asset-card {
  position: relative;
  display: grid;
  grid-template-rows: 210px auto auto;
  overflow: hidden;
}

.asset-page-thumb {
  display: block;
  width: 100%;
  min-height: 210px;
  overflow: hidden;
  border-radius: 10px;
  background:
    radial-gradient(circle at 70% 18%, rgba(255, 255, 255, 0.86), transparent 18%),
    linear-gradient(135deg, #f6d31a, #fff2a2 45%, #f35b69);
}

.asset-page-thumb img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.asset-page-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  padding: 5px 9px;
  border-radius: 5px;
  color: #fff;
  background: rgba(20, 20, 20, 0.5);
  font-size: 11px;
  font-weight: 800;
}

.library-asset-card strong {
  overflow: hidden;
  margin-top: 10px;
  color: #20262d;
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-asset-card p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 5px 0 0;
  color: #89919a;
  line-height: 1.4;
}

.library-asset-card.hidden-by-filter {
  display: none;
}

.assets-empty-hint,
.asset-modal-empty {
  display: grid;
  min-height: 120px;
  align-items: center;
  color: #8d959d;
  font-size: 12px;
  line-height: 1.6;
}

.assets-empty-hint {
  grid-column: span 2;
  margin: 0;
  padding: 0 10px;
}

.asset-modal-empty {
  min-height: 160px;
  padding: 18px;
  border: 1px dashed #dce2e6;
  border-radius: 9px;
  background: #fbfcfc;
  text-align: center;
}

.asset-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(72, 80, 90, 0.58);
  backdrop-filter: blur(8px);
}

.asset-dialog {
  display: flex;
  width: min(860px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 56px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d7dde2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(20, 30, 40, 0.22);
}

.asset-modal-head,
.asset-filter-row,
.asset-tab-row,
.asset-modal-foot {
  flex: 0 0 auto;
}

.asset-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 12px;
}

.asset-title-row {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.asset-upload-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #111820;
  font-size: 17px;
  line-height: 1;
}

.asset-modal-head h2 {
  margin: 0 0 6px;
  color: #151b22;
  font-size: 18px;
  line-height: 1.2;
}

.asset-modal-head p {
  margin: 0;
  color: #777f88;
  font-size: 12px;
}

.asset-modal-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.asset-selected-pill {
  padding: 7px 13px;
  border-radius: 999px;
  color: #7b838c;
  background: #f0f1f2;
  font-size: 12px;
  font-weight: 800;
}

.asset-close-button {
  width: 30px;
  height: 30px;
  border: 0;
  color: #565e67;
  background: transparent;
  font-size: 26px;
  line-height: 1;
}

.asset-filter-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 22px 14px;
}

.asset-source-menu {
  position: relative;
  z-index: 3;
}

.asset-source-select,
.asset-search {
  display: flex;
  min-height: 36px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #5f6872;
  background: #fff;
  font-size: 12px;
}

.asset-source-select {
  width: 100%;
  justify-content: space-between;
  padding: 0 12px;
  font-weight: 800;
}

.asset-source-select em {
  color: #6f7881;
  font-style: normal;
  transform: rotate(0deg);
  transition: transform 0.15s ease;
}

.asset-source-select[aria-expanded="true"] em {
  transform: rotate(180deg);
}

.asset-source-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  width: min(470px, calc(100vw - 64px));
  gap: 6px;
  padding: 10px;
  border: 1px solid #dfe4e8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(20, 30, 40, 0.12);
}

.asset-source-dropdown button {
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  align-items: center;
  min-height: 42px;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  color: #20262d;
  background: transparent;
  text-align: left;
  font-weight: 900;
}

.asset-source-dropdown button.active {
  background: #e8e8e8;
}

.asset-source-dropdown button span,
.asset-source-dropdown button em {
  display: grid;
  place-items: center;
  color: #66707a;
  font-style: normal;
  font-weight: 800;
}

.asset-source-dropdown button em {
  visibility: hidden;
}

.asset-source-dropdown button.active em {
  visibility: visible;
}

.asset-search {
  padding: 0 12px 0 14px;
}

.asset-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #20262d;
  background: transparent;
  font: inherit;
}

.asset-search input::placeholder {
  color: #8d959d;
}

.asset-search span {
  color: #7b838c;
  font-size: 18px;
}

.asset-tab-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 22px 12px;
}

.asset-tabs,
.asset-filter-pills {
  display: flex;
  align-items: center;
  gap: 22px;
}

.asset-tabs button,
.asset-filter-pills button {
  border: 0;
  color: #69727c;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.asset-tabs button.active {
  color: #20262d;
}

.asset-filter-pills {
  gap: 8px;
}

.asset-filter-pills button {
  min-height: 32px;
  padding: 0 16px;
  border-radius: 999px;
}

.asset-filter-pills button.active {
  color: #20262d;
  background: #eef0f1;
}

.asset-grid-modal {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  overflow: auto;
  padding: 0 22px 18px;
}

.asset-upload-card,
.asset-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.asset-upload-card {
  position: relative;
  display: grid;
  min-height: 160px;
  grid-template-rows: 1fr 42px;
  border-style: dashed;
}

.asset-upload-main {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #6b737c;
  cursor: pointer;
}

.asset-upload-main strong {
  color: #121820;
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}

.asset-upload-main b {
  color: #20262d;
  font-size: 14px;
}

.asset-upload-main span {
  font-size: 11px;
}

.asset-upload-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.asset-upload-buttons button {
  border: 0;
  background: transparent;
  color: #20262d;
  font-size: 12px;
  font-weight: 900;
}

.asset-upload-buttons button + button {
  border-left: 1px solid var(--line);
}

.asset-card {
  position: relative;
  display: grid;
  grid-template-rows: 105px auto auto;
  padding: 0;
  color: #20262d;
  text-align: left;
}

.asset-card.selected {
  border-color: #0f766e;
  box-shadow: 0 0 0 1px #0f766e;
}

.asset-card.hidden-by-filter {
  display: none;
}

.asset-thumb {
  display: block;
  width: 100%;
  height: 105px;
  background:
    radial-gradient(circle at 70% 18%, rgba(255, 255, 255, 0.86), transparent 18%),
    linear-gradient(135deg, #f6d31a, #fff2a2 45%, #f35b69);
}

.asset-thumb img {
  display: block;
  width: 100%;
  height: 105px;
  object-fit: cover;
}

.asset-link-popover {
  position: fixed;
  z-index: 60;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #dfe4e8;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 50px rgba(20, 30, 40, 0.2);
}

.asset-link-popover::after {
  position: absolute;
  right: 42px;
  bottom: -9px;
  width: 18px;
  height: 18px;
  border-right: 1px solid #dfe4e8;
  border-bottom: 1px solid #dfe4e8;
  background: rgba(255, 255, 255, 0.96);
  transform: rotate(45deg);
  content: "";
}

.asset-link-popover header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.asset-link-popover header strong {
  color: #20262d;
  font-size: 14px;
}

.asset-link-popover header button {
  border: 0;
  color: #606973;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.asset-link-popover input {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  color: #20262d;
}

.asset-link-popover p {
  margin: 0;
  color: #9aa2aa;
  font-size: 12px;
}

.asset-link-submit {
  justify-self: end;
  min-width: 96px;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #202226;
  font-weight: 900;
}

.thumb-hands {
  background:
    radial-gradient(circle at 22% 68%, #f4c6a8 0 10%, transparent 11%),
    radial-gradient(circle at 62% 34%, #f9d888 0 11%, transparent 12%),
    linear-gradient(140deg, #f7f0e6, #d7b790 52%, #f9c51b 53%, #f05262);
}

.thumb-hand {
  background:
    radial-gradient(circle at 52% 48%, #f0be93 0 17%, transparent 18%),
    linear-gradient(145deg, #e9e4dd, #f7faf8 45%, #f8ca20 46%, #e85a67);
}

.thumb-bowl {
  background:
    radial-gradient(circle at 72% 22%, #e6a337 0 10%, transparent 11%),
    radial-gradient(circle at 42% 38%, #f4d9b1 0 17%, transparent 18%),
    linear-gradient(145deg, #fcf5e7, #d8ccc0 56%, #f8ce27);
}

.thumb-board {
  background:
    linear-gradient(0deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
    repeating-linear-gradient(0deg, #f8d51e 0 11px, #f45367 11px 16px, #fff2a2 16px 28px);
}

.thumb-product,
.thumb-pack {
  background:
    radial-gradient(circle at 24% 30%, rgba(255, 255, 255, 0.9), transparent 18%),
    linear-gradient(138deg, #ffd31a, #fff4a7 46%, #f45468);
}

.thumb-pack {
  transform: skewY(-4deg);
}

.thumb-audio {
  display: grid;
  place-items: center;
  color: #151b22;
  background: #e8e8e8;
  font-size: 26px;
}

.thumb-face {
  background:
    radial-gradient(circle at 52% 36%, #efc6a7 0 12%, transparent 13%),
    linear-gradient(145deg, #241c18, #66523e 48%, #1b1e22 49%);
}

.asset-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 5px;
  color: #fff;
  background: rgba(20, 20, 20, 0.5);
  font-size: 11px;
  font-style: normal;
}

.asset-check {
  position: absolute;
  bottom: 52px;
  left: 8px;
  z-index: 1;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.92);
}

.asset-card.selected .asset-check::after {
  position: absolute;
  top: 2px;
  left: 6px;
  width: 5px;
  height: 10px;
  border-right: 2px solid #0f766e;
  border-bottom: 2px solid #0f766e;
  transform: rotate(42deg);
  content: "";
}

.asset-card strong {
  overflow: hidden;
  padding: 8px 9px 2px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-card small {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 0 9px 8px;
  color: #8b939b;
  font-size: 11px;
  line-height: 1.2;
}

.asset-card small b,
.asset-card small em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
  font-weight: 500;
}

.asset-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 18px;
  border-top: 1px solid #edf0f2;
}

.asset-modal-foot button {
  min-width: 72px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #6b737c;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.asset-modal-foot .asset-confirm-button {
  border-color: #8f8f8f;
  color: #fff;
  background: #8f8f8f;
  cursor: not-allowed;
}

.asset-modal-foot .asset-confirm-button.is-ready {
  border-color: #23262a;
  background: #23262a;
  cursor: pointer;
}

.asset-modal-foot .asset-confirm-button:disabled {
  opacity: 1;
}

.prompt-modal {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 34px;
  background: rgba(28, 36, 46, 0.42);
  backdrop-filter: blur(9px);
}

.prompt-dialog {
  display: grid;
  grid-template-rows: auto 1fr;
  width: min(980px, 100%);
  min-height: min(760px, calc(100vh - 68px));
  overflow: hidden;
  border: 1px solid #dfe5eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 22, 31, 0.28);
}

.prompt-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  border-bottom: 1px solid #e7ebef;
}

.prompt-dialog h2 {
  margin: 0;
  color: #27313c;
  font-size: 18px;
}

.prompt-dialog header button {
  border: 0;
  color: #74808b;
  background: transparent;
  font-size: 24px;
}

.prompt-library-grid {
  display: grid;
  align-content: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 22px 28px 70px;
}

.prompt-empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 34px;
  border: 1px dashed #d7dee5;
  border-radius: 12px;
  color: #8a949e;
  text-align: center;
}

.prompt-card {
  display: grid;
  gap: 10px;
  min-height: 210px;
  padding: 18px;
  border: 1px solid #e2e7ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(16, 24, 33, 0.05);
}

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

.prompt-card h3 {
  overflow: hidden;
  margin: 0;
  color: #26313c;
  font-size: 16px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prompt-card-head div {
  display: flex;
  gap: 8px;
}

.prompt-card-head button {
  border: 0;
  color: #87929d;
  background: transparent;
  font-size: 16px;
}

.prompt-card p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #7c8792;
  font-size: 13px;
}

.prompt-card p span,
.prompt-ref-tags span {
  padding: 3px 9px;
  border-radius: 999px;
  background: #eef0f2;
  font-weight: 700;
}

.prompt-card p em,
.prompt-card p b {
  font-style: normal;
  font-weight: 500;
}

.prompt-content-button {
  display: -webkit-box;
  overflow: hidden;
  min-height: 82px;
  border: 0;
  color: #798592;
  background: transparent;
  font-size: 14px;
  line-height: 1.7;
  text-align: left;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.prompt-ref-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 24px;
}

.prompt-ref-tags span {
  color: #697887;
  font-size: 12px;
}

.prompt-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 48;
  display: grid;
  place-items: center;
  padding: 34px;
  background: rgba(29, 38, 50, 0.48);
  backdrop-filter: blur(8px);
}

.prompt-edit-dialog {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(1120px, calc(100vw - 90px));
  min-height: min(560px, calc(100vh - 120px));
  overflow: hidden;
  border: 1px solid #dfe5eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 22, 31, 0.28);
}

.prompt-edit-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  border-bottom: 1px solid #e7ebef;
}

.prompt-edit-dialog h2 {
  margin: 0;
  color: #27313c;
  font-size: 18px;
}

.prompt-edit-dialog header button {
  border: 0;
  color: #74808b;
  background: transparent;
  font-size: 24px;
}

.prompt-edit-body {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 24px 28px;
}

.prompt-edit-body label {
  display: grid;
  gap: 9px;
  color: #7a8590;
  font-size: 14px;
  font-weight: 800;
}

.prompt-edit-body input,
.prompt-edit-body textarea {
  width: 100%;
  border: 1px solid #e1e6eb;
  border-radius: 12px;
  outline: 0;
  color: #24303c;
  background: #fff;
  font: inherit;
  font-weight: 700;
}

.prompt-edit-body input {
  height: 48px;
  padding: 0 16px;
}

.prompt-edit-body textarea {
  min-height: 220px;
  padding: 18px;
  resize: vertical;
  font-weight: 500;
  line-height: 1.7;
}

.prompt-edit-dialog footer {
  display: flex;
  justify-content: flex-end;
  padding: 0 28px 24px;
}

.prompt-edit-dialog footer button {
  min-width: 110px;
  min-height: 48px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: #111;
  font-size: 14px;
  font-weight: 900;
}

.help-write-modal {
  position: fixed;
  inset: 0;
  z-index: 49;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(29, 38, 50, 0.48);
  backdrop-filter: blur(8px);
}

.help-write-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1240px, calc(100vw - 48px));
  height: min(760px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid #dfe5eb;
  border-radius: 16px;
  background: #eef0f2;
  box-shadow: 0 24px 80px rgba(15, 22, 31, 0.28);
}

.help-write-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px 14px;
}

.help-write-dialog h2,
.help-write-dialog p {
  margin: 0;
}

.help-write-dialog h2 {
  color: #20272f;
  font-size: 18px;
  font-weight: 900;
}

.help-write-dialog header p {
  display: none;
  color: #808b96;
  font-size: 12px;
}

.help-write-dialog header button {
  border: 0;
  color: #74808b;
  background: transparent;
  font-size: 23px;
}

.help-write-body {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
  padding: 0 18px;
}

.help-write-steps {
  display: grid;
  align-content: flex-start;
  gap: 0;
  padding: 18px 14px;
  border-radius: 14px;
  background: #fff;
}

.help-write-steps span {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 4px 12px;
  position: relative;
  padding: 13px 8px 22px;
  border-radius: 12px;
  color: #89949f;
  background: transparent;
  font-weight: 900;
  text-align: left;
}

.help-write-steps span::after {
  content: "";
  position: absolute;
  top: 49px;
  bottom: -2px;
  left: 25px;
  width: 1px;
  background: #e5e9ed;
}

.help-write-steps span:last-child::after {
  display: none;
}

.help-write-steps b {
  display: grid;
  place-items: center;
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #a2abb4;
  background: #fff;
  border: 1px solid #e3e7eb;
  font-size: 13px;
}

.help-write-steps strong {
  color: inherit;
  font-size: 15px;
  line-height: 1.3;
}

.help-write-steps em {
  color: #a1a9b2;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.3;
}

.help-write-steps span.active {
  color: #20272f;
  background: transparent;
}

.help-write-steps span.active b {
  color: #fff;
  background: #202328;
  border-color: #202328;
}

.help-write-steps span.done {
  color: #4f5c67;
}

.help-write-main {
  min-height: 0;
  overflow: auto;
  border-radius: 14px;
}

.help-write-panel {
  min-height: 0;
  padding: 0 0 12px;
}

.help-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #e2e8ee;
  border-radius: 13px;
  background: #fff;
}

.help-progress strong,
.help-progress em {
  color: #27313c;
  font-size: 14px;
  font-style: normal;
}

.help-progress small {
  grid-column: 1 / -1;
  color: #75818d;
  font-size: 12px;
}

.help-progress i {
  display: block;
  overflow: hidden;
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 999px;
  background: #edf1f4;
}

.help-progress b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #1772ff);
  transition: width 0.18s ease;
}

.help-progress[data-state="error"] strong,
.help-progress[data-state="error"] em {
  color: #b42318;
}

.help-progress[data-state="error"] b {
  background: #d92d20;
}

.help-analysis-section {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid #e2e8ee;
  border-radius: 14px;
  background: #fff;
}

.help-analysis-section h3 {
  margin: 0;
  color: #20272f;
  font-size: 16px;
  font-weight: 900;
}

.help-material-list {
  display: grid;
  gap: 14px;
}

.help-material-analysis {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
}

.help-material-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid #dfe6eb;
  border-radius: 12px;
  color: #9aa3ad;
  background: #fbfcfd;
  font-size: 12px;
}

.help-material-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.help-material-analysis textarea {
  min-height: 132px;
  padding: 14px;
  border: 1px solid #dfe6eb;
  border-radius: 12px;
  outline: 0;
  color: #20272f;
  background: #fff;
  font: inherit;
  font-size: 13px;
  line-height: 1.7;
  resize: vertical;
}

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

.help-insight-grid label {
  display: grid;
  gap: 8px;
  color: #79838e;
  font-size: 13px;
  font-weight: 900;
}

.help-insight-grid input {
  height: 42px;
  padding: 0 14px;
  border: 1px solid #dfe6eb;
  border-radius: 11px;
  outline: 0;
  color: #20272f;
  background: #fff;
  font: inherit;
}

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

.help-list-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #e1e6eb;
  border-radius: 13px;
  background: #fff;
}

.help-list-card h4 {
  margin: 0;
  color: #20272f;
  font-size: 15px;
  font-weight: 900;
}

.help-list-card > div {
  display: grid;
  gap: 10px;
}

.help-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 8px;
}

.help-list-item input {
  height: 40px;
  min-width: 0;
  padding: 0 14px;
  border: 1px solid #dfe6eb;
  border-radius: 11px;
  outline: 0;
  color: #20272f;
  background: #fff;
  font: inherit;
  font-size: 13px;
}

.help-list-item button {
  width: 36px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  color: #6f7680;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

.help-list-card > button {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px dashed #d9e0e7;
  border-radius: 11px;
  color: #858d96;
  background: #fff;
  font-size: 20px;
  cursor: pointer;
}

.help-config-section {
  display: grid;
  gap: 18px;
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 14px;
  background: #fff;
}

.help-config-section h3 {
  margin: 0;
  color: #20272f;
  font-size: 16px;
  font-weight: 900;
}

.help-config-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.help-config-section [data-help-default-framework] {
  display: grid;
  gap: 18px;
}

.help-config-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.help-config-row > span {
  color: #20272f;
  font-size: 14px;
  font-weight: 900;
}

.help-choice-grid {
  display: grid;
  gap: 12px;
}

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

.help-choice-grid.six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.help-choice-grid button {
  position: relative;
  min-height: 42px;
  border: 1px solid #e4e7eb;
  border-radius: 10px;
  color: #747b84;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.help-choice-grid button.active {
  border-color: #1f2328;
  color: #20272f;
  box-shadow: 0 2px 5px rgba(15, 20, 28, 0.12);
}

.help-choice-grid button.active::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #fff;
  background: #202328;
  font-size: 11px;
  line-height: 1;
}

.help-config-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #7c858e;
  font-size: 13px;
  font-weight: 900;
}

.help-config-toggle button {
  display: flex;
  align-items: center;
  width: 46px;
  height: 26px;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: #eef0f2;
  cursor: pointer;
}

.help-config-toggle i {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 28, 36, 0.16);
  transition: transform 0.16s ease;
}

.help-config-toggle button.active {
  background: #202328;
}

.help-config-toggle button.active i {
  transform: translateX(20px);
}

.help-reference-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.help-reference-panel > div,
.help-reference-panel > label {
  display: grid;
  gap: 12px;
  color: #20272f;
  font-size: 14px;
  font-weight: 900;
}

.help-reference-panel h4 {
  margin: 0;
  color: #20272f;
  font-size: 14px;
}

.help-reference-upload {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  min-height: 262px;
  border: 1px dashed #d9e0e7;
  border-radius: 12px;
  color: #20272f;
  background: #fff;
  cursor: pointer;
}

.help-reference-upload span {
  color: #6f7680;
  font-size: 34px;
  line-height: 1;
}

.help-reference-upload strong {
  max-width: 90%;
  overflow: hidden;
  color: #20272f;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.help-reference-upload em {
  color: #9aa3ad;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.help-reference-panel textarea {
  min-height: 262px;
  padding: 14px;
  border: 1px solid #dfe6eb;
  border-radius: 12px;
  outline: 0;
  color: #20272f;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
  resize: vertical;
}

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

.help-config-grid label,
.help-textarea-label {
  display: grid;
  gap: 8px;
  color: #6f7b86;
  font-size: 13px;
  font-weight: 900;
}

.help-config-grid select,
.help-textarea-label textarea,
.help-write-panel[data-help-panel="preview"] textarea {
  border: 1px solid #dfe6eb;
  border-radius: 11px;
  outline: 0;
  color: #26313c;
  background: #fff;
  font: inherit;
}

.help-config-grid select {
  height: 42px;
  padding: 0 12px;
}

.help-textarea-label {
  margin-top: 14px;
}

.help-textarea-label textarea {
  min-height: 120px;
  padding: 12px;
  resize: vertical;
  line-height: 1.6;
}

.help-script-loading {
  display: grid;
  place-items: center;
  position: relative;
  min-height: 590px;
  overflow: hidden;
  border-radius: 14px;
  background: #f0f0f0;
}

.help-script-dots {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  opacity: 0.58;
  background-image: radial-gradient(circle, rgba(132, 94, 255, 0.34) 1.3px, transparent 1.6px);
  background-size: 14px 14px;
  mask-image: radial-gradient(circle, #000 0 42%, transparent 72%);
  animation: helpPulse 1.8s ease-in-out infinite;
}

.help-script-loading span {
  position: relative;
  z-index: 1;
  padding: 13px 22px;
  border: 1px solid #dfe3e8;
  border-radius: 13px;
  color: #8b939d;
  background: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(25, 30, 38, 0.05);
}

@keyframes helpPulse {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.48;
  }

  50% {
    transform: scale(1.02);
    opacity: 0.72;
  }
}

.help-script-preview {
  min-height: 590px;
  max-height: 590px;
  overflow: auto;
  padding: 18px 20px;
  border-radius: 14px;
  color: #20272f;
  background: #fff;
  font-size: 14px;
  line-height: 1.75;
}

.help-script-preview h3,
.help-script-preview h4,
.help-script-preview p,
.help-script-preview ul {
  margin: 0;
}

.help-script-preview h3 {
  margin-top: 4px;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 900;
}

.help-script-preview h4 {
  margin-top: 14px;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 900;
}

.help-script-preview ul {
  display: grid;
  gap: 5px;
  padding-left: 18px;
}

.help-script-preview li {
  padding-left: 3px;
}

.help-write-panel[data-help-panel="preview"] textarea {
  width: 100%;
  min-height: 590px;
  padding: 16px;
  resize: vertical;
  font-size: 13px;
  line-height: 1.7;
}

.help-write-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 18px;
}

.help-write-dialog footer button {
  min-width: 86px;
  min-height: 38px;
  border: 1px solid #dfe6eb;
  border-radius: 10px;
  color: #65717d;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.help-write-dialog footer button:disabled {
  border-color: #f0f1f2;
  color: #b5bbc2;
  background: #f3f4f5;
  cursor: default;
}

.help-write-dialog footer .primary,
.help-write-dialog footer [data-help-next] {
  border-color: #111;
  color: #fff;
  background: #111;
}

.help-write-dialog footer [data-help-rerun] {
  margin-right: auto;
  min-width: 174px;
  color: #6b737c;
  background: #f6f7f8;
  border-color: #f6f7f8;
}

.editor-zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 44;
  display: grid;
  place-items: center;
  padding: 34px;
  background: rgba(34, 43, 55, 0.42);
  backdrop-filter: blur(8px);
}

.editor-zoom-panel,
.editor-zoom-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(820px, calc(100vw - 360px));
  min-width: 640px;
  height: min(520px, calc(100vh - 210px));
  min-height: 420px;
  padding: 20px 22px 16px;
  border: 1px solid #dfe5eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(17, 24, 34, 0.26);
}

.editor-zoom-head,
.editor-zoom-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
}

.editor-zoom-dialog > header h2 {
  margin: 0;
  color: #242b33;
  font-size: 16px;
}

.editor-zoom-dialog > header button,
.editor-zoom-dialog > footer button {
  border: 0;
  border-radius: 9px;
  color: #697583;
  background: #f6f8fa;
  font-weight: 900;
}

.editor-zoom-materials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-zoom-material,
.editor-zoom-materials span {
  position: relative;
  overflow: hidden;
  width: 62px;
  height: 62px;
  border: 1px solid #e1e6eb;
  border-radius: 10px;
  background:
    radial-gradient(circle at 72% 22%, rgba(255, 255, 255, 0.9), transparent 17%),
    linear-gradient(135deg, #ffd51d, #fff4cf 48%, #f4536f);
}

.editor-zoom-material img,
.editor-zoom-materials span img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editor-zoom-material b,
.editor-zoom-materials span b {
  position: absolute;
  right: 4px;
  bottom: 4px;
  left: auto;
  display: grid;
  min-width: 38px;
  height: 18px;
  padding: 0 6px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: rgba(31, 36, 41, 0.62);
  font-size: 10px;
}

.editor-zoom-actions {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.editor-zoom-actions .material-add-card {
  width: 76px;
  height: 76px;
}

.editor-zoom-actions > button:last-child {
  position: relative;
  z-index: 2;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #697583;
  background: #f6f8fa;
  font-size: 18px;
  line-height: 1;
}

.editor-zoom-panel textarea,
.editor-zoom-dialog textarea {
  width: 100%;
  min-height: 0;
  resize: none;
  border: 0;
  outline: 0;
  color: #242b33;
  background: transparent;
  font-size: 14px;
  line-height: 1.75;
}

.editor-zoom-count,
.editor-zoom-dialog > footer {
  justify-self: end;
  color: #5d6874;
  font-size: 12px;
}

.editor-zoom-dialog > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  justify-self: stretch;
}

.hidden {
  display: none !important;
}

.hidden-by-filter {
  display: none !important;
}

@media (max-width: 900px) {
  body {
    min-width: 0;
  }

  .home-shell,
  .agent-shell,
  .tool-shell {
    grid-template-columns: 1fr;
  }

  .front-rail {
    position: fixed;
    z-index: 10;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 8px;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .front-logo,
  .credit-mini,
  .user-mini,
  .menu-button,
  .history-panel,
  .front-nav-item:nth-child(n + 5) {
    display: none;
  }

  .front-rail nav {
    display: contents;
  }

  .home-main,
  .agent-main,
  .tool-main,
  .video-studio {
    padding: 24px 16px 92px;
  }

  .assets-main {
    padding: 24px 16px 92px;
  }

  .home-topbar {
    justify-content: center;
  }

  .hero-brand h1 {
    font-size: 24px;
  }

  .home-composer,
  .agent-composer,
  .tool-main,
  .video-studio,
  .assets-toolbar,
  .quick-tools,
  .feature-strip,
  .video-config-cards,
  .video-stage,
  .video-materials,
  .writer-steps,
  .generate-row,
  .preview-summary,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .home-composer {
    grid-template-columns: 84px minmax(0, 1fr) 54px;
    grid-template-rows: 1fr auto;
  }

  .home-composer input {
    grid-column: 2 / 4;
    grid-row: 1;
    min-width: 0;
  }

  .home-reference-list {
    grid-column: 2 / 4;
    grid-row: 1;
  }

  .agent-composer textarea,
  .agent-composer .mode-select,
  .composer-actions {
    grid-column: auto;
    grid-row: auto;
  }

  .home-send,
  .mode-select {
    grid-column: auto;
    grid-row: auto;
  }

  .home-composer .home-send {
    grid-column: 3;
    grid-row: 2;
  }

  .home-composer .mode-select {
    grid-column: 1 / 3;
    grid-row: 2;
  }

  .mode-menu {
    width: min(178px, calc(100vw - 40px));
  }

  .feature-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .material-grid,
  .material-grid.image-only {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .assets-kind-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .assets-source-dropdown {
    width: 100%;
  }

  .assets-toolbar-actions {
    justify-content: stretch;
  }

  .assets-toolbar-actions button {
    width: 100%;
  }

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

  .video-studio {
    gap: 12px;
  }

  .video-left-panel,
  .video-preview-panel,
  .video-task-panel {
    min-height: auto;
  }

  .blur-side {
    display: none;
  }

  .video-player,
  .video-preview-empty {
    min-height: 420px;
  }

  .download-button {
    top: 74px;
    right: 18px;
  }

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

  .help-write-steps {
    display: none;
  }

  .help-material-analysis,
  .help-insight-grid,
  .help-list-grid,
  .help-config-grid {
    grid-template-columns: 1fr;
  }

  .help-config-row,
  .help-choice-grid.four,
  .help-choice-grid.six,
  .help-reference-panel {
    grid-template-columns: 1fr;
  }

  .asset-modal {
    align-items: stretch;
    padding: 12px;
  }

  .asset-dialog {
    width: 100%;
    max-height: calc(100vh - 24px);
  }

  .asset-modal-head,
  .asset-tab-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .asset-modal-actions {
    align-self: stretch;
    justify-content: space-between;
  }

  .asset-filter-row {
    grid-template-columns: 1fr;
  }

  .asset-tab-row {
    gap: 10px;
  }

  .asset-tabs {
    gap: 18px;
  }

  .asset-filter-pills {
    width: 100%;
    justify-content: space-between;
  }

  .asset-filter-pills button {
    padding: 0 12px;
  }

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

  .asset-card {
    grid-template-rows: 96px auto auto;
  }

  .asset-thumb {
    height: 96px;
  }
}

/* Canvas library and workspace */
.canvas-page-body {
  overflow-x: hidden;
  background: #f5f6f7;
}

.canvas-home-shell {
  min-height: 100vh;
  background: #f5f6f7;
}

.canvas-library {
  min-width: 0;
  min-height: 100vh;
  padding: 34px 48px 56px;
  overflow: auto;
}

.canvas-tutorial-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.canvas-tutorial-section h1,
.canvas-project-section h2 {
  margin: 0;
  color: #20252b;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0;
}

.canvas-tutorial-section > header button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 0;
  color: #6f7882;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.canvas-tutorial-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  transition: opacity 180ms ease, transform 180ms ease;
}

.canvas-tutorial-grid.is-collapsed {
  display: none;
}

.canvas-tutorial-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 132px;
  align-content: start;
  gap: 10px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid #e0e4e8;
  border-radius: 8px;
  color: #20252b;
  background: #fff;
  box-shadow: 0 7px 20px rgba(30, 38, 46, 0.04);
  text-align: left;
}

.canvas-tutorial-card::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0) 48%, rgba(50, 111, 196, 0.08));
  content: "";
  pointer-events: none;
}

.canvas-tutorial-card:hover {
  border-color: #b9c3cc;
  box-shadow: 0 12px 28px rgba(30, 38, 46, 0.09);
  transform: translateY(-2px);
}

.canvas-tutorial-card > span {
  color: #939ca6;
  font-size: 11px;
  font-weight: 800;
}

.canvas-tutorial-card > div {
  position: relative;
  z-index: 2;
  display: grid;
  max-width: 58%;
  gap: 5px;
}

.canvas-tutorial-card > div strong {
  font-size: 15px;
  line-height: 1.25;
}

.canvas-tutorial-card > div small {
  color: #737d87;
  font-size: 11px;
  line-height: 1.5;
}

.tutorial-visual {
  position: absolute;
  right: 14px;
  bottom: 13px;
  display: grid;
  width: 88px;
  height: 78px;
  grid-template-columns: repeat(2, 1fr);
  align-content: end;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 18px rgba(38, 49, 59, 0.1);
  font-style: normal;
  transform: rotate(-3deg);
}

.tutorial-visual b,
.tutorial-visual em {
  display: grid;
  min-height: 18px;
  place-items: center;
  border-radius: 4px;
  color: #51606e;
  background: #eef1f4;
  font-size: 7px;
  font-style: normal;
  white-space: nowrap;
}

.tutorial-visual u {
  min-height: 22px;
  border-radius: 4px;
  background: linear-gradient(135deg, #f0c990, #76b9c9);
  text-decoration: none;
}

.tutorial-components .tutorial-visual em,
.tutorial-agent .tutorial-visual em {
  color: #fff;
  background: #3977b7;
}

.tutorial-agent::before {
  background: linear-gradient(135deg, transparent 48%, rgba(131, 83, 190, 0.1));
}

.tutorial-image::before {
  background: linear-gradient(135deg, transparent 48%, rgba(19, 139, 127, 0.1));
}

.tutorial-video::before {
  background: linear-gradient(135deg, transparent 48%, rgba(214, 126, 69, 0.1));
}

.tutorial-video .tutorial-visual {
  background: linear-gradient(145deg, #253246, #6b4854);
}

.tutorial-video .tutorial-visual b {
  grid-column: 1 / -1;
  min-height: 36px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 16px;
}

.tutorial-arrow {
  position: absolute;
  right: 12px;
  top: 12px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #20252b;
  font-size: 13px;
}

.canvas-project-section {
  margin-top: 34px;
}

.canvas-project-section > h2 {
  margin-bottom: 16px;
}

.canvas-project-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(148px, 1fr));
  gap: 20px 14px;
}

.canvas-new-project,
.canvas-project-card {
  min-width: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.canvas-new-project {
  display: grid;
  min-height: 190px;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 1px dashed #cfd5db;
  border-radius: 8px;
  color: #717b85;
  background: rgba(255, 255, 255, 0.55);
}

.canvas-new-project:hover {
  border-color: #5f6b76;
  color: #20252b;
  background: #fff;
}

.canvas-new-project span {
  font-size: 32px;
  font-weight: 300;
}

.canvas-new-project strong {
  font-size: 14px;
}

.canvas-new-project small {
  color: #929aa2;
  font-size: 11px;
}

.canvas-project-card {
  display: grid;
  gap: 9px;
  color: #22282e;
}

.canvas-project-preview {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid #e0e4e8;
  border-radius: 8px;
  background:
    radial-gradient(circle at 1px 1px, #e2e6ea 1px, transparent 1px),
    #fff;
  background-size: 16px 16px;
  box-shadow: 0 7px 18px rgba(30, 38, 46, 0.04);
}

.canvas-project-card:hover .canvas-project-preview {
  border-color: #aeb9c3;
  box-shadow: 0 12px 28px rgba(30, 38, 46, 0.09);
}

.canvas-project-preview > span {
  position: absolute;
  display: grid;
  width: 64px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(53, 71, 88, 0.12);
  border-radius: 5px;
  color: #42505c;
  background: #f2f7fb;
  font-size: 9px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(37, 49, 59, 0.08);
}

.canvas-project-preview > span:nth-child(1) { left: 16%; top: 17%; }
.canvas-project-preview > span:nth-child(2) { right: 12%; top: 30%; background: #f7f0fb; }
.canvas-project-preview > span:nth-child(3) { left: 24%; bottom: 16%; background: #edf7f3; }
.canvas-project-preview > span:nth-child(4) { right: 14%; bottom: 12%; background: #fff4e9; }

.canvas-project-preview > em {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #9aa2aa;
  font-size: 11px;
  font-style: normal;
}

.canvas-project-meta {
  display: grid;
  gap: 4px;
  padding: 0 2px;
}

.canvas-project-meta strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.canvas-project-meta small {
  color: #9098a1;
  font-size: 11px;
}

.canvas-project-empty {
  margin: 18px 0 0;
  color: #929aa2;
  font-size: 12px;
}

.canvas-editor-view {
  position: fixed;
  z-index: 90;
  inset: 0;
  min-width: 0;
  overflow: hidden;
  background: #f8f9fa;
}

body.canvas-editor-open {
  overflow: hidden;
}

.canvas-editor-topbar {
  position: absolute;
  z-index: 14;
  top: 14px;
  right: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.canvas-editor-project,
.canvas-editor-actions {
  display: flex;
  align-items: center;
  border: 1px solid #e1e5e8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(29, 38, 46, 0.08);
  pointer-events: auto;
}

.canvas-editor-project {
  position: relative;
  padding: 5px;
}

.canvas-editor-project > button {
  display: flex;
  width: 38px;
  height: 34px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  border-radius: 6px;
  background: #f2f4f6;
}

.canvas-editor-project > button img {
  width: 23px;
  height: 23px;
  border-radius: 6px;
  object-fit: cover;
}

.canvas-editor-project > input {
  width: 188px;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  outline: 0;
  color: #242a30;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
}

.canvas-project-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  width: 210px;
  padding: 7px;
  border: 1px solid #dfe4e7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(28, 37, 45, 0.14);
}

.canvas-project-menu button {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: #46515b;
  background: transparent;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
}

.canvas-project-menu button:hover { background: #f2f4f5; }
.canvas-project-menu button.danger { color: #c24d48; }

.canvas-editor-actions {
  gap: 2px;
  padding: 5px;
}

.canvas-editor-actions > a,
.canvas-editor-actions > button {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  color: #4d5963;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.canvas-editor-actions > a:hover,
.canvas-editor-actions > button:hover { background: #f0f2f4; }
.canvas-editor-actions > a span { color: #417cbd; }

.canvas-board {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 1px 1px, #dfe4e7 1px, transparent 1px),
    #f8f9fa;
  background-size: 20px 20px;
  touch-action: none;
}

.canvas-board.is-hand { cursor: grab; }
.canvas-board.is-panning { cursor: grabbing; }

.canvas-node-layer {
  position: absolute;
  z-index: 2;
  inset: 0;
  transform-origin: 0 0;
}

.canvas-empty-hint {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid #e0e4e7;
  border-radius: 8px;
  color: #76818a;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 26px rgba(30, 39, 47, 0.08);
  font-size: 12px;
  font-weight: 800;
  transform: translate(-50%, -50%);
}

.canvas-empty-hint span {
  color: #2f6d9f;
  font-size: 17px;
}

.canvas-node-card {
  position: absolute;
  display: grid;
  width: 248px;
  min-height: 154px;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid #dce2e6;
  border-radius: 8px;
  color: #273039;
  background: #fff;
  box-shadow: 0 12px 28px rgba(27, 37, 45, 0.1);
}

.canvas-node-card.is-dragging {
  z-index: 20;
  box-shadow: 0 18px 40px rgba(27, 37, 45, 0.18);
}

.canvas-node-card > header {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 6px 7px;
  border-bottom: 1px solid #ebedef;
  cursor: move;
}

.canvas-node-card > header > i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 6px;
  color: #2e668d;
  background: #eaf3f9;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.canvas-node-card[data-node-type="image"] > header > i { color: #18746b; background: #e7f5f1; }
.canvas-node-card[data-node-type="video"] > header > i { color: #9a5a2c; background: #fff0e4; }
.canvas-node-card[data-node-type="agent"] > header > i { color: #7350a1; background: #f1eafb; }

.canvas-node-card > header input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: #273039;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.canvas-node-card > header button {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 5px;
  color: #8a939b;
  background: transparent;
  font-size: 17px;
}

.canvas-node-card > header button:hover { color: #bd4e49; background: #f8eded; }

.canvas-node-body {
  display: grid;
  align-content: stretch;
  min-height: 108px;
  padding: 10px;
}

.canvas-node-body textarea {
  width: 100%;
  min-height: 88px;
  resize: none;
  border: 0;
  outline: 0;
  color: #4a555f;
  background: transparent;
  font-size: 11px;
  line-height: 1.65;
}

.canvas-node-media {
  position: relative;
  display: grid;
  min-height: 92px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #cfd7dd;
  border-radius: 6px;
  color: #7a858f;
  background: #f8fafb;
}

.canvas-node-media img,
.canvas-node-media video {
  width: 100%;
  height: 92px;
  object-fit: cover;
}

.canvas-node-media button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #d7dde2;
  border-radius: 6px;
  color: #52606c;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
}

.canvas-node-agent {
  display: grid;
  align-content: start;
  gap: 8px;
}

.canvas-node-agent p {
  margin: 0;
  color: #65717c;
  font-size: 11px;
  line-height: 1.6;
}

.canvas-node-agent button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: #24282c;
  font-size: 11px;
  font-weight: 900;
}

.canvas-editor-tools {
  position: absolute;
  z-index: 10;
  top: 50%;
  left: 18px;
  display: grid;
  width: 52px;
  gap: 3px;
  padding: 6px;
  border: 1px solid #dfe4e7;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(29, 38, 46, 0.1);
  transform: translateY(-50%);
}

.canvas-editor-tools > button {
  display: grid;
  min-height: 40px;
  place-items: center;
  gap: 2px;
  border: 0;
  border-radius: 6px;
  color: #606c76;
  background: transparent;
  font-size: 17px;
}

.canvas-editor-tools > button:first-child {
  color: #fff;
  background: #24282c;
  font-size: 24px;
}

.canvas-editor-tools > button.active,
.canvas-editor-tools > button:hover:not(:first-child) { color: #20252b; background: #eef1f3; }

.canvas-editor-tools > button span {
  font-size: 8px;
  font-weight: 800;
}

.canvas-add-menu {
  position: absolute;
  top: 0;
  left: calc(100% + 9px);
  display: grid;
  width: 226px;
  gap: 3px;
  padding: 7px;
  border: 1px solid #dde2e6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(27, 36, 44, 0.15);
}

.canvas-add-menu button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  color: #34404a;
  background: transparent;
  text-align: left;
}

.canvas-add-menu button:hover { background: #f1f3f5; }

.canvas-add-menu i {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 6px;
  color: #306b92;
  background: #eaf3f8;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.canvas-add-menu span { display: grid; gap: 2px; }
.canvas-add-menu strong { font-size: 12px; }
.canvas-add-menu small { color: #8a939b; font-size: 9px; }

.canvas-viewport-controls {
  position: absolute;
  z-index: 10;
  bottom: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px;
  border: 1px solid #dfe4e7;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 9px 24px rgba(29, 38, 46, 0.09);
}

.canvas-viewport-controls button {
  min-width: 31px;
  height: 31px;
  padding: 0 7px;
  border: 0;
  border-radius: 5px;
  color: #65717b;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.canvas-viewport-controls button:hover { color: #20252b; background: #eef1f3; }
.canvas-viewport-controls i { width: 1px; height: 20px; margin: 0 3px; background: #e0e4e7; }
.canvas-viewport-controls strong { min-width: 42px; color: #59646e; text-align: center; font-size: 11px; }

.canvas-side-drawer {
  position: absolute;
  z-index: 12;
  top: 72px;
  left: 82px;
  display: grid;
  width: 330px;
  max-height: calc(100vh - 100px);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #dde2e6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(27, 36, 44, 0.16);
}

.canvas-side-drawer > header {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #e8ebed;
}

.canvas-side-drawer > header div { display: grid; gap: 3px; }
.canvas-side-drawer > header strong { font-size: 14px; }
.canvas-side-drawer > header small { color: #8a939b; font-size: 10px; }
.canvas-side-drawer > header button { width: 30px; height: 30px; border: 0; border-radius: 6px; color: #6e7881; background: transparent; font-size: 20px; }

.canvas-template-list {
  display: grid;
  gap: 7px;
  padding: 10px;
  overflow: auto;
}

.canvas-template-list button {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 8px;
  border: 1px solid #e3e7ea;
  border-radius: 7px;
  color: #34404a;
  background: #fff;
  text-align: left;
}

.canvas-template-list button:hover { border-color: #96a6b3; background: #f8fafb; }
.canvas-template-list i { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 6px; color: #32658a; background: #eaf2f8; font-size: 10px; font-style: normal; font-weight: 900; }
.canvas-template-list span { display: grid; gap: 4px; }
.canvas-template-list strong { font-size: 12px; }
.canvas-template-list small { color: #8a939b; font-size: 9px; }

.canvas-chat-drawer {
  right: 18px;
  left: auto;
  width: 350px;
  grid-template-rows: auto minmax(140px, 1fr) auto;
}

.canvas-chat-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  overflow: auto;
}

.canvas-chat-messages article {
  display: grid;
  gap: 4px;
  max-width: 92%;
}

.canvas-chat-messages article.user { justify-self: end; }
.canvas-chat-messages article span { color: #89929a; font-size: 9px; font-weight: 900; }
.canvas-chat-messages article.user span { justify-self: end; }
.canvas-chat-messages article p { margin: 0; padding: 9px 10px; border-radius: 7px; color: #4b5761; background: #f0f3f5; font-size: 11px; line-height: 1.55; }
.canvas-chat-messages article.user p { color: #fff; background: #25292d; }

.canvas-chat-drawer form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 7px;
  padding: 10px;
  border-top: 1px solid #e8ebed;
}

.canvas-chat-drawer textarea {
  width: 100%;
  min-height: 64px;
  resize: none;
  padding: 9px;
  border: 1px solid #dfe4e7;
  border-radius: 7px;
  outline: 0;
  color: #3c4852;
  font-size: 11px;
  line-height: 1.5;
}

.canvas-chat-drawer form button {
  align-self: end;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #24282c;
  font-size: 17px;
}

.canvas-minimap-popover {
  position: absolute;
  z-index: 11;
  bottom: 66px;
  left: 18px;
  width: 190px;
  height: 116px;
  overflow: hidden;
  border: 1px solid #dce2e6;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(29, 38, 46, 0.12);
}

.canvas-minimap-popover span {
  position: absolute;
  width: 22px;
  height: 14px;
  border: 1px solid #9aa8b3;
  border-radius: 3px;
  background: #eaf2f8;
}

.canvas-dialog-layer {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(42, 50, 58, 0.45);
  backdrop-filter: blur(5px);
}

.canvas-info-dialog {
  display: grid;
  width: min(760px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #dbe1e5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(25, 33, 40, 0.24);
}

.canvas-info-dialog > header {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid #e6eaed;
}

.canvas-info-dialog > header div { display: grid; gap: 2px; }
.canvas-info-dialog > header span { color: #76818a; font-size: 10px; font-weight: 800; }
.canvas-info-dialog > header h2 { margin: 0; color: #252c33; font-size: 17px; }
.canvas-info-dialog > header button { width: 32px; height: 32px; border: 0; border-radius: 6px; color: #717c85; background: transparent; font-size: 23px; }

.canvas-tutorial-demo {
  min-height: 300px;
  margin: 18px;
  border: 1px solid #e0e4e7;
  border-radius: 8px;
  background:
    radial-gradient(circle at 1px 1px, #dfe4e7 1px, transparent 1px),
    #f8f9fa;
  background-size: 18px 18px;
}

.canvas-tutorial-demo::before,
.canvas-tutorial-demo::after {
  position: absolute;
  display: grid;
  width: 164px;
  min-height: 88px;
  place-items: center;
  border: 1px solid #dce2e6;
  border-radius: 7px;
  color: #5f6a74;
  background: #fff;
  box-shadow: 0 9px 22px rgba(30, 39, 47, 0.1);
  content: "输入内容";
  font-size: 12px;
  font-weight: 900;
}

.canvas-tutorial-demo { position: relative; }
.canvas-tutorial-demo::before { top: 64px; left: 18%; }
.canvas-tutorial-demo::after { right: 18%; bottom: 64px; content: "生成结果"; }

.canvas-info-dialog > footer {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 18px;
  border-top: 1px solid #e6eaed;
}

.canvas-info-dialog > footer p { margin: 0; color: #737e87; font-size: 11px; line-height: 1.55; }
.canvas-info-dialog > footer button { min-width: 94px; min-height: 36px; border: 0; border-radius: 7px; color: #fff; background: #24282c; font-size: 12px; font-weight: 900; }

.canvas-share-dialog { width: min(560px, calc(100vw - 48px)); }
.canvas-share-dialog > div { display: grid; grid-template-columns: minmax(0, 1fr) 88px; gap: 10px; padding: 22px 18px; }
.canvas-share-dialog label { display: grid; gap: 7px; color: #747f89; font-size: 10px; font-weight: 800; }
.canvas-share-dialog input { width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid #dce2e6; border-radius: 7px; outline: 0; color: #4b5761; background: #f7f9fa; font-size: 11px; }
.canvas-share-dialog > div > button { align-self: end; min-height: 38px; border: 0; border-radius: 7px; color: #fff; background: #24282c; font-size: 12px; font-weight: 900; }

.canvas-toast {
  position: fixed;
  z-index: 160;
  bottom: 26px;
  left: 50%;
  max-width: min(460px, calc(100vw - 32px));
  padding: 10px 15px;
  border-radius: 8px;
  color: #fff;
  background: #171a1d;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.canvas-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1180px) {
  .canvas-library { padding-right: 28px; padding-left: 28px; }
  .canvas-tutorial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .canvas-project-grid { grid-template-columns: repeat(4, minmax(148px, 1fr)); }
}

@media (max-width: 900px) {
  .canvas-library { padding: 22px 14px 86px; }
  .canvas-tutorial-grid { grid-template-columns: 1fr; }
  .canvas-project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .canvas-new-project,
  .canvas-project-preview { min-height: 142px; }
  .canvas-editor-topbar { top: 8px; right: 8px; left: 8px; }
  .canvas-editor-project > input { width: 118px; }
  .canvas-editor-actions span { display: none; }
  .canvas-editor-tools { top: auto; bottom: 62px; left: 8px; grid-auto-flow: column; width: auto; transform: none; }
  .canvas-editor-tools > button { width: 40px; }
  .canvas-add-menu { top: auto; bottom: calc(100% + 8px); left: 0; }
  .canvas-viewport-controls { bottom: 8px; left: 8px; }
  .canvas-side-drawer,
  .canvas-chat-drawer { top: 60px; right: 8px; bottom: 8px; left: 8px; width: auto; max-height: none; }
  .canvas-node-card { width: 218px; }
  .canvas-minimap-popover { bottom: 52px; left: 8px; }
}
