:root {
  --ui-page: #f4f6f9;
  --ui-surface: #ffffff;
  --ui-surface-soft: #f8fafc;
  --ui-surface-blue: #f3f7ff;
  --ui-ink: #151922;
  --ui-ink-soft: #394150;
  --ui-muted: #737c8c;
  --ui-line: #e4e8ee;
  --ui-line-strong: #d5dbe4;
  --ui-primary: #f2553d;
  --ui-primary-dark: #db432d;
  --ui-primary-soft: #fff2ee;
  --ui-blue: #3267d6;
  --ui-blue-soft: #edf3ff;
  --ui-teal: #158f85;
  --ui-teal-soft: #eaf8f6;
  --ui-shadow-xs: 0 1px 2px rgba(20, 25, 34, .04);
  --ui-shadow-sm: 0 8px 24px rgba(20, 25, 34, .055);
  --ui-shadow-md: 0 16px 38px rgba(20, 25, 34, .09);
}

body.app-body,
body.comic-body,
body.agent-body {
  color: var(--ui-ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.app-body:not(.landing-body),
body.comic-body,
body.agent-body {
  background: var(--ui-page);
  background-image: none;
}

body.app-body:not(.landing-body) .app-shell,
body.comic-body .comic-shell {
  grid-template-columns: 248px minmax(0, 1fr);
  background: var(--ui-page);
}

.workspace-stage {
  min-width: 0;
  min-height: 100vh;
}

.workspace-topbar {
  position: sticky;
  top: 0;
  z-index: 24;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 30px;
  border-bottom: 1px solid rgba(221, 226, 234, .9);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8);
  backdrop-filter: blur(16px);
}

.workspace-context {
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 7px 10px;
}

.workspace-context::before {
  content: "";
  grid-row: 1 / 3;
  width: 3px;
  height: 28px;
  border-radius: 3px;
  background: var(--ui-primary);
}

.workspace-context span {
  color: var(--ui-muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.workspace-context strong {
  color: var(--ui-ink);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.1;
}

.workspace-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.workspace-icon-button {
  position: relative;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  color: #626c7d;
  background: #fff;
  box-shadow: var(--ui-shadow-xs);
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.workspace-icon-button:hover {
  color: var(--ui-blue);
  border-color: #c8d7f5;
  background: var(--ui-blue-soft);
}

.workspace-icon-button .ui-icon {
  width: 17px;
  height: 17px;
}

.notification-button i {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: var(--ui-primary);
}

.workspace-credit {
  min-height: 38px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 2px 12px;
  padding: 6px 11px;
  border: 1px solid #cfe7e3;
  border-radius: 8px;
  color: var(--ui-teal);
  background: var(--ui-teal-soft);
}

.workspace-credit span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #5d7875;
  font-size: 9px;
  font-weight: 700;
}

.workspace-credit span .ui-icon {
  width: 11px;
  height: 11px;
}

.workspace-credit strong {
  grid-column: 2;
  grid-row: 1;
  color: #147d74;
  font-size: 13px;
  font-weight: 800;
}

.workspace-profile {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 9px 4px 5px;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  color: var(--ui-ink-soft);
  background: #fff;
}

.workspace-profile > span {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: #fff;
  background: #242a35;
  font-size: 11px;
  font-weight: 800;
}

.workspace-profile strong {
  max-width: 110px;
  overflow: hidden;
  color: #414958;
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sidebar */
body.app-body .sidebar,
body.comic-body .sidebar,
body.agent-body .agent-side {
  z-index: 30;
  padding: 16px 12px 12px;
  color: var(--ui-ink);
  border-right: 1px solid var(--ui-line);
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}

body.app-body .sidebar .brand,
body.comic-body .sidebar .brand,
body.agent-body .agent-side .brand {
  min-height: 46px;
  gap: 10px;
  margin: 0 7px 20px;
  color: var(--ui-ink);
  font-size: 14px;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.brand-copy strong,
.brand-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy strong {
  color: var(--ui-ink);
  font-size: 14px;
  font-weight: 790;
}

.brand-copy small {
  color: #929aa8;
  font-size: 9px;
  font-weight: 650;
}

body.app-body .sidebar .brand-mark,
body.comic-body .sidebar .brand-mark,
body.agent-body .agent-side .brand-mark {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(20, 25, 34, .08);
}

.nav-section-label {
  display: block;
  margin: 2px 10px 7px;
  color: #a0a7b3;
  font-size: 9px;
  font-weight: 750;
}

body.app-body .sidebar .layered-nav > a,
body.app-body .sidebar .layered-nav .nav-group > summary,
body.comic-body .sidebar .layered-nav > a,
body.comic-body .sidebar .layered-nav .nav-group > summary {
  min-height: 42px;
  gap: 8px;
  margin: 2px 0;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #596273;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 690;
}

body.app-body .sidebar .layered-nav > a:hover,
body.app-body .sidebar .layered-nav > a.active,
body.app-body .sidebar .layered-nav .nav-group > summary:hover,
body.app-body .sidebar .layered-nav .nav-group.active-group > summary,
body.comic-body .sidebar .layered-nav > a:hover,
body.comic-body .sidebar .layered-nav > a.active,
body.comic-body .sidebar .layered-nav .nav-group > summary:hover,
body.comic-body .sidebar .layered-nav .nav-group.active-group > summary {
  color: #2459bc;
  border-color: #dbe6fb;
  background: var(--ui-blue-soft);
}

body.app-body .sidebar .nav-parent-icon,
body.comic-body .sidebar .nav-parent-icon {
  width: 28px;
  height: 28px;
  color: #687386;
  border: 0;
  border-radius: 7px;
  background: #f1f3f6;
}

body.app-body .sidebar .layered-nav > a.active .nav-parent-icon,
body.app-body .sidebar .active-group > summary .nav-parent-icon,
body.comic-body .sidebar .layered-nav > a.active .nav-parent-icon,
body.comic-body .sidebar .active-group > summary .nav-parent-icon {
  color: #fff;
  border: 0;
  background: var(--ui-blue);
}

body.app-body .sidebar .nav-submenu,
body.comic-body .sidebar .nav-submenu {
  gap: 1px;
  margin: 2px 0 8px 21px;
  padding-left: 13px;
}

body.app-body .sidebar .nav-submenu::before,
body.comic-body .sidebar .nav-submenu::before {
  left: 1px;
  background: #e5e9ef;
}

body.app-body .sidebar .layered-nav .nav-submenu a,
body.comic-body .sidebar .layered-nav .nav-submenu a {
  min-height: 35px;
  padding: 5px 8px;
  color: #6d7686;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
}

body.app-body .sidebar .layered-nav .nav-submenu a:hover,
body.app-body .sidebar .layered-nav .nav-submenu a.active,
body.comic-body .sidebar .layered-nav .nav-submenu a:hover,
body.comic-body .sidebar .layered-nav .nav-submenu a.active {
  color: #2459bc;
  border-color: #e2e9f8;
  background: #f5f8ff;
  box-shadow: none;
}

body.app-body .sidebar .nav-submenu a.active .nav-item-icon,
body.comic-body .sidebar .nav-submenu a.active .nav-item-icon {
  color: var(--ui-blue);
}

body.app-body .sidebar .nav-admin-link,
body.comic-body .sidebar .nav-admin-link {
  margin-top: 7px !important;
  border-top-color: var(--ui-line) !important;
}

body.app-body .sidebar .sidebar-account,
body.comic-body .sidebar .sidebar-account {
  gap: 8px;
  margin: auto 0 0;
  padding: 10px 8px;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: #f8f9fb;
}

body.app-body .sidebar .account-avatar,
body.comic-body .sidebar .account-avatar {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: #242a35;
}

body.app-body .sidebar .sidebar-account strong,
body.comic-body .sidebar .sidebar-account strong {
  color: var(--ui-ink);
  font-size: 12px;
}

body.app-body .sidebar .sidebar-account small,
body.comic-body .sidebar .sidebar-account small {
  color: var(--ui-muted);
  font-size: 9px;
}

body.app-body .sidebar .sidebar-account button,
body.comic-body .sidebar .sidebar-account button {
  width: 30px;
  min-height: 30px;
  color: #717a89;
  border-color: var(--ui-line);
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}

/* Content hierarchy */
body.app-body:not(.landing-body) .content,
body.comic-body .comic-main {
  width: min(100%, 1460px);
  max-width: none;
  margin: 0 auto;
  padding: 28px 30px 52px;
  color: var(--ui-ink);
}

body.app-body:not(.landing-body) .page-head,
body.comic-body .page-head,
body.agent-body .page-head {
  align-items: flex-start;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ui-line);
}

body.app-body:not(.landing-body) .page-head > div,
body.comic-body .page-head > div,
body.agent-body .page-head > div {
  max-width: 820px;
}

body.app-body:not(.landing-body) .page-title,
body.comic-body .page-title,
body.agent-body .page-title {
  margin: 7px 0 5px;
  color: var(--ui-ink);
  font-size: 28px;
  font-weight: 780;
  line-height: 1.2;
}

body.app-body:not(.landing-body) .page-head p,
body.comic-body .page-head p,
body.agent-body .page-head p {
  max-width: 760px;
  margin: 0;
  color: var(--ui-muted);
  font-size: 13px;
  line-height: 1.65;
}

body.app-body:not(.landing-body) .eyebrow,
body.comic-body .eyebrow,
body.agent-body .eyebrow,
body.app-body:not(.landing-body) .section-kicker,
body.comic-body .section-kicker {
  min-height: 0;
  padding: 0;
  color: var(--ui-primary);
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 10px;
  font-weight: 780;
}

body.app-body:not(.landing-body) .section-head,
body.comic-body .section-head {
  align-items: flex-end;
  margin: 28px 0 15px;
}

body.app-body:not(.landing-body) .section-head h2,
body.comic-body .section-head h2 {
  margin: 5px 0 3px;
  color: var(--ui-ink);
  font-size: 20px;
  font-weight: 760;
}

body.app-body:not(.landing-body) .section-head p,
body.comic-body .section-head p {
  margin: 0;
  color: var(--ui-muted);
  font-size: 12px;
}

/* Controls */
body.app-body:not(.landing-body) button,
body.app-body:not(.landing-body) .btn,
body.comic-body button,
body.comic-body .btn,
body.agent-body button,
body.agent-body .btn {
  min-height: 42px;
  padding: 10px 15px;
  color: #fff;
  border: 1px solid var(--ui-primary);
  border-radius: 8px;
  background: var(--ui-primary);
  box-shadow: 0 7px 16px rgba(242, 85, 61, .15);
  font-size: 13px;
  font-weight: 720;
  transition: color .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

body.app-body:not(.landing-body) button:hover,
body.app-body:not(.landing-body) .btn:hover,
body.comic-body button:hover,
body.comic-body .btn:hover,
body.agent-body button:hover,
body.agent-body .btn:hover {
  color: #fff;
  border-color: var(--ui-primary-dark);
  background: var(--ui-primary-dark);
  box-shadow: 0 10px 22px rgba(242, 85, 61, .2);
  transform: translateY(-1px);
}

body.app-body:not(.landing-body) .btn.secondary,
body.app-body:not(.landing-body) button.secondary,
body.comic-body .btn.secondary,
body.comic-body button.secondary,
body.agent-body .btn.secondary,
body.agent-body button.secondary {
  color: #444d5d;
  border-color: var(--ui-line-strong);
  background: #fff;
  box-shadow: var(--ui-shadow-xs);
}

body.app-body:not(.landing-body) .btn.secondary:hover,
body.app-body:not(.landing-body) button.secondary:hover,
body.comic-body .btn.secondary:hover,
body.comic-body button.secondary:hover,
body.agent-body .btn.secondary:hover,
body.agent-body button.secondary:hover {
  color: #2459bc;
  border-color: #bed0f2;
  background: var(--ui-blue-soft);
  box-shadow: none;
}

body.app-body:not(.landing-body) label,
body.comic-body label,
body.agent-body label {
  margin: 15px 0 7px;
  color: #485162;
  font-size: 12px;
  font-weight: 720;
}

body.app-body:not(.landing-body) input,
body.app-body:not(.landing-body) textarea,
body.app-body:not(.landing-body) select,
body.comic-body input,
body.comic-body textarea,
body.comic-body select,
body.agent-body input,
body.agent-body textarea,
body.agent-body select {
  min-height: 46px;
  color: var(--ui-ink);
  border: 1px solid var(--ui-line-strong);
  border-radius: 8px;
  background: #fbfcfd;
  box-shadow: inset 0 1px 1px rgba(20, 25, 34, .02);
  font-size: 13px;
}

body.app-body:not(.landing-body) input:focus,
body.app-body:not(.landing-body) textarea:focus,
body.app-body:not(.landing-body) select:focus,
body.comic-body input:focus,
body.comic-body textarea:focus,
body.comic-body select:focus,
body.agent-body input:focus,
body.agent-body textarea:focus,
body.agent-body select:focus {
  border-color: #7da3eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(50, 103, 214, .1);
}

body.app-body:not(.landing-body) textarea,
body.comic-body textarea,
body.agent-body textarea {
  line-height: 1.7;
}

/* Surfaces */
body.app-body:not(.landing-body) .card,
body.comic-body .card,
body.app-body:not(.landing-body) .tool-form,
body.app-body:not(.landing-body) .tool-side-panel,
body.app-body:not(.landing-body) .comic-template-summary,
body.app-body:not(.landing-body) .comic-generate-form,
body.app-body:not(.landing-body) .price-card,
body.app-body:not(.landing-body) .video-task-card,
body.app-body:not(.landing-body) .order-card,
body.app-body:not(.landing-body) .tool-record,
body.comic-body .comic-template-summary,
body.comic-body .comic-generate-form,
body.agent-body .card,
body.agent-body .admin-table-card,
body.agent-body .admin-detail-card {
  color: var(--ui-ink);
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--ui-shadow-xs), var(--ui-shadow-sm);
  backdrop-filter: none;
}

body.app-body:not(.landing-body) .card:hover,
body.comic-body .card:hover,
body.agent-body .card:hover {
  border-color: var(--ui-line);
  box-shadow: var(--ui-shadow-xs), var(--ui-shadow-sm);
  transform: none;
}

body.app-body:not(.landing-body) .video-task-card:hover,
body.app-body:not(.landing-body) .price-card:hover,
body.app-body:not(.landing-body) .prompt-template-card:hover,
body.comic-body .comic-project:hover,
body.comic-body .comic-category:hover {
  border-color: #cfd7e3;
  box-shadow: var(--ui-shadow-md);
  transform: translateY(-2px);
}

.alert {
  border-radius: 8px;
  box-shadow: none;
}

.status,
.price-badge {
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 760;
}

.table-wrap,
body.agent-body .admin-table-card {
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--ui-shadow-sm);
}

table th {
  color: #687183;
  background: #f7f9fb;
  font-size: 11px;
  font-weight: 720;
}

table th,
table td {
  padding: 13px 14px;
  border-color: #eaedf2;
}

/* Dashboard */
.dashboard-banner {
  min-height: 226px;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 28px;
  padding: 30px 34px;
  overflow: hidden;
  color: var(--ui-ink);
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--ui-shadow-sm);
}

.dashboard-banner::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  width: 3px;
  background: var(--ui-primary);
}

.dashboard-banner::after {
  width: 34%;
  border-left: 1px solid var(--ui-line);
  background: url("../img/comic/source/project-19.jpg") center 42% / cover no-repeat;
  opacity: .9;
}

.dashboard-banner-copy {
  max-width: 720px;
  padding-right: 16%;
}

.dashboard-banner-copy > span,
.dashboard-credit-panel > span {
  color: var(--ui-primary);
  font-size: 9px;
  font-weight: 800;
}

.dashboard-banner h1 {
  max-width: 630px;
  margin: 10px 0 8px;
  color: var(--ui-ink);
  font-size: 29px;
  font-weight: 790;
  line-height: 1.25;
}

.dashboard-banner-copy > p {
  max-width: 560px;
  color: var(--ui-muted);
  font-size: 13px;
  line-height: 1.65;
}

.dashboard-banner-actions {
  gap: 8px;
  margin-top: 18px;
}

.dashboard-banner-actions .btn {
  min-height: 40px;
  font-size: 12px;
}

.dashboard-banner-actions .btn.secondary {
  color: #424b5a;
  border-color: var(--ui-line-strong);
  background: #fff;
}

.dashboard-credit-panel {
  z-index: 2;
  min-height: 126px;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 30px rgba(15, 22, 32, .14);
  backdrop-filter: blur(10px);
}

.dashboard-credit-panel strong {
  color: var(--ui-ink);
  font-size: 33px;
}

.dashboard-credit-panel small {
  color: var(--ui-muted);
  font-size: 10px;
}

.dashboard-credit-panel a {
  color: var(--ui-blue);
  font-size: 11px;
}

.dashboard-metrics {
  margin: 14px 0 30px;
  border-color: var(--ui-line);
  border-radius: 8px;
  box-shadow: var(--ui-shadow-sm);
}

.dashboard-metrics > div {
  min-height: 92px;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  padding: 17px 20px;
  border-color: var(--ui-line);
}

.dashboard-metric-icon {
  width: 38px;
  height: 38px;
  color: #fff;
  border-radius: 8px;
  background: #2e3642;
}

.dashboard-metric-icon.accent-teal { background: var(--ui-teal); }
.dashboard-metric-icon.accent-coral { background: var(--ui-primary); }
.dashboard-metrics strong { color: var(--ui-ink); font-size: 17px; }
.dashboard-metrics p { color: var(--ui-muted); font-size: 10px; }
.dashboard-metrics small { color: #969eaa; font-size: 9px; }

/* Creation surfaces */
body.comic-body .comic-hero {
  min-height: 262px;
  padding: 32px 36px;
  color: #fff;
  border: 0;
  border-radius: 8px;
  background-image:
    linear-gradient(90deg, rgba(14, 18, 25, .9), rgba(14, 18, 25, .66) 58%, rgba(14, 18, 25, .18)),
    url("../img/comic/source/project-19.jpg");
  box-shadow: 0 16px 34px rgba(20, 25, 34, .15);
}

body.comic-body .comic-hero h1,
body.comic-body .comic-hero p,
body.comic-body .comic-hero span {
  color: #fff;
}

body.comic-body .comic-hero h1 {
  font-size: 35px;
  font-weight: 780;
}

body.comic-body .comic-hero p {
  color: rgba(255, 255, 255, .8);
  font-size: 14px;
}

body.comic-body .comic-hero .btn.secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .1);
  box-shadow: none;
}

