:root {
  --bg: #f5f7fb;
  --surface: rgba(255, 255, 255, .82);
  --surface-strong: #fff;
  --line: rgba(31, 41, 55, .10);
  --line-strong: rgba(31, 41, 55, .16);
  --text: #151a23;
  --muted: #667085;
  --muted-2: #98a2b3;
  --primary: #ff4d1d;
  --primary-2: #ff7a3d;
  --accent: #2563eb;
  --teal: #0ea5a4;
  --danger: #e11d48;
  --ok: #059669;
  --warn: #d97706;
  --shadow: 0 18px 46px rgba(17, 24, 39, .10);
  --shadow-soft: 0 10px 26px rgba(17, 24, 39, .08);
}

* { box-sizing: border-box; }
html { min-width: 0; }
body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    linear-gradient(130deg, rgba(255, 77, 29, .11), transparent 32%),
    linear-gradient(235deg, rgba(37, 99, 235, .10), transparent 36%),
    repeating-linear-gradient(0deg, rgba(17, 24, 39, .035) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, rgba(17, 24, 39, .032) 0 1px, transparent 1px 44px),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; }
button, input, textarea, select { font: inherit; }

.app-shell,
.admin-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar,
.admin-side {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin: 0 8px 24px;
  color: #111827;
  font-size: 18px;
  font-weight: 850;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #111827, var(--primary) 58%, var(--primary-2));
  box-shadow: 0 12px 24px rgba(255, 77, 29, .22);
}

.nav {
  display: grid;
  gap: 7px;
}

.nav a,
.nav form button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  color: #344054;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.nav a:hover,
.nav form button:hover,
.nav a.active {
  color: var(--primary);
  background: rgba(255, 77, 29, .08);
  transform: translateY(-1px);
}

.content,
.admin-main {
  width: 100%;
  max-width: 1320px;
  min-width: 0;
  margin: 0 auto;
  padding: 30px;
}

.page-head,
.section-head,
.tool-page-head,
.comic-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.page-title {
  margin: 5px 0 4px;
  font-size: 32px;
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: 0;
  color: #111827;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 77, 29, .18);
  border-radius: 8px;
  color: var(--primary);
  background: rgba(255, 255, 255, .66);
  font-size: 12px;
  font-weight: 900;
}

.muted { color: var(--muted); }
.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.grid { display: grid; gap: 18px; min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-grid { margin-bottom: 28px; }

.card,
.tool-form,
.tool-side-panel,
.comic-panel,
.comic-template-summary,
.comic-generate-form,
.price-card,
.video-task-card,
.order-card,
.tool-record {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  min-width: 0;
}

.card {
  padding: 20px;
}

.card:hover,
.video-task-card:hover,
.price-card:hover,
.comic-category:hover,
.comic-project:hover,
.tool-tabs a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card,
.video-task-card,
.price-card,
.comic-category,
.comic-project,
.tool-tabs a {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.stat {
  min-height: 128px;
  display: grid;
  align-content: space-between;
  gap: 10px;
}

.stat strong {
  color: #111827;
  font-size: 34px;
  line-height: 1;
}

.stat small {
  color: var(--muted-2);
}

.btn,
button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 24px rgba(255, 77, 29, .18);
  font-weight: 850;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease, background .18s ease;
}

.btn:hover,
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(255, 77, 29, .24);
}

.btn.secondary,
button.secondary {
  color: #243044;
  background: rgba(255, 255, 255, .80);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.btn.danger { background: linear-gradient(135deg, #e11d48, #f97316); }
button[disabled] { opacity: .62; cursor: wait; transform: none; }

label {
  display: block;
  margin: 14px 0 8px;
  color: #344054;
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  color: var(--text);
  background: rgba(255, 255, 255, .86);
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  padding: 13px 14px;
  outline: 0;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

textarea {
  min-height: 220px;
  line-height: 1.75;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(255, 77, 29, .55);
  box-shadow: 0 0 0 4px rgba(255, 77, 29, .10);
  background: #fff;
}

input::placeholder,
textarea::placeholder {
  color: #98a2b3;
}

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

.alert {
  padding: 13px 14px;
  border-radius: 8px;
  color: #b42318;
  background: rgba(255, 241, 240, .92);
  border: 1px solid #fecdca;
  margin-bottom: 14px;
}

.success {
  color: #067647;
  background: rgba(236, 253, 243, .92);
  border-color: #abefc6;
}

.app-toast-wrap {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 9999;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.app-toast {
  padding: 12px 14px;
  border: 1px solid #fecdca;
  border-radius: 8px;
  color: #b42318;
  background: rgba(255, 241, 240, .96);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease;
  line-height: 1.55;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.app-toast.success {
  color: #067647;
  background: rgba(236, 253, 243, .96);
  border-color: #abefc6;
}

.app-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
  color: #344054;
  text-align: left;
  vertical-align: top;
}

th {
  color: #475467;
  background: rgba(248, 250, 252, .72);
  font-size: 13px;
}

.status,
.price-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 8px;
  color: #175cd3;
  background: #eff8ff;
  font-size: 12px;
  font-weight: 850;
}

.status.succeeded,
.status.paid,
.status.info { color: #067647; background: #ecfdf3; }
.status.failed,
.status.cancelled,
.status.error { color: #b42318; background: #fff1f0; }
.status.running,
.status.pending,
.status.submitted,
.status.unpaid,
.status.warning { color: #b54708; background: #fffaeb; }

.hero {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 32px;
  align-items: center;
}

.hero h1 {
  max-width: 760px;
  margin: 14px 0 18px;
  color: #111827;
  font-size: 54px;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero p {
  max-width: 720px;
  color: #475467;
  font-size: 18px;
  line-height: 1.8;
}

.hero-preview {
  min-height: 430px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .70);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-preview-head {
  display: flex;
  gap: 7px;
  margin-bottom: 14px;
}

.hero-preview-head span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ff4d1d;
}

.hero-preview-head span:nth-child(2) { background: #f59e0b; }
.hero-preview-head span:nth-child(3) { background: #10b981; }

.hero-preview-video {
  aspect-ratio: 9 / 14;
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(17, 24, 39, .80), rgba(255, 77, 29, .58)),
    linear-gradient(45deg, transparent 0 45%, rgba(255,255,255,.24) 45% 55%, transparent 55%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}

.hero-preview-lines {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.hero-preview-lines i {
  height: 12px;
  border-radius: 999px;
  background: #e7edf5;
}

.hero-preview-lines i:nth-child(2) { width: 78%; }
.hero-preview-lines i:nth-child(3) { width: 58%; }

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(480px, 100%);
  padding: 28px;
}

.auth-card h1 {
  margin: 12px 0 6px;
  font-size: 34px;
}

.studio-layout,
.task-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.studio-prompt-card textarea {
  min-height: 360px;
}

.upload-drop {
  position: relative;
  min-height: 138px;
  display: grid;
  place-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 18px;
  border: 1px dashed rgba(255, 77, 29, .38);
  border-radius: 8px;
  background: rgba(255, 246, 240, .70);
  color: #344054;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.upload-drop:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 77, 29, .62);
  background: rgba(255, 246, 240, .94);
  box-shadow: var(--shadow-soft);
}

.upload-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.upload-drop span {
  color: var(--primary);
  font-weight: 900;
}

.upload-drop small {
  max-width: 320px;
  color: #667085;
  line-height: 1.6;
}

.upload-preview {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .76);
}

.upload-preview[hidden] {
  display: none;
}

.upload-preview img {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 8px;
  background: #eef2f7;
}

.upload-preview div {
  min-width: 0;
  display: grid;
  gap: 7px;
  justify-items: start;
}

.upload-preview strong {
  max-width: 100%;
  overflow: hidden;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-preview small {
  color: var(--muted);
}

.upload-preview button {
  min-height: 36px;
  padding: 8px 10px;
}

.studio-settings-card {
  position: sticky;
  top: 22px;
}

.model-cost-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.model-cost-card > div {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(255, 77, 29, .16);
  border-radius: 8px;
  background: rgba(255, 246, 240, .68);
}

.model-cost-card span,
.model-param-empty {
  color: var(--muted);
  font-size: 13px;
}

.model-cost-card strong {
  color: #111827;
  font-size: 18px;
}

.model-param-panel {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 250, 252, .66);
}

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

.model-param-field label {
  margin-top: 0;
}

.switch-field {
  display: flex;
  align-items: flex-end;
}

.param-switch {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  background: rgba(255, 255, 255, .86);
  cursor: pointer;
}

.param-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.param-switch-ui {
  width: 42px;
  height: 24px;
  position: relative;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background .18s ease;
}

.param-switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
  transition: transform .18s ease;
}

.param-switch input:checked + .param-switch-ui {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.param-switch input:checked + .param-switch-ui::after {
  transform: translateX(18px);
}

.model-fixed-details {
  margin-top: 12px;
  color: var(--muted);
}

.model-fixed-details summary {
  cursor: pointer;
  font-weight: 850;
}

.model-fixed-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.model-fixed-list span {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .76);
  color: #475467;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.prompt-optimize-card {
  margin-top: 18px;
}

.compact-head {
  margin-bottom: 8px;
  align-items: flex-start;
}

.prompt-optimize-card h2 {
  margin: 0 0 6px;
  color: #111827;
  font-size: 20px;
}

.prompt-optimize-card textarea[name="prompt"] {
  min-height: 130px;
}

.prompt-optimize-card [data-optimized-result] {
  min-height: 260px;
  background: #fff;
}

.search-card {
  margin-bottom: 18px;
}

.prompt-card {
  display: grid;
  gap: 10px;
  min-height: 220px;
}

.prompt-card strong {
  font-size: 18px;
}

.prompt-card p {
  color: #475467;
  line-height: 1.75;
}

.prompt-search-card {
  margin-bottom: 14px;
}

.prompt-search-actions {
  margin-top: 14px;
}

.loading-state {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #475467;
  background: rgba(248, 250, 252, .88);
  border: 1px solid var(--line);
  font-weight: 850;
}

.loading-state[hidden] {
  display: none !important;
}

.loading-state.compact {
  min-height: 30px;
  font-size: 13px;
}

.prompt-filter-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.prompt-filter-head,
.prompt-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.prompt-filter-head strong,
.prompt-card-top span {
  color: #111827;
  font-weight: 900;
}

.prompt-filter-head span,
.prompt-card-top small {
  color: #98a2b3;
  font-size: 13px;
}

.secondary-head {
  margin-top: 4px;
}

.prompt-pill-row,
.prompt-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.prompt-pill-row a,
.prompt-tags a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  color: #344054;
  background: rgba(255, 255, 255, .82);
  font-size: 13px;
  font-weight: 850;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

.prompt-pill-row.small a,
.prompt-tags a {
  min-height: 30px;
  padding: 5px 9px;
}

.prompt-pill-row a:hover,
.prompt-pill-row a.active,
.prompt-tags a:hover {
  color: var(--primary);
  border-color: rgba(255, 77, 29, .28);
  background: #fff1e9;
  transform: translateY(-1px);
}

.prompt-template-grid {
  align-items: stretch;
}

.prompt-template-card {
  align-content: start;
  min-height: 320px;
}

.prompt-template-card h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  line-height: 1.35;
}

.prompt-summary {
  margin: 0;
  color: #596579;
}

.prompt-summary.large {
  font-size: 16px;
}

.prompt-preview-text {
  min-height: 92px;
  margin: 0;
  overflow-wrap: anywhere;
}

.prompt-card-actions,
.prompt-detail-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: auto;
}

.prompt-card-actions form {
  margin: 0;
}

.prompt-card-actions .btn,
.prompt-card-actions button,
.prompt-detail-actions .btn,
.prompt-detail-actions button {
  min-height: 40px;
  padding: 9px 12px;
}

.prompt-empty-state {
  margin-top: 18px;
}

.prompt-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 18px;
  align-items: start;
}

.prompt-detail-main,
.prompt-variable-panel {
  display: grid;
  gap: 14px;
}

.prompt-variable-panel {
  position: sticky;
  top: 22px;
}

.prompt-variable-panel h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
}

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

.prompt-source-pre {
  max-height: 380px;
  overflow: auto;
}

.prompt-output-box {
  min-height: 260px;
  background: #fff;
}

.detail-tags {
  padding-top: 4px;
}

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

.video-task-card {
  min-width: 0;
  overflow: hidden;
  display: grid;
  color: var(--text);
}

.task-thumb {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, .95), rgba(255, 77, 29, .70)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 1px, transparent 1px 14px);
}

.task-thumb img,
.task-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.task-thumb span {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .26);
  font-size: 22px;
  font-weight: 900;
}

.task-card-body {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 16px;
}

.task-card-body strong {
  color: #111827;
  font-size: 18px;
}

.task-card-body p {
  margin: 0;
  color: #667085;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.task-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.task-card-top small {
  color: #98a2b3;
  text-align: right;
}

.player-card {
  padding: 12px;
  background: rgba(17, 24, 39, .92);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.video-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #d0d5dd;
  background: #020617;
  border-radius: 8px;
}

.video-box-large {
  min-height: 480px;
}

