:root {
  color-scheme: light;
  --bg: #f6f3ee;
  --panel: #fffaf2;
  --panel-strong: #ffffff;
  --text: #191713;
  --muted: #6f675d;
  --soft: #968d82;
  --line: #e6ded2;
  --line-strong: #d8cfc2;
  --accent: #101010;
  --accent-soft: #f0e8da;
  --green: #4f8f44;
  --orange: #e86f3d;
  --blue: #366bff;
  --radius: 8px;
  --shadow: 0 18px 50px rgba(61, 46, 30, 0.11);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
  line-height: 1.45;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) 348px;
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}

.app-shell.panel-collapsed {
  grid-template-columns: 236px minmax(0, 1fr) 66px;
}

.sidebar,
.generator {
  position: sticky;
  top: 0;
  height: 100vh;
}

.generator {
  overflow-y: auto;
}

.sidebar {
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 18px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow: visible;
}

.mobile-top-actions {
  display: none;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  font-weight: 750;
}

.brand span {
  display: grid;
  gap: 1px;
}

.brand small {
  color: var(--soft);
  font-size: 11px;
  font-weight: 500;
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 8px;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
}

.sidebar-nav a,
.sidebar-nav button,
.category-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 450;
  text-align: left;
}

.sidebar-nav span {
  min-width: 22px;
  padding: 2px 7px;
  color: var(--text);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  text-align: center;
}

.sidebar-nav .active,
.sidebar-nav a:hover,
.sidebar-nav button:hover,
.category-button:hover,
.category-button.active {
  color: var(--text);
  background: var(--accent-soft);
}

kbd {
  padding: 2px 6px;
  color: var(--soft);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
}

.sidebar-bottom {
  position: relative;
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding-right: 8px;
}

.product-hunt-badge {
  display: block;
  margin-top: 2px;
}

.product-hunt-badge img {
  width: 100%;
  max-width: 250px;
  height: auto;
}

.signed-out-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #6f7482;
  font-size: 14px;
}

.github-stars {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  margin-left: auto;
  color: #111;
  border-radius: 5px;
}

.github-stars span {
  padding: 3px 7px;
  color: #fff;
  background: #050505;
  font-size: 0;
}

.github-stars span::before {
  content: "GH";
  font-size: 11px;
  font-weight: 800;
}

.github-stars strong {
  padding: 3px 8px;
  background: #ffd21f;
  font-size: 13px;
}

.invite-card {
  width: 100%;
  border: 0;
  text-align: left;
}

.invite-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 66px;
  padding: 12px 14px;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.78)) padding-box,
    linear-gradient(105deg, #fde7c8, #f172d8) border-box;
  border: 1px solid transparent;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(117, 93, 65, 0.05);
}

.invite-card span:first-child {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.invite-card strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-card small {
  overflow: hidden;
  color: #6f7482;
  font-size: 12px;
  font-weight: 420;
  letter-spacing: 0;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gift-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #161616;
  background: #fff;
  border: 1px solid #e7e0d6;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(65, 48, 31, 0.05);
  font-size: 0;
}

.gift-icon::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12v10H4V12'/%3E%3Cpath d='M2 7h20v5H2z'/%3E%3Cpath d='M12 22V7'/%3E%3Cpath d='M12 7H7.5a2.5 2.5 0 1 1 0-5C11 2 12 7 12 7z'/%3E%3Cpath d='M12 7h4.5a2.5 2.5 0 1 0 0-5C13 2 12 7 12 7z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12v10H4V12'/%3E%3Cpath d='M2 7h20v5H2z'/%3E%3Cpath d='M12 22V7'/%3E%3Cpath d='M12 7H7.5a2.5 2.5 0 1 1 0-5C11 2 12 7 12 7z'/%3E%3Cpath d='M12 7h4.5a2.5 2.5 0 1 0 0-5C13 2 12 7 12 7z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.signed-out-actions {
  display: block;
}

.signed-out-actions[hidden] {
  display: none;
}

.get-started-button {
  width: min(100%, 356px);
  min-height: 48px;
  padding: 0 16px;
  color: #fff;
  background:
    linear-gradient(#111, #111) padding-box,
    linear-gradient(100deg, #42e457, #42bcff, #e55dff) border-box;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 750;
}

.free-credits-button {
  min-height: 48px;
  color: #a0a2ad;
  background: transparent;
  border: 0;
  font-weight: 650;
  white-space: nowrap;
}

.account-summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 2px;
  background: transparent;
}

.account-summary[hidden] {
  display: none;
}

.account-avatar-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.account-avatar-button span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #079baa;
  color: #fff;
  font-weight: 800;
}

.add-credits-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  min-width: 0;
  padding: 4px;
  color: #fff;
  background: #171717;
  border: 0;
  border-radius: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.add-credits-button strong {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 32px;
  max-width: 138px;
  padding: 0 10px;
  background: #252525;
  border-radius: 8px;
  color: #ffd06b;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-popover {
  position: absolute;
  left: 0;
  width: 246px;
  bottom: 62px;
  z-index: 35;
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(61, 46, 30, 0.18);
}

.account-popover[hidden] {
  display: none;
}

.account-profile {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 0 4px 12px;
  border-bottom: 1px solid var(--line);
}

.account-profile span:last-child {
  display: grid;
  min-width: 0;
}

.account-profile strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-profile small,
.account-menu small,
.legal-row small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu {
  display: grid;
  gap: 3px;
}

.account-item {
  position: relative;
}

.account-item > a,
.account-item > button,
.logout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  width: 100%;
  padding: 8px 10px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-size: 14px;
  text-align: left;
}

.account-item > a:hover,
.account-item > button:hover,
.account-item:focus-within > a,
.account-item:focus-within > button,
.logout-row:hover {
  background: var(--accent-soft);
}

.account-flyout {
  position: absolute;
  left: calc(100% + 10px);
  top: 0;
  z-index: 90;
  display: none;
  width: 238px;
  padding: 14px;
  color: var(--text);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(61, 46, 30, 0.15);
}

.account-flyout::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 0;
  width: 16px;
  height: 100%;
}

.account-item:hover .account-flyout,
.account-item:focus-within .account-flyout {
  display: grid;
  gap: 8px;
}

.account-flyout h3 {
  margin: 0;
  font-size: 15px;
}

.account-flyout.language-flyout {
  width: 184px;
}

