:root {
  --ink: #0a0a0d;
  --muted: #8b8f9c;
  --subtle: #c9ccd3;
  --line: #eceef2;
  --panel: #ffffff;
  --wash: #f7f8fa;
  --accent: #111111;
  --green: #247a55;
  --blue: #2166e8;
  --rose: #b43b57;
  --shadow: 0 24px 80px rgba(12, 16, 30, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  background: #fff;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 80px;
  padding: 0 clamp(20px, 10vw, 212px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  display: block;
  width: 164px;
  height: 42px;
}

.nav-title {
  color: #a4a7af;
  font-size: 15px;
  letter-spacing: 2px;
}

.top-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
}

.language-toggle {
  height: 34px;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 3px;
  color: #6d7380;
  border: 1px solid #dfe2e8;
  background: #fff;
}

.language-toggle span {
  min-width: 34px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

.language-toggle span.active {
  color: #fff;
  background: #050505;
}

.ghost-button,
.dark-button,
.sort-button,
.text-button,
.icon-button,
.category-tabs button {
  border: 0;
  background: transparent;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #343741;
}

.ghost-button svg {
  width: 15px;
  height: 15px;
}

.dark-button {
  min-width: 72px;
  height: 40px;
  color: #fff;
  background: #050505;
}

.hero {
  min-height: 440px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 46px 20px 42px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  color: #858b97;
  font-size: clamp(15px, 1.1vw, 19px);
  font-weight: 500;
  letter-spacing: 8px;
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: clamp(58px, 7vw, 118px);
  height: 1px;
  background: #d8dbe1;
}

.hero h1 {
  margin: 0;
  line-height: 0.94;
  font-size: clamp(52px, 5.8vw, 92px);
  font-weight: 950;
  letter-spacing: 0;
}

.hero h1 span,
.hero h1 strong {
  display: block;
  white-space: nowrap;
}

.hero h1 strong {
  color: #c9cbd1;
  font-size: 0.82em;
  font-weight: 950;
}

.hero.lang-en h1 {
  font-size: clamp(58px, 7.4vw, 118px);
  line-height: 1;
}

.hero.lang-en h1 strong {
  margin-top: 6px;
}

.hero-copy {
  max-width: min(960px, calc(100vw - 40px));
  margin: 20px auto 0;
  color: #737987;
  font-size: clamp(15px, 1vw, 18px);
  line-height: 1.6;
  letter-spacing: 1px;
}

.hero-copy::before {
  content: "";
  display: block;
  width: 52px;
  height: 2px;
  margin: 0 auto 12px;
  background: #111;
}

.instant-maker {
  max-width: 1540px;
  margin: 0 auto;
  padding: 0 24px 42px;
}

.instant-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.instant-head h2 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.15;
}

.instant-panel {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 16px;
  padding: 18px;
  border: 1px solid #dfe2e8;
  background: #fff;
  box-shadow: 0 18px 56px rgba(16, 19, 28, 0.08);
}

.instant-upload {
  position: relative;
  min-height: 238px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #343943;
  border: 1px dashed #cfd4dc;
  background: #fafbfc;
  cursor: pointer;
}

.instant-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.instant-upload-empty {
  display: grid;
  place-items: center;
  gap: 10px;
  text-align: center;
}

.instant-upload-empty svg {
  width: 28px;
  height: 28px;
}

.instant-upload-empty strong {
  font-size: 15px;
}

.instant-upload img {
  width: 100%;
  height: 100%;
  min-height: 238px;
  object-fit: cover;
}

.instant-compose {
  min-width: 0;
}

.instant-compose textarea {
  width: 100%;
  min-height: 118px;
  resize: vertical;
  padding: 16px;
  color: #222733;
  line-height: 1.7;
  border: 1px solid #dfe2e8;
  outline: 0;
  background: #fff;
}

.instant-compose textarea::placeholder {
  color: #8f96a3;
}

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

.instant-recommendation {
  min-height: 86px;
  padding: 12px;
  text-align: left;
  color: #30343d;
  border: 1px solid #dfe2e8;
  background: #fff;
}

.instant-recommendation.active {
  border-color: #111;
  box-shadow: inset 0 0 0 1px #111;
}

.instant-recommendation strong,
.instant-recommendation small {
  display: block;
}

.instant-recommendation strong {
  font-size: 14px;
}

.instant-recommendation small {
  margin-top: 8px;
  color: #767d89;
  line-height: 1.45;
}

.instant-settings {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  gap: 12px;
  margin-top: 12px;
}

.instant-setting-head {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #30343d;
  font-size: 13px;
  font-weight: 800;
}

.instant-setting-head small {
  color: #7c828e;
  font-size: 12px;
  font-weight: 500;
}

.instant-plan-options,
.instant-size-options {
  display: grid;
  gap: 8px;
}

.instant-plan-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.instant-size-options {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.instant-plan-option,
.instant-size-option {
  min-height: 46px;
  padding: 8px 10px;
  text-align: left;
  color: #343943;
  border: 1px solid #dfe2e8;
  background: #fff;
}

.instant-size-option {
  text-align: center;
}

.instant-plan-option.active,
.instant-size-option.active {
  color: #fff;
  border-color: #111;
  background: #111;
}

.instant-plan-option strong,
.instant-plan-option span,
.instant-size-option strong,
.instant-size-option small {
  display: block;
}

.instant-plan-option strong {
  font-size: 13px;
}

.instant-plan-option span {
  margin-top: 4px;
  font-size: 12px;
  color: #777d89;
}

.instant-size-option strong {
  font-size: 13px;
}

.instant-size-option small {
  margin-top: 3px;
  color: #7f8590;
  font-size: 11px;
  line-height: 1.2;
}

.instant-plan-option.active span,
.instant-size-option.active small {
  color: rgba(255, 255, 255, 0.72);
}

.instant-custom-size-fields {
  margin-top: 8px;
}

.instant-actions {
  display: grid;
  grid-template-columns: minmax(150px, 0.28fr) 1fr;
  gap: 10px;
  margin-top: 12px;
}

.instant-actions .text-button {
  justify-content: center;
  min-height: 48px;
  color: #111;
  border: 1px solid #dfe2e8;
}

.instant-actions .generate-button {
  margin-top: 0;
}

.instant-maker .generation-status {
  color: #69707c;
}

.instant-maker .generation-status.error {
  color: #a12d3d;
}

.controls {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.controls-inner {
  max-width: 1540px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.search-block {
  min-width: 0;
}

.search-field {
  width: min(400px, 80vw);
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #dfe2e8;
  color: #a8acb5;
}

.search-field svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.category-tabs button {
  height: 38px;
  padding: 0 18px;
  color: #666b76;
  border: 1px solid #dfe2e8;
  background: #fff;
}

.category-tabs button.active {
  color: #fff;
  border-color: #050505;
  background: #050505;
}

.category-tabs .instant-tab {
  color: #111;
  border-color: #111;
  background: #fff;
}

.category-tabs .instant-tab.active {
  color: #111;
  border-color: #111;
  background: #fff;
  box-shadow: inset 0 0 0 1px #111;
}

.sort-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: #8b909d;
}

.icon-button svg,
.sort-button svg,
.text-button svg,
.generate-button svg {
  width: 16px;
  height: 16px;
}

.sort-button {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  color: #777c87;
}

.sort-button.active {
  color: #fff;
  background: #050505;
}

.prompt-section {
  max-width: 1540px;
  margin: 0 auto;
  padding: 42px 24px 80px;
}

.prompt-grid {
  column-count: 4;
  column-gap: 18px;
}

.prompt-card {
  break-inside: avoid;
  display: block;
  width: 100%;
  margin: 0 0 18px;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.prompt-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 48px rgba(18, 22, 34, 0.12);
}

.prompt-card img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--wash);
}

.card-body {
  padding: 14px;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.card-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  color: #4d535f;
  font-size: 12px;
  border: 1px solid #dfe2e8;
  background: #f8f9fb;
}

.card-copy {
  margin: 0;
  color: #747987;
  font-size: 13px;
  line-height: 1.55;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  color: #8b909b;
  font-size: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}

.modal.open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 12, 0.54);
}

