/* Shared product tokens. Original artwork and the current brand remain unchanged. */
.theme-light {
  --product-blue: #0874ed;
  --product-orange: #ff8315;
  --product-ink: #233b60;
  --product-muted: #536b8a;
  --product-line: #dce8f6;
  --product-radius: 16px;
}
.theme-light .page {
  color: var(--product-ink);
}
.theme-light .page p,
.theme-light .page label,
.theme-light .page small,
.theme-light .page .mini,
.theme-light .page input,
.theme-light .page select,
.theme-light .page textarea {
  font-size: 14px !important;
  line-height: 1.6;
}
.theme-light .page p,
.theme-light .page small,
.theme-light .page .mini {
  color: var(--product-muted);
}
.theme-light .page input,
.theme-light .page select,
.theme-light .page textarea {
  color: var(--product-ink);
}
.theme-light .page button {
  font-size: 14px;
  min-height: 40px;
}
.theme-light .page h2 {
  font-size: 21px;
}
.theme-light .page .feature-hero,
.theme-light .page .creative-hero,
.theme-light .page .projects-hero {
  min-height: 138px;
  padding: 22px 26px;
  margin-bottom: 18px;
}
.theme-light .page .feature-hero h1,
.theme-light .page .creative-hero h1,
.theme-light .page .projects-hero h1 {
  font-size: clamp(27px, 3vw, 38px);
}
.theme-light .page-kicker {
  font-size: 11px;
  letter-spacing: 0.14em;
}
.theme-light .auth-card label,
.theme-light .profile-card label {
  font-size: 14px;
  color: #536b8a;
}
.theme-light .auth-sub,
.theme-light .auth-provider-status,
.theme-light .profile-card .auth-sub {
  font-size: 14px;
  color: #536b8a;
  line-height: 1.6;
}
.theme-light .auth-error {
  color: #b32435;
  line-height: 1.6;
}
.theme-light .auth-field:has([aria-invalid="true"]) input {
  border-color: #c53948;
  box-shadow: 0 0 0 2px #c5394810;
}
.theme-light .auth-help {
  font-size: 13px;
  color: #536b8a;
  margin: 8px 0;
}
.product-legal {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
  justify-content: center;
}
.product-legal button {
  background: none;
  border: 0;
  color: #2763a2;
  text-decoration: underline;
  cursor: pointer;
  font-size: 13px;
}
.product-welcome {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}
.product-welcome h1 {
  font-size: 32px;
  margin: 10px 0;
}
.product-welcome p {
  margin: 0;
}
.product-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 6px 0 22px;
}
.product-shortcuts button {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  padding: 22px;
  border: 1px solid var(--product-line);
  border-radius: 16px;
  background: linear-gradient(125deg, #fff, #edf7ff);
  color: var(--product-ink);
  cursor: pointer;
}
.product-shortcuts button:first-child {
  background: linear-gradient(120deg, #009fff, #0768f6);
  color: #fff;
}
.product-shortcuts b {
  font-size: 18px;
}
.product-shortcuts span {
  font-size: 13px;
  line-height: 1.6;
}
.home-projects,
.home-creations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.home-project,
.home-art {
  min-width: 0;
  border: 1px solid var(--product-line);
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  color: var(--product-ink);
  text-align: left;
  cursor: pointer;
}
.home-project b,
.home-art b {
  display: block;
  overflow-wrap: anywhere;
  font-size: 16px;
  margin-bottom: 8px;
}
.home-project small {
  display: block;
}
.home-art img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: #f3f8ff;
  border-radius: 10px;
  margin-bottom: 12px;
}
.home-chat {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--product-line);
  background: #fff;
  padding: 14px;
  color: var(--product-ink);
  cursor: pointer;
}
.home-empty {
  padding: 24px;
  grid-column: 1/-1;
  border: 1px dashed var(--product-line);
  border-radius: 12px;
  color: var(--product-muted);
  line-height: 1.8;
}
.product-dialog {
  width: min(850px, 94vw);
  max-height: 90dvh;
  padding: 24px;
  border: 1px solid #dce8f6;
  border-radius: 20px;
  color: #263e64;
  background: #fff;
  box-shadow: 0 24px 90px #152b4b30;
}
.product-dialog::backdrop {
  background: #172d4d66;
  backdrop-filter: blur(3px);
}
.product-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #dce8f6;
  margin-bottom: 18px;
  padding-bottom: 12px;
}
.product-dialog h2 {
  margin: 0;
  font-size: 23px;
}
.product-dialog p,
.product-dialog label {
  font-size: 15px;
  line-height: 1.8;
}
.product-dialog pre {
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f4f8ff;
  border-radius: 12px;
  padding: 16px;
}
#closeProductDialog {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid #dce8f6;
  border-radius: 12px;
  background: #f4f8ff;
  font-size: 24px;
  color: #36547a;
  cursor: pointer;
}
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.product-detail-grid img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  background: #f4f8ff;
  border-radius: 12px;
}
.product-dialog button,
.product-dialog a {
  min-height: 44px;
}
.product-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.product-dialog .ghost-btn,
.product-dialog .primary-btn {
  font-size: 14px;
}
.product-status {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px 0;
}
.product-status select {
  padding: 10px;
  border: 1px solid #dce8f6;
  border-radius: 10px;
  background: #fff;
  color: #263e64;
}
.project-work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.project-work-grid button {
  border: 1px solid #dce8f6;
  border-radius: 12px;
  background: #f8fbff;
  color: #263e64;
  padding: 12px;
  cursor: pointer;
}
.project-work-grid img {
  width: 100%;
  height: 110px;
  object-fit: contain;
}
.product-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
#studioQuickControls {
  padding: 10px 16px;
  border-bottom: 1px solid #e1ebf8;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