.account-flyout p,
.account-flyout a {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.account-flyout a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.language-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.language-options button,
.language-options a {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 28px;
  width: 100%;
  padding: 0 10px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}

.language-options button.active,
.language-options a.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.legal-flyout {
  max-height: 220px;
  overflow: auto;
}

.logout-row {
  min-height: 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 650;
}

.sidebar-footer {
  display: flex;
  gap: 6px;
  padding: 0 12px;
  color: var(--soft);
  font-size: 12px;
}

.content {
  min-width: 0;
  padding: 24px 24px 42px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: flex-start;
  padding: 0 0 12px;
  background: linear-gradient(to bottom, var(--bg) 76%, rgba(246, 243, 238, 0));
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(520px, 100%);
  min-height: 42px;
  padding: 0 12px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(61, 46, 30, 0.05);
}

.search-box span {
  color: var(--soft);
  font-size: 13px;
}

.search-box input {
  min-width: 0;
  flex: 1;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  -webkit-text-security: none;
  text-security: none;
  background: transparent;
  border: 0;
  font-family: inherit;
  outline: 0;
}

.credit-button,
.generate-button {
  min-height: 40px;
  padding: 0 14px;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius);
  font-weight: 650;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: stretch;
  margin: 8px 0 22px;
  padding: 26px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 14px;
  font-size: clamp(38px, 5.6vw, 74px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.hero img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
  border-radius: 12px;
}

.model-row,
.gallery-header,
.sort-tabs {
  display: flex;
  align-items: center;
}

.model-row {
  gap: 9px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(61, 46, 30, 0.055);
}

.model-row::-webkit-scrollbar {
  display: none;
}

.model-row[hidden] {
  display: none !important;
}

.model-chip,
.sort-tabs button,
.quick-options button,
.generator-header button,
.install-box button {
  min-height: 34px;
  padding: 0 12px;
  color: var(--muted);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 450;
  white-space: nowrap;
}

.model-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.model-chip-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #737b8a;
  font-size: 16px;
  font-weight: 850;
  line-height: 1;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.model-chip-brand-icon {
  fill: currentColor;
  stroke: none;
}

.google-icon {
  color: inherit;
}

.model-chip-new {
  padding: 2px 6px;
  color: var(--blue);
  background: #f7faff;
  border-radius: 999px;
  font-size: 11px;
  font-style: italic;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.model-chip.active,
.model-chip:hover,
.sort-tabs button.active,
.sort-tabs button:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.model-chip.active .model-chip-icon,
.model-chip:hover .model-chip-icon {
  color: #fff;
}

.gallery-header {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.gallery-header h2 {
  margin-bottom: 4px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: 0;
}

.gallery-header p {
  margin-bottom: 0;
  color: var(--soft);
  font-size: 13px;
}

.sort-tabs {
  gap: 8px;
}

.prompt-grid {
  column-count: 3;
  column-gap: 14px;
}

.prompt-grid[hidden] {
  display: none !important;
}

.prompt-grid.favorites-compact {
  column-count: 4;
}

.history-view {
  display: grid;
  gap: 14px;
}

.history-view[hidden] {
  display: none;
}

.profile-view {
  display: grid;
  gap: 14px;
}

.profile-view[hidden] {
  display: none;
}

.profile-panel {
  display: grid;
  gap: 14px;
  max-width: 520px;
}

.profile-identity,
.profile-credit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.profile-identity {
  justify-content: flex-start;
}

.profile-identity > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff;
  background: var(--accent);
  border-radius: 16px;
  font-weight: 850;
}

.profile-identity strong,
.profile-identity small {
  display: block;
}

.profile-identity small {
  color: var(--muted);
  font-size: 13px;
}

.profile-credit-row {
  color: var(--text);
  font: inherit;
  font-weight: 760;
}

.profile-credit-row strong {
  font-size: 18px;
}

.profile-links {
  display: grid;
  gap: 8px;
}

.profile-links button,
.profile-back-button,
.profile-home-button {
  padding: 12px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.profile-info-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.profile-info-panel[hidden] {
  display: none;
}

.profile-info-panel h2,
.profile-info-panel p {
  margin: 0;
}

.profile-info-panel h2 {
  font-size: 18px;
}

.profile-info-panel p {
  color: var(--muted);
  line-height: 1.5;
}

.profile-home-button {
  color: #fff;
  background: var(--accent);
  text-align: center;
}

.history-empty {
  margin: 0;
  color: var(--muted);
}

.history-mobile-tip {
  display: none;
  margin: 0;
}

.history-toolbar {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 54px;
}

.history-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(108px, 1fr));
  gap: 4px;
  justify-self: center;
  width: min(300px, 100%);
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.history-tabs button {
  min-height: 44px;
  padding: 0 18px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
}

.history-tabs button.active,
.history-layout-toggle button.active {
  color: #fff;
  background: var(--accent);
}

.history-layout-toggle {
  position: absolute;
  right: 0;
  display: inline-grid;
  grid-template-columns: repeat(2, 34px);
  gap: 3px;
  padding: 3px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.history-layout-toggle button {
  display: grid;
  place-items: center;
  min-height: 32px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  font-size: 16px;
  line-height: 1;
}

.history-empty {
  padding: 28px;
  text-align: center;
  background: var(--panel);
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
}

.history-list {
  column-count: 4;
  column-gap: 12px;
}

[data-history-list][data-history-kind="video"] {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  justify-content: center;
  column-count: auto;
}

[data-history-list][data-history-layout="list"] {
  display: grid;
  grid-template-columns: minmax(280px, min(760px, 100%));
  gap: 12px;
  justify-content: center;
  column-count: auto;
}

[data-history-list][data-history-layout="list"] .history-image-tile,
[data-history-list][data-history-layout="list"] .history-placeholder-tile {
  min-height: 0;
}

[data-history-list][data-history-layout="list"] .history-video-tile,
[data-history-list][data-history-layout="list"] .history-image-tile {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
}

[data-history-list][data-history-layout="list"] .history-image-tile a:first-child,
[data-history-list][data-history-layout="list"] .history-video-tile video {
  width: 188px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
}

[data-history-list][data-history-layout="list"] .history-image-tile img,
[data-history-list][data-history-layout="list"] .history-video-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

[data-history-list][data-history-layout="list"] .history-image-tile figcaption {
  position: static;
  padding: 0;
  color: var(--text);
  background: transparent;
  opacity: 1;
  transform: none;
}

[data-history-list][data-history-layout="list"] .history-image-tile figcaption button {
  color: var(--text);
}

[data-history-list][data-history-layout="list"] .history-image-tile figcaption span {
  color: var(--soft);
}

.history-status {
  flex: 0 0 auto;
  padding: 3px 7px;
  color: var(--muted);
  background: var(--bg);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}

.history-status.complete {
  color: var(--green);
}

.history-status.failed {
  color: var(--orange);
}

.history-image-tile,
.history-placeholder-tile {
  position: relative;
  display: inline-block;
  width: 100%;
  min-height: 120px;
  margin: 0 0 12px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--bg);
  break-inside: avoid;
}

.history-image-tile a:first-child {
  display: block;
}

.history-image-tile img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.history-video-tile video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: #111;
  border-radius: 10px;
}

.history-image-tile figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 28px 9px 8px;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
  font-size: 11px;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.history-image-tile figcaption button,
.history-image-tile figcaption span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-image-tile figcaption button {
  width: 100%;
  padding: 0;
  color: #fff;
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: copy;
}

.history-image-tile figcaption span {
  color: rgba(255, 255, 255, 0.78);
}

.history-video-tile figcaption {
  position: static;
  padding: 8px 2px 0;
  color: var(--text);
  background: transparent;
  opacity: 1;
  transform: none;
}

.history-video-tile figcaption button {
  color: var(--text);
}

.history-video-tile figcaption span {
  color: var(--soft);
}

.history-image-tile:hover figcaption,
.history-image-tile:focus-within figcaption {
  opacity: 1;
  transform: translateY(0);
}

.history-download {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #111;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
  opacity: 0;
  transition: opacity 160ms ease;
}

.history-image-tile:hover .history-download,
.history-image-tile:focus-within .history-download {
  opacity: 1;
}

.history-placeholder-tile {
  display: grid;
  align-content: center;
  gap: 8px;
  place-items: center;
  padding: 12px;
  color: var(--soft);
  background: var(--bg);
  border: 1px dashed var(--line-strong);
  text-align: center;
}

.history-placeholder-tile strong {
  color: var(--muted);
}

.history-placeholder-tile small,
.history-placeholder-tile em {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.history-placeholder-tile.failed {
  color: var(--orange);
}

.prompt-card {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 14px;
  overflow: hidden;
  background: var(--panel-strong);
  border: 0;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(61, 46, 30, 0.075);
  break-inside: avoid;
  cursor: zoom-in;
}

.prompt-card-media,
.prompt-card img,
.prompt-card video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: #eee;
  transition: transform 180ms ease, filter 180ms ease;
}

.prompt-card:hover .prompt-card-media,
.prompt-card:focus-within .prompt-card-media,
.prompt-card:hover img,
.prompt-card:focus-within img,
.prompt-card:hover video,
.prompt-card:focus-within video {
  transform: scale(1.02);
  filter: brightness(0.72);
}

.prompt-card-video-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  pointer-events: none;
  background: rgba(20, 20, 20, 0.62);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  opacity: 0.86;
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
}