body.comic-body .comic-steps {
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--ui-shadow-sm);
}

body.comic-body .comic-steps div {
  min-height: 78px;
}

body.comic-body .comic-steps strong {
  background: var(--ui-primary);
}

body.comic-body .comic-category,
body.comic-body .comic-project {
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--ui-shadow-sm);
}

body.comic-body .comic-category.active {
  border-color: #9bb7ed;
  box-shadow: 0 0 0 2px rgba(50, 103, 214, .1), var(--ui-shadow-sm);
}

.studio-prompt-card,
.studio-settings-card,
.prompt-optimize-card,
.tool-form,
.tool-side-panel,
.upload-drop {
  border-color: var(--ui-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--ui-shadow-sm);
}

.model-cost-card {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: none;
}

.model-cost-card > div {
  min-height: 68px;
  padding: 12px 14px;
  border: 0;
  border-right: 1px solid var(--ui-line);
  border-radius: 0;
  background: transparent;
}

.model-cost-card > div:last-child {
  border-right: 0;
}

.model-cost-card span {
  color: var(--ui-muted);
  font-size: 10px;
}

.model-cost-card strong {
  color: var(--ui-ink);
  font-size: 16px;
}

.model-param-panel {
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: #fbfcfd;
  box-shadow: none;
}

.upload-drop {
  color: #5f6877;
  background: #f8fafc;
}