.modal-panel {
  position: absolute;
  inset: 5vh 50%;
  transform: translateX(-50%);
  width: min(1180px, calc(100vw - 34px));
  max-height: 90vh;
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(360px, 0.95fr);
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #343741;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.9);
}

.close-button svg {
  width: 18px;
  height: 18px;
}

.modal-media {
  min-height: 520px;
  background: #f1f3f6;
}

.modal-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.modal-content {
  overflow: auto;
  padding: 38px;
}

.modal-heading h2 {
  margin: 16px 0 10px;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.05;
}

.modal-heading p {
  margin: 0;
  color: #777d89;
}

.favorite-action {
  height: 38px;
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: #111;
  border: 1px solid #dfe2e8;
  background: #fff;
}

.favorite-action.active {
  color: #fff;
  border-color: #111;
  background: #111;
}

.favorite-action svg {
  width: 16px;
  height: 16px;
}

.prompt-box,
.generate-card {
  margin-top: 24px;
  border: 1px solid var(--line);
  background: #fff;
}

.box-head {
  height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  color: #4a4f5c;
  font-weight: 700;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #111;
}

.prompt-box textarea {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  padding: 14px;
  color: #2c3039;
  line-height: 1.65;
  border: 0;
  outline: 0;
}

.generate-card {
  padding: 18px;
  background: #fafbfc;
}