.prompt-card-video-badge::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid #fff;
}

.prompt-card-remove-favorite {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
  background: rgba(17, 17, 17, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.prompt-card-use-prompt {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 6;
  min-height: 30px;
  padding: 0 12px;
  color: #fff;
  background: rgba(17, 17, 17, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
}

.favorites-compact .prompt-card-media,
.favorites-compact .prompt-card img,
.favorites-compact .prompt-card video {
  min-height: 140px;
  max-height: 260px;
}

.prompt-card:hover .prompt-card-video-badge,
.prompt-card:focus-within .prompt-card-video-badge {
  background: rgba(20, 20, 20, 0.82);
  opacity: 1;
  transform: scale(1.04);
}

.prompt-card-button {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.prompt-card-content {
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 60px 16px 16px;
  color: #fff;
  opacity: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.prompt-card:hover .prompt-card-content,
.prompt-card:focus-within .prompt-card-content {
  opacity: 1;
  transform: translateY(0);
}

.prompt-card h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.28;
  letter-spacing: 0;
}

.prompt-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.4;
}

.prompt-meta,
.prompt-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prompt-meta {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.35;
  flex-direction: column;
  align-items: flex-start;
}

.prompt-source {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 650;
}

.prompt-source img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 999px;
  transform: none;
  filter: none;
}

.prompt-card:hover .prompt-source img,
.prompt-card:focus-within .prompt-source img {
  transform: none;
  filter: none;
}

.load-more-button {
  display: block;
  width: min(320px, 100%);
  min-height: 48px;
  margin: 36px auto 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(37, 30, 22, 0.12);
}

.load-more-button:hover,
.load-more-button:focus-visible {
  transform: translateY(-1px);
}

.load-more-button[hidden] {
  display: none;
}

.model-badge {
  padding: 4px 7px;
  color: var(--blue);
  background: #edf1ff;
  border-radius: 999px;
  font-weight: 750;
}

.prompt-actions button {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.36);
  border: 1px solid transparent;
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.prompt-actions button:hover {
  border-color: var(--line-strong);
}

.generator {
  padding: 18px 18px 18px 0;
}

.generator-card {
  display: grid;
  gap: 13px;
  padding: 16px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 18px 54px rgba(61, 46, 30, 0.09);
}

.generator-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.generator-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 750;
}

.generation-mode-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(82px, 1fr));
  gap: 4px;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.generation-mode-tabs button {
  min-height: 32px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
}

.generation-mode-tabs button.active {
  color: #fff;
  background: var(--accent);
}

.generator-header-actions {
  display: flex;
  gap: 8px;
}

.generator-header-actions button {
  min-width: 42px;
  font-size: 18px;
}

.generator-collapse-logo {
  display: none;
}

.mobile-account-bar {
  display: none;
}

.quick-options {
  display: flex;
  gap: 8px;
}

.image-editor,
.video-editor {
  display: grid;
  gap: 13px;
}

.image-editor[hidden],
.video-editor[hidden] {
  display: none;
}

.reverse-card {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 62px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--bg);
  border-radius: 16px;
  gap: 10px;
  position: relative;
}

.reverse-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.reverse-card span {
  font-size: 15px;
  font-weight: 650;
}

.reverse-card .reverse-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #707682;
  font-size: 0;
}

.reverse-icon svg,
.dropzone-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.reverse-card img {
  margin-left: auto;
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 12px;
}

.reverse-spinner,
.prompt-loading span {
  display: none;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(17, 17, 17, 0.14);
  border-top-color: #111;
  border-radius: 999px;
  animation: spin 720ms linear infinite;
}

.reverse-card.loading .reverse-spinner {
  position: absolute;
  right: 22px;
  display: block;
}

.reverse-card.loading img {
  opacity: 0.42;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.dropzone {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 58px;
  padding: 10px 10px 10px 14px;
  color: var(--muted);
  background: var(--panel-strong);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  text-align: left;
  gap: 10px;
}

.dropzone.dragging,
.dropzone:hover {
  color: var(--text);
  border-color: var(--accent);
}

.dropzone.dragging {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.06);
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.dropzone-copy {
  flex: 1;
  font-size: 14px;
  font-weight: 650;
}

.dropzone-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #7b8190;
  font-size: 0;
}

.reference-preview-list {
  display: flex;
  flex: 0 1 auto;
  gap: 6px;
  max-width: 136px;
  overflow: visible;
}

.reference-preview-item {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
}

.reference-preview-item img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 0 0 2px var(--panel-strong);
}

.reference-preview-item button {
  position: absolute;
  top: -9px;
  right: -9px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  color: #fff;
  background: #111;
  border: 2px solid var(--panel-strong);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  opacity: 1;
  transform: scale(1);
  transition: opacity 140ms ease, transform 140ms ease;
}

.reference-preview-item:hover button,
.reference-preview-item:focus-within button {
  opacity: 1;
  transform: scale(1);
}

.dropzone strong {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--muted);
  background: var(--bg);
  border-radius: 12px;
  font-size: 24px;
  font-weight: 400;
}

.upload-status {
  min-height: 18px;
  margin: -4px 2px 0;
  color: var(--soft);
  font-size: 12px;
}

.upload-status[data-tone="success"] {
  color: var(--green);
}

.upload-status[data-tone="error"] {
  color: var(--orange);
}