.upload-drop:hover {
  color: var(--ui-blue);
  border-color: #9bb7ed;
  background: var(--ui-blue-soft);
}

.prompt-filter-panel,
.search-card,
.prompt-template-card,
.order-card,
.price-card,
.video-task-card,
.tool-record {
  border-color: var(--ui-line);
  background: #fff;
  box-shadow: var(--ui-shadow-sm);
}

.prompt-pill-row a,
.prompt-tags a {
  color: #647083;
  border-color: var(--ui-line);
  border-radius: 7px;
  background: #fff;
}

.prompt-pill-row a.active,
.prompt-pill-row a:hover,
.prompt-tags a:hover {
  color: #2459bc;
  border-color: #bfd0ef;
  background: var(--ui-blue-soft);
}

.task-thumb {
  background-color: #eef1f5;
  background-image: none;
}

.price-card::before {
  height: 3px;
  background: var(--ui-primary);
}

/* Agent */
.agent-join-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  border-color: var(--ui-line);
  border-radius: 8px;
  box-shadow: var(--ui-shadow-sm);
}

.agent-offer-panel {
  position: relative;
  padding: clamp(32px, 4vw, 56px);
  overflow: hidden;
  color: var(--ui-ink);
  border-right: 1px solid var(--ui-line);
  background: #fff;
  background-image: none;
}