.generate-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.generate-head h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.generate-head p {
  margin: 0;
  color: #7b808b;
  font-size: 13px;
}

.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  height: 32px;
  padding: 0 10px;
  color: #1c5b40;
  background: #eaf7f0;
}

.balance-pill svg {
  width: 16px;
  height: 16px;
}

.plan-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.plan-option {
  min-height: 92px;
  padding: 12px;
  text-align: left;
  border: 1px solid #dfe2e8;
  background: #fff;
}

.plan-option.active {
  border-color: #111;
  box-shadow: inset 0 0 0 1px #111;
}

.plan-option strong,
.plan-option span,
.plan-option small {
  display: block;
}

.plan-option strong {
  font-size: 15px;
}

.plan-option span {
  margin-top: 8px;
  color: #111;
  font-weight: 800;
}

.plan-option small {
  margin-top: 6px;
  color: #868b96;
}

.size-picker {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e5e8ee;
}

.size-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.size-picker-head span {
  color: #30343d;
  font-size: 14px;
  font-weight: 800;
}

.size-picker-head small {
  color: #7c828e;
  font-size: 12px;
}

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

.size-option {
  min-height: 58px;
  padding: 9px 10px;
  text-align: left;
  color: #343943;
  border: 1px solid #dfe2e8;
  background: #fff;
}

.size-option.active {
  color: #fff;
  border-color: #111;
  background: #111;
}

.size-option strong,
.size-option small {
  display: block;
}

.size-option strong {
  font-size: 14px;
}

.size-option small {
  margin-top: 4px;
  color: #8b909b;
  font-size: 11px;
}

.size-option.active small {
  color: rgba(255, 255, 255, 0.72);
}

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

.custom-size-fields[hidden] {
  display: none;
}

.custom-size-fields label {
  display: grid;
  gap: 6px;
  color: #555b67;
  font-size: 12px;
  font-weight: 700;
}

.custom-size-fields input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  color: #111;
  border: 1px solid #dfe2e8;
  outline: 0;
  background: #fff;
}

.generate-button {
  width: 100%;
  height: 48px;
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  border: 0;
  background: #050505;
}

.generate-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.generation-status {
  min-height: 22px;
  margin-top: 12px;
  color: #69707c;
  font-size: 13px;
}

.generation-status.error {
  color: #a12d3d;
}

.generated-result img {
  width: 100%;
  display: block;
  margin-top: 12px;
  border: 1px solid var(--line);
}

.auth-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(430px, calc(100vw - 32px));
  transform: translate(-50%, -50%);
  padding: 34px;
  background: #fff;
  box-shadow: var(--shadow);
}

.auth-head {
  text-align: center;
}

.auth-logo {
  width: 132px;
  height: auto;
  margin-bottom: 20px;
}

.auth-head h2 {
  margin: 0;
  font-size: 28px;
}