.prompt-box {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.prompt-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.prompt-label {
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
}

.prompt-box-header span {
  font-size: 13px;
}

.prompt-box-header kbd {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  min-height: 24px;
  color: var(--text);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.prompt-box-header button {
  margin-left: auto;
  color: #737987;
  background: transparent;
  border: 0;
  font-weight: 750;
}

.generator textarea {
  width: 100%;
  min-height: 178px;
  resize: vertical;
  padding: 0;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  -webkit-text-security: none;
  text-security: none;
  background: transparent;
  border: 0;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
  outline: none;
}

[data-credit-count],
[data-mobile-credit-count] {
  font-family: inherit;
  -webkit-text-security: none;
  text-security: none;
}

#generator-prompt,
#search-input,
[data-video-prompt] {
  -webkit-text-security: none !important;
  text-security: none !important;
  -webkit-text-fill-color: var(--text) !important;
}

.generator textarea::placeholder {
  color: #776f65;
  opacity: 1;
}

.generator textarea:focus,
.search-box:focus-within {
  border-color: var(--accent);
}

.prompt-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: #6f7482;
  background: rgba(246, 243, 238, 0.86);
  border-radius: inherit;
  backdrop-filter: blur(2px);
}

.prompt-loading[hidden] {
  display: none;
}

.prompt-loading span {
  display: block;
}

.prompt-loading small {
  font-size: 13px;
  font-weight: 650;
}

.quick-options {
  flex-wrap: wrap;
}

.generate-button {
  width: 100%;
  min-height: 52px;
  color: #fff;
  background: #111;
  border: 0;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 800;
}

.generation-result {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.generation-result[hidden] {
  display: none;
}

.generation-result[data-tone="success"] {
  border-color: rgba(97, 214, 142, 0.45);
}

.generation-result[data-tone="error"] {
  border-color: rgba(255, 111, 111, 0.55);
}

.generation-result[data-tone="queue"] {
  border-color: rgba(47, 120, 255, 0.35);
  background: #f6f8ff;
}

.generation-result p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.generation-actions {
  display: flex;
  margin-top: 10px;
}

.generation-actions button {
  min-height: 38px;
  padding: 0 12px;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 750;
}

.generation-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.generation-images img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

.generation-images video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #111;
  border-radius: 8px;
}

.video-upload-card {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto 38px;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 7px 10px 7px 13px;
  color: var(--text);
  background: var(--panel-strong);
  border: 1px dashed #d9dce4;
  border-radius: 15px;
}

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

.video-upload-card.dragging,
.video-upload-card:hover {
  border-color: var(--accent);
  background: #fff;
}

.video-upload-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.video-upload-icon {
  grid-column: 1;
  color: #747b8a;
  font-size: 18px;
  line-height: 1;
}

.video-upload-copy {
  grid-column: 2;
  min-width: 0;
}

.video-upload-card strong {
  display: block;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.25;
  text-overflow: clip;
  white-space: nowrap;
}

.video-upload-card:not(.has-media) .video-upload-copy {
  grid-column: 2 / 4;
}

.video-upload-card small {
  display: none;
  margin-top: 3px;
  color: #2f78ff;
  font-size: 13px;
  line-height: 1.1;
}

.video-upload-card b {
  grid-column: 4;
  justify-self: end;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--muted);
  background: var(--bg);
  border-radius: 12px;
  font-size: 22px;
  font-weight: 400;
}

.video-upload-preview-list {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}

.video-upload-preview-list:empty {
  display: none;
}

.video-upload-preview-item {
  position: relative;
  display: block;
  width: 48px;
  height: 48px;
}

.video-upload-preview-item img,
.video-upload-preview-item video {
  width: 48px;
  height: 48px;
  object-fit: cover;
  background: #111;
  border-radius: 10px;
}

.video-upload-preview-item button {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  color: #fff;
  background: #111;
  border: 2px solid var(--panel-strong);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.video-upload-card.has-media {
  border-color: #d9dce4;
  background: var(--panel-strong);
}

.video-upload-card.has-media.is-full b,
label[for="video-reference-upload"].has-media b {
  display: none;
}

.video-upload-card.has-media.is-full,
label[for="video-reference-upload"].has-media {
  grid-template-columns: 24px minmax(112px, 1fr) auto;
}

.video-upload-card.has-media small {
  display: block;
}

.video-upload-card.has-media .video-upload-icon {
  color: #6f7788;
}

.video-upload-card.has-media .video-upload-copy strong {
  color: #6f7788;
}

label[for="video-reference-upload"].has-media {
  background: #f6f8ff;
  border-color: #2f78ff;
  border-style: solid;
  box-shadow: inset 0 0 0 1px #2f78ff;
}

.video-frame-swap {
  color: #8b92a0;
  font-size: 16px;
  line-height: 1;
}

.video-upload-preview-video {
  width: 72px;
}

.video-upload-preview-video video {
  width: 72px;
}

.video-upload-duration {
  position: absolute;
  right: 4px;
  bottom: 3px;
  padding: 1px 5px;
  color: #fff;
  background: rgb(17 17 17 / 0.72);
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.25;
}

.video-prompt-box textarea {
  min-height: 210px;
}

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

.video-setting-row .option-menu {
  min-width: 0;
}

.video-setting-row > .option-menu > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  color: var(--text);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(61, 46, 30, 0.06);
  font-size: 15px;
  font-weight: 400;
}

.video-setting-row > .option-menu > button strong {
  font-weight: inherit;
}

.duration-list {
  right: 0;
  left: auto;
  width: min(150px, 100%);
  max-width: 100%;
  padding: 12px;
  overflow: hidden;
  transform: translateX(-20px);
}

.duration-list input {
  display: block;
  width: calc(100% - 24px);
  min-width: 0;
  margin: 0 12px;
  accent-color: var(--blue);
}

.duration-list input[type="range"] {
  width: calc(100% - 24px);
  margin: 0 12px;
}

.duration-range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 12px;
  color: var(--text);
  font-weight: 700;
}

.video-model-menu {
  width: 100%;
  max-width: 330px;
  margin: 0 auto;
}

.video-model-menu > button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  color: var(--text);
  background: var(--bg);
  border-radius: 16px;
  font-size: 17px;
  font-weight: 720;
}

.video-model-menu > button strong {
  font: inherit;
}

.video-model-icon,
.video-model-menu-list button > span:first-child {
  display: grid;
  place-items: center;
}

.video-model-icon svg,
.video-model-menu-list svg {
  width: 18px;
  height: 18px;
}

.video-model-icon img,
.video-model-menu-list img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.video-model-menu > button small {
  color: var(--muted);
  font-size: 15px;
}

.video-model-menu-list {
  left: 0;
  bottom: calc(100% + 10px);
  width: 100%;
  padding: 14px 16px;
  border-color: #dfe3eb;
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(24, 31, 42, 0.18);
}

.video-model-menu-list button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto 24px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: 8px 0;
  color: var(--text);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 12px;
}

.video-model-menu-list button::before {
  display: none;
}

.video-model-menu-list button:hover,
.video-model-menu-list button.selected {
  background: transparent;
}

.video-model-menu-list strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 760;
  line-height: 1.2;
}

.video-model-menu-list em {
  color: var(--accent);
  font-size: 12px;
  font-style: italic;
  font-weight: 800;
  letter-spacing: 0;
}

.video-model-menu-list b {
  color: var(--accent);
  font-size: 21px;
  line-height: 1;
  opacity: 0;
}

.video-model-menu-list button.selected b {
  opacity: 1;
}

.info-page {
  width: min(880px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 64px;
}

.info-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.info-nav a {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-strong);
}

.info-hero,
.info-section {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-strong);
}

.info-hero {
  display: grid;
  gap: 10px;
  padding: clamp(22px, 4vw, 36px);
}

.info-hero p,
.info-hero small {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.info-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(30px, 4.8vw, 46px);
  line-height: 1.06;
  letter-spacing: 0;
}

.info-hero span {
  max-width: 700px;
  color: var(--muted);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.6;
}

.info-primary-link {
  width: max-content;
  margin-top: 8px;
  padding: 13px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 760;
}

.info-sections {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.info-section {
  padding: clamp(18px, 3vw, 26px);
}

.info-section h2 {
  margin: 0 0 12px;
  font-size: clamp(20px, 2.3vw, 26px);
  letter-spacing: 0;
}

.info-section p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
}

.info-section p + p {
  margin-top: 10px;
}

.quality-label {
  margin: 0;
  padding-top: 4px;
  color: var(--soft);
  font-size: 13px;
}

.quality-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  padding: 4px;
  background: var(--bg);
  border-radius: 999px;
}

.quality-tabs button {
  min-height: 36px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 14px;
}

.quality-tabs button.active {
  color: var(--text);
  background: var(--panel-strong);
  box-shadow: 0 4px 12px rgba(61, 46, 30, 0.1);
}