.agent-offer-panel::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 3px;
  background: var(--ui-primary);
}

.agent-offer-kicker {
  color: var(--ui-teal);
  font-size: 9px;
}

.agent-offer-panel h2 {
  max-width: 520px;
  margin: 12px 0 10px;
  color: var(--ui-ink);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 790;
}

.agent-offer-panel > p {
  max-width: 560px;
  color: var(--ui-muted);
  font-size: 13px;
  line-height: 1.75;
}

.agent-price {
  margin: 27px 0 20px;
}

.agent-price small,
.agent-pending-note {
  color: var(--ui-muted);
}

.agent-price strong {
  color: var(--ui-ink);
  font-size: clamp(44px, 5vw, 62px);
}

.agent-price em {
  color: var(--ui-teal);
}

.agent-benefit-list {
  padding: clamp(24px, 3.5vw, 44px);
  background: #f8fafc;
}

.agent-benefit-list > div {
  grid-template-columns: 38px 1fr;
  gap: 3px 12px;
  padding: 17px 0;
  border-color: var(--ui-line);
}

.agent-benefit-list span {
  color: var(--ui-blue);
}

.agent-benefit-list h3 {
  color: var(--ui-ink);
  font-size: 14px;
}

.agent-benefit-list p {
  color: var(--ui-muted);
  font-size: 12px;
}

