:root {
  color-scheme: dark;
  --page: #0d0d10;
  --header: rgba(10, 10, 10, 0.85);
  --surface: rgba(24, 24, 28, 0.75);
  --surface-hi: rgba(32, 32, 38, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --brand: #6366f1;
  --brand-dim: rgba(99, 102, 241, 0.15);
  --text: #e8e8ea;
  --text-dim: #a8a8b0;
  --text-faint: #65656f;
  --danger: #ef4444;
  --success: #10b981;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.24);
  --blur-sm: blur(8px);
  --blur-md: blur(12px);
  --blur-lg: blur(24px);
}

:root[data-theme="light"] {
  color-scheme: light;
  --page: #f6f7fb;
  --header: rgba(255, 255, 255, 0.94);
  --surface: #ffffff;
  --surface-deep: #f1f3f8;
  --surface-raised: #ffffff;
  --line: #e4e7ee;
  --border: #d5dbe7;
  --text: #1d2230;
  --muted: #667085;
  --purple: #7551d1;
  --purple-soft: #8c69df;
  --gold: #a97c2b;
  --gold-dim: #8b661f;
  --surface-inset: #fbfcfe;
  --text-strong: #252b38;
  --muted-soft: #7b8698;
  --accent: #7551d1;
  --accent-surface: #f1edff;
  --accent-border: #b7a8e9;
  --warm-surface: #fff7ed;
  --warm-text: #73501c;
  --success: #2d7e5b;
  --danger: #b34b5a;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: "Noto Sans SC", Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
}

body {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

[hidden] {
  display: none !important;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 12px 24px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  flex: 0 0 auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  width: 100%;
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: #57545f transparent;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

.app-shell::-webkit-scrollbar {
  width: 8px;
}

.app-shell::-webkit-scrollbar-track {
  background: transparent;
}

.app-shell::-webkit-scrollbar-thumb {
  background: #4e4b55;
  border-radius: 99px;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100vw;
  height: 56px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--header);
}

.brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  height: 32px;
  font-family: Inter, sans-serif;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

.brand::after {
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, #6a70ff 0 52%, #b173ff 52% 78%, #ddbf52 78%);
}

.header-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-button,
.theme-button {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  cursor: pointer;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: var(--surface-raised);
  backdrop-filter: var(--blur-sm) saturate(140%);
  -webkit-backdrop-filter: var(--blur-sm) saturate(140%);
  color: #c5bdcc;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-button:hover,
.theme-button:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: var(--surface);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.history-button:hover,
.theme-button:hover {
  border-color: rgba(192, 132, 252, 0.68);
  color: #fff;
}

.history-button svg,
.theme-button svg {
  width: 16px;
  height: 16px;
}

.api-button,
.login-button {
  height: 32px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.api-button:hover,
.login-button:hover,
.buy-button:hover {
  transform: translateY(-1px);
}

.api-button {
  width: 82px;
  border: 1px solid rgba(169, 119, 255, 0.82);
  border-radius: 7px;
  background: rgba(118, 72, 205, 0.08);
  color: #e8dbff;
  font-size: 12px;
}

.login-button {
  min-width: 88px;
  max-width: 116px;
  padding: 0 18px;
  border: 1px solid #77727a;
  border-radius: 999px;
  background: #f7f5f9;
  color: #17131d;
  font-size: 13px;
  font-weight: 700;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}

.login-button span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-banner {
  position: absolute;
  top: 6px;
  left: 50%;
  width: min(640px, calc(100% - 420px));
  height: 48px;
  transform: translateX(-50%);
  margin-left: -7px;
}

.banner-button {
  position: relative;
  display: grid;
  grid-template-columns: 78px 1fr auto;
  align-items: center;
  width: 100%;
  height: 100%;
  min-height: 46px;
  padding: 0 16px 0 8px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid #3a3942;
  border-radius: 13px;
  background: #15171c;
  color: #f3eee7;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22), inset 0 -2px 0 rgba(103, 70, 121, 0.2);
}

.banner-button::after {
  position: absolute;
  right: 9%;
  bottom: -18px;
  width: 120px;
  height: 30px;
  content: "";
  background: radial-gradient(circle, rgba(123, 83, 160, 0.22), transparent 68%);
  pointer-events: none;
}

.banner-button img {
  width: 72px;
  height: 58px;
  object-fit: contain;
  transform: rotate(-3deg);
}

.banner-copy {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
  white-space: nowrap;
}

.banner-copy strong {
  color: #e8d7b2;
  font-size: 11px;
  font-weight: 700;
}

.banner-copy em {
  padding: 3px 10px;
  border: 1px solid rgba(255, 236, 187, 0.35);
  border-radius: 999px;
  background: linear-gradient(180deg, #f6d789, #e4b457);
  color: #302515;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.banner-copy small {
  margin-left: auto;
  color: #e8ca8c;
  font-size: 10px;
}

.banner-arrow {
  color: #d6b470;
  font-size: 15px;
}

.mobile-banner-wrap {
  display: none;
}

.workbench {
  display: grid;
  grid-template-columns: 365px minmax(0, 1fr);
  width: calc(100% - 84px);
  max-width: 1196px;
  min-height: 664px;
  margin: 0 auto;
  padding-top: 50px;
  gap: 54px;
}

.composer {
  display: grid;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px;
  gap: 20px;
  background: var(--surface);
  backdrop-filter: var(--blur-lg) saturate(150%);
  -webkit-backdrop-filter: var(--blur-lg) saturate(150%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mode-button {
  height: 40px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-deep);
  backdrop-filter: var(--blur-sm) saturate(130%);
  -webkit-backdrop-filter: var(--blur-sm) saturate(130%);
  color: #96919e;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-button:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--surface-raised);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mode-button.is-active {
  border-color: var(--purple);
  background: rgba(192, 132, 252, 0.15);
  color: var(--purple);
  box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.1);
}

.mode-button:hover {
  border-color: rgba(255, 255, 255, 0.22);
  color: #d9d4dd;
}

.mode-button.is-active {
  border-color: #5d5565;
  background: #403e44;
  color: #fff;
}

.field {
  position: relative;
}

.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 25px;
  margin-bottom: 7px;
}

.field-heading label,
.setting-label {
  color: #f0edf3;
  font-size: 13px;
  font-weight: 600;
}

.setting-label {
  font-size: 10px;
}

.field-hint {
  display: none;
  color: #78717f;
  font-size: 10px;
}

.image-heading .field-hint {
  display: inline;
}

.image-field {
  margin-top: 10px;
}

.prompt-editor {
  width: 100%;
  min-height: 142px;
  max-height: 260px;
  padding: 16px 15px 34px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  background: var(--surface-deep);
  color: #eeeaf1;
  font-size: 13px;
  line-height: 1.8;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.prompt-editor:empty::before {
  color: #5f5965;
  content: attr(data-placeholder);
  pointer-events: none;
}

.prompt-editor:focus {
  border-color: #9d6bc1;
  box-shadow: 0 0 0 2px rgba(192, 132, 252, 0.1);
}

.char-count {
  position: absolute;
  right: 14px;
  bottom: 10px;
  color: #8e8795;
  font-size: 10px;
}

.frame-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.frame-slot {
  position: relative;
  display: flex;
  overflow: hidden;
  aspect-ratio: 1.7;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #4e4a56;
  border-radius: 18px;
  background: #111116;
  color: #a39bab;
  gap: 5px;
  transition: 150ms ease;
}

.frame-slot:hover {
  border-color: #8d67a9;
  background: #16121c;
}

.frame-slot svg {
  width: 21px;
  height: 21px;
}

.frame-slot strong {
  font-size: 11px;
  font-weight: 600;
}

.frame-slot small {
  display: none;
  color: #6d6672;
  font-size: 9px;
}

.frame-slot.has-preview {
  background-position: center;
  background-size: cover;
}

.frame-slot.has-preview::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(transparent 35%, rgba(0, 0, 0, 0.7));
}

.frame-slot.has-preview > * {
  position: relative;
  z-index: 1;
  transform: translateY(28px);
}

.settings-grid {
  display: grid;
  grid-template-columns: 165px 1fr;
  gap: 8px;
}

.setting-block {
  display: flex;
  min-width: 0;
  min-height: 58px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #15151a;
}

.resolution-block {
  gap: 7px;
}

.segmented {
  display: flex;
  flex: 1;
  gap: 1px;
}

.segment {
  min-width: 48px;
  height: 29px;
  padding: 0 10px;
  cursor: pointer;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #918a99;
  font-size: 10px;
}

.segment.is-active {
  border: 1px solid rgba(190, 127, 255, 0.78);
  background: linear-gradient(145deg, rgba(116, 65, 157, 0.82), rgba(62, 42, 78, 0.94));
  color: #fff;
  font-weight: 700;
}

.duration-block {
  position: relative;
  display: block;
  padding: 7px 10px 8px;
}

.duration-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.duration-header strong {
  color: #c687ff;
  font-size: 10px;
}

.duration-range {
  width: 100%;
  height: 3px;
  margin: 8px 0 0;
  cursor: pointer;
  accent-color: #a849e4;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 1px;
  color: #6e6774;
  font-size: 8px;
}

.ratio-block {
  grid-column: 1 / -1;
  min-height: 46px;
  gap: 5px;
}

.ratio-options {
  display: grid;
  min-width: 0;
  flex: 1;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
}

.ratio-button {
  height: 27px;
  padding: 0;
  cursor: pointer;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #99929e;
  font-size: 9px;
}

.ratio-button:hover:not(:disabled) {
  color: #eee9f1;
}

.ratio-button.is-active {
  border: 1px solid rgba(190, 127, 255, 0.82);
  background: linear-gradient(145deg, #76419d, #3e2a4e);
  color: #fff;
  font-weight: 700;
}

.ratio-button.is-disabled {
  color: #55505b;
  cursor: not-allowed;
}

.quantity-row {
  display: grid;
  min-height: 42px;
  padding: 4px;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #15151a;
  gap: 4px;
}

.quantity-button {
  cursor: pointer;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #aea7b5;
  font-size: 11px;
  font-weight: 600;
}

.quantity-button.is-active {
  border: 1px solid #a858dd;
  background: linear-gradient(145deg, #71419a, #392a45);
  color: #fff;
}

.create-button {
  display: flex;
  width: 100%;
  min-height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(90deg, #7e20ff, #df0dcc);
  color: #fff;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 8px 28px rgba(139, 41, 217, 0.22);
}

.create-button svg {
  width: 17px;
  height: 17px;
}

.create-button:disabled {
  cursor: not-allowed;
  background: #3b3a3f;
  color: #8d8991;
  box-shadow: none;
}

.engine-status {
  display: flex;
  min-height: 20px;
  align-items: center;
  color: #817985;
  gap: 7px;
  font-size: 10px;
}

.engine-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #58ca8a;
  box-shadow: 0 0 0 3px rgba(88, 202, 138, 0.1);
}

.engine-status[data-engine="remote"] .engine-dot {
  background: #c084fc;
  box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.1);
}

.engine-status[data-engine="error"] .engine-dot {
  background: #e88989;
  box-shadow: 0 0 0 3px rgba(232, 137, 137, 0.1);
}

.engine-status button {
  margin-left: auto;
  padding: 0;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: #c08cf4;
  font-size: 10px;
}

.active-jobs {
  display: grid;
  gap: 6px;
}

.active-jobs:empty {
  display: none;
}

.job-card {
  display: grid;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 9px;
  background: #15151a;
  gap: 7px;
}

.job-card-head,
.job-card-meta,
.job-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.job-card-title {
  min-width: 0;
  overflow: hidden;
  color: #eeeaf1;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-status {
  flex: 0 0 auto;
  color: #b892e7;
  font-size: 10px;
}

.job-status.is-completed {
  color: #75cf9d;
}

.job-status.is-failed {
  color: #e88989;
}

.job-status.is-interrupted,
.job-status.is-cancelled {
  color: #d4aa71;
}

.job-status.is-running {
  color: #c084fc;
}

.job-progress-track {
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: #2a2830;
}

.job-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8e49d0, #dc83ff);
  transition: width 280ms ease;
}

.job-card-meta {
  color: #7f7887;
  font-size: 9px;
}

.job-card-actions {
  justify-content: flex-start;
}

.job-card-actions button,
.job-card-actions a {
  min-height: 24px;
  padding: 0 8px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 5px;
  background: transparent;
  color: #bcb4c4;
  font-size: 9px;
  text-decoration: none;
}

.job-card-actions button:hover,
.job-card-actions a:hover {
  border-color: rgba(192, 132, 252, 0.65);
  color: #fff;
}

.mobile-settings-summary {
  display: none;
}

.case-preview {
  display: flex;
  width: 100%;
  max-width: 760px;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-self: start;
}

.hero-video-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: #09090c;
}

.hero-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-controls {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  height: 78px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
  opacity: 1;
  transition: opacity 160ms ease;
}

.video-control-row {
  position: absolute;
  right: 14px;
  bottom: 27px;
  left: 14px;
  display: flex;
  height: 24px;
  align-items: center;
  gap: 8px;
}

.video-icon-button {
  display: grid;
  width: 26px;
  height: 26px;
  padding: 0;
  cursor: pointer;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
}

.video-icon-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.video-icon-button svg {
  width: 17px;
  height: 17px;
}

#heroPlay svg {
  fill: currentColor;
}

.video-time {
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px #000;
}

.video-spacer {
  flex: 1;
}

.video-progress {
  position: absolute;
  right: 16px;
  bottom: 17px;
  left: 16px;
  display: block;
  height: 4px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.6);
}

.video-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: #fff;
}

.quality-badge {
  position: absolute;
  z-index: 2;
  top: 13px;
  left: 14px;
  padding: 3px 9px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 6px;
  background: rgba(248, 251, 253, 0.94);
  color: #202024;
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.case-strip {
  display: grid;
  width: 100%;
  margin-top: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.case-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.72;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: #111;
  padding: 0;
}

.case-thumb.is-active {
  border-color: #b845ff;
  box-shadow: 0 0 0 1px rgba(184, 69, 255, 0.45);
}

.case-thumb :is(img, video) {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #09090c;
  opacity: 0.68;
}

.case-thumb.is-active :is(img, video),
.case-thumb:hover :is(img, video) {
  opacity: 1;
}

.thumb-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 32px;
  height: 32px;
  transform: translate(-50%, -50%);
  place-items: center;
  border-radius: 50%;
  background: rgba(20, 18, 24, 0.78);
  color: #fff;
}

.case-thumb.is-active .thumb-play {
  background: #8243c7;
}

.thumb-play svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.thumb-index {
  position: absolute;
  right: 8px;
  bottom: 5px;
  color: rgba(255, 255, 255, 0.84);
  font-family: Inter, sans-serif;
  font-size: 8px;
}

.more-link {
  display: inline-flex;
  margin-top: 26px;
  color: #b5adb9;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.more-link:hover {
  color: #fff;
}

.pricing-section {
  position: relative;
  width: min(1240px, calc(100% - 80px));
  margin: 84px auto 0;
  padding: 48px 0 64px;
  background: #0d0d11;
}

.section-rule {
  height: 1px;
  margin-bottom: 46px;
  background: rgba(255, 255, 255, 0.12);
}

.pricing-intro {
  max-width: 760px;
  margin-bottom: 46px;
}

.eyebrow {
  color: #ac82e7;
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.pricing-intro h2 {
  margin: 8px 0 12px;
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: 0;
}

.pricing-intro > p:last-child {
  margin: 0;
  color: #928c98;
  font-size: 13px;
  line-height: 1.8;
}

.price-group {
  margin-top: 28px;
}

.price-group h3 {
  position: relative;
  margin: 0 0 10px;
  padding-left: 14px;
  font-size: 20px;
}

.price-group h3::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  content: "";
  background: #ae8851;
}

.price-table {
  overflow: hidden;
  border: 1px solid rgba(210, 164, 86, 0.36);
  border-radius: 7px;
  background: #121116;
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.2);
}

.price-row {
  display: grid;
  min-height: 64px;
  grid-template-columns: 41% 59%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.price-row:last-child {
  border-bottom: 0;
}

.price-row > span {
  display: flex;
  min-width: 0;
  align-items: center;
  padding: 13px 24px;
}

.price-row > span + span {
  border-left: 1px solid rgba(206, 160, 82, 0.46);
  background: #17140e;
}

.price-head {
  min-height: 42px;
  color: #9890a2;
  font-size: 10px;
}

.price-head > span + span {
  color: #dec27e;
  font-weight: 700;
}

.service {
  color: #f4f0f5;
  gap: 16px;
}

.service svg {
  width: 20px;
  height: 20px;
  color: #d4a85f;
}

.service strong {
  font-size: 14px;
}

.service small {
  color: #aaa2ac;
  font-size: 9px;
}

.info-dot {
  display: inline-grid;
  width: 15px;
  height: 15px;
  padding: 0;
  cursor: help;
  place-items: center;
  border: 1px solid #a68551;
  border-radius: 50%;
  background: transparent;
  color: #d7b474;
  font-size: 9px;
}

.price {
  color: #f2d598;
  gap: 10px;
}

.price b {
  font-size: 28px;
  line-height: 1;
}

.price small {
  color: #cab98d;
  font-size: 10px;
}

.compact-price {
  margin-top: 14px;
}

.price-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.advantages {
  display: flex;
  flex-wrap: wrap;
  color: #a9a1ad;
  gap: 24px;
  font-size: 11px;
}

.advantages span::first-letter {
  color: #d6b470;
}

.buy-button {
  min-width: 136px;
  height: 50px;
  cursor: pointer;
  border: 1px solid rgba(228, 193, 127, 0.78);
  border-radius: 18px;
  background: #17141a;
  color: #f2eee8;
  font-size: 12px;
  font-weight: 700;
  box-shadow: inset 0 -4px 0 rgba(116, 53, 131, 0.32), 0 6px 16px rgba(0, 0, 0, 0.25);
}

.price-note {
  margin: 24px 0 0;
  color: #6d6772;
  font-size: 10px;
  line-height: 1.7;
}

.examples-section {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 112px 0 128px;
}

.examples-heading {
  max-width: 900px;
  margin: 0 auto 42px;
  text-align: center;
}

.examples-heading .eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.examples-heading .eyebrow span {
  display: block;
  width: 24px;
  height: 1px;
  background: #6e596f;
}

.examples-heading h2 {
  max-width: 780px;
  margin: 20px auto 12px;
  color: #f4f1f5;
  font-size: clamp(44px, 4.6vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0;
}

.examples-heading > p:last-child {
  margin: 0;
  color: #8d8692;
  font-size: 13px;
}

.gallery-grid {
  display: grid;
  grid-auto-flow: dense;
  grid-auto-rows: var(--gallery-row);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  grid-row: span 1;
  background: #111;
}

.gallery-card.is-portrait {
  grid-row: span 2;
}

.gallery-card > button {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  border: 0;
  background: #111;
}

.gallery-card :is(img, video) {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #09090c;
  transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 220ms ease;
}

.gallery-card:hover :is(img, video) {
  transform: scale(1.025);
  filter: brightness(0.82);
}

.gallery-card .quality-badge {
  top: 11px;
  right: 10px;
  left: auto;
}

.prompt-pill {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  display: flex;
  min-height: 36px;
  padding: 0 14px;
  opacity: 0;
  transform: translateY(7px);
  align-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(249, 247, 251, 0.95);
  color: #211d24;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  transition: 180ms ease;
}

.prompt-pill svg {
  width: 15px;
  height: 15px;
}

.gallery-card:hover .prompt-pill,
.gallery-card:focus-within .prompt-pill {
  opacity: 1;
  transform: translateY(0);
}

.toast {
  position: fixed;
  z-index: 80;
  bottom: 26px;
  left: 50%;
  max-width: calc(100% - 32px);
  padding: 11px 16px;
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(29, 28, 34, 0.96);
  color: #f2edf5;
  font-size: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  transition: 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  padding: 32px;
  visibility: hidden;
  opacity: 0;
  place-items: center;
  transition: 180ms ease;
}

.modal.is-open {
  visibility: visible;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 7, 0.86);
  backdrop-filter: blur(12px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(1040px, 100%);
  max-height: calc(100dvh - 64px);
  overflow: hidden;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.7fr);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: #111114;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
}

.modal-dialog > :is(img, video) {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  background: #09090c;
}

.modal-copy {
  position: relative;
  display: flex;
  padding: 72px 28px 28px;
  flex-direction: column;
}

.modal-copy .quality-badge {
  top: 26px;
  left: 28px;
}

.modal-copy h3 {
  margin: 0 0 14px;
  font-size: 24px;
}

.modal-copy p {
  margin: 0;
  color: #a39da8;
  font-size: 13px;
  line-height: 1.8;
}

.use-prompt-button {
  display: flex;
  min-height: 44px;
  margin-top: auto;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  background: #f6f2f7;
  color: #211d24;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
}

.use-prompt-button svg {
  width: 16px;
  height: 16px;
}

.modal-close {
  position: absolute;
  z-index: 4;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  cursor: pointer;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(15, 14, 18, 0.7);
  color: #fff;
  font-size: 23px;
  line-height: 1;
}

.utility-modal {
  z-index: 110;
}

.utility-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 20px;
  background: #141418;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
}

.utility-dialog .modal-close {
  top: 16px;
  right: 16px;
}