.quick-options {
  display: grid;
  grid-template-columns: 1.25fr minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  overflow: visible;
}

.option-menu {
  position: relative;
}

.option-menu > button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 46px;
  color: var(--text);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(61, 46, 30, 0.06);
}

.batch-menu > button {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.batch-menu > button span {
  display: grid;
  place-items: center;
  height: 100%;
  color: #737987;
  border-right: 1px solid var(--line);
}

.batch-menu > button span:last-child {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.option-list {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 50;
  display: grid;
  gap: 2px;
  min-width: 160px;
  padding: 10px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(61, 46, 30, 0.18);
}

.option-list[hidden] {
  display: none;
}

.option-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 10px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 10px;
  text-align: left;
}

.option-list button::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid #222;
  border-radius: 3px;
}

.option-list button:hover {
  background: var(--accent-soft);
}

.option-list button[data-locked] {
  color: #9aa0ad;
}

.option-list button[data-locked]::before {
  border: 0;
  border-radius: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='11' x='3' y='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='11' x='3' y='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.option-list button span {
  margin-left: auto;
  color: #9aa0ad;
  font-size: 12px;
}

.aspect-menu .option-list {
  left: 50%;
  width: 170px;
  max-height: 328px;
  overflow: auto;
  transform: translateX(-50%);
}

.resolution-menu .option-list {
  right: 0;
  left: auto;
  width: 310px;
}

.resolution-list button {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: start;
  min-height: 66px;
}

.resolution-list button strong,
.resolution-list button small {
  grid-column: 2;
}

.resolution-list button small {
  color: #737987;
  font-size: 13px;
}

.model-menu {
  position: relative;
  width: min(210px, 100%);
  margin: 12px auto 0;
}

.model-menu > button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  color: var(--muted);
  background: var(--bg);
  border: 0;
  border-radius: 999px;
  font-size: 15px;
}

.model-menu > button span {
  color: var(--text);
}

.model-menu-list {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 30;
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 8px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.model-menu-list[hidden] {
  display: none;
}

.model-menu-list button {
  min-height: 36px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 10px;
  text-align: left;
}

.model-menu-list button:hover,
.model-menu-list button.selected {
  color: var(--text);
  background: var(--accent-soft);
}

.install-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--bg);
  border-radius: 12px;
}

.install-box p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.install-box button {
  overflow-wrap: anywhere;
  white-space: normal;
  text-align: left;
}

.panel-collapsed .generator {
  padding-right: 14px;
}

.panel-collapsed .generator-card {
  position: sticky;
  top: 12px;
  display: grid;
  place-items: center;
  width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 999px;
}

.panel-collapsed .generator-card > :not(.generator-header) {
  display: none;
}

.panel-collapsed .generator-header {
  display: block;
}

.panel-collapsed .generator-header h2 {
  display: none;
}

.panel-collapsed .generation-mode-tabs {
  display: none;
}

.panel-collapsed .generator-header-actions {
  display: block;
}

.panel-collapsed .generator-header-actions button {
  width: 48px;
  height: 48px;
  padding: 0;
  color: transparent;
  background: var(--panel-strong);
  border-radius: 999px;
}

.panel-collapsed .generator-header-actions button span {
  display: none;
}

.panel-collapsed .generator-collapse-logo {
  display: block;
  width: 28px;
  height: 28px;
  margin: auto;
  border-radius: 8px;
}

.detail-dialog {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.detail-dialog::backdrop,
.referral-dialog::backdrop,
.pricing-dialog::backdrop {
  background: rgba(20, 18, 15, 0.52);
  backdrop-filter: blur(10px);
}

.detail-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 31vw);
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--panel-strong);
  border-radius: 0;
}

.detail-image-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: clamp(28px, 4vw, 72px);
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.86), transparent 32%),
    linear-gradient(135deg, #f6f6f6, #e8e3dc 58%, #ece8e0);
}

.detail-image-wrap.has-video {
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  place-items: stretch center;
}

.detail-image-wrap img,
.detail-image-wrap video,
.detail-image-wrap iframe {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.detail-image-wrap.has-video img,
.detail-image-wrap.has-video video,
.detail-image-wrap.has-video iframe {
  max-height: 100%;
  min-height: 0;
}

.detail-image-wrap video,
.detail-image-wrap iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 100%;
  background: #111;
}

.detail-image-wrap.has-video video,
.detail-image-wrap.has-video iframe {
  height: 100%;
  object-fit: contain;
}

.detail-image-wrap iframe {
  border: 0;
}

.detail-close {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
}

.detail-close.outside {
  position: absolute;
  top: -18px;
  right: -18px;
  z-index: 2;
  display: none;
  width: 48px;
  height: 48px;
  font-size: 28px;
}

.detail-close.inside {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 3;
  width: 46px;
  height: 46px;
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  box-shadow: 0 10px 28px rgba(28, 24, 18, 0.16);
}

.detail-info {
  display: grid;
  grid-template-rows: auto auto auto minmax(260px, 42vh) auto auto auto;
  gap: 8px;
  height: 100%;
  overflow: auto;
  padding: 28px 28px 22px;
  border-left: 1px solid var(--line);
  min-height: 0;
}

.detail-toolbar {
  position: absolute;
  top: 24px;
  right: 82px;
  z-index: 3;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.detail-toolbar button {
  min-height: 40px;
  padding: 0 15px;
  color: #6d645a;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(28, 24, 18, 0.12);
  font-size: 14px;
  font-weight: 750;
}

.detail-toolbar button:hover {
  color: var(--text);
  background: #fff;
}

.detail-toolbar button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.detail-author {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.detail-author img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 999px;
}

.detail-author h2 {
  margin: 0 0 4px;
  display: -webkit-box;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.detail-author p,
.detail-stats {
  margin: 0;
  color: var(--muted);
}

.detail-model-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  color: #6e665d;
  background: #f5f0ea;
  border: 1px solid #eadfd3;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.detail-model-pill::before {
  content: "";
  width: 15px;
  height: 15px;
  margin-right: 7px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 18%, #9a8f84 0 16%, transparent 17%),
    conic-gradient(from 20deg, #867c72, #c5b9ab, #867c72);
}

.detail-prompt-title {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 750;
}

.detail-prompt {
  overflow: auto;
  min-height: 0;
  height: clamp(260px, 42vh, 520px);
  max-height: none;
  padding: 14px;
  color: #292621;
  background: var(--bg);
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.58;
  white-space: pre-wrap;
}

.detail-prompt-tools {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: -4px;
  margin-bottom: 4px;
  color: var(--muted);
}

.detail-prompt-tools button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  color: #716a61;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.detail-prompt-tools button:hover {
  color: var(--text);
  background: #f3eee7;
}

.detail-prompt-tools button::before {
  width: 17px;
  margin-right: 7px;
  color: currentColor;
  font-size: 17px;
  line-height: 1;
}

[data-translate-menu]::before {
  content: "A";
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
}

[data-copy-detail-prompt]::before {
  content: "";
  height: 17px;
  border: 2px solid currentColor;
  border-radius: 4px;
  box-shadow: 5px -5px 0 -2px var(--panel-strong), 5px -5px 0 0 currentColor;
}

.detail-translate {
  position: relative;
}

.detail-translate-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 4;
  display: grid;
  min-width: 138px;
  padding: 6px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.detail-translate-menu[hidden] {
  display: none;
}

.detail-translate-menu button {
  justify-content: flex-start;
  min-height: 32px;
  width: 100%;
}

.detail-translate-menu button::before {
  display: none;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-self: start;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.detail-actions button {
  height: 44px;
  min-height: 44px;
  min-width: 0;
  width: 100%;
  padding: 10px 14px;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.15;
  white-space: nowrap;
}

.detail-related {
  display: grid;
  gap: 8px;
  min-height: 0;
  padding-top: 0;
}

.detail-related[hidden] {
  display: none;
}

.detail-related h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.detail-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.detail-related-card {
  display: block;
  overflow: hidden;
  min-width: 0;
  padding: 0;
  background: var(--panel-strong);
  border: 0;
  border-radius: 10px;
  text-align: left;
}

.detail-related-card:hover {
  transform: translateY(-1px);
}

.detail-related-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--accent-soft);
}