body.agent-body .admin-shell {
  grid-template-columns: 238px minmax(0, 1fr);
  background: var(--ui-page);
}

body.agent-body .admin-main {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0 30px 50px;
}

body.agent-body .admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 66px;
  margin: 0 -30px 26px;
  padding: 0 30px;
  border-bottom: 1px solid var(--ui-line);
  background: rgba(255, 255, 255, .91);
  box-shadow: none;
  backdrop-filter: blur(15px);
}

body.agent-body .admin-topbar strong,
body.agent-body .admin-account {
  color: var(--ui-ink);
}

body.agent-body .agent-side .nav a {
  min-height: 41px;
  color: #5e6878;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 680;
}

body.agent-body .agent-side .nav a:hover,
body.agent-body .agent-side .nav a.active {
  color: #2459bc;
  background: var(--ui-blue-soft);
}

body.agent-body .agent-side-note {
  color: var(--ui-ink);
  border-color: var(--ui-line);
  border-radius: 8px;
  background: #f8fafc;
}

body.agent-body .agent-side-note strong,
body.agent-body .agent-income,
body.agent-body .agent-balance-chip strong {
  color: var(--ui-teal);
}

body.agent-body .agent-invite-panel {
  color: var(--ui-ink);
  border: 1px solid var(--ui-line);
  background: #fff;
  box-shadow: var(--ui-shadow-sm);
}

