/* Shared feature-page layouts, layered over the established light theme. */
.theme-light .workspace.feature-focus {
  display: block;
  overflow: auto;
}
.theme-light .workspace.feature-focus > .sidepanel {
  display: none;
}
.theme-light .workspace.feature-focus > .page.active {
  height: auto;
  min-height: 100%;
  max-height: none;
  overflow: visible;
  display: block;
  padding: 8px 0 28px;
}
.theme-light .feature-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 165px;
  padding: 28px 30px;
  margin-bottom: 20px;
  border: 1px solid #d3ecff;
  border-radius: 20px;
  background: linear-gradient(120deg, #e9faff, #eef4ff);
  overflow: hidden;
}
.theme-light .page-kicker {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 2px;
  color: #6597bf;
}
.theme-light .feature-hero h1,
.theme-light .studio-welcome h1 {
  font-size: clamp(27px, 3vw, 43px);
  margin: 10px 0 9px;
  line-height: 1.25;
  letter-spacing: -1.2px;
  color: #17284e;
}
.theme-light .feature-hero h1 > span,
.theme-light .studio-welcome h1 > span {
  color: #087dff;
}
.theme-light .feature-hero p {
  font-size: 14px;
  color: #7a8ba8;
  margin: 0;
  line-height: 1.7;
}
.theme-light .orange-btn {
  border: 0;
  background: linear-gradient(115deg, #ff9c22, #ff6518);
  color: white;
  border-radius: 12px;
  padding: 14px 20px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 6px 16px #ff852221;
}
.theme-light .feature-panel {
  padding: 24px;
  background: #fff;
  border: 1px solid #e4edf9;
  border-radius: 18px;
  margin-bottom: 20px;
  box-shadow: 0 7px 22px #2172b505;
}
.theme-light .feature-panel h2 {
  margin: 0;
  font-size: 20px;
  color: #243b60;
}
.theme-light .feature-panel .section-head p {
  color: #8192ad;
  font-size: 12px;
  margin: 7px 0 0;
}
.theme-light .feature-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  background: #fff;
  border: 1px solid #e5edf8;
  border-radius: 15px;
  padding: 12px;
  margin: 15px 0 0;
}
.theme-light .feature-toolbar > input {
  flex: 1;
  min-width: 150px;
  height: 42px;
  border: 1px solid #e1eaf7;
  border-radius: 10px;
  padding: 0 12px;
}
.theme-light .feature-toolbar > select {
  height: 42px;
  padding: 0 10px;
  border: 1px solid #e1eaf7;
  border-radius: 10px;
  font-size: 12px;
}
.theme-light .collection-tabs,
.theme-light .view-toggle {
  display: flex;
  gap: 5px;
}
.theme-light .collection-tabs button,
.theme-light .view-toggle button {
  border: 0;
  background: #f1f6ff;
  border-radius: 10px;
  padding: 11px 14px;
  color: #5c779c;
  cursor: pointer;
  white-space: nowrap;
}
.theme-light .collection-tabs button.active {
  background: #087dff;
  color: #fff;
}
.theme-light .view-toggle button {
  min-width: 38px;
  padding: 10px;
}
.theme-light .collection-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #6d85a6;
}
.theme-light .collection-summary > span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 10px 15px;
  border: 1px solid #dfedfa;
  background: #fff;
  border-radius: 12px;
}
.theme-light .collection-summary .summary-caption {
  background: transparent;
  border: 0;
  margin-left: auto;
  color: #98a7ba;
  font-size: 10px;
  padding-right: 0;
}
.theme-light .collection-results {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 15px 0;
  font-size: 12px;
  color: #8a9ab2;
}
.theme-light .text-danger {
  border: 0;
  background: transparent;
  color: #cb5969 !important;
  font-size: 11px;
  padding: 7px 0;
  cursor: pointer;
}
.theme-light .text-danger:disabled {
  opacity: 0.45;
  cursor: default;
}
.theme-light #creationsGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
  padding: 0;
  align-items: start;
}
.theme-light .creation-card {
  border: 1px solid #e0eaf7;
  border-radius: 16px;
  overflow: hidden;
  padding: 0;
  box-shadow: 0 6px 15px #236db307 !important;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.theme-light .creation-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px #236db315 !important;
}
.theme-light .collection-preview {
  position: relative;
  background: linear-gradient(135deg, #edf5ff, #f7faff);
  aspect-ratio: 4/3;
  overflow: hidden;
  display: block;
}
.theme-light .collection-preview > a {
  display: block;
  width: 100%;
  height: 100%;
}
.theme-light .collection-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}
.theme-light .collection-type {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: #ffffffed;
  border: 1px solid #ffffffb3;
  backdrop-filter: blur(6px);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 10px;
  color: #416891;
  pointer-events: none;
}
.theme-light .favorite-btn {
  position: absolute;
  right: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  background: #ffffffed;
  border: 1px solid #ffffffb3;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: #6a84a1;
  cursor: pointer;
  box-shadow: 0 3px 9px #243e6012;
}
.theme-light .favorite-btn.saved {
  color: #ed618b;
  background: #fff0f6;
}
.theme-light .collection-body {
  padding: 15px;
}
.theme-light .collection-body h3 {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #2a456b;
}
.theme-light .collection-metadata {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  color: #6d8bac;
  margin-bottom: 6px;
}
.theme-light .collection-metadata > span:first-child {
  background: #edf6ff;
  color: #227bc1;
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 10px;
}
.theme-light .collection-body time {
  display: block;
  color: #9aabc0;
  font-size: 10px;
}
.theme-light .collection-body .img-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 13px;
}
.theme-light .collection-body .img-actions > * {
  min-width: 0;
  padding: 6px 3px;
  font-size: 11px;
  min-height: 32px;
  border-radius: 8px;
}
.theme-light #creationsGrid.gallery-list {
  grid-template-columns: 1fr;
}
.theme-light .gallery-list .creation-card {
  display: grid;
  grid-template-columns: 175px minmax(0, 1fr);
}
.theme-light .gallery-list .collection-preview {
  aspect-ratio: auto;
  min-height: 170px;
  height: 100%;
}
.theme-light .gallery-list .collection-body {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.theme-light .gallery-list .collection-body h3 {
  max-width: 260px;
  min-width: 150px;
}
.theme-light .gallery-list .collection-body .img-actions {
  display: flex;
  margin-left: auto;
  flex-wrap: wrap;
}
.theme-light .gallery-list .collection-body .img-actions > * {
  padding: 7px 11px;
}
.theme-light .feature-empty {
  grid-column: 1/-1;
  min-height: 260px;
  padding: 48px 22px;
  border: 1px dashed #d6e6f9;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff, #f7fbff);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: #8199b3;
}
.theme-light .feature-empty h2 {
  font-size: 22px;
  color: #36577f;
  margin: 14px 0 7px;
  line-height: 1.6;
}
.theme-light .feature-empty p {
  font-size: 13px;
  color: #879ab3;
  line-height: 1.7;
  max-width: 420px;
  margin: 0 0 20px;
}
.theme-light .feature-empty .primary-btn {
  padding: 12px 20px;
}
.theme-light .empty-art {
  font-size: 48px;
  line-height: 1.3;
  color: #64b9f9;
  background: #eaf6ff;
  width: 95px;
  height: 95px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  transform: rotate(-6deg);
}
.theme-light .feature-empty.compact {
  min-height: 180px;
  padding: 26px;
}
/* The image workflow keeps the existing prompt and conversation controls. */
.theme-light .studio-welcome {
  max-width: 840px;
  width: 100%;
  margin: auto;
  padding: 26px 10px 32px;
  text-align: center;
  flex-shrink: 0;
}
.theme-light .studio-welcome h1 {
  font-size: clamp(28px, 2.7vw, 42px);
  line-height: 1.25;
  margin-top: 12px;
}
.theme-light .studio-welcome h1 > span {
  margin-left: 7px;
}
.theme-light .studio-welcome > p {
  font-size: 13px;
  color: #8598b1;
  line-height: 1.8;
  max-width: 460px;
  margin: 12px auto 18px;
}
.theme-light .studio-steps {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  font-size: 11px;
  color: #7991ac;
  flex-wrap: wrap;
}
.theme-light .studio-steps span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.theme-light .studio-steps b {
  background: #e3f3ff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #2390e1;
  display: grid;
  place-items: center;
  font-size: 10px;
}
.theme-light .studio-steps i {
  font-style: normal;
  color: #c2d4e6;
}
.theme-light .starter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  text-align: left;
}
.theme-light .starter-grid button {
  border: 1px solid #e0ebf8;
  background: #fff;
  padding: 0;
  text-align: left;
  border-radius: 13px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 3px 10px #317abd08;
  color: #3f5c81;
}
.theme-light .starter-grid button:hover {
  border-color: #8ec9f9;
  transform: translateY(-2px);
}
.theme-light .starter-grid img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  display: block;
}
.theme-light .starter-grid button > span {
  display: block;
  padding: 12px 10px;
  font-weight: 750;
  font-size: 12px;
}
.theme-light .starter-grid small {
  display: block;
  font-size: 9px;
  color: #97a7bc;
  margin-top: 5px;
  font-weight: 400;
  line-height: 1.5;
}
.theme-light #chatPage {
  border: 0;
  background: #fff !important;
  border: 1px solid #e1eaf7;
  border-radius: 18px;
}
.theme-light #chatStream {
  padding: 15px 20px 22px;
}
.theme-light .composer {
  border-top: 1px solid #e7eef8 !important;
  background: #fff !important;
  box-shadow: 0 -5px 20px #3478b504 !important;
  backdrop-filter: none;
  padding: 18px;
}
.theme-light .composer-box {
  border: 1px solid #dce9f8 !important;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 3px 8px #4482b606;
}
.theme-light .textarea-wrap textarea {
  min-height: 92px;
  font-size: 14px;
  border: 0 !important;
  padding: 16px;
  resize: vertical;
}
.theme-light .composer-actions {
  padding: 10px;
  gap: 8px;
  justify-content: flex-end;
}
.theme-light .composer-actions .primary-btn {
  background: linear-gradient(100deg, #ff9d21, #ff7016) !important;
  min-width: 95px;
}
.theme-light .composer-footer {
  font-size: 11px;
  gap: 10px;
}
.theme-light .settings {
  margin-top: 8px;
  border: 1px solid #e6eef8 !important;
  border-radius: 12px;
  padding: 0 12px;
}
.theme-light .settings summary {
  font-size: 12px;
  padding: 12px 0;
  color: #6782a4;
  gap: 12px;
}
.theme-light .settings-grid {
  padding: 0 0 12px;
  gap: 10px;
}
.theme-light .settings-grid .field label {
  font-size: 11px;
  color: #7d91ab;
}
.theme-light .settings-grid .field input,
.theme-light .settings-grid .field select {
  height: 40px;
  padding: 0 10px;
  border-radius: 8px;
}
.theme-light .studio-mode-options {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}
.theme-light .studio-mode-options > button {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  padding: 12px;
  border: 1px solid #e1eaf6;
  border-radius: 12px;
  background: #f9fbff;
  color: #527096;
  cursor: pointer;
}
.theme-light .studio-mode-options > button.selected {
  border-color: #79bef8;
  background: linear-gradient(100deg, #edf9ff, #f1f6ff);
  box-shadow: 0 0 0 2px #128bff0a;
}
.theme-light .studio-mode-options b {
  font-size: 12px;
  color: #2685d3;
}
.theme-light .studio-mode-options small {
  font-size: 10px;
  color: #98a8bc;
}
.theme-light .sidepanel {
  padding: 0;
  display: grid;
  align-content: start;
  gap: 13px;
  overflow-y: auto;
}
.theme-light .sidepanel .panel-card {
  margin: 0;
  padding: 20px;
  border: 1px solid #e3edf9;
  border-radius: 16px;
}
.theme-light .sidepanel .panel-card p {
  font-size: 11px;
  line-height: 1.9;
}
.theme-light .attachment-summary strong,
.theme-light .attachment-info strong {
  color: #456888;
}
.theme-light .attachment {
  background: #f5faff;
  border-color: #dceaf8;
}
.theme-light .msg-avatar {
  background: linear-gradient(#cbeaff, #73b9ee);
  color: #1569ab;
}
.theme-light .status-pill {
  background: #edfbf5;
  color: #4d9175;
  border-color: #d5f0e3;
}
/* Template selection uses semantic card buttons with real repository previews. */
.theme-light .templates-hero {
  background: linear-gradient(120deg, #f2eefe, #edf7ff 60%, #d6edff);
}
.theme-light .templates-hero h1 > span {
  display: block;
}
.theme-light .template-hero-art {
  display: flex;
  gap: 10px;
  padding: 0 20px;
  flex-shrink: 0;
}
.theme-light .template-hero-art i {
  width: 72px;
  height: 95px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  font-size: 34px;
  font-style: normal;
  background: #fff;
  border: 2px solid #fff;
  color: #1085ee;
  box-shadow: 0 15px 25px #377ae91c;
  transform: rotate(-12deg);
}
.theme-light .template-hero-art i:nth-child(2) {
  transform: translateY(-12px) rotate(5deg);
  background: linear-gradient(#d8beff, #a186ff);
  color: #fff;
}
.theme-light .template-hero-art i:nth-child(3) {
  transform: rotate(14deg);
  background: linear-gradient(#ffd99b, #ffb85e);
  color: #fff;
}
.theme-light .template-head {
  align-items: center;
  background: #fff;
  border: 1px solid #e3edf9;
  padding: 18px;
  border-radius: 16px;
  margin-bottom: 15px;
}
.theme-light .template-head h2 {
  font-size: 20px;
}
.theme-light .template-head p {
  font-size: 12px;
  line-height: 1.7;
}
.theme-light .template-search {
  min-height: 44px;
  border-radius: 12px;
}
.theme-light .template-cats {
  background: #f7fbff;
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 25px;
}
.theme-light .template-cat {
  border: 1px solid #dfebfa !important;
  border-radius: 11px !important;
  padding: 9px 14px !important;
  font-size: 12px;
  cursor: pointer;
}
.theme-light .template-section {
  padding: 19px;
  border: 1px solid #e5edf9;
  border-radius: 17px;
  margin-bottom: 22px;
}
.theme-light .template-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 15px;
  gap: 10px;
}
.theme-light .template-section-head h3 {
  font-size: 17px;
  color: #355477;
  margin: 0;
}
.theme-light .template-section-head span {
  font-size: 11px;
  color: #92a3ba;
}
.theme-light .template-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.theme-light .template-strip {
  grid-auto-columns: 245px;
  gap: 13px;
  padding-bottom: 6px;
}
.theme-light .template-card {
  display: block;
  text-align: left;
  padding: 0;
  border-radius: 14px;
  border: 1px solid #e4edf8;
  overflow: hidden;
  cursor: pointer;
  min-width: 0;
  color: #355477;
  background: #fff;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.theme-light .template-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 22px #427bb31a;
}
.theme-light .template-preview,
.theme-light .template-preview[data-ratio] {
  display: block;
  position: relative;
  height: 172px !important;
  aspect-ratio: auto !important;
  background: #eff6ff;
  padding: 0;
  overflow: hidden;
}
.theme-light .template-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  background: #eff6ff;
}
.theme-light .template-preview:after {
  display: none;
}
.theme-light .template-real-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  color: #47719a;
  background: #ffffffee;
  border: 1px solid #ffffffc9;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 9px;
  z-index: 2;
}
.theme-light .template-body {
  display: block;
  padding: 13px;
}
.theme-light .template-body > b {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.theme-light .template-body > span {
  color: #93a4ba;
  font-size: 10px;
  margin-top: 6px;
  display: block;
}
.theme-light .template-body .template-badge {
  display: inline-block;
  background: #edf6ff !important;
  color: #4d92c6 !important;
  border-radius: 7px;
  font-size: 9px;
  padding: 4px 7px;
  margin-top: 10px;
}
.theme-light .template-use {
  display: inline-block;
  background: #fff;
  color: #126dbd;
  border-radius: 10px;
  padding: 10px 17px;
  font-weight: 750;
  font-size: 12px;
  box-shadow: 0 5px 15px #2468b321;
}
.theme-light .template-card:focus-visible .template-hover {
  opacity: 1;
}
/* Real balance and the current account's ledger; payments are clearly unavailable. */
.theme-light .credit-hero {
  background: linear-gradient(110deg, #fff5e0, #eef8ff 70%, #e0edff);
}
.theme-light .hero-symbol {
  color: #ffb02f;
  font-size: 85px;
  padding-right: 35px;
  line-height: 1;
}
.theme-light .credit-overview {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 22px;
}
.theme-light .credit-balance-card {
  background: linear-gradient(125deg, #0c97ff, #0b62ec);
  color: #fff;
  border-radius: 18px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px #0d73ee21;
}
.theme-light .credit-balance-card:after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  border: 28px solid #ffffff12;
  border-radius: 50%;
  right: -55px;
  top: -55px;
  pointer-events: none;
}
.theme-light .credit-balance-card > span {
  font-size: 12px;
  color: #c2e3ff;
}
.theme-light .credit-balance-card strong {
  font-size: 36px;
  letter-spacing: -1px;
  color: #fff;
}
.theme-light .credit-balance-card small {
  font-size: 10px;
  color: #c4e1ff;
}
.theme-light .credit-balance-card button {
  align-self: flex-start;
  margin-top: 8px;
  border: 1px solid #ffffff4a;
  background: #ffffff17;
  border-radius: 9px;
  color: #fff;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 11px;
}
.theme-light .credit-stat {
  border: 1px solid #e2ecf9;
  background: #fff;
  border-radius: 18px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #7d91aa;
  font-size: 11px;
  justify-content: center;
}
.theme-light .credit-stat strong {
  font-size: 30px;
  color: #37597e;
}
.theme-light .stat-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: #e8fcf4;
  color: #13b58d;
  border-radius: 12px;
  font-size: 24px;
}
.theme-light .stat-icon.spent {
  background: #fff3e8;
  color: #f69e3f;
}
.theme-light .coming-badge {
  padding: 8px 12px;
  background: #fff6e5;
  color: #b88834;
  border-radius: 8px;
  font-size: 10px;
  white-space: nowrap;
}
.theme-light .topup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
  margin-top: 24px;
}
.theme-light .topup-card {
  position: relative;
  border: 1px solid #e2ecf9;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  min-width: 0;
  box-shadow: none !important;
}
.theme-light .topup-card.recommended {
  border-color: #83c6ff !important;
  background: linear-gradient(#f3faff, #fff) !important;
}
.theme-light .recommended-badge {
  position: absolute;
  top: -10px;
  left: 20px;
  background: #087dff;
  color: #fff !important;
  font-size: 9px !important;
  border-radius: 7px;
  padding: 5px 10px !important;
}
.theme-light .package-label {
  color: #7894af;
  font-size: 11px;
}
.theme-light .topup-card strong {
  font-size: 29px;
  color: #2d527c;
}
.theme-light .topup-card strong small {
  font-size: 12px;
  font-weight: 400;
  color: #8499b1;
}
.theme-light .topup-card .package-price {
  font-size: 24px;
  color: #1679d5;
  font-weight: 750;
}
.theme-light .topup-card p {
  font-size: 11px;
  color: #91a1b7;
  margin: 0;
  line-height: 1.6;
  min-height: 32px;
}
.theme-light .topup-card button {
  width: 100%;
  border: 0;
  padding: 12px;
  border-radius: 10px;
  color: #fff;
  background: #087dff;
  font-size: 12px;
  cursor: pointer;
  margin-top: auto;
}
.theme-light .topup-card button:disabled {
  background: #edf3fb;
  color: #a0aec0;
  cursor: not-allowed;
}
.theme-light .billing-note {
  font-size: 11px;
  color: #94a4b9;
  margin: 18px 0 0;
  line-height: 1.7;
}
.theme-light .ledger-panel .section-head {
  margin-bottom: 20px;
}
.theme-light .ledger-panel .ghost-btn {
  font-size: 12px;
  padding: 10px 15px;
}
.theme-light .ledger-scroll {
  overflow-x: auto;
}
.theme-light .credit-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  color: #7790ad;
  text-align: left;
  white-space: nowrap;
}
.theme-light .credit-table th {
  font-size: 11px;
  color: #8198b3;
  background: #f3f8ff;
  padding: 13px 16px;
  border-bottom: 1px solid #e8f0fa;
  font-weight: 600;
}
.theme-light .credit-table td {
  padding: 16px;
  border-bottom: 1px solid #eff4fa;
}
.theme-light .credit-table tr:last-child td {
  border-bottom: 0;
}
.theme-light .credit-table .delta-in {
  color: #12aa87;
  font-weight: 750;
}
.theme-light .credit-table .delta-out {
  color: #dd8052;
  font-weight: 750;
}
@media (min-width: 1700px) {
  .theme-light #creationsGrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1280px) {
  .theme-light .template-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .theme-light #creationsGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .theme-light .workspace:not(.feature-focus) {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .theme-light .starter-grid img {
    height: 76px;
  }
  .theme-light .studio-welcome {
    padding-top: 12px;
  }
  .theme-light .studio-welcome h1 {
    font-size: 31px;
  }
  .theme-light .topup-card {
    padding: 20px;
  }
  .theme-light .credit-balance-card strong {
    font-size: 30px;
  }
}
@media (max-width: 979px) {
  .theme-light .workspace:not(.feature-focus) {
    display: flex;
    flex-direction: column;
    padding: 12px;
    overflow: hidden !important;
  }
  .theme-light #chatPage {
    width: 100%;
    min-height: 0;
    flex: 1;
  }
  .theme-light .workspace.feature-focus {
    padding: 12px;
  }
  .theme-light .template-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .theme-light .sidepanel {
    display: none;
  }
  .theme-light .feature-hero {
    padding: 23px;
    min-height: 150px;
  }
  .theme-light .credit-overview {
    gap: 11px;
  }
  .theme-light .credit-stat {
    padding: 18px;
  }
  .theme-light .studio-welcome {
    max-width: 700px;
  }
  .theme-light .starter-grid img {
    height: 90px;
  }
}
@media (max-width: 720px) {
  .theme-light .feature-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 17px;
    padding: 22px;
  }
  .theme-light .feature-hero h1 {
    font-size: 29px;
  }
  .theme-light .feature-hero p {
    font-size: 12px;
  }
  .theme-light .feature-hero .orange-btn {
    font-size: 12px;
    padding: 10px 16px;
  }
  .theme-light .feature-panel {
    padding: 17px;
  }
  .theme-light .feature-panel h2 {
    font-size: 18px;
  }
  .theme-light .feature-toolbar > input {
    flex-basis: 100%;
    min-width: 0;
  }
  .theme-light .collection-tabs {
    width: 100%;
  }
  .theme-light .collection-tabs button {
    flex: 1;
  }
  .theme-light .feature-toolbar > select {
    flex: 1;
    min-width: 0;
  }
  .theme-light .collection-summary .summary-caption {
    margin: 0;
    padding: 0;
  }
  .theme-light .collection-summary > span {
    font-size: 11px;
    padding: 8px 10px;
  }
  .theme-light #creationsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .theme-light .collection-body {
    padding: 11px;
  }
  .theme-light .collection-body h3 {
    font-size: 12px;
  }
  .theme-light .collection-metadata {
    font-size: 9px;
    flex-wrap: wrap;
  }
  .theme-light .collection-body .img-actions > * {
    font-size: 10px;
  }
  .theme-light .favorite-btn {
    height: 32px;
    width: 32px;
    right: 9px;
    top: 9px;
  }
  .theme-light .collection-type {
    left: 8px;
    bottom: 8px;
    font-size: 9px;
  }
  .theme-light .gallery-list .creation-card {
    grid-template-columns: 110px minmax(0, 1fr);
  }
  .theme-light .gallery-list .collection-body {
    padding: 10px;
    gap: 8px;
  }
  .theme-light .gallery-list .collection-body h3 {
    min-width: 100px;
    max-width: 160px;
  }
  .theme-light .gallery-list .collection-body .img-actions {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .theme-light .gallery-list .collection-body .img-actions > * {
    padding: 6px 3px;
  }
  .theme-light .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .theme-light .template-head {
    padding: 15px;
    gap: 14px;
  }
  .theme-light .template-head h2 {
    font-size: 18px;
  }
  .theme-light .template-head .template-search {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .theme-light .template-hero-art {
    display: none;
  }
  .theme-light .template-section {
    padding: 15px;
  }
  .theme-light .template-section-head h3 {
    font-size: 16px;
  }
  .theme-light .template-section-head span {
    font-size: 9px;
  }
  .theme-light .template-strip {
    grid-auto-columns: 200px;
  }
  .theme-light .template-preview,
  .theme-light .template-preview[data-ratio] {
    height: 140px !important;
  }
  .theme-light .template-body {
    padding: 10px;
  }
  .theme-light .template-body > b {
    font-size: 11px;
  }
  .theme-light .template-body .template-badge {
    font-size: 8px;
  }
  .theme-light .template-cats {
    gap: 6px;
  }
  .theme-light .template-cat {
    padding: 8px 10px !important;
    font-size: 10px;
  }
  .theme-light .credit-overview {
    grid-template-columns: 1fr 1fr;
  }
  .theme-light .credit-balance-card {
    grid-column: 1/-1;
    padding: 24px;
  }
  .theme-light .credit-stat {
    padding: 18px;
    font-size: 10px;
  }
  .theme-light .credit-stat strong {
    font-size: 25px;
  }
  .theme-light .topup-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .theme-light .topup-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .theme-light .topup-card .package-label {
    grid-column: 1/-1;
  }
  .theme-light .topup-card .package-price {
    text-align: right;
  }
  .theme-light .topup-card p {
    font-size: 10px;
  }
  .theme-light .topup-card button {
    height: 39px;
    font-size: 11px;
    align-self: end;
  }
  .theme-light .coming-badge {
    font-size: 9px;
    padding: 6px 8px;
    white-space: normal;
    max-width: 130px;
    text-align: center;
  }
  .theme-light .hero-symbol {
    display: none;
  }
  .theme-light .credit-table th,
  .theme-light .credit-table td {
    padding: 12px;
    font-size: 10px;
  }
  .theme-light .feature-empty {
    padding: 32px 15px;
  }
  .theme-light .feature-empty h2 {
    font-size: 19px;
  }
  .theme-light .feature-empty p {
    font-size: 12px;
  }
  .theme-light .studio-welcome {
    padding: 17px 0 12px;
  }
  .theme-light .studio-welcome h1 {
    font-size: 29px;
  }
  .theme-light .studio-welcome > p {
    font-size: 11px;
    max-width: 280px;
    margin-bottom: 14px;
  }
  .theme-light .studio-steps {
    font-size: 9px;
    gap: 6px;
    margin-bottom: 19px;
  }
  .theme-light .studio-steps b {
    height: 18px;
    width: 18px;
  }
  .theme-light .starter-grid {
    gap: 8px;
  }
  .theme-light .starter-grid img {
    height: 70px;
  }
  .theme-light .starter-grid button > span {
    font-size: 10px;
    padding: 9px 7px;
  }
  .theme-light .starter-grid small {
    display: none;
  }
  .theme-light #chatStream {
    padding: 12px;
  }
  .theme-light .composer {
    padding: 12px;
  }
  .theme-light .textarea-wrap textarea {
    min-height: 90px;
    font-size: 13px;
  }
  .theme-light .composer-actions {
    justify-content: flex-end;
    flex-direction: row;
    padding: 8px;
  }
  .theme-light .composer-actions button {
    font-size: 12px;
    min-height: 36px;
    padding: 9px 14px;
  }
  .theme-light .composer-footer .left-tools {
    gap: 5px;
  }
  .theme-light .composer-footer .ghost-btn,
  .theme-light .file-btn {
    font-size: 10px !important;
    min-height: 33px !important;
    padding: 6px 9px !important;
  }
  .theme-light .settings summary {
    font-size: 11px;
    flex-wrap: wrap;
  }
  .theme-light #settingsSummary {
    font-size: 9px;
  }
  .theme-light .settings-grid {
    grid-template-columns: 1fr 1fr;
  }
  .theme-light .feature-toolbar .view-toggle {
    margin-left: auto;
  }
}
@media (max-width: 420px) {
  .theme-light #creationsGrid {
    grid-template-columns: 1fr;
  }
  .theme-light .collection-preview {
    aspect-ratio: 4/3;
  }
  .theme-light .collection-body h3 {
    font-size: 14px;
  }
  .theme-light .collection-body .img-actions > * {
    font-size: 11px;
  }
  .theme-light .template-preview,
  .theme-light .template-preview[data-ratio] {
    height: 125px !important;
  }
  .theme-light .studio-welcome h1 {
    font-size: 25px;
  }
  .theme-light .studio-steps {
    gap: 4px;
    font-size: 8px;
  }
  .theme-light .starter-grid img {
    height: 60px;
  }
  .theme-light .studio-steps i {
    display: none;
  }
  .theme-light .studio-welcome .page-kicker {
    font-size: 8px;
  }
  .theme-light .composer .left-tools #examplePromptBtn {
    display: none;
  }
}
/* Keep image settings and both actions reachable on touch screens. */
@media (max-width: 980px) {
  .theme-light .layout .workspace {
    height: calc(100dvh - 76px);
    min-height: 0;
  }
  .theme-light #chatPage.active {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .theme-light #chatStream {
    flex: 1 1 auto;
    min-height: 140px;
    padding: 12px !important;
  }
  .theme-light .studio-welcome {
    margin: auto;
    padding: 18px 0;
  }
  .theme-light .composer {
    position: static !important;
    flex: 0 0 auto;
    max-height: 60dvh;
    overflow-y: auto;
    padding: 12px !important;
  }
  .theme-light .composer-box {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
  }
  .theme-light .textarea-wrap {
    grid-column: auto;
    padding: 0 !important;
    border-radius: 0 !important;
  }
  .theme-light #messageInput {
    height: 72px;
    min-height: 72px !important;
    max-height: 140px !important;
    padding: 12px !important;
    font-size: 13px;
  }
  .theme-light .composer-actions {
    display: flex !important;
    flex-direction: row;
    justify-content: flex-end;
    padding: 8px;
  }
  .theme-light #generateBtn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    grid-column: auto;
    grid-row: auto;
    width: auto;
    height: 36px;
    min-height: 36px;
    min-width: 85px;
    border-radius: 10px !important;
    padding: 8px 12px !important;
    font-size: 12px;
  }
  .theme-light .left-tools .file-btn:after {
    display: none;
  }
  .theme-light .composer-footer {
    position: static;
    display: flex !important;
    pointer-events: auto;
    margin: 8px 0 0 !important;
    gap: 8px;
  }
  .theme-light .composer-footer .left-tools {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
  }
  .theme-light .left-tools .file-btn {
    width: auto;
    height: auto;
    min-height: 32px;
    display: inline-flex !important;
    font-size: 11px;
    border-radius: 9px;
    background: #eef7ff;
    color: #3678b7;
    padding: 6px 10px !important;
  }
  .theme-light #clearRefsBtn {
    display: inline-flex !important;
  }
  .theme-light .settings {
    display: block !important;
  }
  .theme-light .attachment-list {
    margin: 0 0 8px;
    max-height: 72px;
  }
  .theme-light .layout .sidepanel {
    display: none;
  }
}
/* Studio context, exact server pricing and recoverable progress. */
.theme-light .studio-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 13px 18px;
  background: #f6faff;
  border-bottom: 1px solid #e1edf9;
  flex: 0 0 auto;
  font-size: 11px;
  color: #59789c;
}
.theme-light .studio-context select {
  max-width: 230px;
  min-width: 0;
  border: 1px solid #d7e8f9;
  border-radius: 9px;
  background: white;
  color: #35547a;
  padding: 8px;
  font: inherit;
}
.theme-light #creditEstimate {
  margin-left: auto;
  color: #29769f;
  background: #e9f7ff;
  border-radius: 8px;
  padding: 8px;
  font-weight: 700;
}
.theme-light #creditEstimate.insufficient {
  color: #a73d26;
  background: #fff0e5;
}
.theme-light .generation-feedback {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid #dceafa;
  background: #f2f8ff;
  padding: 13px;
  border-radius: 12px;
  color: #3e648b;
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 10px;
}
.theme-light .generation-feedback[hidden] {
  display: none;
}
.theme-light .generation-feedback[data-state="busy"] {
  border-left: 4px solid #1286ff;
}
.theme-light .generation-feedback[data-state="error"] {
  background: #fff9ed;
  border-color: #f2deb5;
  color: #895921;
}
.theme-light .generation-feedback[data-state="success"] {
  background: #effbf7;
  border-color: #c7eadf;
  color: #2d8266;
}
.theme-light #retryGenerationBtn {
  align-self: flex-start;
  padding: 8px 12px;
  white-space: normal;
}
.theme-light .collection-project {
  font-size: 10px;
  color: #7294b3;
  margin-top: 8px;
}
.theme-light .collection-project button {
  border: 0;
  background: #edf6ff;
  border-radius: 7px;
  color: #3678b6;
  font: inherit;
  padding: 5px 8px;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.theme-light .service-readiness {
  padding: 12px;
  background: #f3f9ff;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.7;
  margin-top: 10px;
  color: #4a7194;
}
.theme-light button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}
.theme-light button:focus-visible,
.theme-light a:focus-visible,
.theme-light select:focus-visible {
  outline: 3px solid #64b5f6;
  outline-offset: 3px;
}
@media (max-width: 980px) {
  .theme-light .layout,
  .theme-light .layout > .main {
    height: var(--visual-height, 100dvh);
    min-height: 0;
  }
  .theme-light .layout .workspace {
    height: calc(var(--visual-height, 100dvh) - 76px);
  }
  .theme-light .studio-context {
    padding: 9px 12px;
    font-size: 10px;
    gap: 7px;
  }
  .theme-light .studio-context select {
    max-width: calc(100% - 70px);
    flex: 1;
  }
  .theme-light #creditEstimate {
    margin: 0;
    width: 100%;
    padding: 5px 8px;
  }
  .theme-light .composer {
    max-height: 65%;
  }
  .theme-light #chatStream {
    min-height: 40px;
  }
  .theme-light #chatStream:has(.studio-welcome) {
    display: flex;
  }
  .theme-light .studio-welcome {
    margin: auto;
  }
  .theme-light .settings[open] .settings-grid {
    grid-template-columns: 1fr 1fr;
  }
  .theme-light .settings-grid .field {
    min-width: 0;
  }
  .theme-light .settings-grid select,
  .theme-light .settings-grid input {
    width: 100%;
    min-width: 0;
    font-size: 12px;
  }
  .theme-light #chatPage {
    border-radius: 14px;
  }
}
@media (max-height: 650px) and (max-width: 980px) {
  .theme-light .studio-welcome {
    padding: 12px 0;
  }
  .theme-light .studio-welcome h1 {
    font-size: 22px;
  }
  .theme-light .studio-welcome .starter-grid {
    display: none;
  }
  .theme-light .composer {
    max-height: 72%;
  }
  .theme-light .studio-steps {
    margin-bottom: 10px;
  }
}
.theme-light .mobile-language-control {
  display: none;
}
@media (max-width: 980px) {
  .theme-light .mobile-language-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 6px 10px;
    color: #5e7fa1;
    font-size: 12px;
  }
  .theme-light .mobile-language-control select {
    padding: 8px;
    border: 1px solid #cfe4f7;
    border-radius: 9px;
    background: #fff;
    color: #335475;
  }
}