.detail-related-thumb img,
.detail-related-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-related-thumb i {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 24px;
  height: 24px;
  background: rgba(17, 17, 17, 0.72);
  border-radius: 999px;
}

.detail-related-thumb i::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 9px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid #fff;
}

.referral-dialog {
  width: min(560px, calc(100% - 36px));
  max-height: min(760px, calc(100dvh - 40px));
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 20px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.is-hidden {
  display: none !important;
}

.pricing-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(1180px, calc(100vw - 72px));
  max-width: calc(100vw - 72px);
  max-height: calc(100dvh - 64px);
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
}

.pricing-panel {
  max-height: calc(100dvh - 64px);
  padding: 18px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 22px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  scrollbar-width: none;
}

.pricing-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.pricing-close {
  position: absolute;
  top: -20px;
  right: -20px;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff;
  background: rgba(20, 18, 15, 0.54);
  border: 0;
  border-radius: 999px;
  font-size: 30px;
  backdrop-filter: blur(10px);
}

.pricing-hero {
  display: grid;
  gap: 10px;
  padding: clamp(22px, 4vw, 42px) 24px;
  text-align: center;
  background:
    radial-gradient(circle at 72% 12%, rgba(180, 137, 255, 0.28), transparent 34%),
    radial-gradient(circle at 90% 90%, rgba(255, 153, 96, 0.18), transparent 32%),
    var(--bg);
  border-radius: 18px;
}

.pricing-dialog[data-context="india_queue"] .pricing-hero p::after {
  content: " India packs start at ₹29 so you can skip the free queue immediately.";
}

.pricing-hero h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}

.pricing-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.pricing-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.pricing-card.highlighted {
  border-color: #2183ff;
  box-shadow: inset 0 0 0 1px #2183ff;
}

.pricing-card.ultimate {
  border-color: #6554f4;
}

.pricing-card.india-starter {
  border-color: #12a150;
  box-shadow: inset 0 0 0 1px #12a150;
}

.pricing-card.india-starter[hidden],
.pricing-dialog:not([data-market="india"]) .pricing-card.india-starter {
  display: none;
}

.pricing-dialog[data-market="india"] .pricing-card[data-global-pack] {
  display: none;
}

.pricing-card h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  font-size: 22px;
}

.pricing-card h3 span {
  padding: 5px 10px;
  color: #2677ff;
  background: #eaf2ff;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
}

.pricing-card small,
.pricing-card p {
  margin: 0;
  color: var(--muted);
}

.pricing-card > strong {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  margin-top: 12px;
  font-size: clamp(30px, 3vw, 38px);
  line-height: 1;
}

.pricing-card s {
  color: var(--soft);
  font-size: clamp(18px, 2vw, 22px);
}

.pricing-card button {
  min-height: 44px;
  margin-top: 4px;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  font-weight: 760;
}

.pricing-card.highlighted button {
  background: #2183ff;
}

.pricing-card.ultimate button {
  background: #6554f4;
}

.pricing-card.india-starter button {
  background: #12a150;
}

.pricing-card button:disabled {
  color: var(--soft);
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.pricing-card ul {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.pricing-card li {
  line-height: 1.35;
}

.pricing-card li::before {
  content: "✓";
  margin-right: 8px;
  color: #19b85b;
  font-weight: 800;
}

.referral-close {
  position: fixed;
  top: -18px;
  right: -18px;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff;
  background: rgba(20, 18, 15, 0.54);
  border: 0;
  border-radius: 999px;
  font-size: 30px;
  backdrop-filter: blur(10px);
}

.referral-hero {
  padding: 22px;
  background:
    radial-gradient(circle at 78% 10%, rgba(184, 151, 255, 0.35), transparent 32%),
    radial-gradient(circle at 92% 88%, rgba(255, 140, 78, 0.2), transparent 30%),
    var(--bg);
  border-radius: 16px;
}

.referral-hero h2 {
  margin-bottom: 10px;
  font-size: 26px;
  line-height: 1.1;
}

.referral-hero p,
.referral-progress {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.referral-share-preview {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.referral-share-preview img {
  width: 96px;
  aspect-ratio: 1.28;
  object-fit: cover;
  border-radius: 10px;
}

.referral-share-preview strong,
.referral-share-preview small {
  display: block;
}

.referral-share-preview strong {
  margin-bottom: 4px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
}

.referral-share-preview small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.referral-steps {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}

.referral-steps p {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 0;
  color: #2c2924;
  font-size: 15px;
}

.referral-steps span {
  color: var(--accent);
  font-size: 20px;
}

.referral-steps small {
  color: #2c2924;
  font-size: 15px;
}

.referral-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.referral-link input {
  min-width: 0;
  color: #302c27;
  background: transparent;
  border: 0;
  outline: 0;
}

.referral-link button {
  min-height: 40px;
  padding: 0 14px;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  font-weight: 750;
}

.referral-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.referral-share-actions button {
  min-height: 36px;
  padding: 0 12px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 750;
}

.referral-share-actions button:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.referral-terms {
  display: block;
  margin-top: 22px;
  color: var(--muted);
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 28px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.login-dialog::backdrop {
  background: rgba(20, 18, 16, 0.34);
  backdrop-filter: blur(10px);
}

.login-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--muted);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 20px;
}

.login-dialog-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-weight: 800;
}

.login-dialog-brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.login-dialog h2 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: 0;
}

.login-dialog p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.login-dialog p strong {
  color: var(--text);
  font-weight: 800;
}

.google-login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  gap: 10px;
  color: #111;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
}

.google-login-button:hover,
.google-login-button:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.06);
}