.video-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.empty-player {
  display: grid;
  gap: 8px;
  text-align: center;
}

.empty-player strong {
  font-size: 42px;
  color: #fff;
}

.task-info-panel {
  display: grid;
  gap: 14px;
}

.task-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.task-meta-row span {
  color: #667085;
}

.prompt-text {
  max-height: 340px;
  overflow: auto;
  color: #344054;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

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

.event-list p {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 250, 252, .72);
}

.event-list span {
  display: block;
  color: #111827;
  font-weight: 850;
}

.event-list small {
  color: #667085;
}

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

.price-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 22px;
}

.price-card h2 {
  margin: 4px 0;
  font-size: 20px;
}

.price {
  color: #111827;
  font-size: 40px;
  line-height: 1;
  font-weight: 950;
}

.price-card p {
  margin: 0;
  color: #667085;
  line-height: 1.6;
}

.price-card button {
  width: 100%;
  margin-top: 8px;
}

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

.order-card {
  display: grid;
  grid-template-columns: 1.6fr .7fr .7fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
}

.order-card div {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.order-card strong {
  overflow-wrap: anywhere;
}

.order-card small {
  color: #98a2b3;
}

.result-card {
  width: min(620px, 100%);
  margin: 40px auto;
  text-align: center;
}

.empty-state {
  min-height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #667085;
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: #111827;
  font-size: 22px;
}

.empty-state p {
  margin: 0 0 18px;
}

.mobile-nav { display: none; }

.comic-body {
  color: var(--text);
  background:
    linear-gradient(130deg, rgba(255, 77, 29, .10), transparent 30%),
    linear-gradient(245deg, rgba(14, 165, 164, .09), transparent 34%),
    repeating-linear-gradient(0deg, rgba(17,24,39,.032) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, rgba(17,24,39,.028) 0 1px, transparent 1px 44px),
    #f5f7fb;
}

.comic-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 68px;
  display: grid;
  grid-template-columns: 280px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(18px);
}

.comic-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 900;
}

.comic-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #111827, var(--primary));
  box-shadow: 0 10px 22px rgba(255, 77, 29, .22);
}

.comic-topbar nav {
  display: flex;
  justify-content: center;
  gap: 30px;
  color: #344054;
  font-weight: 800;
}

.comic-topbar nav a:hover,
.comic-topbar nav a.active {
  color: var(--primary);
}

.comic-shell {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}

.comic-side {
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, .74);
  backdrop-filter: blur(18px);
}

.comic-side p {
  margin: 0 12px 8px;
  color: #7b8798;
  font-weight: 850;
}

.comic-side a {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  border-radius: 8px;
  color: #253044;
  font-weight: 850;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.comic-side a:hover {
  color: var(--primary);
  background: rgba(255, 77, 29, .08);
  transform: translateY(-1px);
}

.comic-side a span {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #52627a;
  background: #eef3fb;
}

.comic-side a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 16px 28px rgba(255, 77, 29, .22);
}

.comic-side a.active span {
  color: #fff;
  background: rgba(255, 255, 255, .18);
}

.comic-support {
  margin-top: auto;
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(255, 77, 29, .18);
  border-radius: 8px;
  background: rgba(255, 250, 247, .76);
  color: #596579;
}

.comic-support strong { color: #1d2430; }
.comic-main { min-width: 0; padding: 32px 36px; }

.comic-hero {
  min-height: 248px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 20px;
  padding: 36px 42px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 77, 29, .30);
  border-radius: 8px;
  background: rgba(255, 255, 255, .76);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.comic-hero h1 {
  margin: 0;
  color: #111827;
  font-size: 42px;
  line-height: 1.16;
  letter-spacing: 0;
}

.comic-hero h1 span { color: var(--primary); }
.comic-hero p { color: #596579; font-size: 18px; line-height: 1.7; margin: 14px 0 28px; }
.comic-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.comic-primary,
.comic-secondary {
  min-width: 150px;
  min-height: 50px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.comic-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 13px 26px rgba(255, 77, 29, .22);
}

.comic-secondary {
  color: #253044;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.82);
}

.comic-primary:hover,
.comic-secondary:hover {
  transform: translateY(-1px);
}

.comic-hero-art {
  height: 132px;
  position: relative;
  transform: rotate(-5deg);
  border: 10px solid rgba(255, 224, 207, .88);
  border-radius: 8px;
}

.comic-hero-art div,
.comic-hero-art span,
.comic-hero-art b {
  position: absolute;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff995d, var(--primary));
}

.comic-hero-art div { right: 54px; top: -26px; width: 132px; height: 96px; }
.comic-hero-art div:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-34%, -50%);
  border-left: 30px solid #fff;
  border-top: 20px solid transparent;
  border-bottom: 20px solid transparent;
}
.comic-hero-art span { left: 24px; top: 22px; width: 76px; height: 76px; }
.comic-hero-art b { right: 112px; bottom: -20px; width: 72px; height: 58px; }