#studioQuickControls label {
  font-size: 13px !important;
  display: flex;
  align-items: center;
  gap: 6px;
}
#studioQuickControls select {
  border: 1px solid #dce8f6;
  background: #f5f9ff;
  border-radius: 9px;
  padding: 7px;
  max-width: 190px;
  font-size: 13px !important;
}
#draftStatus {
  padding: 7px 16px;
  font-size: 12px;
  color: #536b8a;
  background: #f8fbff;
}
.product-feedback {
  padding: 14px;
  background: #f4f8ff;
  border-radius: 10px;
  color: #36547a;
  line-height: 1.7;
}
.profile-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.profile-tabs button {
  border: 1px solid #dce8f6;
  border-radius: 10px;
  background: #f4f8ff;
  color: #36547a;
  padding: 10px;
  cursor: pointer;
}
.profile-tabs button[aria-selected="true"] {
  background: #0874ed;
  color: #fff;
}
.profile-section[hidden] {
  display: none !important;
}
.profile-section input {
  width: 100%;
  padding: 12px;
  border: 1px solid #dce8f6;
  border-radius: 10px;
  background: #f5f9ff;
  color: #263e64;
  margin: 6px 0 14px;
}
.profile-section label {
  display: block;
}
.profile-section button {
  min-height: 44px;
}
.scene-edit {
  width: 100%;
  min-height: 90px;
  border: 1px solid #dce8f6;
  border-radius: 10px;
  background: #fff;
  color: #263e64;
  padding: 10px;
  font: inherit;
}
#marketingEditableCopy {
  width: 100%;
  min-height: 170px;
  padding: 12px;
  border: 1px solid #dce8f6;
  border-radius: 12px;
  color: #263e64;
  font: inherit;
  background: #fff;
}
.platform-instagram .social-preview {
  border-top: 4px solid #d64591;
}
.platform-line .social-preview {
  border-top: 4px solid #04b750;
}
.platform-tiktok .social-preview {
  border-top: 4px solid #172951;
}
.theme-light .creative-media-note {
  font-size: 14px !important;
  font-weight: 600;
  color: #36547a;
  border-left: 3px solid #0874ed;
}
.theme-light .topup-grid {
  opacity: 0.85;
}
.theme-light .package-price {
  font-size: 20px;
}
.product-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
@media (max-width: 1100px) {
  .product-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .product-shortcuts {
    gap: 10px;
  }
  .product-shortcuts button {
    padding: 15px;
  }
  .product-shortcuts b {
    font-size: 16px;
  }
  .product-welcome {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 12px 0 18px;
  }
  .product-welcome h1 {
    font-size: 26px;
  }
  .home-projects,
  .home-creations {
    grid-template-columns: 1fr;
  }
  .product-detail-grid {
    grid-template-columns: 1fr;
  }
  .product-dialog {
    padding: 16px;
  }
  .theme-light .page .feature-hero,
  .theme-light .page .creative-hero,
  .theme-light .page .projects-hero {
    min-height: 115px;
    padding: 18px;
  }
  .theme-light .page button {
    min-height: 44px;
  }
  #studioQuickControls {
    gap: 6px;
    padding: 8px;
  }
  #studioQuickControls select {
    max-width: 135px;
  }
  .product-dialog h2 {
    font-size: 20px;
  }
  .project-work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.theme-light .nav-home.active {
  background: #edf6ff;
  color: #0869db;
  border-radius: 12px;
}
.project-workflow-badge {
  display: inline-block;
  padding: 3px 8px;
  background: #edf6ff;
  border-radius: 7px;
  font-size: 12px;
  color: #36547a;
  margin: 4px 0;
}
.theme-light .profile-section select {
  min-height: 44px;
  border: 1px solid #dce8f6;
  border-radius: 10px;
  padding: 9px;
  color: #263e64;
  background: #fff;
}
#draftStatus {
  max-height: 54px;
  overflow: auto;
}
@media (max-width: 600px) {
  .theme-light #studioIntent {
    display: none;
  }
  .theme-light #studioQuickControls {
    flex: 0 0 auto;
  }
  .theme-light .creative-fields.three {
    grid-template-columns: 1fr;
  }
  .theme-light .creative-layout {
    gap: 14px;
  }
  .theme-light .profile-card {
    max-height: 90dvh;
    overflow: auto;
  }
}