.google-mark {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.login-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: min(360px, calc(100% - 32px));
  padding: 14px 16px;
  color: #fff;
  background: var(--accent);
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

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

@media (max-width: 1200px) {
  .app-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .app-shell.panel-collapsed {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .generator {
    position: fixed;
    z-index: 35;
    top: 12px;
    right: 14px;
    bottom: 12px;
    left: auto;
    width: min(348px, calc(100vw - 244px));
    height: auto;
    padding: 0;
    overflow: visible;
  }

  .generator-card {
    max-width: none;
    max-height: 100%;
    overflow: auto;
  }

  .panel-collapsed .generator {
    top: 12px;
    right: 18px;
    bottom: auto;
    width: 56px;
    padding: 0;
  }

  .panel-collapsed .generator-card {
    top: auto;
    width: 56px;
    min-height: 56px;
    max-height: 56px;
    overflow: hidden;
  }

  .panel-collapsed .generator-header-actions button {
    width: 56px;
    height: 56px;
    background-size: 32px 32px;
  }

  .detail-view {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    grid-auto-rows: max-content;
    align-content: start;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .detail-dialog {
    width: min(720px, calc(100% - 28px));
    height: min(900px, calc(100vh - 28px));
  }

  .detail-image-wrap {
    min-height: min(320px, 38vh);
    height: min(320px, 38vh);
    max-height: none;
    padding: 16px;
    scroll-margin-top: 0;
  }

  .detail-image-wrap.has-video {
    min-height: min(420px, 52vh);
    height: min(420px, 52vh);
  }

  .detail-info {
    grid-template-rows: auto auto auto minmax(220px, 36vh) auto auto auto;
    height: auto;
    min-height: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    overflow: visible;
  }

  .detail-prompt {
    height: clamp(220px, 36vh, 420px);
  }

  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pricing-dialog {
    width: min(920px, calc(100vw - 48px));
    max-width: calc(100vw - 48px);
  }
}

@media (min-width: 901px) and (max-width: 1200px) {
  .detail-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: none;
  }

  .detail-view {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 34vw);
    grid-template-rows: minmax(0, 1fr);
    align-content: stretch;
    overflow: hidden;
  }

  .detail-image-wrap {
    min-height: 0;
    height: auto;
    padding: clamp(24px, 3.5vw, 48px);
  }

  .detail-image-wrap.has-video {
    min-height: 0;
    height: auto;
  }

  .detail-info {
    grid-template-rows: auto auto auto minmax(240px, 40vh) auto auto auto;
    height: 100%;
    border-top: 0;
    border-left: 1px solid var(--line);
    overflow: auto;
  }

  .detail-prompt {
    height: clamp(240px, 40vh, 480px);
  }
}

@media (max-width: 900px) {
  .detail-dialog {
    width: min(720px, calc(100% - 28px));
    height: min(900px, calc(100vh - 28px));
    overflow: visible;
  }

  .detail-view {
    border-radius: 22px;
  }

  .detail-close.outside {
    display: block;
  }

  .detail-close.inside {
    display: none;
  }

  .detail-toolbar {
    top: 16px;
    right: 16px;
  }

  .detail-toolbar button {
    min-height: 34px;
    padding: 0 11px;
    font-size: 13px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    height: auto;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255, 250, 242, 0.94);
    border-right: 0;
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .brand span {
    font-size: 18px;
    line-height: 1.05;
  }

  .brand small {
    font-size: 11px;
  }

  .mobile-top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
  }

  .mobile-action-button,
  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-height: 42px;
    padding: 0;
    color: var(--text);
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 10px 32px rgba(61, 46, 30, 0.1);
  }

  .mobile-action-button {
    place-items: center;
  }

  .mobile-icon-search {
    position: relative;
    display: block;
    width: 20px;
    height: 20px;
  }

  .mobile-icon-search::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 13px;
    height: 13px;
    border: 2px solid currentColor;
    border-radius: 50%;
  }

  .mobile-icon-search::after {
    content: "";
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 8px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    transform: rotate(45deg);
    transform-origin: center;
  }

  .mobile-credit-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    place-items: center;
    grid-auto-flow: column;
    gap: 7px;
    margin-right: 0;
    min-height: 42px;
    padding: 0 10px;
    color: #111;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid transparent;
    border-radius: 999px;
    box-shadow: 0 10px 28px rgba(61, 46, 30, 0.08);
    font: inherit;
    font-weight: 900;
    pointer-events: auto;
  }

  .mobile-credit-pill b {
    color: #111;
  }

  .mobile-menu-toggle {
    position: relative;
    z-index: 34;
    gap: 0;
    width: 48px;
    min-height: 48px;
    margin-left: 0;
  }

  .mobile-profile-button {
    gap: 4px;
    width: 58px;
  }

  .mobile-profile-button img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 9px;
  }

  .mobile-menu-toggle span,
  .mobile-profile-button span {
    display: block;
    width: auto;
    height: auto;
    background: transparent;
    border-radius: 0;
    font-size: 12px;
    font-weight: 800;
  }

  .mobile-menu-toggle[aria-expanded="true"] {
    background: var(--accent);
  }

  .mobile-menu-toggle[aria-expanded="true"] span {
    color: #fff;
  }

  .sidebar-nav,
  .sidebar-bottom,
  .sidebar-footer {
    display: none;
  }

  .sidebar.mobile-menu-open .sidebar-nav,
  .sidebar.mobile-menu-open .sidebar-bottom,
  .sidebar.mobile-menu-open .sidebar-footer {
    display: grid;
    grid-column: 1 / -1;
  }

  .sidebar.mobile-menu-open .sidebar-nav {
    margin-top: 12px;
  }

  .sidebar.mobile-menu-open .sidebar-bottom {
    margin-top: 16px;
  }

  .sidebar.mobile-menu-open .sidebar-footer {
    display: flex;
    margin-top: 12px;
  }

  .content {
    padding: 14px;
    padding-bottom: 104px;
  }

  .app-shell.search-active .topbar {
    position: sticky;
    top: 61px;
    z-index: 19;
    display: grid;
    padding-bottom: 10px;
  }

  .topbar {
    position: static;
    display: none;
  }

  .profile-panel {
    max-width: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .hero img {
    min-height: 180px;
  }

  .prompt-grid {
    column-count: 1;
    column-gap: 0;
  }

  .prompt-grid.favorites-compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    column-count: initial;
  }

  .model-row {
    position: sticky;
    top: 61px;
    z-index: 18;
    gap: 10px;
    margin: 0 -14px 14px;
    padding: 12px 14px 10px;
    padding-right: min(42vw, 180px);
    background: rgba(246, 243, 238, 0.92);
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: blur(18px);
    scroll-padding-inline: 14px min(42vw, 180px);
  }

  .model-chip {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 760;
    box-shadow: 0 8px 24px rgba(61, 46, 30, 0.08);
  }

  .model-chip.active {
    box-shadow: 0 12px 28px rgba(17, 17, 17, 0.18);
  }

  .prompt-card {
    margin-bottom: 18px;
    border-radius: 20px;
    box-shadow: 0 18px 42px rgba(61, 46, 30, 0.12);
  }

  .prompt-card-media,
  .prompt-card img,
  .prompt-card video {
    width: 100%;
    min-height: 292px;
    max-height: 520px;
    object-fit: cover;
  }

  .favorites-compact .prompt-card {
    margin-bottom: 0;
    border-radius: 16px;
  }

  .favorites-compact .prompt-card-media,
  .favorites-compact .prompt-card img,
  .favorites-compact .prompt-card video {
    min-height: 125px;
    max-height: 235px;
  }

  .favorites-compact .prompt-card-video-badge {
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
  }

  .favorites-compact .prompt-card-remove-favorite {
    right: 8px;
    bottom: 8px;
    width: 28px;
    height: 28px;
    font-size: 18px;
  }

  .favorites-compact .prompt-card-use-prompt {
    right: 44px;
    bottom: 8px;
    min-height: 28px;
    padding: 0 10px;
    font-size: 11px;
  }

  .prompt-card:hover .prompt-card-media,
  .prompt-card:focus-within .prompt-card-media,
  .prompt-card:hover img,
  .prompt-card:focus-within img,
  .prompt-card:hover video,
  .prompt-card:focus-within video {
    transform: none;
    filter: none;
  }

  .prompt-card-video-badge {
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: rgba(17, 17, 17, 0.58);
    opacity: 1;
  }

  .prompt-card-video-badge::before {
    border-top-width: 5px;
    border-bottom-width: 5px;
    border-left-width: 8px;
  }

  .prompt-card-content {
    display: none;
  }

  .history-list {
    column-count: 2;
  }

  .history-toolbar {
    justify-items: center;
    gap: 8px;
  }

  .history-layout-toggle {
    position: static;
    justify-self: center;
  }

  .generator {
    position: fixed;
    z-index: 42;
    top: auto;
    right: 12px;
    bottom: 92px;
    left: 12px;
    width: auto;
    height: auto;
    max-height: calc(100vh - 116px);
    padding: 0;
    overflow: visible;
  }

  .generator-card {
    max-height: min(72vh, calc(100vh - 116px));
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    border-radius: 18px;
    -webkit-overflow-scrolling: touch;
  }

  .generator-header {
    position: sticky;
    top: 0;
    z-index: 4;
    padding-bottom: 8px;
    background: var(--panel-strong);
  }

  .prompt-box {
    min-height: 120px;
  }

  .generation-mode-tabs {
    border-radius: 12px;
  }

  .generation-mode-tabs button {
    min-height: 32px;
    padding: 0 12px;
    font-size: 13px;
  }

  .generator-header-actions {
    display: flex;
  }

  .mobile-account-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    padding: 10px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 14px;
  }

  .mobile-account-copy {
    min-width: 0;
  }

  .mobile-account-copy strong,
  .mobile-account-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-account-copy strong {
    font-size: 13px;
  }

  .mobile-account-copy small {
    color: var(--muted);
    font-size: 12px;
  }

  .mobile-account-bar button {
    min-height: 32px;
    padding: 0 10px;
    color: var(--text);
    background: var(--panel-strong);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 750;
  }

  .mobile-account-bar button[hidden] {
    display: none;
  }

  .app-shell.panel-collapsed {
    display: block;
  }

  .panel-collapsed .generator {
    display: none;
    right: 50%;
    left: auto;
    top: auto;
    bottom: 104px;
    width: 64px;
    transform: translateX(50%);
  }

  .panel-collapsed .generator-card {
    top: auto;
    width: 64px;
    min-height: 64px;
    max-height: 64px;
    overflow: hidden;
    border-radius: 999px;
  }

  .panel-collapsed .generator-header-actions button {
    position: relative;
    z-index: 36;
    width: 64px;
    height: 64px;
    background-size: 32px 32px;
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 14px;
    bottom: 10px;
    left: 14px;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    min-height: 72px;
    padding: 8px 12px 7px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(216, 207, 194, 0.9);
    border-radius: 24px;
    box-shadow: 0 18px 44px rgba(37, 30, 22, 0.16);
    backdrop-filter: blur(18px);
  }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    display: grid;
    place-items: center;
    gap: 4px;
    min-width: 0;
    min-height: 54px;
    color: var(--soft);
    background: transparent;
    border: 0;
    font-size: 11px;
    font-weight: 720;
    text-align: center;
  }

  .mobile-bottom-nav a.active,
  .mobile-bottom-nav button.active,
  .mobile-bottom-nav button:focus-visible {
    color: var(--text);
  }

  .mobile-create-button {
    align-self: center;
    width: 56px;
    height: 56px;
    min-height: 56px;
    margin: -15px auto 0;
    color: #fff !important;
    background: #111 !important;
    border-radius: 999px;
    box-shadow: 0 16px 28px rgba(17, 17, 17, 0.22);
    font-size: 30px !important;
    font-weight: 400 !important;
    line-height: 1;
  }

  .mobile-create-button span {
    display: block;
    margin-top: -3px;
  }

  .mobile-nav-icon {
    position: relative;
    display: block;
    width: 24px;
    height: 24px;
  }

  .mobile-nav-home::before {
    content: "";
    position: absolute;
    inset: 4px 5px 3px;
    background: currentColor;
    clip-path: polygon(50% 0, 100% 42%, 100% 100%, 62% 100%, 62% 62%, 38% 62%, 38% 100%, 0 100%, 0 42%);
  }

  .mobile-nav-explore::before {
    content: "";
    position: absolute;
    inset: 4px;
    border: 2px solid currentColor;
    border-radius: 50%;
  }

  .mobile-nav-explore::after {
    content: "";
    position: absolute;
    top: 8px;
    left: 10px;
    width: 8px;
    height: 8px;
    background: currentColor;
    clip-path: polygon(50% 0, 100% 100%, 50% 78%, 0 100%);
    transform: rotate(45deg);
  }

  .mobile-nav-history::before {
    content: "";
    position: absolute;
    inset: 4px 3px;
    border: 2px solid currentColor;
    border-radius: 4px;
  }

  .mobile-nav-history::after {
    content: "";
    position: absolute;
    left: 7px;
    right: 7px;
    top: 8px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor;
  }

  .mobile-nav-profile::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 8px;
    width: 8px;
    height: 8px;
    border: 2px solid currentColor;
    border-radius: 50%;
  }

  .mobile-nav-profile::after {
    content: "";
    position: absolute;
    left: 5px;
    right: 5px;
    bottom: 3px;
    height: 8px;
    border: 2px solid currentColor;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    border-bottom: 0;
  }

  .pricing-dialog {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 32px);
  }

  .pricing-panel {
    max-height: calc(100dvh - 32px);
    padding: 12px;
    border-radius: 18px;
  }

  .pricing-close {
    top: -12px;
    right: -8px;
    width: 42px;
    height: 42px;
    font-size: 26px;
  }
}