.comic-steps {
  margin: 18px 0;
  padding: 22px 26px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.comic-steps div {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 0 14px;
  align-items: center;
}

.comic-steps strong {
  grid-row: 1 / 3;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
  font-size: 21px;
}

.comic-steps span { font-weight: 900; }
.comic-steps small { color: #7b8798; }
.comic-steps em { color: #98a2b3; font-size: 30px; font-style: normal; }

.comic-panel {
  padding: 20px;
  margin-bottom: 18px;
}

.comic-category-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.comic-category,
.comic-project {
  overflow: hidden;
  color: #1f2937;
  background: rgba(255,255,255,.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.comic-category {
  min-height: 272px;
  display: grid;
  grid-template-rows: 180px auto auto;
}

.comic-category.active {
  border-color: rgba(255, 77, 29, .36);
  box-shadow: 0 14px 28px rgba(255, 77, 29, .12);
}

.comic-category img,
.comic-project img,
.comic-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.comic-category strong { padding: 14px 16px 3px; font-size: 18px; }
.comic-category span { padding: 0 16px 16px; color: var(--primary); font-weight: 850; }

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

.comic-project {
  min-height: 146px;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
}

.comic-project div {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
}

.comic-project strong { font-size: 20px; }
.comic-project p { margin: 0; color: #6b7280; line-height: 1.6; }
.comic-project span { color: var(--primary); font-weight: 850; }

.comic-project-create {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.comic-template-summary,
.comic-generate-form {
  padding: 20px;
}

.comic-template-summary {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 92px;
}

.comic-detail-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 8px;
}

.comic-template-summary h1 { margin: 10px 0; font-size: 32px; letter-spacing: 0; }
.comic-template-summary p { color: #596579; line-height: 1.65; }
.comic-generate-form textarea { min-height: 170px; }

.comic-template-textarea {
  min-height: 220px;
  max-height: 320px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.75;
}

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

.comic-form-grid.compact { align-items: end; }
.comic-option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.comic-option {
  position: relative;
  min-height: 94px;
  display: grid;
  align-content: center;
  gap: 7px;
  margin: 0;
  padding: 14px;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  background: rgba(248, 250, 252, .78);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.comic-option input { position: absolute; opacity: 0; pointer-events: none; }
.comic-option strong { color: #1d2430; font-size: 16px; }
.comic-option span { color: #667085; font-size: 13px; line-height: 1.5; }
.comic-option.active { border-color: rgba(255, 77, 29, .42); background: rgba(255, 246, 240, .86); box-shadow: 0 10px 24px rgba(255,77,29,.10); }
.comic-option.active strong { color: var(--primary); }

.comic-generate-footer { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.comic-badge { display: inline-flex; padding: 7px 10px; border-radius: 8px; background: #fff1e9; color: var(--primary); font-weight: 850; }
.comic-pre { white-space: pre-wrap; margin: 0; color: #273244; background: rgba(248,250,252,.82); border: 1px solid var(--line); border-radius: 8px; padding: 16px; line-height: 1.8; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }

.tool-page-head h1 { margin: 12px 0 8px; font-size: 34px; letter-spacing: 0; }
.tool-page-head p { margin: 0; color: #667085; font-size: 17px; }
.tool-tabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.tool-tabs a { min-height: 44px; display: flex; align-items: center; justify-content: center; text-align: center; border: 1px solid #dfe7f2; border-radius: 8px; background: rgba(255,255,255,.82); color: #344054; font-weight: 850; padding: 8px; }
.tool-tabs a.active { border-color: rgba(255,77,29,.42); color: var(--primary); background: rgba(255,246,240,.86); box-shadow: 0 10px 24px rgba(255,77,29,.10); }
.tool-alert { margin-bottom: 14px; border-radius: 8px; padding: 12px 14px; font-weight: 850; }
.tool-alert.error { color: #b42318; background: #fff1f0; border: 1px solid #fecdca; }
.tool-alert.success { color: #067647; background: #ecfdf3; border: 1px solid #abefc6; }
.tool-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; margin-bottom: 18px; }
.tool-form, .tool-side-panel { padding: 20px; }
.tool-form textarea { min-height: 230px; }
.tool-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tool-form-actions, .tool-result-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.tool-form button { min-width: 150px; }
.tool-side-panel { align-self: start; display: grid; gap: 16px; color: #596579; }
.tool-side-panel strong { color: #1d2430; font-size: 18px; }
.tool-side-panel ol { margin: 0; padding-left: 20px; line-height: 1.85; }
.tool-route-actions { display: grid; gap: 10px; }
.tool-route-actions a { min-height: 42px; display: flex; align-items: center; justify-content: center; border: 1px solid #d9e1ec; border-radius: 8px; background: rgba(248,250,252,.86); color: #344054; font-weight: 850; }
.tool-output .comic-pre { max-height: 560px; overflow: auto; }
.tool-record-list { display: grid; gap: 14px; }
.tool-record { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; padding: 18px; }
.tool-record-main span { display: inline-flex; color: var(--primary); background: #fff1e9; border-radius: 8px; padding: 6px 10px; font-weight: 850; font-size: 13px; }
.tool-record-main h2 { margin: 12px 0 8px; font-size: 20px; }
.tool-record-main p { margin: 0 0 10px; color: #667085; line-height: 1.7; }
.tool-file-link { color: var(--primary); font-weight: 850; }
.tool-record-meta { display: grid; align-content: start; gap: 10px; }
.tool-record-meta small { color: #98a2b3; text-align: right; }
.tool-record details { border: 1px solid #e6ebf3; border-radius: 8px; padding: 12px; background: rgba(248,250,252,.82); }
.tool-record summary { cursor: pointer; color: #344054; font-weight: 850; }
.tool-record .comic-pre { margin-top: 12px; max-height: 360px; overflow: auto; background: #fff; }

@media (max-width: 1180px) {
  .video-card-grid,
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero { grid-template-columns: 1fr; }
  .hero-preview { display: none; }
}

@media (max-width: 980px) {
  .app-shell,
  .admin-shell,
  .comic-shell {
    grid-template-columns: 1fr;
  }
  .sidebar,
  .admin-side,
  .comic-side {
    display: none;
  }
  .comic-topbar {
    grid-template-columns: 1fr auto;
  }
  .comic-topbar nav {
    display: none;
  }
  .content,
  .admin-main,
  .comic-main {
    max-width: 100vw;
    padding: 18px 14px 92px;
  }
  .grid-2,
  .grid-3,
  .grid-4,
  .form-row,
  .model-cost-card,
  .model-param-grid,
  .studio-layout,
  .task-detail-layout,
  .comic-project-grid,
  .comic-project-create,
  .comic-form-grid,
  .comic-option-grid,
  .tool-workspace,
  .tool-record,
  .prompt-detail-layout,
  .admin-input-image,
  .admin-prompt-layout {
    grid-template-columns: 1fr;
  }
  .studio-settings-card,
  .comic-template-summary,
  .prompt-variable-panel {
    position: static;
  }
  .comic-hero {
    grid-template-columns: 1fr;
    padding: 26px;
  }
  .comic-hero-art {
    display: none;
  }
  .comic-steps {
    grid-template-columns: 1fr;
  }
  .comic-steps em {
    display: none;
  }
  .comic-category-row {
    grid-auto-columns: minmax(230px, 82vw);
  }
  .tool-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tool-fields {
    grid-template-columns: 1fr;
  }
  .tool-record-meta small {
    text-align: left;
  }
  .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.90);
    backdrop-filter: blur(18px);
    padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
  }
  .mobile-nav a {
    min-width: 0;
    min-height: 48px;
    display: grid;
    place-items: center;
    padding: 8px 3px;
    border-radius: 8px;
    text-align: center;
    color: #475467;
    font-size: 12px;
    font-weight: 800;
  }
  .mobile-nav a.active {
    color: var(--primary);
    background: #fff1e9;
  }
}

@media (max-width: 720px) {
  .page-head,
  .section-head,
  .tool-page-head,
  .comic-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-title {
    font-size: 28px;
  }
  .hero h1 {
    font-size: 36px;
  }
  .comic-hero h1 {
    font-size: 32px;
  }
  .comic-topbar {
    height: 60px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0 14px;
  }
  .comic-brand {
    min-width: 0;
  }
  .comic-brand strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
  }
  .comic-topbar > div {
    display: none;
  }
  .video-card-grid,
  .pricing-grid,
  .order-card {
    grid-template-columns: 1fr;
  }
  .order-card {
    align-items: start;
  }
  .comic-project {
    grid-template-columns: 1fr;
  }
  .comic-project img {
    aspect-ratio: 16 / 9;
  }
  .video-box-large {
    min-height: 280px;
  }
  .tool-tabs {
    grid-template-columns: 1fr;
  }
  .prompt-variable-grid {
    grid-template-columns: 1fr;
  }
  .prompt-card-actions,
  .prompt-card-actions form,
  .prompt-card-actions button,
  .prompt-card-actions .btn,
  .prompt-detail-actions,
  .prompt-detail-actions button,
  .prompt-detail-actions .btn {
    width: 100%;
  }
  .mobile-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  input,
  textarea,
  select,
  button,
  .btn {
    min-height: 52px;
  }

  textarea {
    min-height: 240px;
  }

  .studio-prompt-card textarea {
    min-height: 300px;
  }

  .upload-drop {
    min-height: 154px;
    padding: 20px 14px;
  }

  .player-card {
    padding: 8px;
  }

  .video-box-large {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .task-thumb {
    aspect-ratio: 16 / 9;
  }

  .admin-table-card table {
    min-width: 860px;
  }
}

.admin-shell {
  display: block;
  min-height: 100vh;
}

.admin-side {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 26;
  width: 260px;
  height: auto;
  overflow-y: auto;
}

.admin-main {
  max-width: none;
  margin-left: 260px;
  padding: 22px 28px 40px;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 18;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -22px -28px 26px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(18px);
}

.admin-topbar > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-topbar strong {
  overflow: hidden;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-account {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #344054;
  font-weight: 850;
}

.admin-account form {
  margin: 0;
}

.admin-account .btn {
  min-height: 38px;
  padding: 8px 12px;
}

.admin-mobile-nav {
  display: none;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.admin-kpi-card {
  min-height: 154px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 77, 29, .08), transparent 52%),
    rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.admin-kpi-card span {
  color: #667085;
  font-weight: 850;
}

.admin-kpi-card strong {
  color: #111827;
  font-size: 36px;
  line-height: 1;
}

.admin-kpi-card small {
  color: #98a2b3;
}

.admin-sub-kpis {
  margin-top: 18px;
}

.admin-form-card {
  margin-bottom: 18px;
}

.admin-prompt-layout {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
}

.admin-inline-form {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 250, 252, .80);
}

.admin-inline-form textarea {
  min-height: 180px;
}

.admin-inline-form label {
  margin: 6px 0 2px;
}

.admin-inline-form + form {
  margin-top: 10px;
}

.admin-form-card h2,
.admin-setting-group h2,
.admin-help-card h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 20px;
}

.admin-table-card {
  overflow: hidden;
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.admin-table-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px auto;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.admin-table-toolbar input,
.admin-table-toolbar select {
  min-height: 44px;
}

.admin-table-card .table-wrap {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.admin-table-card table {
  min-width: 980px;
}

.admin-table-footer {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: #667085;
}

.server-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.server-pagination a,
.server-pagination .disabled {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 8px;
  font-weight: 850;
}

.server-pagination a {
  color: #344054;
  background: #fff;
  border: 1px solid var(--line-strong);
}

.server-pagination .disabled {
  color: #98a2b3;
  background: #f2f4f7;
  border: 1px solid #edf1f6;
}

.admin-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-pagination button {
  min-height: 34px;
  padding: 7px 10px;
  color: #344054;
  background: #fff;
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.admin-pagination button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.admin-pagination span {
  min-width: 54px;
  text-align: center;
  color: #667085;
  font-weight: 850;
}

.admin-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 8px;
  color: #344054;
  background: #f2f4f7;
  font-size: 12px;
  font-weight: 850;
}

.status.enabled,
.status.normal {
  color: #067647;
  background: #ecfdf3;
}

.status.disabled,
.status.banned {
  color: #b42318;
  background: #fff1f0;
}

.admin-action-group {
  display: grid;
  grid-template-columns: 120px auto;
  gap: 8px;
  align-items: center;
}

.admin-action-group input {
  min-height: 38px;
  padding: 8px 10px;
}

.admin-action-group button,
.admin-action-stack button {
  min-height: 38px;
  padding: 8px 12px;
}

.admin-action-stack {
  display: grid;
  gap: 8px;
  align-items: start;
}

.admin-text-clip {
  display: block;
  max-width: 320px;
  color: #475467;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.admin-collapse {
  max-width: 520px;
}

.admin-collapse summary {
  width: fit-content;
  cursor: pointer;
  color: var(--primary);
  font-weight: 850;
}

.admin-collapse pre {
  max-width: min(520px, 72vw);
  max-height: 280px;
  margin: 10px 0 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 12px;
  color: #344054;
  background: #f8fafc;
  border: 1px solid #e6ebf3;
  border-radius: 8px;
}

.admin-settings-form {
  display: grid;
  gap: 18px;
}

.admin-setting-group {
  display: grid;
  gap: 16px;
}

.admin-setting-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.admin-setting-group-head p {
  margin: 6px 0 0;
  color: #667085;
  line-height: 1.7;
}

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

.admin-setting-field {
  min-width: 0;
  display: grid;
  align-content: start;
}

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

.admin-setting-field label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-setting-field textarea {
  min-height: 118px;
}

.admin-setting-field small {
  margin-top: 7px;
  color: #667085;
  line-height: 1.65;
}

.admin-settings-actions {
  position: sticky;
  bottom: 16px;
  justify-content: flex-end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.admin-log-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.admin-log-tabs a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #344054;
  background: rgba(255, 255, 255, .78);
  font-weight: 850;
}

.admin-log-tabs a.active,
.admin-log-tabs a:hover {
  color: var(--primary);
  border-color: rgba(255, 77, 29, .24);
  background: rgba(255, 77, 29, .08);
}

.admin-import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

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

.admin-help-card p {
  margin: 0;
  color: #667085;
  line-height: 1.75;
}

.admin-input-image {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.admin-input-image img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2f7;
}

.admin-input-image p {
  overflow-wrap: anywhere;
}

.admin-check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-check input {
  width: auto;
  min-height: auto;
}

.admin-upload-drop {
  margin-top: 0;
}

.admin-empty-row td {
  padding: 0;
}

.admin-empty-row .empty-state {
  min-height: 180px;
}

@media (max-width: 980px) {
  .admin-side {
    display: none;
  }

  .admin-main {
    margin-left: 0;
    padding: 16px 14px 80px;
  }

  .admin-topbar {
    margin: -16px -14px 12px;
    padding: 10px 14px;
  }

  .admin-topbar > div:first-child strong {
    display: none;
  }

  .admin-mobile-nav {
    display: flex;
    gap: 8px;
    margin: 0 0 16px;
    padding-bottom: 8px;
    overflow-x: auto;
  }

  .admin-mobile-nav a {
    flex: 0 0 auto;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,.82);
    color: #344054;
    font-weight: 850;
  }

  .admin-mobile-nav a.active {
    color: var(--primary);
    background: #fff1e9;
    border-color: rgba(255,77,29,.26);
  }

  .admin-kpi-grid,
  .admin-import-layout,
  .admin-setting-fields {
    grid-template-columns: 1fr;
  }

  .admin-setting-field.wide {
    grid-column: auto;
  }

  .admin-table-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-table-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .admin-account span {
    display: none;
  }

  .admin-kpi-card strong {
    font-size: 30px;
  }
}

/* User-facing SaaS visual refresh */
body.app-body,
body.comic-body {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --line: #e2e6eb;
  --line-strong: #cfd6df;
  --text: #18202d;
  --muted: #667085;
  --muted-2: #98a2b3;
  --primary: #ee4d2d;
  --primary-2: #ff7043;
  --accent: #2764d7;
  --teal: #0f8f83;
  --shadow: 0 14px 34px rgba(22, 32, 47, .11);
  --shadow-soft: 0 7px 22px rgba(22, 32, 47, .07);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(24, 32, 45, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 32, 45, .028) 1px, transparent 1px);
  background-size: 48px 48px;
}

.app-body .app-shell {
  grid-template-columns: 244px minmax(0, 1fr);
}

.app-body .sidebar {
  z-index: 30;
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  border-color: #e5e7eb;
  background: #fff;
  box-shadow: 8px 0 28px rgba(28, 38, 53, .04);
  backdrop-filter: none;
}

.app-body .brand {
  gap: 10px;
  min-height: 40px;
  margin: 0 6px 18px;
  font-size: 16px;
}

.app-body .brand-mark,
.auth-brand .brand-mark,
.mobile-brand .brand-mark {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
  background: #1d2738;
  box-shadow: 0 8px 18px rgba(29, 39, 56, .18);
  font-size: 11px;
  font-weight: 950;
}

.app-body .nav {
  gap: 3px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.nav-label {
  display: block;
  margin: 13px 10px 5px;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 850;
}

.app-body .nav a {
  position: relative;
  min-height: 42px;
  gap: 10px;
  padding: 7px 10px;
  color: #475467;
  font-size: 14px;
  font-weight: 750;
}

.app-body .nav a:hover,
.app-body .nav a.active {
  color: #c93c20;
  background: #fff1ec;
  box-shadow: inset 3px 0 #ee4d2d;
  transform: none;
}

.nav-glyph {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dde3ea;
  border-radius: 7px;
  color: #667085;
  background: #f8fafb;
  font-size: 11px;
  font-weight: 950;
}

.app-body .nav a.active .nav-glyph,
.app-body .nav a:hover .nav-glyph {
  color: #fff;
  border-color: #ee4d2d;
  background: #ee4d2d;
}

.sidebar-account {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 12px 8px 2px;
  border-top: 1px solid #e8ebef;
}

.account-avatar {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: #0f8f83;
  font-size: 13px;
  font-weight: 900;
}

.sidebar-account > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

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

.sidebar-account strong { font-size: 13px; }
.sidebar-account small { color: #667085; font-size: 11px; }
.sidebar-account form { margin: 0; }
.sidebar-account button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  color: #667085;
  border: 1px solid #dfe4ea;
  background: #fff;
  box-shadow: none;
}

.sidebar-account button:hover {
  color: #c93c20;
  border-color: #f3b8aa;
  background: #fff4f1;
  box-shadow: none;
}

.mobile-topbar { display: none; }

.app-body .content {
  max-width: 1320px;
  padding: 28px 32px 48px;
}

.app-body .page-head,
.app-body .section-head {
  align-items: center;
  margin-bottom: 18px;
}

.app-body .page-head p,
.app-body .section-head p {
  margin: 4px 0 0;
}

.app-body .page-title {
  margin-top: 7px;
  color: #18202d;
  font-size: 30px;
}

.app-body .eyebrow {
  min-height: 24px;
  color: #c93c20;
  border-color: #ffd1c5;
  background: #fff4f1;
  font-size: 11px;
}

.app-body .card,
.app-body .tool-form,
.app-body .tool-side-panel,
.app-body .comic-template-summary,
.app-body .comic-generate-form,
.app-body .price-card,
.app-body .video-task-card,
.app-body .order-card,
.app-body .tool-record {
  border-color: #e2e6eb;
  background: #fff;
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
}

.app-body .card:hover,
.app-body .video-task-card:hover,
.app-body .price-card:hover {
  border-color: #cfd6df;
  box-shadow: var(--shadow);
}

.app-body .btn,
.app-body button,
.comic-body .btn,
.comic-body button {
  background: #ee4d2d;
  box-shadow: 0 8px 18px rgba(238, 77, 45, .18);
}

.app-body .btn:hover,
.app-body button:hover,
.comic-body .btn:hover,
.comic-body button:hover {
  background: #d94124;
  box-shadow: 0 11px 22px rgba(238, 77, 45, .24);
}

.app-body .btn.secondary,
.comic-body .btn.secondary {
  color: #344054;
  border-color: #d9dfe7;
  background: #fff;
  box-shadow: none;
}

.app-body .btn.secondary:hover,
.comic-body .btn.secondary:hover {
  color: #c93c20;
  border-color: #f0b4a5;
  background: #fff6f3;
}

.app-body input,
.app-body textarea,
.app-body select,
.comic-body input,
.comic-body textarea,
.comic-body select {
  border-color: #d9dfe7;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(18, 27, 41, .025);
}

.app-body input:focus,
.app-body textarea:focus,
.app-body select:focus,
.comic-body input:focus,
.comic-body textarea:focus,
.comic-body select:focus {
  border-color: #ee4d2d;
  box-shadow: 0 0 0 3px rgba(238, 77, 45, .11);
}

.workspace-head {
  padding-bottom: 20px;
  border-bottom: 1px solid #dde3e9;
}

.app-body .metric-grid { gap: 14px; margin-bottom: 26px; }
.app-body .stat {
  position: relative;
  min-height: 116px;
  overflow: hidden;
}

.app-body .stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  width: 42px;
  height: 3px;
  background: #ee4d2d;
}

.app-body .stat-task::before { background: #2764d7; }
.app-body .stat-role::before { background: #0f8f83; }
.app-body .stat strong { color: #17202f; font-size: 30px; }

.video-card-grid {
  gap: 16px;
}

.app-body .video-task-card {
  overflow: hidden;
}

.app-body .task-thumb {
  min-height: 166px;
  background-color: #17202f;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 24px 24px;
}

.app-body .task-thumb span {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  font-size: 17px;
}

.app-body .task-card-body { gap: 10px; padding: 16px; }
.app-body .task-card-body strong { font-size: 16px; }
.app-body .task-card-body p {
  min-height: 40px;
  margin: 0;
  color: #667085;
  line-height: 1.55;
}

.task-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-progress-row b {
  flex: 0 0 36px;
  color: #475467;
  font-size: 12px;
  text-align: right;
}

.task-progress-track,
.player-progress {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 6px;
  background: #edf0f3;
}

.task-progress-track i,
.player-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0f8f83;
  transition: width .28s ease;
}

.status {
  gap: 6px;
  font-size: 12px;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: currentColor;
}

.task-detail-layout {
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, .75fr);
  gap: 18px;
  align-items: start;
}

.player-card {
  overflow: hidden;
  border: 1px solid #253247;
  border-radius: 8px;
  background: #101827;
  box-shadow: 0 14px 34px rgba(16, 24, 39, .14);
}

.app-body .video-box-large {
  height: 470px;
  min-height: 0;
  aspect-ratio: auto;
}

.app-body .video-box-large video {
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.app-body .empty-player {
  gap: 12px;
  color: #fff;
  background-color: #111a2a;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

.app-body .empty-player small {
  color: #99a7ba;
  font-size: 11px;
  font-weight: 850;
}

.app-body .empty-player strong { font-size: 52px; }
.app-body .empty-player span { color: #c7cfda; }
.app-body .player-progress { max-width: 360px; background: rgba(255,255,255,.13); }
.app-body .player-progress i { background: #ee6b4f; }
.app-body .task-info-panel { position: sticky; top: 28px; }
.app-body .prompt-text { max-height: 300px; overflow: auto; }

.app-body .pricing-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.app-body .price-card {
  position: relative;
  padding: 22px;
  overflow: hidden;
}

.app-body .price-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #0f8f83;
}

.app-body .price-badge {
  color: #08766d;
  background: #e9f8f5;
}

.app-body .price { color: #18202d; font-size: 34px; }
.app-body .price-card button { width: 100%; }

.prompt-search-card,
.prompt-filter-panel { box-shadow: none !important; }

.prompt-filter-panel {
  border-style: dashed !important;
}

.prompt-template-grid { gap: 14px; }
.prompt-template-card { min-height: 300px; }
.prompt-template-card h2 { font-size: 18px; }
.prompt-template-card:hover { border-color: #f0b4a5 !important; }
.prompt-pill-row a.active { color: #fff; background: #0f8f83; border-color: #0f8f83; }

.app-body .studio-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.app-body .studio-prompt-card textarea { min-height: 310px; }
.app-body .studio-settings-card { position: sticky; top: 28px; }

.guest-body .app-shell { display: block; }
.guest-body .sidebar { display: none; }
.guest-body .content {
  max-width: none;
  padding: 0;
}

.commerce-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 72px 7%;
  overflow: hidden;
  color: #fff;
  background-image:
    linear-gradient(90deg, rgba(12, 19, 30, .94) 0%, rgba(12, 19, 30, .78) 46%, rgba(12, 19, 30, .20) 78%),
    url("../img/comic/source/project-19.jpg");
  background-position: center;
  background-size: cover;
}

.commerce-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 52px 52px;
}

.commerce-hero .hero-copy {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.hero-kicker,
.auth-visual > div > span,
.comic-kicker {
  display: inline-flex;
  color: #ff8b6d;
  font-size: 12px;
  font-weight: 900;
}

.commerce-hero h1 {
  max-width: 650px;
  margin: 16px 0;
  color: #fff;
  font-size: 54px;
  line-height: 1.12;
}

.commerce-hero p {
  max-width: 590px;
  color: #d5dbe4;
  font-size: 19px;
  line-height: 1.75;
}

.commerce-hero .btn.secondary {
  color: #fff;
  border-color: rgba(255,255,255,.34);
  background: rgba(255,255,255,.10);
}

.hero-feature-line {
  display: flex;
  gap: 22px;
  margin-top: 36px;
  color: #dbe1e8;
  font-size: 13px;
  font-weight: 750;
}

.hero-feature-line span {
  position: relative;
  padding-left: 13px;
}

.hero-feature-line span::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2cc5b6;
}

.auth-wrap {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1.1fr) minmax(420px, .9fr);
  align-items: stretch;
  padding: 0;
  background: #f3f5f7;
}

.auth-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
  background-image:
    linear-gradient(0deg, rgba(12, 19, 30, .92) 0%, rgba(12, 19, 30, .12) 72%),
    url("../img/comic/source/project-19.jpg");
  background-position: center;
  background-size: cover;
}

.auth-visual > div {
  position: absolute;
  right: 9%;
  bottom: 9%;
  left: 9%;
  max-width: 560px;
}

.auth-visual h2 {
  margin: 14px 0 12px;
  color: #fff;
  font-size: 44px;
  line-height: 1.17;
}

.auth-visual p {
  max-width: 470px;
  color: #d6dde6;
  font-size: 16px;
  line-height: 1.7;
}

.auth-card {
  width: min(480px, calc(100% - 56px));
  margin: auto;
  padding: 32px;
  border-color: #dfe4ea !important;
  background: #fff !important;
  box-shadow: 0 18px 44px rgba(21, 31, 46, .11) !important;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  color: #18202d;
}

.auth-card h1 { margin-bottom: 6px; font-size: 28px; }
.auth-card form { margin-top: 24px; }
.auth-card label { margin-top: 14px; }
.auth-card input { min-height: 48px; }
.auth-card .actions { margin-top: 20px; }

/* Short-drama workspace */
.comic-body .comic-topbar {
  grid-template-columns: 252px minmax(0, 1fr) auto;
  height: 64px;
  padding: 0 22px;
  border-color: #e4e7ec;
  background: rgba(255,255,255,.97);
  box-shadow: 0 4px 18px rgba(22, 32, 47, .05);
  backdrop-filter: blur(12px);
}

.comic-body .comic-brand { gap: 10px; font-size: 17px; }
.comic-body .comic-logo {
  width: 34px;
  height: 34px;
  color: #fff;
  background: #1d2738;
  box-shadow: 0 8px 18px rgba(29, 39, 56, .18);
  font-size: 11px;
}

.comic-body .comic-topbar nav { justify-content: center; gap: 28px; }
.comic-body .comic-topbar nav a {
  position: relative;
  min-height: 64px;
  display: inline-flex;
  align-items: center;
  color: #475467;
  font-size: 14px;
  font-weight: 750;
}

.comic-body .comic-topbar nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: transparent;
}

.comic-body .comic-topbar nav a:hover,
.comic-body .comic-topbar nav a.active { color: #d94124; }
.comic-body .comic-topbar nav a.active::after { background: #ee4d2d; }

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

.comic-credit,
.comic-user {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid #e0e5eb;
  border-radius: 8px;
  color: #475467;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.comic-credit { color: #08766d; border-color: #ccebe6; background: #f0fbf8; }
.comic-user span {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: #1d2738;
  font-size: 10px;
}

.comic-body .comic-shell { grid-template-columns: 252px minmax(0, 1fr); }
.comic-body .comic-side {
  top: 64px;
  height: calc(100vh - 64px);
  padding: 18px 14px;
  border-color: #e4e7ec;
  background: rgba(255,255,255,.96);
}

.comic-body .comic-side p {
  margin: 10px 10px 6px;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 850;
}

.comic-body .comic-side a {
  min-height: 46px;
  margin: 2px 0;
  padding: 8px 10px;
  color: #475467;
  font-size: 14px;
}

.comic-body .comic-side a:hover,
.comic-body .comic-side a.active {
  color: #c93c20;
  background: #fff1ec;
  box-shadow: inset 3px 0 #ee4d2d;
  transform: none;
}

.comic-body .comic-side a span {
  width: 28px;
  height: 28px;
  border-color: #dde3ea;
  color: #667085;
  background: #f8fafb;
}

.comic-body .comic-side a.active span {
  color: #fff;
  border-color: #ee4d2d;
  background: #ee4d2d;
}

.comic-body .comic-support {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #dfe4ea;
  background: #f8fafb;
  box-shadow: none;
}

.comic-body .comic-main {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px 28px 48px;
}

.comic-body .comic-hero {
  position: relative;
  min-height: 272px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 34px 40px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background-image:
    linear-gradient(90deg, rgba(13, 20, 31, .94) 0%, rgba(13, 20, 31, .73) 48%, rgba(13, 20, 31, .12) 82%),
    url("../img/comic/source/project-19.jpg");
  background-position: center 46%;
  background-size: cover;
  box-shadow: 0 14px 32px rgba(20, 29, 43, .16);
}

.comic-hero-content {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.comic-body .comic-hero h1 {
  margin: 12px 0 8px;
  color: #fff;
  font-size: 38px;
  line-height: 1.18;
}

.comic-body .comic-hero p {
  max-width: 560px;
  margin: 0 0 22px;
  color: #d9dfe7;
  font-size: 16px;
  line-height: 1.7;
}

.comic-body .comic-primary,
.comic-body .comic-secondary {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
}

.comic-body .comic-primary {
  color: #fff;
  border-color: #ee4d2d;
  background: #ee4d2d;
  box-shadow: 0 8px 18px rgba(238, 77, 45, .24);
}

.comic-body .comic-secondary {
  color: #fff;
  border-color: rgba(255,255,255,.36);
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
}

.comic-hero-meta {
  display: flex;
  gap: 18px;
  margin-top: 24px;
  color: #cdd5df;
  font-size: 12px;
  font-weight: 750;
}

.comic-hero-meta span {
  position: relative;
  padding-left: 12px;
}

.comic-hero-meta span::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #33c6b8;
}

.comic-body .comic-steps {
  gap: 12px;
  margin: 16px 0 26px;
  padding: 14px 18px;
  border-color: #e1e6eb;
  background: #fff;
  box-shadow: 0 5px 16px rgba(22,32,47,.045);
}

.comic-body .comic-steps div {
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 0 10px;
}

.comic-body .comic-steps strong {
  width: 38px;
  height: 38px;
  grid-row: 1 / span 2;
  border-radius: 8px;
  color: #fff;
  background: #ee4d2d;
  font-size: 16px;
}

.comic-body .comic-steps span { font-size: 14px; }
.comic-body .comic-steps small { font-size: 12px; }
.comic-body .comic-steps em { font-size: 20px; }

.comic-body .comic-panel {
  margin-top: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.comic-body .comic-section-head { margin-bottom: 14px; }
.comic-body .comic-section-head h2 { margin: 0; color: #18202d; font-size: 21px; }
.comic-body .comic-section-head p { margin: 5px 0 0; color: #667085; }
.comic-body .comic-section-head > span { color: #667085; font-size: 13px; }

.comic-body .comic-category-row {
  grid-auto-columns: 228px;
  gap: 12px;
  padding: 2px 2px 10px;
}

.comic-body .comic-category,
.comic-body .comic-project {
  border-color: #e0e5eb;
  background: #fff;
  box-shadow: 0 5px 18px rgba(22, 32, 47, .06);
}

.comic-body .comic-category:hover,
.comic-body .comic-project:hover {
  border-color: #efb19f;
  box-shadow: 0 12px 28px rgba(22, 32, 47, .11);
}

.comic-body .comic-category { grid-template-rows: 132px auto auto; }
.comic-body .comic-category.active { border-color: #ee4d2d; box-shadow: 0 0 0 2px rgba(238,77,45,.1); }
.comic-body .comic-category strong { padding: 12px 13px 2px; font-size: 15px; }
.comic-body .comic-category span { padding: 0 13px 13px; font-size: 12px; }

.comic-body .comic-project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.comic-body .comic-project { grid-template-rows: 154px minmax(0, 1fr); }
.comic-body .comic-project div { padding: 15px; }
.comic-body .comic-project strong { font-size: 17px; }
.comic-body .comic-project p { font-size: 13px; }
.comic-body .comic-project span { margin-top: auto; font-size: 13px; }

.comic-body .comic-project-create {
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
}

.comic-body .comic-template-summary,
.comic-body .comic-generate-form {
  border-color: #e0e5eb;
  background: #fff;
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
}

.comic-body .comic-option {
  border-color: #dfe4ea;
  background: #fff;
}

.comic-body .comic-option.active {
  border-color: #ee4d2d;
  background: #fff3ef;
  box-shadow: 0 6px 16px rgba(238,77,45,.09);
}

.comic-body .comic-badge { color: #08766d; background: #e9f8f5; }

@media (max-width: 1180px) {
  .comic-body .comic-topbar nav { gap: 16px; }
  .comic-body .comic-user { width: 38px; padding: 7px; overflow: hidden; }
  .comic-body .comic-user span { flex: 0 0 22px; }
  .comic-body .comic-project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-body .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .app-body .app-shell { display: block; min-height: 100vh; }
  .app-body .sidebar { display: none; }
  .app-body .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid #e3e7ec;
    background: rgba(255,255,255,.96);
    box-shadow: 0 5px 18px rgba(22,32,47,.06);
    backdrop-filter: blur(12px);
  }

  .mobile-brand { min-width: 0; display: flex; align-items: center; gap: 8px; }
  .mobile-brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
  .mobile-balance {
    flex: 0 0 auto;
    padding: 7px 9px;
    border: 1px solid #ccebe6;
    border-radius: 8px;
    color: #08766d;
    background: #f0fbf8;
    font-size: 12px;
    font-weight: 850;
  }

  .app-body .content { max-width: none; padding: 20px 14px 92px; }
  .app-body .grid-3,
  .app-body .prompt-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-body .studio-layout,
  .app-body .task-detail-layout { grid-template-columns: 1fr; }
  .app-body .studio-settings-card,
  .app-body .task-info-panel { position: static; }
  .app-body .video-box-large { height: 430px; }

  .comic-body .comic-topbar {
    position: sticky;
    top: 0;
    z-index: 90;
    height: 58px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0 14px;
  }

  .comic-body .comic-brand { min-width: 0; }
  .comic-body .comic-brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .comic-body .comic-topbar nav,
  .comic-body .comic-side,
  .comic-body .comic-user { display: none; }
  .comic-body .comic-shell { display: block; }
  .comic-body .comic-main { max-width: none; padding: 16px 14px 92px; }
  .comic-body .comic-project-create { grid-template-columns: 1fr; }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    height: 66px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    padding: 5px max(8px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    border-top: 1px solid #e1e6eb;
    background: rgba(255,255,255,.97);
    box-shadow: 0 -8px 24px rgba(22,32,47,.08);
    backdrop-filter: blur(14px);
  }

  .mobile-nav a {
    min-width: 0;
    display: grid;
    grid-template-rows: 26px auto;
    align-content: center;
    justify-items: center;
    gap: 2px;
    padding: 2px;
    color: #667085;
    font-size: 10px;
    font-weight: 800;
  }

  .mobile-nav a span {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    color: #667085;
    background: #f1f3f6;
    font-size: 11px;
    font-weight: 950;
  }

  .mobile-nav a.active { color: #d94124; }
  .mobile-nav a.active span { color: #fff; background: #ee4d2d; }
}

@media (max-width: 720px) {
  .comic-body .comic-topbar > .comic-account { display: flex; }
  .app-body .page-head,
  .app-body .section-head { align-items: flex-start; }
  .app-body .page-title { font-size: 26px; }
  .app-body .grid-2,
  .app-body .grid-3,
  .app-body .grid-4,
  .app-body .prompt-template-grid,
  .app-body .pricing-grid { grid-template-columns: 1fr; }
  .app-body .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-body .metric-grid .stat:last-child { grid-column: 1 / -1; }
  .app-body .video-card-grid { grid-template-columns: 1fr; }
  .app-body .video-box-large { height: 320px; min-height: 0; aspect-ratio: auto; }
  .app-body .empty-player strong { font-size: 42px; }

  .commerce-hero {
    min-height: 100vh;
    align-items: flex-end;
    padding: 88px 20px 64px;
    background-image:
      linear-gradient(0deg, rgba(12,19,30,.96) 0%, rgba(12,19,30,.66) 62%, rgba(12,19,30,.26) 100%),
      url("../img/comic/source/project-19.jpg");
    background-position: 62% center;
  }

  .commerce-hero h1 { font-size: 38px; }
  .commerce-hero p { font-size: 16px; }
  .hero-feature-line { flex-wrap: wrap; gap: 10px 18px; margin-top: 26px; }

  .auth-wrap { display: block; min-height: 100vh; padding: 22px 0; }
  .auth-visual { display: none; }
  .auth-card { width: calc(100% - 28px); margin: 0 auto; padding: 24px 20px; }
  .auth-card .actions { align-items: stretch; }
  .auth-card .actions > * { flex: 1 1 140px; }

  .comic-body .comic-main { padding-top: 12px; }
  .comic-body .comic-hero {
    min-height: 276px;
    align-items: flex-end;
    padding: 24px 20px;
    background-image:
      linear-gradient(0deg, rgba(13,20,31,.96) 0%, rgba(13,20,31,.64) 66%, rgba(13,20,31,.28) 100%),
      url("../img/comic/source/project-19.jpg");
    background-position: 62% center;
  }

  .comic-body .comic-hero h1 { font-size: 30px; }
  .comic-body .comic-hero p { font-size: 14px; }
  .comic-hero-meta { flex-wrap: wrap; gap: 8px 14px; margin-top: 18px; }
  .comic-body .comic-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
    padding: 14px;
  }
  .comic-body .comic-steps em { display: none; }
  .comic-body .comic-category-row { grid-auto-columns: 198px; }
  .comic-body .comic-category { grid-template-rows: 116px auto auto; }
  .comic-body .comic-project-grid { grid-template-columns: 1fr; }
  .comic-body .comic-project { grid-template-columns: 126px minmax(0, 1fr); grid-template-rows: 152px; }
  .comic-body .comic-project img { height: 100%; }
  .comic-body .comic-project div { padding: 13px; }
  .comic-body .comic-option-grid,
  .comic-body .comic-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .app-body .content { padding-right: 12px; padding-left: 12px; }
  .app-body .metric-grid { grid-template-columns: 1fr; }
  .app-body .metric-grid .stat:last-child { grid-column: auto; }
  .app-body .page-head .actions { width: 100%; }
  .app-body .page-head .actions > * { flex: 1 1 130px; }
  .comic-credit { padding: 7px 8px; }
  .comic-body .comic-main { padding-right: 12px; padding-left: 12px; }
  .comic-body .comic-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comic-body .comic-primary,
  .comic-body .comic-secondary { width: 100%; padding-right: 10px; padding-left: 10px; }
  .comic-body .comic-steps { grid-template-columns: 1fr; }
  .comic-body .comic-project { grid-template-columns: 108px minmax(0, 1fr); }
}

/* Unified layered user navigation */
.ui-icon {
  width: 1em;
  height: 1em;
  display: block;
  flex: 0 0 auto;
}

.app-body .app-shell,
.comic-body .comic-shell {
  grid-template-columns: 252px minmax(0, 1fr);
}

.layered-nav {
  display: block !important;
  padding: 2px 0 10px;
}

.app-body .layered-nav > a,
.app-body .layered-nav .nav-group > summary {
  width: 100%;
  min-height: 43px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  margin: 2px 0;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  color: #475467;
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
}

.app-body .layered-nav > a {
  grid-template-columns: 30px minmax(0, 1fr);
}

.layered-nav .nav-group > summary::-webkit-details-marker { display: none; }

.app-body .layered-nav > a:hover,
.app-body .layered-nav > a.active,
.app-body .layered-nav .nav-group > summary:hover,
.app-body .layered-nav .nav-group.active-group > summary {
  color: #c83e22;
  background: #fff2ee;
  box-shadow: none;
  transform: none;
}

.nav-parent-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dfe4ea;
  border-radius: 7px;
  color: #667085;
  background: #f8fafb;
}

.nav-parent-icon .ui-icon { width: 16px; height: 16px; }

.layered-nav > a.active .nav-parent-icon,
.layered-nav .active-group > summary .nav-parent-icon {
  color: #fff;
  border-color: #ee4d2d;
  background: #ee4d2d;
}

.nav-chevron {
  display: flex;
  justify-content: flex-end;
  color: #98a2b3;
}

.nav-chevron .ui-icon {
  width: 15px;
  height: 15px;
  transition: transform .18s ease;
}

.nav-group[open] .nav-chevron .ui-icon { transform: rotate(180deg); }

.nav-submenu {
  position: relative;
  display: grid;
  gap: 2px;
  margin: 2px 0 7px 24px;
  padding-left: 14px;
}

.nav-submenu::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 1px;
  background: #e1e6eb;
}

.app-body .layered-nav .nav-submenu a {
  min-height: 38px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 7px;
  color: #667085;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 750;
  transform: none;
}

.app-body .layered-nav .nav-submenu a:hover,
.app-body .layered-nav .nav-submenu a.active {
  color: #bd391f;
  background: #fff5f2;
  box-shadow: none;
}

.nav-item-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7f8a9a;
}

.nav-item-icon .ui-icon { width: 15px; height: 15px; }
.nav-submenu a.active .nav-item-icon { color: #ee4d2d; }
.nav-admin-link { margin-top: 8px !important; border-top: 1px solid #e6e9ed !important; border-radius: 0 0 8px 8px !important; }
.sidebar-account button .ui-icon { width: 16px; height: 16px; }

.sidebar-guest-actions {
  display: grid;
  gap: 9px;
  margin-top: auto;
  padding: 14px 6px 2px;
  border-top: 1px solid #e4e7ec;
  text-align: center;
}

.sidebar-guest-actions .btn { width: 100%; min-height: 40px; padding: 9px 12px; }
.sidebar-guest-actions > a:last-child { color: #667085; font-size: 12px; font-weight: 750; }

/* Product guide homepage */
.landing-body {
  background: #fff;
}

.landing-page {
  min-height: 100vh;
  overflow: hidden;
  color: #17202f;
  background: #fff;
}

.landing-nav {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  height: 72px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 0 5%;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.16);
  background: rgba(11, 18, 29, .34);
  backdrop-filter: blur(12px);
}

.landing-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}

.landing-brand .brand-mark {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
  background: #ee4d2d;
  box-shadow: 0 8px 18px rgba(238,77,45,.24);
  font-size: 11px;
  font-weight: 950;
}

.landing-brand strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-nav > nav { display: flex; align-items: center; gap: 28px; }
.landing-nav > nav a { color: #d9e0e8; font-size: 13px; font-weight: 750; }
.landing-nav > nav a:hover { color: #fff; }

.landing-nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.landing-login,
.landing-user-chip,
.landing-enter-small {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.landing-login,
.landing-user-chip { color: #fff; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.08); }
.landing-enter-small { color: #fff; background: #ee4d2d; }

.landing-hero {
  position: relative;
  height: calc(100vh - 64px);
  min-height: 620px;
  max-height: 780px;
  display: flex;
  align-items: center;
  padding: 96px 7% 48px;
  color: #fff;
  background-image:
    linear-gradient(90deg, rgba(10,17,28,.96) 0%, rgba(10,17,28,.76) 48%, rgba(10,17,28,.13) 82%),
    url("../img/comic/source/project-19.jpg");
  background-position: center;
  background-size: cover;
}

.landing-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 54px 54px;
}

.landing-hero-content { position: relative; z-index: 1; width: min(690px, 100%); }
.landing-kicker,
.landing-section-head > span,
.landing-final-cta > div > span {
  color: #ff896d;
  font-size: 12px;
  font-weight: 900;
}

.landing-hero h1 {
  margin: 16px 0 18px;
  color: #fff;
  font-size: 56px;
  line-height: 1.12;
}

.landing-hero p {
  max-width: 620px;
  margin: 0;
  color: #d4dbe5;
  font-size: 18px;
  line-height: 1.75;
}

.landing-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.landing-primary,
.landing-secondary,
.landing-final-cta a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 850;
}

.landing-primary,
.landing-final-cta a { color: #fff; background: #ee4d2d; box-shadow: 0 12px 24px rgba(238,77,45,.24); }
.landing-secondary { color: #fff; border: 1px solid rgba(255,255,255,.33); background: rgba(255,255,255,.09); backdrop-filter: blur(8px); }
.landing-primary .ui-icon,
.landing-secondary .ui-icon,
.landing-final-cta .ui-icon { width: 17px; height: 17px; }

.landing-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  margin-top: 34px;
  color: #bac5d2;
  font-size: 12px;
}

.landing-proof span { position: relative; padding-left: 12px; }
.landing-proof span::before { content: ""; position: absolute; top: 6px; left: 0; width: 5px; height: 5px; border-radius: 50%; background: #2cc4b5; }
.landing-proof b { color: #fff; }

.landing-value-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0 7%;
  color: #fff;
  background: #172231;
}

.landing-value-band > div {
  min-height: 150px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-content: center;
  gap: 5px 14px;
  padding: 28px 8%;
  border-right: 1px solid rgba(255,255,255,.11);
}

.landing-value-band > div:last-child { border-right: 0; }
.landing-value-band > div > span { width: 42px; height: 42px; grid-row: 1 / span 2; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: #fff; background: #0f8f83; }
.landing-value-band .ui-icon { width: 21px; height: 21px; }
.landing-value-band strong { font-size: 16px; }
.landing-value-band p { margin: 0; color: #aeb9c7; font-size: 13px; line-height: 1.55; }

.landing-section { padding: 84px 7%; }
.landing-section-head { max-width: 680px; margin-bottom: 36px; }
.landing-section-head h2 { margin: 10px 0 8px; color: #17202f; font-size: 36px; line-height: 1.22; }
.landing-section-head p { margin: 0; color: #667085; font-size: 15px; line-height: 1.7; }

.landing-workflow { background: #f5f7f8; }
.landing-workflow-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid #dce2e8; }
.landing-workflow-grid article { position: relative; min-height: 220px; padding: 28px 28px 20px 0; border-right: 1px solid #dce2e8; }
.landing-workflow-grid article:not(:first-child) { padding-left: 28px; }
.landing-workflow-grid article:last-child { border-right: 0; }
.landing-workflow-grid article > b { position: absolute; top: 26px; right: 22px; color: #c7cfd9; font-size: 12px; }
.landing-workflow-grid article > span { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: #fff; background: #1d2939; }
.landing-workflow-grid article:nth-child(3) > span { background: #ee4d2d; }
.landing-workflow-grid article:nth-child(4) > span { background: #0f8f83; }
.landing-workflow-grid .ui-icon { width: 21px; height: 21px; }
.landing-workflow-grid h3 { margin: 22px 0 8px; font-size: 18px; }
.landing-workflow-grid p { margin: 0; color: #667085; font-size: 13px; line-height: 1.65; }

.landing-template-section { background: #fff; }
.landing-template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.landing-template-grid > a { position: relative; min-height: 400px; overflow: hidden; border-radius: 8px; background: #17202f; box-shadow: 0 12px 30px rgba(20,30,44,.12); }
.landing-template-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease; }
.landing-template-grid > a:hover img { transform: scale(1.025); }
.landing-template-grid > a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(9,15,24,.94) 0%, rgba(9,15,24,.08) 68%); }
.landing-template-grid > a > div { position: absolute; right: 24px; bottom: 23px; left: 24px; z-index: 1; display: grid; gap: 8px; color: #fff; }
.landing-template-grid span { color: #ff9074; font-size: 11px; font-weight: 850; }
.landing-template-grid strong { font-size: 20px; }
.landing-template-grid small { display: flex; align-items: center; gap: 6px; color: #d5dce5; font-size: 12px; }
.landing-template-grid small .ui-icon { width: 14px; height: 14px; transform: rotate(-90deg); }

.landing-final-cta {
  min-height: 350px;
  display: flex;
  align-items: center;
  padding: 64px 7%;
  color: #fff;
  background-image:
    linear-gradient(90deg, rgba(11,18,29,.95) 0%, rgba(11,18,29,.65) 62%, rgba(11,18,29,.22) 100%),
    url("../img/comic/source/project-21.jpg");
  background-position: center;
  background-size: cover;
}

.landing-final-cta > div { max-width: 700px; }
.landing-final-cta h2 { margin: 12px 0 24px; color: #fff; font-size: 34px; line-height: 1.3; }

.landing-footer {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 7%;
  color: #fff;
  background: #101823;
}

.landing-footer p { margin: 0; color: #98a5b5; font-size: 12px; }

/* Cleaner icon navigation on mobile */
@media (max-width: 980px) {
  .app-body .app-shell,
  .comic-body .comic-shell { display: block; }

  .mobile-nav {
    height: 74px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    padding: 4px max(6px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    border-top-color: #e4e8ed;
    background: #fff;
    box-shadow: 0 -7px 22px rgba(22,32,47,.08);
    backdrop-filter: none;
  }

  .mobile-nav a {
    position: relative;
    min-height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 7px 2px 3px;
    color: #778294;
    background: transparent !important;
    border-radius: 0;
    font-size: 11px;
    font-weight: 750;
  }

  .mobile-nav a .mobile-nav-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #707c8e;
    background: transparent !important;
    border: 0;
    border-radius: 50%;
    transition: color .16s ease, background .16s ease, transform .16s ease;
  }

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

  .mobile-nav a .mobile-nav-label {
    width: auto;
    height: auto;
    display: block;
    color: inherit;
    background: transparent !important;
    border-radius: 0;
    line-height: 1.2;
  }

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

  .mobile-nav a.active:not(.mobile-nav-primary) .mobile-nav-icon {
    color: #e3482a;
    background: #fff0eb !important;
  }

  .mobile-nav .mobile-nav-primary .mobile-nav-icon {
    width: 48px;
    height: 48px;
    margin-top: -20px;
    color: #fff;
    border: 5px solid #fff;
    border-radius: 50%;
    background: #ee4d2d !important;
    box-shadow: 0 9px 20px rgba(238,77,45,.25);
  }

  .mobile-nav .mobile-nav-primary .mobile-nav-icon .ui-icon { width: 22px; height: 22px; stroke-width: 2.4; }
  .mobile-nav .mobile-nav-primary .mobile-nav-label { margin-top: -2px; color: #dd4528; font-weight: 850; }
  .mobile-nav .mobile-nav-primary.active .mobile-nav-icon { box-shadow: 0 0 0 3px #ffe2da, 0 9px 20px rgba(238,77,45,.27); }
}

@media (max-width: 860px) {
  .landing-nav { grid-template-columns: minmax(0, 1fr) auto; height: 64px; padding: 0 18px; }
  .landing-nav > nav { display: none; }
  .landing-user-chip,
  .landing-login { display: none; }
  .landing-hero { height: calc(100vh - 56px); min-height: 620px; max-height: 760px; padding: 92px 22px 44px; align-items: flex-end; background-image: linear-gradient(0deg, rgba(10,17,28,.97) 0%, rgba(10,17,28,.67) 62%, rgba(10,17,28,.24) 100%), url("../img/comic/source/project-19.jpg"); background-position: 62% center; }
  .landing-hero h1 { font-size: 40px; }
  .landing-hero p { font-size: 16px; }
  .landing-value-band { grid-template-columns: 1fr; padding: 0 20px; }
  .landing-value-band > div { min-height: 112px; padding: 22px 0; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.11); }
  .landing-value-band > div:last-child { border-bottom: 0; }
  .landing-section { padding: 64px 20px; }
  .landing-section-head h2 { font-size: 30px; }
  .landing-workflow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-workflow-grid article { min-height: 190px; padding: 24px 20px 20px 0; border-bottom: 1px solid #dce2e8; }
  .landing-workflow-grid article:not(:first-child) { padding-left: 20px; }
  .landing-workflow-grid article:nth-child(2) { border-right: 0; }
  .landing-workflow-grid article:nth-child(3),
  .landing-workflow-grid article:nth-child(4) { border-bottom: 0; }
  .landing-template-grid { grid-template-columns: 1fr; }
  .landing-template-grid > a { min-height: 320px; }
  .landing-final-cta { min-height: 320px; padding: 50px 20px; }
  .landing-final-cta h2 { font-size: 29px; }
  .landing-footer { align-items: flex-start; flex-direction: column; padding: 24px 20px; }
}

@media (max-width: 460px) {
  .landing-nav { padding: 0 14px; }
  .landing-brand strong { max-width: 180px; font-size: 14px; }
  .landing-enter-small { min-height: 36px; padding: 7px 10px; font-size: 12px; }
  .landing-hero { min-height: 600px; padding-right: 18px; padding-left: 18px; }
  .landing-hero h1 { font-size: 34px; }
  .landing-hero-actions { display: grid; grid-template-columns: 1fr; }
  .landing-primary,
  .landing-secondary { width: 100%; }
  .landing-proof { gap: 8px 14px; }
  .landing-workflow-grid { grid-template-columns: 1fr; }
  .landing-workflow-grid article,
  .landing-workflow-grid article:not(:first-child) { min-height: 168px; padding: 22px 0; border-right: 0; border-bottom: 1px solid #dce2e8; }
  .landing-workflow-grid article:last-child { border-bottom: 0; }
  .landing-template-grid > a { min-height: 285px; }
}

/* Premium cinematic application shell */
body.app-body,
body.comic-body {
  --bg: #f3f4f5;
  --surface: #fff;
  --line: #e4e6e8;
  --line-strong: #d5d9de;
  --text: #17191d;
  --muted: #69707d;
  --primary: #f05236;
  --primary-2: #f66b4e;
  --teal: #168d83;
  --shadow: 0 18px 42px rgba(20, 22, 26, .11);
  --shadow-soft: 0 7px 20px rgba(20, 22, 26, .055);
  color: var(--text);
  background: #f3f4f5;
  background-image: none;
}

.app-body .app-shell,
.comic-body .comic-shell {
  grid-template-columns: 264px minmax(0, 1fr);
}

.app-body .sidebar {
  padding: 20px 15px 14px;
  color: #f7f7f5;
  border-right: 0;
  background: #171717;
  box-shadow: 12px 0 34px rgba(14, 14, 14, .08);
}

.app-body .sidebar .brand {
  min-height: 46px;
  margin: 0 5px 22px;
  color: #fff;
  font-size: 15px;
}

.app-body .sidebar .brand-mark {
  border: 1px solid rgba(255,255,255,.13);
  color: #fff;
  background: #f05236;
  box-shadow: 0 9px 22px rgba(240,82,54,.22);
}

.app-body .sidebar .layered-nav > a,
.app-body .sidebar .layered-nav .nav-group > summary {
  color: #aeb1b7;
}

.app-body .sidebar .layered-nav > a:hover,
.app-body .sidebar .layered-nav > a.active,
.app-body .sidebar .layered-nav .nav-group > summary:hover,
.app-body .sidebar .layered-nav .nav-group.active-group > summary {
  color: #fff;
  background: #262626;
}

.app-body .sidebar .nav-parent-icon {
  color: #9ba0a9;
  border-color: #343434;
  background: #222;
}

.app-body .sidebar .layered-nav > a.active .nav-parent-icon,
.app-body .sidebar .layered-nav .active-group > summary .nav-parent-icon {
  color: #fff;
  border-color: #f05236;
  background: #f05236;
}

.app-body .sidebar .nav-chevron { color: #6f737b; }
.app-body .sidebar .nav-submenu::before { background: #353535; }

.app-body .sidebar .layered-nav .nav-submenu a {
  color: #8f949c;
}

.app-body .sidebar .layered-nav .nav-submenu a:hover,
.app-body .sidebar .layered-nav .nav-submenu a.active {
  color: #fff;
  background: #242424;
}

.app-body .sidebar .nav-item-icon { color: #747983; }
.app-body .sidebar .nav-submenu a.active .nav-item-icon { color: #ff785c; }
.app-body .sidebar .nav-admin-link { border-top-color: #303030 !important; }

.app-body .sidebar .sidebar-account {
  border-top-color: #303030;
}

.app-body .sidebar .account-avatar { background: #f05236; }
.app-body .sidebar .sidebar-account strong { color: #fff; }
.app-body .sidebar .sidebar-account small { color: #8f949c; }
.app-body .sidebar .sidebar-account button {
  color: #aeb2b9;
  border-color: #353535;
  background: #222;
}

.app-body .sidebar .sidebar-account button:hover {
  color: #fff;
  border-color: #f05236;
  background: #f05236;
}

.app-body .content {
  max-width: 1420px;
  padding: 34px 38px 56px;
}

.comic-body .comic-main {
  max-width: 1480px;
  padding: 32px 36px 54px;
}

.app-body .page-title {
  color: #17191d;
  font-size: 32px;
  font-weight: 900;
}

.app-body .page-head {
  padding-bottom: 18px;
  border-bottom: 1px solid #dfe2e5;
}

.app-body .section-head {
  margin-top: 32px;
  margin-bottom: 16px;
}

.app-body .section-head h2 {
  margin: 5px 0 0;
  color: #191b20;
  font-size: 24px;
}

.section-kicker {
  color: #f05236;
  font-size: 11px;
  font-weight: 900;
}

.app-body .card,
.app-body .tool-form,
.app-body .tool-side-panel,
.app-body .comic-template-summary,
.app-body .comic-generate-form,
.app-body .price-card,
.app-body .video-task-card,
.app-body .order-card,
.app-body .tool-record {
  border-color: #e2e4e7;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.app-body .card:hover,
.app-body .video-task-card:hover,
.app-body .price-card:hover {
  border-color: #d1d5da;
  box-shadow: 0 14px 34px rgba(20,22,26,.10);
}

.app-body .btn,
.app-body button,
.comic-body .btn,
.comic-body button {
  color: #fff;
  background: #f05236;
  box-shadow: 0 9px 20px rgba(240,82,54,.18);
}

.app-body .btn:hover,
.app-body button:hover,
.comic-body .btn:hover,
.comic-body button:hover {
  background: #dc452b;
}

.app-body .btn.secondary,
.comic-body .btn.secondary {
  color: #292c31;
  border-color: #d6dade;
  background: #fff;
}

/* Dashboard */
.dashboard-banner {
  position: relative;
  min-height: 250px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  align-items: center;
  gap: 32px;
  overflow: hidden;
  padding: 34px 38px;
  border-radius: 8px;
  color: #fff;
  background-image:
    linear-gradient(90deg, rgba(12,13,15,.96) 0%, rgba(12,13,15,.79) 53%, rgba(12,13,15,.28) 100%),
    url("../img/comic/source/project-19.jpg");
  background-position: center 48%;
  background-size: cover;
  box-shadow: 0 22px 48px rgba(18,20,24,.18);
}

.dashboard-banner-copy { position: relative; z-index: 1; max-width: 720px; }
.dashboard-banner-copy > span,
.dashboard-credit-panel > span {
  color: #ff8a70;
  font-size: 11px;
  font-weight: 900;
}

.dashboard-banner h1 {
  max-width: 700px;
  margin: 12px 0 10px;
  color: #fff;
  font-size: 34px;
  line-height: 1.24;
}

.dashboard-banner-copy > p {
  max-width: 600px;
  margin: 0;
  color: #c8cdd5;
  font-size: 15px;
  line-height: 1.7;
}

.dashboard-banner-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.dashboard-banner-actions .btn { min-height: 42px; }
.dashboard-banner-actions .btn .ui-icon { width: 16px; height: 16px; }
.dashboard-banner-actions .btn.secondary { color: #fff; border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.08); }

.dashboard-credit-panel {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 142px;
  padding-left: 28px;
  border-left: 1px solid rgba(255,255,255,.22);
}

.dashboard-credit-panel strong { color: #fff; font-size: 46px; line-height: 1; }
.dashboard-credit-panel small { color: #aeb6c1; }
.dashboard-credit-panel a { width: max-content; margin-top: 10px; color: #ff9a83; font-size: 12px; font-weight: 850; }

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0 34px;
  border: 1px solid #e0e3e6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20,22,26,.045);
}

.dashboard-metrics > div {
  min-height: 102px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-right: 1px solid #e5e7e9;
}

.dashboard-metrics > div:last-child { border-right: 0; }
.dashboard-metric-icon { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: #fff; background: #24262b; }
.dashboard-metric-icon.accent-teal { background: #168d83; }
.dashboard-metric-icon.accent-coral { background: #f05236; }
.dashboard-metric-icon .ui-icon { width: 20px; height: 20px; }
.dashboard-metrics p { display: grid; gap: 3px; margin: 0; color: #777e89; font-size: 12px; }
.dashboard-metrics strong { color: #1c1e22; font-size: 19px; }
.dashboard-metrics small { color: #9299a4; }

.app-body .video-card-grid { gap: 16px; }
.app-body .video-task-card { border: 0; box-shadow: 0 8px 24px rgba(20,22,26,.075); }
.app-body .task-thumb {
  min-height: 182px;
  background-color: #1b1c20;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 30px 30px;
}
.app-body .task-card-body { padding: 17px; }

/* Authentication */
.auth-wrap {
  grid-template-columns: minmax(520px, 1.25fr) minmax(430px, .75fr);
  place-items: stretch;
  background: #fff;
}

.auth-visual {
  background-image:
    linear-gradient(0deg, rgba(10,11,13,.94) 0%, rgba(10,11,13,.08) 72%),
    url("../img/comic/source/project-19.jpg");
}

.auth-visual > div { right: 8%; bottom: 8%; left: 8%; max-width: 620px; }
.auth-visual h2 { max-width: 600px; font-size: 48px; }
.auth-card,
.app-body .auth-card {
  width: min(440px, calc(100% - 64px));
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.auth-card .auth-brand { margin-bottom: 42px; }
.auth-card h1 { margin-top: 10px; color: #17191d; font-size: 36px; }
.auth-card > p { font-size: 14px; }
.auth-card form { margin-top: 30px; }
.auth-card label { margin-top: 17px; color: #3a3e45; font-size: 13px; }
.auth-card input { min-height: 50px; border-color: #dfe2e5; background: #f7f7f7; }
.auth-card .actions { display: grid; grid-template-columns: 1fr 1fr; }
.auth-card .actions > * { width: 100%; }

/* Short-drama and commerce surfaces */
.comic-body .comic-hero {
  min-height: 288px;
  padding: 38px 42px;
  background-image:
    linear-gradient(90deg, rgba(12,13,15,.96) 0%, rgba(12,13,15,.74) 52%, rgba(12,13,15,.12) 86%),
    url("../img/comic/source/project-19.jpg");
  box-shadow: 0 20px 44px rgba(18,20,24,.17);
}

.comic-body .comic-hero h1 { font-size: 40px; }
.comic-body .comic-steps { border: 0; box-shadow: 0 7px 22px rgba(20,22,26,.06); }
.comic-body .comic-panel { margin-top: 30px; }
.comic-body .comic-category,
.comic-body .comic-project { border: 0; box-shadow: 0 7px 22px rgba(20,22,26,.075); }
.comic-body .comic-category.active { box-shadow: 0 0 0 2px #f05236, 0 10px 26px rgba(20,22,26,.10); }
.comic-body .comic-section-head h2 { font-size: 23px; }

.app-body .price-card { border: 0; box-shadow: 0 8px 25px rgba(20,22,26,.075); }
.app-body .price-card::before { width: 3px; background: #f05236; }
.app-body .price-badge { color: #19766f; background: #e9f7f5; }
.app-body .price-card h2 { color: #22252a; }

@media (max-width: 980px) {
  .app-body .mobile-topbar {
    min-height: 60px;
    color: #fff;
    border-bottom: 0;
    background: #171717;
    box-shadow: 0 7px 20px rgba(14,14,14,.14);
    backdrop-filter: none;
  }

  .mobile-brand strong { color: #fff; }
  .mobile-brand .brand-mark { border-color: rgba(255,255,255,.12); background: #f05236; }
  .mobile-balance { color: #ff9b84; border-color: #3a302e; background: #28211f; }
  .app-body .content,
  .comic-body .comic-main { padding: 20px 14px 96px; }
  .dashboard-banner { grid-template-columns: minmax(0, 1fr) 190px; }
}

@media (max-width: 720px) {
  .app-body .page-title { font-size: 27px; }
  .dashboard-banner {
    min-height: 370px;
    grid-template-columns: 1fr;
    align-items: end;
    padding: 25px 22px;
    background-image:
      linear-gradient(0deg, rgba(10,11,13,.97) 0%, rgba(10,11,13,.66) 65%, rgba(10,11,13,.20) 100%),
      url("../img/comic/source/project-19.jpg");
    background-position: 62% center;
  }

  .dashboard-banner h1 { font-size: 29px; }
  .dashboard-banner-copy > p { font-size: 14px; }
  .dashboard-banner-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .dashboard-banner-actions .btn { min-width: 0; padding-right: 10px; padding-left: 10px; }
  .dashboard-credit-panel { display: none; }
  .dashboard-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 28px; }
  .dashboard-metrics > div { min-height: 116px; grid-template-columns: 1fr; justify-items: center; gap: 8px; padding: 15px 7px; border-right: 1px solid #e5e7e9; text-align: center; }
  .dashboard-metric-icon { width: 36px; height: 36px; }
  .dashboard-metrics strong { font-size: 14px; overflow-wrap: anywhere; }
  .dashboard-metrics small { display: none; }
  .app-body .section-head { margin-top: 26px; }

  .auth-wrap { padding: 0; background: #fff; }
  .auth-card,
  .app-body .auth-card { width: calc(100% - 36px); padding: 34px 4px 24px; }
  .auth-card .auth-brand { margin-bottom: 34px; }
  .auth-card h1 { font-size: 31px; }

  .comic-body .comic-hero { min-height: 310px; padding: 26px 21px; }
  .comic-body .comic-hero h1 { font-size: 32px; }
}

@media (max-width: 420px) {
  .dashboard-banner { min-height: 390px; }
  .dashboard-banner-actions { grid-template-columns: 1fr; }
  .dashboard-metrics > div { padding-right: 4px; padding-left: 4px; }
}

/* Generated brand mark */
.brand-mark,
.app-body .brand-mark,
.app-body .sidebar .brand-mark,
.landing-brand .brand-mark,
.mobile-brand .brand-mark,
.auth-brand .brand-mark {
  flex-basis: 38px;
  width: 38px;
  height: 38px;
  overflow: hidden;
  padding: 2px;
  color: transparent;
  border: 1px solid rgba(23, 23, 23, .12) !important;
  background: #fff !important;
  box-shadow: 0 8px 18px rgba(15, 17, 20, .14) !important;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.app-body .sidebar .brand-mark {
  border-color: rgba(255,255,255,.18) !important;
}

.auth-brand .brand-mark {
  flex-basis: 42px;
  width: 42px;
  height: 42px;
}

/* Music studio */
.music-hero {
  position: relative;
  min-height: 250px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 40px;
  overflow: hidden;
  margin-bottom: 22px;
  padding: 36px 42px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(115deg, #121418 0%, #1d2026 58%, #123c3a 100%);
  background-size: 34px 34px, 34px 34px, auto;
  box-shadow: 0 18px 44px rgba(20, 22, 26, .16);
}

.music-hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 42%;
  height: 3px;
  content: "";
  background: #24b7aa;
}

.music-hero-copy { position: relative; z-index: 1; max-width: 680px; }
.music-hero-copy .eyebrow { color: #ff8164; }
.music-hero-copy h1 { margin: 8px 0 12px; color: #fff; font-size: 42px; line-height: 1.14; letter-spacing: 0; }
.music-hero-copy p { max-width: 640px; margin: 0; color: #cbd1d8; font-size: 15px; line-height: 1.75; }
.music-hero-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px; color: #aeb6c0; font-size: 12px; font-weight: 750; }
.music-hero-meta span::before { display: inline-block; width: 5px; height: 5px; margin: 0 8px 2px 0; border-radius: 50%; background: #24b7aa; content: ""; }

.music-equalizer {
  position: relative;
  z-index: 1;
  height: 148px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 6px;
}

.music-equalizer i {
  width: 9px;
  height: var(--bar-height);
  max-height: 128px;
  border-radius: 4px;
  background: linear-gradient(#ff6b4a, #24b7aa);
  box-shadow: 0 0 18px rgba(36, 183, 170, .18);
  animation: music-bar 1.8s ease-in-out infinite alternate;
}

.music-equalizer i:nth-child(2n) { animation-delay: -.55s; }
.music-equalizer i:nth-child(3n) { animation-delay: -1.1s; }
@keyframes music-bar { from { transform: scaleY(.72); opacity: .68; } to { transform: scaleY(1); opacity: 1; } }

.music-studio { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 18px; align-items: start; }
.music-compose-panel,
.music-control-panel {
  min-width: 0;
  padding: 26px;
  border: 1px solid #e2e5e9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(20, 22, 26, .065);
}
.music-control-panel { position: sticky; top: 22px; background: #181a1f; border-color: #181a1f; color: #fff; }
.music-section-head { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.music-section-head > div { display: flex; align-items: center; gap: 11px; }
.music-section-head span { width: 29px; height: 29px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; color: #fff; background: #f05236; font-size: 11px; font-weight: 900; }
.music-section-head h2 { margin: 0; font-size: 20px; letter-spacing: 0; }
.music-section-head small { color: #8f98a5; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.music-compose-panel > label,
.music-compose-panel > div > label,
.music-field-grid label,
.music-control-panel > label:not(.music-toggle-row),
.music-slider-field label { display: block; margin: 18px 0 8px; color: #4e5561; font-size: 12px; font-weight: 850; }
.music-control-panel > label:not(.music-toggle-row),
.music-control-panel .music-slider-field label { color: #bfc5cd; }
.music-compose-panel input,
.music-compose-panel textarea,
.music-control-panel select { width: 100%; min-height: 48px; border: 1px solid #dfe3e8; border-radius: 7px; background: #f8f9fa; }
.music-compose-panel textarea { min-height: 150px; resize: vertical; line-height: 1.7; }
.music-compose-panel .music-lyrics-input { min-height: 260px; font-family: inherit; }
.music-control-panel select { color: #f3f5f7; border-color: #373b43; background: #23262c; }
.music-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.music-mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; border: 0; }
.music-mode-switch legend { margin-bottom: 9px; color: #4e5561; font-size: 12px; font-weight: 850; }
.music-mode-switch label { position: relative; cursor: pointer; }
.music-mode-switch input { position: absolute; opacity: 0; pointer-events: none; }
.music-mode-switch label > span { min-height: 76px; display: grid; align-content: center; gap: 4px; padding: 14px 16px; border: 1px solid #e0e4e8; border-radius: 7px; background: #fafafa; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.music-mode-switch label:hover > span { transform: translateY(-1px); border-color: #bdc4cb; }
.music-mode-switch input:checked + span { border-color: #f05236; background: #fff5f1; box-shadow: inset 3px 0 0 #f05236; }
.music-mode-switch strong { font-size: 14px; }
.music-mode-switch small { color: #8c939d; font-size: 11px; }

.music-toggle-row { position: relative; min-height: 60px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; margin: 18px 0; padding: 12px 13px; border: 1px solid #383c44; border-radius: 7px; background: #22252b; cursor: pointer; }
.music-toggle-row > span { display: grid; gap: 3px; }
.music-toggle-row strong { font-size: 13px; }
.music-toggle-row small { color: #8e97a3; font-size: 10px; }
.music-toggle-row input[type="checkbox"] { position: absolute; opacity: 0; }
.music-toggle-row i { width: 40px; height: 22px; position: relative; display: block; border-radius: 12px; background: #454a54; transition: background .2s ease; }
.music-toggle-row i::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; content: ""; transition: transform .2s ease; }
.music-toggle-row input:checked + i { background: #1ca89c; }
.music-toggle-row input:checked + i::after { transform: translateX(18px); }

.music-slider-field { margin-top: 19px; }
.music-slider-field > div { display: flex; justify-content: space-between; align-items: center; }
.music-slider-field output { color: #48c9bd; font-size: 12px; font-weight: 900; }
.music-slider-field input { width: 100%; height: 4px; accent-color: #24b7aa; cursor: pointer; }
.music-cost-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 24px 0 14px; overflow: hidden; border: 1px solid #353941; border-radius: 7px; background: #353941; }
.music-cost-panel > div { display: grid; gap: 4px; padding: 14px; background: #202329; }
.music-cost-panel span { color: #8d96a2; font-size: 10px; }
.music-cost-panel strong { color: #fff; font-size: 14px; }
.music-cost-panel b { color: #ff8266; }
.music-submit { width: 100%; min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 7px; color: #fff; background: #f05236; box-shadow: 0 12px 28px rgba(240, 82, 54, .25); }
.music-submit:hover { background: #da4027; transform: translateY(-1px); }
.music-submit .ui-icon { width: 18px; height: 18px; }

.music-history-section { margin-top: 34px; }
.music-history-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.music-history-card { min-width: 0; display: grid; grid-template-columns: 66px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px; border: 1px solid #e0e4e8; border-radius: 8px; background: #fff; transition: transform .18s ease, box-shadow .18s ease; }
.music-history-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20, 22, 26, .08); }
.music-history-cover { width: 66px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 6px; color: #fff; background: #202329; }
.music-history-cover img { width: 100%; height: 100%; object-fit: cover; }
.music-history-cover .ui-icon { width: 25px; height: 25px; }
.music-history-card > span:last-child { min-width: 0; display: grid; gap: 4px; }
.music-history-card small { color: #168d83; font-size: 10px; font-style: normal; font-weight: 850; }
.music-history-card strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.music-history-card em { color: #979da6; font-size: 10px; font-style: normal; }
.music-empty { min-height: 160px; display: grid; place-items: center; align-content: center; gap: 5px; text-align: center; color: #8d949d; border: 1px dashed #d6dade; border-radius: 8px; }
.music-empty > span { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; color: #168d83; }
.music-empty .ui-icon { width: 28px; height: 28px; }
.music-empty strong { color: #353941; }
.music-empty p { margin: 0; font-size: 12px; }

.music-task-thumb { background: #181a1f !important; }
.music-thumb-icon { display: grid !important; place-items: center; gap: 8px; color: #55c9bd !important; }
.music-thumb-icon .ui-icon { width: 42px; height: 42px; }
.music-thumb-icon b { color: #fff; font-size: 13px; }
.music-task-card .task-progress-track i { background: #1ca89c; }
.music-task-detail { grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); }
.music-result-stage { min-height: 420px; padding: 18px; border-radius: 8px; background: #15171b; }
.music-result-list { display: grid; gap: 12px; }
.music-result-track { min-width: 0; display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 18px; padding: 16px; border: 1px solid #333740; border-radius: 8px; color: #fff; background: #202329; }
.music-result-cover { position: relative; width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 6px; color: #4ac6ba; background: #111317; }
.music-result-cover img { width: 100%; height: 100%; object-fit: cover; }
.music-result-cover .ui-icon { width: 44px; height: 44px; }
.music-result-cover i { position: absolute; right: 8px; bottom: 8px; min-width: 30px; padding: 5px 7px; color: #fff; border-radius: 5px; background: rgba(10, 12, 15, .76); font-size: 10px; font-style: normal; font-weight: 900; text-align: center; }
.music-result-body { min-width: 0; display: grid; align-content: center; gap: 10px; }
.music-result-title { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.music-result-title > div { min-width: 0; display: grid; gap: 3px; }
.music-result-title small { color: #4ac6ba; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.music-result-title strong { overflow-wrap: anywhere; font-size: 18px; }
.music-result-tags { margin: 0; color: #aeb5bf; font-size: 11px; }
.music-result-track audio { width: 100%; height: 40px; color-scheme: dark; }
.music-result-meta { display: flex; gap: 14px; color: #7f8996; font-size: 10px; }
.music-lyrics-result { border-top: 1px solid #353a43; padding-top: 8px; }
.music-lyrics-result summary { color: #c7cdd4; font-size: 11px; cursor: pointer; }
.music-lyrics-result pre { max-height: 240px; overflow: auto; margin: 10px 0 0; padding: 12px; color: #b9c0c9; border-radius: 6px; background: #17191d; font: 12px/1.7 inherit; white-space: pre-wrap; }
.music-track-pending { height: 40px; display: flex; align-items: center; gap: 10px; color: #aeb5bf; font-size: 11px; }
.music-track-pending span { width: 22px; height: 22px; border: 2px solid #3d424b; border-top-color: #4ac6ba; border-radius: 50%; animation: music-spin 1s linear infinite; }
@keyframes music-spin { to { transform: rotate(360deg); } }
.music-empty-player { min-height: 380px; }
.music-loading-bars { height: 34px; display: flex; align-items: center; gap: 4px; margin-top: 18px; }
.music-loading-bars i { width: 3px; height: 14px; border-radius: 2px; background: #4ac6ba; animation: music-bar .8s ease-in-out infinite alternate; }
.music-loading-bars i:nth-child(2n) { animation-delay: -.25s; height: 26px; }
.music-loading-bars i:nth-child(3n) { animation-delay: -.5s; height: 19px; }
.admin-music-results { display: grid; gap: 10px; }
.admin-music-results > div { display: grid; grid-template-columns: minmax(140px, .35fr) minmax(280px, 1fr) minmax(120px, .4fr); align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; }
.admin-music-results audio { width: 100%; }

@media (max-width: 1050px) {
  .music-hero { grid-template-columns: minmax(0, 1fr) 250px; }
  .music-studio { grid-template-columns: minmax(0, 1fr) 310px; }
  .music-history-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .music-hero { grid-template-columns: 1fr; min-height: 300px; padding: 28px; }
  .music-equalizer { position: absolute; right: 18px; bottom: 14px; width: 42%; height: 92px; opacity: .45; }
  .music-studio { grid-template-columns: 1fr; }
  .music-control-panel { position: static; }
  .music-task-detail { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .music-hero { min-height: 330px; padding: 24px 20px; align-items: start; }
  .music-hero-copy h1 { font-size: 32px; }
  .music-hero-copy p { font-size: 13px; }
  .music-hero-meta { gap: 8px 12px; }
  .music-compose-panel,
  .music-control-panel { padding: 20px 16px; }
  .music-mode-switch,
  .music-field-grid,
  .music-history-grid { grid-template-columns: 1fr; }
  .music-result-stage { padding: 10px; }
  .music-result-track { grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .music-result-title { display: grid; }
  .music-result-title .status { width: max-content; }
  .music-result-meta { flex-wrap: wrap; }
  .admin-music-results > div { grid-template-columns: 1fr; }
}

/* Agent distribution */
.invite-notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 10px;
  margin: 16px 0;
  padding: 13px 14px;
  border: 1px solid #b9ded9;
  border-radius: 7px;
  background: #f2fbfa;
}
.invite-notice span { color: #168d83; font-size: 11px; font-weight: 900; }
.invite-notice strong { color: #20242a; font-size: 13px; }
.invite-notice small { grid-column: 1 / -1; color: #6f7883; }

.agent-join-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  overflow: hidden;
  border: 1px solid #dfe3e7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(24, 27, 32, .08);
}
.agent-offer-panel {
  min-width: 0;
  display: grid;
  align-content: center;
  padding: clamp(32px, 5vw, 70px);
  color: #f8fafb;
  background: #17191d;
}
.agent-offer-kicker { color: #50c9bd; font-size: 11px; font-weight: 900; letter-spacing: 0; }
.agent-offer-panel h2 { max-width: 620px; margin: 14px 0; font-size: clamp(30px, 4vw, 52px); line-height: 1.08; }
.agent-offer-panel > p { max-width: 620px; margin: 0; color: #aeb5bf; line-height: 1.8; }
.agent-price { display: grid; justify-items: start; gap: 4px; margin: 32px 0 24px; }
.agent-price small { color: #8f98a4; }
.agent-price strong { font-size: clamp(46px, 6vw, 72px); line-height: 1; }
.agent-price strong span { margin-right: 4px; color: #ff7458; font-size: .42em; vertical-align: top; }
.agent-price em { color: #4bc8bc; font-size: 13px; font-style: normal; font-weight: 850; }
.agent-offer-panel form { margin: 0; }
.agent-pay-button {
  width: min(100%, 360px);
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: #f05236;
  box-shadow: 0 12px 30px rgba(240, 82, 54, .22);
  font-weight: 900;
}
.agent-pay-button:hover { color: #fff; background: #d94027; transform: translateY(-1px); }
.agent-pending-note { display: block; margin-top: 10px; color: #8f98a4; }
.agent-benefit-list { display: grid; align-content: center; padding: clamp(26px, 4vw, 52px); }
.agent-benefit-list > div { display: grid; grid-template-columns: 46px 1fr; gap: 3px 14px; padding: 21px 0; border-bottom: 1px solid #e9ecef; }
.agent-benefit-list > div:last-child { border-bottom: 0; }
.agent-benefit-list span { grid-row: 1 / 3; color: #f05236; font: 900 12px/1.5 ui-monospace, monospace; }
.agent-benefit-list h3 { margin: 0; font-size: 16px; }
.agent-benefit-list p { margin: 0; color: #737b85; font-size: 13px; line-height: 1.65; }
.agent-join-disabled { max-width: 760px; padding: 40px; }
.agent-join-disabled h2 { margin-top: 0; }

.agent-side .nav a { display: flex; align-items: center; gap: 10px; }
.admin-main { width: calc(100% - 260px); min-width: 0; box-sizing: border-box; }
.agent-side .nav a > span { display: inline-flex; }
.agent-side .nav .ui-icon { width: 17px; height: 17px; }
.agent-side-note { display: grid; gap: 5px; margin: auto 16px 18px; padding: 15px; border: 1px solid #34373d; border-radius: 7px; background: #202329; }
.agent-side-note span, .agent-side-note small { color: #868f9a; font-size: 10px; }
.agent-side-note strong { color: #55c9bd; font: 900 15px/1.4 ui-monospace, monospace; letter-spacing: 0; }
.agent-kpi-grid .admin-kpi-card:nth-child(2n) { border-top-color: #1ca89c; }
.agent-kpi-grid .admin-kpi-card:nth-child(3n) { border-top-color: #f05236; }
.agent-invite-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .85fr);
  align-items: center;
  gap: 32px;
  margin: 20px 0;
  padding: 28px;
  border-radius: 8px;
  color: #f7f9fb;
  background: #181a1f;
}
.agent-invite-panel h2 { margin: 7px 0; font-size: 25px; }
.agent-invite-panel p { margin: 0; color: #a8b0bb; line-height: 1.65; }
.agent-invite-panel p strong { color: #52cabe; }
.agent-invite-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.agent-invite-copy input { min-width: 0; color: #dfe4e9; border-color: #3c4149; background: #23262c; }
.agent-invite-copy button { white-space: nowrap; }
.agent-dashboard-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.section-head.compact { margin: 0; padding: 17px 18px; border-bottom: 1px solid #e5e8eb; }
.section-head.compact h2 { margin: 0; font-size: 17px; }
.section-head.compact p { margin: 3px 0 0; font-size: 11px; }
.section-head.compact a { color: #168d83; font-size: 12px; font-weight: 850; }
.agent-empty-row { min-height: 150px; display: grid; place-items: center; padding: 24px; color: #858d97; text-align: center; }
.agent-balance-chip { min-width: 170px; display: grid; gap: 3px; padding: 12px 16px; border: 1px solid #c7e7e3; border-radius: 7px; background: #f0fbf9; }
.agent-balance-chip span { color: #64727a; font-size: 10px; }
.agent-balance-chip strong, .agent-income { color: #168d83; }
.agent-admin-form { min-width: 300px; display: grid; grid-template-columns: 110px 90px auto; gap: 7px; align-items: center; }
.agent-admin-form input, .agent-admin-form select, .agent-admin-form button { min-height: 38px; padding: 8px 9px; font-size: 12px; }

@media (max-width: 980px) {
  .agent-join-grid, .agent-invite-panel, .agent-dashboard-columns { grid-template-columns: 1fr; }
  .admin-main { width: 100%; }
  .agent-side-note { display: none; }
  .agent-invite-copy { max-width: 680px; }
}

@media (max-width: 640px) {
  .agent-join-head { align-items: start; }
  .agent-offer-panel { padding: 32px 22px; }
  .agent-offer-panel h2 { font-size: 34px; }
  .agent-benefit-list { padding: 18px 22px; }
  .agent-invite-panel { gap: 20px; padding: 22px 16px; }
  .agent-invite-copy { grid-template-columns: 1fr; }
  .agent-invite-copy button { width: 100%; }
  .agent-balance-chip { width: 100%; }
  .agent-admin-form { min-width: 270px; grid-template-columns: 1fr 86px auto; }
}