.auth-head p {
  margin: 10px 0 0;
  color: #747987;
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.auth-form label {
  display: grid;
  gap: 8px;
}

.auth-form label span {
  color: #4e5561;
  font-size: 13px;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  color: #111;
  border: 1px solid #dfe2e8;
  outline: 0;
  background: #fff;
}

.auth-form input:focus {
  border-color: #111;
}

.code-row {
  display: grid;
  grid-template-columns: 1fr 118px;
  gap: 8px;
}

.code-button {
  border: 1px solid #111;
  background: #fff;
}

.auth-submit {
  width: 100%;
  height: 46px;
  margin-top: 4px;
  color: #fff;
  border: 0;
  background: #050505;
}

.auth-message {
  min-height: 20px;
  margin: 0;
  color: #247a55;
  font-size: 13px;
  line-height: 1.5;
}

.auth-message.error {
  color: #a12d3d;
}

.auth-note {
  margin: 18px 0 0;
  color: #9aa0aa;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.drawer-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(760px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 36px));
  transform: translate(-50%, -50%);
  overflow: auto;
  padding: 34px;
  background: #fff;
  box-shadow: var(--shadow);
}

.drawer-head h2 {
  margin: 16px 0 8px;
  font-size: 32px;
  line-height: 1.08;
}

.drawer-head p {
  margin: 0;
  color: #747987;
  line-height: 1.6;
}

.favorites-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.favorite-item {
  overflow: hidden;
  padding: 0;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.favorite-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(18, 22, 34, 0.1);
}

.favorite-item img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: var(--wash);
}

.favorite-item-body {
  padding: 12px;
}

.favorite-item h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.favorite-item p {
  margin: 0;
  color: #7b808b;
  font-size: 13px;
  line-height: 1.45;
}

.favorite-empty {
  grid-column: 1 / -1;
  min-height: 240px;
  display: grid;
  place-items: center;
  color: #9aa0aa;
  text-align: center;
  border: 1px dashed #dfe2e8;
}

.recharge-panel {
  width: min(620px, calc(100vw - 32px));
}

.upload-panel {
  width: min(680px, calc(100vw - 32px));
}

.upload-rewards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.upload-rewards div {
  padding: 14px;
  border: 1px solid var(--line);
  background: #fafbfc;
}

.upload-rewards strong,
.upload-rewards span {
  display: block;
}

.upload-rewards strong {
  font-size: 15px;
}

.upload-rewards span {
  margin-top: 6px;
  color: #7b808b;
  font-size: 13px;
  line-height: 1.45;
}

.recharge-packages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.recharge-package {
  min-height: 108px;
  padding: 16px;
  text-align: left;
  border: 1px solid #dfe2e8;
  background: #fff;
}

.recharge-package.active {
  border-color: #111;
  box-shadow: inset 0 0 0 1px #111;
}

.recharge-package strong,
.recharge-package span,
.recharge-package small {
  display: block;
}

.recharge-package strong {
  font-size: 24px;
}

.recharge-package span {
  margin-top: 8px;
  font-weight: 800;
}

.recharge-package small {
  margin-top: 6px;
  color: #7b808b;
}

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

.pay-methods button {
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #4d535f;
  border: 1px solid #dfe2e8;
  background: #fff;
}

.pay-methods button.active {
  color: #fff;
  border-color: #111;
  background: #111;
}

.pay-methods button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.pay-methods svg {
  width: 16px;
  height: 16px;
}

.upload-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.upload-form label {
  display: grid;
  gap: 8px;
}

.upload-form label span {
  color: #4e5561;
  font-size: 13px;
  font-weight: 700;
}

.upload-form input,
.upload-form select,
.upload-form textarea {
  width: 100%;
  padding: 0 12px;
  color: #111;
  border: 1px solid #dfe2e8;
  outline: 0;
  background: #fff;
}

.upload-form input,
.upload-form select {
  height: 44px;
}

.upload-form input[type="file"] {
  height: auto;
  padding: 12px;
  cursor: pointer;
  color: #5c6270;
  background: #fbfcfd;
}

.upload-form textarea {
  min-height: 150px;
  padding-top: 12px;
  resize: vertical;
  line-height: 1.6;
}

.upload-form input:focus,
.upload-form select:focus,
.upload-form textarea:focus {
  border-color: #111;
}

.upload-image-preview {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid #dfe2e8;
  background: #fff;
}

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