@media (max-width: 600px) {
  .referral-dialog {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
    padding: 18px;
  }

  .referral-close {
    top: 6px;
    right: 6px;
  }

  .sidebar {
    gap: 8px;
    padding: 12px 10px;
  }

  .brand {
    gap: 8px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .brand span {
    max-width: 118px;
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand small {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-top-actions {
    gap: 6px;
  }

  .mobile-action-button,
  .mobile-menu-toggle,
  .mobile-credit-pill {
    min-height: 40px;
  }

  .mobile-action-button {
    width: 40px;
  }

  .mobile-credit-pill {
    padding: 0 7px;
    font-size: 17px;
  }

  .mobile-profile-button {
    width: 48px;
  }

  .mobile-profile-button img {
    width: 28px;
    height: 28px;
  }

  .model-row {
    top: 63px;
  }

  h1 {
    font-size: 38px;
  }

  .hero-copy {
    font-size: 16px;
  }

  .gallery-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .sort-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .prompt-grid {
    column-count: 1;
  }

  .prompt-card {
    border-radius: 22px;
  }

  .prompt-card-media,
  .prompt-card img,
  .prompt-card video {
    min-height: 250px;
    max-height: 470px;
  }

  .history-list {
    column-count: 1;
  }

  .history-mobile-tip {
    display: block;
    margin-top: -2px;
    padding: 10px 12px;
    color: #536074;
    background: #f6f8ff;
    border: 1px solid #dbe5ff;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.35;
  }

  .referral-share-preview {
    grid-template-columns: 1fr;
  }

  .referral-share-preview img {
    width: 100%;
  }

  .generator-card {
    gap: 11px;
    padding: 12px;
  }

  .reverse-card,
  .dropzone {
    min-height: 54px;
  }

  .prompt-box {
    padding: 13px;
  }

  .generator textarea {
    min-height: 136px;
  }

  .quick-options,
  .quality-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .option-menu > button,
  .quality-tabs button {
    width: 100%;
    min-width: 0;
  }

  .model-menu-list,
  .option-list {
    max-width: calc(100vw - 44px);
  }

  .generate-button {
    position: sticky;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 15;
    box-shadow: 0 14px 34px rgba(25, 23, 19, 0.22);
  }

  .generation-images {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .pricing-hero {
    padding: 22px 14px;
  }

  .detail-related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}