.utility-eyebrow {
  margin: 0 0 8px;
  color: #ac82e7;
  font-family: Inter, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.utility-dialog h2 {
  margin: 0 0 9px;
  color: #f4f0f6;
  font-size: 24px;
}

.utility-description {
  margin: 0 0 20px;
  color: #98919f;
  font-size: 12px;
  line-height: 1.7;
}

.service-status-list {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background: #111114;
}

.service-status-row {
  display: grid;
  min-height: 62px;
  padding: 10px 12px;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.service-status-row + .service-status-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.service-status-row > svg {
  width: 17px;
  height: 17px;
  color: #a98cc7;
}

.service-status-row > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.service-status-row strong {
  color: #eeeaf0;
  font-size: 11px;
}

.service-status-row small {
  overflow: hidden;
  color: #817986;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-status-row b {
  display: inline-flex;
  min-height: 22px;
  padding: 0 8px;
  align-items: center;
  border: 1px solid rgba(117, 207, 157, 0.28);
  border-radius: 999px;
  color: #75cf9d;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}

.service-status-row b.is-disabled,
.service-status-row b.is-error {
  border-color: rgba(232, 137, 137, 0.28);
  color: #e88989;
}

.service-status-row b.is-loading {
  border-color: rgba(255, 255, 255, 0.14);
  color: #8d8593;
}

.engine-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.engine-mode-button {
  display: grid;
  min-height: 92px;
  padding: 12px;
  cursor: pointer;
  grid-template-columns: 20px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 9px;
  background: #111114;
  color: #b4adba;
  gap: 3px 8px;
  text-align: left;
}

.engine-mode-button svg {
  grid-row: 1 / span 2;
  width: 18px;
  height: 18px;
  color: #a98cc7;
}

.engine-mode-button span {
  color: #eeeaf0;
  font-size: 12px;
  font-weight: 700;
}

.engine-mode-button small {
  color: #817986;
  font-size: 9px;
  line-height: 1.4;
}

.engine-mode-button.is-active {
  border-color: rgba(190, 127, 255, 0.65);
  background: #30233e;
}

.utility-fields {
  display: grid;
  margin-top: 17px;
  gap: 12px;
}

.utility-fields label,
.account-name-field {
  display: grid;
  color: #c1b9c7;
  font-size: 11px;
  gap: 6px;
}

.utility-fields input,
.account-name-field input,
.auth-form input {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  outline: none;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 7px;
  background: #0f0f12;
  color: #f0ecf3;
  font-size: 12px;
}

.utility-fields input:focus,
.account-name-field input:focus,
.auth-form input:focus {
  border-color: #a16bc6;
  box-shadow: 0 0 0 2px rgba(161, 107, 198, 0.12);
}

.utility-status {
  min-height: 18px;
  margin: 12px 0 0;
  color: #9b91a3;
  font-size: 10px;
}

.utility-status.is-error {
  color: #e88989;
}

.utility-status.is-success {
  color: #75cf9d;
}

.utility-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  gap: 8px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 36px;
  padding: 0 13px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
}

.primary-action {
  border: 1px solid rgba(190, 127, 255, 0.78);
  background: linear-gradient(145deg, #76419d, #3e2a4e);
  color: #fff;
}

.secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #1a191e;
  color: #c3bac9;
}

.primary-action svg,
.secondary-action svg {
  width: 15px;
  height: 15px;
}

.credit-summary {
  display: grid;
  margin-top: 14px;
  padding: 16px;
  grid-template-columns: 1fr auto;
  border: 1px solid rgba(229, 199, 141, 0.25);
  border-radius: 9px;
  background: #17140e;
  gap: 4px 10px;
}

.credit-summary span {
  color: #bdb1a0;
  font-size: 11px;
}

.credit-summary strong {
  color: #f1d697;
  font-family: Inter, sans-serif;
  font-size: 23px;
}

.credit-summary small {
  grid-column: 1 / -1;
  color: #897b67;
  font-size: 9px;
}

.account-dialog {
  width: min(480px, 100%);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: #0f0f12;
  gap: 3px;
}

.auth-tabs button {
  height: 34px;
  cursor: pointer;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #827a88;
  font-size: 11px;
  font-weight: 700;
}

.auth-tabs button.is-active {
  background: #29242f;
  color: #f1ecf4;
}

.auth-form {
  display: grid;
  margin-top: 16px;
  gap: 12px;
}

.auth-form label {
  display: grid;
  color: #c1b9c7;
  font-size: 11px;
  gap: 6px;
}

.auth-form > p,
.recharge-view > p {
  margin: 0;
  color: #8e8695;
  font-size: 11px;
  line-height: 1.65;
}

.auth-form-links {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.auth-form-links button,
.auth-back {
  display: inline-flex;
  width: max-content;
  padding: 0;
  cursor: pointer;
  align-items: center;
  border: 0;
  background: transparent;
  color: #bc8fe9;
  gap: 5px;
  font-size: 10px;
}

.auth-back svg {
  width: 13px;
  height: 13px;
}

.auth-submit,
.recharge-submit {
  width: 100%;
  min-height: 40px;
  margin-top: 2px;
}

.auth-submit[aria-busy="true"],
.recharge-submit[aria-busy="true"] {
  cursor: wait;
  opacity: 0.68;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 17px 0 13px;
  color: #706978;
  gap: 10px;
  font-size: 9px;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  content: "";
  flex: 1;
  background: rgba(255, 255, 255, 0.09);
}

.wechat-login {
  display: flex;
  width: 100%;
  min-height: 39px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(83, 203, 112, 0.36);
  border-radius: 7px;
  background: rgba(83, 203, 112, 0.06);
  color: #bfe9c8;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
}

.wechat-login svg {
  width: 16px;
  height: 16px;
}

.wechat-login:disabled {
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.1);
  background: #111114;
  color: #736d78;
}

.auth-channel-note {
  min-height: 14px;
  margin: 6px 0 0;
  color: #756e7b;
  font-size: 9px;
  text-align: center;
}

.auth-auxiliary {
  display: flex;
  margin-top: 10px;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.auth-auxiliary a,
.auth-auxiliary button {
  display: inline-flex;
  min-height: 30px;
  padding: 0 9px;
  cursor: pointer;
  align-items: center;
  border: 1px solid rgba(192, 132, 252, 0.3);
  border-radius: 6px;
  background: #18151d;
  color: #cba7eb;
  font-size: 9px;
}

.account-overview {
  display: grid;
  gap: 13px;
}

.account-identity {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.account-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(192, 132, 252, 0.38);
  border-radius: 50%;
  background: #2a2034;
  color: #ecdafa;
  font-family: Inter, sans-serif;
  font-size: 15px;
  font-weight: 800;
}

.account-identity > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.account-identity strong {
  overflow: hidden;
  color: #f0ecf2;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-identity small {
  overflow: hidden;
  color: #817986;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-identity > b {
  padding: 4px 7px;
  border: 1px solid rgba(192, 132, 252, 0.28);
  border-radius: 999px;
  color: #caa1ee;
  font-size: 9px;
  font-weight: 600;
}

.account-alert {
  padding: 9px 10px;
  border: 1px solid rgba(218, 169, 95, 0.28);
  border-radius: 7px;
  background: rgba(218, 169, 95, 0.06);
  color: #d5b680;
  font-size: 10px;
  line-height: 1.5;
}

.account-menu {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}

.account-menu button,
.account-menu a {
  display: grid;
  min-height: 56px;
  padding: 10px 11px;
  cursor: pointer;
  grid-template-columns: 20px minmax(0, 1fr) 15px;
  align-items: center;
  border: 0;
  background: #111114;
  color: #aaa2b0;
  gap: 9px;
  text-align: left;
}

.account-menu button + button,
.account-menu button + a,
.account-menu a + button {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.account-menu button:hover,
.account-menu a:hover {
  background: #18161c;
}

.account-menu svg {
  width: 16px;
  height: 16px;
}

.account-menu span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.account-menu strong {
  color: #e8e3eb;
  font-size: 11px;
}

.account-menu small {
  color: #7a7380;
  font-size: 9px;
}

.account-logout {
  justify-self: flex-start;
  margin-top: 2px;
}

.recharge-view {
  display: grid;
  gap: 13px;
}

.recharge-view h3 {
  margin: 1px 0 -7px;
  color: #f0ecf2;
  font-size: 18px;
}

.recharge-plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.recharge-plans .history-empty {
  min-height: 96px;
  grid-column: 1 / -1;
}

.recharge-plan {
  display: grid;
  min-height: 78px;
  padding: 10px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 7px;
  background: #111114;
  color: #8d8593;
  gap: 3px;
  text-align: left;
}

.recharge-plan strong {
  color: #f0d59b;
  font-family: Inter, sans-serif;
  font-size: 16px;
}

.recharge-plan span {
  color: #e8e3eb;
  font-size: 10px;
  font-weight: 700;
}

.recharge-plan small {
  font-size: 9px;
}

.recharge-plan.is-active {
  border-color: rgba(229, 199, 141, 0.62);
  background: #211c13;
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.payment-method {
  min-height: 34px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 6px;
  background: #111114;
  color: #8e8794;
  font-size: 9px;
}

.payment-method.is-active {
  border-color: rgba(192, 132, 252, 0.52);
  color: #e5d6f1;
}

.payment-method:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.payment-result {
  padding: 11px;
  border: 1px solid rgba(117, 207, 157, 0.24);
  border-radius: 7px;
  background: rgba(117, 207, 157, 0.05);
  color: #afcdbd;
  font-size: 10px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.payment-result img {
  display: block;
  width: min(180px, 100%);
  margin: 8px auto;
  border-radius: 6px;
  background: #fff;
}

.payment-result a {
  color: #d0a8f1;
  text-decoration: underline;
}

.history-drawer {
  position: fixed;
  z-index: 105;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  width: min(420px, 100vw);
  padding: 24px;
  transform: translateX(102%);
  flex-direction: column;
  background: #111114;
  box-shadow: -18px 0 60px rgba(0, 0, 0, 0.46);
  transition: transform 220ms ease;
}

.history-drawer.is-open {
  transform: translateX(0);
}

.history-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-drawer-head h2 {
  margin: 0;
  font-size: 24px;
}

.history-drawer-head .modal-close {
  position: static;
}

.history-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0 10px;
  color: #8c8491;
  font-size: 10px;
}

.history-toolbar button {
  display: inline-flex;
  min-height: 28px;
  padding: 0 8px;
  cursor: pointer;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  background: transparent;
  color: #bcb3c2;
  gap: 5px;
  font-size: 10px;
}

.history-toolbar svg {
  width: 13px;
  height: 13px;
}

.history-list {
  display: grid;
  overflow-y: auto;
  padding-right: 2px;
  gap: 9px;
}

.history-empty {
  display: grid;
  min-height: 220px;
  color: #817986;
  place-items: center;
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
}

.history-item {
  display: grid;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: #17161b;
  gap: 8px;
}

.history-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.history-item-title {
  overflow: hidden;
  color: #eeeaf0;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item-time {
  color: #7d7583;
  font-size: 9px;
}

.history-item-detail {
  color: #8d8593;
  font-size: 10px;
}

.history-item-status {
  display: inline-flex;
  min-height: 20px;
  padding: 0 7px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  color: #bcb2c2;
  font-size: 9px;
  white-space: nowrap;
}

.history-item-status.is-completed {
  border-color: rgba(117, 207, 157, 0.32);
  color: #75cf9d;
}

.history-item-status.is-failed {
  border-color: rgba(232, 137, 137, 0.34);
  color: #e88989;
}

.history-item-status.is-running,
.history-item-status.is-queued {
  border-color: rgba(192, 132, 252, 0.34);
  color: #c084fc;
}

.history-item-status.is-interrupted,
.history-item-status.is-cancelled {
  border-color: rgba(212, 170, 113, 0.36);
  color: #d4aa71;
}

@media (max-width: 1180px) {
  .workbench {
    grid-template-columns: minmax(340px, 390px) minmax(0, 1fr);
    width: calc(100% - 48px);
    gap: 16px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .ratio-block {
    grid-column: auto;
  }

  .header-banner {
    width: min(560px, calc(100% - 390px));
  }

  .banner-copy small {
    display: none;
  }
}

@media (min-width: 901px) {
  .mode-tabs {
    padding: 0 0.5px;
  }

  .prompt-editor {
    width: calc(100% - 3px);
    min-height: 140px;
    margin-left: 1.5px;
  }

  .image-field {
    margin-top: 18px;
    margin-bottom: 5px;
  }

  .frame-grid {
    padding: 0 1.5px;
    gap: 10px;
  }

  .settings-grid {
    grid-template-columns: 164px 1fr;
    margin: 0 0.5px;
  }

  .setting-block {
    height: 58px;
    min-height: 58px;
  }

  .segment,
  .ratio-button {
    height: 28px;
  }

  .ratio-block {
    height: 46px;
    min-height: 46px;
  }

  .ratio-block .setting-label {
    font-size: 11px;
  }

  .quantity-row {
    margin: -5px 0.5px 0;
  }

  .create-button {
    width: calc(100% - 1px);
    margin: -7px 0.5px 0;
  }
}

@media (max-width: 900px) {
  .workbench {
    grid-template-columns: 1fr;
    max-width: 680px;
  }

  .case-preview {
    max-width: none;
    margin-top: 28px;
  }

  .header-banner {
    display: none;
  }

  .mobile-banner-wrap {
    display: block;
    width: min(640px, calc(100% - 48px));
    height: 70px;
    margin: 8px auto 0;
  }

  .mobile-banner-wrap .banner-button {
    grid-template-columns: 76px 1fr auto;
  }

  .workbench {
    padding-top: 48px;
  }

  .settings-grid {
    grid-template-columns: 165px 1fr;
  }

  .ratio-block {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  :root {
    --gallery-row: calc((100vw - 47px) * 0.5625);
  }

  .site-header {
    padding: 0 16px;
  }

  .history-button {
    display: grid;
  }

  .brand {
    font-size: 15px;
  }

  .api-button {
    width: 76px;
  }

  .login-button {
    min-width: 88px;
    padding: 0 15px;
  }

  .mobile-banner-wrap {
    width: calc(100% - 37px);
    max-width: 680px;
    margin-right: auto;
    margin-left: 16px;
  }

  .mobile-banner-wrap .banner-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .mobile-banner-wrap .banner-copy strong {
    font-size: 10px;
  }

  .mobile-banner-wrap .banner-copy em {
    padding: 2px 8px;
    font-size: 9px;
  }

  .workbench {
    width: calc(100% - 37px);
    max-width: 680px;
    min-height: auto;
    margin-right: auto;
    margin-left: 16px;
    padding-top: 32px;
  }

  .composer {
    margin: 0 8px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    background: #111114;
  }

  .mode-tabs {
    gap: 10px;
  }

  .mode-button {
    height: 39px;
  }

  .prompt-editor {
    min-height: 142px;
    background: #111114;
  }

  .frame-slot {
    aspect-ratio: 1.65;
  }

  .frame-slot small {
    display: none;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .setting-block {
    border-color: rgba(255, 255, 255, 0.1);
    background: #18171a;
  }

  .ratio-block {
    grid-column: auto;
  }

  .segment.is-active,
  .ratio-button.is-active,
  .quantity-button.is-active {
    border-color: rgba(229, 199, 141, 0.72);
    background: linear-gradient(145deg, #655135, #30271b);
    color: #f6e6c6;
  }

  .duration-header strong {
    color: #e0bb78;
  }

  .duration-range {
    accent-color: #d6ad6a;
  }

  .create-button {
    background: linear-gradient(90deg, #e5c78d, #d6ad6a);
    color: #302313;
  }

  .create-button:disabled {
    background: #38363a;
    color: #868188;
  }

  .case-preview {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    background: #111114;
  }

  .hero-video-wrap {
    border-radius: 20px;
  }

  .case-strip {
    gap: 5px;
  }

  .case-thumb {
    border-radius: 6px;
  }

  .thumb-play {
    width: 25px;
    height: 25px;
  }

  .more-link {
    margin-top: 18px;
  }

  .pricing-section {
    width: calc(100% - 37px);
    margin-right: auto;
    margin-left: 16px;
    margin-top: 36px;
    padding: 30px 0 48px;
  }

  .section-rule {
    margin-bottom: 30px;
  }

  .pricing-intro {
    margin-bottom: 30px;
  }

  .pricing-intro h2 {
    font-size: 32px;
  }

  .pricing-intro > p:last-child {
    font-size: 12px;
  }

  .price-group {
    margin-top: 28px;
  }

  .price-group h3 {
    font-size: 20px;
  }

  .price-table {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .price-row {
    min-height: 0;
    margin-bottom: 12px;
    overflow: hidden;
    grid-template-columns: 1fr;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: #121116;
    box-shadow: 0 8px 0 rgba(0, 0, 0, 0.14);
  }

  .price-row > span {
    min-height: 96px;
    padding: 22px 24px;
  }

  .price-row > span + span {
    min-height: 136px;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 0;
  }

  .price-head {
    display: none;
  }

  .service {
    flex-wrap: wrap;
  }

  .service strong {
    font-size: 15px;
  }

  .service small {
    width: calc(100% - 36px);
    margin-top: -14px;
    margin-left: 36px;
  }

  .price b {
    font-size: 30px;
  }

  .price-footer {
    display: block;
    margin-top: 32px;
  }

  .advantages {
    display: grid;
    gap: 11px;
  }

  .buy-button {
    width: 100%;
    margin-top: 22px;
  }

  .examples-section {
    width: calc(100% - 37px);
    margin-right: auto;
    margin-left: 16px;
    padding: 78px 0 88px;
  }

  .examples-heading {
    margin-bottom: 34px;
  }

  .examples-heading h2 {
    margin-top: 18px;
    font-size: 34px;
    line-height: 1.08;
  }

  .examples-heading > p:last-child {
    font-size: 12px;
    line-height: 1.7;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .prompt-pill {
    min-height: 34px;
    opacity: 1;
    transform: none;
  }

  .modal {
    padding: 16px;
  }

  .modal-dialog {
    max-height: calc(100dvh - 32px);
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .modal-dialog > :is(img, video) {
    min-height: 0;
    max-height: 52dvh;
  }

  .modal-copy {
    min-height: 260px;
    padding: 68px 20px 20px;
  }

  .modal-copy .quality-badge {
    left: 20px;
  }

  .utility-dialog {
    width: calc(100% - 4px);
    padding: 24px 20px 20px;
  }

  .engine-mode {
    grid-template-columns: 1fr;
  }

  .history-drawer {
    width: 100%;
    padding: 20px 16px;
  }
}

@media (max-width: 420px) {
  .header-actions {
    gap: 5px;
  }

  .api-button {
    width: 76px;
  }

  .login-button {
    min-width: 86px;
  }

  .composer {
    padding: 18px;
  }

  .image-heading {
    display: block;
    margin-bottom: 10px;
  }

  .image-heading .field-hint {
    display: block;
    margin-top: 6px;
  }

  .ratio-options {
    gap: 0;
  }

  .ratio-button {
    font-size: 8px;
  }

  .case-preview {
    padding: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Motion system: short feedback, softer arrival, and compositor-safe transforms. */
:root {
  --motion-fast: 140ms;
  --motion-base: 220ms;
  --motion-slow: 320ms;
  --ease-decelerate: cubic-bezier(.2, .7, .2, 1);
  --ease-accelerate: cubic-bezier(.4, 0, 1, 1);
}

.motion-ready .site-header {
  animation: public-header-enter var(--motion-base) var(--ease-decelerate) both;
  will-change: opacity, transform;
}

.motion-ready .workbench {
  animation: public-workbench-enter var(--motion-slow) var(--ease-decelerate) both;
  will-change: opacity, transform;
}

.mode-button,
.segment,
.ratio-button,
.quantity-button,
.frame-slot,
.create-button,
.primary-action,
.secondary-action,
.video-icon-button,
.modal-close,
.theme-button,
.history-toolbar button,
.account-menu button,
.account-menu a,
.recharge-plan,
.payment-method,
.banner-button {
  transition-property: transform, border-color, background-color, color, box-shadow, opacity;
  transition-duration: var(--motion-fast);
  transition-timing-function: var(--ease-decelerate);
}

.mode-button:active,
.segment:active,
.ratio-button:active:not(:disabled),
.quantity-button:active,
.frame-slot:active,
.create-button:active:not(:disabled),
.primary-action:active:not(:disabled),
.secondary-action:active:not(:disabled),
.video-icon-button:active,
.modal-close:active,
.theme-button:active,
.history-toolbar button:active,
.account-menu button:active,
.account-menu a:active,
.recharge-plan:active,
.payment-method:active,
.banner-button:active {
  transform: scale(.98);
}

.frame-slot > * {
  transition: transform var(--motion-base) var(--ease-decelerate), opacity var(--motion-fast) var(--ease-decelerate);
}

.case-thumb {
  transition: transform var(--motion-fast) var(--ease-decelerate), border-color var(--motion-fast) var(--ease-decelerate), box-shadow var(--motion-fast) var(--ease-decelerate);
}

.case-preview.is-switching .hero-video-wrap {
  animation: public-preview-switch 320ms var(--ease-decelerate) both;
  will-change: opacity, transform;
}

.gallery-card :is(img, video) {
  transition: transform 360ms var(--ease-decelerate), filter var(--motion-base) var(--ease-decelerate);
}

.prompt-pill,
.toast {
  transition-duration: var(--motion-fast);
  transition-timing-function: var(--ease-decelerate);
}

.modal-dialog,
.utility-dialog {
  transform: translateY(8px) scale(.985);
  transition: transform var(--motion-base) var(--ease-decelerate);
  will-change: transform;
}

.modal.is-open .modal-dialog,
.modal.is-open .utility-dialog {
  transform: translateY(0) scale(1);
}

.modal-backdrop {
  opacity: 0;
  transition: opacity var(--motion-base) var(--ease-decelerate);
}

.modal.is-open .modal-backdrop {
  opacity: 1;
}

.history-drawer {
  transition: transform var(--motion-base) var(--ease-decelerate);
}

.auth-form:not([hidden]),
.recharge-view:not([hidden]) {
  animation: public-panel-enter var(--motion-fast) var(--ease-decelerate) both;
}

.history-list .history-item {
  animation: public-list-enter var(--motion-base) var(--ease-decelerate) both;
}

.history-list .history-item:nth-child(2) { animation-delay: 30ms; }
.history-list .history-item:nth-child(3) { animation-delay: 60ms; }
.history-list .history-item:nth-child(4) { animation-delay: 90ms; }

@keyframes public-header-enter {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes public-workbench-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes public-preview-switch {
  from { opacity: .72; transform: translateY(3px) scale(.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes public-panel-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes public-list-enter {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .motion-ready .site-header,
  .motion-ready .workbench,
  .case-preview.is-switching .hero-video-wrap,
  .auth-form:not([hidden]),
  .recharge-view:not([hidden]),
  .history-list .history-item {
    animation: none !important;
  }

  .modal-dialog,
  .utility-dialog,
  .modal-backdrop {
    transform: none !important;
    transition: none !important;
  }
}

/* Light surfaces keep the tool calm and work-focused while media stays cinematic. */
.theme-button:focus-visible {
  outline: 2px solid rgba(105, 80, 190, 0.58);
  outline-offset: 2px;
}
:root[data-theme="light"] .app-shell {
  scrollbar-color: #b9c1cf transparent;
}

:root[data-theme="light"] .app-shell::-webkit-scrollbar-thumb {
  background: #b9c1cf;
}

:root[data-theme="light"] .site-header {
  border-bottom-color: rgba(34, 41, 57, 0.1);
  box-shadow: 0 1px 0 rgba(34, 41, 57, 0.03);
  backdrop-filter: blur(14px);
}

:root[data-theme="light"] .history-button,
:root[data-theme="light"] .theme-button {
  border-color: #d8dde7;
  background: #ffffff;
  color: #5d687c;
}

:root[data-theme="light"] .history-button:hover,
:root[data-theme="light"] .theme-button:hover {
  border-color: #a897e3;
  background: #f8f6ff;
  color: #5d42b3;
}

:root[data-theme="light"] .api-button {
  border-color: #cbc1f4;
  background: #f7f5ff;
  color: #5b42a6;
}

:root[data-theme="light"] .login-button {
  border-color: #2c3343;
  background: #242a3a;
  color: #ffffff;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.16);
}

:root[data-theme="light"] .banner-button {
  border-color: #e5dccd;
  background: #fffdf8;
  color: #3d3428;
  box-shadow: 0 6px 18px rgba(43, 38, 28, 0.08), inset 0 -2px 0 rgba(169, 124, 43, 0.08);
}

:root[data-theme="light"] .banner-button::before {
  background: radial-gradient(circle, rgba(169, 124, 43, 0.12), transparent 68%);
}

:root[data-theme="light"] .banner-copy strong { color: #5c4528; }
:root[data-theme="light"] .banner-copy em { border-color: #edd59a; background: #f8e7bd; color: #5a421d; }
:root[data-theme="light"] .banner-copy small,
:root[data-theme="light"] .banner-arrow { color: #8b661f; }

:root[data-theme="light"] .composer {
  border: 1px solid #e0e4ec;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(34, 42, 57, 0.06);
}

:root[data-theme="light"] .mode-button {
  border-color: #dde1e9;
  background: #f8f9fc;
  color: #6b7280;
}

:root[data-theme="light"] .mode-button:hover {
  border-color: #c9c2e9;
  color: #4c3a8e;
}

:root[data-theme="light"] .mode-button.is-active {
  border-color: #b7a8e9;
  background: #f1edff;
  color: #4f3a9c;
}

:root[data-theme="light"] .field-heading label,
:root[data-theme="light"] .setting-label { color: #252b38; }
:root[data-theme="light"] .field-hint { color: #798398; }

:root[data-theme="light"] .prompt-editor {
  border-color: #dce1eb;
  background: #ffffff;
  color: #252b38;
  box-shadow: 0 1px 1px rgba(31, 38, 52, 0.02);
}

:root[data-theme="light"] .prompt-editor:empty::before { color: #9aa3b3; }
:root[data-theme="light"] .prompt-editor:focus { border-color: #9e8ae1; box-shadow: 0 0 0 3px rgba(117, 81, 209, 0.12); }
:root[data-theme="light"] .char-count { color: #8d96a7; }

:root[data-theme="light"] .frame-slot {
  border-color: #cbd2df;
  background: #fbfcfe;
  color: #6e788c;
}

:root[data-theme="light"] .frame-slot:hover { border-color: #9f8ce2; background: #f7f5ff; }
:root[data-theme="light"] .frame-slot small { color: #8d96a7; }

:root[data-theme="light"] .setting-block,
:root[data-theme="light"] .quantity-row {
  border-color: #e0e4ec;
  background: #fbfcfe;
}

:root[data-theme="light"] .segment,
:root[data-theme="light"] .ratio-button,
:root[data-theme="light"] .quantity-button { color: #667085; }
:root[data-theme="light"] .segment.is-active,
:root[data-theme="light"] .ratio-button.is-active,
:root[data-theme="light"] .quantity-button.is-active {
  border-color: #b6a6e8;
  background: #eeeaff;
  color: #503b9e;
}

:root[data-theme="light"] .ratio-button:hover:not(:disabled) { color: #4d3c91; }
:root[data-theme="light"] .ratio-button.is-disabled { color: #a8afbd; }
:root[data-theme="light"] .duration-header strong { color: #6d4fc4; }
:root[data-theme="light"] .duration-range { accent-color: #7551d1; }
:root[data-theme="light"] .range-labels { color: #8993a5; }
:root[data-theme="light"] .create-button:disabled { background: #d9dee7; color: #7b8494; }
:root[data-theme="light"] .create-button { border-color: var(--accent); background: linear-gradient(135deg, #6530ba, #914abb); color: #ffffff; box-shadow: 0 8px 22px rgba(98, 48, 183, 0.2); }

:root[data-theme="light"] .engine-status { color: #647084; }
:root[data-theme="light"] .engine-status button { color: #6348b5; }
:root[data-theme="light"] .job-card { border-color: #e0e4ec; background: #ffffff; }
:root[data-theme="light"] .job-card-title { color: #28303e; }
:root[data-theme="light"] .job-card-meta { color: #7e8798; }
:root[data-theme="light"] .job-progress-track { background: #e9edf3; }
:root[data-theme="light"] .job-card-actions button,
:root[data-theme="light"] .job-card-actions a { border-color: #d9dee8; background: #ffffff; color: #5f6b7d; }

:root[data-theme="light"] .case-preview {
  border-color: #e0e4ec;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(34, 42, 57, 0.06);
}

:root[data-theme="light"] .case-strip { border-color: #e5e8ef; }
:root[data-theme="light"] .case-thumb { border-color: #e1e5ed; background: #eef1f6; }
:root[data-theme="light"] .case-thumb.is-active { border-color: #8c70e1; box-shadow: 0 0 0 2px rgba(117, 81, 209, 0.14); }
:root[data-theme="light"] .more-link { color: #5f6370; }
:root[data-theme="light"] .more-link:hover { color: #573eb0; }

:root[data-theme="light"] .section-rule { background: #e2e6ee; }
:root[data-theme="light"] .pricing-section { background: transparent; }
:root[data-theme="light"] .eyebrow { color: #7551d1; }
:root[data-theme="light"] .pricing-intro h2,
:root[data-theme="light"] .examples-heading h2 { color: #252b38; }
:root[data-theme="light"] .pricing-intro > p:last-child,
:root[data-theme="light"] .examples-heading > p:last-child { color: #657085; }
:root[data-theme="light"] .price-group h3 { color: #5d4626; }
:root[data-theme="light"] .price-group h3::before { border-left-color: #c39a57; background: #fbf6ed; }
:root[data-theme="light"] .price-table { border-color: #eadfca; background: #fffdfa; box-shadow: 0 7px 20px rgba(59, 48, 30, 0.05); }
:root[data-theme="light"] .price-row { border-bottom-color: #eee5d5; }
:root[data-theme="light"] .price-head { background: #fbf7ef; color: #9a7a49; }
:root[data-theme="light"] .price-row > span + span { border-left-color: #eadfca; }
:root[data-theme="light"] .price-row > span + span { background: #fff7ed; }
:root[data-theme="light"] .service strong { color: #2b313e; }
:root[data-theme="light"] .service small,
:root[data-theme="light"] .price small,
:root[data-theme="light"] .price-note { color: #7d8491; }
:root[data-theme="light"] .service svg,
:root[data-theme="light"] .info-dot,
:root[data-theme="light"] .price b { color: #9a712c; }
:root[data-theme="light"] .info-dot { border-color: #dcc38e; background: #fff9ec; }
:root[data-theme="light"] .advantages { color: #526071; }
:root[data-theme="light"] .buy-button { border-color: #9d7a47; background: #2c3343; color: #ffffff; box-shadow: 0 6px 16px rgba(35, 42, 57, 0.16); }

:root[data-theme="light"] .gallery-card > button { background: #eef1f5; }
:root[data-theme="light"] .prompt-pill { border-color: #e1d9f9; background: rgba(255, 255, 255, 0.95); color: #503c92; box-shadow: 0 8px 22px rgba(47, 42, 67, 0.12); }

:root[data-theme="light"] .toast { border-color: #dce1ea; background: rgba(255, 255, 255, 0.96); color: #313846; box-shadow: 0 12px 36px rgba(34, 42, 57, 0.16); }
:root[data-theme="light"] .modal-backdrop { background: rgba(31, 36, 49, 0.42); }
:root[data-theme="light"] .modal-dialog,
:root[data-theme="light"] .utility-dialog { border-color: #dce1ea; background: #ffffff; color: #29303e; box-shadow: 0 28px 90px rgba(25, 31, 43, 0.26); }
:root[data-theme="light"] .utility-dialog h2,
:root[data-theme="light"] .service-status-row strong,
:root[data-theme="light"] .engine-mode-button span,
:root[data-theme="light"] .account-identity strong,
:root[data-theme="light"] .account-menu strong,
:root[data-theme="light"] .recharge-view h3 { color: var(--text-strong); }
:root[data-theme="light"] .modal-copy p,
:root[data-theme="light"] .utility-description { color: #6c7687; }
:root[data-theme="light"] .modal-close { border-color: #d9dfe8; background: #f8f9fc; color: #5e687a; }
:root[data-theme="light"] .use-prompt-button,
:root[data-theme="light"] .primary-action { border-color: #6950be; background: #6249b2; color: #ffffff; }
:root[data-theme="light"] .secondary-action { border-color: #d7dce6; background: #ffffff; color: #4f5c70; }

:root[data-theme="light"] .utility-fields input,
:root[data-theme="light"] .account-name-field input,
:root[data-theme="light"] .auth-form input { border-color: #d6dce7; background: #ffffff; color: #252b38; }
:root[data-theme="light"] .utility-fields input:focus,
:root[data-theme="light"] .account-name-field input:focus,
:root[data-theme="light"] .auth-form input:focus { border-color: #9d89df; box-shadow: 0 0 0 3px rgba(117, 81, 209, 0.12); }
:root[data-theme="light"] .credit-summary { border-color: #ecdcb3; background: #fffaf0; }
:root[data-theme="light"] .credit-summary strong { color: #73501c; }
:root[data-theme="light"] .auth-tabs { border-color: #e0e4ec; background: #f8f9fc; }
:root[data-theme="light"] .auth-tabs button { color: #788398; }
:root[data-theme="light"] .auth-tabs button.is-active { border-color: #c7b9f1; background: #ffffff; color: #513c9d; }
:root[data-theme="light"] .auth-form label,
:root[data-theme="light"] .auth-form > p,
:root[data-theme="light"] .recharge-view > p { color: #697487; }
:root[data-theme="light"] .auth-form label { color: #303847; }
:root[data-theme="light"] .auth-divider { color: #929bab; }
:root[data-theme="light"] .auth-divider::before,
:root[data-theme="light"] .auth-divider::after { background: #e2e6ed; }
:root[data-theme="light"] .wechat-login { border-color: #dbe2e9; background: #f9fbfc; color: #49646d; }
:root[data-theme="light"] .account-menu button,
:root[data-theme="light"] .account-menu a { border-bottom-color: #e6e9ef; color: #2e3543; }
:root[data-theme="light"] .account-menu button:hover,
:root[data-theme="light"] .account-menu a:hover { background: #f7f8fb; }
:root[data-theme="light"] .account-menu small,
:root[data-theme="light"] .account-identity small { color: #7b8698; }
:root[data-theme="light"] .account-identity > b { border-color: #dcd3fa; background: #f3efff; color: #6148ad; }
:root[data-theme="light"] .account-avatar { border-color: var(--accent-border); background: var(--accent-surface); color: var(--accent); }
:root[data-theme="light"] .account-alert { border-color: #ecdcb3; background: #fffaf0; color: var(--warm-text); }
:root[data-theme="light"] .recharge-plan,
:root[data-theme="light"] .payment-method { border-color: #dfe4ec; background: #fbfcfe; color: #394252; }
:root[data-theme="light"] .recharge-plan.is-active,
:root[data-theme="light"] .payment-method.is-active { border-color: var(--accent-border); background: var(--accent-surface); color: #513c9d; }
:root[data-theme="light"] .payment-result { border-color: #dcd4f7; background: #f8f6ff; color: #544581; }

:root[data-theme="light"] .history-drawer { border-left-color: #dfe4ec; background: #ffffff; box-shadow: -18px 0 60px rgba(29, 37, 51, 0.16); }
:root[data-theme="light"] .history-drawer-head { border-bottom-color: #e5e8ef; }
:root[data-theme="light"] .history-drawer-head h2,
:root[data-theme="light"] .history-item-title { color: #2d3442; }
:root[data-theme="light"] .history-toolbar { border-bottom-color: #e5e8ef; }
:root[data-theme="light"] .history-toolbar button { border-color: #d8dee8; background: #ffffff; color: #566276; }
:root[data-theme="light"] .history-item { border-color: #e2e6ed; background: #fbfcfe; }
:root[data-theme="light"] .history-item-time,
:root[data-theme="light"] .history-item-detail,
:root[data-theme="light"] .history-empty { color: #7b8596; }

@media (max-width: 640px) {
  :root[data-theme="light"] .site-header { background: rgba(255, 255, 255, 0.97); }
}

@media (max-width: 360px) {
  .site-header { padding-right: 10px; padding-left: 10px; }
  .header-actions { gap: 6px; }
  .history-button,
  .theme-button { width: 36px; height: 36px; }
  .login-button { min-width: 78px; height: 36px; padding-right: 9px; padding-left: 9px; font-size: 12px; }
}

/* Responsive rhythm: keep controls breathable without introducing overflow. */
.composer { gap: 18px; }
.field-heading { margin-bottom: 10px; }
.image-field { margin-top: 14px; }
.frame-grid { gap: 12px; }
.settings-grid { gap: 12px; }
.setting-block { min-height: 62px; padding: 9px 12px; }
.quantity-row { min-height: 46px; padding: 5px; gap: 6px; }
.create-button { min-height: 48px; }

@media (max-width: 900px) {
  .workbench { gap: 22px; }
  .case-preview { margin-top: 24px; }
}

@media (max-width: 760px) {
  .site-header { padding-inline: 16px; }
  .header-actions { gap: 9px; }
  .mobile-banner-wrap,
  .workbench,
  .pricing-section { width: calc(100% - 32px); margin-left: 16px; margin-right: 16px; }
  .workbench { padding-top: 40px; }
  .composer { margin: 0; padding: 22px 20px; gap: 20px; }
  .mode-tabs { gap: 12px; }
  .frame-grid { gap: 12px; }
  .setting-block { min-height: 64px; }
  .ratio-options { gap: 4px; }
  .ratio-button { height: 32px; }
  .quantity-row { min-height: 48px; }
  .create-button { min-height: 50px; }
  .case-preview { margin-top: 24px; padding: 18px; }
  .pricing-section { margin-top: 48px; }
}

@media (max-width: 420px) {
  .header-actions { gap: 8px; }
  .composer { padding: 20px 16px; }
  .mode-tabs { gap: 10px; }
  .frame-grid { gap: 10px; }
  .setting-block { padding-inline: 10px; }
  .ratio-options { gap: 2px; }
  .ratio-button { font-size: 9px; }
  .case-preview { padding: 14px; }
}

/* Narrow layouts keep the creation controls readable instead of compressing every row. */
@media (max-width: 540px) {
  .mobile-banner-wrap,
  .workbench,
  .pricing-section,
  .examples-section {
    width: calc(100% - 32px);
    margin-right: 16px;
    margin-left: 16px;
  }

  .mobile-banner-wrap { height: 64px; margin-top: 8px; }
  .mobile-banner-wrap .banner-button { grid-template-columns: 64px minmax(0, 1fr) auto; padding-right: 10px; }
  .mobile-banner-wrap .banner-button img { width: 62px; height: 52px; }
  .mobile-banner-wrap .banner-copy { min-width: 0; overflow: hidden; }
  .mobile-banner-wrap .banner-copy strong,
  .mobile-banner-wrap .banner-copy em { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

  .workbench { padding-top: 24px; gap: 24px; }
  .composer { margin: 0; padding: 16px; gap: 18px; }
  .mode-tabs { gap: 8px; }
  .field-heading { margin-bottom: 9px; }
  .frame-grid,
  .settings-grid { gap: 10px; }
  .setting-block { min-height: 56px; padding: 9px 10px; }
  .case-preview { margin-top: 0; padding: 12px; }
  .case-strip { gap: 8px; }
  .pricing-section { margin-top: 32px; }
  .examples-section { padding-top: 64px; }
}

@media (max-width: 400px) {
  .site-header { padding-right: 12px; padding-left: 12px; }
  .header-actions { gap: 6px; }
  .history-button,
  .theme-button { width: 36px; height: 36px; }
  .login-button { min-width: 82px; height: 36px; padding-right: 10px; padding-left: 10px; font-size: 12px; }
  .composer { padding: 14px; gap: 16px; }
  .ratio-block { min-height: auto; gap: 8px; }
  .ratio-options { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .ratio-button { height: 30px; font-size: 10px; }
  .quantity-row { min-height: 44px; }
  .case-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .price-row > span { padding: 18px 16px; }
}

/* --------------------------------------------------------------------------
   Studio system refresh
   Adapted from the 21st.dev component language: command bars, animated tabs,
   upload cards and cinematic media stages. Kept framework-free so the existing
   creator interactions and stable DOM ids remain intact.
   -------------------------------------------------------------------------- */
:root {
  --studio-bg: #090b10;
  --studio-bg-raised: #0f1219;
  --studio-surface: rgba(18, 22, 31, 0.9);
  --studio-surface-strong: #151a24;
  --studio-surface-soft: rgba(255, 255, 255, 0.045);
  --studio-line: rgba(255, 255, 255, 0.105);
  --studio-line-strong: rgba(255, 255, 255, 0.17);
  --studio-ink: #f7f8fb;
  --studio-muted: #929baa;
  --studio-faint: #687181;
  --studio-accent: #9a7bff;
  --studio-accent-2: #62d7c5;
  --studio-accent-soft: rgba(154, 123, 255, 0.16);
  --studio-warm: #f0c777;
  --studio-danger: #ee8f9f;
  --studio-radius-xl: 28px;
  --studio-radius-lg: 20px;
  --studio-radius-md: 15px;
  --studio-shadow: 0 22px 70px rgba(0, 0, 0, 0.27);
  --studio-ease: cubic-bezier(.22, 1, .36, 1);
}

:root[data-theme="light"] {
  --studio-bg: #f4f6fa;
  --studio-bg-raised: #edf1f6;
  --studio-surface: rgba(255, 255, 255, 0.9);
  --studio-surface-strong: #ffffff;
  --studio-surface-soft: rgba(56, 69, 92, 0.045);
  --studio-line: rgba(42, 53, 72, 0.12);
  --studio-line-strong: rgba(42, 53, 72, 0.2);
  --studio-ink: #18202c;
  --studio-muted: #667285;
  --studio-faint: #8c97a8;
  --studio-accent: #6d52d7;
  --studio-accent-2: #159d8c;
  --studio-accent-soft: rgba(109, 82, 215, 0.11);
  --studio-warm: #986d1f;
  --studio-shadow: 0 24px 70px rgba(46, 60, 85, 0.12);
}

html,
body {
  background: var(--studio-bg);
  color: var(--studio-ink);
}

body {
  overflow: hidden;
}

.app-shell {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 78% 7%, rgba(124, 102, 255, 0.12), transparent 27rem),
    radial-gradient(circle at 12% 38%, rgba(65, 214, 188, 0.055), transparent 22rem),
    var(--studio-bg);
}

.app-shell::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: 0.16;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
}

:root[data-theme="light"] .app-shell::before {
  opacity: 0.42;
  background-image: linear-gradient(rgba(75, 92, 120, .034) 1px, transparent 1px), linear-gradient(90deg, rgba(75, 92, 120, .034) 1px, transparent 1px);
}

.site-header {
  height: 76px;
  padding: 0 clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--studio-line);
  background: color-mix(in srgb, var(--studio-bg) 76%, transparent);
  backdrop-filter: blur(22px) saturate(140%);
}

.brand {
  height: 40px;
  gap: 10px;
  color: var(--studio-ink);
  font-size: 16px;
  letter-spacing: .12em;
  text-decoration: none;
}

.brand::before {
  display: none;
}

.brand::after {
  display: none;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--studio-accent) 40%, var(--studio-line));
  border-radius: 9px;
  background: linear-gradient(145deg, var(--studio-accent-soft), color-mix(in srgb, var(--studio-surface) 82%, transparent));
  color: var(--studio-accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.08em;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1;
}

.header-banner {
  position: static;
  width: min(560px, 54vw);
  height: 44px;
  margin: 0;
  transform: none;
}

.banner-button {
  display: flex;
  grid-template-columns: none;
  height: 44px;
  min-height: 44px;
  padding: 0 13px 0 10px;
  gap: 10px;
  border: 1px solid var(--studio-line);
  border-radius: 14px;
  background: linear-gradient(100deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  color: var(--studio-ink);
  box-shadow: 0 12px 34px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.05);
}

.banner-button:hover {
  border-color: color-mix(in srgb, var(--studio-accent) 55%, var(--studio-line));
  background: linear-gradient(100deg, rgba(154,123,255,.12), rgba(255,255,255,.035));
  transform: translateY(-1px);
}

.banner-button img {
  width: 35px;
  height: 35px;
  transform: rotate(-5deg);
}

.banner-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  overflow: hidden;
}

.banner-copy strong {
  overflow: hidden;
  color: var(--studio-ink);
  font-size: 11px;
  text-overflow: ellipsis;
}

.banner-copy em {
  flex: 0 0 auto;
  border: 1px solid rgba(240,199,119,.45);
  background: rgba(240,199,119,.14);
  color: var(--studio-warm);
  font-size: 10px;
}

.banner-copy small {
  overflow: hidden;
  color: var(--studio-muted);
  font-size: 10px;
  text-overflow: ellipsis;
}

.banner-arrow {
  margin-left: auto;
  color: var(--studio-muted);
}

.header-actions {
  gap: 8px;
}

.site-header :is(a, button):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--studio-accent) 78%, #fff);
  outline-offset: 3px;
}

.history-button,
.theme-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--studio-line);
  border-radius: 20px;
  background: var(--studio-surface-soft);
  color: var(--studio-muted);
}

.history-button:hover,
.theme-button:hover {
  border-color: color-mix(in srgb, var(--studio-accent) 55%, var(--studio-line));
  background: var(--studio-accent-soft);
  color: var(--studio-ink);
}

.api-button,
.login-button {
  height: 40px;
  border-radius: 20px;
}

.api-button {
  width: auto;
  min-width: 92px;
  padding: 0 14px;
  border: 1px solid var(--studio-line);
  background: var(--studio-surface-soft);
  color: var(--studio-muted);
  font-size: 11px;
}

.api-button:hover {
  border-color: var(--studio-line-strong);
  background: var(--studio-accent-soft);
  color: var(--studio-ink);
}

.login-button {
  min-width: 104px;
  padding: 0 17px;
  border: 0;
  background: linear-gradient(135deg, var(--studio-accent), #6f58d8 62%, #4acdb7);
  color: #fff;
  box-shadow: 0 8px 24px rgba(109,82,215,.24);
}

.login-button:hover {
  box-shadow: 0 12px 30px rgba(109,82,215,.34);
  transform: translateY(-2px);
}

.workbench {
  grid-template-columns: minmax(360px, .8fr) minmax(0, 1.2fr);
  width: min(1360px, calc(100% - 64px));
  max-width: none;
  min-height: 0;
  margin: 0 auto;
  padding: 48px 0 30px;
  gap: 28px;
  align-items: start;
}

.composer {
  position: relative;
  display: flex;
  min-width: 0;
  padding: 24px;
  gap: 22px;
  border: 1px solid var(--studio-line);
  border-radius: var(--studio-radius-xl);
  background: linear-gradient(145deg, var(--studio-surface), rgba(255,255,255,.018));
  box-shadow: var(--studio-shadow), inset 0 1px 0 rgba(255,255,255,.055);
  overflow: hidden;
}

.composer::before {
  position: absolute;
  top: 0;
  right: 12%;
  left: 12%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--studio-accent), transparent);
  opacity: .8;
}

.mode-tabs {
  display: flex;
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--studio-line);
  border-radius: 15px;
  background: var(--studio-surface-soft);
}

.mode-button {
  height: 36px;
  min-width: 116px;
  padding: 0 15px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--studio-muted);
  font-size: 12px;
  font-weight: 650;
}

.mode-button:hover {
  border-color: transparent;
  background: rgba(255,255,255,.06);
  color: var(--studio-ink);
}

.mode-button.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--studio-accent-soft), rgba(98,215,197,.1));
  color: var(--studio-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--studio-accent) 38%, transparent), 0 4px 14px rgba(0,0,0,.12);
}

.field-heading {
  min-height: 24px;
  margin-bottom: 9px;
}

.field-heading label,
.setting-label {
  color: var(--studio-ink);
  font-size: 12px;
  letter-spacing: .01em;
}

.field-hint {
  color: var(--studio-faint);
  font-size: 10px;
}

.prompt-editor {
  min-height: 176px;
  padding: 18px 18px 36px;
  border: 1px solid var(--studio-line);
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(255,255,255,.048), rgba(255,255,255,.018));
  color: var(--studio-ink);
  font-size: 13px;
  line-height: 1.8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

.prompt-editor:hover {
  border-color: var(--studio-line-strong);
}

.prompt-editor:focus {
  border-color: color-mix(in srgb, var(--studio-accent) 75%, var(--studio-line));
  box-shadow: 0 0 0 4px var(--studio-accent-soft), inset 0 1px 0 rgba(255,255,255,.05);
}

.prompt-editor:empty::before {
  color: var(--studio-faint);
}

.char-count {
  right: 16px;
  bottom: 12px;
  color: var(--studio-faint);
  font-family: Inter, sans-serif;
  font-size: 10px;
}

.image-field {
  margin-top: 0;
}

.image-heading .field-hint {
  display: inline;
}

.frame-grid {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.frame-slot {
  min-height: 104px;
  aspect-ratio: 1.55;
  border: 1px dashed color-mix(in srgb, var(--studio-accent) 38%, var(--studio-line-strong));
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(154,123,255,.075), rgba(255,255,255,.02));
  color: var(--studio-muted);
  gap: 7px;
}

.frame-slot:hover {
  border-color: var(--studio-accent);
  background: linear-gradient(145deg, var(--studio-accent-soft), rgba(98,215,197,.06));
  color: var(--studio-ink);
  transform: translateY(-2px);
}

.frame-slot svg {
  width: 20px;
  height: 20px;
  color: var(--studio-accent-2);
}

.frame-slot strong {
  font-size: 11px;
}

.frame-slot small {
  display: block;
  color: var(--studio-faint);
  font-size: 10px;
}

.settings-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.setting-block {
  min-height: 80px;
  padding: 13px;
  align-items: stretch;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--studio-line);
  border-radius: 17px;
  background: var(--studio-surface-soft);
}

.resolution-block {
  gap: 10px;
}

.segmented {
  width: 100%;
  flex: 0 0 auto;
  gap: 4px;
}

.segment {
  flex: 1;
  min-width: 0;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 18px;
  color: var(--studio-muted);
}

.segment.is-active {
  border-color: color-mix(in srgb, var(--studio-accent) 55%, transparent);
  background: var(--studio-accent-soft);
  color: var(--studio-ink);
}

.duration-block {
  display: flex;
  padding: 13px;
}

.duration-header strong {
  color: var(--studio-accent-2);
  font-family: Inter, sans-serif;
  font-size: 11px;
}

.duration-range {
  height: 4px;
  margin: 0;
  accent-color: var(--studio-accent);
}

.range-labels {
  color: var(--studio-faint);
  font-size: 9px;
}

.ratio-block {
  grid-column: 1 / -1;
  min-height: 68px;
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

.ratio-options {
  gap: 4px;
}

.ratio-button {
  height: 32px;
  border: 1px solid transparent;
  border-radius: 18px;
  color: var(--studio-muted);
  font-size: 10px;
}

.ratio-button:hover:not(:disabled) {
  background: rgba(255,255,255,.06);
  color: var(--studio-ink);
}

.ratio-button.is-active {
  border-color: color-mix(in srgb, var(--studio-accent) 55%, transparent);
  background: var(--studio-accent-soft);
  color: var(--studio-ink);
}

.quantity-row {
  min-height: 48px;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--studio-line);
  border-radius: 15px;
  background: var(--studio-surface-soft);
}

.quantity-button {
  min-height: 38px;
  border-radius: 11px;
  color: var(--studio-muted);
  font-size: 11px;
}

.quantity-button.is-active {
  border-color: color-mix(in srgb, var(--studio-accent) 55%, transparent);
  background: linear-gradient(135deg, var(--studio-accent-soft), rgba(98,215,197,.08));
  color: var(--studio-ink);
}

.create-button {
  position: relative;
  min-height: 56px;
  overflow: hidden;
  border-radius: 17px;
  background: linear-gradient(110deg, #7a5ce4 0%, #a875ff 45%, #4ccdb8 100%);
  color: #fff;
  font-size: 13px;
  letter-spacing: .01em;
  box-shadow: 0 14px 34px rgba(109,82,215,.27), inset 0 1px 0 rgba(255,255,255,.22);
}

.create-button::before {
  position: absolute;
  top: -40%;
  left: -30%;
  width: 25%;
  height: 180%;
  content: "";
  transform: rotate(18deg);
  background: rgba(255,255,255,.22);
  filter: blur(8px);
  transition: left .65s var(--studio-ease);
}

.create-button:hover:not(:disabled)::before {
  left: 115%;
}

.create-button:hover:not(:disabled) {
  box-shadow: 0 18px 42px rgba(109,82,215,.36), inset 0 1px 0 rgba(255,255,255,.26);
  transform: translateY(-2px);
}

.create-button:disabled {
  background: var(--studio-surface-strong);
  color: var(--studio-faint);
  box-shadow: none;
}

.engine-status {
  min-height: 28px;
  padding: 0 2px;
  color: var(--studio-muted);
  font-size: 10px;
}

.engine-status button {
  color: var(--studio-accent);
  font-size: 10px;
}

.engine-dot {
  width: 7px;
  height: 7px;
  background: var(--studio-accent-2);
  box-shadow: 0 0 0 4px rgba(98,215,197,.12), 0 0 16px rgba(98,215,197,.45);
}

.active-jobs {
  gap: 8px;
}

.job-card {
  padding: 12px;
  border: 1px solid var(--studio-line);
  border-radius: 15px;
  background: var(--studio-surface-soft);
}

.case-preview {
  position: relative;
  width: 100%;
  max-width: none;
  padding: 12px;
  border: 1px solid var(--studio-line);
  border-radius: var(--studio-radius-xl);
  background: linear-gradient(145deg, var(--studio-surface), rgba(255,255,255,.016));
  box-shadow: var(--studio-shadow), inset 0 1px 0 rgba(255,255,255,.055);
}

.case-preview::before {
  position: absolute;
  top: 0;
  right: 18%;
  left: 18%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(98,215,197,.8), transparent);
}

.hero-video-wrap {
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 20px;
  background: #080a0f;
  box-shadow: 0 12px 34px rgba(0,0,0,.26);
}

.hero-video-wrap::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(115deg, rgba(154,123,255,.07), transparent 32%, transparent 70%, rgba(98,215,197,.05));
  mix-blend-mode: screen;
}

.quality-badge {
  top: 15px;
  left: 15px;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 16px;
  background: rgba(11,14,21,.64);
  color: #fff;
  backdrop-filter: blur(10px);
}

.video-controls {
  height: 92px;
}

.video-control-row {
  right: 16px;
  bottom: 31px;
  left: 16px;
}

.video-icon-button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(10,12,17,.42);
  backdrop-filter: blur(9px);
}

.video-icon-button:hover {
  border-color: rgba(255,255,255,.34);
  background: rgba(255,255,255,.14);
}

.video-time {
  font-size: 11px;
}

.video-progress {
  right: 16px;
  bottom: 17px;
  left: 16px;
  height: 5px;
  background: rgba(255,255,255,.22);
}

.video-progress span {
  background: linear-gradient(90deg, var(--studio-accent), var(--studio-accent-2));
}

.case-strip {
  margin-top: 12px;
  gap: 9px;
}

.case-thumb {
  border: 1px solid var(--studio-line);
  border-radius: 13px;
}

.case-thumb.is-active {
  border-color: var(--studio-accent);
  box-shadow: 0 0 0 2px var(--studio-accent-soft), 0 8px 22px rgba(0,0,0,.18);
}

.thumb-play {
  width: 30px;
  height: 30px;
  background: rgba(10,12,18,.7);
  backdrop-filter: blur(8px);
}

.case-thumb.is-active .thumb-play {
  background: var(--studio-accent);
}

.more-link {
  align-self: flex-end;
  margin-top: 15px;
  padding: 7px 10px;
  border: 1px solid var(--studio-line);
  border-radius: 18px;
  color: var(--studio-muted);
  font-size: 11px;
  text-decoration: none;
}

.more-link:hover {
  border-color: var(--studio-line-strong);
  background: var(--studio-accent-soft);
  color: var(--studio-ink);
}

.pricing-section {
  width: min(1360px, calc(100% - 64px));
  margin: 58px auto 0;
  padding: 52px 0 80px;
  background: transparent;
}

.section-rule {
  height: 1px;
  margin-bottom: 48px;
  background: linear-gradient(90deg, transparent, var(--studio-line-strong), transparent);
}

.pricing-intro {
  display: grid;
  max-width: none;
  margin-bottom: 40px;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 28px;
  align-items: end;
}

.eyebrow {
  color: var(--studio-accent);
  font-size: 10px;
  letter-spacing: .2em;
}

.pricing-intro h2,
.examples-heading h2 {
  margin: 8px 0 0;
  color: var(--studio-ink);
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -.04em;
}

.pricing-intro > p:last-child,
.examples-heading > p:last-child {
  max-width: 560px;
  margin: 0;
  color: var(--studio-muted);
  font-size: 13px;
  line-height: 1.8;
}

.price-group {
  margin-top: 28px;
}

.price-group h3 {
  margin: 0 0 11px;
  padding-left: 14px;
  color: var(--studio-ink);
  font-size: 16px;
  font-weight: 650;
}

.price-group h3::before {
  width: 3px;
  border-radius: 99px;
  background: linear-gradient(var(--studio-accent), var(--studio-accent-2));
}

.price-table {
  overflow: hidden;
  border: 1px solid var(--studio-line);
  border-radius: 18px;
  background: var(--studio-surface);
  box-shadow: 0 12px 34px rgba(0,0,0,.11);
}

.price-row {
  min-height: 60px;
  border-bottom-color: var(--studio-line);
}

.price-row > span {
  padding: 15px 18px;
}

.price-row > span + span {
  border-left-color: var(--studio-line);
  background: var(--studio-surface-soft);
}

.price-head {
  min-height: 42px;
  background: var(--studio-surface-soft);
  color: var(--studio-muted);
  font-size: 10px;
}

.service strong {
  color: var(--studio-ink);
  font-size: 12px;
}

.service small,
.price small,
.price-note {
  color: var(--studio-faint);
}

.service svg {
  color: var(--studio-accent-2);
}

.price b {
  color: var(--studio-warm);
}

.price-footer {
  display: flex;
  margin-top: 24px;
  padding: 16px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--studio-line);
  border-radius: 17px;
  background: var(--studio-surface-soft);
}

.advantages {
  gap: 10px 18px;
  color: var(--studio-muted);
  font-size: 11px;
}

.buy-button {
  min-height: 42px;
  padding: 0 17px;
  border: 0;
  border-radius: 20px;
  background: var(--studio-ink);
  color: var(--studio-bg);
  box-shadow: 0 8px 20px rgba(0,0,0,.14);
}

.buy-button:hover {
  background: var(--studio-accent);
  color: #fff;
}

.price-note {
  margin-top: 13px;
  font-size: 10px;
  line-height: 1.7;
}

.examples-section {
  width: min(1360px, calc(100% - 64px));
  margin: 0 auto;
  padding: 68px 0 96px;
}

.examples-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.examples-heading .eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
}

.examples-heading .eyebrow span {
  width: 26px;
  height: 1px;
  background: var(--studio-accent);
}

.gallery-grid {
  gap: 14px;
}

.gallery-card > button {
  border: 1px solid var(--studio-line);
  border-radius: 18px;
  background: var(--studio-surface-strong);
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
}

.gallery-card:hover :is(img, video) {
  filter: saturate(1.08);
  transform: scale(1.035);
}

.prompt-pill {
  right: 12px;
  bottom: 12px;
  left: 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px;
  background: rgba(10,12,18,.72);
  color: #fff;
  backdrop-filter: blur(13px);
}

.toast {
  border: 1px solid var(--studio-line-strong);
  border-radius: 14px;
  background: color-mix(in srgb, var(--studio-surface-strong) 90%, transparent);
  color: var(--studio-ink);
  box-shadow: var(--studio-shadow);
  backdrop-filter: blur(18px);
}

/* Light surfaces: preserve the same hierarchy instead of reverting to flat cards. */
:root[data-theme="light"] .app-shell {
  background: radial-gradient(circle at 80% 0%, rgba(121,95,230,.11), transparent 26rem), radial-gradient(circle at 8% 38%, rgba(21,157,140,.055), transparent 22rem), var(--studio-bg);
}

:root[data-theme="light"] .site-header {
  border-bottom-color: var(--studio-line);
  background: color-mix(in srgb, var(--studio-bg) 86%, transparent);
}

:root[data-theme="light"] .banner-button {
  border-color: var(--studio-line);
  background: linear-gradient(100deg, rgba(255,255,255,.96), rgba(249,250,253,.86));
  box-shadow: 0 10px 28px rgba(46,60,85,.08), inset 0 1px 0 #fff;
}

:root[data-theme="light"] .banner-copy strong { color: var(--studio-ink); }
:root[data-theme="light"] .banner-copy small { color: var(--studio-muted); }
:root[data-theme="light"] .history-button,
:root[data-theme="light"] .theme-button,
:root[data-theme="light"] .api-button { background: rgba(255,255,255,.72); }

:root[data-theme="light"] .composer,
:root[data-theme="light"] .case-preview {
  border-color: var(--studio-line);
  background: linear-gradient(145deg, rgba(255,255,255,.94), rgba(255,255,255,.72));
  box-shadow: var(--studio-shadow), inset 0 1px 0 #fff;
}

:root[data-theme="light"] .prompt-editor {
  border-color: var(--studio-line);
  background: linear-gradient(150deg, rgba(247,249,253,.96), rgba(255,255,255,.92));
}

:root[data-theme="light"] .frame-slot {
  border-color: color-mix(in srgb, var(--studio-accent) 32%, var(--studio-line-strong));
  background: linear-gradient(145deg, rgba(109,82,215,.06), rgba(21,157,140,.035));
}

:root[data-theme="light"] .setting-block,
:root[data-theme="light"] .quantity-row,
:root[data-theme="light"] .price-footer {
  border-color: var(--studio-line);
  background: rgba(247,249,252,.72);
}

:root[data-theme="light"] .segment.is-active,
:root[data-theme="light"] .ratio-button.is-active,
:root[data-theme="light"] .quantity-button.is-active,
:root[data-theme="light"] .mode-button.is-active {
  background: var(--studio-accent-soft);
  color: var(--studio-ink);
}

:root[data-theme="light"] .price-table {
  border-color: var(--studio-line);
  background: rgba(255,255,255,.86);
  box-shadow: 0 14px 36px rgba(46,60,85,.08);
}

:root[data-theme="light"] .price-row > span + span { background: rgba(247,249,252,.72); }
:root[data-theme="light"] .gallery-card > button { border-color: var(--studio-line); background: #fff; }
:root[data-theme="light"] .prompt-pill { border-color: rgba(255,255,255,.75); background: rgba(24,30,42,.72); }

@media (max-width: 1100px) {
  .header-banner { width: min(470px, 44vw); }
  .banner-copy small { display: none; }
  .workbench { grid-template-columns: minmax(330px, .9fr) minmax(0, 1.1fr); }
  .composer, .case-preview { padding: 18px; }
}

@media (max-width: 860px) {
  .site-header { height: 68px; }
  .header-banner { display: none; }
  .mobile-banner-wrap { display: block; width: calc(100% - 32px); height: 56px; margin: 14px 16px 0; }
  .mobile-banner-wrap .banner-button { width: 100%; }
  .workbench {
    display: flex;
    width: calc(100% - 32px);
    margin: 0 16px;
    padding-top: 24px;
    flex-direction: column;
    gap: 20px;
  }
  .composer, .case-preview { width: 100%; }
  .pricing-section, .examples-section { width: calc(100% - 32px); }
  .pricing-intro { grid-template-columns: 1fr; gap: 16px; }
  .price-footer { align-items: flex-start; flex-direction: column; }
  .buy-button { width: 100%; }
}

@media (max-width: 560px) {
  .site-header { padding-inline: 14px; }
  .header-actions { gap: 8px; }
  .history-button, .theme-button { width: 40px; height: 40px; }
  .login-button { min-width: 88px; height: 40px; padding-inline: 12px; font-size: 11px; }
  .mobile-banner-wrap { margin-top: 10px; }
  .mobile-banner-wrap .banner-copy em { display: none; }
  .mobile-banner-wrap .banner-copy strong { max-width: 190px; }
  .composer, .case-preview { padding: 15px; border-radius: 22px; }
  .mode-tabs { width: 100%; }
  .mode-button { min-width: 0; flex: 1; padding-inline: 10px; white-space: nowrap; }
  .field-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .settings-grid { grid-template-columns: 1fr; }
  .ratio-block { grid-column: auto; align-items: stretch; flex-direction: column; gap: 9px; }
  .ratio-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .create-button { min-height: 54px; }
  .case-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-section { margin-top: 30px; padding-top: 38px; }
  .examples-section { padding-top: 42px; }
  .pricing-intro h2, .examples-heading h2 { font-size: 34px; }
  .price-row > span { padding: 13px 12px; }
  .service strong { font-size: 11px; }
}

/* Final studio polish: a quieter command surface with stronger visual hierarchy. */
.app-shell {
  background:
    radial-gradient(ellipse at 72% -10%, rgba(145, 107, 255, .18), transparent 34rem),
    radial-gradient(ellipse at 0% 22%, rgba(47, 205, 185, .07), transparent 28rem),
    linear-gradient(180deg, #080a0f 0%, #0b0e14 46%, #090b10 100%);
}

.app-shell::after {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0 44%, rgba(255,255,255,.018) 50%, transparent 56%);
  opacity: .45;
}

.site-header {
  height: 72px;
  padding-inline: clamp(18px, 5vw, 76px);
  background: rgba(8, 10, 15, .72);
  border-bottom-color: rgba(255,255,255,.08);
}

.composer-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.composer-intro p {
  margin: 0 0 8px;
  color: var(--studio-accent-2);
  font: 800 10px/1 Inter, sans-serif;
  letter-spacing: .2em;
}

.composer-intro h1 {
  max-width: 18ch;
  margin: 0;
  color: var(--studio-ink);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.18;
  letter-spacing: -.04em;
}

.model-chip {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  align-items: center;
  border: 1px solid rgba(98,215,197,.25);
  border-radius: 999px;
  background: rgba(98,215,197,.07);
  color: #9ce9dc;
  font-size: 10px;
  gap: 5px;
  white-space: nowrap;
}

.model-chip svg { width: 13px; height: 13px; }

.workbench { padding-top: 38px; gap: 32px; }
.composer { padding: 26px; border-radius: 24px; background: rgba(15,19,28,.84); }
.case-preview { padding: 14px; border-radius: 24px; background: rgba(15,19,28,.78); }
.mode-tabs { width: 100%; }
.mode-button { flex: 1; }
.mode-guidance,
.text-mode-note,
.reference-dropzone,
.frame-slot,
.setting-block,
.quantity-row,
.job-card {
  background: rgba(255,255,255,.035);
  border-color: rgba(255,255,255,.1);
}
.mode-guidance,
.text-mode-note {
  border-radius: 16px;
}
.create-button { min-height: 58px; border-radius: 16px; }

.pricing-section { margin-top: 72px; }
.examples-section { padding-top: 92px; }

@media (max-width: 860px) {
  .composer-intro h1 { font-size: 24px; }
  .workbench { padding-top: 28px; }
}

@media (max-width: 560px) {
  .composer-intro { flex-direction: column; gap: 12px; }
  .model-chip { align-self: flex-start; }
  .composer { padding: 18px; border-radius: 20px; }
  .case-preview { border-radius: 20px; }
}

:root[data-theme="light"] .app-shell {
  background: radial-gradient(ellipse at 72% -10%, rgba(121,95,230,.12), transparent 34rem), #f4f6fa;
}

:root[data-theme="light"] .site-header { background: rgba(244,246,250,.78); }
:root[data-theme="light"] .composer-intro p { color: #159d8c; }
:root[data-theme="light"] .model-chip { border-color: rgba(21,157,140,.24); background: rgba(21,157,140,.07); color: #137d70; }
:root[data-theme="light"] .composer,
:root[data-theme="light"] .case-preview { background: rgba(255,255,255,.86); }


@media (min-width: 1101px) {
  /* Keep the primary action in the first viewport on desktop without making
     the control rail feel cramped. Mobile keeps the more generous rhythm. */
  .composer { padding: 20px; gap: 16px; }
  .prompt-editor { min-height: 142px; }
  .frame-slot { min-height: 82px; }
  .setting-block { min-height: 68px; padding: 10px 12px; gap: 8px; }
  .ratio-block { min-height: 60px; }
  .quantity-row { min-height: 44px; }
  .quantity-button { min-height: 34px; }
  .create-button { min-height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .create-button::before { display: none; }
  .create-button:hover:not(:disabled),
  .frame-slot:hover,
  .login-button:hover { transform: none; }
}

/* Focused authentication: public launch currently exposes SMS only. */
.auth-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--studio-line);
  border-radius: 16px;
  background: var(--studio-surface-soft);
}

.auth-methods--phone-only {
  grid-template-columns: minmax(0, 1fr);
}

.auth-method-button {
  display: flex;
  min-height: 46px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: transparent;
  color: var(--studio-muted);
  font-size: 12px;
  font-weight: 700;
  transition: transform 180ms var(--studio-ease), border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.auth-method-button svg {
  width: 17px;
  height: 17px;
}

.auth-method-button:hover {
  background: var(--studio-surface-soft);
  color: var(--studio-ink);
  transform: translateY(-1px);
}

.auth-method-button.is-active {
  border-color: color-mix(in srgb, var(--studio-accent) 48%, var(--studio-line));
  background: linear-gradient(135deg, var(--studio-accent-soft), rgba(98,215,197,.08));
  color: var(--studio-ink);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

.auth-method-panel {
  animation: auth-method-enter 220ms var(--studio-ease) both;
}

.phone-login-form {
  margin-top: 18px;
  gap: 14px;
}

.phone-login-form label {
  color: var(--studio-muted);
  font-size: 11px;
}

.phone-login-form input {
  min-height: 46px;
  border-radius: 13px;
  border-color: var(--studio-line);
  background: var(--studio-surface-soft);
  color: var(--studio-ink);
}

.phone-login-form input:focus {
  border-color: var(--studio-accent);
  box-shadow: 0 0 0 4px var(--studio-accent-soft);
}

.code-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.code-button {
  min-width: 108px;
  min-height: 46px;
  padding: 0 12px;
  cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--studio-accent) 42%, var(--studio-line));
  border-radius: 13px;
  background: var(--studio-accent-soft);
  color: var(--studio-accent);
  font-size: 11px;
  font-weight: 700;
  transition: transform 180ms var(--studio-ease), border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.code-button:hover:not(:disabled) {
  border-color: var(--studio-accent);
  background: var(--studio-accent);
  color: #fff;
  transform: translateY(-1px);
}

.code-button:disabled {
  cursor: wait;
  opacity: .58;
}

.phone-login-note {
  min-height: 17px;
  margin: 10px 2px 0;
  color: var(--studio-faint);
  font-size: 10px;
  text-align: center;
}

.wechat-auth-panel {
  display: grid;
  margin-top: 18px;
  gap: 14px;
}

.wechat-qr-card {
  display: grid;
  min-height: 192px;
  padding: 24px 18px;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px dashed color-mix(in srgb, #4acb72 48%, var(--studio-line));
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(74,203,114,.08), rgba(255,255,255,.02));
  text-align: center;
}

.wechat-qr-mark {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid rgba(74,203,114,.38);
  border-radius: 18px;
  background: rgba(74,203,114,.12);
  color: #4acb72;
  box-shadow: 0 10px 28px rgba(74,203,114,.12), inset 0 1px 0 rgba(255,255,255,.12);
}

.wechat-qr-mark svg {
  width: 32px;
  height: 32px;
}

.wechat-qr-card strong {
  color: var(--studio-ink);
  font-size: 14px;
}

.wechat-qr-card > span {
  max-width: 260px;
  color: var(--studio-muted);
  font-size: 10px;
  line-height: 1.6;
}

.wechat-auth-panel .wechat-login {
  min-height: 48px;
  border-color: rgba(74,203,114,.38);
  border-radius: 14px;
  background: rgba(74,203,114,.09);
  color: #4acb72;
  font-size: 12px;
}

.wechat-auth-panel .wechat-login:hover:not(:disabled) {
  border-color: #4acb72;
  background: #4acb72;
  color: #fff;
  transform: translateY(-1px);
}

.wechat-auth-panel .wechat-login:disabled {
  border-color: var(--studio-line);
  background: var(--studio-surface-soft);
  color: var(--studio-faint);
}

@keyframes auth-method-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

:root[data-theme="light"] .auth-methods,
:root[data-theme="light"] .phone-login-form input,
:root[data-theme="light"] .code-button {
  background: rgba(247,249,252,.86);
}

:root[data-theme="light"] .auth-method-button.is-active {
  background: linear-gradient(135deg, rgba(109,82,215,.12), rgba(21,157,140,.08));
}

:root[data-theme="light"] .wechat-qr-card {
  background: linear-gradient(145deg, rgba(74,203,114,.07), rgba(247,249,252,.9));
}

@media (max-width: 420px) {
  .auth-method-button { min-height: 44px; font-size: 11px; }
  .code-field { grid-template-columns: 1fr; }
  .code-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-method-panel,
  .auth-method-button,
  .code-button,
  .wechat-auth-panel .wechat-login { animation: none; transition: none; }
}

/* Login refinement: one calm path for SMS, one for WeChat. */
.account-dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 28px;
  border-radius: 22px;
}

.account-dialog .utility-eyebrow {
  margin-bottom: 7px;
}

.account-dialog .utility-description {
  max-width: 34em;
  margin-bottom: 22px;
}

.auth-methods {
  padding: 5px;
  gap: 6px;
  border-radius: 18px;
}

.auth-method-button {
  min-height: 50px;
  border-radius: 13px;
  letter-spacing: .01em;
}

.auth-method-button:hover {
  transform: none;
}

.auth-method-button.is-active {
  box-shadow: 0 7px 22px color-mix(in srgb, var(--studio-accent) 12%, transparent);
}

.auth-method-button:focus-visible,
.code-button:focus-visible,
.wechat-login:focus-visible,
.phone-login-form input:focus-visible {
  outline: 0;
  border-color: var(--studio-accent);
  box-shadow: 0 0 0 4px var(--studio-accent-soft);
}

.auth-panel-intro {
  margin: 18px 2px 0;
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.6;
}

.phone-login-form {
  margin-top: 16px;
  gap: 16px;
}

.phone-login-form label {
  gap: 8px;
  font-size: 12px;
  font-weight: 650;
}

.phone-login-form label > span {
  color: var(--studio-ink);
}

.phone-login-form input,
.code-button {
  min-height: 50px;
  border-radius: 14px;
}

.code-field {
  gap: 10px;
}

.code-button {
  min-width: 116px;
  padding-inline: 14px;
}

.auth-submit {
  min-height: 52px;
  margin-top: 2px;
  border-radius: 14px;
}

.phone-login-note {
  min-height: 18px;
  margin: 12px 2px 0;
  font-size: 11px;
  line-height: 1.5;
  text-align: left;
}

.wechat-auth-panel {
  margin-top: 18px;
  gap: 12px;
}

.wechat-qr-card {
  min-height: 156px;
  padding: 22px;
  grid-template-columns: 70px minmax(0, 1fr);
  place-items: initial;
  align-items: center;
  align-content: normal;
  gap: 16px;
  border-style: solid;
  border-color: color-mix(in srgb, #4acb72 34%, var(--studio-line));
  border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, #4acb72 11%, var(--studio-surface-soft)), var(--studio-surface-soft));
  text-align: left;
}

.wechat-qr-mark {
  width: 70px;
  height: 70px;
  border-radius: 18px;
}

.wechat-qr-copy {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.wechat-qr-card .wechat-qr-copy strong {
  color: var(--studio-ink);
  font-size: 14px;
}

.wechat-qr-card .wechat-qr-copy span {
  max-width: 26ch;
  color: var(--studio-muted);
  font-size: 11px;
  line-height: 1.55;
}

.wechat-auth-panel .wechat-login {
  min-height: 52px;
  border-radius: 14px;
}

.auth-channel-note {
  margin-top: 0;
  font-size: 10px;
  line-height: 1.5;
}

@media (max-width: 420px) {
  .account-dialog { width: min(calc(100% - 20px), 460px); padding: 22px 18px; border-radius: 20px; }
  .auth-method-button { min-height: 48px; }
  .auth-method-button span { font-size: 11px; }
  .phone-login-form { gap: 14px; }
  .wechat-qr-card { grid-template-columns: 58px minmax(0, 1fr); min-height: 142px; padding: 18px; gap: 13px; }
  .wechat-qr-mark { width: 58px; height: 58px; border-radius: 15px; }
  .wechat-qr-mark svg { width: 27px; height: 27px; }
}

/* Email authentication sits inside the same calm modal as SMS, while
   registration and recovery remain progressive rather than adding more tabs. */
.email-auth-panel {
  margin-top: 18px;
}

.email-auth-form {
  margin-top: 0;
  gap: 16px;
}

.email-auth-form .auth-panel-intro {
  margin-top: 0;
}

.email-auth-form label {
  gap: 8px;
  color: var(--studio-ink);
  font-size: 12px;
  font-weight: 650;
}

.email-auth-form input {
  min-height: 50px;
  border-color: var(--studio-line);
  border-radius: 14px;
  background: var(--studio-surface-soft);
  color: var(--studio-ink);
}

.email-auth-form input:focus {
  border-color: var(--studio-accent);
  box-shadow: 0 0 0 4px var(--studio-accent-soft);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 50px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 3px;
  display: inline-grid;
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--studio-faint);
  transform: translateY(-50%);
  transition: color 150ms var(--studio-ease), background-color 150ms var(--studio-ease);
}

.password-toggle:hover,
.password-toggle:active {
  background: var(--studio-accent-soft);
  color: var(--studio-accent);
  box-shadow: none;
  transform: translateY(-50%);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.password-toggle:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--studio-accent-soft);
  color: var(--studio-accent);
}

.email-auth-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -3px;
}

.email-auth-links--single {
  justify-content: flex-start;
}

.email-auth-links button {
  display: inline-flex;
  min-height: 28px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--studio-accent);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
}

.email-auth-links button:hover {
  color: var(--studio-ink);
}

.email-auth-links button:focus-visible {
  outline: 2px solid var(--studio-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.email-auth-links svg {
  width: 13px;
  height: 13px;
}

.auth-auxiliary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding: 11px;
  border: 1px solid color-mix(in srgb, var(--studio-accent) 26%, var(--studio-line));
  border-radius: 13px;
  background: var(--studio-accent-soft);
}

.auth-auxiliary[hidden] {
  display: none;
}

.auth-auxiliary a,
.auth-auxiliary button {
  display: inline-flex;
  min-height: 34px;
  padding: 0 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--studio-accent) 38%, var(--studio-line));
  border-radius: 9px;
  background: var(--studio-surface);
  color: var(--studio-accent);
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.auth-auxiliary a:hover,
.auth-auxiliary button:hover {
  border-color: var(--studio-accent);
  color: var(--studio-ink);
}

:root[data-theme="light"] .email-auth-form input,
:root[data-theme="light"] .auth-auxiliary a,
:root[data-theme="light"] .auth-auxiliary button {
  background: #ffffff;
}

@media (max-width: 420px) {
  .email-auth-form { gap: 14px; }
  .email-auth-links { gap: 10px; }
  .email-auth-links button { font-size: 10px; }
  .auth-auxiliary { align-items: stretch; }
  .auth-auxiliary a,
  .auth-auxiliary button { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .password-toggle { transition: none; }
}

/* H3 checkout: a focused two-column flow, intentionally separate from the account popover. */
#accountModal.is-recharge .modal-backdrop {
  background: rgba(3, 3, 6, .72);
  backdrop-filter: blur(12px) saturate(.72);
}

.account-dialog.is-recharge {
  --checkout-bg: #0d0d10;
  --checkout-panel: #111116;
  --checkout-soft: #16161c;
  --checkout-line: rgba(255, 255, 255, .13);
  --checkout-line-soft: rgba(255, 255, 255, .075);
  --checkout-ink: #f7f4ee;
  --checkout-muted: #a49ea0;
  --checkout-faint: #6f6b70;
  --checkout-gold: #e3b85f;
  --checkout-gold-strong: #ffd985;
  --checkout-gold-surface: rgba(216, 168, 73, .095);
  --checkout-focus: rgba(255, 217, 133, .88);
  position: relative;
  width: min(1080px, calc(100vw - 40px));
  max-width: 1080px;
  height: min(720px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
  min-height: min(610px, calc(100dvh - 48px));
  padding: 0;
  overflow: hidden;
  border-color: rgba(232, 194, 111, .3);
  border-radius: 14px;
  background: var(--checkout-bg);
  color: var(--checkout-ink);
  box-shadow: 0 34px 110px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .045);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Inter, sans-serif;
}

.account-dialog.is-recharge > .utility-eyebrow,
.account-dialog.is-recharge > #accountModalTitle,
.account-dialog.is-recharge > #accountDescription {
  display: none;
}

.account-dialog.is-recharge > .modal-close {
  top: 20px;
  right: 20px;
  width: 34px;
  height: 34px;
  border-color: rgba(255, 255, 255, .13);
  background: rgba(255, 255, 255, .035);
  color: #b8b2b4;
  font-size: 25px;
}

.account-dialog.is-recharge > .modal-close:hover {
  border-color: rgba(255, 217, 133, .58);
  background: rgba(227, 184, 95, .11);
  color: var(--checkout-gold-strong);
}

.account-dialog.is-recharge > #accountStatus {
  position: absolute;
  z-index: 8;
  right: 76px;
  bottom: 18px;
  max-width: min(440px, calc(100% - 104px));
  padding: 7px 10px;
  border: 1px solid rgba(227, 184, 95, .28);
  border-radius: 7px;
  background: rgba(20, 18, 13, .94);
  color: #e8d4aa;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .28);
  font-size: 11px;
}

.account-dialog.is-recharge > #accountStatus:empty { display: none; }

.account-dialog.is-recharge .recharge-view {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-columns: 304px minmax(0, 1fr);
  gap: 0;
  background: var(--checkout-panel);
}

.account-dialog.is-recharge .recharge-aside {
  position: relative;
  z-index: 0;
  display: flex;
  min-width: 0;
  padding: 30px 25px 24px;
  overflow: hidden;
  flex-direction: column;
  border-right: 1px solid var(--checkout-line);
  background:
    radial-gradient(circle at 20% 102%, rgba(189, 142, 57, .18), transparent 34%),
    radial-gradient(circle at -18% 16%, rgba(255, 216, 132, .07), transparent 34%),
    #0d0d10;
}

.account-dialog.is-recharge .recharge-aside::after {
  position: absolute;
  z-index: -1;
  right: -74px;
  bottom: -92px;
  width: 250px;
  height: 250px;
  content: "";
  border: 1px solid rgba(227, 184, 95, .08);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(227, 184, 95, .025), 0 0 0 78px rgba(227, 184, 95, .016);
}

.account-dialog.is-recharge .recharge-brand {
  display: inline-flex;
  width: max-content;
  align-items: center;
  color: var(--checkout-gold);
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
}

.account-dialog.is-recharge .recharge-brand svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.8;
}

.account-dialog.is-recharge .recharge-aside-copy {
  display: grid;
  margin-top: 34px;
  gap: 10px;
}

.account-dialog.is-recharge .recharge-aside-copy p,
.account-dialog.is-recharge .recharge-kicker {
  margin: 0;
  color: var(--checkout-gold);
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
}

.account-dialog.is-recharge .recharge-aside-copy h2 {
  margin: 0;
  color: var(--checkout-ink);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.15;
}

.account-dialog.is-recharge .recharge-aside-copy > span {
  color: #b5afb2;
  font-size: 12px;
  line-height: 1.75;
}

.account-dialog.is-recharge .recharge-benefits {
  display: grid;
  margin: 28px 0 0;
  padding: 14px;
  list-style: none;
  border: 1px solid rgba(227, 184, 95, .25);
  border-radius: 16px;
  background: rgba(227, 184, 95, .045);
  gap: 13px;
}

.account-dialog.is-recharge .recharge-benefits li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: start;
  color: #beb8ba;
  gap: 9px;
  font-size: 11px;
  line-height: 1.55;
}

.account-dialog.is-recharge .recharge-benefit-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(227, 184, 95, .35);
  border-radius: 6px;
  background: rgba(227, 184, 95, .055);
  color: var(--checkout-gold);
}

.account-dialog.is-recharge .recharge-benefit-icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.account-dialog.is-recharge .recharge-business-card {
  display: grid;
  margin-top: auto;
  padding: 14px;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  border: 1px solid rgba(227, 184, 95, .26);
  border-radius: 16px;
  background: rgba(18, 17, 17, .8);
  gap: 11px;
}

.account-dialog.is-recharge .recharge-business-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(227, 184, 95, .32);
  border-radius: 7px;
  color: var(--checkout-gold);
}

.account-dialog.is-recharge .recharge-business-icon svg { width: 16px; height: 16px; }

.account-dialog.is-recharge .recharge-business-card > div { display: grid; min-width: 0; gap: 4px; }
.account-dialog.is-recharge .recharge-business-card p { margin: 0; color: var(--checkout-gold); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.account-dialog.is-recharge .recharge-business-card strong { color: var(--checkout-ink); font-size: 12px; }
.account-dialog.is-recharge .recharge-business-card span:last-child { color: var(--checkout-muted); font-size: 10px; line-height: 1.55; }

.account-dialog.is-recharge .recharge-main {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  background: #101015;
}

.account-dialog.is-recharge .recharge-header {
  position: relative;
  display: flex;
  min-height: 114px;
  padding: 26px 136px 18px 30px;
  align-items: flex-start;
  border-bottom: 1px solid var(--checkout-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .018), transparent);
}

.account-dialog.is-recharge .recharge-header > div { display: grid; gap: 7px; }
.account-dialog.is-recharge .recharge-header h2 { margin: 0; color: var(--checkout-ink); font-size: 25px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.account-dialog.is-recharge .recharge-header > div > p:last-child { margin: 0; color: var(--checkout-muted); font-size: 11px; line-height: 1.55; }

.account-dialog.is-recharge .recharge-back {
  position: absolute;
  top: 29px;
  right: 65px;
  min-height: 34px;
  padding: 0 8px;
  align-items: center;
  border-radius: 6px;
  color: #a9a3a5;
  gap: 5px;
  font-size: 11px;
}

.account-dialog.is-recharge .recharge-back:hover { background: rgba(255, 255, 255, .045); color: var(--checkout-gold-strong); }

.account-dialog.is-recharge .recharge-scroll {
  display: grid;
  min-height: 0;
  padding: 22px 30px 28px;
  overflow-y: auto;
  align-content: start;
  gap: 22px;
  overscroll-behavior: contain;
  scroll-padding: 20px 0 88px;
  scrollbar-color: rgba(227, 184, 95, .45) transparent;
  scrollbar-width: thin;
}

.account-dialog.is-recharge .recharge-scroll::-webkit-scrollbar { width: 9px; }
.account-dialog.is-recharge .recharge-scroll::-webkit-scrollbar-thumb { border: 3px solid #101015; border-radius: 999px; background: rgba(227, 184, 95, .42); }

.account-dialog.is-recharge .checkout-section { display: grid; gap: 11px; }
.account-dialog.is-recharge .checkout-section-heading { display: grid; gap: 4px; }
.account-dialog.is-recharge .checkout-section-heading h3 { margin: 0; color: var(--checkout-ink); font-size: 14px; font-weight: 750; line-height: 1.35; }
.account-dialog.is-recharge .checkout-section-heading p { margin: 0; color: var(--checkout-faint); font-size: 10px; line-height: 1.55; }

.account-dialog.is-recharge .recharge-plans {
  display: grid;
  padding-top: 5px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.account-dialog.is-recharge .recharge-plans .history-empty {
  min-height: 130px;
  border: 1px dashed var(--checkout-line);
  border-radius: 16px;
  color: var(--checkout-muted);
}

.account-dialog.is-recharge .recharge-plan {
  position: relative;
  display: grid;
  min-height: 158px;
  padding: 16px 15px 14px;
  overflow: visible;
  grid-template-rows: auto auto minmax(26px, 1fr) auto;
  align-content: start;
  border-color: rgba(255, 255, 255, .19);
  border-radius: 16px;
  background: rgba(255, 255, 255, .018);
  color: var(--checkout-muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .022);
  gap: 7px;
}

.account-dialog.is-recharge .recharge-plan:hover:not(.is-active) {
  border-color: rgba(227, 184, 95, .48);
  background: rgba(227, 184, 95, .035);
}

.account-dialog.is-recharge .recharge-plan.is-active {
  border-color: var(--checkout-gold);
  background: linear-gradient(145deg, rgba(227, 184, 95, .13), rgba(227, 184, 95, .045));
  box-shadow: inset 0 0 0 1px rgba(227, 184, 95, .32), 0 10px 26px rgba(0, 0, 0, .18);
}

.account-dialog.is-recharge .recharge-plan-top { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; }
.account-dialog.is-recharge .recharge-plan-name { overflow: hidden; color: #ebe7e1; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.account-dialog.is-recharge .recharge-plan-check { display: grid; width: 20px; height: 20px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(227, 184, 95, .48); border-radius: 50%; color: #18130b; opacity: 0; transform: scale(.8); transition: opacity 150ms ease, transform 150ms ease, background-color 150ms ease; }
.account-dialog.is-recharge .recharge-plan-check svg { width: 13px; height: 13px; stroke-width: 2.5; }
.account-dialog.is-recharge .recharge-plan.is-active .recharge-plan-check { background: var(--checkout-gold-strong); opacity: 1; transform: scale(1); }
.account-dialog.is-recharge .recharge-plan-credit { display: inline-flex; align-items: baseline; color: var(--checkout-gold-strong); gap: 5px; }
.account-dialog.is-recharge .recharge-plan-credit strong { color: inherit; font-family: Inter, "PingFang SC", sans-serif; font-size: 22px; font-weight: 800; letter-spacing: -.06em; }
.account-dialog.is-recharge .recharge-plan-credit em { color: #c7b894; font-size: 10px; font-style: normal; font-weight: 650; }
.account-dialog.is-recharge .recharge-plan small { display: -webkit-box; overflow: hidden; color: var(--checkout-faint); font-size: 10px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.account-dialog.is-recharge .recharge-plan-price { align-self: end; color: #f0d59a; font-family: Inter, "PingFang SC", sans-serif; font-size: 16px; font-weight: 800; letter-spacing: -.03em; }
.account-dialog.is-recharge .recharge-plan-bonus { position: absolute; top: -10px; right: 9px; max-width: calc(100% - 18px); padding: 3px 8px; overflow: hidden; border-radius: 999px; background: var(--checkout-gold-strong); color: #352910; font-size: 9px; font-weight: 800; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }

.account-dialog.is-recharge .payment-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.account-dialog.is-recharge .payment-method {
  display: grid;
  min-width: 0;
  min-height: 54px;
  padding: 8px 10px;
  grid-template-columns: 25px minmax(0, 1fr) 17px;
  align-items: center;
  border-color: rgba(255, 255, 255, .17);
  border-radius: 7px;
  background: rgba(255, 255, 255, .018);
  color: var(--checkout-muted);
  gap: 8px;
  text-align: left;
}

.account-dialog.is-recharge .payment-method:hover:not(:disabled) { border-color: rgba(227, 184, 95, .58); background: rgba(227, 184, 95, .045); }
.account-dialog.is-recharge .payment-method.is-active { border-color: var(--checkout-gold); background: var(--checkout-gold-surface); color: var(--checkout-ink); box-shadow: inset 0 0 0 1px rgba(227, 184, 95, .2); }
.account-dialog.is-recharge .payment-method:disabled { cursor: not-allowed; opacity: .52; }
.account-dialog.is-recharge .payment-method-icon { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid rgba(255, 255, 255, .12); border-radius: 6px; color: var(--checkout-gold); }
.account-dialog.is-recharge .payment-method-icon svg { width: 14px; height: 14px; }
.account-dialog.is-recharge .payment-method-copy { display: grid; min-width: 0; gap: 2px; }
.account-dialog.is-recharge .payment-method-copy strong { overflow: hidden; color: inherit; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.account-dialog.is-recharge .payment-method-copy small { overflow: hidden; color: var(--checkout-faint); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.account-dialog.is-recharge .payment-method b { display: grid; width: 17px; height: 17px; place-items: center; border: 1px solid rgba(255, 255, 255, .14); border-radius: 50%; color: var(--checkout-faint); }
.account-dialog.is-recharge .payment-method b svg { width: 10px; height: 10px; stroke-width: 2.2; }
.account-dialog.is-recharge .payment-method.is-active b { border-color: var(--checkout-gold); background: var(--checkout-gold); color: #231b0d; }
.account-dialog.is-recharge .payment-channel-note { min-height: 16px; margin: 1px 0 0; color: var(--checkout-faint); font-size: 10px; line-height: 1.5; }

.account-dialog.is-recharge .enterprise-purchase-panel {
  display: grid;
  min-width: 0;
  padding: 12px 13px;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid rgba(227, 184, 95, .26);
  border-radius: 16px;
  background: rgba(227, 184, 95, .045);
  gap: 10px;
}

.account-dialog.is-recharge .enterprise-purchase-icon { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid rgba(227, 184, 95, .32); border-radius: 7px; color: var(--checkout-gold); }
.account-dialog.is-recharge .enterprise-purchase-icon svg { width: 16px; height: 16px; }
.account-dialog.is-recharge .enterprise-purchase-panel > div { display: grid; min-width: 0; gap: 3px; }
.account-dialog.is-recharge .enterprise-purchase-panel strong { color: #eee9e0; font-size: 11px; }
.account-dialog.is-recharge .enterprise-purchase-panel span { color: var(--checkout-muted); font-size: 10px; line-height: 1.45; }
.account-dialog.is-recharge .enterprise-purchase-panel > b { padding: 4px 7px; border: 1px solid rgba(227, 184, 95, .4); border-radius: 5px; color: var(--checkout-gold); font-size: 9px; font-weight: 750; white-space: nowrap; }

.account-dialog.is-recharge .checkout-summary {
  display: grid;
  min-height: 174px;
  overflow: hidden;
  align-self: start;
  border: 1px solid rgba(227, 184, 95, .28);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(227, 184, 95, .075), rgba(255, 255, 255, .012));
}

.account-dialog.is-recharge .checkout-summary-empty { display: flex; min-height: 80px; padding: 16px; align-items: center; color: var(--checkout-muted); gap: 9px; font-size: 11px; }
.account-dialog.is-recharge .checkout-summary-empty svg { width: 17px; height: 17px; color: var(--checkout-gold); }
.account-dialog.is-recharge .checkout-summary-head { display: flex; min-width: 0; padding: 13px 15px 11px; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(227, 184, 95, .19); gap: 12px; }
.account-dialog.is-recharge .checkout-summary-head > div { display: grid; min-width: 0; gap: 3px; }
.account-dialog.is-recharge .checkout-summary-head span { color: var(--checkout-gold); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.account-dialog.is-recharge .checkout-summary-head strong { overflow: hidden; color: var(--checkout-ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.account-dialog.is-recharge .checkout-summary-head > b { display: inline-flex; align-items: center; color: var(--checkout-gold); gap: 5px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.account-dialog.is-recharge .checkout-summary-head > b svg { width: 13px; height: 13px; }
.account-dialog.is-recharge .checkout-summary dl { display: grid; margin: 0; padding: 12px 15px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.account-dialog.is-recharge .checkout-summary dl div { display: grid; min-width: 0; gap: 4px; }
.account-dialog.is-recharge .checkout-summary dt { color: var(--checkout-faint); font-size: 9px; }
.account-dialog.is-recharge .checkout-summary dd { overflow: hidden; margin: 0; color: #f0d9a0; font-family: Inter, "PingFang SC", sans-serif; font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.account-dialog.is-recharge .checkout-summary dd em { margin-left: 3px; color: #b5a682; font-family: "PingFang SC", sans-serif; font-size: 9px; font-style: normal; font-weight: 600; }
.account-dialog.is-recharge .checkout-summary > p { display: flex; margin: 0; padding: 0 15px 13px; align-items: center; border: 0; color: var(--checkout-muted); gap: 6px; font-size: 10px; line-height: 1.45; }
.account-dialog.is-recharge .checkout-summary > p svg { width: 13px; height: 13px; flex: 0 0 auto; color: var(--checkout-gold); }

.account-dialog.is-recharge .checkout-action-row { position: sticky; z-index: 2; bottom: -28px; display: grid; padding: 12px 0 0; grid-template-columns: minmax(0, 1fr) auto; align-items: center; background: linear-gradient(180deg, rgba(16, 16, 21, 0), #101015 34%); gap: 16px; }
.account-dialog.is-recharge .checkout-security-note { display: flex; margin: 0; align-items: center; color: var(--checkout-faint); gap: 7px; font-size: 10px; line-height: 1.5; }
.account-dialog.is-recharge .checkout-security-note svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--checkout-gold); }
.account-dialog.is-recharge .recharge-submit { width: auto; min-width: 224px; min-height: 48px; margin: 0; justify-content: center; border-color: #e8be68; border-radius: 7px; background: linear-gradient(135deg, #f2cf7c, #dcae54); color: #2a1f0c; box-shadow: 0 9px 20px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .36); font-size: 12px; font-weight: 850; }
.account-dialog.is-recharge .recharge-submit:hover:not(:disabled) { border-color: #ffe1a0; background: linear-gradient(135deg, #ffe09a, #e8b859); box-shadow: 0 12px 26px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .48); transform: translateY(-1px); }
.account-dialog.is-recharge .recharge-submit:disabled { border-color: rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .06); color: #777176; box-shadow: none; }
.account-dialog.is-recharge .recharge-submit svg { width: 16px; height: 16px; }

.account-dialog.is-recharge .payment-result { display: grid; padding: 15px; border-color: rgba(227, 184, 95, .28); border-radius: 16px; background: rgba(227, 184, 95, .055); color: #d7cfbf; gap: 13px; }
.account-dialog.is-recharge .payment-result-head { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.account-dialog.is-recharge .payment-result-icon { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid currentColor; border-radius: 50%; color: var(--checkout-gold); }
.account-dialog.is-recharge .payment-result-icon svg { width: 16px; height: 16px; }
.account-dialog.is-recharge .payment-result-icon.is-success { color: #73d5a0; }
.account-dialog.is-recharge .payment-result-icon.is-danger { color: #ef9797; }
.account-dialog.is-recharge .payment-result-head > div { display: grid; min-width: 0; gap: 3px; }
.account-dialog.is-recharge .payment-result-head strong { color: var(--checkout-ink); font-size: 12px; }
.account-dialog.is-recharge .payment-result-head span { color: var(--checkout-muted); font-size: 10px; line-height: 1.45; }
.account-dialog.is-recharge .payment-status-chip { padding: 4px 7px; border: 1px solid rgba(227, 184, 95, .32); border-radius: 999px; color: var(--checkout-gold); font-size: 9px; white-space: nowrap; }
.account-dialog.is-recharge .payment-status-chip.is-success { border-color: rgba(115, 213, 160, .4); color: #82d9a7; }
.account-dialog.is-recharge .payment-status-chip.is-danger { border-color: rgba(239, 151, 151, .38); color: #f0a2a2; }
.account-dialog.is-recharge .payment-order-meta { display: grid; margin: 0; padding: 9px 11px; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid rgba(255, 255, 255, .075); border-radius: 6px; background: rgba(0, 0, 0, .16); gap: 10px; }
.account-dialog.is-recharge .payment-order-meta div { display: grid; min-width: 0; gap: 3px; }
.account-dialog.is-recharge .payment-order-meta dt { color: var(--checkout-faint); font-size: 9px; }
.account-dialog.is-recharge .payment-order-meta dd { overflow: hidden; margin: 0; color: #e7e1d5; font-family: Inter, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.account-dialog.is-recharge .payment-qr { display: grid; grid-template-columns: minmax(120px, 160px) minmax(0, 1fr); align-items: center; gap: 14px; }
.account-dialog.is-recharge .payment-result .payment-qr img { width: min(160px, 100%); margin: 0; padding: 6px; border-radius: 6px; background: #fff; }
.account-dialog.is-recharge .payment-qr > div { display: grid; gap: 5px; }
.account-dialog.is-recharge .payment-qr strong,
.account-dialog.is-recharge .payment-code-card strong,
.account-dialog.is-recharge .payment-redirect-card strong,
.account-dialog.is-recharge .payment-mock-card strong { color: var(--checkout-ink); font-size: 11px; }
.account-dialog.is-recharge .payment-qr span,
.account-dialog.is-recharge .payment-code-card small,
.account-dialog.is-recharge .payment-redirect-card small,
.account-dialog.is-recharge .payment-mock-card small { color: var(--checkout-muted); font-size: 10px; line-height: 1.5; }
.account-dialog.is-recharge .payment-code-card,
.account-dialog.is-recharge .payment-redirect-card,
.account-dialog.is-recharge .payment-mock-card { display: grid; min-width: 0; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.account-dialog.is-recharge .payment-code-card > div,
.account-dialog.is-recharge .payment-redirect-card > div,
.account-dialog.is-recharge .payment-mock-card > div { display: grid; min-width: 0; gap: 4px; }
.account-dialog.is-recharge .payment-code-icon,
.account-dialog.is-recharge .payment-code-card > span,
.account-dialog.is-recharge .payment-redirect-card > svg,
.account-dialog.is-recharge .payment-mock-card > svg { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(227, 184, 95, .34); border-radius: 6px; color: var(--checkout-gold); }
.account-dialog.is-recharge .payment-code-icon svg,
.account-dialog.is-recharge .payment-redirect-card > svg,
.account-dialog.is-recharge .payment-mock-card > svg { width: 15px; height: 15px; }
.account-dialog.is-recharge .payment-code-actions { display: flex !important; flex-wrap: wrap; gap: 6px; }
.account-dialog.is-recharge .payment-code-actions button,
.account-dialog.is-recharge .payment-result-actions button,
.account-dialog.is-recharge .payment-mock-card button,
.account-dialog.is-recharge .payment-redirect-card a { display: inline-flex; min-height: 30px; padding: 0 9px; cursor: pointer; align-items: center; justify-content: center; border: 1px solid rgba(227, 184, 95, .4); border-radius: 5px; background: rgba(227, 184, 95, .06); color: var(--checkout-gold-strong); gap: 5px; font-size: 10px; font-weight: 700; text-decoration: none; }
.account-dialog.is-recharge .payment-code-actions button:hover,
.account-dialog.is-recharge .payment-result-actions button:hover,
.account-dialog.is-recharge .payment-mock-card button:hover,
.account-dialog.is-recharge .payment-redirect-card a:hover { border-color: var(--checkout-gold); background: rgba(227, 184, 95, .16); }
.account-dialog.is-recharge .payment-code-actions svg,
.account-dialog.is-recharge .payment-result-actions svg { width: 13px; height: 13px; }
.account-dialog.is-recharge .payment-result-copy { margin: 0; color: var(--checkout-muted); font-size: 11px; line-height: 1.55; }
.account-dialog.is-recharge .payment-result-actions { display: flex; justify-content: flex-end; }

.account-dialog.is-recharge :is(button, a):focus-visible {
  outline: 2px solid var(--checkout-focus);
  outline-offset: 3px;
}

.account-dialog.is-recharge .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 940px) {
  .account-dialog.is-recharge {
    width: min(940px, calc(100vw - 28px));
    height: min(720px, calc(100dvh - 28px));
    max-height: calc(100dvh - 28px);
  }

  .account-dialog.is-recharge .recharge-view { grid-template-columns: 250px minmax(0, 1fr); }
  .account-dialog.is-recharge .recharge-aside { padding: 25px 20px 20px; }
  .account-dialog.is-recharge .recharge-aside-copy { margin-top: 26px; }
  .account-dialog.is-recharge .recharge-aside-copy h2 { font-size: 23px; }
  .account-dialog.is-recharge .recharge-scroll { padding-right: 22px; padding-left: 22px; }
  .account-dialog.is-recharge .recharge-header { padding-left: 22px; }
  .account-dialog.is-recharge .recharge-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .account-dialog.is-recharge {
    width: calc(100vw - 20px);
    height: calc(100dvh - 20px);
    min-height: 0;
    max-height: calc(100dvh - 20px);
    border-radius: 13px;
  }

  .account-dialog.is-recharge .recharge-view { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .account-dialog.is-recharge .recharge-aside { display: grid; padding: 17px 20px; grid-template-columns: auto minmax(0, 1fr); align-items: start; border-right: 0; border-bottom: 1px solid var(--checkout-line); column-gap: 13px; row-gap: 4px; }
  .account-dialog.is-recharge .recharge-aside::after { right: -110px; bottom: -175px; width: 220px; height: 220px; }
  .account-dialog.is-recharge .recharge-brand { grid-row: 1 / span 2; }
  .account-dialog.is-recharge .recharge-aside-copy { margin: 0; gap: 3px; }
  .account-dialog.is-recharge .recharge-aside-copy p { font-size: 8px; }
  .account-dialog.is-recharge .recharge-aside-copy h2 { font-size: 21px; }
  .account-dialog.is-recharge .recharge-aside-copy > span { font-size: 10px; line-height: 1.45; }
  .account-dialog.is-recharge .recharge-benefits { margin: 10px 0 0; padding: 0; grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 0; background: transparent; gap: 8px; }
  .account-dialog.is-recharge .recharge-benefits li { grid-template-columns: 17px minmax(0, 1fr); gap: 5px; color: #aaa4a7; font-size: 9px; line-height: 1.42; }
  .account-dialog.is-recharge .recharge-benefit-icon { width: 17px; height: 17px; border-radius: 4px; }
  .account-dialog.is-recharge .recharge-benefit-icon svg { width: 10px; height: 10px; }
  .account-dialog.is-recharge .recharge-business-card { display: none; }
  .account-dialog.is-recharge .recharge-header { min-height: 93px; padding: 20px 125px 15px 20px; }
  .account-dialog.is-recharge .recharge-header h2 { font-size: 22px; }
  .account-dialog.is-recharge .recharge-back { top: 22px; right: 61px; }
  .account-dialog.is-recharge > .modal-close { top: 16px; right: 16px; }
  .account-dialog.is-recharge .recharge-scroll { padding: 18px 20px 24px; gap: 19px; }
  .account-dialog.is-recharge .checkout-action-row { grid-template-columns: 1fr; gap: 10px; }
  .account-dialog.is-recharge .recharge-submit { width: 100%; }
  .account-dialog.is-recharge > #accountStatus { right: 20px; bottom: 16px; max-width: calc(100% - 40px); }
}

@media (max-width: 500px) {
  .account-dialog.is-recharge .recharge-aside-copy > span { display: none; }
  .account-dialog.is-recharge .recharge-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-dialog.is-recharge .recharge-benefits li:last-child { display: none; }
  .account-dialog.is-recharge .recharge-header { min-height: 85px; padding: 18px 110px 13px 17px; }
  .account-dialog.is-recharge .recharge-header h2 { font-size: 20px; }
  .account-dialog.is-recharge .recharge-header > div > p:last-child { font-size: 10px; }
  .account-dialog.is-recharge .recharge-back { top: 19px; right: 55px; padding: 0 4px; font-size: 10px; }
  .account-dialog.is-recharge .recharge-back svg { width: 12px; height: 12px; }
  .account-dialog.is-recharge > .modal-close { top: 14px; right: 13px; width: 30px; height: 30px; font-size: 22px; }
  .account-dialog.is-recharge .recharge-scroll { padding: 16px 15px 20px; gap: 17px; }
  .account-dialog.is-recharge .recharge-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .account-dialog.is-recharge .recharge-plan { min-height: 140px; padding: 14px 11px 12px; gap: 6px; }
  .account-dialog.is-recharge .recharge-plan-name { font-size: 10px; }
  .account-dialog.is-recharge .recharge-plan-credit strong { font-size: 19px; }
  .account-dialog.is-recharge .recharge-plan-price { font-size: 14px; }
  .account-dialog.is-recharge .payment-methods { grid-template-columns: 1fr; gap: 7px; }
  .account-dialog.is-recharge .payment-method { min-height: 48px; }
  .account-dialog.is-recharge .enterprise-purchase-panel { padding: 10px; grid-template-columns: 28px minmax(0, 1fr); }
  .account-dialog.is-recharge .enterprise-purchase-panel > b { display: none; }
  .account-dialog.is-recharge .enterprise-purchase-icon { width: 28px; height: 28px; }
  .account-dialog.is-recharge .checkout-summary dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-dialog.is-recharge .checkout-summary dl div:last-child { grid-column: 1 / -1; }
  .account-dialog.is-recharge .checkout-security-note { font-size: 9px; }
  .account-dialog.is-recharge .payment-result-head { grid-template-columns: 30px minmax(0, 1fr); }
  .account-dialog.is-recharge .payment-status-chip { grid-column: 2; justify-self: start; }
  .account-dialog.is-recharge .payment-qr { grid-template-columns: 1fr; }
  .account-dialog.is-recharge .payment-result .payment-qr img { width: 142px; }
  .account-dialog.is-recharge .payment-code-card,
  .account-dialog.is-recharge .payment-redirect-card,
  .account-dialog.is-recharge .payment-mock-card { grid-template-columns: 30px minmax(0, 1fr); }
  .account-dialog.is-recharge .payment-code-actions,
  .account-dialog.is-recharge .payment-redirect-card > a,
  .account-dialog.is-recharge .payment-mock-card > button { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .account-dialog.is-recharge .recharge-plan-check,
  .account-dialog.is-recharge .recharge-submit,
  .account-dialog.is-recharge .payment-method { transition: none; }
}

/* --------------------------------------------------------------------------
   Generation modes
   Each mode owns its inputs so a hidden field can never silently leak into a
   different task type.  The layout stays deliberately calm and spacious on
   small screens instead of compressing three tabs into a pill wall.
   -------------------------------------------------------------------------- */
.mode-tabs {
  display: grid;
  width: 100%;
  max-width: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.mode-button {
  min-width: 0;
  padding-inline: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mode-guidance {
  display: grid;
  min-width: 0;
  padding: 13px 14px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--studio-line);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--studio-accent-soft), var(--studio-surface-soft));
  gap: 10px;
}

.mode-guidance-icon,
.text-mode-note-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--studio-accent) 42%, var(--studio-line));
  border-radius: 20px;
  background: var(--studio-surface-soft);
  color: var(--studio-accent);
}

.mode-guidance-icon svg,
.text-mode-note-icon svg { width: 17px; height: 17px; }

.mode-guidance > div,
.text-mode-note > div { display: grid; min-width: 0; gap: 3px; }

.mode-guidance strong,
.text-mode-note strong { color: var(--studio-ink); font-size: 12px; font-weight: 750; }

.mode-guidance-copy,
.mode-guidance span:not(.mode-guidance-icon):not(.mode-guidance-requirement),
.text-mode-note p {
  margin: 0;
  color: var(--studio-muted);
  font-size: 10px;
  line-height: 1.55;
}

.mode-guidance-requirement {
  max-width: 150px;
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--studio-accent) 32%, var(--studio-line));
  border-radius: 999px;
  color: var(--studio-accent);
  font-size: 9px;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
}

.mode-panel[hidden] { display: none !important; }

.text-mode-note {
  display: grid;
  min-height: 82px;
  padding: 14px;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  border: 1px solid var(--studio-line);
  border-radius: 16px;
  background: var(--studio-surface-soft);
  gap: 10px;
}

.text-mode-note p { margin-top: 2px; }

.reference-field { display: grid; gap: 10px; }

.reference-field .field-heading { margin-bottom: 0; }
.reference-field .field-heading > div { display: grid; min-width: 0; gap: 3px; }

.asset-count {
  flex: 0 0 auto;
  color: var(--studio-accent-2);
  font-family: Inter, sans-serif;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.reference-dropzone {
  display: grid;
  min-height: 82px;
  padding: 12px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  border: 1px dashed color-mix(in srgb, var(--studio-accent) 48%, var(--studio-line-strong));
  border-radius: 16px;
  background: linear-gradient(145deg, var(--studio-accent-soft), var(--studio-surface-soft));
  gap: 10px;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms var(--studio-ease);
}

.reference-dropzone.is-dragover {
  border-color: var(--studio-accent-2);
  background: color-mix(in srgb, var(--studio-accent-2) 10%, var(--studio-surface));
  transform: translateY(-1px);
}

.reference-dropzone-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--studio-line-strong);
  border-radius: 11px;
  color: var(--studio-accent-2);
}

.reference-dropzone-icon svg { width: 17px; height: 17px; }

.reference-dropzone-copy { display: grid; min-width: 0; gap: 3px; }
.reference-dropzone-copy strong { overflow: hidden; color: var(--studio-ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.reference-dropzone-copy span { color: var(--studio-faint); font-size: 9px; line-height: 1.45; }

.reference-add-button {
  display: inline-flex;
  min-height: 38px;
  padding: 0 11px;
  cursor: pointer;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--studio-accent) 48%, var(--studio-line));
  border-radius: 11px;
  background: var(--studio-surface-soft);
  color: var(--studio-accent);
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms var(--studio-ease);
}

.reference-add-button:hover { border-color: var(--studio-accent); background: var(--studio-accent-soft); transform: translateY(-1px); }
.reference-add-button svg { width: 14px; height: 14px; }

.reference-validation {
  min-height: 16px;
  margin: 0 2px;
  color: var(--studio-faint);
  font-size: 10px;
  line-height: 1.5;
}

.reference-validation.is-success { color: var(--studio-accent-2); }
.reference-validation.is-error { color: var(--studio-danger); }

.reference-assets {
  display: grid;
  max-height: 264px;
  overflow-y: auto;
  gap: 8px;
  scrollbar-color: color-mix(in srgb, var(--studio-accent) 45%, transparent) transparent;
  scrollbar-width: thin;
}

.reference-asset {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 62px;
  padding: 7px 8px 7px 7px;
  grid-template-columns: 50px minmax(0, 1fr) 34px;
  align-items: center;
  border: 1px solid var(--studio-line);
  border-radius: 14px;
  background: var(--studio-surface-soft);
  gap: 9px;
}

.reference-asset-preview {
  display: grid;
  width: 50px;
  height: 50px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--studio-line);
  border-radius: 18px;
  background: var(--studio-bg-raised);
  color: var(--studio-accent-2);
  object-fit: cover;
}

.reference-asset-preview svg { width: 20px; height: 20px; }
.reference-asset-meta { display: grid; min-width: 0; gap: 4px; }
.reference-asset-meta strong { overflow: hidden; color: var(--studio-ink); font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.reference-asset-meta span { overflow: hidden; color: var(--studio-faint); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.reference-asset-remove,
.frame-remove {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  cursor: pointer;
  place-items: center;
  border: 1px solid var(--studio-line);
  border-radius: 18px;
  background: transparent;
  color: var(--studio-muted);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.reference-asset-remove:hover,
.frame-remove:hover { border-color: color-mix(in srgb, var(--studio-danger) 58%, var(--studio-line)); background: color-mix(in srgb, var(--studio-danger) 10%, transparent); color: var(--studio-danger); }
.reference-asset-remove svg,
.frame-remove svg { width: 15px; height: 15px; }
.reference-asset-remove[hidden],
.frame-remove[hidden] { display: none !important; }

.frame-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.frame-slot-wrap { position: relative; min-width: 0; }
.frame-slot-wrap .frame-slot { width: 100%; }
.frame-slot-wrap .frame-remove { position: absolute; z-index: 3; top: 8px; right: 8px; }
.frame-slot-wrap .frame-slot.has-preview + .frame-remove { display: grid; }

.create-cost { color: inherit; font-size: .84em; font-weight: 550; opacity: .82; }
.create-cost b { font-family: Inter, sans-serif; font-variant-numeric: tabular-nums; }

.job-mode-badge {
  display: inline-flex;
  min-height: 18px;
  margin-right: 6px;
  padding: 0 6px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--studio-accent) 36%, var(--studio-line));
  border-radius: 999px;
  background: var(--studio-accent-soft);
  color: var(--studio-accent);
  font-size: 8px;
  font-weight: 750;
  line-height: 1;
  vertical-align: 1px;
  white-space: nowrap;
}

.mode-button:focus-visible,
.reference-add-button:focus-visible,
.reference-asset-remove:focus-visible,
.frame-remove:focus-visible,
.frame-slot:focus-visible {
  outline: 2px solid var(--studio-accent-2);
  outline-offset: 3px;
}

:root[data-theme="light"] .mode-guidance,
:root[data-theme="light"] .text-mode-note,
:root[data-theme="light"] .reference-dropzone,
:root[data-theme="light"] .reference-asset,
:root[data-theme="light"] .reference-asset-preview {
  background: rgba(255, 255, 255, .72);
}

@media (max-width: 560px) {
  .mode-tabs { gap: 3px; }
  .mode-button { height: 38px; padding-inline: 5px; font-size: 11px; }
  .mode-guidance { padding: 11px; grid-template-columns: 32px minmax(0, 1fr); gap: 9px; }
  .mode-guidance-requirement { grid-column: 2; justify-self: start; max-width: none; padding: 3px 7px; }
  .reference-dropzone { grid-template-columns: 32px minmax(0, 1fr); }
  .reference-add-button { grid-column: 2; justify-self: start; min-height: 36px; }
  .reference-assets { max-height: 220px; }
}

@media (max-width: 380px) {
  .mode-button { font-size: 10px; }
  .mode-guidance strong { font-size: 11px; }
  .mode-guidance span:not(.mode-guidance-icon):not(.mode-guidance-requirement) { font-size: 9px; }
  .reference-dropzone-copy strong { font-size: 10px; }
  .reference-dropzone-copy span { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .reference-dropzone,
  .reference-add-button,
  .reference-asset-remove,
  .frame-remove { transition: none; }
}

/* Night campaign banner: a compact activity entry instead of a coupon strip. */
.header-banner {
  width: min(540px, 50vw);
  height: 48px;
}

.banner-button {
  position: relative;
  z-index: 0;
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  height: 48px;
  min-height: 48px;
  gap: 11px;
  padding: 6px 9px 6px 8px;
  overflow: hidden;
  border: 1px solid rgba(157, 139, 255, .44);
  border-radius: 16px;
  background: linear-gradient(110deg, #101827 0%, #1b1935 57%, #162d35 100%);
  color: #f7f5ff;
  box-shadow: 0 12px 30px rgba(17, 19, 43, .24), inset 0 1px 0 rgba(255, 255, 255, .12);
  isolation: isolate;
}

.banner-button::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 5% 50%, rgba(121, 95, 230, .34), transparent 26%),
    radial-gradient(circle at 84% 0%, rgba(35, 211, 193, .2), transparent 32%);
  pointer-events: none;
}

.banner-button::after {
  position: absolute;
  z-index: -1;
  top: -70%;
  right: 7%;
  width: 34%;
  height: 240%;
  content: "";
  transform: rotate(18deg);
  background: repeating-linear-gradient(90deg, transparent 0 12px, rgba(255, 255, 255, .04) 13px 14px);
  opacity: .65;
  pointer-events: none;
}

.banner-button:hover {
  border-color: rgba(179, 164, 255, .76);
  background: linear-gradient(110deg, #121b31 0%, #241d48 57%, #183b40 100%);
  box-shadow: 0 16px 34px rgba(20, 22, 54, .3), inset 0 1px 0 rgba(255, 255, 255, .16);
  transform: translateY(-1px);
}

.banner-button:focus-visible {
  outline: 3px solid rgba(171, 157, 255, .9);
  outline-offset: 3px;
}

.banner-mark {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(189, 178, 255, .58);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(147, 126, 255, .36), rgba(72, 211, 195, .13));
  color: #d7d1ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 5px 13px rgba(12, 14, 31, .2);
}

.banner-mark::after {
  position: absolute;
  right: -2px;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  content: "";
  background: #7de8d5;
  box-shadow: 0 0 10px rgba(125, 232, 213, .9);
}

.banner-mark svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.banner-copy {
  display: grid !important;
  min-width: 0;
  align-content: center;
  align-items: start;
  justify-items: start;
  gap: 1px;
  overflow: hidden;
  white-space: nowrap;
}

.banner-kicker {
  overflow: hidden;
  color: #aaa1ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .18em;
  line-height: 1;
  text-overflow: ellipsis;
}

.banner-message {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  line-height: 1.1;
}

.banner-message strong {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
}

.banner-message em {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid rgba(242, 207, 125, .44);
  border-radius: 999px;
  background: rgba(242, 207, 125, .14);
  color: #f5d993;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.banner-copy > small {
  margin-left: 0;
  overflow: hidden;
  color: #aab3cb;
  font-size: 9px;
  line-height: 1;
  text-overflow: ellipsis;
}

.banner-cta {
  display: inline-flex;
  min-width: 76px;
  height: 30px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid rgba(212, 207, 255, .3);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #f1efff;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.banner-cta > span:last-child {
  font-size: 14px;
  line-height: 1;
}

:root[data-theme="light"] .banner-button {
  border-color: #d9d2f1;
  background: linear-gradient(110deg, #ffffff 0%, #f4f1ff 60%, #fff8e7 100%);
  color: #25283a;
  box-shadow: 0 11px 28px rgba(74, 60, 130, .13), inset 0 1px 0 #ffffff;
}

:root[data-theme="light"] .banner-button::before {
  background:
    radial-gradient(circle at 5% 50%, rgba(133, 111, 232, .16), transparent 26%),
    radial-gradient(circle at 84% 0%, rgba(35, 178, 163, .1), transparent 32%);
}

:root[data-theme="light"] .banner-button:hover {
  border-color: #b9ace9;
  background: linear-gradient(110deg, #ffffff 0%, #efebff 60%, #fff4d6 100%);
  box-shadow: 0 15px 32px rgba(74, 60, 130, .17), inset 0 1px 0 #ffffff;
}

:root[data-theme="light"] .banner-mark {
  border-color: #c8bcef;
  background: linear-gradient(145deg, #e9e4ff, #dff8f2);
  color: #5b49bb;
  box-shadow: inset 0 1px 0 #ffffff, 0 5px 13px rgba(74, 60, 130, .12);
}

:root[data-theme="light"] .banner-mark::after { background: #159d8c; box-shadow: 0 0 9px rgba(21, 157, 140, .45); }
:root[data-theme="light"] .banner-kicker { color: #6d52d7; }
:root[data-theme="light"] .banner-message strong { color: #25283a; }
:root[data-theme="light"] .banner-message em { border-color: #ecd49a; background: #fff3cc; color: #76541b; }
:root[data-theme="light"] .banner-copy > small { color: #69738a; }
:root[data-theme="light"] .banner-cta { border-color: #c7bbed; background: #5542b6; color: #ffffff; }

@media (max-width: 1100px) {
  .header-banner { width: min(500px, 46vw); }
  .banner-copy > small { display: none; }
}

@media (max-width: 860px) {
  .header-banner { display: none; }
  .mobile-banner-wrap {
    display: block;
    width: calc(100% - 32px);
    height: 68px;
    margin: 12px 16px 0;
  }
  .mobile-banner-wrap .banner-button {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    height: 68px;
    min-height: 68px;
    padding: 9px 9px 9px 8px;
  }
  .mobile-banner-wrap .banner-copy { gap: 2px; }
  .mobile-banner-wrap .banner-copy > small { display: block; }
  .mobile-banner-wrap .banner-cta { min-width: 36px; width: 36px; padding: 0; }
  .mobile-banner-wrap .banner-cta-label { display: none; }
}

@media (max-width: 560px) {
  .mobile-banner-wrap { height: 64px; margin-top: 10px; }
  .mobile-banner-wrap .banner-button { height: 64px; min-height: 64px; grid-template-columns: 34px minmax(0, 1fr) auto; }
  .mobile-banner-wrap .banner-mark { width: 32px; height: 32px; border-radius: 18px; }
  .mobile-banner-wrap .banner-mark svg { width: 16px; height: 16px; }
  .mobile-banner-wrap .banner-message { gap: 5px; }
  .mobile-banner-wrap .banner-message strong { font-size: 10px; }
  .mobile-banner-wrap .banner-message em { display: inline-flex; padding: 2px 6px; font-size: 8px; }
  .mobile-banner-wrap .banner-copy > small { font-size: 8px; }
  .mobile-banner-wrap .banner-cta { height: 28px; }
}

@media (max-width: 380px) {
  .mobile-banner-wrap .banner-kicker { display: none; }
  .mobile-banner-wrap .banner-copy { gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .banner-button,
  .banner-button:hover,
  .banner-button:active { transform: none; transition: none; }
}

/* Layout refinement: give the studio a calmer two-column rhythm on desktop,
   while keeping each control group readable at tablet and mobile widths. */
.workbench {
  width: min(1440px, calc(100% - 96px));
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  padding-top: 40px;
}

.composer,
.case-preview {
  border-radius: 24px;
}

.composer {
  padding: 26px;
  gap: 20px;
}

.case-preview {
  padding: 16px;
}

.mode-tabs {
  width: 100%;
}

.mode-button {
  flex: 1 1 0;
  min-width: 0;
}

.field-heading {
  margin-bottom: 11px;
}

.settings-grid {
  gap: 12px;
}

.setting-block {
  min-height: 84px;
  padding: 14px;
}

.quantity-row {
  margin-top: 2px;
}

@media (max-width: 1080px) and (min-width: 861px) {
  .workbench {
    width: min(920px, calc(100% - 48px));
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 28px;
  }

  .composer,
  .case-preview {
    width: 100%;
  }
}

@media (max-width: 860px) {
  .workbench {
    width: calc(100% - 32px);
    padding-top: 22px;
    gap: 18px;
  }

  .composer {
    padding: 20px;
    gap: 18px;
  }

  .case-preview {
    padding: 14px;
  }
}

@media (max-width: 560px) {
  .workbench {
    width: calc(100% - 24px);
    margin-inline: 12px;
    padding-top: 18px;
  }

  .composer,
  .case-preview {
    padding: 16px;
    border-radius: 20px;
  }

  .settings-grid {
    gap: 10px;
  }
}

/* Keep the mobile pricing cards readable in the light theme. The legacy
   stacked-row rules set a dark background before the studio theme layer. */
:root[data-theme="light"] .price-row {
  border-color: #e8e0d3;
  background: #fffdfa;
  box-shadow: 0 8px 20px rgba(60, 49, 31, .06);
}

:root[data-theme="light"] .price-row > span {
  color: #2b313e;
}

:root[data-theme="light"] .price-row > span + span {
  border-color: #e7dfd3;
  background: #f7f9fc;
}

:root[data-theme="light"] .price-head {
  background: #fbf7ef;
  color: #806b4d;
  box-shadow: none;
}

:root[data-theme="light"] .service {
  color: #2b313e;
}

:root[data-theme="light"] .service svg {
  color: #159d8c;
}

:root[data-theme="light"] .price {
  color: #8a6527;
}

:root[data-theme="light"] .price b {
  color: #8a6527;
}

@media (max-width: 860px) {
  :root[data-theme="light"] .price-row {
    box-shadow: 0 7px 18px rgba(60, 49, 31, .05);
  }

  :root[data-theme="light"] .price-row > span + span {
    border-top-color: #e7dfd3;
    border-left: 0;
  }

  .price-row > span {
    min-height: 76px;
    padding: 18px 16px;
  }

  .price-row > span + span {
    min-height: 92px;
  }

  .price b {
    font-size: 25px;
  }
}

/* Duration control: remove the native "drag resistance" and give the
   slider a larger, immediate touch target with a visible progress fill. */
.duration-block {
  --duration-fill: #7551d1;
  --duration-track: #dfe3ec;
  --duration-thumb: #ffffff;
  --duration-thumb-border: #7551d1;
  min-height: 92px;
  gap: 5px;
  justify-content: space-between;
  transition: none !important;
}

.duration-header strong {
  color: var(--duration-fill);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.duration-range {
  display: block;
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 0;
  cursor: grab;
  touch-action: none;
  appearance: none;
  -webkit-appearance: none;
  accent-color: transparent;
  background: transparent;
  transition: none !important;
}

.duration-range:active {
  cursor: grabbing;
}

.duration-range:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--duration-fill) 72%, #ffffff);
  outline-offset: 3px;
}

.duration-range::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--duration-fill) 0 var(--duration-progress, 0%), var(--duration-track) var(--duration-progress, 0%) 100%);
}

.duration-range::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6px;
  cursor: grab;
  border: 2px solid var(--duration-thumb-border);
  border-radius: 50%;
  background: var(--duration-thumb);
  box-shadow: 0 2px 7px rgba(45, 38, 88, .22), 0 0 0 3px color-mix(in srgb, var(--duration-fill) 12%, transparent);
  appearance: none;
  -webkit-appearance: none;
  transition: none !important;
}

.duration-range:active::-webkit-slider-thumb {
  cursor: grabbing;
  box-shadow: 0 2px 7px rgba(45, 38, 88, .26), 0 0 0 4px color-mix(in srgb, var(--duration-fill) 18%, transparent);
}

.duration-range::-moz-range-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--duration-track);
}

.duration-range::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--duration-fill);
}

.duration-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  cursor: grab;
  border: 2px solid var(--duration-thumb-border);
  border-radius: 50%;
  background: var(--duration-thumb);
  box-shadow: 0 2px 7px rgba(45, 38, 88, .22), 0 0 0 3px color-mix(in srgb, var(--duration-fill) 12%, transparent);
  transition: none !important;
}

.range-labels {
  margin-top: -3px;
  color: var(--studio-faint);
  font-variant-numeric: tabular-nums;
}

:root[data-theme="dark"] .duration-block,
:root:not([data-theme]) .duration-block {
  --duration-fill: #9a7bff;
  --duration-track: #343644;
  --duration-thumb: #f8f7ff;
  --duration-thumb-border: #9a7bff;
}

:root[data-theme="light"] .duration-block {
  --duration-fill: #7551d1;
  --duration-track: #dfe3ec;
  --duration-thumb: #ffffff;
  --duration-thumb-border: #7551d1;
  border-color: #c7bbed;
}

/* Campaign banner v2: a quiet, editorial price strip instead of a neon coupon. */
.header-banner {
  width: min(568px, 52vw);
  height: 46px;
}

.banner-button {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 46px;
  height: 46px;
  gap: 12px;
  padding: 5px 12px 5px 6px;
  overflow: hidden;
  border: 1px solid #2a354d;
  border-radius: 20px;
  background: #121927;
  color: #f5f7fb;
  box-shadow: 0 7px 18px rgba(5, 10, 22, .18);
  isolation: isolate;
}

.banner-button::before {
  position: absolute;
  z-index: -1;
  inset: 7px auto 7px 0;
  width: 3px;
  content: "";
  background: #e3b661;
}

.banner-button::after {
  display: none;
}

.banner-button:hover {
  border-color: #43516e;
  background: #172033;
  box-shadow: 0 9px 22px rgba(5, 10, 22, .22);
  transform: none;
}

.banner-button:active {
  transform: none;
}

.banner-button:focus-visible {
  outline: 3px solid #91a8ff;
  outline-offset: 3px;
}

.banner-rate {
  display: grid;
  width: 42px;
  height: 34px;
  align-content: center;
  justify-items: center;
  border: 1px solid #3f4a62;
  border-radius: 16px;
  background: #202a3e;
  color: #abb8d0;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.05;
}

.banner-rate strong {
  margin-top: 1px;
  color: #f1c673;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.04em;
}

.banner-copy {
  display: grid !important;
  min-width: 0;
  align-content: center;
  gap: 3px;
  overflow: hidden;
  white-space: normal;
}

.banner-kicker {
  display: none;
}

.banner-message {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  line-height: 1.1;
}

.banner-message strong {
  min-width: 0;
  overflow: hidden;
  color: #f7f8fc;
  font-size: 12px;
  font-weight: 720;
  letter-spacing: -.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.banner-message em {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #e3b661;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.2;
}

.banner-copy > small {
  overflow: hidden;
  color: #90a0bb;
  font-size: 9px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.banner-cta {
  display: inline-flex;
  min-width: auto;
  height: 32px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #c8d3ea;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.banner-cta svg {
  width: 13px;
  height: 13px;
  stroke-width: 2;
  transition: transform 150ms var(--ease-decelerate, ease);
}

.banner-button:hover .banner-cta svg {
  transform: translate(1px, -1px);
}

:root[data-theme="light"] .banner-button {
  border-color: #d8dce4;
  background: #fffefa;
  color: #1c2637;
  box-shadow: 0 7px 16px rgba(40, 51, 68, .07);
}

:root[data-theme="light"] .banner-button::before {
  background: #bf8c35;
}

:root[data-theme="light"] .banner-button:hover {
  border-color: #c3cad5;
  background: #ffffff;
  box-shadow: 0 9px 20px rgba(40, 51, 68, .1);
}

:root[data-theme="light"] .banner-rate {
  border-color: #ead8af;
  background: #fbf2df;
  color: #886837;
}

:root[data-theme="light"] .banner-rate strong,
:root[data-theme="light"] .banner-message em {
  color: #9b6820;
}

:root[data-theme="light"] .banner-message strong {
  color: #242c39;
}

:root[data-theme="light"] .banner-copy > small {
  color: #6d7787;
}

:root[data-theme="light"] .banner-cta {
  border-color: transparent;
  background: transparent;
  color: #445774;
}

@media (max-width: 1100px) {
  .header-banner { width: min(500px, 46vw); }
  .banner-copy > small { display: none; }
}

@media (max-width: 860px) {
  .mobile-banner-wrap {
    display: block;
    width: calc(100% - 32px);
    height: 58px;
    margin: 12px 16px 0;
  }

  .mobile-banner-wrap .banner-button {
    grid-template-columns: 42px minmax(0, 1fr) 28px;
    min-height: 58px;
    height: 58px;
    gap: 10px;
    padding: 7px 10px 7px 6px;
  }

  .mobile-banner-wrap .banner-copy > small {
    display: block;
  }

  .mobile-banner-wrap .banner-cta {
    width: 28px;
    min-width: 28px;
  }

  .mobile-banner-wrap .banner-cta-label {
    display: none;
  }
}

@media (max-width: 560px) {
  .mobile-banner-wrap {
    height: 54px;
    margin-top: 10px;
  }

  .mobile-banner-wrap .banner-button {
    grid-template-columns: 38px minmax(0, 1fr) 26px;
    min-height: 54px;
    height: 54px;
    gap: 9px;
    padding-right: 9px;
  }

  .mobile-banner-wrap .banner-rate {
    width: 38px;
    height: 32px;
    border-radius: 7px;
    font-size: 7px;
  }

  .mobile-banner-wrap .banner-rate strong {
    font-size: 12px;
  }

  .mobile-banner-wrap .banner-message {
    gap: 6px;
  }

  .mobile-banner-wrap .banner-message strong {
    font-size: 10.5px;
  }

  .mobile-banner-wrap .banner-message em {
    font-size: 8.5px;
  }

  .mobile-banner-wrap .banner-copy > small {
    display: none;
  }

  .mobile-banner-wrap .banner-cta {
    width: 26px;
    min-width: 26px;
    height: 30px;
  }
}

@media (max-width: 380px) {
  .mobile-banner-wrap .banner-message {
    gap: 4px;
  }

  .mobile-banner-wrap .banner-message strong {
    font-size: 10px;
  }

  .mobile-banner-wrap .banner-message em {
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .banner-cta svg {
    transition: none;
  }

  .banner-button:hover .banner-cta svg {
    transform: none;
  }
}

@media (max-width: 560px) {
  .duration-block {
    min-height: 94px;
    padding: 12px;
  }

  .duration-range {
    height: 40px;
  }
}

/* --------------------------------------------------------------------------
   Editorial workspace theme

   The public studio is a working surface, not a sci-fi landing page. Keep
   color for state and the one primary action; use structure, typography and
   separators for the rest of the hierarchy.
   -------------------------------------------------------------------------- */
:root {
  color-scheme: dark;
  --page: #0d0d10;
  --header: rgba(10, 10, 10, 0.85);
  --surface: rgba(20, 20, 24, 0.75);
  --surface-deep: rgba(17, 17, 20, 0.85);
  --surface-raised: rgba(25, 25, 30, 0.85);
  --line: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.14);
  --text: #f5f3f7;
  --muted: #918a99;
  --purple: #c084fc;
  --purple-soft: #a76bda;
  --gold: #e5c78d;
  --gold-dim: #b38c52;
  --gallery-row: calc((min(100vw, 1440px) - 56px) * 0.1875);
  --blur-sm: blur(8px);
  --blur-md: blur(16px);
  --blur-lg: blur(24px);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.3);
}

:root[data-theme="light"] {
  color-scheme: light;
  --page: #f6f7fb;
  --header: rgba(255, 255, 255, 0.85);
  --surface: rgba(255, 255, 255, 0.75);
  --surface-deep: rgba(241, 243, 248, 0.85);
  --surface-raised: rgba(255, 255, 255, 0.85);
  --line: #e4e7ee;
  --border: #d5dbe7;
  --text: #1d2230;
  --muted: #667085;
  --purple: #7551d1;
  --purple-soft: #8c69df;
  --gold: #a97c2b;
  --gold-dim: #8b661f;
  --surface-inset: #fbfcfe;
  --text-strong: #252b38;
  --muted-soft: #7b8698;
  --accent: #7551d1;
  --accent-surface: #f1edff;
  --accent-border: #b7a8e9;
  --warm-surface: #fff7ed;
  --warm-text: #73501c;
  --success: #2d7e5b;
  --danger: #b34b5a;
  --blur-sm: blur(8px);
  --blur-md: blur(16px);
  --blur-lg: blur(24px);
}

:root[data-theme="light"] {
  color-scheme: light;
  --studio-bg: #f7f6f2;
  --studio-bg-raised: #efeee9;
  --studio-surface: #ffffff;
  --studio-surface-strong: #ffffff;
  --studio-surface-soft: #f5f4ef;
  --studio-line: #dfddd5;
  --studio-line-strong: #cac7bd;
  --studio-ink: #20201c;
  --studio-muted: #6e6a61;
  --studio-faint: #8f8a80;
  --studio-accent: #b9432e;
  --studio-accent-2: #9b722a;
  --studio-accent-soft: #f7e4df;
  --studio-warm: #9b722a;
  --studio-shadow: 0 12px 30px rgba(49, 45, 37, .07);
}

html,
body {
  background: var(--studio-bg);
  color: var(--studio-ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

.app-shell,
:root[data-theme="light"] .app-shell {
  background: var(--studio-bg);
}

.app-shell::before,
:root[data-theme="light"] .app-shell::before {
  display: none;
}

.site-header,
:root[data-theme="light"] .site-header {
  height: 68px;
  border-bottom-color: var(--studio-line);
  background: var(--studio-bg);
  backdrop-filter: none;
}

.brand {
  gap: 8px;
  color: var(--studio-ink);
  font-size: 15px;
  letter-spacing: .055em;
}

.brand::after {
  display: none;
}

.brand-mark {
  width: 27px;
  height: 27px;
  border: 0;
  border-radius: 6px;
  background: var(--studio-accent);
  color: #fff;
  box-shadow: none;
  font-size: 12px;
}

.brand-name {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: .055em;
}

.header-actions {
  gap: 7px;
}

.history-button,
.theme-button {
  width: 38px;
  height: 38px;
  border-color: var(--studio-line);
  border-radius: 16px;
  background: transparent;
  color: var(--studio-muted);
}

.history-button:hover,
.theme-button:hover {
  border-color: var(--studio-line-strong);
  background: var(--studio-surface-soft);
  color: var(--studio-ink);
}

.login-button {
  min-width: 96px;
  height: 38px;
  padding-inline: 15px;
  border: 1px solid var(--studio-ink);
  border-radius: 16px;
  background: var(--studio-ink);
  color: var(--studio-bg);
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
}

.login-button:hover {
  border-color: var(--studio-accent);
  background: var(--studio-accent);
  color: #fff;
  box-shadow: none;
  transform: none;
}

/* One compact price strip, without a coupon card nested inside another card. */
.header-banner {
  width: min(530px, 48vw);
  height: 42px;
}

.banner-button,
:root[data-theme="light"] .banner-button {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  height: 42px;
  min-height: 42px;
  padding: 0 8px 0 12px;
  gap: 10px;
  overflow: visible;
  border: 0;
  border-left: 3px solid var(--studio-warm);
  border-radius: 0;
  background: transparent;
  color: var(--studio-ink);
  box-shadow: none;
}

.banner-button::before,
.banner-button::after {
  display: none;
}

.banner-button:hover,
:root[data-theme="light"] .banner-button:hover {
  background: var(--studio-surface-soft);
  box-shadow: none;
  transform: none;
}

.banner-button:focus-visible {
  outline: 2px solid var(--studio-accent);
  outline-offset: 3px;
}

.banner-rate {
  display: none;
}

.banner-copy {
  display: flex !important;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.banner-message {
  min-width: 0;
}

.banner-message strong,
:root[data-theme="light"] .banner-message strong {
  color: var(--studio-ink);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
}

.banner-message em,
:root[data-theme="light"] .banner-message em {
  color: var(--studio-warm);
  font-size: 11px;
  font-weight: 750;
}

.banner-copy > small {
  display: none !important;
}

.banner-cta,
:root[data-theme="light"] .banner-cta {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--studio-muted);
}

.banner-cta-label {
  display: none;
}

.banner-cta svg {
  width: 15px;
  height: 15px;
}

/* The composer and result are two sides of one product canvas. */
.workbench {
  width: min(1440px, calc(100% - 96px));
  margin: 32px auto 0;
  padding: 0;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--studio-line);
  border-radius: var(--studio-radius-xl);
  background: var(--studio-surface);
  box-shadow: var(--studio-shadow);
  grid-template-columns: minmax(390px, .92fr) minmax(0, 1.08fr);
}

.composer,
.case-preview,
:root[data-theme="light"] .composer,
:root[data-theme="light"] .case-preview {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.composer {
  padding: 26px;
  gap: 19px;
  border-right: 1px solid var(--studio-line);
}

.composer::before,
.case-preview::before {
  display: none;
}

.case-preview {
  padding: 20px;
}

.mode-tabs {
  width: 100%;
  padding: 0;
  gap: 0;
  border: 0;
  border-bottom: 1px solid var(--studio-line);
  border-radius: 0;
  background: transparent;
}

.mode-button {
  position: relative;
  height: 42px;
  min-width: 0;
  padding: 0 13px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--studio-muted);
  font-size: 12px;
  font-weight: 650;
}

.mode-button::after {
  position: absolute;
  right: 13px;
  bottom: -1px;
  left: 13px;
  height: 2px;
  content: "";
  background: transparent;
}

.mode-button:hover {
  background: var(--studio-surface-soft);
  color: var(--studio-ink);
}

.mode-button.is-active {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--studio-ink);
  box-shadow: none;
}

.mode-button.is-active::after {
  background: var(--studio-accent);
}

.mode-guidance {
  padding: 0 0 14px;
  gap: 8px;
  border: 0;
  border-bottom: 1px dashed var(--studio-line);
  border-radius: 0;
  background: transparent;
}

.mode-guidance-icon,
.text-mode-note-icon {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--studio-accent);
}

.mode-guidance strong,
.text-mode-note strong {
  color: var(--studio-ink);
  font-size: 12px;
  font-weight: 700;
}

.mode-guidance span:not(.mode-guidance-icon):not(.mode-guidance-requirement),
.text-mode-note p {
  color: var(--studio-muted);
  font-size: 11px;
  line-height: 1.55;
}

.mode-guidance-requirement {
  padding: 3px 6px;
  border: 0;
  border-radius: 4px;
  background: var(--studio-accent-soft);
  color: var(--studio-accent);
  font-size: 9px;
}

.text-mode-note {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.field-heading {
  margin-bottom: 8px;
}

.field-heading label,
.setting-label {
  color: var(--studio-ink);
  font-size: 12px;
  font-weight: 650;
}

.field-hint {
  color: var(--studio-muted);
  font-size: 10px;
}

.prompt-editor {
  min-height: 154px;
  padding: 15px 15px 34px;
  border-color: var(--studio-line);
  border-radius: 16px;
  background: var(--studio-surface-soft);
  box-shadow: none;
  color: var(--studio-ink);
  font-size: 13px;
  line-height: 1.72;
}

.prompt-editor:hover {
  border-color: var(--studio-line-strong);
}

.prompt-editor:focus {
  border-color: var(--studio-accent);
  box-shadow: 0 0 0 3px var(--studio-accent-soft);
}

.frame-grid {
  gap: 10px;
}

.frame-slot {
  min-height: 94px;
  border-color: var(--studio-line-strong);
  border-radius: 16px;
  background: transparent;
  color: var(--studio-muted);
}

.frame-slot:hover {
  border-color: var(--studio-accent);
  background: var(--studio-accent-soft);
  color: var(--studio-ink);
  transform: none;
}

.frame-slot svg {
  color: var(--studio-accent);
}

.reference-dropzone {
  min-height: 78px;
  border-color: var(--studio-line-strong);
  border-radius: 16px;
  background: transparent;
  transform: none;
}

.reference-dropzone.is-dragover {
  border-color: var(--studio-accent);
  background: var(--studio-accent-soft);
  transform: none;
}

.reference-dropzone-icon {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 0;
  color: var(--studio-accent);
}

.reference-add-button,
.reference-asset-remove,
.frame-remove {
  border-color: var(--studio-line);
  border-radius: 7px;
  background: transparent;
  color: var(--studio-ink);
  box-shadow: none;
  transform: none;
}

.reference-add-button:hover {
  border-color: var(--studio-accent);
  background: var(--studio-accent-soft);
  transform: none;
}

.settings-grid {
  gap: 10px;
}

.setting-block {
  min-height: 76px;
  padding: 12px;
  gap: 9px;
  border-color: var(--studio-line);
  border-radius: 16px;
  background: var(--studio-surface-soft);
}

.segment,
.ratio-button,
.quantity-button {
  border-radius: 6px;
  color: var(--studio-muted);
}

.segment:hover,
.ratio-button:hover:not(:disabled),
.quantity-button:hover {
  background: color-mix(in srgb, var(--studio-accent-soft) 70%, transparent);
  color: var(--studio-ink);
}

.segment.is-active,
.ratio-button.is-active,
.quantity-button.is-active {
  border-color: var(--studio-accent);
  background: var(--studio-accent);
  color: #fff;
  box-shadow: none;
}

.duration-block {
  --duration-fill: var(--studio-accent);
  --duration-track: var(--studio-line-strong);
  --duration-thumb: var(--studio-surface);
  --duration-thumb-border: var(--studio-accent);
  min-height: 82px;
  border-color: var(--studio-line);
}

:root[data-theme="light"] .duration-block {
  --duration-fill: var(--studio-accent);
  --duration-track: #d8d5cc;
  --duration-thumb: #fff;
  --duration-thumb-border: var(--studio-accent);
  border-color: var(--studio-line);
}

.duration-header strong {
  color: var(--studio-accent);
}

.duration-range::-webkit-slider-thumb {
  box-shadow: 0 1px 4px rgba(0, 0, 0, .16);
}

.duration-range:active::-webkit-slider-thumb {
  box-shadow: 0 1px 4px rgba(0, 0, 0, .22);
}

.quantity-row {
  min-height: 44px;
  padding: 3px;
  gap: 3px;
  border-color: var(--studio-line);
  border-radius: 16px;
  background: var(--studio-surface-soft);
}

.create-button {
  min-height: 50px;
  border: 1px solid var(--studio-accent);
  border-radius: 16px;
  background: var(--studio-accent);
  color: #fff;
  box-shadow: none;
  font-size: 12px;
  font-weight: 750;
}

.create-button::before {
  display: none;
}

.create-button:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--studio-accent) 82%, #000);
  background: color-mix(in srgb, var(--studio-accent) 82%, #000);
  box-shadow: none;
  transform: none;
}

.create-button:disabled {
  border-color: var(--studio-line);
  background: var(--studio-surface-soft);
  color: var(--studio-faint);
}

.engine-status {
  color: var(--studio-muted);
}

.engine-status button {
  color: var(--studio-accent);
}

.engine-dot {
  width: 6px;
  height: 6px;
  background: var(--studio-accent-2);
  box-shadow: none;
}

.case-preview {
  background: var(--studio-bg-raised);
}

.hero-video-wrap {
  border-color: var(--studio-line);
  border-radius: 9px;
  background: #0c0c0b;
  box-shadow: none;
}

.hero-video-wrap::after {
  display: none;
}

.quality-badge {
  padding: 4px 7px;
  border: 0;
  border-radius: 4px;
  background: rgba(16, 16, 14, .84);
  box-shadow: none;
  backdrop-filter: none;
}

.video-icon-button {
  border-color: rgba(255, 255, 255, .18);
  border-radius: 6px;
  background: rgba(16, 16, 14, .78);
  backdrop-filter: none;
}

.video-icon-button:hover {
  border-color: rgba(255, 255, 255, .44);
  background: rgba(16, 16, 14, .94);
}

.video-progress span {
  background: var(--studio-accent);
}

.case-strip {
  gap: 8px;
}

.case-thumb {
  border-color: transparent;
  border-radius: 7px;
}

.case-thumb.is-active {
  border-color: var(--studio-accent);
  box-shadow: 0 0 0 1px var(--studio-accent);
}

.case-thumb.is-active .thumb-play {
  background: var(--studio-accent);
}

.more-link {
  margin-top: 12px;
  padding: 6px 0;
  border: 0;
  border-radius: 0;
  color: var(--studio-muted);
}

.more-link:hover {
  border: 0;
  background: transparent;
  color: var(--studio-accent);
}

.pricing-section,
.examples-section {
  width: min(1440px, calc(100% - 96px));
}

.pricing-section {
  margin-top: 42px;
  padding: 42px 0 64px;
}

.section-rule {
  margin-bottom: 34px;
  background: var(--studio-line);
}

.pricing-intro,
.examples-heading {
  margin-bottom: 26px;
}

.eyebrow {
  color: var(--studio-muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .08em;
}

.pricing-intro h2,
.examples-heading h2 {
  margin-top: 6px;
  color: var(--studio-ink);
  font-size: clamp(30px, 3.1vw, 42px);
  font-weight: 720;
  letter-spacing: -.025em;
}

.price-group h3 {
  padding-left: 0;
  font-size: 15px;
}

.price-group h3::before {
  display: none;
}

.price-table {
  border-color: var(--studio-line);
  border-radius: 16px;
  background: var(--studio-surface);
  box-shadow: none;
}

.price-row {
  border-bottom-color: var(--studio-line);
}

.price-row > span + span {
  border-left-color: var(--studio-line);
  background: var(--studio-surface-soft);
}

.price-head {
  background: var(--studio-surface-soft);
}

.price-footer {
  border-color: var(--studio-line);
  border-radius: 16px;
  background: var(--studio-surface-soft);
}

.buy-button {
  border: 1px solid var(--studio-ink);
  border-radius: 16px;
  background: var(--studio-ink);
  color: var(--studio-bg);
  box-shadow: none;
}

.buy-button:hover {
  border-color: var(--studio-accent);
  background: var(--studio-accent);
  color: #fff;
}

.gallery-grid {
  gap: 8px;
}

.gallery-card,
.gallery-card > button {
  overflow: hidden;
  border-radius: 16px;
  background: var(--studio-surface-strong);
}

.gallery-card > button {
  border: 1px solid var(--studio-line);
  box-shadow: none;
}

.gallery-card:hover :is(img, video) {
  filter: saturate(1.02);
  transform: scale(1.015);
}

.prompt-pill {
  right: 8px;
  bottom: 8px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 5px;
  background: rgba(20, 20, 18, .9);
  box-shadow: none;
  backdrop-filter: none;
  font-size: 10px;
}

.modal-backdrop {
  background: rgba(15, 15, 13, .56);
  backdrop-filter: blur(3px);
}

.modal-dialog,
.utility-dialog,
.account-dialog {
  border-color: var(--studio-line);
  border-radius: 20px;
  background: var(--studio-surface-strong);
  box-shadow: 0 20px 52px rgba(0, 0, 0, .24);
}

.auth-methods,
.auth-method-button.is-active,
:root[data-theme="light"] .auth-methods,
:root[data-theme="light"] .auth-method-button.is-active {
  border-radius: 16px;
  background: var(--studio-surface-soft);
  box-shadow: none;
}

.auth-methods {
  border-color: var(--studio-line);
}

.auth-method-button {
  border-radius: 6px;
}

.auth-method-button.is-active {
  border-color: transparent;
  color: var(--studio-ink);
}

.phone-login-form input,
.email-auth-form input,
.code-button {
  border-color: var(--studio-line);
  border-radius: 16px;
  background: var(--studio-surface-soft);
}

.code-button,
.auth-submit {
  border-radius: 16px;
}

.code-button {
  color: var(--studio-accent);
}

.code-button:hover:not(:disabled) {
  border-color: var(--studio-accent);
  background: var(--studio-accent-soft);
  color: var(--studio-accent);
  transform: none;
}

@media (max-width: 1080px) and (min-width: 861px) {
  .workbench {
    width: min(920px, calc(100% - 48px));
    grid-template-columns: 1fr;
  }

  .composer {
    border-right: 0;
    border-bottom: 1px solid var(--studio-line);
  }
}

@media (max-width: 860px) {
  .header-banner {
    display: none;
  }

  .mobile-banner-wrap {
    width: calc(100% - 32px);
    height: 44px;
    margin: 12px 16px 0;
  }

  .mobile-banner-wrap .banner-button {
    grid-template-columns: minmax(0, 1fr) 28px;
    width: 100%;
    height: 44px;
    min-height: 44px;
    padding-left: 10px;
  }

  .mobile-banner-wrap .banner-message strong {
    font-size: 11px;
  }

  .mobile-banner-wrap .banner-message em {
    font-size: 10px;
  }

  .workbench {
    display: flex;
    width: calc(100% - 32px);
    margin: 20px 16px 0;
    flex-direction: column;
    border-radius: 20px;
  }

  .composer {
    padding: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--studio-line);
  }

  .case-preview {
    padding: 14px;
  }

  .pricing-section,
  .examples-section {
    width: calc(100% - 32px);
  }
}

@media (max-width: 560px) {
  .site-header {
    height: 62px;
    padding-inline: 14px;
  }

  .brand-name {
    font-size: 14px;
  }

  .history-button,
  .theme-button {
    width: 36px;
    height: 36px;
  }

  .login-button {
    min-width: 82px;
    height: 36px;
    padding-inline: 10px;
    font-size: 11px;
  }

  .workbench {
    width: calc(100% - 24px);
    margin: 16px 12px 0;
  }

  .composer {
    padding: 16px;
    gap: 16px;
  }

  .mode-button {
    padding-inline: 5px;
    font-size: 11px;
  }

  .mode-button::after {
    right: 6px;
    left: 6px;
  }

  .mode-guidance {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .mode-guidance-requirement {
    grid-column: 2;
    justify-self: start;
  }

  .frame-slot {
    min-height: 86px;
  }

  .settings-grid {
    gap: 8px;
  }

  .setting-block {
    min-height: 72px;
  }

  .ratio-block {
    gap: 8px;
  }

  .pricing-section,
  .examples-section {
    width: calc(100% - 24px);
  }

  .pricing-intro h2,
  .examples-heading h2 {
    font-size: 31px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-button,
  .create-button,
  .mode-button,
  .reference-dropzone,
  .reference-add-button,
  .gallery-card :is(img, video) {
    transition: none;
  }
}

/* Match the final editorial layer in light mode as well. Earlier launch
   iterations used more specific light-theme selectors, so mirror their
   specificity here instead of letting gradients and shadows leak back in. */
:root[data-theme="light"] .mode-button {
  background: transparent;
}

:root[data-theme="light"] .mode-button.is-active {
  border-color: transparent;
  background: transparent;
  color: var(--studio-ink);
  box-shadow: none;
}

:root[data-theme="light"] .prompt-editor {
  background: var(--studio-surface-soft);
  box-shadow: none;
}

:root[data-theme="light"] .frame-slot {
  background: transparent;
}

:root[data-theme="light"] .setting-block,
:root[data-theme="light"] .quantity-row,
:root[data-theme="light"] .price-footer {
  background: var(--studio-surface-soft);
}

:root[data-theme="light"] .reference-dropzone,
:root[data-theme="light"] .reference-asset,
:root[data-theme="light"] .reference-asset-preview,
:root[data-theme="light"] .text-mode-note,
:root[data-theme="light"] .mode-guidance {
  background: transparent;
}

:root[data-theme="light"] .create-button {
  border-color: var(--studio-accent);
  background: var(--studio-accent);
  color: #fff;
  box-shadow: none;
}

:root[data-theme="light"] .create-button:disabled {
  border-color: var(--studio-line);
  background: var(--studio-surface-soft);
  color: var(--studio-faint);
  box-shadow: none;
}

:root[data-theme="light"] .price-table {
  background: var(--studio-surface);
  box-shadow: none;
}

:root[data-theme="light"] .price-row {
  border-color: var(--studio-line);
  background: var(--studio-surface);
  box-shadow: none;
}

:root[data-theme="light"] .price-row > span,
:root[data-theme="light"] .price-row > span + span {
  color: var(--studio-ink);
  border-color: var(--studio-line);
  background: var(--studio-surface-soft);
}

/* --------------------------------------------------------------------------
   Soft glass studio

   A small amount of translucency makes the workspace friendlier without
   turning every field into a luminous "AI card". Blur is reserved for the
   app-level layers (header, canvas, modal) and the video controls.
   -------------------------------------------------------------------------- */
:root {
  --glass-panel: rgba(29, 29, 25, .7);
  --glass-panel-soft: rgba(255, 255, 255, .055);
  --glass-field: rgba(255, 255, 255, .065);
  --glass-line: rgba(255, 255, 255, .14);
  --glass-shine: rgba(255, 255, 255, .1);
  --glass-shadow: 0 20px 54px rgba(9, 8, 6, .22);
  --glass-blur: 18px;
  --glass-radius-xl: 24px;
  --glass-radius-lg: 18px;
  --glass-radius-md: 13px;
}

:root[data-theme="light"] {
  --glass-panel: rgba(255, 255, 255, .62);
  --glass-panel-soft: rgba(255, 255, 255, .5);
  --glass-field: rgba(255, 255, 255, .56);
  --glass-line: rgba(255, 255, 255, .82);
  --glass-shine: rgba(255, 255, 255, .9);
  --glass-shadow: 0 18px 48px rgba(55, 49, 40, .1);
  --studio-warm: #805f22;
}

.app-shell,
:root[data-theme="light"] .app-shell {
  background:
    radial-gradient(54rem 42rem at -10% -18%, rgba(216, 211, 255, .26), transparent 67%),
    radial-gradient(48rem 40rem at 112% 15%, rgba(247, 222, 194, .23), transparent 67%),
    radial-gradient(34rem 28rem at 62% 105%, rgba(198, 230, 220, .13), transparent 72%),
    var(--studio-bg);
}

:root:not([data-theme="light"]) .app-shell {
  background:
    radial-gradient(48rem 38rem at -10% -18%, rgba(122, 90, 147, .12), transparent 67%),
    radial-gradient(44rem 36rem at 112% 8%, rgba(181, 108, 69, .10), transparent 67%),
    radial-gradient(30rem 26rem at 62% 105%, rgba(49, 110, 91, .08), transparent 72%),
    var(--studio-bg);
}

.site-header,
:root[data-theme="light"] .site-header {
  top: 12px;
  width: min(1440px, calc(100% - 96px));
  margin: 12px auto 0;
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  border-bottom-color: var(--glass-line);
  background: color-mix(in srgb, var(--glass-panel) 78%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-shine), 0 8px 22px rgba(47, 40, 31, .06);
  -webkit-backdrop-filter: blur(16px) saturate(128%);
  backdrop-filter: blur(16px) saturate(128%);
}

.brand-mark {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 18px;
  background: color-mix(in srgb, var(--studio-accent) 92%, #fff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 5px 12px rgba(119, 49, 37, .15);
}

.history-button,
.theme-button {
  border-color: var(--glass-line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--glass-panel-soft) 86%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-shine);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.history-button:hover,
.theme-button:hover {
  border-color: color-mix(in srgb, var(--studio-accent) 34%, var(--glass-line));
  background: color-mix(in srgb, var(--glass-panel-soft) 82%, var(--studio-accent-soft));
}

.login-button {
  border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 8px 18px rgba(96, 36, 28, .15);
}

.login-button:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 10px 22px rgba(96, 36, 28, .22);
}

.banner-button,
:root[data-theme="light"] .banner-button {
  min-height: 44px;
  height: 44px;
  padding-left: 12px;
  border: 1px solid var(--glass-line);
  border-left: 3px solid var(--studio-warm);
  border-radius: 14px;
  background: color-mix(in srgb, var(--glass-panel-soft) 88%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-shine), 0 8px 18px rgba(52, 44, 34, .05);
  -webkit-backdrop-filter: blur(13px) saturate(120%);
  backdrop-filter: blur(13px) saturate(120%);
}

.banner-button:hover,
:root[data-theme="light"] .banner-button:hover {
  border-color: color-mix(in srgb, var(--studio-warm) 45%, var(--glass-line));
  background: color-mix(in srgb, var(--glass-panel-soft) 74%, var(--studio-accent-soft));
  box-shadow: inset 0 1px 0 var(--glass-shine), 0 10px 22px rgba(52, 44, 34, .08);
}

/* Keep one softly floating workspace instead of a stack of promo cards. */
.workbench {
  margin-top: 28px;
  padding: 10px;
  gap: 10px;
  border-color: var(--glass-line);
  border-radius: var(--glass-radius-xl);
  background: var(--glass-panel);
  box-shadow: inset 0 1px 0 var(--glass-shine), var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(120%);
  backdrop-filter: blur(var(--glass-blur)) saturate(120%);
}

.composer,
.case-preview,
:root[data-theme="light"] .composer,
:root[data-theme="light"] .case-preview {
  border: 1px solid color-mix(in srgb, var(--glass-line) 88%, transparent);
  border-radius: var(--glass-radius-lg);
  box-shadow: inset 0 1px 0 var(--glass-shine);
}

.composer {
  padding: 24px;
  border-right: 1px solid color-mix(in srgb, var(--glass-line) 88%, transparent);
  background: color-mix(in srgb, var(--glass-panel-soft) 76%, transparent);
}

.case-preview {
  padding: 18px;
  background: color-mix(in srgb, var(--glass-panel-soft) 95%, transparent);
}

.mode-tabs {
  padding: 4px;
  border: 1px solid var(--glass-line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--glass-field) 88%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-shine);
}

.mode-button,
:root[data-theme="light"] .mode-button {
  height: 40px;
  border-radius: 18px;
  background: transparent;
}

.mode-button::after {
  display: none;
}

.mode-button:hover {
  background: rgba(255, 255, 255, .14);
}

.mode-button.is-active,
:root[data-theme="light"] .mode-button.is-active {
  border-color: rgba(255, 255, 255, .44);
  border-radius: 18px;
  background: color-mix(in srgb, var(--glass-panel-soft) 92%, transparent);
  color: var(--studio-ink);
  box-shadow: inset 0 1px 0 var(--glass-shine), 0 3px 8px rgba(40, 34, 27, .07);
}

.mode-guidance {
  padding: 1px 2px 15px;
  border-bottom-color: color-mix(in srgb, var(--glass-line) 72%, transparent);
}

.mode-guidance-icon,
.text-mode-note-icon {
  border-radius: 16px;
  background: color-mix(in srgb, var(--studio-accent-soft) 70%, transparent);
}

.mode-guidance-requirement {
  border-radius: 7px;
  background: color-mix(in srgb, var(--studio-accent-soft) 78%, transparent);
}

.prompt-editor,
:root[data-theme="light"] .prompt-editor {
  border-color: var(--glass-line);
  border-radius: 15px;
  background: var(--glass-field);
  box-shadow: inset 0 1px 0 var(--glass-shine);
}

.prompt-editor:hover {
  border-color: color-mix(in srgb, var(--studio-accent) 25%, var(--glass-line));
}

.frame-slot,
:root[data-theme="light"] .frame-slot {
  min-height: 100px;
  border-color: color-mix(in srgb, var(--studio-accent) 28%, var(--glass-line));
  border-radius: 15px;
  background: color-mix(in srgb, var(--glass-field) 78%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-shine);
}

.frame-slot:hover {
  background: color-mix(in srgb, var(--glass-field) 76%, var(--studio-accent-soft));
}

.reference-dropzone,
:root[data-theme="light"] .reference-dropzone {
  border-color: color-mix(in srgb, var(--studio-accent) 28%, var(--glass-line));
  border-radius: 15px;
  background: color-mix(in srgb, var(--glass-field) 78%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-shine);
}

.reference-add-button,
.reference-asset-remove,
.frame-remove {
  border-color: var(--glass-line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--glass-panel-soft) 80%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-shine);
}

.setting-block,
:root[data-theme="light"] .setting-block {
  min-height: 80px;
  border-color: var(--glass-line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--glass-field) 84%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-shine);
}

.segment,
.ratio-button,
.quantity-button {
  border-radius: 9px;
}

.segment.is-active,
.ratio-button.is-active,
.quantity-button.is-active {
  border-color: color-mix(in srgb, var(--studio-accent) 60%, #fff);
  background: color-mix(in srgb, var(--studio-accent) 84%, #fff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 4px 9px rgba(121, 49, 35, .12);
}

.duration-block {
  border-color: var(--glass-line);
}

.quantity-row,
:root[data-theme="light"] .quantity-row {
  border-color: var(--glass-line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--glass-field) 84%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-shine);
}

.create-button,
:root[data-theme="light"] .create-button {
  border-radius: 14px;
  background: var(--studio-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 10px 22px rgba(121, 49, 35, .18);
}

.create-button:hover:not(:disabled),
:root[data-theme="light"] .create-button:hover:not(:disabled) {
  background: color-mix(in srgb, var(--studio-accent) 88%, #000);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 12px 26px rgba(121, 49, 35, .24);
}

.create-button:disabled,
:root[data-theme="light"] .create-button:disabled {
  background: color-mix(in srgb, var(--glass-field) 90%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-shine);
}

.hero-video-wrap {
  border-color: var(--glass-line);
  border-radius: 17px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 12px 28px rgba(27, 22, 17, .14);
}

.quality-badge,
.video-icon-button {
  border-color: rgba(255, 255, 255, .25);
  border-radius: 9px;
  background: rgba(18, 17, 15, .5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.case-thumb {
  border-radius: 20px;
}

.case-thumb.is-active {
  border-color: color-mix(in srgb, var(--studio-accent) 70%, #fff);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--studio-accent-soft) 85%, transparent);
}

.more-link {
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 18px;
}

.more-link:hover {
  border-color: var(--glass-line);
  background: var(--glass-panel-soft);
}

.price-table,
:root[data-theme="light"] .price-table {
  border-color: var(--glass-line);
  border-radius: 16px;
  background: var(--glass-panel);
  box-shadow: inset 0 1px 0 var(--glass-shine), 0 12px 28px rgba(35, 30, 24, .06);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.price-footer,
:root[data-theme="light"] .price-footer {
  border-color: var(--glass-line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--glass-panel-soft) 85%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-shine);
}

.gallery-card,
.gallery-card > button {
  border-radius: 16px;
}

.gallery-card > button {
  border-color: var(--glass-line);
  background: var(--glass-panel);
  box-shadow: inset 0 1px 0 var(--glass-shine), 0 10px 24px rgba(34, 29, 23, .08);
}

.prompt-pill {
  border-color: rgba(255, 255, 255, .32);
  border-radius: 18px;
  background: rgba(24, 23, 20, .58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(13px);
  backdrop-filter: blur(13px);
}

.modal-backdrop {
  background: rgba(28, 25, 21, .38);
  -webkit-backdrop-filter: blur(7px) saturate(.85);
  backdrop-filter: blur(7px) saturate(.85);
}

.modal-dialog,
.utility-dialog,
.account-dialog {
  border-color: var(--glass-line);
  border-radius: 22px;
  background: var(--glass-panel);
  box-shadow: inset 0 1px 0 var(--glass-shine), 0 26px 70px rgba(15, 12, 9, .24);
  -webkit-backdrop-filter: blur(22px) saturate(125%);
  backdrop-filter: blur(22px) saturate(125%);
}

.auth-methods,
:root[data-theme="light"] .auth-methods {
  border-color: var(--glass-line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--glass-field) 82%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-shine);
}

.auth-method-button,
.code-button,
.auth-submit {
  border-radius: 11px;
}

@media (max-width: 1080px) and (min-width: 861px) {
  .workbench {
    gap: 10px;
  }

  .composer {
    border-right: 1px solid color-mix(in srgb, var(--glass-line) 88%, transparent);
    border-bottom-color: color-mix(in srgb, var(--glass-line) 88%, transparent);
  }
}

@media (max-width: 860px) {
  .site-header,
  :root[data-theme="light"] .site-header {
    top: 8px;
    width: calc(100% - 32px);
    margin: 8px auto 0;
    border-radius: 16px;
  }

  .mobile-banner-wrap {
    height: 46px;
  }

  .mobile-banner-wrap .banner-button {
    height: 46px;
    min-height: 46px;
    border-radius: 14px;
  }

  .workbench {
    margin-top: 22px;
    padding: 8px;
    gap: 8px;
    border-radius: 21px;
  }

  .composer,
  .case-preview {
    border-radius: 16px;
  }

  .composer {
    border-right-color: color-mix(in srgb, var(--glass-line) 88%, transparent);
    border-bottom-color: color-mix(in srgb, var(--glass-line) 88%, transparent);
  }
}

@media (max-width: 560px) {
  .site-header,
  :root[data-theme="light"] .site-header {
    top: 8px;
    width: calc(100% - 24px);
    margin: 8px auto 0;
    border-radius: 15px;
  }

  .mobile-banner-wrap {
    height: 44px;
  }

  .mobile-banner-wrap .banner-button {
    height: 44px;
    min-height: 44px;
    border-radius: 13px;
  }

  .workbench {
    padding: 7px;
    border-radius: 19px;
  }

  .composer,
  .case-preview {
    border-radius: 14px;
  }

  .composer {
    padding: 16px;
  }

  .mode-tabs {
    border-radius: 13px;
  }

  .mode-button,
  :root[data-theme="light"] .mode-button {
    border-radius: 9px;
  }

  .prompt-editor,
  :root[data-theme="light"] .prompt-editor {
    border-radius: 13px;
  }

  .frame-slot,
  :root[data-theme="light"] .frame-slot {
    border-radius: 13px;
  }

  .setting-block,
  :root[data-theme="light"] .setting-block {
    border-radius: 20px;
  }
}

/* Black-and-white minimal override */
:root {
  color-scheme: dark;
  --studio-bg: #000;
  --studio-surface: #0a0a0a;
  --studio-surface-soft: #111;
  --studio-ink: #fff;
  --studio-muted: #a3a3a3;
  --studio-faint: #737373;
  --studio-line: #303030;
  --studio-line-strong: #595959;
  --studio-accent: #fff;
  --studio-accent-2: #fff;
  --studio-accent-soft: #262626;
  --studio-warm: #fff;
  --glass-panel: #0a0a0a;
  --glass-panel-soft: #111;
  --glass-field: #111;
  --glass-line: #303030;
  --glass-shine: transparent;
  --glass-shadow: none;
}

:root[data-theme="light"] {
  color-scheme: light;
  --studio-bg: #fff;
  --studio-surface: #fff;
  --studio-surface-soft: #f5f5f5;
  --studio-ink: #0a0a0a;
  --studio-muted: #525252;
  --studio-faint: #737373;
  --studio-line: #d4d4d4;
  --studio-line-strong: #a3a3a3;
  --studio-accent: #111;
  --studio-accent-2: #111;
  --studio-accent-soft: #e5e5e5;
  --studio-warm: #111;
  --glass-panel: #fff;
  --glass-panel-soft: #f5f5f5;
  --glass-field: #fafafa;
  --glass-line: #d4d4d4;
  --glass-shine: transparent;
  --glass-shadow: none;
}

.app-shell,
:root[data-theme="light"] .app-shell,
:root:not([data-theme="light"]) .app-shell {
  background: var(--studio-bg);
}

.app-shell::before,
.app-shell::after,
.banner-button::before,
.banner-button::after,
.brand::before,
.brand::after,
.composer::before,
.case-preview::before,
.create-button::before,
.hero-video-wrap::after {
  display: none;
}

.site-header,
:root[data-theme="light"] .site-header {
  top: 0;
  width: 100%;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--studio-line);
  border-radius: 0;
  background: var(--studio-bg);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.brand-mark,
.history-button,
.theme-button,
.api-button,
.login-button,
.banner-button,
:root[data-theme="light"] .banner-button {
  border-color: var(--studio-line);
  border-radius: 4px;
  background: var(--studio-surface);
  box-shadow: none;
  color: var(--studio-ink);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.brand-mark {
  background: var(--studio-ink);
  color: var(--studio-bg);
}

.login-button,
.create-button,
:root[data-theme="light"] .create-button,
.buy-button,
.primary-action {
  border-color: var(--studio-ink);
  border-radius: 4px;
  background: var(--studio-ink);
  box-shadow: none;
  color: var(--studio-bg);
}

.login-button:hover,
.create-button:hover:not(:disabled),
:root[data-theme="light"] .create-button:hover:not(:disabled),
.buy-button:hover,
.primary-action:hover {
  background: var(--studio-muted);
  box-shadow: none;
}

.workbench {
  margin-top: 40px;
  padding: 0;
  gap: 0;
  border: 1px solid var(--studio-line-strong);
  border-radius: 0;
  background: var(--studio-bg);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.composer,
.case-preview,
:root[data-theme="light"] .composer,
:root[data-theme="light"] .case-preview {
  border: 0;
  border-radius: 0;
  background: var(--studio-bg);
  box-shadow: none;
}

.composer {
  border-right: 1px solid var(--studio-line);
}

.case-preview {
  border-left: 0;
}

.mode-tabs,
.setting-block,
.quantity-row,
.prompt-editor,
.frame-slot,
.reference-dropzone,
.reference-asset,
.reference-asset-preview,
.text-mode-note,
.mode-guidance,
:root[data-theme="light"] .mode-tabs,
:root[data-theme="light"] .setting-block,
:root[data-theme="light"] .quantity-row,
:root[data-theme="light"] .prompt-editor,
:root[data-theme="light"] .frame-slot,
:root[data-theme="light"] .reference-dropzone {
  border-color: var(--studio-line);
  border-radius: 0;
  background: var(--studio-surface);
  box-shadow: none;
}

.mode-button,
:root[data-theme="light"] .mode-button,
.segment,
.ratio-button,
.quantity-button,
.reference-add-button,
.reference-asset-remove,
.frame-remove {
  border-color: transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.mode-button:hover,
.segment:hover,
.ratio-button:hover:not(:disabled),
.quantity-button:hover,
.frame-slot:hover,
.reference-dropzone:hover {
  background: var(--studio-surface-soft);
}

.mode-button.is-active,
:root[data-theme="light"] .mode-button.is-active,
.segment.is-active,
.ratio-button.is-active,
.quantity-button.is-active {
  border-color: var(--studio-ink);
  background: var(--studio-ink);
  box-shadow: none;
  color: var(--studio-bg);
}

.prompt-editor:focus,
.utility-fields input:focus,
.account-name-field input:focus,
.auth-form input:focus {
  border-color: var(--studio-ink);
  box-shadow: 0 0 0 1px var(--studio-ink);
}

.hero-video-wrap,
.case-thumb,
.case-thumb.is-active,
.quality-badge,
.video-icon-button,
.gallery-card > button,
.prompt-pill,
.price-table,
.price-footer,
:root[data-theme="light"] .price-table,
:root[data-theme="light"] .price-footer {
  border-color: var(--studio-line);
  border-radius: 0;
  background: var(--studio-surface);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.case-thumb.is-active {
  outline: 1px solid var(--studio-ink);
  outline-offset: 2px;
}

.pricing-section,
.examples-section {
  border-top: 1px solid var(--studio-line-strong);
  padding-top: 64px;
}

.section-rule {
  display: none;
}

.price-group {
  border-top: 1px solid var(--studio-line);
  padding-top: 20px;
}

.price-group h3::before {
  border-color: var(--studio-ink);
  border-radius: 0;
  background: var(--studio-ink);
}

.price-row,
:root[data-theme="light"] .price-row,
.price-row > span,
.price-row > span + span,
:root[data-theme="light"] .price-row > span,
:root[data-theme="light"] .price-row > span + span {
  border-color: var(--studio-line);
  background: var(--studio-surface);
  box-shadow: none;
}

.gallery-card,
.gallery-card > button {
  border-radius: 0;
}

.gallery-card > button {
  border: 1px solid var(--studio-line);
}

.modal-backdrop {
  background: rgba(0, 0, 0, .72);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.modal-dialog,
.utility-dialog,
.account-dialog,
.history-drawer {
  border-color: var(--studio-line-strong);
  border-radius: 0;
  background: var(--studio-bg);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

@media (max-width: 860px) {
  .site-header,
  :root[data-theme="light"] .site-header {
    top: 0;
    width: 100%;
    margin: 0;
    border-radius: 0;
  }

  .workbench {
    margin-top: 24px;
  }

  .composer {
    border-right: 0;
    border-bottom: 1px solid var(--studio-line);
  }
}

/* --------------------------------------------------------------------------
   METASO MiniMax H3 reference alignment
   Keep the existing interaction contracts, but bring the public page back to
   the compact black workbench, restrained borders, purple states and gold
   pricing hierarchy of the reference product.
   -------------------------------------------------------------------------- */
:root {
  --h3-bg: #101010;
  --h3-surface: #171717;
  --h3-surface-raised: #1d1d1d;
  --h3-surface-soft: #131313;
  --h3-line: #2d2d2d;
  --h3-line-soft: #242424;
  --h3-text: #f5f5f5;
  --h3-muted: #9b9b9b;
  --h3-faint: #6f6f6f;
  --h3-purple: #a477ff;
  --h3-purple-soft: rgba(164, 119, 255, .14);
  --h3-gold: #e3bd72;
  --h3-danger: #ef8d98;
}

:root[data-theme="light"] {
  --h3-bg: #f5f5f3;
  --h3-surface: #ffffff;
  --h3-surface-raised: #fbfbfa;
  --h3-surface-soft: #f1f1ef;
  --h3-line: #deded9;
  --h3-line-soft: #e9e9e4;
  --h3-text: #202020;
  --h3-muted: #6f6f6a;
  --h3-faint: #96968f;
  --h3-purple: #7651d8;
  --h3-purple-soft: rgba(118, 81, 216, .1);
  --h3-gold: #a97622;
}

html,
body {
  background: var(--h3-bg);
  color: var(--h3-text);
}

.app-shell {
  background: var(--h3-bg);
}

.app-shell::before,
.app-shell::after {
  display: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header);
  backdrop-filter: var(--blur-md) saturate(180%);
  -webkit-backdrop-filter: var(--blur-md) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow-sm);
}

.brand {
  height: 32px;
  color: var(--h3-text);
  font-size: 16px;
  letter-spacing: .18em;
}

.brand-mark {
  display: none;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .18em;
}

.header-actions {
  gap: 8px;
}

.site-header :is(a, button):focus-visible,
.header-banner .banner-button:focus-visible {
  outline: 2px solid var(--h3-purple);
  outline-offset: 3px;
}

.api-button,
.history-button,
.theme-button {
  height: 32px;
  border: 1px solid var(--h3-line);
  border-radius: 7px;
  background: transparent;
  color: var(--h3-muted);
}

.api-button {
  min-width: 54px;
  padding: 0 12px;
  font-size: 11px;
}

.history-button,
.theme-button {
  width: 32px;
  padding: 0;
}

.api-button:hover,
.history-button:hover,
.theme-button:hover {
  border-color: var(--h3-purple);
  background: var(--h3-purple-soft);
  color: var(--h3-text);
  transform: none;
}

.login-button {
  height: 32px;
  min-width: 82px;
  padding: 0 15px;
  border: 1px solid #f5f5f5;
  border-radius: 999px;
  background: #f5f5f5;
  color: #151515;
  box-shadow: none;
  font-size: 11px;
}

.login-button:hover {
  border-color: #fff;
  background: #fff;
  color: #000;
  box-shadow: none;
  transform: translateY(-1px);
}

.header-banner {
  display: block;
  position: static;
  width: min(640px, calc(100% - 32px));
  height: 48px;
  margin: 10px auto 0;
  transform: none;
}

.banner-button,
:root[data-theme="light"] .banner-button {
  display: grid !important;
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 0 12px 0 9px;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  overflow: hidden;
  border: 1px solid var(--h3-line);
  border-radius: 18px;
  background: var(--h3-surface);
  color: var(--h3-text);
  box-shadow: none;
}

.banner-button:hover,
:root[data-theme="light"] .banner-button:hover {
  border-color: var(--h3-purple);
  background: var(--h3-surface-raised);
  box-shadow: none;
  transform: none;
}

.banner-button::before,
.banner-button::after {
  display: none;
}

.banner-rate {
  display: grid;
  width: 42px;
  height: 32px;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(227, 189, 114, .6);
  border-radius: 6px;
  background: rgba(227, 189, 114, .1);
  color: var(--h3-gold);
  line-height: 1;
}

.banner-rate span {
  font-size: 8px;
}

.banner-rate strong {
  margin-top: 2px;
  color: var(--h3-gold);
  font-size: 13px;
}

.banner-copy {
  display: flex !important;
  min-width: 0;
  align-items: center;
  gap: 9px;
  overflow: hidden;
}

.banner-message {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.banner-message strong,
:root[data-theme="light"] .banner-message strong {
  overflow: hidden;
  color: var(--h3-text);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.banner-message em,
:root[data-theme="light"] .banner-message em {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid rgba(227, 189, 114, .35);
  border-radius: 999px;
  background: rgba(227, 189, 114, .1);
  color: var(--h3-gold);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

.banner-copy > small {
  display: block !important;
  overflow: hidden;
  color: var(--h3-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.banner-cta,
:root[data-theme="light"] .banner-cta {
  width: auto;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--h3-line);
  border-radius: 6px;
  background: transparent;
  color: var(--h3-muted);
  font-size: 9px;
}

.banner-cta-label {
  display: inline;
}

.banner-cta svg {
  width: 12px;
  height: 12px;
}

.workbench {
  width: min(1440px, calc(100% - 32px));
  max-width: none;
  min-height: 0;
  margin: 16px auto 0;
  padding: 0;
  grid-template-columns: minmax(360px, 448px) minmax(0, 1fr);
  gap: 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.composer,
.case-preview,
:root[data-theme="light"] .composer,
:root[data-theme="light"] .case-preview {
  border: 1px solid var(--h3-line);
  border-radius: 20px;
  background: var(--h3-surface);
  box-shadow: none;
}

.composer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  padding: 16px;
  gap: 14px;
}

.composer-intro,
.mode-guidance,
.text-mode-note {
  display: none;
}

.mode-tabs {
  display: grid;
  width: 100%;
  max-width: none;
  padding: 3px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  border: 1px solid var(--h3-line);
  border-radius: 9px;
  background: var(--h3-surface-soft);
}

.mode-button,
:root[data-theme="light"] .mode-button {
  display: flex;
  min-width: 0;
  height: 50px;
  padding: 6px 9px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--h3-muted);
  text-align: left;
  white-space: normal;
}

.mode-button span {
  overflow: hidden;
  width: 100%;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mode-button small {
  display: block;
  width: 100%;
  margin-top: 3px;
  overflow: hidden;
  color: var(--h3-faint);
  font-size: 9px;
  font-weight: 400;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mode-button:hover,
:root[data-theme="light"] .mode-button:hover {
  border-color: var(--h3-line);
  background: var(--h3-surface-raised);
  color: var(--h3-text);
}

.mode-button.is-active,
:root[data-theme="light"] .mode-button.is-active {
  border-color: #4b4b4b;
  border-radius: 7px;
  background: #363636;
  box-shadow: none;
  color: #fff;
}

.mode-button.is-active small {
  color: #bdbdbd;
}

.mode-button::after {
  display: none;
}

.field-heading {
  min-height: 22px;
  margin-bottom: 7px;
}

.field-heading label,
.setting-label {
  color: var(--h3-text);
  font-size: 13px;
  font-weight: 650;
}

.field-hint {
  color: var(--h3-faint);
  font-size: 10px;
}

.prompt-editor {
  min-height: 154px;
  padding: 14px 14px 32px;
  border: 1px solid var(--h3-line);
  border-radius: 9px;
  background: #121212;
  color: var(--h3-text);
  font-size: 13px;
  line-height: 1.75;
  box-shadow: none;
}

.prompt-editor:hover {
  border-color: #3e3e3e;
}

.prompt-editor:focus {
  border-color: var(--h3-purple);
  box-shadow: 0 0 0 2px var(--h3-purple-soft);
}

.prompt-editor:empty::before {
  color: var(--h3-faint);
}

.char-count {
  right: 13px;
  bottom: 10px;
  color: var(--h3-faint);
}

.settings-grid {
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  gap: 8px;
}

.setting-block {
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid var(--h3-line);
  border-radius: 9px;
  background: var(--h3-surface-soft);
  box-shadow: none;
}

.resolution-block {
  gap: 7px;
}

.segment,
.ratio-button,
.quantity-button {
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--h3-muted);
}

.segment.is-active,
.ratio-button.is-active,
.quantity-button.is-active {
  border-color: rgba(164, 119, 255, .62);
  background: var(--h3-purple-soft);
  color: var(--h3-text);
  box-shadow: none;
}

.duration-header strong {
  color: var(--h3-purple);
}

.duration-range {
  accent-color: var(--h3-purple);
}

.range-labels {
  color: var(--h3-faint);
}

.ratio-block {
  min-height: 58px;
  gap: 10px;
}

.ratio-options {
  gap: 2px;
}

.quantity-row {
  min-height: 42px;
  padding: 3px;
  gap: 3px;
  border: 1px solid var(--h3-line);
  border-radius: 9px;
  background: var(--h3-surface-soft);
}

.quantity-button {
  min-height: 34px;
}

.create-button,
:root[data-theme="light"] .create-button {
  min-height: 48px;
  border: 1px solid var(--h3-purple);
  border-radius: 9px;
  background: var(--h3-purple);
  color: #fff;
  box-shadow: none;
  font-size: 12px;
}

.create-button:hover:not(:disabled),
:root[data-theme="light"] .create-button:hover:not(:disabled) {
  border-color: #b996ff;
  background: #b996ff;
  box-shadow: none;
  transform: translateY(-1px);
}

.create-button:disabled,
:root[data-theme="light"] .create-button:disabled {
  border-color: #3a3a3a;
  background: #3a3a3a;
  color: #8d8d8d;
  box-shadow: none;
}

.engine-status {
  min-height: 20px;
  color: var(--h3-faint);
}

.engine-status button {
  color: var(--h3-purple);
}

.engine-dot {
  background: #65c99c;
  box-shadow: 0 0 0 3px rgba(101, 201, 156, .1);
}

.job-card {
  border-color: var(--h3-line);
  border-radius: 9px;
  background: var(--h3-surface-soft);
  box-shadow: none;
}

.case-preview {
  min-width: 0;
  padding: 12px;
}

.hero-video-wrap {
  border: 1px solid var(--h3-line);
  border-radius: 9px;
  background: #0b0b0b;
  box-shadow: none;
}

.quality-badge {
  top: 12px;
  left: 12px;
  padding: 3px 7px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 5px;
  background: rgba(245,245,245,.92);
  color: #202020;
  font-size: 10px;
}

.video-controls {
  height: 78px;
  background: linear-gradient(transparent, rgba(0,0,0,.76));
}

.video-icon-button {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.32);
}

.video-progress {
  height: 4px;
  background: rgba(255,255,255,.32);
}

.video-progress span {
  background: var(--h3-purple);
}

.case-strip {
  margin-top: 9px;
  gap: 7px;
}

.case-thumb {
  border: 1px solid var(--h3-line);
  border-radius: 7px;
  background: #111;
}

.case-thumb.is-active {
  border-color: var(--h3-purple);
  outline: 1px solid var(--h3-purple);
  outline-offset: 1px;
  box-shadow: none;
}

.thumb-play {
  width: 26px;
  height: 26px;
  background: rgba(0,0,0,.66);
}

.case-thumb.is-active .thumb-play {
  background: var(--h3-purple);
}

.more-link {
  align-self: flex-start;
  margin-top: 12px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--h3-line);
  border-radius: 0;
  color: var(--h3-muted);
  font-size: 11px;
}

.more-link:hover {
  border-bottom-color: var(--h3-purple);
  background: transparent;
  color: var(--h3-text);
}

.pricing-section,
.examples-section {
  width: min(1440px, calc(100% - 32px));
  margin: 44px auto 0;
  padding: 44px 0 72px;
  border-top: 1px solid var(--h3-line);
}

.section-rule {
  display: none;
}

.pricing-intro {
  display: grid;
  max-width: none;
  margin-bottom: 30px;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: 26px;
  align-items: end;
}

.eyebrow {
  color: var(--h3-purple);
  font-size: 10px;
  letter-spacing: .18em;
}

.pricing-intro h2,
.examples-heading h2 {
  margin: 7px 0 0;
  color: var(--h3-text);
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -.035em;
}

.pricing-intro > p:last-child,
.examples-heading > p:last-child {
  max-width: 570px;
  margin: 0;
  color: var(--h3-muted);
  font-size: 12px;
  line-height: 1.8;
}

.price-group {
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid var(--h3-line-soft);
}

.price-group h3 {
  margin: 0 0 9px;
  padding-left: 11px;
  color: var(--h3-text);
  font-size: 15px;
}

.price-group h3::before {
  width: 2px;
  border-radius: 0;
  background: var(--h3-gold);
}

.price-table,
:root[data-theme="light"] .price-table {
  border: 1px solid var(--h3-line);
  border-radius: 9px;
  background: var(--h3-surface);
  box-shadow: none;
}

.price-row,
:root[data-theme="light"] .price-row {
  min-height: 58px;
  border-bottom-color: var(--h3-line-soft);
  background: var(--h3-surface);
}

.price-row > span,
:root[data-theme="light"] .price-row > span {
  padding: 14px 17px;
}

.price-row > span + span,
:root[data-theme="light"] .price-row > span + span {
  border-left-color: var(--h3-line);
  background: #1b1812;
}

.price-head,
:root[data-theme="light"] .price-head {
  min-height: 40px;
  background: var(--h3-surface-soft);
  color: var(--h3-muted);
}

.price-head > span + span {
  color: var(--h3-gold);
}

.service strong {
  color: var(--h3-text);
  font-size: 12px;
}

.service small,
.price small,
.price-note {
  color: var(--h3-faint);
}

.service svg {
  color: var(--h3-gold);
}

.price b {
  color: var(--h3-gold);
  font-size: 24px;
}

.price-footer,
:root[data-theme="light"] .price-footer {
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid var(--h3-line);
  border-radius: 9px;
  background: var(--h3-surface-soft);
}

.advantages {
  color: var(--h3-muted);
  font-size: 10px;
}

.buy-button,
:root[data-theme="light"] .buy-button {
  min-height: 38px;
  border: 1px solid var(--h3-gold);
  border-radius: 7px;
  background: transparent;
  color: var(--h3-text);
  box-shadow: none;
}

.buy-button:hover {
  border-color: var(--h3-gold);
  background: var(--h3-gold);
  color: #221a0d;
}

.examples-section {
  margin-top: 0;
  padding-top: 72px;
}

.examples-heading {
  max-width: 760px;
  margin: 0 auto 30px;
}

.examples-heading h2 {
  font-size: clamp(34px, 5vw, 58px);
}

.gallery-grid {
  gap: 6px;
}

.gallery-card > button,
:root[data-theme="light"] .gallery-card > button {
  border: 1px solid var(--h3-line);
  border-radius: 16px;
  background: var(--h3-surface);
  box-shadow: none;
}

.gallery-card:hover :is(img, video) {
  filter: brightness(.82);
  transform: scale(1.025);
}

.prompt-pill {
  right: 10px;
  bottom: 10px;
  left: auto;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 6px;
  background: rgba(245,245,245,.94);
  color: #202020;
  box-shadow: none;
  backdrop-filter: none;
}

.toast {
  border: 1px solid var(--h3-line);
  border-radius: 16px;
  background: #1c1c1c;
  color: var(--h3-text);
  box-shadow: 0 12px 32px rgba(0,0,0,.34);
  backdrop-filter: none;
}

:root[data-theme="light"] .site-header,
:root[data-theme="light"] .header-banner .banner-button {
  background: var(--h3-surface);
}

:root[data-theme="light"] .login-button {
  border-color: #202020;
  background: #202020;
  color: #fff;
}

:root[data-theme="light"] .prompt-editor {
  background: var(--h3-surface-raised);
  color: var(--h3-text);
}

:root[data-theme="light"] .price-row > span + span {
  background: #fbf7ed;
}

:root[data-theme="light"] .buy-button {
  color: var(--h3-text);
}

@media (max-width: 1180px) {
  .workbench {
    grid-template-columns: 1fr;
    width: min(920px, calc(100% - 32px));
  }

  .composer,
  .case-preview {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .site-header {
    height: 56px;
    padding-inline: 16px;
  }

  .brand-name {
    font-size: 14px;
  }

  .api-button {
    display: none;
  }

  .header-banner {
    width: calc(100% - 32px);
    height: 50px;
    margin-top: 8px;
  }

  .banner-button,
  :root[data-theme="light"] .banner-button {
    height: 50px;
    min-height: 50px;
    grid-template-columns: 42px minmax(0, 1fr) 30px;
    padding-inline: 8px;
    gap: 8px;
  }

  .banner-copy {
    display: grid !important;
    align-content: center;
    gap: 3px;
  }

  .banner-message {
    gap: 5px;
  }

  .banner-message strong {
    font-size: 10px;
  }

  .banner-message em {
    padding: 2px 6px;
    font-size: 8px;
  }

  .banner-copy > small {
    font-size: 8px;
  }

  .banner-cta {
    width: 30px;
    padding: 0;
  }

  .banner-cta-label {
    display: none;
  }

  .workbench {
    width: calc(100% - 24px);
    margin-top: 12px;
  }

  .composer,
  .case-preview {
    padding: 14px;
    border-radius: 18px;
  }

  .mode-button {
    height: 46px;
    padding-inline: 7px;
  }

  .mode-button small {
    display: none;
  }

  .prompt-editor {
    min-height: 148px;
  }

  .pricing-section,
  .examples-section {
    width: calc(100% - 24px);
    margin-inline: 12px;
  }

  .pricing-intro {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .price-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .buy-button {
    width: 100%;
  }
}

@media (max-width: 540px) {
  .history-button,
  .theme-button {
    width: 30px;
    height: 30px;
  }

  .login-button {
    min-width: 76px;
    padding-inline: 11px;
    font-size: 10px;
  }

  .mode-tabs {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .ratio-block {
    grid-column: auto;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .ratio-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .case-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pricing-section,
  .examples-section {
    padding-top: 38px;
    padding-bottom: 54px;
  }

  .pricing-intro h2,
  .examples-heading h2 {
    font-size: 32px;
  }

  .price-row > span,
  :root[data-theme="light"] .price-row > span {
    padding: 14px 13px;
  }

  .price b {
    font-size: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .motion-ready .site-header,
  .motion-ready .workbench {
    animation: none !important;
  }

  .create-button:hover:not(:disabled),
  .login-button:hover,
  .gallery-card:hover :is(img, video) {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Apple-inspired component refinement
   Final visual layer: restrained surfaces, one blue action color, and blur
   reserved for chrome, media controls, and overlays.
   -------------------------------------------------------------------------- */
:root {
  color-scheme: dark;
  --apple-bg: #000000;
  --apple-chrome: rgba(28, 28, 30, 0.72);
  --apple-surface: rgba(28, 28, 30, 0.9);
  --apple-surface-raised: #2c2c2e;
  --apple-fill: rgba(118, 118, 128, 0.24);
  --apple-fill-hover: rgba(118, 118, 128, 0.34);
  --apple-field: rgba(118, 118, 128, 0.16);
  --apple-line: rgba(235, 235, 245, 0.16);
  --apple-line-strong: rgba(235, 235, 245, 0.28);
  --apple-text: #f5f5f7;
  --apple-secondary: rgba(235, 235, 245, 0.72);
  --apple-tertiary: rgba(235, 235, 245, 0.5);
  --apple-blue: #0a84ff;
  --apple-blue-pressed: #0077ed;
  --apple-blue-soft: rgba(10, 132, 255, 0.2);
  --apple-focus: rgba(10, 132, 255, 0.38);
  --apple-gold: #f0c96a;
  --apple-radius-control: 10px;
  --apple-radius-group: 14px;
  --apple-radius-card: 20px;
  --apple-shadow-card: 0 14px 34px rgba(0, 0, 0, 0.2);
  --apple-shadow-overlay: 0 24px 72px rgba(0, 0, 0, 0.38);

  --header: var(--apple-chrome);
  --border: var(--apple-line);
  --line: var(--apple-line);
  --surface: var(--apple-surface);
  --surface-deep: var(--apple-field);
  --surface-raised: var(--apple-surface-raised);
  --text: var(--apple-text);
  --muted: var(--apple-secondary);
  --purple: var(--apple-blue);
  --purple-soft: var(--apple-blue-soft);
  --h3-bg: var(--apple-bg);
  --h3-surface: var(--apple-surface);
  --h3-surface-raised: var(--apple-surface-raised);
  --h3-surface-soft: var(--apple-field);
  --h3-line: var(--apple-line);
  --h3-line-soft: rgba(235, 235, 245, 0.1);
  --h3-text: var(--apple-text);
  --h3-muted: var(--apple-secondary);
  --h3-faint: var(--apple-tertiary);
  --h3-purple: var(--apple-blue);
  --h3-purple-soft: var(--apple-blue-soft);
  --h3-gold: var(--apple-gold);
}

:root[data-theme="light"] {
  color-scheme: light;
  --apple-bg: #f5f5f7;
  --apple-chrome: rgba(255, 255, 255, 0.76);
  --apple-surface: rgba(255, 255, 255, 0.92);
  --apple-surface-raised: #ffffff;
  --apple-fill: rgba(118, 118, 128, 0.12);
  --apple-fill-hover: rgba(118, 118, 128, 0.18);
  --apple-field: rgba(118, 118, 128, 0.09);
  --apple-line: rgba(60, 60, 67, 0.18);
  --apple-line-strong: rgba(60, 60, 67, 0.28);
  --apple-text: #1d1d1f;
  --apple-secondary: rgba(60, 60, 67, 0.78);
  --apple-tertiary: rgba(60, 60, 67, 0.56);
  --apple-blue: #007aff;
  --apple-blue-pressed: #006edb;
  --apple-blue-soft: rgba(0, 122, 255, 0.13);
  --apple-focus: rgba(0, 122, 255, 0.28);
  --apple-gold: #9c6b16;
  --apple-shadow-card: 0 10px 30px rgba(0, 0, 0, 0.055);
  --apple-shadow-overlay: 0 24px 72px rgba(0, 0, 0, 0.16);

  --header: var(--apple-chrome);
  --border: var(--apple-line);
  --line: var(--apple-line);
  --surface: var(--apple-surface);
  --surface-deep: var(--apple-field);
  --surface-raised: var(--apple-surface-raised);
  --text: var(--apple-text);
  --muted: var(--apple-secondary);
  --purple: var(--apple-blue);
  --purple-soft: var(--apple-blue-soft);
  --h3-bg: var(--apple-bg);
  --h3-surface: var(--apple-surface);
  --h3-surface-raised: var(--apple-surface-raised);
  --h3-surface-soft: var(--apple-field);
  --h3-line: var(--apple-line);
  --h3-line-soft: rgba(60, 60, 67, 0.1);
  --h3-text: var(--apple-text);
  --h3-muted: var(--apple-secondary);
  --h3-faint: var(--apple-tertiary);
  --h3-purple: var(--apple-blue);
  --h3-purple-soft: var(--apple-blue-soft);
  --h3-gold: var(--apple-gold);
}

html {
  scroll-padding-top: 84px;
}

html,
body {
  background: var(--apple-bg);
  color: var(--apple-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

body {
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

.app-shell,
:root[data-theme="light"] .app-shell,
:root:not([data-theme="light"]) .app-shell {
  background: var(--apple-bg);
}

:where(button, a, input, select, [contenteditable="true"]):focus-visible {
  outline: 2px solid var(--apple-blue);
  outline-offset: 2px;
}

.site-header,
:root[data-theme="light"] .site-header {
  top: 0;
  width: 100%;
  height: 64px;
  min-height: 64px;
  margin: 0;
  padding: 0 clamp(16px, 3vw, 32px);
  gap: 16px;
  border: 0;
  border-bottom: 1px solid var(--apple-line);
  border-radius: 0;
  background: var(--apple-chrome);
  box-shadow: none;
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  backdrop-filter: blur(18px) saturate(145%);
}

.brand,
.brand-name {
  color: var(--apple-text);
}

.brand-name {
  font-family: "Avenir Next", "SF Pro Display", "Segoe UI", sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.header-actions {
  gap: 8px;
}

.api-button,
.history-button,
.theme-button {
  height: 36px;
  border: 1px solid transparent;
  border-radius: var(--apple-radius-control);
  background: var(--apple-fill);
  color: var(--apple-secondary);
  box-shadow: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.api-button {
  min-width: 56px;
  padding-inline: 12px;
  font-size: 12px;
  font-weight: 600;
}

.history-button,
.theme-button {
  width: 36px;
  padding: 0;
}

.login-button {
  height: 36px;
  min-width: 84px;
  padding-inline: 14px;
  border: 1px solid transparent;
  border-radius: var(--apple-radius-control);
  background: var(--apple-blue);
  color: #ffffff;
  box-shadow: none;
  font-size: 12px;
  font-weight: 650;
  transition: background-color 180ms ease, opacity 180ms ease;
}

:is(.api-button, .history-button, .theme-button, .login-button):hover:not(:disabled) {
  transform: none;
  box-shadow: none;
}

.api-button:hover:not(:disabled),
.history-button:hover:not(:disabled),
.theme-button:hover:not(:disabled) {
  border-color: var(--apple-line);
  background: var(--apple-fill-hover);
  color: var(--apple-text);
}

.login-button:hover:not(:disabled) {
  border-color: transparent;
  background: var(--apple-blue-pressed);
  color: #ffffff;
}

.header-banner {
  width: min(680px, calc(100% - 48px));
  height: 44px;
  margin: 14px auto 0;
}

.banner-button,
:root[data-theme="light"] .banner-button {
  height: 44px;
  min-height: 44px;
  border: 1px solid var(--apple-line);
  border-radius: 12px;
  background: var(--apple-surface);
  color: var(--apple-text);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.banner-button:hover:not(:disabled),
:root[data-theme="light"] .banner-button:hover:not(:disabled) {
  border-color: var(--apple-line-strong);
  background: var(--apple-surface-raised);
  color: var(--apple-text);
  box-shadow: none;
  transform: none;
}

.banner-rate {
  border-color: rgba(240, 201, 106, 0.48);
  border-radius: 8px;
  background: rgba(240, 201, 106, 0.1);
  color: var(--apple-gold);
}

.banner-rate strong,
.banner-message em {
  color: var(--apple-gold);
}

.banner-message em {
  border-color: rgba(240, 201, 106, 0.32);
  background: rgba(240, 201, 106, 0.1);
}

.banner-message strong,
:root[data-theme="light"] .banner-message strong {
  color: var(--apple-text);
}

.banner-copy > small,
.banner-cta,
:root[data-theme="light"] .banner-cta {
  color: var(--apple-secondary);
}

.banner-cta,
:root[data-theme="light"] .banner-cta {
  border-color: transparent;
  border-radius: 8px;
  background: var(--apple-fill);
}

.workbench {
  width: min(1360px, calc(100% - 48px));
  margin-top: 24px;
  gap: 16px;
  background: transparent;
  box-shadow: none;
}

.composer,
.case-preview,
:root[data-theme="light"] .composer,
:root[data-theme="light"] .case-preview {
  border: 1px solid var(--apple-line);
  border-radius: var(--apple-radius-card);
  background: var(--apple-surface);
  box-shadow: var(--apple-shadow-card);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.composer {
  display: flex;
  min-width: 0;
  padding: 20px;
  gap: 16px;
  flex-direction: column;
  align-items: stretch;
}

.case-preview {
  min-width: 0;
  padding: 16px;
}

.mode-tabs,
:root[data-theme="light"] .mode-tabs {
  padding: 3px;
  gap: 3px;
  border: 0;
  border-radius: 12px;
  background: var(--apple-fill);
  box-shadow: none;
}

.mode-button,
:root[data-theme="light"] .mode-button {
  min-height: 44px;
  height: 46px;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--apple-radius-control);
  background: transparent;
  color: var(--apple-secondary);
  box-shadow: none;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.mode-button span {
  font-size: 12px;
  font-weight: 650;
}

.mode-button small {
  color: var(--apple-tertiary);
  font-size: 10px;
}

.mode-button:hover:not(:disabled),
:root[data-theme="light"] .mode-button:hover:not(:disabled) {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.08);
  color: var(--apple-text);
  box-shadow: none;
  transform: none;
}

:root[data-theme="light"] .mode-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.7);
}

.mode-button.is-active,
:root[data-theme="light"] .mode-button.is-active {
  border: 0;
  border-radius: var(--apple-radius-control);
  background: var(--apple-surface-raised);
  color: var(--apple-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.mode-button.is-active small {
  color: var(--apple-secondary);
}

.field-heading label,
.setting-label {
  color: var(--apple-text);
  font-size: 13px;
  font-weight: 650;
}

.field-hint {
  color: var(--apple-tertiary);
  font-size: 11px;
}

.prompt-editor,
:root[data-theme="light"] .prompt-editor {
  min-height: 156px;
  padding: 16px 16px 34px;
  border: 1px solid var(--apple-line);
  border-radius: 12px;
  background: var(--apple-field);
  color: var(--apple-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  font-size: 14px;
  line-height: 1.7;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

:root[data-theme="light"] .prompt-editor {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.prompt-editor:hover {
  border-color: var(--apple-line-strong);
}

.prompt-editor:focus,
.prompt-editor:focus-visible {
  border-color: var(--apple-blue);
  outline: none;
  box-shadow: 0 0 0 4px var(--apple-focus);
}

.char-count {
  color: var(--apple-tertiary);
}

.reference-dropzone,
:root[data-theme="light"] .reference-dropzone,
.frame-slot,
:root[data-theme="light"] .frame-slot {
  border-color: var(--apple-line);
  border-radius: var(--apple-radius-group);
  background: var(--apple-field);
  box-shadow: none;
}

.reference-dropzone:hover:not(:disabled),
.frame-slot:hover:not(:disabled) {
  border-color: rgba(10, 132, 255, 0.54);
  background: var(--apple-blue-soft);
  color: var(--apple-text);
  box-shadow: none;
  transform: none;
}

.reference-add-button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: var(--apple-radius-control);
  background: var(--apple-blue-soft);
  color: var(--apple-blue);
  box-shadow: none;
}

.reference-add-button:hover:not(:disabled) {
  background: rgba(10, 132, 255, 0.28);
  color: var(--apple-blue);
  box-shadow: none;
  transform: none;
}

.reference-asset-remove,
.frame-remove {
  border-radius: 50%;
  background: var(--apple-surface-raised);
  box-shadow: none;
}

.settings-grid {
  gap: 10px;
}

.setting-block,
:root[data-theme="light"] .setting-block,
.quantity-row,
:root[data-theme="light"] .quantity-row {
  border: 1px solid var(--apple-line);
  border-radius: var(--apple-radius-group);
  background: var(--apple-field);
  box-shadow: none;
}

.setting-block {
  min-height: 74px;
  padding: 11px 12px;
}

.segmented {
  padding: 2px;
  gap: 2px;
  border-radius: var(--apple-radius-control);
  background: var(--apple-fill);
}

.segment,
.ratio-button,
.quantity-button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--apple-secondary);
  box-shadow: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.segment:hover:not(:disabled),
.ratio-button:hover:not(:disabled),
.quantity-button:hover:not(:disabled) {
  background: var(--apple-fill-hover);
  color: var(--apple-text);
  box-shadow: none;
  transform: none;
}

.segment.is-active,
.ratio-button.is-active,
.quantity-button.is-active {
  border-color: rgba(10, 132, 255, 0.26);
  background: var(--apple-blue-soft);
  color: var(--apple-blue);
  box-shadow: none;
}

.ratio-button.is-disabled,
.ratio-button:disabled {
  color: var(--apple-tertiary);
  opacity: 0.62;
}

.duration-header strong,
.duration-range {
  color: var(--apple-blue);
  accent-color: var(--apple-blue);
}

.range-labels,
.engine-status {
  color: var(--apple-tertiary);
}

.quantity-row {
  min-height: 44px;
  padding: 3px;
  gap: 3px;
}

.quantity-button {
  min-height: 36px;
}

.create-button,
:root[data-theme="light"] .create-button,
.buy-button,
:root[data-theme="light"] .buy-button,
.primary-action,
:root[data-theme="light"] .primary-action {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--apple-blue);
  color: #ffffff;
  box-shadow: none;
  font-weight: 650;
  transition: background-color 180ms ease, opacity 180ms ease;
}

.create-button:hover:not(:disabled),
:root[data-theme="light"] .create-button:hover:not(:disabled),
.buy-button:hover:not(:disabled),
:root[data-theme="light"] .buy-button:hover:not(:disabled),
.primary-action:hover:not(:disabled),
:root[data-theme="light"] .primary-action:hover:not(:disabled) {
  border-color: transparent;
  background: var(--apple-blue-pressed);
  color: #ffffff;
  box-shadow: none;
  transform: none;
}

.create-button:disabled,
:root[data-theme="light"] .create-button:disabled,
.primary-action:disabled,
:root[data-theme="light"] .primary-action:disabled {
  border-color: transparent;
  background: var(--apple-fill);
  color: var(--apple-tertiary);
  box-shadow: none;
  opacity: 1;
}

.secondary-action,
.code-button,
.modal-close {
  min-height: 36px;
  border: 1px solid var(--apple-line);
  border-radius: var(--apple-radius-control);
  background: var(--apple-fill);
  color: var(--apple-text);
  box-shadow: none;
}

:is(.secondary-action, .code-button, .modal-close):hover:not(:disabled) {
  border-color: var(--apple-line-strong);
  background: var(--apple-fill-hover);
  color: var(--apple-text);
  box-shadow: none;
  transform: none;
}

.engine-status button,
.more-link {
  color: var(--apple-blue);
}

.hero-video-wrap {
  border: 1px solid var(--apple-line);
  border-radius: 16px;
  background: #000000;
  box-shadow: none;
}

.quality-badge,
.video-icon-button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(28, 28, 30, 0.62);
  box-shadow: none;
  -webkit-backdrop-filter: blur(12px) saturate(125%);
  backdrop-filter: blur(12px) saturate(125%);
}

.video-icon-button {
  width: 32px;
  height: 32px;
}

.video-icon-button:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(44, 44, 46, 0.82);
  box-shadow: none;
  transform: none;
}

.case-thumb {
  border: 1px solid var(--apple-line);
  border-radius: 12px;
  background: #000000;
}

.case-thumb.is-active {
  border-color: var(--apple-blue);
  outline: 2px solid var(--apple-focus);
  outline-offset: 2px;
  box-shadow: none;
}

.case-thumb.is-active .thumb-play {
  background: var(--apple-blue);
}

.more-link {
  min-height: 32px;
  padding: 6px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
}

.more-link:hover:not(:disabled) {
  border: 0;
  background: transparent;
  color: var(--apple-blue-pressed);
  box-shadow: none;
  transform: none;
}

.pricing-section,
.examples-section {
  width: min(1360px, calc(100% - 48px));
  border-top-color: var(--apple-line);
}

.pricing-intro h2,
.examples-heading h2 {
  color: var(--apple-text);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.pricing-intro > p:last-child,
.examples-heading > p:last-child,
.price-note {
  color: var(--apple-secondary);
}

.eyebrow {
  color: var(--apple-blue);
}

.price-group {
  border-top-color: var(--apple-line);
}

.price-group h3 {
  color: var(--apple-text);
}

.price-group h3::before {
  border-radius: 99px;
  background: var(--apple-blue);
}

.price-table,
:root[data-theme="light"] .price-table {
  overflow: hidden;
  border: 1px solid var(--apple-line);
  border-radius: 16px;
  background: var(--apple-surface);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.price-row,
:root[data-theme="light"] .price-row,
.price-row > span,
:root[data-theme="light"] .price-row > span,
.price-row > span + span,
:root[data-theme="light"] .price-row > span + span {
  border-color: var(--apple-line);
  background: transparent;
  box-shadow: none;
}

.price-head,
:root[data-theme="light"] .price-head {
  background: var(--apple-fill);
  color: var(--apple-secondary);
}

.price-head > span + span,
.price b,
.service svg {
  color: var(--apple-gold);
}

.price b {
  font-size: 22px;
}

.service strong {
  color: var(--apple-text);
}

.service small,
.price small {
  color: var(--apple-tertiary);
}

.price-footer,
:root[data-theme="light"] .price-footer {
  border: 1px solid var(--apple-line);
  border-radius: var(--apple-radius-group);
  background: var(--apple-field);
  box-shadow: none;
}

.advantages {
  color: var(--apple-secondary);
}

.gallery-card,
.gallery-card > button,
:root[data-theme="light"] .gallery-card > button {
  border-radius: 16px;
}

.gallery-card > button,
:root[data-theme="light"] .gallery-card > button {
  border: 1px solid var(--apple-line);
  background: var(--apple-surface);
  box-shadow: none;
}

.gallery-card > button:hover:not(:disabled) {
  border-color: var(--apple-line-strong);
  box-shadow: none;
  transform: none;
}

.gallery-card:hover :is(img, video) {
  filter: brightness(0.9);
  transform: none;
}

.prompt-pill {
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 10px;
  background: rgba(28, 28, 30, 0.66);
  box-shadow: none;
  -webkit-backdrop-filter: blur(12px) saturate(125%);
  backdrop-filter: blur(12px) saturate(125%);
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.48);
  -webkit-backdrop-filter: blur(8px) saturate(118%);
  backdrop-filter: blur(8px) saturate(118%);
}

:root[data-theme="light"] .modal-backdrop {
  background: rgba(29, 29, 31, 0.22);
}

.modal-dialog,
.utility-dialog,
.account-dialog {
  border: 1px solid var(--apple-line);
  border-radius: var(--apple-radius-card);
  background: var(--apple-chrome);
  box-shadow: var(--apple-shadow-overlay);
  -webkit-backdrop-filter: blur(22px) saturate(138%);
  backdrop-filter: blur(22px) saturate(138%);
}

.history-drawer {
  border-color: var(--apple-line);
  border-radius: 20px 0 0 20px;
  background: var(--apple-surface);
  box-shadow: -18px 0 54px rgba(0, 0, 0, 0.18);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
  backdrop-filter: blur(20px) saturate(135%);
}

.utility-dialog h2,
.history-drawer-head h2,
.utility-dialog strong,
.history-item-title {
  color: var(--apple-text);
}

.utility-description,
.utility-status,
.auth-panel-intro,
.auth-channel-note,
.history-toolbar,
.history-item-meta {
  color: var(--apple-secondary);
}

.utility-fields input,
.account-name-field input,
.auth-form input {
  border-color: var(--apple-line);
  border-radius: var(--apple-radius-control);
  background: var(--apple-field);
  color: var(--apple-text);
  box-shadow: none;
}

.utility-fields input:focus,
.account-name-field input:focus,
.auth-form input:focus {
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 4px var(--apple-focus);
}

.auth-methods,
:root[data-theme="light"] .auth-methods {
  border-color: var(--apple-line);
  border-radius: 12px;
  background: var(--apple-fill);
  box-shadow: none;
}

.auth-method-button {
  border-radius: 9px;
}

.toast {
  border: 1px solid var(--apple-line);
  border-radius: var(--apple-radius-group);
  background: var(--apple-chrome);
  color: var(--apple-text);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  backdrop-filter: blur(16px) saturate(135%);
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 76px;
  }

  .site-header,
  :root[data-theme="light"] .site-header {
    height: 60px;
    min-height: 60px;
    padding-inline: 12px;
    gap: 10px;
  }

  .header-actions {
    gap: 6px;
  }

  .history-button,
  .theme-button {
    width: 36px;
    height: 36px;
  }

  .login-button {
    height: 36px;
    min-width: 76px;
    padding-inline: 12px;
  }

  .header-banner {
    width: calc(100% - 24px);
    height: 44px;
    margin-top: 10px;
  }

  .banner-button,
  :root[data-theme="light"] .banner-button {
    height: 44px;
    min-height: 44px;
    border-radius: 12px;
  }

  .workbench {
    width: calc(100% - 24px);
    margin-top: 16px;
    gap: 12px;
  }

  .composer,
  .case-preview,
  :root[data-theme="light"] .composer,
  :root[data-theme="light"] .case-preview {
    padding: 16px;
    border-radius: 16px;
  }

  .mode-tabs {
    border-radius: 12px;
  }

  .mode-button,
  :root[data-theme="light"] .mode-button {
    min-height: 44px;
    height: 44px;
    padding-inline: 8px;
  }

  .prompt-editor,
  :root[data-theme="light"] .prompt-editor {
    min-height: 148px;
    padding: 14px 14px 32px;
  }

  .setting-block {
    min-height: 72px;
  }

  .reference-dropzone,
  .frame-slot {
    min-height: 96px;
  }

  .pricing-section,
  .examples-section {
    width: calc(100% - 24px);
  }

  .modal-dialog,
  .utility-dialog,
  .account-dialog {
    border-radius: 16px;
  }

  .history-drawer {
    border-radius: 16px 0 0 16px;
  }
}

@media (max-width: 540px) {
  .brand-name {
    font-size: 19px;
  }

  .settings-grid {
    gap: 8px;
  }

  .setting-block {
    padding: 10px;
    border-radius: 12px;
  }

  .quantity-row {
    border-radius: 12px;
  }

  .price-table,
  :root[data-theme="light"] .price-table {
    border-radius: 14px;
  }

  .price-footer,
  :root[data-theme="light"] .price-footer {
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(.api-button, .history-button, .theme-button, .login-button, .banner-button, .mode-button, .segment, .ratio-button, .quantity-button, .reference-add-button, .reference-dropzone, .frame-slot, .create-button, .buy-button, .primary-action, .secondary-action, .code-button, .video-icon-button, .gallery-card > button) {
    transition-duration: 0.01ms !important;
  }

  :is(.api-button, .history-button, .theme-button, .login-button, .banner-button, .mode-button, .segment, .ratio-button, .quantity-button, .reference-add-button, .reference-dropzone, .frame-slot, .create-button, .buy-button, .primary-action, .secondary-action, .code-button, .video-icon-button, .gallery-card > button):hover,
  .gallery-card:hover :is(img, video) {
    transform: none !important;
  }
}

/* Theme-specific specificity fixes for legacy light-mode rules. */
:root[data-theme="light"] .login-button {
  border-color: transparent;
  background: var(--apple-blue);
  color: #ffffff;
  box-shadow: none;
}

:root[data-theme="light"] .login-button:hover:not(:disabled) {
  border-color: transparent;
  background: var(--apple-blue-pressed);
  color: #ffffff;
}

:root[data-theme="light"] .eyebrow,
:root[data-theme="light"] .pricing-intro .eyebrow,
:root[data-theme="light"] .examples-heading .eyebrow {
  color: var(--apple-blue);
}

:root[data-theme="light"] .segment.is-active,
:root[data-theme="light"] .ratio-button.is-active,
:root[data-theme="light"] .quantity-button.is-active,
:root:not([data-theme="light"]) .segment.is-active,
:root:not([data-theme="light"]) .ratio-button.is-active,
:root:not([data-theme="light"]) .quantity-button.is-active {
  border-color: rgba(10, 132, 255, 0.32);
  background: var(--apple-blue-soft);
  color: var(--apple-blue);
  box-shadow: none;
}

:root[data-theme="light"] .duration-block,
:root:not([data-theme="light"]) .duration-block {
  --duration-fill: var(--apple-blue);
  --duration-track: var(--apple-fill);
  --duration-thumb: var(--apple-surface-raised);
  --duration-thumb-border: var(--apple-blue);
  border-color: var(--apple-line);
}

:root[data-theme="light"] .duration-header strong,
:root:not([data-theme="light"]) .duration-header strong {
  color: var(--apple-blue);
}

/* Prompt @ mention dialog: show the actual uploaded asset beside its index. */
.reference-mention-popover {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  width: min(100%, 440px);
  max-height: min(360px, 48vh);
  overflow: hidden;
  padding: 12px;
  gap: 10px;
  border: 1px solid var(--apple-line-strong);
  border-radius: 16px;
  background: var(--apple-chrome);
  color: var(--apple-text);
  box-shadow: var(--apple-shadow-overlay);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
  backdrop-filter: blur(20px) saturate(135%);
}

.reference-mention-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reference-mention-head > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.reference-mention-head strong {
  overflow: hidden;
  color: var(--apple-text);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-mention-head span {
  overflow: hidden;
  color: var(--apple-secondary);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-mention-head kbd {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 1px solid var(--apple-line);
  border-radius: 6px;
  background: var(--apple-fill);
  color: var(--apple-tertiary);
  font-family: inherit;
  font-size: 10px;
}

.reference-mention-list {
  display: grid;
  max-height: 288px;
  overflow-y: auto;
  gap: 6px;
  scrollbar-color: var(--apple-line-strong) transparent;
  scrollbar-width: thin;
}

.reference-mention-option {
  display: grid;
  width: 100%;
  min-height: 56px;
  padding: 6px 8px;
  grid-template-columns: 38px 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--apple-text);
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.reference-mention-option:hover,
.reference-mention-option:focus-visible,
.reference-mention-option.is-active {
  border-color: rgba(10, 132, 255, 0.3);
  background: var(--apple-blue-soft);
  color: var(--apple-text);
  outline: none;
  box-shadow: none;
  transform: none;
}

.reference-mention-index {
  display: inline-grid;
  min-width: 34px;
  min-height: 28px;
  padding-inline: 5px;
  place-items: center;
  border-radius: 8px;
  background: var(--apple-fill);
  color: var(--apple-blue);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.reference-mention-preview {
  display: grid;
  width: 44px;
  height: 44px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--apple-line);
  border-radius: 9px;
  background: var(--apple-fill);
  color: var(--apple-secondary);
  object-fit: cover;
}

.reference-mention-preview svg {
  width: 18px;
  height: 18px;
}

.reference-mention-meta {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.reference-mention-meta strong,
.reference-mention-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-mention-meta strong {
  color: var(--apple-text);
  font-size: 11px;
  font-weight: 600;
}

.reference-mention-meta small {
  color: var(--apple-secondary);
  font-size: 10px;
}

.reference-mention-action {
  color: var(--apple-blue);
  font-size: 10px;
  font-weight: 600;
}

.reference-mention-empty {
  margin: 0;
  padding: 14px 8px;
  border-radius: 10px;
  background: var(--apple-fill);
  color: var(--apple-secondary);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 560px) {
  .reference-mention-popover {
    width: 100%;
    max-height: min(320px, 46vh);
    padding: 10px;
    border-radius: 14px;
  }

  .reference-mention-list {
    max-height: 252px;
  }

  .reference-mention-option {
    min-height: 56px;
    grid-template-columns: 34px 42px minmax(0, 1fr) auto;
    gap: 7px;
  }

  .reference-mention-preview {
    width: 42px;
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reference-mention-option {
    transition: none;
  }
}

:root[data-theme="light"] .modal-dialog,
:root[data-theme="light"] .utility-dialog,
:root[data-theme="light"] .account-dialog {
  border-color: var(--apple-line);
  background: var(--apple-chrome);
  box-shadow: var(--apple-shadow-overlay);
  -webkit-backdrop-filter: blur(22px) saturate(138%);
  backdrop-filter: blur(22px) saturate(138%);
}

:root[data-theme="light"] .history-drawer {
  border-color: var(--apple-line);
  background: var(--apple-surface);
  box-shadow: -18px 0 54px rgba(0, 0, 0, 0.12);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
  backdrop-filter: blur(20px) saturate(135%);
}

:root[data-theme="light"] .toast {
  border-color: var(--apple-line);
  background: var(--apple-chrome);
  color: var(--apple-text);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  backdrop-filter: blur(16px) saturate(135%);
}

/* Xnyoo H3 price banner: make the model and lowest price the first visual read. */
.header-banner {
  width: min(760px, calc(100% - 48px));
  height: 58px;
  margin: 14px auto 0;
}

.banner-button,
:root[data-theme="light"] .banner-button {
  display: grid !important;
  width: 100%;
  height: 58px;
  min-height: 58px;
  padding: 0 12px 0 10px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--h3-line);
  border-radius: 16px;
  background: linear-gradient(105deg, var(--h3-surface), var(--h3-surface-raised));
  color: var(--h3-text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.banner-button:hover,
:root[data-theme="light"] .banner-button:hover {
  border-color: var(--h3-purple);
  background: linear-gradient(105deg, var(--h3-surface-raised), var(--h3-surface));
  box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
  transform: translateY(-1px);
}

.banner-button:focus-visible {
  outline: 2px solid var(--h3-purple);
  outline-offset: 3px;
}

.banner-rate {
  display: grid;
  width: 46px;
  height: 40px;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(227, 189, 114, .62);
  border-radius: 10px;
  background: rgba(227, 189, 114, .12);
  color: var(--h3-gold);
  line-height: 1;
}

.banner-rate span {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}

.banner-rate strong {
  margin-top: 3px;
  color: var(--h3-gold);
  font-size: 14px;
  font-weight: 850;
}

.banner-copy {
  display: grid !important;
  min-width: 0;
  align-content: center;
  gap: 3px;
  overflow: hidden;
}

.banner-kicker {
  display: block;
  overflow: hidden;
  color: var(--h3-purple);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.banner-message {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.banner-message strong,
:root[data-theme="light"] .banner-message strong {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  color: var(--h3-text);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.banner-message em,
:root[data-theme="light"] .banner-message em {
  flex: 0 0 auto;
  padding: 3px 9px;
  border: 1px solid rgba(227, 189, 114, .42);
  border-radius: 999px;
  background: rgba(227, 189, 114, .13);
  color: var(--h3-gold);
  font-size: 13px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.1;
  white-space: nowrap;
}

.banner-copy > small {
  display: block !important;
  overflow: hidden;
  color: var(--h3-muted);
  font-size: 9px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.banner-cta,
:root[data-theme="light"] .banner-cta {
  display: inline-flex;
  width: auto;
  min-width: 84px;
  height: 32px;
  padding: 0 11px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--h3-purple);
  border-radius: 9px;
  background: var(--h3-purple);
  color: #ffffff;
  gap: 5px;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.banner-cta:hover,
:root[data-theme="light"] .banner-cta:hover {
  background: var(--h3-purple);
  color: #ffffff;
}

.banner-cta svg {
  width: 13px;
  height: 13px;
}

@media (max-width: 760px) {
  .header-banner {
    width: calc(100% - 24px);
    height: 64px;
    margin-top: 10px;
  }

  .banner-button,
  :root[data-theme="light"] .banner-button {
    height: 64px;
    min-height: 64px;
    padding: 0 8px;
    grid-template-columns: 42px minmax(0, 1fr) 34px;
    gap: 8px;
    border-radius: 14px;
  }

  .banner-rate {
    width: 40px;
    height: 42px;
    border-radius: 9px;
  }

  .banner-rate strong {
    font-size: 13px;
  }

  .banner-copy {
    gap: 3px;
  }

  .banner-kicker {
    font-size: 7px;
    letter-spacing: .1em;
  }

  .banner-message {
    gap: 5px;
  }

  .banner-message strong {
    font-size: 11px;
  }

  .banner-message em {
    padding: 2px 6px;
    font-size: 10px;
  }

  .banner-copy > small {
    font-size: 8px;
  }

  .banner-cta {
    width: 34px;
    min-width: 34px;
    height: 30px;
    padding: 0;
    border-radius: 8px;
  }

  .banner-cta-label {
    display: none;
  }
}

.gallery-toolbar {
  display: flex;
  margin: 26px 0 16px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.gallery-filters {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 8px;
}

.gallery-filter,
.gallery-load-more {
  display: inline-flex;
  min-height: 40px;
  padding: 0 14px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--apple-line);
  border-radius: 999px;
  background: var(--apple-fill);
  color: var(--apple-text);
  gap: 7px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.gallery-filter b {
  color: var(--apple-secondary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.gallery-filter:hover,
.gallery-filter:focus-visible,
.gallery-load-more:hover,
.gallery-load-more:focus-visible {
  border-color: var(--apple-line-strong);
  background: var(--apple-fill-hover);
  outline: none;
}

.gallery-filter:focus-visible,
.gallery-load-more:focus-visible {
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.28);
}

.gallery-filter.is-active {
  border-color: rgba(10, 132, 255, 0.72);
  background: #0a84ff;
  color: #fff;
}

.gallery-filter.is-active b {
  color: rgba(255, 255, 255, 0.78);
}

.gallery-status {
  max-width: 240px;
  margin: 10px 0 0;
  color: var(--apple-secondary);
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
}

.gallery-load-more-wrap {
  display: flex;
  margin: 24px 0 14px;
  justify-content: center;
}

.gallery-load-more {
  min-width: 164px;
}

.gallery-load-more:disabled {
  cursor: progress;
  opacity: 0.58;
}

.gallery-empty {
  display: grid;
  min-height: 180px;
  margin: 0;
  grid-column: 1 / -1;
  place-items: center;
  border: 1px dashed var(--apple-line-strong);
  border-radius: 18px;
  color: var(--apple-secondary);
  text-align: center;
}

.gallery-card video[data-video-src] {
  background: linear-gradient(135deg, #101218, #202737 52%, #0e1016);
}

@media (max-width: 720px) {
  .gallery-toolbar {
    flex-direction: column;
  }

  .gallery-status {
    max-width: none;
    margin-top: 0;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-filter,
  .gallery-load-more {
    transition: none;
  }
}

/* Lower-page refinement: compact price discovery and a two-track case library. */
.pricing-section,
.examples-section {
  width: min(1240px, calc(100% - 48px));
  margin-top: 56px;
  padding: 56px 0 72px;
}

.examples-section {
  margin-top: 0;
  padding-top: 64px;
  padding-bottom: 96px;
}

.pricing-intro {
  display: grid;
  margin-bottom: 28px;
  grid-template-columns: minmax(0, 1fr) minmax(228px, 276px);
  align-items: stretch;
  gap: 32px;
}

.pricing-intro-copy {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 12px;
}

.pricing-intro-copy .eyebrow,
.examples-heading .eyebrow {
  margin: 0;
  color: var(--apple-blue);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .12em;
}

.pricing-intro h2,
.examples-heading h2 {
  max-width: 680px;
  margin: 0;
  color: var(--apple-text);
  font-size: clamp(32px, 3.5vw, 48px);
  font-weight: 720;
  line-height: 1.1;
  letter-spacing: -.045em;
}

.pricing-intro-copy > p:last-child,
.examples-heading > p:last-child {
  max-width: 590px;
  margin: 0;
  color: var(--apple-secondary);
  font-size: 14px;
  line-height: 1.65;
}

.pricing-highlight {
  display: grid;
  min-height: 178px;
  padding: 20px;
  align-content: center;
  border: 1px solid var(--apple-line-strong);
  border-radius: 18px;
  background: linear-gradient(145deg, var(--apple-surface-raised), var(--apple-surface));
  color: var(--apple-text);
  gap: 7px;
}

.pricing-highlight > span {
  color: var(--apple-secondary);
  font-size: 11px;
  font-weight: 650;
}

.pricing-highlight strong {
  color: var(--apple-gold);
  font-size: clamp(34px, 3vw, 44px);
  font-weight: 760;
  letter-spacing: -.055em;
  line-height: .95;
}

.pricing-highlight strong small {
  margin-left: 4px;
  color: var(--apple-secondary);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
}

.pricing-highlight p {
  margin: 0;
  color: var(--apple-tertiary);
  font-size: 11px;
}

.pricing-groups {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: 18px;
}

.price-group,
.price-group.compact-price {
  display: grid;
  margin: 0;
  padding: 0;
  border: 1px solid var(--apple-line);
  border-radius: 18px;
  background: var(--apple-surface);
}

.price-group.compact-price {
  grid-column: 1 / -1;
  grid-template-columns: minmax(178px, .6fr) minmax(0, 1.4fr);
  align-items: stretch;
}

.price-group-heading {
  display: flex;
  min-width: 0;
  padding: 17px 18px 13px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.price-group-heading h3 {
  margin: 0;
  padding: 0;
  color: var(--apple-text);
  font-size: 15px;
  font-weight: 700;
}

.price-group-heading h3::before {
  display: none;
}

.price-group-heading > span {
  overflow: hidden;
  color: var(--apple-tertiary);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-group .price-table,
:root[data-theme="light"] .price-group .price-table {
  margin: 0 18px 18px;
  border-color: var(--apple-line);
  border-radius: 12px;
  background: var(--apple-field);
}

.compact-price .price-group-heading {
  padding-bottom: 17px;
  align-self: center;
}

.compact-price .price-table,
:root[data-theme="light"] .compact-price .price-table {
  margin: 12px 18px 12px 0;
}

.price-row,
:root[data-theme="light"] .price-row {
  min-height: 58px;
  grid-template-columns: minmax(0, 1fr) minmax(144px, .72fr);
}

.price-row > span,
:root[data-theme="light"] .price-row > span {
  min-height: 58px;
  padding: 12px 14px;
}

.price-row > span + span,
:root[data-theme="light"] .price-row > span + span {
  justify-content: flex-start;
  border-left-color: var(--apple-line);
  background: transparent;
}

.price-head,
:root[data-theme="light"] .price-head {
  min-height: 38px;
  color: var(--apple-tertiary);
  font-size: 10px;
}

.price-head > span + span {
  color: var(--apple-gold);
}

.service {
  gap: 10px;
}

.service svg {
  width: 16px;
  height: 16px;
}

.service strong {
  font-size: 12px;
  font-weight: 650;
}

.service small {
  margin-left: 0;
  font-size: 10px;
  line-height: 1.4;
}

.price {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}

.price b {
  color: var(--apple-gold);
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 750;
  letter-spacing: -.035em;
}

.price small {
  color: var(--apple-tertiary);
  font-size: 10px;
}

.info-dot {
  flex: 0 0 auto;
}

.price-footer,
:root[data-theme="light"] .price-footer {
  margin-top: 18px;
  padding: 14px 16px;
  border-color: var(--apple-line);
  border-radius: 14px;
  background: var(--apple-field);
  gap: 18px;
}

.advantages {
  gap: 8px 16px;
  font-size: 11px;
}

.advantages span {
  display: inline-flex;
  align-items: center;
}

.buy-button,
:root[data-theme="light"] .buy-button {
  min-width: 148px;
  min-height: 42px;
  border-color: transparent;
  border-radius: 10px;
  background: var(--apple-blue);
  color: #ffffff;
  font-size: 12px;
}

.buy-button:hover:not(:disabled),
:root[data-theme="light"] .buy-button:hover:not(:disabled) {
  border-color: transparent;
  background: var(--apple-blue-pressed);
  color: #ffffff;
}

.price-note {
  max-width: 820px;
  margin: 15px 0 0;
  color: var(--apple-tertiary);
  font-size: 11px;
  line-height: 1.65;
}

.price-note strong {
  color: var(--apple-secondary);
  font-weight: 650;
}

.examples-heading {
  max-width: 760px;
  margin: 0 0 24px;
  text-align: left;
}

.examples-heading .eyebrow {
  justify-content: flex-start;
}

.examples-heading .eyebrow span {
  width: 18px;
  background: var(--apple-blue);
}

.examples-heading h2 {
  margin-top: 8px;
  font-size: clamp(32px, 3.8vw, 50px);
}

.gallery-toolbar {
  margin: 0 0 18px;
  padding: 12px 0;
  align-items: center;
  border-top: 1px solid var(--apple-line);
  border-bottom: 1px solid var(--apple-line);
}

.gallery-filters {
  flex: 0 1 auto;
  gap: 8px;
}

.gallery-filter,
.gallery-load-more {
  min-height: 44px;
  padding: 0 15px;
  border-color: var(--apple-line);
  border-radius: 11px;
  background: var(--apple-field);
  color: var(--apple-text);
  font-size: 12px;
  font-weight: 650;
}

.gallery-filter:hover,
.gallery-filter:focus-visible,
.gallery-load-more:hover,
.gallery-load-more:focus-visible {
  border-color: var(--apple-line-strong);
  background: var(--apple-fill-hover);
}

.gallery-filter.is-active {
  border-color: transparent;
  background: var(--apple-blue);
  color: #ffffff;
}

.gallery-filter.is-active b {
  color: rgba(255, 255, 255, .76);
}

.gallery-status {
  max-width: 280px;
  margin: 0 0 0 auto;
  color: var(--apple-secondary);
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
}

.gallery-grid {
  display: grid;
  grid-auto-flow: row;
  grid-auto-rows: auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.gallery-card {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  grid-row: auto;
  border-radius: 14px;
  background: var(--apple-field);
}

.gallery-card > button,
:root[data-theme="light"] .gallery-card > button {
  height: 100%;
  overflow: hidden;
  border-color: var(--apple-line);
  border-radius: inherit;
  background: var(--apple-surface);
}

.gallery-card > button::after {
  position: absolute;
  z-index: 1;
  inset: 34% 0 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .76));
}

.gallery-card :is(img, video) {
  filter: brightness(.88);
  transition: filter 180ms ease;
}

.gallery-card:hover :is(img, video) {
  filter: brightness(1);
  transform: none;
}

.gallery-card > button:focus-visible {
  border-color: var(--apple-blue);
  outline: none;
  box-shadow: inset 0 0 0 2px var(--apple-blue);
}

.gallery-card .quality-badge {
  z-index: 2;
  top: 10px;
  right: auto;
  left: 10px;
  border-color: rgba(255, 255, 255, .22);
  border-radius: 7px;
  background: rgba(0, 0, 0, .48);
  color: #ffffff;
  font-size: 10px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.gallery-card-copy {
  position: absolute;
  z-index: 2;
  right: 112px;
  bottom: 10px;
  left: 11px;
  display: grid;
  min-width: 0;
  gap: 2px;
  color: #ffffff;
  text-align: left;
}

.gallery-card-copy strong,
.gallery-card-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-card-copy strong {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.gallery-card-copy small {
  color: rgba(255, 255, 255, .72);
  font-size: 10px;
}

.gallery-card .prompt-pill {
  z-index: 3;
  right: 9px;
  bottom: 9px;
  min-height: 30px;
  padding: 0 8px;
  border-color: rgba(255, 255, 255, .3);
  border-radius: 8px;
  background: rgba(26, 26, 28, .74);
  color: #ffffff;
  font-size: 10px;
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  backdrop-filter: blur(10px) saturate(130%);
}

.gallery-load-more-wrap {
  margin: 24px 0 0;
}

.gallery-load-more {
  min-width: 176px;
}

.gallery-empty {
  min-height: 220px;
  border-color: var(--apple-line-strong);
  border-radius: 16px;
}

@media (max-width: 1050px) {
  .pricing-groups {
    grid-template-columns: 1fr;
  }

  .price-group.compact-price {
    grid-column: auto;
    grid-template-columns: minmax(178px, .6fr) minmax(0, 1.4fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .pricing-section,
  .examples-section {
    width: calc(100% - 24px);
    margin-right: 12px;
    margin-left: 12px;
    padding-top: 42px;
    padding-bottom: 54px;
  }

  .examples-section {
    padding-top: 48px;
    padding-bottom: 72px;
  }

  .pricing-intro {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .pricing-intro h2,
  .examples-heading h2 {
    font-size: 32px;
  }

  .pricing-intro-copy > p:last-child,
  .examples-heading > p:last-child {
    font-size: 13px;
  }

  .pricing-highlight {
    min-height: 0;
    padding: 16px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 2px 12px;
  }

  .pricing-highlight > span,
  .pricing-highlight p {
    grid-column: 1;
  }

  .pricing-highlight strong {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    font-size: 36px;
  }

  .price-group.compact-price {
    grid-template-columns: 1fr;
  }

  .compact-price .price-group-heading {
    padding-bottom: 8px;
  }

  .compact-price .price-table,
  :root[data-theme="light"] .compact-price .price-table {
    margin: 0 14px 14px;
  }

  .price-group-heading {
    padding: 15px 14px 11px;
  }

  .price-group .price-table,
  :root[data-theme="light"] .price-group .price-table {
    margin: 0 14px 14px;
  }

  .price-row,
  :root[data-theme="light"] .price-row {
    min-height: 54px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .price-row > span,
  :root[data-theme="light"] .price-row > span {
    min-height: 54px;
    padding: 10px 11px;
  }

  .price-row > span + span,
  :root[data-theme="light"] .price-row > span + span {
    min-width: 126px;
    justify-content: flex-end;
    border-top: 0;
    border-left: 1px solid var(--apple-line);
  }

  .price-head,
  :root[data-theme="light"] .price-head {
    display: grid;
    min-height: 36px;
  }

  .price-head > span {
    min-height: 36px;
    padding-block: 8px;
  }

  .service {
    gap: 8px;
  }

  .service strong {
    font-size: 11px;
  }

  .service small {
    width: 100%;
    margin: 0;
    font-size: 9px;
  }

  .price {
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
  }

  .price b {
    font-size: 18px;
  }

  .price small {
    font-size: 9px;
  }

  .price-footer,
  :root[data-theme="light"] .price-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .advantages {
    display: grid;
    gap: 8px;
  }

  .buy-button,
  :root[data-theme="light"] .buy-button {
    width: 100%;
    min-height: 44px;
  }

  .price-note {
    margin-top: 13px;
    font-size: 10px;
  }

  .examples-heading {
    margin-bottom: 20px;
  }

  .gallery-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .gallery-status {
    max-width: none;
    margin: 0;
    text-align: left;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .gallery-card-copy {
    right: 10px;
    bottom: 40px;
  }

  .gallery-card .prompt-pill {
    right: 8px;
    bottom: 8px;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 480px) {
  .pricing-intro h2,
  .examples-heading h2 {
    font-size: 29px;
  }

  .gallery-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-filter {
    min-width: 0;
    padding-inline: 8px;
  }

  .gallery-filter b {
    font-size: 10px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-card-copy {
    right: 112px;
    bottom: 10px;
  }
}

@media (max-width: 760px) {
  .header-banner .banner-cta,
  :root[data-theme="light"] .header-banner .banner-cta {
    width: 34px;
    min-width: 34px;
    height: 30px;
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-card :is(img, video),
  .gallery-filter,
  .gallery-load-more {
    transition: none;
  }
}

/* Account state stays visible in the workspace chrome without competing with the primary login action. */
.header-credit-summary {
  display: inline-flex;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--h3-line);
  border-radius: var(--apple-radius-control, 10px);
  background: var(--h3-surface-soft);
  color: var(--h3-muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.header-credit-summary[hidden] {
  display: none !important;
}

.header-credit-label {
  color: var(--h3-muted);
  font-size: 9px;
  font-weight: 600;
}

.header-credit-value {
  color: var(--h3-text);
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.header-credit-unit {
  color: var(--h3-faint);
  font-size: 9px;
}

.header-credit-summary.is-pending {
  background: transparent;
}

.header-credit-summary.is-pending .header-credit-value {
  color: var(--h3-muted);
  font-size: 10px;
  font-weight: 600;
}

.header-credit-summary.is-pending .header-credit-unit {
  display: none;
}

.header-credit-summary.is-unavailable .header-credit-value {
  color: var(--h3-faint);
}

.header-recharge-button {
  display: inline-flex;
  min-width: 68px;
  height: 36px;
  padding: 0 11px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--h3-purple);
  border-radius: var(--apple-radius-control, 10px);
  background: var(--h3-purple-soft);
  color: var(--h3-purple);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
  white-space: nowrap;
}

.header-recharge-button svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.header-recharge-button:hover:not(:disabled) {
  border-color: var(--h3-purple);
  background: var(--h3-purple);
  color: #ffffff;
  transform: none;
}

@media (max-width: 760px) {
  .header-credit-summary {
    padding-inline: 8px;
  }

  .header-recharge-button {
    min-width: 64px;
    padding-inline: 9px;
  }
}

@media (max-width: 540px) {
  .header-credit-summary {
    padding-inline: 7px;
    gap: 0;
  }

  .header-credit-label,
  .header-credit-unit {
    display: none;
  }

  .header-recharge-button {
    width: 36px;
    min-width: 36px;
    padding: 0;
  }

  .header-recharge-button > span {
    display: none;
  }
}

#emailAuthPanel .email-auth-form {
  gap: 14px;
}

#emailAuthPanel .email-auth-form label {
  gap: 7px;
  color: var(--apple-text);
  font-size: 12px;
  font-weight: 650;
}

#emailAuthPanel .email-auth-form input {
  min-height: 48px;
  padding-inline: 14px;
  border: 1px solid var(--apple-line);
  border-radius: 10px;
  background: var(--apple-field);
  color: var(--apple-text);
  box-shadow: none;
}

#emailAuthPanel .password-field input {
  padding-right: 54px;
}

#emailAuthPanel .email-auth-form input::placeholder {
  color: var(--apple-tertiary);
  opacity: 1;
}

#emailAuthPanel .email-auth-form input:hover {
  border-color: var(--apple-line-strong);
}

#emailAuthPanel .email-auth-form input:focus {
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 3px var(--apple-focus);
}

#emailAuthPanel .password-toggle,
#emailAuthPanel .password-toggle:hover,
#emailAuthPanel .password-toggle:active {
  transform: translateY(-50%);
  box-shadow: none;
}

#emailAuthPanel .password-toggle {
  right: 4px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: var(--apple-secondary);
}

#emailAuthPanel .password-toggle:hover {
  background: var(--apple-fill);
  color: var(--apple-blue);
}

#emailAuthPanel .email-auth-links button {
  color: var(--apple-blue);
}

#emailAuthPanel .email-auth-links button:hover:not(:disabled) {
  color: var(--apple-blue-pressed);
  box-shadow: none;
  transform: none;
}

#emailAuthPanel .email-auth-link--register {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--apple-line);
  border-radius: 8px;
  background: var(--apple-fill);
  color: var(--apple-blue);
  font-weight: 700;
}

#emailAuthPanel .email-auth-link--register:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--apple-blue) 35%, var(--apple-line));
  background: var(--apple-blue-soft);
  color: var(--apple-blue);
}

#emailRegisterForm .auth-submit {
  min-height: 50px;
  border-radius: 10px;
  font-weight: 700;
}

#emailRegisterForm .auth-submit:hover:not(:disabled) {
  transform: none;
}

@media (max-width: 380px) {
  .site-header {
    gap: 6px;
  }

  .header-actions {
    gap: 4px;
  }

  .history-button {
    display: none;
  }

  .header-credit-summary {
    padding-inline: 6px;
  }

  .header-credit-value {
    font-size: 10px;
    letter-spacing: -.035em;
  }

  .login-button {
    min-width: 68px;
    padding-inline: 8px;
  }
}

/* Keep the model identifier textual, compact, and horizontal. */
.banner-button,
:root[data-theme="light"] .banner-button {
  grid-template-columns: 104px minmax(0, 1fr) auto;
}

.banner-provider-name {
  display: inline-flex;
  min-width: 0;
  height: 36px;
  align-items: center;
  color: var(--h3-gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .banner-button,
  :root[data-theme="light"] .banner-button {
    grid-template-columns: 88px minmax(0, 1fr) 34px;
    gap: 8px;
  }

  .banner-provider-name {
    height: 32px;
    font-size: 10px;
  }
}

@media (max-width: 380px) {
  .banner-button,
  :root[data-theme="light"] .banner-button {
    grid-template-columns: 76px minmax(0, 1fr) 34px;
    gap: 6px;
  }

  .banner-provider-name {
    font-size: 9px;
    letter-spacing: -.06em;
  }
}

/* API 服务咨询使用紧凑、可扫码且可键盘访问的联系卡片。 */
.customer-manager-dialog {
  width: min(392px, calc(100% - 32px));
  padding: 28px;
}

.customer-manager-dialog .utility-description {
  max-width: 29ch;
  margin-bottom: 16px;
}

.customer-manager-qr {
  display: grid;
  margin: 0;
  padding: 16px;
  justify-items: center;
  border: 1px solid var(--apple-line);
  border-radius: 16px;
  background: var(--apple-field);
  gap: 10px;
  text-align: center;
}

.customer-manager-qr strong {
  color: var(--apple-text);
  font-size: 13px;
  font-weight: 700;
}

.customer-manager-qr img {
  display: block;
  width: min(220px, 100%);
  height: auto;
  padding: 8px;
  border: 1px solid var(--apple-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
}

.customer-manager-qr figcaption {
  color: var(--apple-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.customer-manager-email {
  display: inline-flex;
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--apple-line);
  border-radius: var(--apple-radius-control);
  background: transparent;
  color: var(--apple-blue);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.customer-manager-email:hover {
  border-color: var(--apple-line-strong);
  background: var(--apple-fill-hover);
  color: var(--apple-blue-pressed);
}

.customer-manager-email:focus-visible,
.customer-manager-dialog .primary-action:focus-visible {
  outline: 3px solid rgba(10, 132, 255, .36);
  outline-offset: 3px;
}

.customer-manager-dialog .utility-actions {
  margin-top: 12px;
}

.customer-manager-dialog .primary-action {
  width: 100%;
  justify-content: center;
}

@media (max-width: 480px) {
  .customer-manager-dialog {
    width: calc(100% - 24px);
    padding: 24px 18px 18px;
  }

  .customer-manager-qr {
    padding: 12px;
  }

  .customer-manager-qr img {
    width: min(198px, 100%);
  }
}

@media (max-height: 540px) {
  .customer-manager-qr img {
    width: min(168px, 100%);
  }
}

/* 邀请奖励横幅与账户内绑定卡片共享平台令牌，保持轻量并突出 50 积分收益。 */
.referral-banner {
  width: min(680px, calc(100% - 48px));
  margin: 8px auto 0;
}

.referral-banner-button {
  display: grid;
  width: 100%;
  min-height: 54px;
  padding: 8px 12px;
  cursor: pointer;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid rgba(240, 201, 106, .32);
  border-radius: 14px;
  background: linear-gradient(110deg, rgba(240, 201, 106, .14), rgba(126, 91, 190, .1));
  color: var(--apple-text);
  gap: 10px;
  font: inherit;
  text-align: left;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.referral-banner-button:hover {
  border-color: rgba(240, 201, 106, .56);
  background: linear-gradient(110deg, rgba(240, 201, 106, .2), rgba(126, 91, 190, .14));
}

.referral-banner-button:focus-visible,
.referral-bind-form input:focus-visible,
.referral-code-card button:focus-visible {
  outline: 3px solid rgba(10, 132, 255, .34);
  outline-offset: 3px;
}

.referral-banner-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(240, 201, 106, .38);
  border-radius: 10px;
  background: rgba(240, 201, 106, .12);
  color: var(--apple-gold);
}

.referral-banner-icon svg {
  width: 17px;
  height: 17px;
}

.referral-banner-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.referral-banner-copy strong {
  overflow: hidden;
  color: var(--apple-text);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-banner-copy small {
  overflow: hidden;
  color: var(--apple-secondary);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-banner-cta {
  display: inline-flex;
  min-height: 36px;
  padding: 0 9px;
  align-items: center;
  border: 1px solid rgba(240, 201, 106, .38);
  border-radius: 9px;
  color: var(--apple-gold);
  font-size: 11px;
  font-weight: 700;
  gap: 5px;
  white-space: nowrap;
}

.referral-banner-cta svg {
  width: 14px;
  height: 14px;
}

.referral-view {
  display: grid;
  gap: 14px;
}

.referral-view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.referral-view-header > div {
  min-width: 0;
}

.referral-kicker {
  margin: 0 0 7px;
  color: var(--apple-gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
}

.referral-view-header h2 {
  margin: 0;
  color: var(--apple-text);
  font-size: 22px;
  line-height: 1.2;
}

.referral-view-header p:last-child {
  max-width: 36ch;
  margin: 8px 0 0;
  color: var(--apple-secondary);
  font-size: 11px;
  line-height: 1.6;
}

.referral-view-header .auth-back {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 8px;
}

.referral-code-card {
  display: flex;
  min-height: 78px;
  padding: 14px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(240, 201, 106, .32);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(240, 201, 106, .1), var(--apple-field));
  gap: 12px;
}

.referral-code-card > div {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.referral-code-card span,
.referral-stats span,
.referral-section-heading span {
  color: var(--apple-secondary);
  font-size: 10px;
}

.referral-code-card strong {
  overflow: hidden;
  color: var(--apple-gold);
  font-family: Inter, sans-serif;
  font-size: 22px;
  letter-spacing: .08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-code-card .secondary-action {
  min-height: 40px;
  flex: 0 0 auto;
}

.referral-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--apple-line);
  border-radius: 12px;
  background: var(--apple-field);
}

.referral-stats > div {
  display: grid;
  min-height: 68px;
  padding: 11px 12px;
  align-content: center;
  gap: 5px;
}

.referral-stats > div + div {
  border-left: 1px solid var(--apple-line);
}

.referral-stats strong {
  color: var(--apple-text);
  font-size: 18px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.referral-bind-form {
  display: grid;
  padding: 14px;
  border: 1px solid var(--apple-line);
  border-radius: 14px;
  background: var(--apple-surface);
  gap: 9px;
}

.referral-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.referral-section-heading h3 {
  margin: 0;
  color: var(--apple-text);
  font-size: 14px;
}

.referral-section-heading h3::before {
  display: none;
}

.referral-bind-form > label {
  color: var(--apple-secondary);
  font-size: 11px;
}

.referral-bind-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
}

.referral-bind-form input {
  width: 100%;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid var(--apple-line);
  border-radius: var(--apple-radius-control);
  outline: none;
  background: var(--apple-field);
  color: var(--apple-text);
  font: inherit;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.referral-bind-form input:disabled {
  cursor: not-allowed;
  opacity: .62;
}

.referral-bind-row .primary-action {
  min-height: 44px;
  white-space: nowrap;
}

.referral-bind-hint {
  margin: 0;
  color: var(--apple-tertiary);
  font-size: 10px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .referral-banner {
    width: calc(100% - 24px);
    margin-top: 8px;
  }

  .referral-view-header {
    display: grid;
  }

  .referral-view-header .auth-back {
    justify-self: flex-start;
  }
}

@media (max-width: 480px) {
  .referral-banner-button {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .referral-banner-icon {
    width: 30px;
    height: 30px;
  }

  .referral-banner-copy strong {
    font-size: 11px;
  }

  .referral-banner-copy small {
    font-size: 9px;
  }

  .referral-banner-cta {
    min-height: 34px;
    padding-inline: 7px;
    font-size: 10px;
  }

  .referral-view-header h2 {
    font-size: 20px;
  }

  .referral-code-card {
    align-items: stretch;
    flex-direction: column;
  }

  .referral-code-card .secondary-action {
    width: 100%;
    justify-content: center;
  }

  .referral-stats > div {
    padding-inline: 8px;
  }

  .referral-stats strong {
    font-size: 16px;
  }

  .referral-bind-row {
    grid-template-columns: 1fr;
  }

  .referral-bind-row .primary-action {
    width: 100%;
    justify-content: center;
  }
}

.header-banner { position: relative; }
.banner-close {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 12px;
  display: grid;
  width: 24px;
  height: 24px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(44, 44, 64, 0.12);
  color: #2c2c40;
  cursor: pointer;
}
.banner-close:hover { background: rgba(44, 44, 64, 0.22); }
.banner-close svg { width: 15px; height: 15px; }
.header-banner[hidden] { display: none !important; }

.billing-entry { display: grid; width: 100%; min-height: 62px; padding: 12px; grid-template-columns: 20px minmax(0, 1fr) 16px; align-items: center; border: 1px solid rgba(192, 132, 252, .25); border-radius: 12px; background: rgba(192, 132, 252, .08); color: #caa1ee; cursor: pointer; gap: 10px; text-align: left; }
.billing-entry:hover { background: rgba(192, 132, 252, .14); }
.billing-entry span, .billing-record div { display: grid; min-width: 0; gap: 3px; }
.billing-entry strong, .billing-record strong { overflow: hidden; color: #f0ecf2; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.billing-entry small, .billing-record small { overflow: hidden; color: #9c94a3; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.billing-entry svg { width: 17px; height: 17px; }
.billing-view { display: grid; gap: 16px; }
.billing-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.billing-header h2 { margin: 0; color: #f0ecf2; font-size: 19px; }
.billing-header p { margin: 5px 0 0; color: #8c8591; font-size: 11px; }
.billing-tabs { display: grid; grid-template-columns: repeat(2, 1fr); padding: 3px; border-radius: 10px; background: #17141a; gap: 3px; }
.billing-tabs button { min-height: 36px; border: 0; border-radius: 7px; background: transparent; color: #908796; cursor: pointer; font-size: 12px; }
.billing-tabs button.is-active { background: #31253a; color: #f0eafa; }
.billing-panel { min-height: 180px; }
.billing-list { display: grid; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; }
.billing-record { display: flex; min-height: 64px; padding: 12px; align-items: center; justify-content: space-between; gap: 12px; background: #111114; }
.billing-record + .billing-record { border-top: 1px solid rgba(255,255,255,.08); }
.billing-record b { flex: 0 0 auto; color: #9fdfbe; font-size: 12px; }
.billing-record b.is-cost { color: #f0b0af; }
.billing-empty, .billing-loading { margin: 0; padding: 32px 12px; color: #817987; text-align: center; font-size: 11px; }

/* Final layout normalization: use the browser viewport as the page scroll container. */
html,
body {
  min-height: 100%;
}

body {
  overflow-x: hidden;
  overflow-y: auto;
}

.app-shell {
  min-height: 100dvh;
  height: auto;
  overflow: visible;
}

.site-header,
:root[data-theme="light"] .site-header {
  width: 100%;
}

.header-banner {
  position: relative;
  width: 100%;
  height: 58px;
  margin: 0;
}

.banner-button,
:root[data-theme="light"] .banner-button {
  border-radius: 0;
}

@media (max-width: 900px) {
  .workbench {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: min(680px, calc(100% - 32px));
    margin-inline: auto;
  }
}

@media (max-width: 760px) {
  .header-banner {
    width: 100%;
    height: 48px;
    margin: 0;
  }

  .banner-button,
  :root[data-theme="light"] .banner-button {
    height: 48px;
    min-height: 48px;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .referral-banner-button { transition: none; }
}

/* Desktop layout reset: this section deliberately overrides earlier historical themes. */
.header-banner {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: 64px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  inset: auto !important;
  background: linear-gradient(100deg, #ece9ff 0%, #e8edff 48%, #f3e9ff 100%);
}

.banner-button,
:root[data-theme="light"] .banner-button {
  position: relative !important;
  display: flex !important;
  width: 100% !important;
  height: 64px !important;
  min-height: 64px !important;
  margin: 0 !important;
  padding: 0 64px 0 clamp(24px, 6vw, 96px) !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 24px !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #27233d !important;
  box-shadow: none !important;
  transform: none !important;
}

.banner-button::before,
.banner-button::after {
  display: none !important;
}

.custom-banner-text {
  display: block !important;
  min-width: 0;
  color: #292341;
  font-size: clamp(15px, 1.45vw, 21px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.3;
}

.custom-banner-action {
  display: inline-flex !important;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  color: #5a3fbd;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.custom-banner-action svg {
  width: 16px;
  height: 16px;
}

.banner-close {
  top: 20px !important;
  right: clamp(16px, 3vw, 40px) !important;
  width: 24px !important;
  height: 24px !important;
  background: rgba(51, 42, 84, .12) !important;
  color: #2c2940 !important;
}

.site-header,
:root[data-theme="light"] .site-header {
  position: sticky !important;
  top: 0 !important;
  display: flex !important;
  width: 100% !important;
  height: 64px !important;
  min-height: 64px !important;
  margin: 0 !important;
  padding: 0 clamp(20px, 3vw, 48px) !important;
  box-sizing: border-box;
}

.workbench {
  display: grid !important;
  grid-template-columns: minmax(340px, 0.8fr) minmax(0, 1.2fr) !important;
  width: min(1360px, calc(100% - 64px)) !important;
  margin: 24px auto 0 !important;
  padding: 0 0 40px !important;
  gap: 24px !important;
}

.composer,
.case-preview {
  min-width: 0 !important;
  margin: 0 !important;
}

@media (max-width: 900px) {
  .header-banner,
  .banner-button,
  :root[data-theme="light"] .banner-button {
    height: 54px !important;
    min-height: 54px !important;
  }

  .banner-button,
  :root[data-theme="light"] .banner-button {
    padding-inline: 20px 54px !important;
  }

  .banner-close {
    top: 15px !important;
    right: 16px !important;
  }

  .workbench {
    grid-template-columns: minmax(0, 1fr) !important;
    width: min(680px, calc(100% - 32px)) !important;
  }
}

@media (min-width: 1181px) {
  .workbench {
    grid-template-columns: minmax(380px, 0.8fr) minmax(0, 1.2fr) !important;
  }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .workbench {
    grid-template-columns: minmax(340px, 390px) minmax(0, 1fr) !important;
    width: calc(100% - 48px) !important;
    gap: 16px !important;
  }

  .settings-grid {
    grid-template-columns: 1fr !important;
  }

  .composer,
  .case-preview {
    padding: 18px !important;
  }
}

@media (max-width: 900px) {
  .workbench {
    display: flex !important;
    flex-direction: column !important;
    width: min(680px, calc(100% - 32px)) !important;
    gap: 16px !important;
  }

  .composer,
  .case-preview {
    width: 100% !important;
  }
}

/* Final alignment for the top promotion and navigation actions. */
.banner-button,
:root[data-theme="light"] .banner-button {
  justify-content: center !important;
  padding-left: 56px !important;
  padding-right: 56px !important;
  gap: 18px !important;
  text-align: center !important;
}

.custom-banner-text {
  flex: 0 1 auto !important;
  text-align: center !important;
}

.custom-banner-action {
  flex: 0 0 auto !important;
  justify-content: center !important;
}

.invite-button {
  display: inline-flex !important;
  width: auto !important;
  min-width: 96px !important;
  height: 34px !important;
  padding: 0 13px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  border: 1px solid #f4c94f !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #f8d66d 0%, #e9ad25 100%) !important;
  color: #3f2b06 !important;
  cursor: pointer !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  box-shadow: 0 3px 10px rgba(231, 172, 36, .28) !important;
}

.invite-button svg {
  width: 16px !important;
  height: 16px !important;
  color: #5e3d05 !important;
  stroke-width: 2.4 !important;
}

.invite-button:hover {
  border-color: #ffe28b !important;
  background: linear-gradient(135deg, #ffe18a 0%, #f2bd35 100%) !important;
  color: #342200 !important;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(231, 172, 36, .4) !important;
}

@media (max-width: 900px) {
  .banner-button,
  :root[data-theme="light"] .banner-button {
    padding-left: 48px !important;
    padding-right: 48px !important;
  }
}

@media (max-width: 560px) {
  .custom-banner-text {
    font-size: 13px;
  }

  .custom-banner-action {
    display: none !important;
  }

  .invite-button {
    min-width: 74px !important;
    padding: 0 8px !important;
  }
}