.upload-image-preview img {
  width: 92px;
  height: 72px;
  object-fit: cover;
  background: #f2f4f7;
}

.upload-image-preview span {
  min-width: 0;
  color: #59606d;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .topbar {
    padding-inline: 28px;
  }

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

@media (max-width: 820px) {
  .topbar {
    grid-template-columns: 1fr auto;
    height: 70px;
    gap: 14px;
  }

  .nav-title {
    display: none;
  }

  .hero {
    min-height: 420px;
    padding-block: 62px 58px;
  }

  .hero h1 {
    font-size: clamp(64px, 14vw, 112px);
  }

  .eyebrow {
    margin-bottom: 20px;
    gap: 16px;
    font-size: clamp(16px, 4vw, 24px);
    letter-spacing: 7px;
  }

  .eyebrow::before,
  .eyebrow::after {
    width: clamp(38px, 10vw, 76px);
  }

  .hero.lang-en h1 {
    font-size: clamp(48px, 10vw, 72px);
    line-height: 1.08;
  }

  .hero h1 strong {
    font-size: 0.9em;
  }

  .hero-copy {
    max-width: 680px;
    margin-inline: auto;
  }

  .instant-maker {
    padding-inline: 16px;
  }

  .instant-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .instant-panel {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .instant-upload {
    min-height: 190px;
  }

  .instant-upload img {
    min-height: 190px;
  }

  .instant-recommendations {
    grid-template-columns: 1fr;
  }

  .instant-settings {
    grid-template-columns: 1fr;
  }

  .instant-plan-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .instant-size-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .instant-actions {
    grid-template-columns: 1fr;
  }

  .controls-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .sort-tabs {
    justify-content: flex-end;
  }

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

  .modal-panel {
    inset: 18px 50%;
    max-height: calc(100vh - 36px);
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .modal-media {
    min-height: 320px;
  }

  .modal-content {
    overflow: visible;
    padding: 24px;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding-inline: 12px;
    gap: 10px;
  }

  .brand {
    max-width: 82px;
    overflow: hidden;
  }

  .brand img {
    width: 82px;
    height: auto;
  }

  .top-actions {
    gap: 4px;
  }

  .top-actions [data-open-favorites],
  .top-actions [data-open-recharge],
  .top-actions [data-open-upload] {
    display: none;
  }

  .top-actions .ghost-button {
    width: 28px;
    height: 34px;
    justify-content: center;
    overflow: hidden;
    color: transparent;
    white-space: nowrap;
  }

  .top-actions .ghost-button svg {
    display: block;
    flex: 0 0 auto;
    color: #343741;
  }

  .language-toggle {
    height: 32px;
    padding: 2px;
  }

  .language-toggle span {
    min-width: 22px;
    height: 26px;
    font-size: 11px;
  }

  .top-actions [data-auth-open="login"],
  .top-actions [data-auth-open="register"] {
    min-width: 34px;
    height: 34px;
    padding: 0 7px;
    color: #343741;
    font-size: 12px;
  }

  .top-actions [data-auth-open="register"] {
    color: #fff;
  }

  .dark-button {
    min-width: 34px;
  }

  .hero h1 {
    font-size: clamp(48px, 15vw, 62px);
  }

  .eyebrow {
    gap: 10px;
    font-size: 15px;
    letter-spacing: 4px;
  }

  .eyebrow::before,
  .eyebrow::after {
    width: 28px;
  }

  .hero.lang-en h1 {
    font-size: 44px;
    line-height: 1.12;
  }

  .hero h1 strong {
    font-size: 0.92em;
  }

  .hero.lang-en h1 strong {
    margin-top: 6px;
  }

  .hero-copy {
    font-size: 15px;
    letter-spacing: 0;
  }

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

  .plan-options {
    grid-template-columns: 1fr;
  }

  .generate-head {
    flex-direction: column;
  }

  .auth-panel {
    padding: 28px 20px;
  }

  .drawer-panel {
    padding: 28px 20px;
  }

  .favorite-item {
    grid-template-columns: 1fr;
  }

  .recharge-packages,
  .pay-methods,
  .upload-rewards,
  .favorites-list {
    grid-template-columns: 1fr;
  }
}