.theme-light .template-preview img {
  object-fit: contain;
}
@media (min-width: 981px) and (max-height: 800px) {
  .theme-light .studio-welcome {
    padding: 10px;
  }
  .theme-light .studio-welcome h1 {
    font-size: 29px;
  }
  .theme-light .studio-welcome > p {
    margin: 8px auto;
    font-size: 11px;
  }
  .theme-light .studio-steps {
    margin-bottom: 12px;
  }
  .theme-light .starter-grid img {
    height: 48px;
  }
  .theme-light .starter-grid button > span {
    padding: 7px;
  }
  .theme-light .starter-grid small {
    display: none;
  }
  .theme-light .studio-welcome .page-kicker {
    font-size: 8px;
  }
}

.theme-light #clearRefsBtn[hidden] {
  display: none !important;
}
/* The single submit action serves both conversation and image work. */
.theme-light .composer-actions .unified-submit {
  min-width: 130px;
  white-space: nowrap;
  min-height: 46px;
  padding: 11px 17px !important;
  font-size: 13px;
}
.theme-light .composer-box {
  grid-template-columns: minmax(0, 1fr) 160px;
}
.theme-light .template-card .template-body > b {
  white-space: normal;
  line-height: 1.6;
  min-height: 40px;
}
.theme-light .template-card .template-body {
  padding: 13px 14px;
}
.theme-light .template-hover {
  z-index: 4;
}
@media (max-width: 980px) {
  .theme-light .composer-box {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .theme-light #generateBtn.unified-submit {
    min-width: 136px;
    height: 42px;
    min-height: 42px;
    font-size: 13px !important;
  }
}
.theme-light .unified-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
/* Full-resolution originals are displayed whole, without cropping or poster effects. */
.theme-light .template-photo-scene,
.theme-light .template-photo-scene[data-ratio] {
  display: block !important;
  height: auto !important;
  aspect-ratio: 4/5 !important;
  padding: 0 !important;
  background: #f5f9fd !important;
  border-bottom: 1px solid #e5edf6;
}
.theme-light .template-photo-scene:before,
.theme-light .template-photo-scene:after {
  display: none !important;
}
.theme-light .template-photo-scene img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
  box-sizing: border-box;
  transform: none !important;
}
.theme-light .template-photo-scene .template-real-badge {
  left: 10px;
  top: 10px;
  max-width: calc(100% - 20px);
  background: #fffef3f2;
}
.theme-light .template-strip {
  grid-auto-columns: 245px;
}
.theme-light .template-image-error {
  display: none;
}
.theme-light .image-unavailable .template-image-error {
  display: grid;
  position: absolute;
  inset: 0;
  place-items: center;
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: #7d91aa;
}
.theme-light .template-grid {
  align-items: start;
}
@media (max-width: 420px) {
  .theme-light .template-strip {
    grid-auto-columns: 215px;
  }
  .theme-light .template-grid {
    gap: 10px;
  }
  .theme-light .template-photo-scene .template-real-badge {
    top: 6px;
    left: 6px;
    padding: 3px 5px !important;
    font-size: 8px !important;
  }
}
.theme-light .template-photo-scene img[hidden] {
  display: none !important;
}

@media (max-width: 420px) {
  .theme-light .template-card .template-body {
    padding: 10px;
  }
}