body.agent-body .agent-invite-panel p,
body.agent-body .agent-invite-panel input {
  color: var(--ui-muted);
}

/* Authentication */
.auth-wrap {
  background: #fff;
}

.auth-card h1 {
  color: var(--ui-ink);
  font-size: 32px;
  font-weight: 780;
}

.auth-card input {
  border-color: var(--ui-line-strong);
  background: #f8fafc;
}

/* Mobile */
@media (max-width: 980px) {
  body.app-body:not(.landing-body) .app-shell,
  body.comic-body .comic-shell {
    display: block;
    min-height: 100vh;
  }

  body.app-body .sidebar,
  body.comic-body .sidebar,
  .workspace-topbar {
    display: none;
  }

  body.app-body .mobile-topbar,
  body.comic-body .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    color: var(--ui-ink);
    border-bottom: 1px solid rgba(221, 226, 234, .9);
    background: #fff;
    box-shadow: none;
    backdrop-filter: none;
  }

  .mobile-brand {
    min-width: 0;
    gap: 8px;
  }

  .mobile-brand .brand-mark {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--ui-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--ui-shadow-xs);
  }

  .mobile-brand strong {
    max-width: 190px;
    overflow: hidden;
    color: var(--ui-ink);
    font-size: 13px;
    font-weight: 780;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-balance {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    color: #147d74;
    border: 1px solid #cae6e2;
    border-radius: 8px;
    background: var(--ui-teal-soft);
    font-size: 10px;
    font-weight: 760;
  }

  body.app-body:not(.landing-body) .content,
  body.comic-body .comic-main {
    width: 100%;
    padding: 20px 14px 94px;
  }

  .mobile-nav {
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    height: 68px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 5px max(8px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    border-top: 1px solid rgba(217, 223, 232, .95);
    background: #fff;
    box-shadow: 0 -7px 24px rgba(20, 25, 34, .07);
    backdrop-filter: none;
  }

  .mobile-nav a {
    min-width: 0;
    min-height: 56px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    padding: 2px;
    color: #778091;
    border-radius: 8px;
    background: transparent;
  }

  .mobile-nav a .mobile-nav-icon {
    width: 29px;
    height: 29px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #778091;
    border-radius: 8px;
    background: transparent !important;
  }

  .mobile-nav-icon .ui-icon {
    width: 18px;
    height: 18px;
  }

  .mobile-nav a .mobile-nav-label {
    color: inherit;
    font-size: 9px;
    font-weight: 680;
  }

  .mobile-nav a.active,
  .mobile-nav a.active .mobile-nav-label {
    color: #2459bc;
    background: transparent !important;
  }

  .mobile-nav a.active:not(.mobile-nav-primary) .mobile-nav-icon {
    color: var(--ui-blue);
    background: var(--ui-blue-soft) !important;
  }

  .mobile-nav .mobile-nav-primary {
    position: relative;
    top: -7px;
  }

  .mobile-nav .mobile-nav-primary .mobile-nav-icon {
    width: 42px;
    height: 42px;
    color: #fff;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--ui-primary) !important;
    box-shadow: 0 8px 18px rgba(242, 85, 61, .22);
  }

  .mobile-nav .mobile-nav-primary .mobile-nav-icon .ui-icon {
    width: 19px;
    height: 19px;
  }

  .mobile-nav .mobile-nav-primary .mobile-nav-label {
    margin-top: -3px;
    color: var(--ui-primary);
    font-weight: 760;
  }

  body.agent-body .admin-shell {
    display: block;
  }

  body.agent-body .agent-side {
    display: none;
  }

  body.agent-body .admin-main {
    width: 100%;
    padding: 0 14px 40px;
  }

  body.agent-body .admin-topbar {
    min-height: 58px;
    margin: 0 -14px 16px;
    padding: 0 14px;
  }
}

@media (max-width: 720px) {
  body.app-body:not(.landing-body) .page-head,
  body.comic-body .page-head,
  body.agent-body .page-head {
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 16px;
  }

  body.app-body:not(.landing-body) .section-head,
  body.comic-body .section-head {
    width: 100%;
    align-items: flex-start;
  }

  body.app-body:not(.landing-body) .section-head > div,
  body.comic-body .section-head > div {
    width: 100%;
  }

  body.app-body:not(.landing-body) .section-head > .btn,
  body.comic-body .section-head > .btn {
    align-self: flex-start;
  }

  body.app-body:not(.landing-body) .page-title,
  body.comic-body .page-title,
  body.agent-body .page-title {
    font-size: 24px;
  }

  body.app-body:not(.landing-body) .card,
  body.comic-body .card,
  body.agent-body .card {
    padding: 16px;
  }

  .dashboard-banner {
    min-height: 0;
    display: block;
    padding: 24px 20px;
  }

  .dashboard-banner::after {
    width: 42%;
    opacity: .14;
    border-left: 0;
  }

  .dashboard-banner-copy {
    padding-right: 0;
  }

  .dashboard-banner h1 {
    max-width: 320px;
    font-size: 26px;
  }

  .dashboard-banner-copy > p {
    max-width: 310px;
    font-size: 12px;
  }

  .dashboard-banner-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .dashboard-banner-actions .btn {
    min-width: 0;
    min-height: 40px;
    padding: 8px 7px;
    font-size: 10px;
    text-align: center;
  }

  .dashboard-banner-actions .btn:first-child {
    grid-column: 1 / -1;
    font-size: 12px;
  }

  .dashboard-credit-panel {
    display: none;
  }

  .dashboard-metrics > div {
    min-height: 82px;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 6px;
    padding: 13px 7px;
    text-align: center;
  }

  .dashboard-metric-icon {
    width: 32px;
    height: 32px;
  }

  .dashboard-metric-icon .ui-icon {
    width: 16px;
    height: 16px;
  }

  .dashboard-metrics p {
    justify-items: center;
  }

  .dashboard-metrics strong {
    font-size: 14px;
  }

  body.comic-body .comic-hero {
    min-height: 300px;
    padding: 25px 20px;
    background-position: 61% center;
  }

  body.comic-body .comic-hero h1 {
    max-width: 290px;
    font-size: 30px;
  }

  body.comic-body .comic-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
  }

  body.comic-body .comic-steps div {
    min-height: 86px;
    padding: 12px;
  }

  body.comic-body .comic-steps em {
    display: none;
  }

  .agent-join-grid {
    grid-template-columns: 1fr;
  }

  .agent-offer-panel {
    padding: 28px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--ui-line);
  }

  .agent-offer-panel::before {
    top: auto;
    right: 0;
    left: 0;
    width: auto;
    height: 3px;
  }

  .agent-offer-panel h2 {
    max-width: 330px;
    font-size: 30px;
  }

  .agent-price strong {
    font-size: 48px;
  }

  .agent-benefit-list {
    padding: 14px 20px;
  }
}

@media (max-width: 420px) {
  .mobile-brand strong {
    max-width: 170px;
  }

  body.app-body:not(.landing-body) .content,
  body.comic-body .comic-main {
    padding-right: 12px;
    padding-left: 12px;
  }

  body.app-body:not(.landing-body) .page-head,
  body.comic-body .page-head,
  body.agent-body .page-head {
    display: grid;
  }

  body.app-body:not(.landing-body) .page-head > .btn,
  body.comic-body .page-head > .btn,
  body.agent-body .page-head > .btn {
    width: max-content;
  }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-icon-button,
  .mobile-nav a,
  body.app-body:not(.landing-body) .card,
  body.comic-body .card {
    transition: none;
  }
}