@media (max-width: 600px) {
  .theme-light #quickMode {
    max-width: 125px;
  }
  .theme-light #quickAspect {
    max-width: 100px;
  }
  .theme-light #studioQuickControls label {
    font-size: 12px !important;
  }
}

/* Keep the conversation and artwork central; controls remain available below. */
.theme-light #chatPage .composer { padding: 10px 18px !important; flex: 0 0 auto; }
.theme-light #chatPage .composer-box { min-height: 0 !important; }
.theme-light #chatPage .textarea-wrap { padding: 8px 12px !important; }
.theme-light #chatPage #messageInput { height: 64px !important; min-height: 64px !important; max-height: 160px !important; padding: 8px !important; resize: vertical; }
.theme-light #chatPage .composer-footer { margin-top: 6px !important; gap: 8px; }
.theme-light #chatPage .composer-footer .file-btn,
.theme-light #chatPage .composer-footer .ghost-btn { min-height: 36px !important; padding: 7px 12px !important; }
.theme-light #chatPage #draftStatus { padding: 2px 12px; font-size: 11px !important; line-height: 1.3; }
.theme-light #chatPage .studio-context,
.theme-light #chatPage #studioQuickControls { padding: 8px 16px; gap: 10px; }
.theme-light #chatPage #studioQuickControls select,
.theme-light #chatPage .studio-context select { min-height: 34px; padding: 6px 10px; }
.theme-light #chatPage .chat-stream { flex: 1 1 0; min-height: 0; }
#creditEstimate, #generationRequestSummary { display: none !important; }
#generationFeedback[hidden] { display: none !important; }
.theme-light #generationFeedback { padding: 8px 12px; margin-bottom: 6px; }
@media (max-width: 600px) {
  .theme-light #chatPage .composer { padding: 8px 10px !important; }
  .theme-light #chatPage #messageInput { height: 48px !important; min-height: 48px !important; }
}
